:root {
    --font-main: 'IRANSansWebFaNum', Tahoma, Arial, sans-serif;
    --primary: #2563eb;
    --danger: #ef4444;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: rgba(148, 163, 184, 0.35);
    --surface: rgba(255, 255, 255, 0.62);
    --surface-strong: rgba(255, 255, 255, 0.78);
    --input-surface: rgba(255, 255, 255, 0.72);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 16px;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('/assets/fonts/woff2/IRANSansWeb(FaNum)_UltraLight.woff2') format('woff2'),
        url('/assets/fonts/woff/IRANSansWeb(FaNum)_UltraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('/assets/fonts/woff2/IRANSansWeb(FaNum)_Light.woff2') format('woff2'),
        url('/assets/fonts/woff/IRANSansWeb(FaNum)_Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('/assets/fonts/woff2/IRANSansWeb(FaNum).woff2') format('woff2'),
        url('/assets/fonts/woff/IRANSansWeb(FaNum).woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('/assets/fonts/woff2/IRANSansWeb(FaNum)_Medium.woff2') format('woff2'),
        url('/assets/fonts/woff/IRANSansWeb(FaNum)_Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('/assets/fonts/woff2/IRANSansWeb(FaNum)_Bold.woff2') format('woff2'),
        url('/assets/fonts/woff/IRANSansWeb(FaNum)_Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('/assets/fonts/woff2/IRANSansWeb(FaNum)_Black.woff2') format('woff2'),
        url('/assets/fonts/woff/IRANSansWeb(FaNum)_Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

[data-theme='dark'] {
    --primary: #60a5fa;
    --danger: #f87171;
    --text-main: #e2e8f0;
    --text-muted: #cbd5e1;
    --border: rgba(148, 163, 184, 0.25);
    --surface: rgba(15, 23, 42, 0.55);
    --surface-strong: rgba(15, 23, 42, 0.75);
    --input-surface: rgba(15, 23, 42, 0.52);
    --shadow: 0 24px 55px rgba(2, 6, 23, 0.55);
}

/* Light theme tuning for app pages (excluding login) */
[data-theme='light'] body.app-shell:not(.auth-login) {
    --text-main: #0b1220;
    --text-muted: #334155;
    --border: rgba(148, 163, 184, 0.42);
    --surface: rgba(255, 255, 255, 0.58);
    --surface-strong: rgba(255, 255, 255, 0.72);
    --input-surface: rgba(255, 255, 255, 0.70);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

body.app-shell {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.26), transparent 40%),
        radial-gradient(circle at 78% 6%, rgba(14, 165, 233, 0.24), transparent 42%),
        radial-gradient(circle at 85% 78%, rgba(168, 85, 247, 0.16), transparent 44%),
        radial-gradient(circle at 22% 88%, rgba(34, 197, 94, 0.12), transparent 45%),
        repeating-radial-gradient(circle at 20% 10%, rgba(15, 23, 42, 0.04) 0 1px, transparent 1px 6px),
        linear-gradient(145deg, #dcfce7 0%, #e0f2fe 26%, #dbeafe 58%, #eef2ff 100%);
    color: var(--text-main);
    font-family: var(--font-main);
    transition: background 0.3s ease, color 0.3s ease;
}

button,
input,
select,
textarea {
    font-family: var(--font-main);
}

[data-theme='light'] body.app-shell:not(.auth-login) {
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.22), transparent 42%),
        radial-gradient(circle at 78% 6%, rgba(14, 165, 233, 0.20), transparent 45%),
        radial-gradient(circle at 85% 78%, rgba(168, 85, 247, 0.12), transparent 48%),
        repeating-radial-gradient(circle at 20% 10%, rgba(15, 23, 42, 0.035) 0 1px, transparent 1px 7px),
        linear-gradient(145deg, #eef2ff 0%, #e0f2fe 40%, #f0fdf4 100%);
}

[data-theme='light'] body.app-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.65), transparent 55%),
        radial-gradient(circle at 70% 68%, rgba(255, 255, 255, 0.45), transparent 60%);
    opacity: 0.85;
    mix-blend-mode: overlay;
}

[data-theme='dark'] body.app-shell {
    background:
        radial-gradient(circle at 15% 10%, rgba(96, 165, 250, 0.18), transparent 35%),
        radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.18), transparent 38%),
        linear-gradient(145deg, #020617 0%, #0b1120 45%, #111827 100%);
}

.topbar {
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.topbar-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

body.auth-login .topbar-inner {
    max-width: none;
}

.brand {
    margin: 0;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-main);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
}

.page-center {
    min-height: calc(100vh - 56px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
}

.card {
    width: 100%;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.page-center .card {
    width: min(100%, 440px);
}

body.auth-login .page-center .card {
    width: min(100%, 480px);
    margin: 0 auto;
}

body.auth-login .auth-login-panel {
    width: min(100%, 440px);
    margin: 0 auto;
}

body.auth-login .page-head-lottie {
    width: 128px;
    height: 128px;
    margin: 0 auto 0.75rem;
}

body.auth-login .subtitle {
    text-align: center;
}

body.auth-login .input {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(148, 163, 184, 0.30);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

[data-theme='dark'] body.auth-login .input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ARCaptcha (glass style on login) */
body.auth-login .arcaptcha #arc-checkbox {
    width: 100%;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(14px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

body.auth-login .arcaptcha #arc-checkbox:hover {
    border-color: color-mix(in oklab, var(--primary) 35%, rgba(148, 163, 184, 0.28)) !important;
    transform: translateY(-1px);
    transition: all 0.18s ease;
}

body.auth-login .arcaptcha #input-checkbox {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

[data-theme='dark'] body.auth-login .arcaptcha #arc-checkbox {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

[data-theme='dark'] body.auth-login .arcaptcha #input-checkbox {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme='dark'] body.auth-login .arcaptcha .im-not-robot-msg {
    color: rgba(255, 255, 255, 0.92) !important;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.65), transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.22), transparent 55%);
    opacity: 0.75;
}

[data-theme='light'] body.app-shell:not(.auth-login) .card {
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

[data-theme='light'] body.app-shell:not(.auth-login) .card::before {
    opacity: 0.9;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.78), transparent 55%),
        radial-gradient(circle at 82% 82%, rgba(255, 255, 255, 0.35), transparent 58%);
}

