/* کتاب‌یار — تم تاریک/روشن هم‌راستا با پرتال و سایت اصلی
   روی html[data-theme="dark"] فعال می‌شود؛ پیش‌فرض همان تم روشن کتاب‌یار است. */

html[data-theme="dark"] {
    --navy-950: #071019;
    --navy-900: #0b1726;
    --navy: #16304a;
    --navy-700: #1b3c57;
    --navy-600: #245672;
    --cream: #0b1220;
    --cream-2: #111a2c;
    --white: #111a2c;
    --ink: #e6eef7;
    --muted: #9db0c1;
    --muted-2: #7e91a3;
    --line: #22324a;
    --line-2: #1a2739;
    --green-700: #4dc98a;
    --green-500: #35b978;
    --green-100: #123024;
    --green-50: #0f241a;
    --amber-100: #2a2110;
    --lilac: #1c1830;
    --sky: #101f30;
    --peach: #2a1a12;
    --rose-100: #2a1514;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
    --shadow: 0 16px 40px -18px rgba(0, 0, 0, .7);
    --shadow-lg: 0 34px 80px -34px rgba(0, 0, 0, .8);
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.admin-body {
    background: #0b1220;
    color: var(--ink);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5 {
    color: #eaf1f9;
}

html[data-theme="dark"] a {
    color: inherit;
}

html[data-theme="dark"] .admin-topbar {
    background: rgba(11, 18, 32, .94);
    border-bottom-color: var(--line);
}

html[data-theme="dark"] .admin-topbar__title,
html[data-theme="dark"] .admin-user b,
html[data-theme="dark"] .kpi__value,
html[data-theme="dark"] .card__title,
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span {
    color: #eaf1f9;
}

html[data-theme="dark"] .kpi,
html[data-theme="dark"] .card,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .center-public,
html[data-theme="dark"] .form-card {
    background: #111a2c;
    border-color: var(--line);
}

html[data-theme="dark"] .card__head,
html[data-theme="dark"] .card__foot {
    border-color: var(--line-2);
}

html[data-theme="dark"] .data-table th {
    background: #16213a;
    color: #b9c9da;
}

html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td {
    border-color: var(--line-2);
}

html[data-theme="dark"] .data-table tbody tr:hover {
    background: #16213a;
}

html[data-theme="dark"] .filters input,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span,
html[data-theme="dark"] body.admin-body input,
html[data-theme="dark"] body.admin-body select,
html[data-theme="dark"] body.admin-body textarea {
    background: #0e1726;
    color: #e3ecf6;
    border-color: var(--line);
}

html[data-theme="dark"] .donut-bar {
    background: #1c2a40;
}

html[data-theme="dark"] .empty-state {
    background: #0e1726;
    border-color: #2a3b52;
}

html[data-theme="dark"] .check {
    background: #0e1726;
    border-color: var(--line-2);
}

html[data-theme="dark"] .check.is-warn {
    background: #221b0d;
    border-color: #453718;
}

html[data-theme="dark"] .note-box {
    background: #221b0d;
    color: #e6c98c;
    border-color: #453718;
}

html[data-theme="dark"] .auth-card {
    background: #111a2c;
    color: #e6eef7;
}

html[data-theme="dark"] .auth-logo {
    color: #eaf1f9;
}

html[data-theme="dark"] .auth-links {
    color: #9db0c1;
}

html[data-theme="dark"] .admin-user .avatar {
    background: #123024;
    color: #4dc98a;
}

html[data-theme="dark"] .detail-list--admin dd,
html[data-theme="dark"] .timeline--admin b {
    color: #e3ecf6;
}

/* فرم‌های ورود و پنل — فیلدها نباید سفید بمانند */
html[data-theme="dark"] body.auth-body input,
html[data-theme="dark"] .auth-card input,
html[data-theme="dark"] .auth-card select,
html[data-theme="dark"] .auth-card textarea,
html[data-theme="dark"] .form-card input,
html[data-theme="dark"] .form-card select,
html[data-theme="dark"] .form-card textarea {
    background: #0e1726;
    color: #e3ecf6;
    border-color: var(--line);
}

html[data-theme="dark"] .auth-card .field > span,
html[data-theme="dark"] .auth-sub,
html[data-theme="dark"] .auth-note,
html[data-theme="dark"] .auth-title {
    color: #b9c9da;
}

html[data-theme="dark"] .auth-title { color: #eaf1f9; }
html[data-theme="dark"] .auth-brand .auth-logo { color: #eaf1f9; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #6f8497; }

/* دکمه‌های روشن در حالت تاریک */
html[data-theme="dark"] .btn--ghost {
    background: #16213a;
    color: #dbe7f3;
    border-color: #24344d;
}
