@font-face {
    font-family: "SaudiRiyalSymbol";
    src: url("../gamezone/fonts/saudi-riyal/SaudiRiyalSymbol.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: block;
    unicode-range: U+E900;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Hairline.otf") format("opentype");
    font-weight: 50;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Thin.otf") format("opentype");
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-ExtraLight.otf") format("opentype");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Medium.otf") format("opentype");
    font-weight: 500 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Heavy.otf") format("opentype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PingARLT";
    src: url("../gamezone/fonts/pingarlt/PingARLT-Black.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #17174a;
    --muted: #4b5276;
    --border: #dce4f3;
    --surface: #ffffff;
    --page: #f7f9fe;
    --violet-deep: #312e9f;
    --violet: #6335e8;
    --violet-bright: #9146ff;
    --focus: #6335e8;
    --admin-action-rail-width: 148px;
    --admin-action-height: 48px;
    --admin-action-compact-size: 44px;
    --admin-action-gap: 10px;
    --admin-action-radius: 13px;
    --admin-action-inline-padding: 14px;
    font-family: "PingARLT", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); line-height: 1.55; }
.dashboard-page {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background-color: #f7fbff;
}

.dashboard-page::before,
.dashboard-page::after {
    position: fixed;
    z-index: 0;
    inset: 0;
    display: block;
    pointer-events: none;
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    transition: opacity .42s cubic-bezier(.22, .61, .36, 1);
}

.dashboard-page::before {
    background-image: url("../images/admin-light-background.png");
    opacity: 1;
}

.dashboard-page::after {
    background-image: url("../images/admin-dark-background.png");
    opacity: 0;
}

html[data-theme="dark"] .dashboard-page {
    background-color: #08132e;
}

html[data-theme="dark"] .dashboard-page::before {
    opacity: 0;
}

html[data-theme="dark"] .dashboard-page::after {
    opacity: 1;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 20; top: -100px; right: 20px; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 10px; }
.skip-link:focus { top: 14px; }
.latin-text { unicode-bidi: isolate; }
.saudi-riyal-symbol { font-family: "SaudiRiyalSymbol"; font-size: .88em; font-style: normal; font-weight: 400; line-height: 1; }