[data-theme='light'] body.app-shell:not(.auth-login) .card-body {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
}

[data-theme='dark'] .card::before {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.10), transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.05), transparent 55%);
    opacity: 1;
}

.card-body {
    padding: 1.25rem;
}

.page-title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.subtitle {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
}

.mb-12 {
    margin-bottom: 0.75rem;
}

.mb-16 {
    margin-bottom: 1rem;
}

.mb-24 {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    background: var(--input-surface);
    color: var(--text-main);
}

.input:focus {
    border-color: var(--primary);
    outline: 2px solid color-mix(in oklab, var(--primary) 28%, transparent);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-outline-danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-success {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.btn-success:hover {
    filter: brightness(0.96);
}

.btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.alert {
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.alert-success {
    background: color-mix(in oklab, #22c55e 18%, transparent);
    border: 1px solid color-mix(in oklab, #22c55e 45%, transparent);
    color: #067647;
}

.alert-danger {
    background: color-mix(in oklab, #ef4444 16%, transparent);
    border: 1px solid color-mix(in oklab, #ef4444 42%, transparent);
    color: #b42318;
}

.footer {
    text-align: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* App wrapper layout */
.app-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
}

.main-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.content {
    max-width: none;
    margin: 1.25rem 0 0;
    padding: 0 1rem;
    width: 100%;
}

.sidebar {
    width: 320px;
    flex: 0 0 320px;
    padding: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.sidebar-inner {
    height: calc(100vh - 2rem);
    overflow: auto;
    scrollbar-width: none;
}

.sidebar-inner::-webkit-scrollbar {
    display: none;
}

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 1rem;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-main);
    min-width: 0;
}

.sidebar-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 75%, #a855f7), var(--primary));
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
    flex: 0 0 auto;
}

.sidebar-logo-text {
    font-weight: 900;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-main);
    cursor: pointer;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0.85rem 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    flex: 0 0 auto;
}

.sidebar-user-name {
    font-weight: 800;
    line-height: 1.2;
}

.sidebar-user-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.desktop-only {
    display: inline-block;
}

.sidebar-menu {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
    gap: 0.6rem;
}

.sidebar-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: var(--text-main);
    background: color-mix(in oklab, var(--surface-strong) 40%, transparent);
    border: 1px solid color-mix(in oklab, var(--border) 85%, transparent);
    flex: 0 0 auto;
}

.sidebar-link-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link:hover {
    transform: translateY(-1px);
    border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}

.sidebar-link.active {
    border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
}

/* Desktop collapse toggle */
.sidebar.is-collapsed {
    width: 92px;
    flex: 0 0 92px;
}

.sidebar.is-collapsed {
    padding: 0.6rem;
}

.sidebar.is-collapsed .sidebar-card {
    padding: 0.6rem;
}

.sidebar.is-collapsed .sidebar-top {
    padding-bottom: 0;
    margin-bottom: 0.6rem;
}

.sidebar.is-collapsed .sidebar-logo-text,
.sidebar.is-collapsed .sidebar-logo-mark,
.sidebar.is-collapsed .sidebar-user-meta {
    display: none;
}

.sidebar.is-collapsed .sidebar-link {
    padding: 0.6rem;
    justify-content: center;
}

.sidebar.is-collapsed .sidebar-link::after {
    content: none;
}

.sidebar.is-collapsed .sidebar-link-text {
    display: none;
}

.sidebar.is-collapsed .sidebar-toggle {
    width: 100%;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: 1 1 auto;
}

.sidebar.is-collapsed .sidebar-top {
    justify-content: stretch;
}

.sidebar.is-collapsed .sidebar-logo {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 998;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-main);
    cursor: pointer;
}

.master-footer {
    margin-top: 1.25rem;
}

.master-footer-inner {
    max-width: none;
    width: 100%;
    margin: 0;
}

/* Dashboard header (inside layout) */
.icon-btn {
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
}

.theme-icon-only {
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
}

.theme-icon-only:hover {
    color: var(--primary);
}

.theme-icon {
    display: none;
}

[data-theme='light'] .theme-icon-moon {
    display: block;
}

[data-theme='dark'] .theme-icon-sun {
    display: block;
}

.dashboard-page {
    padding: 1.25rem 1rem 0;
}

.dashboard-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dashboard-page-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.dashboard-datetime {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.dashboard-datetime-date {
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-datetime-time {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.dashboard-hamburger {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    font-weight: 900;
}

/* Show hamburger only on mobile inside dashboard header */
.dashboard-page-header .dashboard-hamburger {
    display: none;
}

@media (max-width: 576px) {
    .dashboard-page-header .dashboard-hamburger {
        display: inline-grid;
    }
}

/* Glassy hamburger button (mobile header) */
.dashboard-page-header .dashboard-hamburger {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--text-main);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dashboard-page-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 75%, #a855f7), var(--primary));
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
    flex: 0 0 auto;
}

.dashboard-page-logo-text {
    font-weight: 900;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-page-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.dashboard-page-user-name {
    font-weight: 400;
    color: var(--text-main);
    white-space: nowrap;
    font-size: 0.9rem;
}

.dashboard-page-logout {
    margin: 0;
}

.dashboard-page-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.dashboard-page-logout-icon {
    font-size: 1.7rem;
    line-height: 1;
    opacity: 0.9;
}

.dashboard-page-logout-btn[data-tooltip] {
    position: relative;
}

.dashboard-page-logout-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    transform: none;
    white-space: nowrap;
    max-width: min(240px, calc(100vw - 24px));
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-main);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
    transform-origin: top;
    z-index: 20;
}

.dashboard-page-logout-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    top: calc(100% + 6px);
    left: 14px;
    transform: rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--surface-strong);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
    z-index: 21;
}

.dashboard-page-logout-btn[data-tooltip]:hover::after,
.dashboard-page-logout-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
}

