/* TaxAI Ver.130.0 Common UI Pro Design System */

:root{
    --taxai-bg:#f3f6fb;
    --taxai-surface:#ffffff;
    --taxai-surface-soft:#f8fafc;
    --taxai-border:#dbe3ef;
    --taxai-border-soft:#e8eef7;
    --taxai-text:#0f172a;
    --taxai-muted:#64748b;
    --taxai-muted-2:#94a3b8;
    --taxai-primary:#2563eb;
    --taxai-primary-soft:#eff6ff;
    --taxai-accent:#06b6d4;
    --taxai-success:#16a34a;
    --taxai-warning:#f59e0b;
    --taxai-danger:#ef4444;
    --taxai-radius-sm:12px;
    --taxai-radius-md:16px;
    --taxai-radius-lg:22px;
    --taxai-radius-xl:28px;
    --taxai-shadow-sm:0 4px 14px rgba(15,23,42,.06);
    --taxai-shadow-md:0 12px 30px rgba(15,23,42,.08);
    --taxai-shadow-lg:0 22px 50px rgba(15,23,42,.12);
    --taxai-sidebar-width:290px;
}

html,
body{
    background:var(--taxai-bg) !important;
    color:var(--taxai-text) !important;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}

.taxai-shell{
    background:var(--taxai-bg) !important;
}

.taxai-main,
main.taxai-main,
.taxai-content,
.taxai-page-content,
.taxai-admin-main{
    background:var(--taxai-bg) !important;
    color:var(--taxai-text) !important;
    min-width:0 !important;
    overflow-x:hidden !important;
}

/* page spacing */
.taxai-page,
.taxai-pro-page,
.taxai-ds-page,
.taxai-wrapper,
.taxai-container,
.taxai-dashboard,
.taxai-admin-page,
.taxai-v86-page,
.taxai-v86-main{
    max-width:1440px !important;
    width:100% !important;
    margin:0 auto !important;
    padding:0 !important;
    box-sizing:border-box !important;
}

/* Hero / page header unified */
.taxai-page-header,
.page-header,
.taxai-hero,
.hero,
.page-hero,
.taxai-ds-hero,
.taxai-pro-hero,
.taxai-os-hero,
.taxai-auto-hero{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:22px !important;
    margin:0 0 22px !important;
    padding:26px 28px !important;
    border:1px solid var(--taxai-border) !important;
    border-radius:var(--taxai-radius-xl) !important;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 34%),
        linear-gradient(135deg,#ffffff 0%,#f5f8ff 100%) !important;
    box-shadow:var(--taxai-shadow-md) !important;
    color:var(--taxai-text) !important;
    overflow:hidden !important;
}

.taxai-page-header > div,
.page-header > div,
.taxai-hero > div,
.hero > div,
.page-hero > div,
.taxai-ds-hero > div,
.taxai-pro-hero > div,
.taxai-os-hero > div,
.taxai-auto-hero > div{
    min-width:0 !important;
}

.taxai-page-header h1,
.page-header h1,
.taxai-hero h1,
.hero h1,
.page-hero h1,
.taxai-ds-hero h1,
.taxai-pro-hero h1,
.taxai-os-hero h1,
.taxai-auto-hero h1{
    margin:0 0 8px !important;
    color:var(--taxai-text) !important;
    font-size:clamp(24px,2.2vw,34px) !important;
    line-height:1.18 !important;
    font-weight:900 !important;
    letter-spacing:-.035em !important;
}

.taxai-page-header p,
.page-header p,
.taxai-hero p,
.hero p,
.page-hero p,
.taxai-ds-hero p,
.taxai-pro-hero p,
.taxai-os-hero p,
.taxai-auto-hero p{
    margin:0 !important;
    color:var(--taxai-muted) !important;
    font-size:14px !important;
    line-height:1.75 !important;
    max-width:760px !important;
}

.taxai-breadcrumbs{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:8px !important;
    margin-bottom:10px !important;
    color:var(--taxai-muted-2) !important;
    font-size:12px !important;
    font-weight:800 !important;
}

.taxai-breadcrumbs a{
    color:var(--taxai-primary) !important;
    text-decoration:none !important;
}

