* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased; 
}
*:focus-visible { 
    outline: 2px solid var(--brand); 
    outline-offset: 2px; 
}
html { 
    -webkit-text-size-adjust: 100%; 
}
body { 
    font-family: var(--font-body); 
    font-size: 14px; 
    line-height: 1.55; 
    color: var(--ink-1); 
    background: var(--bg); 
    min-height: 100vh; 
}
button { 
    font: inherit; 
    cursor: pointer; 
    border: 0; 
    background: transparent; 
    color: inherit; 
}
input, select, textarea { 
    font: inherit; 
    color: inherit; 
}
a { 
    color: inherit; 
    text-decoration: none; 
}
ul, ol { 
    list-style: none; 
}
img, svg { 
    display: block; 
    max-width: 100%; 
}
table { 
    border-collapse: collapse; 
    border-spacing: 0; 
}
hr { 
    border: 0; 
    height: 1px; 
    background: var(--line); 
}
::placeholder { 
    color: var(--ink-4); 
    opacity: 1; 
}
::-webkit-scrollbar { 
    width: 10px; 
    height: 10px; 
}
::-webkit-scrollbar-track { 
    background: transparent; 
}
::-webkit-scrollbar-thumb { 
    background: var(--gray-300); 
    border-radius: var(--r-full); 
    border: 2px solid var(--bg); 
}
::-webkit-scrollbar-thumb:hover { 
    background: var(--gray-400); 
}
::selection { 
    background: var(--brand-200); 
    color: var(--brand-900); 
}
.flex { 
    display: flex; 
}
.inline-flex { 
    display: inline-flex; 
}
.grid { 
    display: grid; 
}
.items-center { 
    align-items: center; 
}
.items-start { 
    align-items: flex-start; 
}
.items-end { 
    align-items: flex-end; 
}
.justify-center { 
    justify-content: center; 
}
.justify-between { 
    justify-content: space-between; 
}
.justify-end { 
    justify-content: flex-end; 
}
.flex-1 { 
    flex: 1 1 0%; 
}
.flex-wrap { 
    flex-wrap: wrap; 
}
.gap-1 { 
    gap: var(--sp-1); 
}
.gap-2 { 
    gap: var(--sp-2);
}
.gap-3 { 
    gap: var(--sp-3); 
}
.gap-4 { 
    gap: var(--sp-4); 
}
.gap-5 { 
    gap: var(--sp-5); 
}
.gap-6 { 
    gap: var(--sp-6); 
}
.text-xs { 
    font-size: var(--text-xs); 
}
.text-sm {
    font-size: var(--text-sm); 
}
.text-base { 
    font-size: var(--text-base); 
}
.text-lg { 
    font-size: var(--text-lg); 
}
.text-xl { 
    font-size: var(--text-xl); 
}
.font-medium { 
    font-weight: 500; 
}
.font-semibold { 
    font-weight: 600; 
}
.font-bold { 
    font-weight: 700; 
}
.text-ink-0 { 
    color: var(--ink-0); 
}
.text-ink-1 { 
    color: var(--ink-1); 
}
.text-ink-2 { 
    color: var(--ink-2); 
}
.text-ink-3 { 
    color: var(--ink-3); 
}
.text-ink-4 { 
    color: var(--ink-4); 
}
.text-brand { 
    color: var(--brand); 
}
.text-success { 
    color: var(--success); 
}
.text-warning { 
    color: var(--warning); 
}
.text-danger { 
    color: var(--danger); 
}
.text-info { 
    color: var(--info); 
}
.text-muted { 
    color: var(--ink-3); 
}
.text-center { text-align: center; }
.text-left { 
    text-align: left; 
}
.text-right { 
    text-align: right; 
}
.mt-1 { 
    margin-top: var(--sp-1); 
} 
.mt-2 { 
    margin-top: var(--sp-2); 
} 
.mt-3 { 
    margin-top: var(--sp-3); 
} 
.mt-4 { 
    margin-top: var(--sp-4); 
} 
.mt-5 { 
    margin-top: var(--sp-5); 
} 
.mt-6 { 
    margin-top: var(--sp-6); 
} 
.mt-7 { 
    margin-top: var(--sp-7); 
}
.mb-1 { 
    margin-bottom: var(--sp-1); 
} 
.mb-2 { 
    margin-bottom: var(--sp-2); 
} 
.mb-3 { 
    margin-bottom: var(--sp-3);
} 
.mb-4 { 
    margin-bottom: var(--sp-4); 
} 
.mb-5 { 
    margin-bottom: var(--sp-5); 
} .mb-6 { 
    margin-bottom: var(--sp-6); 
}
.hidden { 
    display: none !important; 
}
.relative { 
    position: relative; 
}
.absolute { 
    position: absolute; 
}
.sticky { 
    position: sticky; 
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.animate-fade-in { animation: fadeIn var(--t-base) var(--ease-out); }
.animate-fade-up { animation: fadeInUp var(--t-base) var(--ease-out); }
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }
.login-screen {
    position: fixed; inset: 0;
    display: flex;
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%);
    z-index: var(--z-modal);
}
.login-screen::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(110, 231, 184, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 119, 6, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.login-aside {
    flex: 1; 
    padding: 60px;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    position: relative; 
    z-index: 2;
    color: #fff;
}
.login-brand-large {
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
}
.login-brand-large .logo-mark {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--r-lg);
    display: flex; align-items: center; justify-content: center;
}
.login-brand-large h1 {
    font-family: var(--font-display);
    font-size: var(--text-xl); font-weight: 700; letter-spacing: -.01em;
}
.login-brand-large p {
    font-size: var(--text-sm); color: rgba(255,255,255,0.7);
}
.login-hero {
    max-width: 460px;
}
.login-hero-tag {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-full);
    font-size: var(--text-xs);
    font-weight: 500;
    margin-bottom: var(--sp-5);
}
.login-hero-tag::before { 
    content: ''; 
    width: 6px; 
    height: 6px; 
    background: var(--brand-300); 
    border-radius: 50%; 
}
.login-hero h2 {
    font-family: var(--font-display);
    font-size: 42px; line-height: 1.1; font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: var(--sp-4);
    background: linear-gradient(135deg, #fff 0%, var(--brand-200) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-hero p {
    font-size: var(--text-lg); color: rgba(255,255,255,0.75); line-height: 1.7;
}
.login-features { 
    display: grid; 
    gap: var(--sp-4); 
    margin-top: var(--sp-7); 
}
.login-feature { display: flex; gap: var(--sp-3); align-items: flex-start; }
.login-feature-icon {
    width: 32px; height: 32px; flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-300);
}
.login-feature-text { 
    font-size: var(--text-sm); 
    color: rgba(255,255,255,0.85); 
    padding-top: 5px; 
}
.login-feature-text b { 
    color: #fff; 
    font-weight: 600; 
}
.login-foot { 
    font-size: var(--text-xs); 
    color: rgba(255,255,255,0.5); 
}
.login-card-wrap {
    flex: 0 0 480px;
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    padding: var(--sp-7);
}
.new-login-card {
    width: 100%; 
    max-width: 380px;
}
.new-login-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-3xl); 
    font-weight: 700;
    color: var(--ink-0); 
    margin-bottom: var(--sp-2);
    letter-spacing: -0.02em;
}
.new-login-card .subtitle {
    color: var(--ink-3); 
    font-size: var(--text-md);
    margin-bottom: var(--sp-7);
}
.new-login-card .field { 
    margin-bottom: var(--sp-4); 
}
.new-login-card .login-btn {
    margin-top: var(--sp-2);
}
.login-divider {
    display: flex; align-items: center; gap: var(--sp-3);
    margin: var(--sp-6) 0;
    color: var(--ink-4); font-size: var(--text-xs);
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--line);
}
.login-hint {
    background: var(--brand-soft);
    border: 1px solid var(--brand-200);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    font-size: var(--text-sm);
    color: var(--brand-ink);
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
}
.login-hint kbd {
    background: #fff; 
    padding: 2px 8px; 
    border-radius: var(--r-xs);
    font-family: var(--font-mono); 
    font-size: 11px; 
    font-weight: 600;
    border: 1px solid var(--brand-200);
}
@media (max-width: 920px) {
    .login-aside { 
        display: none; 
    }
    .login-card-wrap { 
        flex: 1; 
    }
}
.app { 
    display: none; 
    min-height: 100vh; 
}
.app.active { 
    display: block; 
}
.shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas: "sidebar topbar" "sidebar main";
    min-height: 100vh;
}
.shell.sidebar-collapsed { 
    grid-template-columns: var(--sidebar-w-collapsed) 1fr; 
}
.sidebar {
    grid-area: sidebar;
    background: var(--surface);
    border-left: 1px solid var(--line);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    z-index: var(--z-sticky);
    overflow: hidden;
    transition: width var(--t-base) var(--ease-out);
}
.sidebar-head {
    height: var(--topbar-h);
    padding: 0 var(--sp-4);
    display: flex; align-items: center; gap: var(--sp-3);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.brand-mark {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
    box-shadow: var(--shadow-brand-sm);
}
.brand-text {
    flex: 1; min-width: 0;
}
.brand-text-name {
    font-family: var(--font-display);
    font-weight: 700; font-size: var(--text-lg); color: var(--ink-0);
    letter-spacing: -0.01em;
}
.brand-text-sub {
font-size: 10px; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.05em;
    font-weight: 600;
}
.sidebar.collapsed .brand-text { 
    display: none; 
}
.sidebar.collapsed .nav-item-text { 
    display: none; 
}
.sidebar.collapsed .nav-section-title { 
    display: none; 
}
.sidebar.collapsed .nav-badge { 
    display: none; 
}
.sidebar.collapsed .nav-item { 
    justify-content: center; padding: 0 14px; 
}
.sidebar.collapsed .sidebar-foot { 
    padding: var(--sp-3); 
}
.sidebar.collapsed .sidebar-user-name, .sidebar.collapsed .sidebar-user-role { 
    display: none; 
}
.sidebar-search {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--line);
}
.sidebar.collapsed .sidebar-search { 
    display: none;
}
.sidebar-search-box {
    position: relative;
    display: flex; align-items: center;
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    padding: 7px 11px;
    transition: var(--t-fast);
}
.sidebar-search-box:focus-within {
    background: var(--surface);
    border-color: var(--brand-300);
    box-shadow: var(--ring-focus);
}
.sidebar-search-box svg { 
    color: var(--ink-3); 
    flex-shrink: 0; 
}
.sidebar-search-box input {
    flex: 1; border: 0; background: transparent;
    font-size: var(--text-sm);
    margin-right: var(--sp-2);
    outline: none;
}
.sidebar-search-box kbd {
    background: var(--surface); padding: 1px 6px;
    border-radius: var(--r-xs); font-family: var(--font-mono);
    font-size: 10px; color: var(--ink-3);
    border: 1px solid var(--line);
}
.sidebar-body {
    flex: 1; overflow-y: auto;
    padding: var(--sp-3) 0;
}
.nav-section { 
    margin-bottom: var(--sp-4); 
}
.nav-section-title {
    padding: var(--sp-2) var(--sp-5);
    font-size: 10px; font-weight: 700;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.nav-list { 
    padding: 0 var(--sp-2); 
}
.nav-item {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: 8px var(--sp-3);
    border-radius: var(--r-md);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    transition: all var(--t-fast) var(--ease-out);
    margin-bottom: 2px;
    position: relative;
}
.nav-item:hover { 
    background: var(--surface-3); 
    color: var(--ink-1); 
}
.nav-item.active {
    background: var(--brand-soft);
    color: var(--brand-700);
    font-weight: 600;
}
.nav-item.active::before {
    content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--brand);
    border-radius: var(--r-full);
}
.nav-item-icon { 
    flex-shrink: 0; 
    color: currentColor; 
}
.nav-item-text { 
    flex: 1; 
}
.nav-badge {
    font-size: 10px; font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--r-full);
    background: var(--gray-200); color: var(--gray-700);
    min-width: 18px; text-align: center;
}
.nav-item.active .nav-badge { 
    background: var(--brand); 
    color: #fff; 
}
.nav-badge.danger { 
    background: var(--danger); 
    color: #fff; 
}
.sidebar-foot {
    border-top: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-2);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: var(--t-fast);
}
.sidebar-user:hover { 
    background: var(--surface-3); 
}
.sidebar-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-600) 100%);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: var(--text-base);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.sidebar-user-info { 
    flex: 1; 
    min-width: 0; 
}
.sidebar-user-name { 
    font-size: var(--text-sm); 
    font-weight: 600; 
    color: var(--ink-1); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.sidebar-user-role { 
    font-size: 11px; 
    color: var(--ink-3); 
}
.topbar {
    grid-area: topbar;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; padding: 0 var(--sp-6);
    gap: var(--sp-4);
    position: sticky; top: 0;
    z-index: var(--z-sticky);
}
.topbar-toggle {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-md);
    color: var(--ink-2); transition: var(--t-fast);
}
.topbar-toggle:hover { 
    background: var(--surface-3); 
    color: var(--ink-1); 
}
.breadcrumbs {
    display: flex; align-items: center; gap: var(--sp-2);
    font-size: var(--text-md);
    flex: 1;
}
.breadcrumb-item { 
    color: var(--ink-3); 
}
.breadcrumb-item.current { 
    color: var(--ink-0); 
    font-weight: 600; 
}
.breadcrumb-sep { 
    color: var(--ink-4); 
    font-size: var(--text-base); 
}
.topbar-actions { 
    display: flex; 
    align-items: center; 
    gap: var(--sp-2); 
}
.topbar-btn {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-md);
    color: var(--ink-2);
    transition: var(--t-fast);
    position: relative;
}
.topbar-btn:hover { 
    background: var(--surface-3); 
    color: var(--ink-1); 
}
.topbar-btn .dot {
    position: absolute; top: 8px; left: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface);
}
.topbar-search {
    width: 280px;
    display: flex; align-items: center; gap: var(--sp-2);
    background: var(--surface-3);
    padding: 7px var(--sp-3);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--t-fast);
    color: var(--ink-3);
}
.topbar-search:hover { 
    background: var(--surface); 
    border-color: var(--line); 
}
.topbar-search-text { 
    flex: 1; 
    font-size: var(--text-sm); 
}
.topbar-search kbd {
    background: var(--surface); padding: 1px 6px;
    border-radius: var(--r-xs); font-family: var(--font-mono);
    font-size: 10px; color: var(--ink-3);
    border: 1px solid var(--line);
}
.main {
    grid-area: main;
    padding: var(--sp-6) var(--sp-7);
    min-width: 0;
}
.page-container { 
    max-width: var(--maxw-content); 
    margin: 0 auto; 
}
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: var(--sp-5); flex-wrap: wrap;
    padding-bottom: var(--sp-5);
    margin-bottom: var(--sp-6);
    border-bottom: 1px solid var(--line);
}
.page-head-info { 
    flex: 1; 
    min-width: 0; 
}
.page-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--ink-0);
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.page-subtitle {
    font-size: var(--text-md); 
    color: var(--ink-3);
}
.page-actions {
    display: flex; 
    align-items: center; 
    gap: var(--sp-2);
}
.btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 7px;
    height: 38px;
    padding: 0 var(--sp-4);
    font-family: inherit; 
    font-size: var(--text-md); 
    font-weight: 600;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--t-fast) var(--ease-out);
    user-select: none;
}
.btn:active { 
    transform: scale(0.97); 
}
.btn:disabled { 
    opacity: 0.5; 
    pointer-events: none; 
}
.btn svg { 
    width: 16px; 
    height: 16px; 
    flex-shrink: 0; 
}
.btn-sm { 
    height: 32px; 
    padding: 0 var(--sp-3); 
    font-size: var(--text-sm); 
}
.btn-xs { 
    height: 26px; 
    padding: 0 10px; 
    font-size: var(--text-xs); 
    border-radius: var(--r-sm); 
}
.btn-lg { 
    height: 44px; 
    padding: 0 var(--sp-5); 
    font-size: var(--text-lg); 
}
.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-brand-sm);
}
.btn-primary:hover { 
    background: var(--brand-700); 
    box-shadow: var(--shadow-brand); 
    transform: translateY(-1px); 
}
.btn-primary:active { 
    transform: translateY(0) scale(0.97); 
}
.btn-secondary {
    background: var(--surface);
    color: var(--ink-1);
    border-color: var(--line);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { 
    background: var(--surface-3); 
    border-color: var(--line-2); 
}
.btn-ghost {
    color: var(--ink-2);
    background: transparent;
}
.btn-ghost:hover { 
    background: var(--surface-3); 
    color: var(--ink-1); 
}
.btn-danger {
    background: var(--danger); 
    color: #fff;
}
.btn-danger:hover { 
    background: #b91c1c; 
}
.btn-success {
    background: var(--success); 
    color: #fff;
}
.btn-success:hover { 
    background: #047857; 
}
.btn-block {
    width: 100%; 
}
.btn-icon { 
    width: 38px; 
    padding: 0; 
}
.btn-icon.btn-sm { 
    width: 32px; 
}
.btn-soft-brand { 
    background: var(--brand-soft); 
    color: var(--brand-700);
}
.btn-soft-brand:hover { 
    background: var(--brand-100); 
}
.icon-btn {
    width: 30px; 
    height: 30px;
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--ink-3);
    transition: var(--t-fast);
}
.icon-btn:hover { 
    background: var(--surface-3); 
    color: var(--ink-1); 
}
.icon-btn.danger:hover { 
    background: var(--danger-soft); 
    color: var(--danger); 
}
.icon-btn svg { 
    width: 15px; 
    height: 15px; 
}
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    margin-bottom: var(--sp-5);
    transition: var(--t-base);
}
.card-hover:hover { 
    border-color: var(--line-2); 
    box-shadow: var(--shadow-md); 
}
.card-head {
    padding: var(--sp-4) var(--sp-5);
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-3);
    border-bottom: 1px solid var(--line);
}
.card-title {
    display: flex; align-items: center; gap: var(--sp-2);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--ink-0);
}
.card-title-icon {
    width: 28px; height: 28px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
}
.card-subtitle {
    font-size: var(--text-sm); color: var(--ink-3); font-weight: 400;
    margin-top: 2px;
}
.card-body { 
    padding: var(--sp-5); 
}
.card-body.compact { 
    padding: var(--sp-3) var(--sp-4); 
}
.card-body.flush { 
    padding: 0; 
}
.card-foot {
    padding: var(--sp-3) var(--sp-5);
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-5);
    position: relative;
    overflow: hidden;
    transition: var(--t-base) var(--ease-out);
}
.stat-card:hover { 
    border-color: var(--line-2); 
    box-shadow: var(--shadow-md); 
    transform: translateY(-2px); 
}
.stat-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--sp-3);
}
.stat-icon {
    width: 36px; height: 36px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
}
.stat-icon.gold { 
    background: var(--gold-100); 
    color: var(--gold); 
}
.stat-icon.info { 
    background: var(--info-soft); 
    color: var(--info); 
}
.stat-icon.success { 
    background: var(--success-soft); 
    color: var(--success); 
}
.stat-icon.warning { 
    background: var(--warning-soft); 
    color: var(--warning); 
}
.stat-icon.purple { 
    background: var(--purple-soft); 
    color: var(--purple); 
}
.stat-icon.pink { 
    background: var(--pink-soft); 
    color: var(--pink); 
}
.stat-trend {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 8px;
    border-radius: var(--r-full);
    font-size: var(--text-xs); font-weight: 600;
    background: var(--success-soft); color: var(--success);
}
.stat-trend.down { 
    background: var(--danger-soft); 
    color: var(--danger); 
}
.stat-label {
    font-size: var(--text-sm); 
    color: var(--ink-3);
    font-weight: 500;
    margin-bottom: 4px;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 28px; 
    font-weight: 700; 
    color: var(--ink-0);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-value-suffix {
    font-size: var(--text-md); 
    color: var(--ink-3); 
    font-weight: 500;
    margin-right: 4px;
}
.stat-foot {
    margin-top: var(--sp-2);
    font-size: var(--text-xs); 
    color: var(--ink-3);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
}
.field {
    display: flex; 
    flex-direction: column;
    gap: 6px;
}
.field-label {
    font-size: var(--text-sm); 
    font-weight: 600; 
    color: var(--ink-1);
    display: flex; 
    align-items: center; 
    gap: 4px;
}
.field-label .req { 
    color: var(--danger); 
}
.field-hint { 
    font-size: var(--text-xs); 
    color: var(--ink-3); 
    margin-top: 2px; 
}
.field-error { 
    font-size: var(--text-xs); 
    color: var(--danger); 
    margin-top: 2px; 
}
.input, .select, .textarea {
    width: 100%;
    height: 38px;
    padding: 0 var(--sp-3);
    font: inherit;
    font-size: var(--text-md);
    color: var(--ink-1);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: all var(--t-fast);
    outline: none;
}
.textarea { 
    height: auto; 
    min-height: 90px; 
    padding: var(--sp-3); 
    resize: vertical; 
    line-height: 1.6; 
}
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left var(--sp-3) center;
    padding-left: 38px;
}
.input:hover, .select:hover, .textarea:hover { 
    border-color: var(--line-2); 
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand);
    box-shadow: var(--ring-focus);
}
.input.error, .select.error, .textarea.error {
    border-color: var(--danger);
}
.input.error:focus, .select.error:focus, .textarea.error:focus {
    box-shadow: 0 0 0 3px var(--danger-soft);
}
.input-group {
    position: relative;
}
.input-group .input { 
    padding-right: 38px; 
}
.input-group-icon {
    position: absolute; 
    right: var(--sp-3); 
    top: 50%; 
    transform: translateY(-50%);
    color: var(--ink-3); 
    pointer-events: none;
}
.input-group-icon svg { 
    width: 16px; 
    height: 16px; 
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--sp-4);
}
.form-grid.cols-2 { 
    grid-template-columns: repeat(2, 1fr); 
}
.form-grid.cols-3 { 
    grid-template-columns: repeat(3, 1fr); 
}
.form-grid.cols-4 { 
    grid-template-columns: repeat(4, 1fr); 
}
.field-full { 
    grid-column: 1 / -1; 
}
.field-span-2 { 
    grid-column: span 2; 
}
.toggle {
    display: inline-flex; 
    align-items: center; 
    gap: var(--sp-2);
    cursor: pointer;
    user-select: none;
}
.toggle input { 
    display: none; 
}
.toggle-track {
    width: 36px; height: 20px;
    background: var(--gray-300);
    border-radius: var(--r-full);
    position: relative;
    transition: var(--t-base);
    flex-shrink: 0;
}
.toggle-track::after {
    content: ''; position: absolute;
    top: 2px; right: 2px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: var(--t-base) var(--ease-spring);
}
.toggle input:checked + .toggle-track { 
    background: var(--brand); 
}
.toggle input:checked + .toggle-track::after { 
    right: calc(100% - 18px); 
}
.toggle-label { 
    font-size: var(--text-sm); 
    color: var(--ink-2); 
    font-weight: 500; 
}
.checkbox {
    display: inline-flex; 
    align-items: center; 
    gap: var(--sp-2);
    cursor: pointer;
    user-select: none;
}
.checkbox input { display: none; }
.checkbox-box {
    width: 18px; 
    height: 18px;
    background: var(--surface);
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-xs);
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: var(--t-fast);
    flex-shrink: 0;
}
.checkbox input:checked + .checkbox-box {
    background: var(--brand); 
    border-color: var(--brand);
}
.checkbox-box::after {
    content: '';
    width: 10px; 
    height: 6px;
    border: 2px solid #fff; 
    border-top: 0; 
    border-right: 0;
    transform: rotate(-45deg) scale(0);
    margin-bottom: 2px;
    transition: var(--t-fast);
}
.checkbox input:checked + .checkbox-box::after { 
    transform: rotate(-45deg) scale(1); 
}
.checkbox-label { 
    font-size: var(--text-sm); 
    color: var(--ink-1); 
}
.radio {
    display: inline-flex; 
    align-items: center; 
    gap: var(--sp-2);
    cursor: pointer;
}
.radio input { 
    display: none; 
}
.radio-box {
    width: 18px; height: 18px;
    border: 2px solid var(--line-2);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: var(--t-fast);
    flex-shrink: 0;
}
.radio input:checked + .radio-box { 
    border-color: var(--brand); 
}
.radio-box::after {
    content: '';
    width: 8px; height: 8px;
    background: var(--brand);
    border-radius: 50%;
    transform: scale(0);
    transition: var(--t-fast);
}
.radio input:checked + .radio-box::after { 
    transform: scale(1); 
}
.chip {
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
    padding: 5px 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    font-size: var(--text-sm); 
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    transition: var(--t-fast);
    user-select: none;
}
.chip:hover {
    background: var(--surface-3);
    color: var(--ink-1);
}
.chip.active, .chip[data-active="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.chip-count {
    background: rgba(0,0,0,0.08);
    padding: 1px 7px;
    border-radius: var(--r-full);
    font-size: 10px; font-weight: 700;
    min-width: 18px; text-align: center;
}
.chip.active .chip-count { 
    background: rgba(255,255,255,0.25); 
}
.tag {
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
    padding: 3px 9px;
    font-size: var(--text-xs); font-weight: 600;
    border-radius: var(--r-sm);
    background: var(--gray-100); color: var(--gray-700);
    white-space: nowrap;
}
.tag.brand { 
    background: var(--brand-soft); 
    color: var(--brand-700); 
}
.tag.gold { 
    background: var(--gold-100); 
    color: var(--gold-600); 
}
.tag.success { 
    background: var(--success-soft); 
    color: var(--success-ink); 
}
.tag.warning { 
    background: var(--warning-soft); 
    color: var(--warning-ink); 
}
.tag.danger { 
    background: var(--danger-soft); 
    color: var(--danger-ink); 
}
.tag.info { 
    background: var(--info-soft); 
    color: var(--info-ink); 
}
.tag.purple { 
    background: var(--purple-soft); 
    color: var(--purple-ink); 
}
.tag.pink {
    background: var(--pink-soft); 
    color: var(--pink-ink); 
}
.tag.outline { 
    background: transparent; 
    border: 1px solid var(--line); 
    color: var(--ink-2); 
}
.tag-dot { 
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: currentColor; 
    opacity: 0.65; 
}
.pill {
    display: inline-flex; 
    align-items: center; 
    gap: 5px;
    padding: 3px 10px;
    font-size: var(--text-xs); 
    font-weight: 600;
    border-radius: var(--r-full);
    white-space: nowrap;
}
.pill::before {
    content: ''; 
    width: 6px; 
    height: 6px; 
    border-radius: 50%;
    background: currentColor;
}
.pill.success { 
    background: var(--success-soft); 
    color: var(--success-ink); 
}
.pill.warning { 
    background: var(--warning-soft); 
    color: var(--warning-ink); 
}
.pill.danger { 
    background: var(--danger-soft); 
    color: var(--danger-ink); 
}
.pill.info { 
    background: var(--info-soft); 
    color: var(--info-ink); 
}
.pill.gray { 
    background: var(--gray-100); 
    color: var(--gray-700); 
}
.pill.brand { 
    background: var(--brand-soft); 
    color: var(--brand-700); 
}
.pill.purple { 
    background: var(--purple-soft); 
    color: var(--purple-ink); 
}
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    margin-bottom: var(--sp-5);
}
.table-toolbar {
    padding: var(--sp-3) var(--sp-4);
    display: flex; align-items: center; gap: var(--sp-3);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.table-search {
    flex: 1; min-width: 220px;
    display: flex; align-items: center; gap: var(--sp-2);
    background: var(--surface-3);
    padding: 6px var(--sp-3);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    transition: var(--t-fast);
}
.table-search:focus-within {
    background: var(--surface);
    border-color: var(--brand-300);
    box-shadow: var(--ring-focus);
}
.table-search svg { 
    color: var(--ink-3); 
    flex-shrink: 0; 
}
.table-search input { 
    flex: 1; border: 0; 
    background: transparent; 
    outline: none; 
    font-size: var(--text-sm); 
}
.table-scroll { 
    overflow-x: auto; 
}
.tbl {
    width: 100%;
    font-size: var(--text-base);
}
.tbl thead th {
    text-align: right;
    padding: 10px var(--sp-4);
    background: var(--surface-2);
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.tbl tbody td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--line-3);
    vertical-align: middle;
    color: var(--ink-1);
}
.tbl tbody tr { 
    transition: var(--t-fast); 
}
.tbl tbody tr:hover { 
    background: var(--surface-2); 
}
.tbl tbody tr:last-child td { 
    border-bottom: 0; 
}
.td-name { 
    font-weight: 600; 
    color: var(--ink-0); 
}
.td-num { 
    font-family: var(--font-mono); 
    font-size: var(--text-sm); 
}
.td-actions { 
    display: flex; 
    align-items: center; 
    gap: 2px; 
    justify-content: flex-end; 
}
.table-pagination {
    padding: var(--sp-3) var(--sp-4);
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    border-top: 1px solid var(--line);
    font-size: var(--text-sm);
    color: var(--ink-3);
    flex-wrap: wrap; 
    gap: var(--sp-3);
}
.empty {
    padding: var(--sp-10) var(--sp-5);
    text-align: center;
    color: var(--ink-3);
}
.empty-icon {
    width: 64px; 
    height: 64px;
    margin: 0 auto var(--sp-4);
    background: var(--surface-3);
    border-radius: var(--r-2xl);
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--ink-4);
}
.empty-title {
    font-size: var(--text-lg); 
    font-weight: 600;
    color: var(--ink-1);
    margin-bottom: 4px;
}
.empty-desc {
    font-size: var(--text-sm); 
    color: var(--ink-3);
    margin-bottom: var(--sp-4);
    max-width: 380px; 
    margin-inline: auto;
}
.modal-overlay {
    position: fixed; 
    inset: 0;
    background: var(--backdrop);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: var(--z-modal);
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: var(--sp-5);
    animation: fadeIn var(--t-fast);
}
.modal {
    background: var(--surface);
    border-radius: var(--r-2xl);
    width: 100%; 
    max-width: 540px;
    max-height: calc(100vh - 60px);
    display: flex; 
    flex-direction: column;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    animation: fadeInScale var(--t-base) var(--ease-spring);
}
.modal.size-md { 
    max-width: 720px; 
}
.modal.size-lg { 
    max-width: 920px; 
}
.modal.size-xl { 
    max-width: 1100px; 
}
.modal-head {
    padding: var(--sp-4) var(--sp-5);
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.modal-title {
    font-family: var(--font-display);
    font-size: var(--text-xl); 
    font-weight: 700;
    color: var(--ink-0);
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
}
.modal-close {
    width: 32px; 
    height: 32px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: var(--r-md);
    color: var(--ink-3);
    transition: var(--t-fast);
}
.modal-close:hover { 
    background: var(--surface-3); 
    color: var(--ink-1); 
}
.modal-body {
    padding: var(--sp-5);
    overflow-y: auto;
    flex: 1;
}
.modal-foot {
    padding: var(--sp-4) var(--sp-5);
    display: flex; 
    justify-content: flex-end; 
    gap: var(--sp-2);
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    flex-shrink: 0;
}
.toast-wrap {
    position: fixed;
    bottom: var(--sp-5); left: var(--sp-5);
    display: flex;
    flex-direction: column-reverse; 
    gap: var(--sp-2);
    z-index: var(--z-toast);
    pointer-events: none;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 11px var(--sp-4);
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
    box-shadow: var(--shadow-xl);
    font-size: var(--text-md);
    min-width: 280px; 
    max-width: 380px;
    pointer-events: auto;
    animation: fadeInUp var(--t-base) var(--ease-out);
}
.toast.success { 
    border-right: 3px solid var(--success); 
}
.toast.warning { 
    border-right: 3px solid var(--warning); 
}
.toast.danger { 
    border-right: 3px solid var(--danger); 
}
.toast.info { 
    border-right: 3px solid var(--info); 
}
.toast-icon {
    width: 28px; 
    height: 28px;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}
.toast.success .toast-icon { 
    background: var(--success-soft); 
    color: var(--success); 
}
.toast.warning .toast-icon { 
    background: var(--warning-soft); 
    color: var(--warning); 
}
.toast.danger  .toast-icon { 
    background: var(--danger-soft); 
    color: var(--danger); 
}
.toast.info    .toast-icon { 
    background: var(--info-soft); 
    color: var(--info); 
}
.toast-msg { 
    flex: 1; 
    color: var(--ink-1); 
    font-weight: 500; 
}
.toast-msg b { 
    font-weight: 600; 
}
.notif-panel {
    position: fixed;
    top: var(--topbar-h);
    left: var(--sp-4);
    width: 380px;
    max-height: calc(100vh - var(--topbar-h) - 20px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-2xl);
    z-index: var(--z-overlay);
    display: flex; 
    flex-direction: column;
    animation: fadeInScale var(--t-base) var(--ease-out);
    overflow: hidden;
}
.notif-head {
    padding: var(--sp-4);
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.notif-list { 
    flex: 1; 
    overflow-y: auto; 
    padding: var(--sp-2); 
}
.notif-item {
    padding: var(--sp-3);
    display: flex; gap: var(--sp-3);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: var(--t-fast);
}
.notif-item:hover { 
    background: var(--surface-3); 
}
.notif-item.unread { 
    background: var(--brand-soft); 
}
.notif-icon {
    width: 32px; 
    height: 32px;
    border-radius: var(--r-md);
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
    background: var(--brand-soft); 
    color: var(--brand);
}
.notif-content { 
    flex: 1; 
    min-width: 0; 
}
.notif-title { 
    font-size: var(--text-sm); 
    font-weight: 600; color: var(--ink-1); 
    margin-bottom: 2px; 
}
.notif-desc { 
    font-size: var(--text-xs); 
    color: var(--ink-3); 
    line-height: 1.5; 
}
.notif-time { 
    font-size: 10px; 
    color: var(--ink-4); 
    margin-top: 4px; 
}
.cmd-palette {
    position: fixed; 
    inset: 0;
    display: flex; 
    align-items: flex-start; 
    justify-content: center;
    padding-top: 100px;
    background: var(--backdrop);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    animation: fadeIn var(--t-fast);
}
.cmd-box {
    width: 100%; 
    max-width: 600px;
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    animation: fadeInScale var(--t-base) var(--ease-spring);
}
.cmd-input-wrap {
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
    padding: var(--sp-4);
    border-bottom: 1px solid var(--line);
}
.cmd-input-wrap svg { 
    color: var(--ink-3); 
    flex-shrink: 0; 
}
.cmd-input {
    flex: 1; border: 0; background: transparent;
    font-size: var(--text-lg); outline: none;
    color: var(--ink-0);
}
.cmd-results { 
    max-height: 360px; 
    overflow-y: auto; 
    padding: var(--sp-2); 
}
.cmd-section-title {
    padding: var(--sp-2) var(--sp-3);
    font-size: 10px; 
    font-weight: 700; 
    color: var(--ink-4);
    text-transform: uppercase; 
    letter-spacing: 0.05em;
}
.cmd-item {
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: var(--t-fast);
}
.cmd-item:hover, .cmd-item.active { 
    background: var(--brand-soft); 
}
.cmd-item-icon {
    width: 28px; height: 28px;
    background: var(--surface-3);
    border-radius: var(--r-sm);
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--ink-2);
    flex-shrink: 0;
}
.cmd-item-text { 
    flex: 1; 
}
.cmd-item-title { 
    font-size: var(--text-sm); 
    font-weight: 500; 
    color: var(--ink-1); 
}
.cmd-item-desc { 
    font-size: 11px; 
    color: var(--ink-3); 
}
.cmd-foot {
    padding: var(--sp-2) var(--sp-4);
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    display: flex; 
    gap: var(--sp-3);
    font-size: 11px; color: var(--ink-3);
}
.tabs {
    display: flex; 
    gap: 2px;
    background: var(--surface-3);
    padding: 3px;
    border-radius: var(--r-md);
    width: fit-content;
}
.tab {
    padding: 7px 16px;
    font-size: var(--text-sm); 
    font-weight: 500;
    color: var(--ink-2);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--t-fast);
    white-space: nowrap;
}
.tab:hover { 
    color: var(--ink-1); 
}
.tab.active {
    background: var(--surface);
    color: var(--ink-0);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tabs-line {
    display: flex; 
    gap: var(--sp-5);
    border-bottom: 1px solid var(--line);
    padding: 0 var(--sp-1);
    margin-bottom: var(--sp-5);
}
.tabs-line .tab {
    padding: 11px 0;
    border-radius: 0;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    box-shadow: none;
}
.tabs-line .tab.active {
    background: transparent;
    color: var(--brand);
    border-bottom-color: var(--brand);
    box-shadow: none;
}
.avatar {
    background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-600) 100%);
    border-radius: var(--r-md);
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    color: #fff; 
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}
.avatar.size-xs { 
    width: 22px; 
    height: 22px; 
    font-size: 10px; 
    border-radius: var(--r-sm); 
}
.avatar.size-sm { 
    width: 28px; 
    height: 28px; 
    font-size: 12px; 
}
.avatar.size-md { 
    width: 36px; 
    height: 36px; 
    font-size: 14px; 
}
.avatar.size-lg { 
    width: 48px; 
    height: 48px; 
    font-size: 18px; 
    border-radius: var(--r-lg); 
}
.avatar.size-xl { 
    width: 64px; 
    height: 64px; 
    font-size: 24px; 
    border-radius: var(--r-xl); 
}
.avatar-stack { 
    display: inline-flex; 
}
.avatar-stack .avatar { 
    border: 2px solid var(--surface); 
}
.avatar-stack .avatar:not(:first-child) { 
    margin-right: -8px; 
}
.avatar-c-1 { 
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); 
}
.avatar-c-2 { 
    background: linear-gradient(135deg, #fbbf24, #d97706); 
}
.avatar-c-3 { 
    background: linear-gradient(135deg, #818cf8, #4f46e5); 
}
.avatar-c-4 { 
    background: linear-gradient(135deg, #f472b6, #db2777); 
}
.avatar-c-5 { 
    background: linear-gradient(135deg, #34d399, #059669); 
}
.avatar-c-6 { 
    background: linear-gradient(135deg, #60a5fa, #2563eb); 
}
.entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-4);
}
.entity-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-5);
    transition: all var(--t-base) var(--ease-out);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.entity-card:hover {
    border-color: var(--brand-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.entity-card-head {
    display: flex; gap: var(--sp-3); align-items: center;
    margin-bottom: var(--sp-3);
}
.entity-card-info { 
    flex: 1; 
    min-width: 0; 
}
.entity-card-name {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--ink-0);
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.entity-card-handle {
    font-size: var(--text-xs);
    color: var(--ink-3);
}
.entity-card-tags {
    display: flex; 
    flex-wrap: wrap; 
    gap: 4px;
    margin-bottom: var(--sp-3);
}
.entity-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
    padding: var(--sp-3);
    background: var(--surface-2);
    border-radius: var(--r-md);
    margin-bottom: var(--sp-3);
}
.entity-stat-val {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--ink-0);
    line-height: 1.1;
}
.entity-stat-lbl {
    font-size: 10px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.entity-card-foot {
    display: flex; gap: var(--sp-2);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--line);
}
.kanban {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--sp-4);
    align-items: flex-start;
}
.kanban-col {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    display: flex; 
    flex-direction: column;
    min-height: 200px;
}
.kanban-col-head {
    padding: var(--sp-3) var(--sp-4);
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--line);
    }
    .kanban-col-title {
    display: flex; 
    align-items: center; 
    gap: var(--sp-2);
    font-size: var(--text-sm); 
    font-weight: 600;
    color: var(--ink-1);
}
.kanban-col-dot {
    width: 8px; 
    height: 8px; 
    border-radius: 50%;
    background: var(--gray-400);
}
.kanban-col-dot.new { 
    background: var(--info); 
}
.kanban-col-dot.review { 
    background: var(--warning); 
}
.kanban-col-dot.progress { 
    background: var(--purple); 
}
.kanban-col-dot.done { 
    background: var(--success); 
}
.kanban-col-dot.cancelled { 
    background: var(--danger); 
}
.kanban-col-count { 
    font-size: var(--text-xs); 
    color: var(--ink-3); font-weight: 600; 
    padding: 2px 8px; 
    background: var(--surface); 
    border-radius: var(--r-full); 
}
.kanban-col-body {
    padding: var(--sp-2);
    flex: 1;
    display: flex; 
    flex-direction: column; 
    gap: var(--sp-2);
}
.kanban-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-3);
    cursor: pointer;
    transition: all var(--t-fast);
}
.kanban-card:hover { 
    border-color: var(--brand-300); 
    box-shadow: var(--shadow-sm); 
}
.kanban-card-head { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 6px; 
    gap: var(--sp-2); 
}
.kanban-card-title { 
    font-size: var(--text-sm); 
    font-weight: 600; 
    color: var(--ink-0); 
    line-height: 1.4; 
}
.kanban-card-meta { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: var(--sp-2); 
    margin-top: var(--sp-2); 
    padding-top: var(--sp-2); 
    border-top: 1px dashed var(--line); 
}
.kanban-empty { 
    text-align: center; 
    color: var(--ink-4); 
    font-size: var(--text-xs); 
    padding: var(--sp-5) 0; 
}
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: var(--sp-5);
    margin-bottom: var(--sp-5);
}
.chart-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-5);
}
.chart-title {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--ink-0);
    margin-bottom: var(--sp-4);
}
.chart-box { 
    height: 280px; 
    position: relative; 
}
.chart-box.tall { 
    height: 340px; 
}
.timeline { 
    position: relative; 
    padding-right: var(--sp-5); 
}
.timeline::before {
    content: ''; 
    position: absolute;
    right: 12px; 
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--line);
}
.timeline-item {
    position: relative;
    padding-bottom: var(--sp-4);
    display: flex; 
    gap: var(--sp-3);
}
.timeline-dot {
    width: 26px; 
    height: 26px;
    background: var(--surface);
    border: 2px solid var(--line-2);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--ink-3);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-right: -1px;
}
.timeline-dot.brand { 
    border-color: var(--brand); 
    color: var(--brand); 
    background: var(--brand-soft); 
}
.timeline-dot.success { 
    border-color: var(--success); 
    color: var(--success); 
    background: var(--success-soft); 
}
.timeline-dot.warning {
    border-color: var(--warning); 
    color: var(--warning); 
    background: var(--warning-soft); 
}
.timeline-dot.danger { 
    border-color: var(--danger); 
    color: var(--danger); 
    background: var(--danger-soft); 
}
.timeline-content { 
    flex: 1; 
    padding-top: 2px; 
}
.timeline-title { 
    font-size: var(--text-sm); 
    font-weight: 600; 
    color: var(--ink-1); 
}
.timeline-desc { 
    font-size: var(--text-xs); 
    color: var(--ink-3); 
    margin-top: 2px; 
}
.timeline-time { 
    font-size: 11px; 
    color: var(--ink-4); 
    margin-top: 4px; 
    font-family: var(--font-mono); 
}
.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--sp-5);
}
@media (max-width: 980px) { 
    .detail-layout { 
        grid-template-columns: 1fr; 
    } 
}
.detail-side .card { 
    margin-bottom: var(--sp-4); 
}
.profile-header {
    display: flex; 
    gap: var(--sp-4); 
    align-items: flex-start;
    padding: var(--sp-5);
}
.profile-info-stack { 
    flex: 1; 
    min-width: 0; 
}
.profile-name {
    font-family: var(--font-display);
    font-size: var(--text-xl); 
    font-weight: 700; 
    color: var(--ink-0);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}
