/* ============================================================
   سیستم مدیریت حقوق و دستمزد — استایل اصلی
   RTL فارسی — فونت Vazir
   ============================================================ */

/* Import Vazir Font - now loaded locally via fonts-local.css */

/* ---- متغیرهای رنگی ---- */
:root {
    --primary:        #2d6a2d;   /* سبز تیره شرکت */
    --primary-dark:   #1e4d1e;
    --primary-light:  #e8f5e8;
    --secondary:      #64748b;
    --success:        #16a34a;
    --success-light:  #dcfce7;
    --danger:         #dc2626;
    --danger-light:   #fee2e2;
    --warning:        #d97706;
    --warning-light:  #fef3c7;
    --info:           #0891b2;
    --info-light:     #cffafe;
    --white:          #ffffff;
    --gray-50:        #f8fafc;
    --gray-100:       #f1f5f9;
    --gray-200:       #e2e8f0;
    --gray-300:       #cbd5e1;
    --gray-400:       #94a3b8;
    --gray-500:       #64748b;
    --gray-600:       #475569;
    --gray-700:       #334155;
    --gray-800:       #1e293b;
    --gray-900:       #0f172a;

    --sidebar-width:  260px;
    --topbar-height:  64px;
    --border-radius:  12px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
    --shadow:         0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
    --transition:     .2s ease;
}

/* ---- ریست و پایه ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    direction: rtl;
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Vazir', Tahoma, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ---- Scrollbar سفارشی ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================================
   LAYOUT — Topbar + Sidebar + Content
   ============================================================ */

.topbar {
    position: fixed;
    top: 0; right: 0; left: 0;
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    min-width: var(--sidebar-width);
}

.topbar-brand .brand-icon {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.topbar-spacer { flex: 1; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.topbar-user .user-avatar {
    width: 38px; height: 38px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: .9rem;
}

.topbar-user .user-info { line-height: 1.3; }
.topbar-user .user-name { font-weight: 600; font-size: .9rem; color: var(--gray-800); }
.topbar-user .user-role { font-size: .75rem; color: var(--gray-500); }

/* sidebar-toggle: همیشه قابل استفاده است ولی روی desktop مخفی */
.sidebar-toggle {
    display: none;
    background: none; border: none;
    font-size: 1.3rem; color: var(--gray-600);
    cursor: pointer; padding: .5rem;
    border-radius: 8px;
    line-height: 1;
}
.sidebar-toggle:hover { background: var(--gray-100); }

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    overflow-y: auto;
    transition: transform var(--transition);
    z-index: 900;
    padding: 1.25rem 0;
}

.sidebar-section { margin-bottom: 1.5rem; }

.sidebar-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gray-400);
    padding: 0 1.25rem .5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: var(--gray-600);
    font-size: .9rem;
    border-radius: 0;
    transition: all var(--transition);
    position: relative;
}

.sidebar-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    right: 0; top: 4px; bottom: 4px;
    width: 3px;
    background: var(--primary);
    border-radius: 2px 0 0 2px;
}

.sidebar-nav a .nav-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: .95rem;
    flex-shrink: 0;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon {
    background: var(--primary);
    color: white;
}

.sidebar-divider {
    height: 1px;
    background: var(--gray-200);
    margin: .75rem 1.25rem;
}

/* ---- Main Content ---- */
.main-content {
    margin-top: var(--topbar-height);
    margin-right: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin var(--transition);
}

/* ============================================================
   کارت‌ها
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.card-title .card-icon {
    width: 34px; height: 34px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
}

.card-body { padding: 1.5rem; }

/* کارت آماری */
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning); }

.stat-info { flex: 1; }
.stat-label { font-size: .8rem; color: var(--gray-500); margin-bottom: .2rem; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--gray-800); line-height: 1.2; }
.stat-sub   { font-size: .75rem; color: var(--gray-400); margin-top: .15rem; }