.taxai-badge,
.taxai-pro-kicker,
.taxai-kicker,
.taxai-page-kicker{
    display:inline-flex !important;
    align-items:center !important;
    gap:6px !important;
    width:max-content !important;
    max-width:100% !important;
    margin:0 0 10px !important;
    padding:6px 11px !important;
    border:1px solid #bfdbfe !important;
    border-radius:999px !important;
    background:var(--taxai-primary-soft) !important;
    color:#1d4ed8 !important;
    font-size:12px !important;
    line-height:1 !important;
    font-weight:900 !important;
    letter-spacing:.04em !important;
}

/* cards */
.taxai-card,
.taxai-pro-card,
.taxai-panel,
.taxai-pro-panel,
.taxai-box,
.taxai-section,
.taxai-table-card,
.taxai-widget,
.taxai-module,
.card,
.panel{
    border:1px solid var(--taxai-border-soft) !important;
    border-radius:var(--taxai-radius-lg) !important;
    background:var(--taxai-surface) !important;
    box-shadow:var(--taxai-shadow-sm) !important;
    color:var(--taxai-text) !important;
    box-sizing:border-box !important;
}

.taxai-card,
.taxai-pro-card,
.taxai-panel,
.taxai-pro-panel,
.taxai-box,
.taxai-section,
.taxai-widget,
.taxai-module{
    padding:22px !important;
}

/* KPI cards */
.taxai-kpi-card,
.taxai-stat-card,
.taxai-metric-card,
.taxai-summary-card,
.taxai-pro-stat,
.taxai-pro-metric{
    position:relative !important;
    min-width:0 !important;
    padding:22px !important;
    border:1px solid var(--taxai-border-soft) !important;
    border-radius:var(--taxai-radius-lg) !important;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
    box-shadow:var(--taxai-shadow-sm) !important;
    overflow:hidden !important;
}

.taxai-kpi-card::before,
.taxai-stat-card::before,
.taxai-metric-card::before,
.taxai-summary-card::before,
.taxai-pro-stat::before,
.taxai-pro-metric::before{
    content:"" !important;
    position:absolute !important;
    inset:0 auto 0 0 !important;
    width:4px !important;
    background:linear-gradient(180deg,var(--taxai-primary),var(--taxai-accent)) !important;
}

.taxai-kpi-label,
.taxai-stat-label,
.taxai-metric-label,
.taxai-summary-label{
    color:var(--taxai-muted) !important;
    font-size:12px !important;
    font-weight:900 !important;
    letter-spacing:.05em !important;
    text-transform:uppercase !important;
}

.taxai-kpi-value,
.taxai-stat-value,
.taxai-metric-value,
.taxai-summary-value{
    margin-top:8px !important;
    color:var(--taxai-text) !important;
    font-size:clamp(22px,2vw,32px) !important;
    line-height:1.1 !important;
    font-weight:950 !important;
    letter-spacing:-.04em !important;
}

/* grids */
.taxai-grid,
.taxai-pro-grid,
.taxai-card-grid,
.taxai-dashboard-grid,
.taxai-kpi-grid,
.taxai-stat-grid,
.taxai-metric-grid{
    display:grid !important;
    gap:18px !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

.taxai-kpi-grid,
.taxai-stat-grid,
.taxai-metric-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

/* tables */
.taxai-table,
.taxai-pro-table,
table{
    width:100% !important;
    border-collapse:separate !important;
    border-spacing:0 !important;
}

.taxai-table-card,
.taxai-table-wrap,
.table-responsive{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    border-radius:var(--taxai-radius-lg) !important;
}

.taxai-table th,
.taxai-pro-table th,
table th{
    background:var(--taxai-surface-soft) !important;
    color:#334155 !important;
    font-size:12px !important;
    font-weight:900 !important;
    letter-spacing:.03em !important;
    border-bottom:1px solid var(--taxai-border-soft) !important;
    white-space:nowrap !important;
}

.taxai-table td,
.taxai-pro-table td,
table td{
    border-bottom:1px solid #edf2f7 !important;
    color:#334155 !important;
    font-size:13px !important;
}

.taxai-table th,
.taxai-table td,
.taxai-pro-table th,
.taxai-pro-table td,
table th,
table td{
    padding:13px 14px !important;
    vertical-align:middle !important;
}

/* buttons */
.taxai-button,
.taxai-btn,
.taxai-action-btn,
.btn,
button,
input[type="submit"]{
    border-radius:12px !important;
    font-weight:900 !important;
}

.taxai-button,
.taxai-btn,
.taxai-action-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    min-height:40px !important;
    padding:0 15px !important;
    text-decoration:none !important;
    border:1px solid var(--taxai-border) !important;
    background:#ffffff !important;
    color:var(--taxai-text) !important;
    box-shadow:0 2px 8px rgba(15,23,42,.04) !important;
    cursor:pointer !important;
}

