@font-face {
    font-family: Vazirmatn;
    src: url('/fonts/Vazirmatn.woff2') format('woff2');
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #10131a;
    --sidebar: #141820;
    --surface: #191e28;
    --surface-raised: #202632;
    --border: #2a3140;
    --text: #edf1f8;
    --muted: #929daf;
    --primary: #66e0bd;
    --violet: #af9cff;
    --amber: #f3c77b;
    --danger: #ff919c;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 14px/1.85 Vazirmatn, Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
button .icon, a .icon { flex: 0 0 auto; }
.icon { vertical-align: middle; }
.muted { color: var(--muted); }
h1, h2, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.6; letter-spacing: -.5px; margin-bottom: 5px; font-weight: 700; }
h2 { font-size: 16px; margin-bottom: 10px; font-weight: 650; }
p { color: var(--muted); margin-bottom: 16px; }
small { font-size: 11px; }
.sidebar { position: fixed; inset: 0 0 0 auto; width: 258px; background: var(--sidebar); border-left: 1px solid var(--border); z-index: 50; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 27px 22px 23px; }
.brand-logo { display: grid; place-items: center; width: 42px; height: 46px; background: #fff; border-radius: 12px; overflow: hidden; }
.brand-logo img { width: 38px; height: 38px; object-fit: contain; }
.brand strong { font-size: 26px; line-height: 1; }
.brand-dot { color: var(--primary); }
.brand small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; }
.owner-tag { font: 9px/1.7 Arial, sans-serif; letter-spacing: 1px; padding: 3px 7px; border: 1px solid #3c475b; border-radius: 5px; color: #abb8ce; margin-right: auto; }
.workspace { display: flex; align-items: center; gap: 10px; background: #1d232e; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 0 16px 18px; }
.workspace-icon { width: 33px; height: 34px; display: grid; place-items: center; color: var(--primary); background: #253e39; border: 1px solid #365a4e; border-radius: 8px; font-weight: bold; }
.workspace strong { display: block; font-size: 11px; }
.workspace small { display: block; color: var(--muted); font-size: 10px; }
.status-dot { display: inline-block; height: 6px; width: 6px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px #66e0bd25; margin-left: 5px; }
.sidebar nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 22px; scrollbar-width: thin; scrollbar-color: #363e4d transparent; }
.nav-caption { font-size: 10px; color: #76839a; margin: 23px 15px 9px; }
.nav-item { display: flex; align-items: center; gap: 11px; color: #a7b0bf; padding: 10px 13px; margin-bottom: 3px; border-radius: 7px; font-size: 12px; min-height: 42px; transition: background .15s, color .15s; }
.nav-item .icon { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: #202734; color: #fff; }
.nav-item.active { background: #253d36; color: #8cedcd; box-shadow: inset -3px 0 var(--primary); }
.nav-item.active .icon { opacity: 1; }
.sidebar-footer { border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 16px 20px; }
.sidebar-footer strong { font-size: 11px; display: block; }
.sidebar-footer small { color: var(--muted); display: block; font-size: 10px; }
.sidebar-footer form { margin-right: auto; }
.avatar { width: 37px; height: 37px; border-radius: 11px; display: inline-grid; place-items: center; background: #343249; border: 1px solid #4a4362; color: #c4b8ef; flex: 0 0 auto; font-weight: 600; }
.avatar.small { width: 32px; height: 32px; font-size: 12px; }
.main-shell { margin-right: 258px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 76px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 34px; background: #131720; }
.breadcrumbs { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--muted); }
.breadcrumbs strong { color: #ccd3df; font-weight: 450; }
.breadcrumb-separator { color: #465065; }
.topbar-actions { display: flex; align-items: center; gap: 20px; font-size: 11px; }
.topbar-link { color: #c2cbd9; display: flex; align-items: center; gap: 7px; }
.topbar-link .icon { width: 14px; height: 14px; transform: rotate(45deg); }
.topbar-divider { width: 1px; height: 22px; background: var(--border); }
.connection { color: var(--muted); }
.icon-button { display: inline-grid; place-items: center; background: transparent; border: 0; padding: 6px; color: #a4afc3; min-width: 32px; min-height: 32px; }
.mobile-menu { display: none; }
main { padding: 30px 34px; flex: 1; min-width: 0; width: 100%; max-width: 1800px; margin-inline: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.page-heading p { font-size: 12px; margin-bottom: 0; }
.eyebrow { color: #8491a6; font-size: 10px; margin-bottom: 4px; letter-spacing: .3px; }
.heading-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { background: #1a202b; border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; gap: 9px; padding: 7px 12px; font-size: 11px; color: #afb9ca; }
.pill .icon { width: 15px; height: 15px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; border: 1px solid transparent; padding: 8px 15px; border-radius: 7px; font-size: 12px; font-weight: 550; transition: filter .15s; text-align: center; }
.button:hover { filter: brightness(1.12); }
.button .icon { width: 17px; height: 17px; }
.button.primary { color: #103c30; background: var(--primary); border-color: var(--primary); }
.button.secondary, .secondary { color: #c2ccda; background: #202633; border: 1px solid #343d4e; }
.button.danger { color: #ffb1ba; background: #492730; border: 1px solid #72424d; }
.button.full { width: 100%; }
.text-link { color: var(--primary); font-size: 11px; }
.welcome-banner { background: radial-gradient(ellipse at 14% 55%, #294842 0, transparent 53%), linear-gradient(100deg, #1b2d2d, #1b252e 65%, #202532); border: 1px solid #30433f; min-height: 230px; padding: 29px 32px; border-radius: 12px; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; }
.banner-kicker { color: #b2cabd; font-size: 10px; }
.welcome-banner h2 { font-size: 25px; margin-top: 13px; margin-bottom: 6px; }
.welcome-banner p { font-size: 12px; max-width: 480px; color: #acb9bf; margin-bottom: 20px; }
.banner-link { color: #bfd1cb; font-size: 11px; margin-right: 17px; }
.banner-visual { position: relative; height: 180px; width: 240px; flex: 0 0 240px; }
.orbit { position: absolute; border: 1px solid #76bfa62e; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.orbit-one { width: 160px; height: 160px; }
.orbit-two { width: 225px; height: 225px; }
.visual-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-8deg); height: 85px; width: 85px; background: linear-gradient(145deg,#70dfba,#3a866f); border: 1px solid #98f0ce; border-radius: 25px; display: grid; place-items: center; box-shadow: 0 12px 50px #3cac7433; color: #173c32; }
.visual-core .icon { height: 42px; width: 42px; }
.floating-symbol { position: absolute; border: 1px solid #547368; background: #29433c; color: #a5e7cb; padding: 10px; border-radius: 12px; height: 43px; width: 43px; display: grid; place-items: center; }
.symbol-one { top: 0; left: 50px; transform: rotate(-10deg); }
.symbol-two { bottom: 4px; left: 42px; transform: rotate(8deg); }
.symbol-three { right: 10px; bottom: 46px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; margin-bottom: 23px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #aab4c6; font-size: 11px; }
.stat-icon { width: 37px; height: 37px; border-radius: 10px; display: inline-grid; place-items: center; }
.stat-icon.violet, .badge.violet { color: #beadff; background: #38304d; }
.stat-icon.cyan { color: #7fdbed; background: #263e4a; }
.stat-icon.amber, .badge.amber { color: #f3cb83; background: #433a2d; }
.stat-icon.green, .badge.green { color: #7de3bb; background: #283d37; }
.stat-number { display: block; font-size: 33px; font-weight: 600; line-height: 1.7; margin-top: 8px; }
.stat-card small { color: #7f8ba1; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 22px; margin-bottom: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 23px; min-width: 0; margin-bottom: 22px; }
.dashboard-grid > .card, .two-columns > .card { margin-bottom: 0; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-heading h2 { margin: 0 0 3px; }
.card-heading p { font-size: 10px; color: #8390a4; margin: 0; }
.legend { font-size: 10px; color: #a2afc0; white-space: nowrap; }
.legend i { display: inline-block; width: 7px; height: 7px; background: var(--primary); border-radius: 3px; margin-left: 5px; }
.chart { display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; height: 208px; padding: 12px 3px 0; background: repeating-linear-gradient(to top,transparent 0,transparent 49px,#2c344239 50px); }
.chart-column { display: flex; flex-direction: column; align-items: center; width: 9%; height: 100%; }
.chart-value { font-size: 10px; color: #98a8b7; margin-bottom: 6px; }
.chart-track { width: 100%; height: 140px; display: flex; align-items: flex-end; }
.chart-bar { width: 100%; min-height: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg,#6cdfbb,#3a8f78); }
.chart-column small { font-size: 9px; margin-top: 12px; color: #8995a7; direction: ltr; }
.quick-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.quick-grid a { display: flex; align-items: center; gap: 9px; padding: 13px 9px; background: #202632; border: 1px solid #303847; border-radius: 8px; }
.quick-grid a:hover { border-color: #547c6f; }
.quick-grid strong { font-size: 10px; font-weight: 450; }
.quick-grid > a > .icon { width: 14px; height: 14px; color: #738098; margin-right: auto; }
.quick-icon { display: grid; place-items: center; height: 30px; width: 30px; border-radius: 7px; background: #2b3542; color: #a5c1b9; flex: 0 0 auto; }
.quick-icon .icon { width: 17px; height: 17px; }
.people-list > a { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #2b3241; padding: 11px 0; }
.people-list > a:last-child { border-bottom: 0; }
.people-list strong { font-size: 12px; font-weight: 500; display: block; }
.people-list small { color: #8190a4; display: block; font-size: 10px; }
.people-list .badge { margin-right: auto; }
.badge { display: inline-block; padding: 2px 9px; font-size: 10px; border-radius: 5px; white-space: nowrap; }
.timeline-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid #29303e; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-dot { height: 7px; width: 7px; background: #7c9b8d; border-radius: 50%; margin-top: 8px; flex: 0 0 auto; box-shadow: 0 0 0 4px #28372f; }
.timeline-item strong { font-size: 11px; font-weight: 450; display: block; }
.timeline-item small { display: block; color: #7e8a9f; font-size: 9px; direction: ltr; text-align: right; }
.timeline-item time { margin-right: auto; font-size: 9px; color: #7d8b9e; }
.page-footer { padding: 17px 34px 22px; display: flex; justify-content: space-between; gap: 15px; color: #68768c; font-size: 9px; }
.footer-dot { display: inline-block; width: 3px; height: 3px; margin: 0 7px 2px; border-radius: 50%; background: #59677c; }
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 21px; }
.filter-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.filter-bar input, .filter-bar select { width: auto; min-width: 125px; max-width: 230px; margin: 0; height: 38px; font-size: 11px; }
.filter-bar .button { min-height: 38px; }
.search-field { display: flex; align-items: center; gap: 7px; background: #111720; border: 1px solid #303a4d; padding: 0 10px; border-radius: 7px; }
.search-field .icon { width: 16px; height: 16px; color: #8794a8; }
.search-field input { border: 0; padding-inline: 0; width: 190px; min-width: 0; background: transparent; }
.table-count { font-size: 10px; color: #8998ae; white-space: nowrap; }
.table-scroll { overflow: auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: #3b4658 transparent; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: 11px; }
th { font-weight: 500; color: #a2afc3; background: #1d2430; white-space: nowrap; }
th, td { padding: 13px 17px; border-bottom: 1px solid #29313f; vertical-align: middle; }
td { color: #c6cfde; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #202735; }
.cell-value { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-button { color: #88d5bc; padding: 4px 9px; min-height: 28px; background: #26372f; font-size: 10px; white-space: nowrap; }
.record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.record-actions form { display: inline-flex; margin: 0; }
.record-actions .button { min-height: 34px; font-size: 11px; padding: 5px 10px; }
.record-actions + p { margin-top: 17px; margin-bottom: 0; }
.row-actions-cell { min-width: 230px; max-width: 320px; position: sticky; left: 0; background: var(--surface); box-shadow: 5px 0 12px #0002; }
.row-actions-heading { position: sticky; left: 0; z-index: 1; }
.selection-cell { width: 44px; min-width: 44px; padding-inline: 12px; }
.selection-cell input { width: 16px; height: 16px; min-height: 16px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.bulk-toolbar { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 13px 20px; border-top: 1px solid var(--border); background: #161d27; }
.bulk-toolbar label { margin: 0; }
.bulk-toolbar select { width: auto; min-width: 160px; max-width: 240px; margin: 0; font-size: 11px; }
.bulk-toolbar > span { font-size: 10px; }
.record-value { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 700px; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 12px; padding-block: 10px; }
.weekday-options .checkbox { align-items: center; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; color: #8793a7; font-size: 10px; border-top: 1px solid var(--border); }
.pagination .button { font-size: 10px; min-height: 32px; padding: 5px 11px; }
.two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-bottom: 22px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin-top: 18px; }
.form-grid .span-all { grid-column: 1/-1; }
.form-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.form-stack .button { align-self: flex-start; margin-top: 6px; }
.narrow { max-width: 620px; }
label { display: block; font-size: 11px; color: #aebacf; margin-bottom: 6px; }
input, select, textarea { background: #111720; border: 1px solid #344052; border-radius: 7px; width: 100%; min-width: 0; min-height: 41px; padding: 8px 11px; color: var(--text); margin-top: 5px; }
input::placeholder, textarea::placeholder { color: #65728a; font-size: 11px; }
textarea { min-height: 95px; resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox input { width: 16px; min-height: 16px; height: 16px; margin-top: 4px; accent-color: var(--primary); flex: 0 0 auto; }
.notice { border: 1px solid #345547; border-radius: 8px; background: #1c3028; color: #a6e3c4; padding: 13px 17px; margin-bottom: 20px; font-size: 12px; }
.notice p { color: inherit; margin: 0; }
.notice.error { border-color: #67434d; background: #36232b; color: #ffadb5; }
.info-note { background: #202d35; border: 1px solid #34505b; color: #adcad4; padding: 16px 18px; border-radius: 8px; font-size: 12px; margin: 20px 0; }
.danger-card { border-color: #61414b; }
.health-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; margin-bottom: 22px; }
.health-card { margin: 0; }
.health-card strong { display: block; margin-top: 10px; font-size: 18px; font-weight: 500; }
.health-card > span { font-size: 11px; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.copy-field { display: flex; gap: 8px; align-items: center; margin-block: 18px; }
.copy-field input { font: 11px/1.8 monospace; margin-top: 0; }
.copy-field .button { white-space: nowrap; }
.tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.tool-card h2 { margin-top: 19px; }
.tool-card p { font-size: 12px; }
.detail-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--border); padding: 13px 0; font-size: 11px; }
.detail-line:last-child { border-bottom: 0; }
.detail-line > span:first-child { color: var(--muted); }
.report-cell { min-width: 230px; max-width: 400px; white-space: normal; }
summary { font-size: 14px; font-weight: 600; color: #cbdad3; cursor: pointer; }
.empty { color: #8291a6; font-size: 12px; padding: 22px 0; text-align: center; }
.empty-state { padding: 35px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state .icon { width: 35px; height: 35px; color: #65768e; }
.empty-state strong { font-size: 12px; font-weight: 500; }
.empty-state p { font-size: 11px; margin: 0; }
.data-preview { direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; max-height: 440px; overflow: auto; background: #111720; border: 1px solid #2c3749; border-radius: 8px; padding: 16px; color: #a9ccbc; font: 12px/1.9 Consolas, monospace; }
.auth-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 30% 0,#243a36 0,transparent 55%),radial-gradient(ellipse at 90% 90%,#262439 0,transparent 50%),#10131a; padding: 35px 18px; }
.auth-card { width: min(100%,460px); border: 1px solid #34433f; border-radius: 17px; padding: 35px; background: #171d26; box-shadow: 0 30px 100px #0005; }
.auth-mark { display: grid; place-items: center; height: 58px; width: 58px; border-radius: 17px; background: #294337; color: #98e5c5; border: 1px solid #456752; margin-bottom: 22px; }
.auth-mark .icon { height: 30px; width: 30px; }
.auth-card .eyebrow { font: 10px/1.8 Arial,sans-serif; letter-spacing: 2px; color: #7d9f91; }
.auth-card h1 { font-size: 23px; margin-block: 10px 8px; }
.auth-card p { font-size: 12px; }
.auth-card form { margin-top: 25px; }
.auth-card form > label { margin-top: 15px; }
.auth-card form > .button { margin-top: 24px; }
.password-field { position: relative; }
.password-field input { padding-left: 65px; }
.password-field button { position: absolute; left: 7px; top: 11px; background: #283240; border: 0; border-radius: 4px; color: #bbccda; padding: 2px 9px; font-size: 10px; }
.otp-input { letter-spacing: 9px; font-size: 19px; text-align: center; }
.auth-footer { border-top: 1px solid var(--border); color: #728b80; margin-top: 26px; padding-top: 19px; text-align: center; font-size: 10px; }
.auth-footer .icon { width: 14px; height: 14px; }
.setup-secret { padding: 15px; border: 1px solid #3e554a; border-radius: 8px; background: #20302a; }
.setup-secret code { display: block; font: 13px/2 monospace; word-break: break-all; background: #14211b; padding: 9px; color: #a7f3cc; border-radius: 5px; }
.setup-secret small { display: block; margin-top: 11px; color: #a3bfae; }
.sidebar-scrim { display: none; }
.jalali-open { font-size: 10px; padding: 5px 10px; margin-top: 6px; border-radius: 5px; }
.jalali-dialog { width: min(94vw,440px); border: 1px solid #4d6358; border-radius: 12px; background: #1b2422; padding: 20px; color: var(--text); font-family: Vazirmatn,sans-serif; }
.jalali-dialog::backdrop { background: #0009; }
.jalali-header { display: flex; gap: 7px; align-items: center; }
.jalali-header select { width: 100px; }
.jalali-dialog button { border: 1px solid #3f5148; background: #283b31; color: #d2ebde; border-radius: 5px; padding: 6px; }
.jalali-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; margin-block: 20px; text-align: center; }
.jalali-grid button[aria-current] { background: #7edbb2; color: #15382a; }

@media (min-width:1600px) {
    main { padding-inline: 42px; }
    .welcome-banner { min-height: 245px; }
    .stats-grid { gap: 22px; }
}
@media (max-width:1200px) {
    .sidebar { width: 230px; }
    .main-shell { margin-right: 230px; }
    .brand { padding-inline: 17px; }
    main { padding: 25px 23px; }
    .topbar { padding-inline: 23px; }
    .banner-visual { width: 175px; flex-basis: 175px; }
    .orbit-two { width: 190px; height: 190px; }
    .dashboard-grid { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 16px; }
    .quick-grid { gap: 8px; }
    .quick-grid a { flex-wrap: wrap; }
    .quick-grid > a > .icon { display: none; }
    .stats-grid { gap: 12px; }
    .stat-card { padding: 16px; }
    .table-toolbar { align-items: flex-start; }
}
@media (max-width:960px) {
    .sidebar { transform: translateX(100%); transition: transform .2s; width: 258px; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; background: #0009; border: 0; z-index: 49; width: 100%; height: 100%; }
    .main-shell { margin-right: 0; }
    .mobile-menu { display: inline-grid; }
    .breadcrumbs { margin-left: auto; }
    .topbar { height: 65px; }
    .topbar-actions { gap: 14px; }
    .topbar-divider, .connection { display: none; }
    .two-columns { gap: 16px; }
}
@media (max-width:640px) {
    main { padding: 21px 15px; }
    .topbar { padding-inline: 12px; }
    .breadcrumbs { font-size: 10px; gap: 8px; }
    .breadcrumbs > span:first-child, .breadcrumb-separator { display: none; }
    .topbar-link { font-size: 10px; }
    .topbar-actions { gap: 10px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 20px; }
    h1 { font-size: 24px; }
    .welcome-banner { padding: 24px 21px; min-height: 235px; }
    .welcome-banner h2 { font-size: 22px; }
    .welcome-banner p { max-width: 100%; }
    .banner-visual { display: none; }
    .banner-link { font-size: 10px; margin-right: 9px; }
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
    .stat-card { padding: 14px; }
    .stat-top { font-size: 10px; }
    .stat-icon { height: 30px; width: 30px; border-radius: 8px; }
    .stat-icon .icon { width: 18px; height: 18px; }
    .stat-number { font-size: 29px; }
    .dashboard-grid, .two-columns, .tool-grid { grid-template-columns: minmax(0,1fr); }
    .card { padding: 19px 16px; }
    .table-card { padding: 0; }
    .card-heading { gap: 10px; }
    .card-heading h2 { font-size: 14px; }
    .quick-grid a { flex-wrap: nowrap; }
    .page-footer { padding: 16px; flex-direction: column; gap: 5px; }
    .table-toolbar { padding: 15px; flex-direction: column; gap: 10px; }
    .filter-bar { width: 100%; }
    .search-field { flex: 1 1 100%; }
    .search-field input { width: 100%; max-width: none; }
    .filter-bar input, .filter-bar select { max-width: none; flex: 1 1 120px; }
    .health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
    .health-card strong { font-size: 14px; }
    .form-grid { grid-template-columns: minmax(0,1fr); }
    .heading-meta { width: 100%; }
    .copy-field { flex-direction: column; align-items: stretch; }
    .auth-card { padding: 27px 23px; }
    .auth-card h1 { font-size: 21px; }
    .row-actions-cell { min-width: 170px; max-width: 190px; }
    .bulk-toolbar { padding: 13px 15px; }
    .bulk-toolbar select { flex: 1; min-width: 160px; }
}
@media (prefers-reduced-motion:reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