/* ============================================================
   دکمه‌ها
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6rem 1.25rem;
    border-radius: 9px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary   { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }

.btn-success   { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #15803d; color: white; }

.btn-danger    { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover:not(:disabled)  { background: #b91c1c; color: white; }

.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-50); color: var(--gray-800); }

.btn-warning   { background: var(--warning); color: white; border-color: var(--warning); }

.btn-sm  { padding: .4rem .9rem; font-size: .82rem; border-radius: 7px; }
.btn-lg  { padding: .85rem 2rem; font-size: 1rem; border-radius: 12px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ============================================================
   جداول
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 700;
    font-size: .8rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
    text-align: center;
}

.table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }

/* ============================================================
   فرم‌ها
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: .5rem;
}

.form-label .required { color: var(--danger); margin-right: .2rem; }

.form-control {
    width: 100%;
    padding: .65rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 9px;
    font-family: inherit;
    font-size: .9rem;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    direction: rtl;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

.invalid-feedback {
    display: none;
    font-size: .8rem;
    color: var(--danger);
    margin-top: .3rem;
}

.is-invalid ~ .invalid-feedback { display: block; }

.form-select { appearance: none; cursor: pointer; }

.form-hint { font-size: .8rem; color: var(--gray-400); margin-top: .3rem; }

.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

/* ============================================================
   Alert ها
   ============================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: .9rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    border: 1px solid transparent;
    margin-bottom: 1.25rem;
}

.alert i { margin-top: .1rem; flex-shrink: 0; }

.alert-success { background: var(--success-light); border-color: #86efac; color: #166534; }
.alert-danger   { background: var(--danger-light);  border-color: #fca5a5; color: #991b1b; }
.alert-warning  { background: var(--warning-light); border-color: #fcd34d; color: #92400e; }
.alert-info     { background: var(--info-light);    border-color: #67e8f9; color: #155e75; }

/* Toast notification */
.toast-container {
    position: fixed;
    top: calc(var(--topbar-height) + 1rem);
    left: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 280px;
    max-width: 380px;
    border-right: 4px solid var(--primary);
    pointer-events: all;
    animation: slideInLeft .3s ease;
    font-size: .9rem;
}

.toast.success { border-right-color: var(--success); }
.toast.error   { border-right-color: var(--danger); }
.toast.warning { border-right-color: var(--warning); }
.toast i       { font-size: 1.1rem; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error   i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast-close {
    margin-right: auto;
    background: none; border: none;
    font-size: 1rem; color: var(--gray-400);
    cursor: pointer; padding: 0 .2rem;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================
   Badge وضعیت‌ها
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .75rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-gray    { background: var(--gray-100);      color: var(--gray-500); }

/* ============================================================
   Loading Indicator
   ============================================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    display: none;
}

.loading-overlay.active { display: flex; }

.spinner {
    width: 44px; height: 44px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner-sm {
    width: 18px; height: 18px;
    border-width: 2.5px;
    display: inline-block;
}

/* ============================================================
   مقایسه بصری فیش حقوقی
   ============================================================ */
.compare-indicator {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: help;
    padding: .15rem .45rem;
    border-radius: 5px;
    white-space: nowrap;
}

.compare-up   { color: var(--success); background: var(--success-light); }
.compare-down { color: var(--danger);  background: var(--danger-light);  }

/* Tooltip */
.tooltip-wrapper { position: relative; display: inline-block; }

.tooltip-box {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: var(--gray-900);
    color: white;
    padding: .6rem .9rem;
    border-radius: 9px;
    font-size: .8rem;
    line-height: 1.6;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 100;
    text-align: right;
    box-shadow: var(--shadow-lg);
}

.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: var(--gray-900);
}

.tooltip-wrapper:hover .tooltip-box { opacity: 1; }

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.page-title .title-icon {
    width: 42px; height: 42px;
    background: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--gray-400);
    margin-top: .2rem;
}

.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { font-size: .7rem; }
.breadcrumb .current { color: var(--gray-600); }

/* ============================================================
   Grid
   ============================================================ */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 1.25rem 0;
}

.pagination a, .pagination span {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: .875rem;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    transition: all var(--transition);
}

.pagination a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   Responsive — Desktop / Tablet / Mobile
   ============================================================ */

/* ---- Desktop: 1024px+ (default) ---- */
@media (min-width: 1024px) {
    .hide-desktop { display: none !important; }
}

/* ---- Tablet: max 768px ---- */
@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }

    /* Sidebar: slide-in از راست به صورت overlay */
    .sidebar {
        transform: translateX(100%);
        width: 260px;
        box-shadow: var(--shadow-lg);
        z-index: 1100;
    }
    .sidebar.open { transform: translateX(0); }

    /* Overlay تاریک پشت sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 1050;
    }
    .sidebar-overlay.active { display: block; }

    /* Topbar */
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
    .main-content { margin-right: 0; padding: 1rem; }
    .topbar-brand { min-width: auto; }

    /* مخفی کردن نام کاربری در topbar موبایل */
    .topbar-user .user-info { display: none; }
    .topbar-user .badge { display: none; }

    /* Grid */
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }

    /* فرم‌ها */
    .form-row { flex-direction: column; }

    /* Page header */
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header .btn { width: 100%; justify-content: center; min-height: 44px; }

    /* جداول */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* دکمه‌ها — touch target */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 38px; }
}