.taxai-button-primary,
.taxai-btn-primary,
.btn-primary,
.taxai-action-btn.primary{
    border-color:var(--taxai-primary) !important;
    background:linear-gradient(135deg,var(--taxai-primary),#1d4ed8) !important;
    color:#fff !important;
}

/* forms */
input,
select,
textarea{
    border:1px solid #cbd5e1 !important;
    border-radius:12px !important;
    background:#fff !important;
    color:var(--taxai-text) !important;
    min-height:40px;
    box-sizing:border-box !important;
}

input:focus,
select:focus,
textarea:focus{
    outline:none !important;
    border-color:var(--taxai-primary) !important;
    box-shadow:0 0 0 3px rgba(37,99,235,.12) !important;
}

/* sidebar polish */
.taxai-sidebar,
.taxai-common-sidebar{
    width:var(--taxai-sidebar-width) !important;
    min-width:var(--taxai-sidebar-width) !important;
    max-width:var(--taxai-sidebar-width) !important;
    background:linear-gradient(180deg,#07111f 0%,#0f172a 100%) !important;
    box-shadow:14px 0 32px rgba(15,23,42,.16) !important;
}

.taxai-sidebar a,
.taxai-sidebar .taxai-sidebar-link,
.taxai-common-sidebar a,
.taxai-common-sidebar .taxai-sidebar-link{
    border-radius:12px !important;
    transition:background .15s ease, color .15s ease, transform .15s ease !important;
}

.taxai-sidebar a:hover,
.taxai-sidebar .taxai-sidebar-link:hover,
.taxai-common-sidebar a:hover,
.taxai-common-sidebar .taxai-sidebar-link:hover{
    background:rgba(255,255,255,.09) !important;
    transform:translateX(2px) !important;
}

/* overflow protection */
.taxai-main *,
.taxai-content *,
.taxai-page-content *{
    box-sizing:border-box;
}

img,
svg,
canvas,
video{
    max-width:100%;
}

/* responsive */
@media (max-width:1200px){
    .taxai-kpi-grid,
    .taxai-stat-grid,
    .taxai-metric-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
}

@media (max-width:900px){
    .taxai-page-header,
    .page-header,
    .taxai-hero,
    .hero,
    .page-hero,
    .taxai-ds-hero,
    .taxai-pro-hero,
    .taxai-os-hero,
    .taxai-auto-hero{
        flex-direction:column !important;
        padding:20px !important;
        border-radius:20px !important;
    }

    .taxai-card,
    .taxai-pro-card,
    .taxai-panel,
    .taxai-pro-panel,
    .taxai-box,
    .taxai-section,
    .taxai-widget,
    .taxai-module{
        padding:18px !important;
    }
}

@media (max-width:640px){
    .taxai-kpi-grid,
    .taxai-stat-grid,
    .taxai-metric-grid,
    .taxai-grid,
    .taxai-pro-grid,
    .taxai-card-grid,
    .taxai-dashboard-grid{
        grid-template-columns:1fr !important;
    }

    .taxai-page-header h1,
    .page-header h1,
    .taxai-hero h1,
    .hero h1,
    .page-hero h1,
    .taxai-ds-hero h1,
    .taxai-pro-hero h1,
    .taxai-os-hero h1,
    .taxai-auto-hero h1{
        font-size:24px !important;
    }
}

/* Ver表記だけを目立たなくする */
.taxai-version,
.taxai-ver,
[class*="version"],
[class*="Version"]{
    display:none !important;
}