.dashboard-page-logout-btn[data-tooltip]:hover::before,
.dashboard-page-logout-btn[data-tooltip]:focus-visible::before {
    opacity: 1;
}

.dashboard-content {
    display: grid;
    gap: 1.25rem;
    padding: 0.25rem 0 0;
}

.dashboard-stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.stat-card {
    width: 100%;
}

.stat-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.stat-svg {
    color: #fff;
    display: block;
}

.stat-primary {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.stat-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.stat-warn {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.stat-sub {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.stat-value {
    font-weight: 900;
    font-size: 1.05rem;
    margin-top: 0;
    margin-right: auto;
    font-variant-numeric: tabular-nums;
}

.dashboard-charts-50 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.dashboard-chart {
    width: 100%;
    display: block;
    border-radius: 0;
    flex: 1 1 auto;
}

.dashboard-chart-card,
.dashboard-today-chart-card {
    height: 100%;
}

.dashboard-chart-card .card-body,
.dashboard-today-chart-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.dashboard-chart-card .card-header-row,
.dashboard-today-chart-card .card-header-row,
.dashboard-today-table-card .card-header-row {
    padding: 1rem 1.25rem 0.75rem;
    margin-bottom: 0;
}

.dashboard-today-table-card .card-body {
    padding: 0.5rem 0.75rem 0.75rem;
}

.today-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
}

.today-chart {
    width: 100%;
    display: block;
    border-radius: 0;
    margin-bottom: 0;
}

.today-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.today-table thead th {
    position: sticky;
    top: 0;
    background: color-mix(in oklab, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: right;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 800;
}

.today-table tbody td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
    vertical-align: middle;
}

.today-table tbody tr:hover td {
    background: color-mix(in oklab, var(--primary) 6%, transparent);
}

.today-table .is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table-wrap {
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
}

.report-filters {
    margin-bottom: 1rem;
}

.report-filters-row {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 1.15fr 1.1fr 1.05fr 0.75fr auto;
    gap: 0.6rem;
    align-items: center;
}

.report-filters-row.is-dates-only {
    grid-template-columns: 0.9fr 0.9fr auto;
}

@media (max-width: 576px) {
    .report-filters-row,
    .report-filters-row.is-dates-only {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .report-filter-actions {
        justify-content: stretch;
    }

    .report-filter-actions .btn {
        width: 100%;
    }
}

.report-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.report-filter-label {
    margin-bottom: 0;
    font-size: 0.78rem;
    font-weight: 400;
    text-align: right;
    color: var(--text-muted);
}

.report-filter-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.report-filter {
    min-width: 0;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
}

.report-filter-date {
    min-width: 0;
}

.report-filter-select {
    min-width: 0;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--input-surface);
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(1rem + 6px) calc(50% + 1px), 1rem calc(50% + 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-left: 2.4rem;
}

.report-filter-btn {
    white-space: nowrap;
    padding: 0.55rem 0.9rem;
}

/* Wallet */
.wallet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wallet-topup-btn {
    background: #22c55e;
    border-color: #22c55e;
}

.wallet-topup-btn:hover {
    filter: brightness(0.97);
}

.wallet-balance-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.wallet-balance-value {
    font-size: 1.6rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    margin-top: 0.25rem;
}

.wallet-info {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
}

.wallet-illus {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.wallet-lottie {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
}

.wallet-info-title {
    font-weight: 900;
    margin-bottom: 0.35rem;
}

.wallet-info-desc {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 0.92rem;
}

@media (max-width: 900px) {
    .wallet-info {
        grid-template-columns: 1fr;
    }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1200;
}

.modal[data-tm-modal-confirm] {
    z-index: 1350;
}

.modal.is-open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
}

.modal-dialog {
    position: relative;
    width: min(520px, calc(100% - 2rem));
    margin: 10vh auto 0;
}

.tm-modal-history-dialog {
    width: min(1040px, calc(100% - 2rem));
}

.tm-action-cell .theme-icon-only.tm-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
}

.tm-icon-history,
.tm-icon-edit,
.tm-icon-banknote {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tm-icon-history svg,
.tm-icon-edit svg,
.tm-icon-banknote svg {
    width: 18px;
    height: 18px;
    display: block;
}

.modal-card {
    background: color-mix(in oklab, var(--surface-strong) 78%, transparent);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-weight: 900;
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
    color: var(--text-main);
    cursor: pointer;
}

.modal-body {
    padding: 1.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0 1.25rem 1.25rem;
}

/* Report row modal (AI & Inquiry): dark backdrop and LTR JSON */
[data-report-row-modal] [data-report-row-response] {
    background: #232222 !important;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

[data-report-row-modal] [data-report-row-track-wrap] {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

/* Report refresh button */
button[data-report-refresh] {
    background: #195730 !important;
    border-color: #195730 !important;
}

button[data-report-refresh]:hover,
button[data-report-refresh]:focus {
    background: color-mix(in oklab, #195730 85%, #000) !important;
    border-color: color-mix(in oklab, #195730 85%, #000) !important;
}

.wallet-disabled-note {
    margin-top: 1rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid color-mix(in oklab, var(--danger) 40%, var(--border));
    background: color-mix(in oklab, var(--danger) 10%, transparent);
    color: var(--text-main);
}

/* My accounts */
.account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.page-card + .page-card {
    margin-top: 1.25rem;
}

.account-item {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
}

.account-v-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.account-v-dots {
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.account-edit-btn {
    padding: 0.4rem 0.55rem;
    border-radius: 12px;
}

.account-password-panel {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.account-k {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.account-k-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.account-k-with-action > span {
    min-width: 0;
}

.account-api-key-value {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.account-api-key-text {
    display: block;
    word-break: break-all;
    font-weight: 700;
}

.account-v {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 900px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
    .account-form-grid {
        grid-template-columns: 1fr;
    }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead th {
    position: sticky;
    top: 0;
    background: color-mix(in oklab, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: right;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 800;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
    vertical-align: middle;
    white-space: nowrap;
    text-align: right;
    font-weight: 400;
}

.data-table tbody tr:hover td {
    background: color-mix(in oklab, var(--primary) 6%, transparent);
}

.data-table .is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.data-table-meta-title {
    font-weight: 900;
}

.data-table-meta-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* JalaliDatePicker theme overrides (local, no CDN) */
/* بالاتر از .modal (z-index: 1200) تا پنجرهٔ تقویم روی مودال دیده شود */
jdp-overlay {
    z-index: 1250 !important;
}

jdp-container {
    z-index: 1300 !important;
    background: color-mix(in oklab, var(--surface-strong) 75%, transparent) !important;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

[data-theme='dark'] jdp-container {
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

jdp-container .jdp-months,
jdp-container .jdp-years,
jdp-container .jdp-day,
jdp-container .jdp-day-name {
    color: var(--text-main);
}

jdp-container .jdp-day-name {
    background: color-mix(in oklab, var(--text-muted) 14%, transparent);
    font-weight: 700;
    border-radius: 10px;
}

jdp-container .jdp-day:not(.disabled-day) {
    border-radius: 12px;
}

jdp-container .jdp-day:not(.disabled-day):hover {
    background: color-mix(in oklab, var(--primary) 12%, transparent);
    transform: none;
}

jdp-container .jdp-day.today {
    border-color: color-mix(in oklab, var(--primary) 45%, var(--border));
}

jdp-container .jdp-day.selected {
    background-color: var(--primary) !important;
    color: #fff !important;
}

jdp-container .jdp-icon-minus,
jdp-container .jdp-icon-plus {
    border-color: var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
    border-radius: 12px;
}

jdp-container .jdp-icon-minus:hover,
jdp-container .jdp-icon-plus:hover {
    border-color: color-mix(in oklab, var(--primary) 45%, var(--border));
}

jdp-container .jdp-btn-today,
jdp-container .jdp-btn-empty,
jdp-container .jdp-btn-close {
    background: var(--primary);
    border-radius: 12px;
    font-weight: 700;
}

jdp-container .jdp-time-container .jdp-time select {
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
}

[data-theme='dark'] jdp-container .jdp-month select,
[data-theme='dark'] jdp-container .jdp-year select,
[data-theme='dark'] jdp-container .jdp-time-container .jdp-time select {
    background: color-mix(in oklab, var(--surface-strong) 72%, transparent);
    border-color: color-mix(in oklab, var(--border) 88%, transparent);
    color: var(--text-main);
}

[data-theme='dark'] jdp-container .jdp-month select option,
[data-theme='dark'] jdp-container .jdp-year select option,
[data-theme='dark'] jdp-container .jdp-time-container .jdp-time select option {
    background: #0b1120;
    color: var(--text-main);
}

[data-theme='dark'] jdp-container .jdp-month:hover,
[data-theme='dark'] jdp-container .jdp-year:hover {
    filter: none;
}

@media only screen and (max-width: 481px) {
    jdp-overlay {
        background-color: rgba(2, 6, 23, 0.55);
    }
}

.today-td-time {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.today-td-desc {
    min-width: 0;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-td-amount {
    font-weight: 900;
    white-space: nowrap;
}

.today-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 60%, transparent);
}

.today-badge.is-fin {
    border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
}

.today-badge.is-nonfin {
    border-color: color-mix(in oklab, #f59e0b 45%, var(--border));
}

.today-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dashboard-today-message {
    margin: 0.6rem 0 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--border));
    background: color-mix(in oklab, var(--primary) 10%, transparent);
    color: var(--text-main);
    line-height: 1.85;
    font-size: 0.9rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.page-head > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.page-head > :not(:first-child) {
    flex: 0 0 auto;
}

.page-head-lottie {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
}

.page-head-lottie-box {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.page-head-lottie-box svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

@media (max-width: 680px) {
    .page-head {
        flex-direction: row;
        align-items: center;
    }

    .page-head > :first-child {
        flex: 0 0 70%;
        max-width: 70%;
    }

    .page-head-lottie {
        flex: 0 0 30%;
        max-width: 30%;
        justify-self: flex-end;
    }

    .page-head-lottie {
        width: min(96px, 100%);
        height: min(96px, 100%);
        border-radius: 16px;
    }
    .page-head-lottie-box {
        width: 100%;
        height: 100%;
    }
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.page-title-row .page-title {
    margin: 0;
}

.page-title-row .btn {
    flex: 0 0 auto;
}

.page-filters {
    margin-top: 0.75rem;
}

.filters-row {
    display: grid;
    grid-template-columns: 1fr 190px 170px auto auto;
    gap: 0.75rem;
    align-items: center;
}

.filters-select {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--input-surface);
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(1rem + 6px) calc(50% + 1px), 1rem calc(50% + 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-left: 2.4rem;
}

.filters-date {
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
}

.filters-search {
    min-width: 0;
}

.cards-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2.5rem;
}

.admin-dashboard-message-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.user-card {
    width: 100%;
}

.user-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.user-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 75%, #a855f7), var(--primary));
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
    flex: 0 0 auto;
}

.user-card-name {
    font-weight: 900;
    line-height: 1.2;
}

.user-card-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-fields {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.user-field {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface-strong) 55%, transparent);
}

.user-field-k {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-field-v {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

.user-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.user-action-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
}

.user-action-svg {
    display: block;
}

.user-action-danger {
    border-color: var(--danger);
    color: var(--danger);
    background: color-mix(in oklab, var(--danger) 6%, var(--surface-strong));
}

.user-action-danger:hover {
    border-color: color-mix(in oklab, var(--danger) 65%, var(--border));
}

.user-action-icon.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.user-card-actions form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.help-text {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-actions {
    margin-top: 1.1rem;
    display: flex;
    justify-content: flex-end;
}

.pagination-wrap {
    margin-top: 1rem;
}

.report-pagination-wrap {
    padding-top: 10px;
}

.report-pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.report-pagination-info {
    opacity: 0.85;
}

.report-pagination-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.report-pagination-links .btn {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(148, 163, 184, 0.28);
    color: #0f172a;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.report-pagination-links .btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in oklab, var(--primary) 40%, rgba(148, 163, 184, 0.28));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
}

.report-pagination-page.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    pointer-events: none;
}

.report-pagination-links .btn:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--primary) 28%, transparent);
    outline-offset: 2px;
}

.report-pagination-ellipsis {
    opacity: 0.6;
    padding: 0 0.15rem;
}

.report-pagination-links [aria-disabled='true'] {
    opacity: 0.45;
    pointer-events: none;
}

[data-theme='dark'] .report-pagination-links .btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-main);
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme='dark'] .report-pagination-links .btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.dashboard-card-image {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
}

.dashboard-charts-50 .today-table-wrap {
    margin-top: 0.75rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    animation: statusDotPulse 1.25s ease-in-out infinite;
}

.status-dot.is-idle {
    opacity: 0.35;
    animation: none;
}

@keyframes statusDotPulse {
    0% {
        opacity: 0.35;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.0);
    }
    100% {
        opacity: 0.35;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.0);
    }
}

@media (max-width: 960px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .filters-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .dashboard-datetime {
        display: none;
    }

    .card-body {
        padding: 1.25rem;
    }

    .topbar-inner {
        gap: 0.6rem;
    }

    .theme-toggle {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
}

@media (max-width: 960px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(110%);
        transition: transform 0.2s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    .sidebar-close {
        display: inline-grid;
        place-items: center;
    }

    .mobile-only {
        display: inline-block;
    }

    .dashboard-stats-row {
        grid-template-columns: 1fr;
    }

    .dashboard-charts-50 {
        grid-template-columns: 1fr;
    }
}

.mobile-only {
    display: none;
}

/* noora-users: سرویس‌ها و تعرفه — هم‌نام با resources/css/app.css (برای بارگذاری بدون Vite) */
.nu-services-section {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.nu-services-error {
    margin-bottom: 0.45rem;
}

.nu-services-heading {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.85rem;
    padding-block: 0.85rem;
}

.nu-services-grid {
    display: grid;
    row-gap: 0.75rem;
    column-gap: 0.55rem;
    grid-template-columns: 1fr;
}

.nu-services-grid > .nu-service-row {
    min-width: 0;
    padding-block: 0.15rem;
}

@media (min-width: 640px) and (max-width: 991px) {
    .nu-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .nu-services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nu-services-grid .nu-service-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.28rem;
    }

    .nu-services-grid .nu-switch {
        flex: 0 0 auto;
        width: 100%;
    }

    .nu-services-grid .nu-service-rial {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }
}

.nu-service-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.nu-switch {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.nu-switch-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    appearance: none;
    -webkit-appearance: none;
}

.nu-switch-track {
    position: relative;
    z-index: 0;
    flex-shrink: 0;
    width: 2.5rem;
    height: 1.35rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--text-muted) 38%, var(--surface));
    transition: background 0.18s ease;
}

.nu-switch-thumb {
    position: absolute;
    top: 50%;
    margin-top: -0.5rem;
    inset-inline-start: 0.15rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--surface-strong);
    box-shadow: 0 1px 3px rgba(2, 6, 23, 0.22);
    transition: inset-inline-start 0.2s ease;
}

.nu-switch-input:checked ~ .nu-switch-track {
    background: color-mix(in oklab, var(--primary) 88%, var(--surface));
}

.nu-switch-input:checked ~ .nu-switch-track .nu-switch-thumb {
    inset-inline-start: calc(100% - 1rem - 0.15rem);
}

.nu-switch-input:focus-visible ~ .nu-switch-track {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nu-service-label-stack {
    position: relative;
    z-index: 0;
    flex: 1 1 auto;
    min-width: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
}

.nu-service-label-stack .nu-service-label {
    font-size: 0.88rem;
    line-height: 1.28;
}

.nu-service-label-stack .nu-service-key {
    font-size: 0.72rem;
    line-height: 1.22;
    color: color-mix(in oklab, var(--text-muted) 88%, var(--text));
    font-variant-numeric: tabular-nums;
    word-break: break-word;
    max-width: 100%;
}

.nu-service-rial {
    flex: 0 0 auto;
    width: 9rem;
    max-width: 100%;
}

.page.page-noora-user-form {
    gap: 1.55rem;
}

.page.page-noora-user-form .page-subtitle {
    margin-top: 0.75rem;
    line-height: 1.55;
}

.page.page-noora-user-form .page-head {
    margin-bottom: 3.75rem;
}

@media (max-width: 767px) {
    .page.page-noora-user-form .form-grid {
        grid-template-columns: 1fr;
    }

    .page.page-noora-user-form .nu-services-grid {
        grid-template-columns: 1fr;
    }

    .page.page-noora-user-form .nu-services-grid .nu-service-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .page.page-noora-user-form .nu-services-grid .nu-switch {
        width: 100%;
    }

    .page.page-noora-user-form .nu-services-grid .nu-service-rial {
        width: 100%;
        max-width: none;
    }
}