.profile-meta {
    font-size: var(--text-sm); 
    color: var(--ink-3);
    display: flex; 
    align-items: center;
    gap: var(--sp-3); 
    flex-wrap: wrap;
}
.profile-meta-item { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
}
.info-list {
    font-size: var(--text-sm);
}
.info-row {
    padding: var(--sp-3) var(--sp-4);
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    gap: var(--sp-3);
    border-bottom: 1px solid var(--line-3);
}
.info-row:last-child { 
    border-bottom: 0; 
}
.info-label { 
    color: var(--ink-3); 
    font-size: var(--text-xs); 
    font-weight: 500; 
}
.info-value { 
    color: var(--ink-1); 
    font-weight: 500; 
    text-align: left; 
}
.info-value-mono { 
    font-family: var(--font-mono); 
    font-size: var(--text-xs); 
}
.platform-card {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: var(--sp-3);
    overflow: hidden;
    transition: var(--t-fast);
    }
    .platform-card.disabled { 
        opacity: 0.6; 
    }
    .platform-head {
        padding: var(--sp-3) var(--sp-4);
        display: flex; align-items: center; gap: var(--sp-3);
        background: var(--surface-2);
        border-bottom: 1px solid var(--line);
    }
    .platform-icon {
        width: 32px; height: 32px;
        border-radius: var(--r-md);
        display: flex; 
        align-items: center; 
        justify-content: center;
        color: #fff;
        font-size: 16px;
        flex-shrink: 0;
    }
    .platform-icon.snapchat  { 
        background: linear-gradient(135deg, #fffc00 0%, #facc15 100%); 
        color: #000; 
    }
    .platform-icon.tiktok    { 
        background: linear-gradient(135deg, #000 0%, #25f4ee 100%); 
    }
    .platform-icon.instagram { 
        background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
    }
    .platform-icon.youtube   { 
        background: #ff0000; 
    }
    .platform-icon.twitter   { 
        background: #000; 
    }
    .platform-icon.facebook  { 
        background: #1877f2; 
    }
    .platform-name { 
        font-weight: 600; 
        font-size: var(--text-md); 
        color: var(--ink-0); 
        flex: 1; 
    }
    .platform-status {
        display: inline-flex; 
        align-items: center; 
        gap: 5px;
        font-size: var(--text-xs); 
        color: var(--ink-3);
    }
    .platform-status::before {
        content: ''; 
        width: 6px; 
        height: 6px; 
        border-radius: 50%;
        background: var(--gray-400);
    }
    .platform-status.connected { 
        color: var(--success); 
    }
    .platform-status.connected::before { 
        background: var(--success); 
    }
    .platform-body { 
        padding: var(--sp-4); 
    }
    .upload-zone {
        border: 1.5px dashed var(--line-2);
        border-radius: var(--r-md);
        padding: var(--sp-4);
        text-align: center;
        cursor: pointer;
        transition: var(--t-fast);
        background: var(--surface-2);
    }
    .upload-zone:hover {
        border-color: var(--brand);
        background: var(--brand-soft);
    }
    .upload-zone-icon {
        width: 36px; height: 36px;
        margin: 0 auto var(--sp-2);
        background: var(--surface);
        border-radius: var(--r-md);
        display: flex; 
        align-items: center; 
        justify-content: center;
        color: var(--brand);
        border: 1px solid var(--line);
    }
    .upload-zone-text {
        font-size: var(--text-sm); 
        font-weight: 500;
        color: var(--ink-1);
        margin-bottom: 2px;
    }
    .upload-zone-hint { 
        font-size: var(--text-xs); 
        color: var(--ink-3); }
    .upload-zone.has-file {
        border-color: var(--success);
        background: var(--success-soft);
    }
    .upload-zone.has-file .upload-zone-icon { 
        color: var(--success); 
    }
    .progress {
        height: 6px;
        background: var(--surface-3);
        border-radius: var(--r-full);
        overflow: hidden;
    }
    .progress-bar {
        height: 100%;
        background: var(--brand);
        border-radius: var(--r-full);
        transition: width var(--t-slow) var(--ease-out);
    }
    .progress-bar.success { 
        background: var(--success); 
    }
    .progress-bar.warning { 
        background: var(--warning); 
    }
    .progress-bar.danger  { 
        background: var(--danger); 
    }
    .skeleton {
        background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%);
        background-size: 1000px 100%;
        animation: shimmer 1.6s infinite linear;
        border-radius: var(--r-sm);
    }
    .spinner {
        display: inline-block;
        width: 16px; 
        height: 16px;
        border: 2px solid currentColor; 
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }
    .drawer-overlay {
        position: fixed; 
        inset: 0;
        background: var(--backdrop);
        z-index: var(--z-modal);
        animation: fadeIn var(--t-fast);
    }
    .drawer {
        position: fixed; 
        top: 0; 
        left: 0; 
        bottom: 0;
        width: 100%; 
        max-width: 540px;
        background: var(--surface);
        z-index: var(--z-modal);
        box-shadow: var(--shadow-2xl);
        animation: slideInLeft var(--t-base) var(--ease-out);
        display: flex; 
        flex-direction: column;
    }
    .divider { 
        height: 1px; 
        background: var(--line); 
        margin: var(--sp-4) 0; 
        border: 0; 
    }
    .dot-divider { 
        display: inline-block; 
        width: 3px; 
        height: 3px; 
        background: currentColor; 
        border-radius: 50%; 
        margin: 0 var(--sp-2); 
        opacity: 0.5; 
        vertical-align: middle; 
    }
    * { 
        font-variant-numeric: lining-nums tabular-nums; 
    }
    .tbl, .info-list, .stat-value, .entity-stat-val, .timeline-time, .info-value-mono,
    .td-num, .td-name, .kanban-card, .pill, .tag, .chip, .breadcrumbs,
    input, textarea, select { 
        font-feature-settings: "lnum"; 
    }
    input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"] {
        direction: ltr !important;
        text-align: right;
        font-family: var(--font-mono);
        font-size: var(--text-sm);
        padding-right: var(--sp-3);
        padding-left: 32px;
    }
    input[type="date"]::-webkit-datetime-edit { 
        direction: ltr; 
        padding: 0 4px; 
    }
    input[type="date"]::-webkit-datetime-edit-fields-wrapper { 
        padding: 0; 
    }
    input[type="date"]::-webkit-datetime-edit-text { 
        color: var(--ink-3); 
        padding: 0 2px; 
        font-family: var(--font-mono); 
    }
    input[type="date"]::-webkit-datetime-edit-day-field,
    input[type="date"]::-webkit-datetime-edit-month-field,
    input[type="date"]::-webkit-datetime-edit-year-field { 
        color: var(--ink-1); 
        font-family: var(--font-mono); 
        padding: 0 2px; 
    }
    input[type="date"]:invalid::-webkit-datetime-edit { 
        color: var(--ink-4); 
    }
    input[type="date"]::-webkit-calendar-picker-indicator {
        position: absolute; 
        left: 8px; 
        top: 50%; 
        transform: translateY(-50%);
        cursor: pointer;
        opacity: 0.5;
        filter: invert(0.5);
        transition: opacity var(--t-fast);
        width: 16px; 
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    }
    input[type="date"]::-webkit-calendar-picker-indicator:hover { 
        opacity: 1; 
    }
    .field input[type="date"] { 
        position: relative; 
    }
    input[type="number"], input[type="tel"], input[type="email"], input[type="url"] {
        direction: ltr; 
        text-align: right;
    }
    input[type="email"], input[type="url"] { 
        font-family: var(--font-mono); 
        font-size: var(--text-sm); 
    }
    .pricing-block {
        background: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        padding: var(--sp-4);
        margin-bottom: var(--sp-4);
        transition: var(--t-base);
    }
    .pricing-block:last-child { 
        margin-bottom: 0; 
    }
    .pricing-block-head {
        margin-bottom: var(--sp-3);
    }
    .pricing-block-title {
        display: flex; 
        align-items: center; 
        gap: var(--sp-2);
        font-size: var(--text-md);
        font-weight: 700;
        color: var(--ink-0);
    }
    .pricing-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-3);
        margin-bottom: var(--sp-3);
    }
    .pricing-input {
        font-family: var(--font-mono) !important;
        font-size: var(--text-xl) !important;
        font-weight: 700 !important;
        text-align: center !important;
        letter-spacing: 0.02em;
        background: var(--surface) !important;
        height: 44px !important;
    }
    .pricing-result {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        padding: var(--sp-3) var(--sp-4);
        min-height: 56px;
        display: flex; 
        align-items: center; 
        gap: var(--sp-3);
        transition: all var(--t-base);
    }
    .pricing-result.level-success { 
        background: rgba(16, 185, 129, 0.06); 
        border-color: rgba(16, 185, 129, 0.25); 
    }
    .pricing-result.level-warning { 
        background: rgba(245, 158, 11, 0.06); 
        border-color: rgba(245, 158, 11, 0.25); 
    }
    .pricing-result.level-danger { 
        background: rgba(239, 68, 68, 0.06); 
        border-color: rgba(239, 68, 68, 0.25); 
    }
    .pricing-empty {
        font-size: var(--text-sm); 
        color: var(--ink-3);
        width: 100%; 
        text-align: center; 
        font-weight: 500;
    }
    .pricing-chip { 
        display: flex; 
        flex-direction: column; 
        gap: 2px; 
        flex-shrink: 0; 
    }
    .pricing-chip-lbl {
        font-size: 10px; 
        color: var(--ink-3); 
        font-weight: 600;
        text-transform: uppercase; 
        letter-spacing: 0.04em;
    }
    .pricing-chip-val {
        font-family: var(--font-display);
        font-size: var(--text-lg); 
        font-weight: 800;
        letter-spacing: -0.01em; 
        white-space: nowrap;
    }
    .pricing-divider { 
        width: 1px; 
        height: 32px; 
        background: var(--line); 
        flex-shrink: 0; 
    }
    .pricing-bar-wrap { 
        flex: 1; 
        min-width: 100px; 
    }
    .pricing-bar-label {
        display: flex; 
        justify-content: space-between;
        font-size: var(--text-xs); 
        font-weight: 600;
        margin-bottom: 6px;
    }
    .pricing-bar-bg {
        height: 6px; 
        background: var(--surface-3);
        border-radius: var(--r-full); 
        overflow: hidden;
    }
    .pricing-bar-fg {
        height: 100%; 
        border-radius: var(--r-full);
        transition: width var(--t-slow) var(--ease-out);
    }
    .pricing-detail-card { 
        border-width: 2px; 
        transition: var(--t-base); 
    }
    .pricing-detail-card.level-success { 
        border-color: rgba(16, 185, 129, 0.3); 
    }
    .pricing-detail-card.level-warning { 
        border-color: rgba(245, 158, 11, 0.3); 
    }
    .pricing-detail-card.level-danger { 
        border-color: rgba(239, 68, 68, 0.3); 
    }
    .pricing-detail-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-3);
        margin-bottom: var(--sp-4);
    }