/* ---- Mobile: max 640px ---- */
@media (max-width: 640px) {
    html { font-size: 14px; }

    /* Topbar فشرده */
    .topbar { padding: 0 .85rem; gap: .5rem; }
    .topbar-brand span { display: none; }  /* فقط لوگو */
    .topbar-user { gap: .4rem; }

    /* Main content */
    .main-content { padding: .75rem; }

    /* Card */
    .card-body { padding: 1rem; }
    .card-header { padding: 1rem 1.1rem; flex-wrap: wrap; gap: .5rem; }

    /* Grid — تک ستون */
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }

    /* Stat card */
    .stat-card { padding: 1rem; gap: .9rem; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .stat-value { font-size: 1.3rem; }

    /* جدول */
    .table th, .table td { padding: .65rem .6rem; font-size: .82rem; }
    .table th { font-size: .75rem; }

    /* دکمه‌ها */
    .btn { font-size: .875rem; padding: .65rem 1rem; min-height: 44px; }
    .btn-sm { font-size: .8rem; padding: .5rem .75rem; min-height: 38px; }
    .btn-lg { padding: .85rem 1.5rem; }

    /* Page title */
    .page-title { font-size: 1.2rem; }
    .page-title .title-icon { width: 36px; height: 36px; font-size: .95rem; }

    /* فرم‌ها */
    .form-control { font-size: 16px; /* جلوگیری از zoom در iOS */ padding: .7rem .85rem; }
    .form-group { margin-bottom: 1rem; }

    /* Pagination */
    .pagination a, .pagination span { width: 40px; height: 40px; }

    /* Action buttons — full width on mobile */
    .mobile-full-width { width: 100%; justify-content: center; }
    .mobile-actions { display: flex; flex-direction: column; gap: .6rem; }
    .mobile-actions .btn { width: 100%; justify-content: center; }
}

/* ---- iPhone SE (375px) and smaller ---- */
@media (max-width: 390px) {
    .main-content { padding: .6rem; }
    .card-body { padding: .85rem; }
    .stat-value { font-size: 1.1rem; }
    .page-header { margin-bottom: 1.2rem; }
}

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-400); }
.text-sm     { font-size: .85rem; }
.text-xs     { font-size: .75rem; }
.fw-bold     { font-weight: 700; }
.fw-black    { font-weight: 800; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-1       { gap: .5rem; }
.gap-2       { gap: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }
.number { font-variant-numeric: tabular-nums; }

/* ============================================================
   Table alignment helpers
   ============================================================ */
.table th { text-align: center; }
.table td { text-align: right; }
.table .col-num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.table .col-center { text-align: center; }
.table .col-actions { text-align: center; white-space: nowrap; }
.table-center td { text-align: center; }

/* Shared two-state light/dark theme switch */
.app-theme-options { display:flex; justify-content:center; padding:.2rem .4rem .55rem; }
.app-theme-toggle { width:82px; height:40px; padding:0; position:relative; border:0; border-radius:999px; background:#ddaf32; box-shadow:inset 0 1px 2px rgba(0,0,0,.12),0 2px 7px rgba(0,0,0,.16); cursor:pointer; transition:background .2s ease,box-shadow .2s ease; -webkit-tap-highlight-color:transparent; }
.app-theme-toggle:hover { background:#e6b83d; box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 3px 10px rgba(0,0,0,.22); }
.app-theme-toggle:focus-visible { outline:3px solid rgba(59,130,246,.45); outline-offset:3px; }
.app-theme-thumb { position:absolute; top:4px; right:4px; width:32px; height:32px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#202124; box-shadow:0 2px 7px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.08); transition:transform .28s cubic-bezier(.4,0,.2,1); }
.app-theme-thumb i { font-size:15px; line-height:1; }
.app-theme-toggle[aria-checked="true"] .app-theme-thumb { transform:translateX(-42px); }
.app-theme-toggle .theme-icon-dark { display:none; }
.app-theme-toggle[aria-checked="true"] .theme-icon-light { display:none; }
.app-theme-toggle[aria-checked="true"] .theme-icon-dark { display:block; }
@media (prefers-reduced-motion:reduce) { .app-theme-toggle,.app-theme-thumb { transition:none!important; } }