.dashboard-shell { position: relative; z-index: 1; min-height: 100vh; }
.dashboard-main-wrap { min-width: 0; }
.dashboard-topbar { display: flex; align-items: center; justify-content: space-between; gap: clamp(12px, 2vw, 27px); min-height: 72px; padding: 0 clamp(20px, 3vw, 42px); background: #fff; border-bottom: 1px solid var(--border); }
.brand-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; min-width: 0; color: var(--violet-deep); }
.brand-logo { display: block; flex: 0 0 auto; width: clamp(170px, 12vw, 190px); height: auto; aspect-ratio: 3 / 1; object-fit: contain; direction: ltr; }
.brand-logo--dark { display: none; }
html[data-theme="dark"] .brand-logo--light { display: none; }
html[data-theme="dark"] .brand-logo--dark { display: block; filter: brightness(0) invert(1); }
.dashboard-nav { display: flex; flex: 1 1 auto; align-items: stretch; justify-content: center; gap: clamp(7px, 1.2vw, 17px); min-width: 0; min-height: 71px; }
.dashboard-nav-link { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 7px; color: #394064; font-size: .85rem; font-weight: 700; white-space: nowrap; transition: color .15s ease; }
.dashboard-nav-icon { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dashboard-nav-link:hover, .dashboard-nav-link.is-active { color: var(--violet-deep); }
.dashboard-nav-link.is-active::after { position: absolute; right: 7px; bottom: 13px; left: 7px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--violet-deep), var(--violet-bright)); content: ""; }
.topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; min-width: 0; }
.topbar-actions form { margin: 0; }
.topbar-user { display: block; max-width: 140px; padding: 6px 11px; overflow: hidden; border: 1px solid var(--border); border-radius: 999px; background: #fafaff; color: var(--ink); font-size: .78rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { min-height: 36px; padding: 6px 12px; border: 1px solid #b9a6ed; border-radius: 10px; background: #fff; color: var(--violet-deep); font-size: .8rem; font-weight: 750; white-space: nowrap; transition: background .15s ease, border-color .15s ease; }
.logout-button:hover { border-color: var(--violet); background: #f2edff; }
.dashboard-content { width: min(100%, calc(1320px + clamp(40px, 6vw, 84px))); max-width: none; margin: 0 auto; padding: 14px clamp(20px, 3vw, 42px) 44px; }
.dashboard-content [id] { scroll-margin-top: 92px; }
.page-intro { display: flex; justify-content: space-between; align-items: center; width: min(100%, 1320px); min-height: 64px; margin: 0 auto 14px; padding: 12px 18px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 7px 22px rgba(22, 31, 83, .06); }
.page-intro h1 { margin: 2px 0 4px; font-size: clamp(1.45rem, 2.1vw, 2rem); line-height: 1.3; }
.page-intro p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--violet-deep); font-size: .83rem; font-weight: 800; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat-card { position: relative; display: flex; flex-direction: column; min-height: 174px; padding: 16px 18px 12px; overflow: hidden; border-radius: 16px; color: #fff; box-shadow: 0 8px 26px rgba(27, 37, 92, .09); }
.stat-indigo { background: linear-gradient(135deg, #312e9f, #4438b3); }
.stat-violet { background: linear-gradient(135deg, #542de9, #6335e8); }
.stat-amethyst { background: linear-gradient(135deg, #6335e8, #7540ec); }
.stat-orchid { background: linear-gradient(135deg, #763eea, #8649f9); }
.stat-card-top { display: flex; justify-content: space-between; align-items: center; font-weight: 750; font-size: .87rem; }
.stat-symbol { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 29px; border-radius: 9px; background: rgba(255,255,255,.19); font-weight: 800; }
.stat-value { display: block; margin: 9px 0 1px; font-size: clamp(1.65rem, 2.4vw, 2.25rem); line-height: 1.15; font-weight: 800; text-align: right; direction: ltr; unicode-bidi: isolate; }
.stat-hint { margin: 0; color: #fff; font-size: .75rem; font-weight: 600; }
.sparkline { display: block; width: 100%; height: 28px; margin-top: auto; opacity: .86; }
.sparkline polyline { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 18px; margin-bottom: 18px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); box-shadow: 0 7px 28px rgba(22, 31, 83, .05); }
.panel-heading { padding: 17px 20px 13px; border-bottom: 1px solid var(--border); }
.panel-heading h1, .panel-heading h2 { margin: 0; font-size: 1.08rem; line-height: 1.35; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: .79rem; }
.panel-sales { position: relative; display: flex; flex-direction: column; min-height: 475px; }
.chart-scroll { width: 100%; margin-top: 27px; padding: 0 19px 6px; overflow-x: auto; }
.chart-layout { display: flex; align-items: start; min-width: 665px; }
.chart-scale { display: flex; flex: 0 0 55px; flex-direction: column; justify-content: space-between; height: 199px; padding: 0 0 0 5px; color: var(--muted); font-size: .62rem; text-align: left; direction: ltr; }
.sales-plot { display: flex; flex-direction: row-reverse; align-items: end; justify-content: space-around; gap: 6px; min-width: 600px; height: 242px; padding-top: 4px; border-bottom: 1px solid #aebbd5; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #e6ebf4 calc(25% - 1px), #e6ebf4 25%); }
.sales-month { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: end; min-width: 42px; height: 100%; }
.sales-bar-track { position: relative; display: flex; align-items: end; justify-content: center; width: 100%; height: 198px; }
.sales-bar { display: block; width: min(38%, 17px); min-height: 0; border-radius: 5px 5px 0 0; background: #6335e8; }
.sales-month-label { display: block; width: 50px; height: 43px; padding-top: 6px; color: var(--muted); font-size: .68rem; line-height: 1.12; text-align: center; }
.empty-chart { position: absolute; top: 45%; display: inline-block; align-self: center; padding: 7px 12px; border-radius: 9px; background: rgba(255,255,255,.92); color: var(--muted); font-size: .82rem; }
.sales-totals { display: flex; justify-content: space-between; gap: 20px; margin-top: auto; padding: 20px 24px 21px; }
.sales-totals div { display: grid; gap: 2px; }
.sales-totals strong { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.sales-totals small { font-size: .76rem; }
.sales-totals span { color: var(--muted); font-size: .79rem; }
.sales-totals div:first-child span { color: #312e9f; }
.sales-totals div:last-child span { color: #6335e8; }
.panel-regions { min-height: 475px; }
.region-map { display: flex; justify-content: center; align-items: center; height: 250px; padding: 11px 20px 0; }
.region-map img { width: min(100%, 355px); max-height: 245px; object-fit: contain; }
.map-disclaimer { margin: -5px 22px 10px; color: var(--muted); font-size: .71rem; text-align: center; }
.map-disclaimer a { color: var(--violet-deep); text-decoration: underline; text-underline-offset: 2px; }
.region-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 16px; padding: 0 22px 20px; margin: 0; list-style: none; }
.region-list li { display: flex; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px solid #e9edf5; font-size: .78rem; }
.region-list strong { color: var(--violet-deep); }
.region-list .empty-list { grid-column: 1 / -1; text-align: center; }

.lower-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.list-panel { min-height: 230px; }
.simple-list { padding: 3px 20px 16px; margin: 0; list-style: none; }
.simple-list li { display: flex; align-items: center; gap: 12px; min-height: 63px; padding: 9px 0; border-bottom: 1px solid #edf1f7; }
.simple-list li:last-child { border-bottom: 0; }
.simple-list li > div { display: grid; min-width: 0; }
.simple-list strong { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.simple-list small { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.list-avatar { display: inline-flex; flex: 0 0 36px; justify-content: center; align-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: 750; }
.list-avatar-soft { background: #ece5ff; color: var(--violet-deep); }
.list-avatar-blue { background: #eeeaff; color: #312e9f; }
.empty-list, .empty-block { color: var(--muted); font-size: .83rem; }
.simple-list .empty-list { justify-content: center; min-height: 115px; text-align: center; }

.customer-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.customer-stat { display: flex; align-items: center; gap: 14px; min-height: 116px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 7px 25px rgba(22,31,83,.04); }
.customer-stat-icon { display: inline-flex; flex: 0 0 40px; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 13px; background: #eeeaff; color: var(--violet-deep); font-size: 1.35rem; }
.customer-stat > div { display: grid; gap: 1px; min-width: 0; }
.customer-stat span:not(.customer-stat-icon) { color: var(--muted); font-size: .78rem; }
.customer-stat strong { font-size: 1.6rem; font-weight: 800; white-space: nowrap; }
.customer-stat .renewal-value { font-size: .94rem; }
.customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.customer-panel { min-height: 250px; }
.service-list, .invoice-list { padding: 0 20px 14px; }
.service-row, .invoice-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 75px; padding: 12px 0; border-bottom: 1px solid #edf1f7; }
.service-row:last-child, .invoice-row:last-child { border-bottom: 0; }
.service-row > div:first-child, .invoice-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.service-row strong, .invoice-row strong { font-size: .85rem; }
.service-row .latin-text { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.service-meta, .invoice-meta { display: grid; gap: 5px; justify-items: end; flex: 0 0 auto; }
.service-meta small, .invoice-row small { color: var(--muted); font-size: .73rem; }
.status-badge { display: inline-flex; align-items: center; width: fit-content; min-height: 25px; padding: 3px 9px; border-radius: 999px; background: #eef0f7; color: #394064; font-size: .72rem; font-weight: 750; }
.status-positive { background: #e9e2ff; color: #312e9f; }
.status-neutral { background: #eef0f7; color: #394064; }
.empty-block { padding: 33px 16px; margin: 0; text-align: center; }
.hosting-panel { padding-bottom: 16px; }
.server-card { margin: 16px 20px 0; padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcff; }
.server-card-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.server-card-head > div { display: grid; gap: 2px; }
.server-card-head strong { font-size: .98rem; }
.server-card-head small { color: var(--muted); font-size: .77rem; }
.server-details { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 17px 0; }
.server-details div { min-width: 0; }
.server-details dt { color: var(--muted); font-size: .72rem; }
.server-details dd { overflow: hidden; margin: 2px 0 0; font-size: .84rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.server-details dd.latin-text { text-align: right; }
.server-details dd.capacity-number { text-align: right; unicode-bidi: isolate; }
.server-details dd.hardware-number[dir="ltr"] { text-align: right; unicode-bidi: isolate; }
.server-details dd.metric-date[dir="ltr"] { text-align: right; unicode-bidi: isolate; }
.server-capacity { display: grid; gap: 6px; margin: 13px 0 17px; }
.server-capacity label { color: var(--muted); font-size: .76rem; }
.server-capacity progress { width: 100%; height: 9px; border: 0; border-radius: 999px; overflow: hidden; accent-color: var(--violet); }
.server-capacity progress::-webkit-progress-bar { background: #e7eaf5; border-radius: 999px; }
.server-capacity progress::-webkit-progress-value { background: var(--violet); border-radius: 999px; }
.server-capacity progress::-moz-progress-bar { background: var(--violet); border-radius: 999px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.metric-grid div { display: grid; gap: 4px; min-width: 0; padding: 11px 13px; border-radius: 10px; background: #f0f2fb; }
.metric-grid span { color: var(--muted); font-size: .72rem; }
.metric-grid strong { font-size: .82rem; }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 30px 16px; background: radial-gradient(circle at 15% 20%, #f0ebff, transparent 30%), radial-gradient(circle at 85% 85%, #e9efff, transparent 30%), #f8f9fe; }
.login-card { width: min(100%, 440px); padding: 19px 34px 31px; border: 1px solid var(--border); border-radius: 20px; background: #fff; box-shadow: 0 25px 70px rgba(38,36,118,.09); }
.login-brand { display: flex; justify-content: center; margin: -14px 0 -24px; }
.login-brand img { width: min(100%, 380px); height: auto; aspect-ratio: 3 / 1; object-fit: contain; direction: ltr; }
.login-intro h1 { margin: 3px 0 5px; font-size: 1.55rem; }
.login-intro p { margin: 0 0 19px; color: var(--muted); font-size: .87rem; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 4px; font-size: .84rem; font-weight: 750; }
.login-form input { width: 100%; height: 47px; padding: 9px 13px; border: 1px solid #b9c4dd; border-radius: 11px; background: #fff; color: var(--ink); direction: ltr; text-align: left; }
.login-form input:focus { border-color: var(--violet); outline: 3px solid #e8ddff; }
.primary-button { min-height: 47px; margin-top: 14px; border: 0; border-radius: 11px; background: linear-gradient(105deg, var(--violet-deep), var(--violet), var(--violet-bright)); color: #fff; font-weight: 750; box-shadow: 0 8px 19px rgba(99,53,232,.18); }
.primary-button:hover { filter: brightness(.95); }
.login-footnote { margin: 19px 0 0; color: var(--muted); font-size: .76rem; text-align: center; }
.notice { padding: 10px 13px; border-radius: 10px; font-size: .81rem; }
.notice p { margin: 0 0 4px; }
.notice ul { padding-right: 19px; margin: 4px 0 0; }
.notice-error { background: #fff1ef; color: #8b2d23; }
.notice-success { background: #e9e2ff; color: #312e9f; }
.notice-toast-container { position: fixed; z-index: 1000; top: 18px; left: 18px; display: grid; width: min(360px, calc(100vw - 36px)); gap: 10px; direction: rtl; }
.notice-toast-container .notice { position: relative; margin: 0; padding: 14px 48px 14px 16px; border: 1px solid transparent; border-radius: 14px; box-shadow: 0 16px 38px rgba(22, 30, 62, .18); line-height: 1.6; animation: notice-toast-enter .42s cubic-bezier(.22, 1, .36, 1) both; }
.notice-toast-container .notice-success { border-color: #cfc1ff; background: linear-gradient(135deg, #f4f1ff, #e7dfff); }
.notice-toast-container .notice-error { border-color: #ffc8c1; background: linear-gradient(135deg, #fff8f7, #ffebe8); }
.notice-toast-container .notice.is-closing { animation: notice-toast-leave .26s cubic-bezier(.55, 0, 1, .45) both; }
.notice-dismiss { position: absolute; top: 9px; right: 9px; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 8px; color: currentColor; background: transparent; cursor: pointer; transition: background-color .18s ease, transform .18s ease; }
.notice-dismiss:hover { background: rgba(49, 46, 159, .1); transform: scale(1.06); }
.notice-dismiss:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.notice-dismiss svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
@keyframes notice-toast-enter { from { opacity: 0; transform: translateX(-28px) scale(.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes notice-toast-leave { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(-28px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
    .notice-toast-container .notice, .notice-toast-container .notice.is-closing { animation-duration: .01ms; }
    .notice-dismiss { transition: none; }
}

@media (max-width: 1100px) {
    .dashboard-topbar { gap: 8px; padding-right: 18px; padding-left: 18px; }
    .brand-logo { flex-basis: 190px; width: 190px; height: auto; }
    .dashboard-nav { gap: 4px; }
    .dashboard-nav-link { padding-right: 5px; padding-left: 5px; font-size: .8rem; }
    .topbar-user { max-width: 105px; }
    .stat-grid, .customer-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .analytics-grid { grid-template-columns: minmax(0,1.15fr) minmax(285px,1fr); }
}

@media (max-width: 900px) {
    .dashboard-topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand actions" "nav nav"; gap: 0 10px; min-height: 0; padding: 6px 16px 7px; }
    .brand-link { grid-area: brand; }
    .brand-logo { flex-basis: 170px; width: 170px; height: auto; }
    .dashboard-nav { grid-area: nav; flex-wrap: wrap; justify-content: flex-start; gap: 2px 12px; min-height: 0; padding-top: 4px; border-top: 1px solid var(--border); }
    .dashboard-nav-link { min-height: 36px; padding: 5px 6px 8px; font-size: .79rem; }
    .dashboard-nav-link.is-active::after { right: 6px; bottom: 2px; left: 6px; height: 2px; }
    .topbar-actions { grid-area: actions; justify-self: end; }
}

@media (max-width: 760px) {
    .dashboard-content { padding: 14px 16px 36px; }
    .analytics-grid, .lower-grid, .customer-grid { grid-template-columns: 1fr; }
    .panel-sales, .panel-regions { min-height: 0; }
    .sales-plot { height: 242px; }
    .region-map { height: 220px; }
}

@media (max-width: 520px) {
    .topbar-user { max-width: min(30vw, 108px); }
    .topbar-actions { gap: 6px; }
    .logout-button { padding-right: 8px; padding-left: 8px; font-size: .76rem; }
    .page-intro h1 { font-size: 1.45rem; }
    .stat-grid, .customer-stat-grid { gap: 10px; }
    .stat-card { min-height: 151px; padding: 13px; }
    .stat-value { font-size: 1.4rem; }
    .stat-hint { font-size: .69rem; }
    .sparkline { height: 19px; }
    .customer-stat { gap: 8px; min-height: 101px; padding: 11px; }
    .customer-stat-icon { flex-basis: 33px; width: 33px; height: 33px; font-size: 1rem; }
    .customer-stat strong { font-size: 1.2rem; }
    .customer-stat .renewal-value { font-size: .75rem; white-space: normal; }
    .sales-totals { padding: 14px 18px 19px; }
    .sales-totals strong { font-size: 1.12rem; }
    .server-details, .metric-grid { grid-template-columns: 1fr; }
    .server-card { margin-right: 12px; margin-left: 12px; }
    .login-card { padding-right: 23px; padding-left: 23px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .dashboard-page::before, .dashboard-page::after, .dashboard-nav-link, .logout-button { transition: none; } }

/* Public hosting catalog */
.storefront-page { background: #fff; }
.storefront-container { width: min(100% - 44px, 1220px); margin-inline: auto; }
.storefront-header { position: relative; z-index: 5; border-bottom: 1px solid #edf0f8; background: rgba(255,255,255,.96); }
.storefront-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 85px; }
.storefront-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0; color: var(--violet-deep); font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 800; letter-spacing: -.06em; }
.storefront-brand img { display: block; width: 250px; height: auto; aspect-ratio: 3 / 1; object-fit: contain; }
.storefront-nav { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: clamp(13px, 2.5vw, 38px); }
.storefront-nav a { position: relative; display: inline-flex; align-items: center; min-height: 46px; color: #3d4370; font-size: .86rem; font-weight: 700; white-space: nowrap; }
.storefront-nav a:hover, .storefront-nav a[aria-current] { color: var(--violet-deep); }
.storefront-nav a[aria-current]::after { position: absolute; right: 0; bottom: 3px; left: 0; height: 3px; border-radius: 3px; background: var(--violet); content: ""; }
.storefront-account-link { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 42px; padding: 8px 19px; border: 1px solid #c9bcfc; border-radius: 11px; color: var(--violet-deep); background: #fff; font-size: .86rem; font-weight: 800; white-space: nowrap; }
.storefront-account-link:hover { background: #f3efff; }

.storefront-hero { overflow: hidden; background: radial-gradient(circle at 78% 44%, #eeeaff 0, transparent 34%), linear-gradient(180deg, #fff 0%, #fcfbff 100%); }
.storefront-hero-grid { display: grid; grid-template-columns: minmax(0,1.03fr) minmax(360px,.97fr); align-items: center; gap: clamp(25px, 4vw, 65px); min-height: 500px; padding-block: 54px 72px; }
.storefront-hero-copy { max-width: 620px; }
.storefront-eyebrow { display: inline-flex; align-items: center; gap: 9px; width: fit-content; margin: 0 0 17px; padding: 6px 15px; border-radius: 999px; color: var(--violet-deep); background: #f0ecff; font-size: .82rem; font-weight: 800; }
.storefront-eyebrow span { color: var(--violet); font-size: 1rem; }
.storefront-hero h1 { max-width: 620px; margin: 0 0 18px; font-size: clamp(2.8rem, 5vw, 5.1rem); line-height: 1.13; letter-spacing: -.035em; }
.storefront-hero h1 span { color: var(--violet); }
.storefront-lede { max-width: 545px; margin: 0; color: var(--muted); font-size: clamp(.99rem, 1.25vw, 1.12rem); line-height: 1.85; }
.storefront-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.storefront-primary-link, .storefront-secondary-link { display: inline-flex; align-items: center; justify-content: center; gap: 17px; min-height: 50px; padding: 10px 23px; border-radius: 12px; font-size: .89rem; font-weight: 800; }
.storefront-primary-link { color: #fff; background: linear-gradient(110deg, #312e9f, #6335e8); box-shadow: 0 9px 22px rgba(76, 47, 188, .18); }
.storefront-primary-link:hover { filter: brightness(1.08); }
.storefront-secondary-link { border: 1px solid #d8d5ed; color: var(--violet-deep); background: #fff; }
.storefront-secondary-link:hover { background: #f6f3ff; }
.storefront-hero-art { position: relative; display: grid; place-items: center; min-height: 370px; isolation: isolate; }
.storefront-art-glow { position: absolute; z-index: -1; width: min(90%, 420px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 25% 25%, #b79aff, #6335e8 50%, #312e9f 83%); opacity: .93; box-shadow: 0 36px 75px rgba(70,46,176,.17); }
.storefront-art-panel { width: min(82%, 365px); min-height: 280px; padding: 14px; border: 9px solid #fff; border-radius: 32px; background: #fff; box-shadow: 0 28px 55px rgba(32,29,102,.27); transform: rotate(-3deg); }
.storefront-art-bar { display: flex; align-items: center; gap: 7px; height: 39px; padding-inline: 12px; border-radius: 16px 16px 5px 5px; background: linear-gradient(110deg, #312e9f, #6335e8); }
.storefront-art-bar span { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.storefront-art-mark { display: flex; align-items: center; justify-content: center; gap: 16px; height: 160px; color: var(--violet-deep); font-size: 5.1rem; font-weight: 800; line-height: 1; direction: ltr; }
.storefront-art-mark span { color: var(--violet); }
.storefront-art-lines { display: grid; gap: 8px; padding: 0 24px; }
.storefront-art-lines span { height: 8px; border-radius: 999px; background: #e9e7fa; }
.storefront-art-lines span:nth-child(2) { width: 74%; }
.storefront-art-lines span:nth-child(3) { width: 52%; }
.storefront-art-chip { position: absolute; padding: 10px 14px; border: 1px solid #e7dcff; border-radius: 13px; color: var(--violet-deep); background: rgba(255,255,255,.95); box-shadow: 0 9px 28px rgba(38,34,135,.1); font-size: .81rem; font-weight: 800; }
.storefront-art-chip-one { top: 33px; right: 1%; transform: rotate(5deg); }
.storefront-art-chip-two { bottom: 38px; left: 0; transform: rotate(-5deg); }

.storefront-section { padding-block: 72px; }
.storefront-plans-section { background: #f8f9fe; }
.storefront-section-heading { margin-bottom: 28px; }
.storefront-kicker { margin: 0 0 7px; color: var(--violet); font-size: .84rem; font-weight: 800; }
.storefront-section h2 { margin: 0 0 9px; font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.3; }
.storefront-section-heading p:last-child, .storefront-details-grid > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.8; }
.storefront-demo-notice { max-width: 950px; margin: -8px 0 24px; padding: 14px 18px; border: 1px solid #d3c6ff; border-radius: 13px; color: var(--violet-deep); background: #f0ebff; font-size: .86rem; line-height: 1.75; }
.storefront-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 19px; }
.storefront-plan-card { display: flex; flex-direction: column; min-width: 0; min-height: 410px; padding: 22px; border: 1px solid #e4e5f0; border-radius: 18px; background: #fff; box-shadow: 0 9px 30px rgba(31,28,91,.045); }
.storefront-plan-header { display: flex; align-items: center; justify-content: space-between; min-height: 43px; }
.storefront-plan-icon { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; color: var(--violet-deep); background: #ede8ff; font-size: 1.25rem; }
.storefront-demo-badge { padding: 5px 10px; border-radius: 999px; color: #312e9f; background: #eee8ff; font-size: .72rem; font-weight: 800; }
.storefront-plan-card h3 { margin: 16px 0 3px; font-size: 1.25rem; }
.storefront-plan-description { min-height: 42px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.65; }
.storefront-plan-description > :first-child, .storefront-product-description > :first-child, .storefront-category-description > :first-child { margin-top: 0; }
.storefront-plan-description > :last-child, .storefront-product-description > :last-child, .storefront-category-description > :last-child { margin-bottom: 0; }
.storefront-price-block { margin-top: 17px; padding-bottom: 14px; border-bottom: 1px solid #eceef5; }
.storefront-price-label { color: var(--muted); font-size: .79rem; }
.storefront-price-block > div { display: flex; align-items: baseline; gap: 7px; color: var(--violet-deep); }
.storefront-price-block strong { font-size: 2.25rem; line-height: 1.18; }
.storefront-price-block > div span { font-size: .94rem; font-weight: 800; }
.storefront-price-block small { color: var(--muted); font-size: .72rem; }
.storefront-plan-specs { display: grid; gap: 0; margin: 13px 0 17px; }
.storefront-plan-specs > div { display: flex; justify-content: space-between; gap: 14px; padding-block: 8px; font-size: .81rem; }
.storefront-plan-specs dt { color: var(--muted); }
.storefront-plan-specs dd { margin: 0; color: var(--ink); font-weight: 800; text-align: left; white-space: nowrap; }
.storefront-yearly { display: flex; justify-content: space-between; gap: 14px; margin-top: auto; padding: 12px 13px; border-radius: 10px; background: #f6f4ff; font-size: .79rem; }
.storefront-yearly span { color: var(--muted); }
.storefront-yearly strong { color: var(--violet-deep); text-align: left; }
.storefront-empty-plans { grid-column: 1 / -1; padding: 45px 22px; border: 1px dashed #c6c5df; border-radius: 17px; background: #fff; text-align: center; }
.storefront-empty-plans > span { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; color: var(--violet); background: #f0ecff; font-size: 1.7rem; }
.storefront-empty-plans h3 { margin: 13px 0 5px; }
.storefront-empty-plans p { margin: 0; color: var(--muted); font-size: .86rem; }
.storefront-catalog-note { margin: 20px 0 0; color: var(--muted); font-size: .83rem; }
.storefront-details-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(25px, 5vw, 75px); align-items: start; }
.storefront-details-grid > div:first-child { max-width: 460px; }
.storefront-detail-list { display: grid; gap: 13px; }
.storefront-detail-list > div { display: flex; align-items: start; gap: 14px; padding: 16px 18px; border: 1px solid #e8eaf4; border-radius: 13px; background: #fff; box-shadow: 0 5px 19px rgba(24,25,84,.035); }
.storefront-detail-list > div > span { display: inline-grid; flex: 0 0 35px; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: var(--violet-deep); background: #efebff; font-size: .73rem; font-weight: 800; }
.storefront-detail-list h3 { margin: 0 0 3px; font-size: .96rem; }
.storefront-detail-list p { margin: 0; color: var(--muted); font-size: .8rem; }
.storefront-footer { border-top: 1px solid #ebeef7; background: #fafbff; }
.storefront-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; font-size: .82rem; }
.storefront-footer-brand { display: inline-flex; flex: 0 0 auto; align-items: center; }
.storefront-footer-brand img { display: block; width: 190px; height: auto; aspect-ratio: 3 / 1; object-fit: contain; }
.storefront-footer-inner p { margin: 0; color: var(--muted); }
.storefront-footer-inner a { color: var(--violet-deep); font-weight: 800; }

@media (max-width: 1020px) {
    .storefront-header-inner { gap: 12px; }
    .storefront-brand img { width: 210px; height: auto; }
    .storefront-brand { font-size: 1.16rem; }
    .storefront-nav { gap: 15px; }
    .storefront-hero-grid { grid-template-columns: minmax(0,1fr) minmax(300px,.85fr); }
    .storefront-plan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .storefront-header-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; padding-block: 5px; }
    .storefront-nav { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; gap: 5px 17px; border-top: 1px solid #edf0f8; }
    .storefront-nav a { min-height: 38px; font-size: .8rem; }
    .storefront-hero-grid { grid-template-columns: 1fr; gap: 4px; min-height: 0; padding-block: 47px 40px; }
    .storefront-hero-copy { max-width: 590px; }
    .storefront-hero-art { min-height: 310px; }
    .storefront-art-glow { width: min(65%, 330px); }
    .storefront-art-panel { width: min(70%, 305px); min-height: 240px; }
    .storefront-art-mark { height: 128px; font-size: 4rem; }
    .storefront-section { padding-block: 53px; }
    .storefront-details-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 560px) {
    .storefront-container { width: min(100% - 32px, 1220px); }
    .storefront-brand img { width: 180px; height: auto; }
    .storefront-account-link { min-height: 38px; padding: 7px 10px; font-size: .75rem; }
    .storefront-hero h1 { font-size: clamp(2.35rem, 10vw, 3.1rem); }
    .storefront-lede { font-size: .91rem; }
    .storefront-hero-actions { align-items: stretch; }
    .storefront-primary-link, .storefront-secondary-link { min-height: 45px; padding-inline: 13px; font-size: .78rem; }
    .storefront-hero-art { min-height: 240px; }
    .storefront-art-glow { width: min(67%, 225px); }
    .storefront-art-panel { width: min(72%, 230px); min-height: 178px; padding: 8px; border-width: 6px; border-radius: 22px; }
    .storefront-art-bar { height: 26px; }
    .storefront-art-mark { height: 98px; font-size: 3.1rem; }
    .storefront-art-lines { gap: 5px; }
    .storefront-art-lines span { height: 6px; }
    .storefront-art-chip { padding: 6px 9px; font-size: .66rem; }
    .storefront-art-chip-one { top: 11px; }
    .storefront-art-chip-two { bottom: 16px; }
    .storefront-plan-grid { grid-template-columns: 1fr; }
    .storefront-plan-card { min-height: 0; }
    .storefront-footer-inner { flex-wrap: wrap; justify-content: center; gap: 5px 17px; padding-block: 16px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .storefront-primary-link, .storefront-secondary-link, .storefront-account-link { transition: none; } }

/* Public product ordering */
.storefront-products-section { background: #fff; }
.storefront-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.storefront-product-card { display: flex; flex-direction: column; min-width: 0; min-height: 310px; padding: 22px; border: 1px solid #e4e5f0; border-radius: 18px; background: #fff; box-shadow: 0 9px 30px rgba(31, 28, 91, .045); }
.storefront-product-icon { display: inline-grid; width: 43px; height: 43px; place-items: center; border-radius: 11px; color: var(--violet-deep); background: #ede8ff; font-size: 1.35rem; font-weight: 900; }
.storefront-product-media { display: block; height: 150px; overflow: hidden; border-radius: 12px; background: #eef1f8; }
.storefront-product-media img { width: 100%; height: 100%; object-fit: cover; }
.storefront-product-details { margin-top: 12px; color: var(--violet-deep); font-size: .78rem; font-weight: 800; }
.storefront-product-card h3 { margin: 16px 0 4px; font-size: 1.18rem; }
.storefront-product-card > p { min-height: 43px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.65; }
.storefront-product-price { margin-top: 17px; color: var(--violet-deep); font-size: .93rem; font-weight: 800; }
.storefront-product-price strong { font-size: 1.75rem; }
.storefront-order-form { display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: end; gap: 7px 10px; margin-top: auto; padding-top: 17px; }
.storefront-order-form label { grid-column: 1 / -1; color: var(--muted); font-size: .76rem; font-weight: 800; }
.storefront-order-form input { width: 100%; min-height: 43px; padding: 8px 10px; border: 1px solid #b9c4dd; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; text-align: center; }
.storefront-order-form button, .storefront-product-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 8px 13px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(110deg, #312e9f, #6335e8); font: inherit; font-size: .79rem; font-weight: 800; white-space: nowrap; }
.storefront-order-form button { grid-column: 1 / -1; cursor: pointer; }
.storefront-order-form button:hover, .storefront-product-link:hover { filter: brightness(1.08); }
.storefront-product-link { width: 100%; margin-top: auto; }
.storefront-product-unavailable { display: block; margin-top: auto; padding-top: 17px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.storefront-product-group + .storefront-product-group { margin-top: 42px; }
.storefront-product-group-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.storefront-product-group-heading h3 { margin: 0; color: var(--ink); font-size: 1.22rem; }
.storefront-category-description { margin: 5px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.storefront-product-group-heading > a { display: inline-flex; min-height: 38px; align-items: center; padding: 7px 11px; border: 1px solid #cfc6ed; border-radius: 10px; color: var(--violet-deep); background: #f7f4ff; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.storefront-product-group-heading > a:hover { border-color: #a895e4; background: #eee8ff; }
.product-category-section { min-height: calc(100vh - 95px); }
.product-category-section .storefront-section-heading h1 { margin: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.4rem); }
.product-category-section .storefront-section-heading p { max-width: 680px; }
.customer-orders-panel { margin-top: 18px; }
html[data-theme="dark"] .storefront-products-section { background: #10111e; }
html[data-theme="dark"] .storefront-product-card { border-color: var(--border); background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .16); }
html[data-theme="dark"] .storefront-product-icon { color: #d8ceff; background: #34304f; }
html[data-theme="dark"] .storefront-order-form input { border-color: #454963; color: var(--ink); background: #222437; }

@media (max-width: 1020px) {
    .storefront-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .storefront-product-grid { grid-template-columns: 1fr; }
    .storefront-product-card { min-height: 0; }
    .storefront-product-group + .storefront-product-group { margin-top: 30px; }
    .storefront-product-group-heading { align-items: start; flex-direction: column; gap: 10px; }
}

/* Public maintenance page */
.site-maintenance-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 12%, #eee9ff 0, transparent 33%), radial-gradient(circle at 88% 88%, #e4efff 0, transparent 34%), #f7f9fe; }
.site-maintenance-shell { width: min(100%, 620px); }
.site-maintenance-card { display: grid; justify-items: center; gap: 18px; padding: clamp(34px, 7vw, 64px) clamp(24px, 7vw, 70px); border: 1px solid #e1e5f2; border-radius: 26px; background: rgba(255, 255, 255, .9); box-shadow: 0 24px 70px rgba(31, 36, 91, .12); text-align: center; backdrop-filter: blur(14px); }
.site-maintenance-brand { display: inline-flex; align-items: center; justify-content: center; }
.site-maintenance-brand img { display: block; width: min(100%, 280px); height: auto; aspect-ratio: 3 / 1; object-fit: contain; }
.site-maintenance-icon { display: inline-grid; width: 68px; height: 68px; place-items: center; border-radius: 21px; color: #5535de; background: #eeeaff; }
.site-maintenance-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.site-maintenance-card h1 { margin: 2px 0 0; color: #17174a; font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.3; }
.site-maintenance-card p { margin: 0; color: #58617f; font-size: .98rem; line-height: 1.8; }
@media (max-width: 520px) { .site-maintenance-page { padding: 15px; } .site-maintenance-card { border-radius: 20px; } .site-maintenance-brand img { width: min(100%, 240px); } }