.pricing-detail-cell {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    text-align: center;
}
.pricing-detail-lbl { 
    font-size: 11px; 
    color: var(--ink-3); 
    font-weight: 600; 
    margin-bottom: 8px; 
}
.pricing-detail-val {
    font-family: var(--font-display);
    font-size: 28px; 
    font-weight: 800;
    letter-spacing: -0.02em; 
    line-height: 1; 
    margin-bottom: 6px;
}
.pricing-detail-val.cost { 
    color: var(--gray-700); 
}
.pricing-detail-val.sell { 
    color: var(--brand); 
}
.pricing-detail-sub { 
    font-size: 10px; 
    color: var(--ink-4); 
    font-weight: 500; 
}
.pricing-summary {
    border: 1px solid;
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
}
.pricing-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
}
.pricing-summary-cell { 
    text-align: center; 
}
.pricing-summary-lbl {
    font-size: 11px; 
    color: var(--ink-3); 
    font-weight: 600;
    text-transform: uppercase; 
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.pricing-summary-val {
    font-family: var(--font-display);
    font-size: var(--text-xl); 
    font-weight: 800;
    letter-spacing: -0.01em;
}
.platform-card.has-pricing .platform-body {
    padding: 0;
}
.platform-section {
    padding: var(--sp-4);
    border-bottom: 1px solid var(--line);
}
.platform-section:last-child { 
    border-bottom: 0; 
}
.platform-section-title {
    font-size: 11px; font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: var(--sp-3);
    display: flex; align-items: center; gap: var(--sp-2);
}
.platform-pricing-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
}
.autocomplete-wrap { 
    position: relative; 
}
.autocomplete-dropdown {
    position: absolute; 
    top: calc(100% + 4px); 
    right: 0; 
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xl);
    max-height: 280px; 
    overflow-y: auto;
    z-index: var(--z-dropdown);
    display: none;
}
.autocomplete-dropdown.show { 
    display: block; 
    animation: fadeInUp var(--t-fast) var(--ease-out); 
}
.autocomplete-item {
    padding: 10px var(--sp-3);
    cursor: pointer;
    display: flex; 
    align-items: center; 
    gap: var(--sp-3);
    border-bottom: 1px solid var(--line-3);
    transition: var(--t-fast);
}
.autocomplete-item:last-child { 
    border-bottom: 0; 
}
.autocomplete-item:hover, .autocomplete-item.active { 
    background: var(--brand-soft); 
}
.autocomplete-item-name {
    flex: 1;
    font-weight: 500; 
    color: var(--ink-1);
    font-size: var(--text-sm);
}
.autocomplete-item-meta {
    font-size: var(--text-xs); 
    color: var(--ink-3);
}
.autocomplete-item-platform {
    display: inline-flex; 
    align-items: center;
    width: 22px; 
    height: 22px;
    border-radius: var(--r-sm);
    font-size: 11px;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.autocomplete-empty {
    padding: var(--sp-4);
    text-align: center; 
    color: var(--ink-3);
    font-size: var(--text-sm);
}
.import-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--sp-3);
}
.import-stat {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-3);
    text-align: center;
}
.import-stat-num {
    font-family: var(--font-display);
    font-size: var(--text-2xl); 
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
    margin-bottom: 4px;
}
.import-stat-lbl {
    font-size: 11px; 
    color: var(--ink-3);
    font-weight: 600;
}
@media (max-width: 768px) {
    .pricing-row { 
        grid-template-columns: 1fr; 
    }
    .platform-pricing-pair { 
        grid-template-columns: 1fr; 
    }
    .pricing-result { 
        flex-wrap: wrap; 
        gap: var(--sp-2); 
        padding: var(--sp-3); 
    }
    .pricing-divider { 
        display: none; 
    }
    .pricing-chip { 
        width: calc(50% - 4px); 
    }
    .pricing-bar-wrap { 
        width: 100%; 
        min-width: 0; 
        margin-top: var(--sp-2); 
    }
    .pricing-input { 
        font-size: var(--text-lg) !important; 
        height: 40px !important; 
    }
    .pricing-detail-val { 
        font-size: 22px; 
    }
    .pricing-summary-val { 
        font-size: var(--text-lg); 
    }
}
.form-compact .card { 
    margin-bottom: var(--sp-3); 
    border-radius: var(--r-lg); 
}
.form-compact .card-head { 
    padding: 10px var(--sp-4); 
}
.form-compact .card-head .card-title { 
    font-size: var(--text-sm); 
}
.form-compact .card-head .card-title-icon { 
    width: 24px; 
    height: 24px; 
}
.form-compact .card-subtitle { 
    font-size: 11px; 
    margin-top: 2px; 
}
.form-compact .card-body { 
    padding: var(--sp-3) var(--sp-4); 
}
.form-compact .form-grid { 
    gap: 10px; 
}
.form-compact .field { 
    gap: 4px; 
}
.form-compact .field-label { 
    font-size: 11px; 
    font-weight: 600; 
}
.form-compact .input,
.form-compact .select,
.form-compact .textarea { 
    height: 34px; 
    padding: 0 10px; 
    font-size: var(--text-sm);
}
.form-compact .textarea { 
    height: auto;
    min-height: 60px; 
    padding: 8px 10px; 
}
.form-compact .pricing-input { 
    height: 38px !important; 
    font-size: var(--text-md) !important; 
}
.form-compact .platform-card { 
    margin-bottom: var(--sp-2); 
    border-radius: var(--r-md); 
}
.form-compact .platform-head { 
    padding: 8px var(--sp-3); 
}
.form-compact .platform-icon { 
    width: 28px; 
    height: 28px; 
    font-size: 14px; 
}
.form-compact .platform-name { 
    font-size: var(--text-sm); 
}
.form-compact .platform-section { 
    padding: var(--sp-3); 
}
.form-compact .platform-section-title { 
    font-size: 10px; 
    margin-bottom: var(--sp-2); 
}
.form-compact .pricing-result { 
    padding: 8px var(--sp-3); 
    min-height: 44px; 
}
.form-compact .pricing-empty { 
    font-size: var(--text-xs); 
}
.form-compact .upload-zone { 
    padding: var(--sp-3); 
}
.form-compact .upload-zone-icon { 
    width: 28px; 
    height: 28px; 
    margin-bottom: 4px; 
}
.form-compact .upload-zone-text { 
    font-size: var(--text-xs); 
}
.form-compact .upload-zone-hint { 
    font-size: 10px; 
}
.form-compact .toggle-track { 
    width: 32px; 
    height: 18px; 
}
.form-compact .toggle-track::after { 
    width: 14px; 
    height: 14px; }
.form-compact .toggle input:checked + .toggle-track::after { 
    right: calc(100% - 16px); 
}
.filter-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-5);
    margin-bottom: var(--sp-5);
}
.filter-section-title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--ink-0);
    margin-bottom: var(--sp-4);
    display: flex; 
    align-items: center; gap: var(--sp-2);
}
.filter-section-title svg { 
    color: var(--brand); 
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-3);
}
.filter-grid .field-label { 
    font-size: var(--text-xs); 
    font-weight: 600; 
    color: var(--ink-2); 
    margin-bottom: 4px; }
.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--line);
}
.filter-divider {
    height: 1px;
    background: var(--line);
    margin: var(--sp-5) 0;
}
.action-btn-bar {
    display: flex;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
    flex-wrap: wrap;
}
.action-btn-green {
    display: inline-flex; 
    align-items: center; 
    gap: var(--sp-2);
    padding: 9px 18px;
    background: transparent;
    color: var(--brand);
    border: 1.5px solid var(--brand);
    border-radius: var(--r-md);
    font-size: var(--text-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
}
.action-btn-green:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-brand-sm);
}
.action-btn-green svg { 
    width: 16px; 
    height: 16px; 
}
.app-signature {
    text-align: center;
    padding: var(--sp-3) var(--sp-4);
    font-size: 11px;
    color: var(--ink-4);
    border-top: 1px solid var(--line-3);
    margin-top: var(--sp-7);
}
.app-signature b {
    color: var(--brand);
    font-weight: 600;
    font-family: var(--font-display);
}
.app-signature a { 
    color: var(--brand); 
    transition: var(--t-fast); 
}
.app-signature a:hover { 
    color: var(--brand-hover); 
    text-decoration: underline; 
}
.sidebar-credit {
    text-align: center;
    font-size: 10px;
    color: var(--ink-4);
    padding: var(--sp-2) var(--sp-3);
    border-top: 1px dashed var(--line);
    font-family: var(--font-display);
}
.sidebar-credit b { 
    color: var(--brand); 
    font-weight: 600; 
}
.sidebar.collapsed .sidebar-credit { 
    display: none; 
}
@media (max-width: 1100px) {
    .topbar-search { 
        display: none; 
    }
    :root { 
        --sidebar-w: 220px; 
    }
}
@media (max-width: 980px) {
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .chart-grid { 
        grid-template-columns: 1fr; 
    }
    .form-grid.cols-3, .form-grid.cols-4 { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .detail-layout { 
        grid-template-columns: 1fr; 
    }
}
@media (max-width: 768px) {
    .shell { 
        grid-template-columns: 1fr; 
        grid-template-areas: "topbar" "main"; 
    }
    .sidebar {
        position: fixed; right: 0; top: 0; bottom: 0;
        width: 280px;
        transform: translateX(100%);
        transition: transform var(--t-base) var(--ease-out);
        box-shadow: var(--shadow-2xl);
        z-index: var(--z-modal);
    }
    .sidebar.mobile-open { 
        transform: translateX(0); 
    }
    .topbar { 
        padding: 0 var(--sp-3); 
        gap: var(--sp-2); 
        height: 56px; 
    }
    .topbar-toggle { 
        width: 38px; 
        height: 38px; 
    }
    .breadcrumbs { 
        font-size: var(--text-sm); 
        overflow: hidden; 
        min-width: 0; 
    }
    .breadcrumb-item { 
        white-space: nowrap; 
    }
    .breadcrumb-item:not(.current) { 
        display: none; 
    }
    .breadcrumb-sep:not(:last-of-type) { 
        display: none; 
    }
    .topbar-actions .btn-primary { 
        padding: 0 12px; 
    }
    .topbar-actions .btn-primary span,
    .topbar-actions .btn-primary { 
        font-size: var(--text-xs); 
    }
    .main { 
        padding: var(--sp-4) var(--sp-3); 
    }
    .page-head { 
        flex-direction: column; 
        align-items: stretch; 
        gap: var(--sp-3); 
        padding-bottom: var(--sp-4); 
        margin-bottom: var(--sp-4); 
    }
    .page-actions { 
        width: 100%; 
        flex-wrap: wrap; 
    }
    .page-actions .btn { 
        flex: 1; 
        min-width: 0; 
    }
    .page-title { 
        font-size: var(--text-2xl); 
    }
    .page-subtitle { 
        font-size: var(--text-sm); 
    }
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: var(--sp-3); 
    }
    .stat-card { 
        padding: var(--sp-3); 
    }
    .stat-value { 
        font-size: 22px; 
    }
    .stat-icon {
        width: 32px; 
        height: 32px; 
    }
    .stat-trend { 
        font-size: 10px; 
        padding: 2px 6px; 
    }
    .stat-label { 
        font-size: var(--text-xs); 
    }
    .stat-foot { 
        font-size: 10px; 
    }
    .form-grid, .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 {
        grid-template-columns: 1fr !important;
        gap: var(--sp-3);
    }
    .field-span-2, .field-full { 
        grid-column: 1 !important; 
    }
    .card { 
        margin-bottom: var(--sp-3); 
        border-radius: var(--r-lg); 
    }
    .card-head { 
        padding: var(--sp-3) var(--sp-4); 
        flex-wrap: wrap; 
        gap: var(--sp-2); 
    }
    .card-body { 
        padding: var(--sp-3) var(--sp-4); 
    }
    .card-title { 
        font-size: var(--text-sm); 
    }
    .tabs-line { 
        overflow-x: auto; 
        flex-wrap: nowrap; 
        -webkit-overflow-scrolling: touch; 
    }
    .tabs-line .tab { 
        white-space: nowrap; 
    }
    .tabs { 
        overflow-x: auto; 
        max-width: 100%; 
        flex-wrap: nowrap; 
        -webkit-overflow-scrolling: touch; 
    }
    .flex.gap-2.flex-wrap.mb-4, .flex.gap-2.flex-wrap.mb-5 {
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--sp-2);
    }
    .flex.gap-2.flex-wrap.mb-4 .chip, .flex.gap-2.flex-wrap.mb-5 .chip { 
        flex-shrink: 0; 
    }
    .kanban {
        grid-template-columns: repeat(5, 280px);
        grid-auto-flow: column;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--sp-3);
    }
    .kanban-col { 
        min-width: 280px; 
    }
    .entity-grid { 
        grid-template-columns: 1fr; 
        gap: var(--sp-3); 
    }
    .tbl thead th { 
        padding: 8px 10px; 
        font-size: 10px; 
    }
    .tbl tbody td { 
        padding: 10px; 
        font-size: var(--text-sm); 
    }
    .table-scroll { 
        -webkit-overflow-scrolling: touch; 
    }
    .modal-overlay { 
        padding: 0; 
        align-items: flex-end; 
    }
    .modal {
        border-radius: var(--r-2xl) var(--r-2xl) 0 0;
        max-height: 92vh;
        width: 100%; max-width: 100% !important;
        animation: slideInUp var(--t-base) var(--ease-out);
    }
    .modal-head { 
        padding: var(--sp-4); 
        position: sticky; 
        top: 0; 
        background: var(--surface); 
        z-index: 2; 
    }
    .modal-head::before {
        content: ''; 
        position: absolute; 
        top: 8px; 
        left: 50%; 
        transform: translateX(-50%);
        width: 36px; 
        height: 4px; 
        background: var(--gray-300); 
        border-radius: 2px;
    }
    .modal-body { 
        padding: var(--sp-4); 
        -webkit-overflow-scrolling: touch; 
    }
    .modal-foot { 
        padding: var(--sp-3) var(--sp-4); 
        position: sticky; 
        bottom: 0; 
    }
    .notif-panel { 
        left: var(--sp-2); 
        right: var(--sp-2); 
        width: auto; 
    }
    .cmd-palette { 
        padding-top: 60px; 
        padding-inline: var(--sp-3); 
    }
    .login-aside { 
        display: none; 
    }
    .login-card-wrap { 
        padding: var(--sp-5) var(--sp-4); 
    }
    .new-login-card { 
        max-width: 100%; 
    }
    .new-login-card h3 { 
        font-size: var(--text-2xl); 
    }
    .new-login-card .subtitle { 
        font-size: var(--text-sm); 
        margin-bottom: var(--sp-5); 
    }
    .toast-wrap { 
        left: var(--sp-3);
        right: var(--sp-3); 
        bottom: var(--sp-3); 
    }
    .toast { min-width: 0; max-width: 100%; }
    .profile-header { 
        flex-direction: column; 
        align-items: stretch; 
        padding: var(--sp-3); 
    }
    .card-body > div[style*="grid-template-columns:repeat(7,1fr)"] {
        font-size: 10px;
    }
    .dashboard-row { 
        grid-template-columns: 1fr !important; 
    }
    .table-toolbar { 
        padding: var(--sp-2) var(--sp-3); 
        gap: var(--sp-2); 
    }
    .table-search { 
        min-width: 0; 
        flex: 1; 
    }
    .tbl th:nth-child(n+5):not(:last-child),
    .tbl td:nth-child(n+5):not(:last-child) { 
        display: none; 
    }
    .progress { 
        height: 4px; 
    }
    .btn { 
        height: 36px; 
        padding: 0 var(--sp-3); 
        font-size: var(--text-sm); 
    }
    .btn-sm { 
        height: 32px; 
        padding: 0 12px;
    }
    .sidebar-foot .sidebar-user { 
        padding: var(--sp-3); 
    }
}
@media (max-width: 420px) {
    .stats-grid { 
        grid-template-columns: 1fr; 
    }
    .topbar-actions { 
        gap: 4px; 
    }
    .topbar-btn { 
        width: 34px; 
        height: 34px; 
    }
    .breadcrumbs { 
        font-size: var(--text-xs); 
    }
    .page-title { 
        font-size: var(--text-xl);
    }
    .login-hint { 
        flex-wrap: wrap; 
        font-size: var(--text-xs); 
    }
}
.mobile-overlay {
    display: none;
    position: fixed; 
    inset: 0;
    background: var(--backdrop);
    z-index: calc(var(--z-modal) - 1);
}
@media (max-width: 768px) {
    .sidebar.mobile-open ~ .mobile-overlay { 
        display: block; 
    }
}
@media (hover: none) and (pointer: coarse) {
    .nav-item { 
        padding: 12px var(--sp-3); 
    }
    .icon-btn { 
        width: 36px; 
        height: 36px; 
    }
    .chip { 
        padding: 8px 14px; 
    }
    .tab { 
        padding: 10px 16px; 
    }
}
@media print {
    .sidebar, .topbar, .page-actions, .modal-overlay, .toast-wrap, .mobile-overlay,
    .app-signature, .sidebar-credit { 
        display: none !important; 
    }
    .shell { 
        grid-template-columns: 1fr; 
        grid-template-areas: "main"; 
    }
    .main { 
        padding: 0; 
    }
    .card { 
        box-shadow: none; 
        border: 1px solid #ddd; 
        break-inside: avoid; 
    }
    body { 
        background: #fff; 
    }
}
