:root {
  color-scheme: dark;
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  color: #eff5ff;
  background: #080d15;
  --canvas: #080d15;
  --panel: #0d1623;
  --panel-raised: #111d2d;
  --line: #203149;
  --line-soft: #1a293b;
  --muted: #a3b2c9;
  --subtle: #8598b4;
  --blue: #76baff;
  --blue-bright: #2587ed;
  --blue-border: #2a5582;
  --radius: 15px;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 300px; min-height: 100vh; margin: 0; font-size: 14px; line-height: 1.65; }
button, input, select { font: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
a, button, input, select { touch-action: manipulation; }
:is(a, button, input, select):focus-visible { outline: 2px solid #91ccff; outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .58; }
img { display: block; max-width: 100%; }
svg { display: inline-block; inline-size: 1em; block-size: 1em; vertical-align: -.15em; flex: 0 0 auto; }
[hidden] { display: none !important; }
::selection { color: #fff; background: #235e9b; }

.topbar { position: relative; z-index: 2; border-bottom: 1px solid var(--line-soft); background: #0b121d; }
.topbar-inner {
  max-width: 1440px;
  min-height: 66px;
  margin-inline: auto;
  padding-inline: 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 10px; white-space: nowrap; font-size: 22px; font-weight: 780; line-height: 1; }
.brand-icon {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  overflow: hidden;
  border: 1px solid #3777b1;
  border-radius: 10px;
  color: #f2f8ff;
  background: linear-gradient(150deg, #24578a, #0e3159);
}
.brand-icon img, .sidebar-brand img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.main-nav, .top-actions { display: flex; align-items: center; gap: 8px; }
.main-nav a { min-height: 38px; padding: 7px 13px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current], .main-nav a.active { color: #e6f2ff; background: #142940; }
.top-actions { justify-content: end; gap: 10px; }
.language, .account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101b2a;
  color: #e5eefc;
  white-space: nowrap;
  cursor: pointer;
}
.language { color: #a9c6e5; font-size: 12px; font-weight: 700; }
.account-btn:hover, .language:hover { border-color: var(--blue-border); background: #162944; }
.account-mark { display: grid; place-items: center; inline-size: 25px; block-size: 25px; border-radius: 50%; color: #a9d8ff; background: #1a3e63; font-size: 12px; font-weight: 800; }

.preview-bar { border-bottom: 1px solid #1c3651; background: #0b2034; color: #b8d8f7; }
.preview-content { max-width: 1440px; min-height: 37px; margin-inline: auto; padding: 5px 32px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
.preview-content svg { color: #7abeff; }
.preview-content a { text-decoration: underline; text-underline-offset: 3px; }

.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  max-width: 1400px;
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  padding: 28px 28px 36px;
  gap: 28px;
}
.sidebar {
  min-width: 0;
  min-height: 520px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  align-self: stretch;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #0b1420;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 2px 4px 13px; border-bottom: 1px solid var(--line-soft); font-weight: 700; }
.sidebar-brand img { inline-size: 34px; block-size: 34px; border-radius: 9px; }
.sidebar-brand small { display: block; color: var(--subtle); font-size: 11px; font-weight: 500; }
.sidebar-nav { display: grid; gap: 5px; min-width: 0; }
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 11px;
  text-align: start;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.side-link svg { color: #82a5c9; font-size: 17px; }
.side-link:hover { color: #f1f6ff; background: #122238; }
.side-link:is([aria-current], [aria-selected="true"], .active, .is-active) { color: #ecf6ff; border-color: #24496f; background: #122842; font-weight: 700; }
.side-link:is([aria-current], [aria-selected="true"], .active, .is-active) svg { color: #68b6ff; }
.sidebar-help { margin-block-start: auto; padding: 13px 9px 1px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.sidebar-help a { color: #c6e5ff; }
.sidebar-help a:hover { text-decoration: underline; }

.main-content { display: grid; align-content: start; gap: 18px; min-width: 0; width: 100%; max-width: 1030px; }
.page-intro { padding-block: 0 2px; }
.eyebrow { color: #83baf0; font-size: 12px; font-weight: 750; }
.page-title { margin-block: 1px 4px; color: #f6f9ff; font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.3; }
.page-description { color: var(--muted); font-size: 14px; line-height: 1.55; }

.welcome {
  min-height: 202px;
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: 1fr .93fr;
  overflow: hidden;
  border: 1px solid #264867;
  border-radius: 17px;
  background: radial-gradient(ellipse at 52% 115%, #143950 0, transparent 64%), linear-gradient(125deg, #0c1a2a, #122b45 100%);
}
.welcome-copy { z-index: 1; display: grid; align-content: center; justify-items: start; gap: 7px; min-width: 0; padding: 23px 28px; }
.welcome-copy h2 { color: #f6faff; font-size: clamp(23px, 2.5vw, 31px); font-weight: 780; line-height: 1.35; }
.welcome-copy p { max-width: 47ch; color: #b7cbe2; font-size: 14px; }
.welcome-copy .btn { margin-block-start: 6px; }
.welcome-visual { position: relative; display: block; min-width: 0; min-height: 100%; overflow: hidden; }
.welcome-visual picture, .welcome-visual > img, .welcome-visual picture img, img.welcome-visual { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.welcome-visual img, img.welcome-visual { object-fit: cover; object-position: center; }
.welcome-visual .vault-render { object-fit: contain; background: #060e1a; }
.welcome-visual:not(img)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to left, #10263b 0%, transparent 35%), linear-gradient(to top, #0b192b77, transparent 24%);
}
[dir="ltr"] .welcome-visual:not(img)::after { background: linear-gradient(to right, #10263b 0%, transparent 35%), linear-gradient(to top, #0b192b77, transparent 24%); }
img.welcome-visual { inset-inline-start: auto; inline-size: 49%; }
.vault-fallback { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.welcome-visual:has(img[src]:not([hidden])) .vault-fallback { display: none; }
.vault-base { position: absolute; inset: auto 12% 16% 12%; block-size: 38%; border: 1px solid #377ca454; border-radius: 50%; background: #0c2745; transform: perspective(300px) rotateX(56deg); box-shadow: 0 14px 40px #0a1424; }
.vault-card { display: grid; place-items: center; position: relative; inline-size: 44%; aspect-ratio: 1.62; border: 1px solid #528ac3; border-radius: 12px; color: #c9e8ff; background: linear-gradient(142deg, #235e94, #101f37 65%); box-shadow: 0 16px 26px #020713a0, inset 0 1px #bfddff45; font-size: 28px; font-weight: 780; transform: rotate(-12deg) translateY(-8%); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 77px;
  min-width: 0;
  padding: 11px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel);
}
.stat-icon, .product-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  inline-size: 39px;
  block-size: 39px;
  overflow: hidden;
  border: 1px solid #28486b;
  border-radius: 10px;
  background: #122b47;
  color: #80c1ff;
  font-size: 18px;
}
.stat-copy { min-width: 0; color: var(--muted); line-height: 1.4; }
.stat-copy :is(strong, b, .stat-value) { display: block; color: #f1f6ff; font-size: 23px; font-weight: 800; line-height: 1.12; }
.stat-copy small { font-size: 12px; }

.surface, .detail-panel { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel); }
.surface-heading { min-height: 60px; padding: 11px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.surface-heading h2, .detail-panel h2 { color: #f3f7ff; font-size: 19px; font-weight: 760; line-height: 1.35; }
.surface-heading p, .detail-panel p { color: var(--muted); font-size: 13px; }
.filters { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 9px; background: #0a1320; }
.filter {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.filter:hover { color: #f3f7ff; }
.filter:is(.active, .is-active, [aria-pressed="true"], [aria-selected="true"]) { border-color: #2d4f74; background: #16304b; color: #dceeff; }
.table-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: #314a65 #111b29; }
.orders-table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: start; font-size: 13px; }
.orders-table th, .orders-table td { padding: 8px 15px; text-align: start; vertical-align: middle; white-space: nowrap; }
.orders-table th:first-child, .orders-table td:first-child { padding-inline-start: 18px; }
.orders-table th:last-child, .orders-table td:last-child { padding-inline-end: 18px; }
.orders-table thead { color: #a2b9d4; background: #101e2e; }
.orders-table th { font-size: 12px; font-weight: 700; }
.orders-table tbody tr { border-top: 1px solid var(--line-soft); }
.orders-table tbody tr:hover { background: #0f1d2c; }
.orders-table td { block-size: 62px; color: #cbd7e9; }
@media (max-width: 700px) {
  .orders-table { min-width: 0; }
  .orders-table th, .orders-table td { padding: 8px; }
  .orders-table th:nth-child(2), .orders-table td:nth-child(2),
  .orders-table th:nth-child(3), .orders-table td:nth-child(3),
  .download-table th:nth-child(4), .download-table td:nth-child(4) { display: none; }
  .orders-table th:first-child, .orders-table td:first-child { padding-inline-start: 12px; white-space: normal; overflow-wrap: anywhere; }
  .orders-table th:last-child, .orders-table td:last-child { padding-inline-end: 12px; }
  .orders-table .product-cell { gap: 6px; }
}
.product-cell { display: flex; align-items: center; gap: 10px; }
.product-icon { inline-size: 34px; block-size: 34px; border-radius: 8px; font-size: 16px; }
.product-icon img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.order-name { display: block; color: #edf3fe; font-size: 13px; font-weight: 730; }
.order-meta { display: block; color: var(--subtle); font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 720; }
.status::before { content: ""; inline-size: 5px; block-size: 5px; border-radius: 50%; background: currentColor; }
.status-paid, .status-approved { border-color: #245442; background: #112820; color: #86d9b2; }
.status-pending, .status-review { border-color: #594822; background: #2b2416; color: #ecc779; }
.status-rejected, .status-failed { border-color: #663641; background: #301d27; color: #f1a2aa; }
.row-action { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 5px 1px; background: transparent; color: #9fccff; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.row-action:hover { color: #e4f2ff; text-decoration: underline; text-underline-offset: 3px; }

.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 18px 18px; }
.product-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #101b2a; }
.product-thumb { display: block; inline-size: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #142f4c; object-fit: cover; }
.product-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.product-info { display: grid; align-content: start; justify-items: start; gap: 7px; padding: 13px; }
.product-info h3 { font-size: 16px; line-height: 1.4; }
.product-info p { color: var(--muted); font-size: 13px; }

.detail-panel { display: grid; gap: 13px; padding: 18px; }
.detail-product { display: flex; align-items: center; gap: 11px; }
.file-row, .update-box { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #111e2f; }
.update-box-available { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-color: #765521; background: #2b2214; }
.update-box-available p { color: #e8ce94; }
.surface > .update-box { margin: 0 16px 16px; }
.customer-portal { background: var(--canvas); }
.file-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.file-meta { overflow-wrap: anywhere; }
.file-meta small { display: block; color: var(--muted); }
.timeline { display: grid; gap: 9px; padding-inline-start: 20px; color: var(--muted); }
.timeline li::marker { color: var(--blue); }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 37px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 740;
  line-height: 1.45;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.btn-primary { border-color: #4198ef; background: #2076cd; color: #fff; box-shadow: inset 0 1px #9acaff44; }
.btn-primary:hover:not(:disabled) { background: #1766b7; border-color: #70b9ff; }
.btn-secondary { border-color: #31547a; background: #15304e; color: #deefff; }
.btn-secondary:hover:not(:disabled) { background: #1e4267; }
.btn-quiet { color: #afc5df; }
.btn-quiet:hover:not(:disabled) { color: #ecf6ff; background: #12243a; }

.modal {
  width: min(510px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid #365375;
  border-radius: 17px;
  color: #eff5ff;
  background: #101b2a;
  box-shadow: 0 24px 100px #0009;
}
.modal::backdrop { background: #020710c9; backdrop-filter: blur(3px); }
.modal-head, .modal-body, .modal-actions { padding: 16px 18px; }
.modal-head, .modal-actions { display: flex; align-items: center; gap: 10px; }
.modal-head { border-bottom: 1px solid var(--line); justify-content: space-between; }
.modal-head h2 { font-size: 21px; line-height: 1.4; }
.modal-body { display: grid; gap: 13px; }
.modal-body p { color: var(--muted); }
.modal-actions { border-top: 1px solid var(--line); justify-content: end; flex-wrap: wrap; }
.icon-btn { display: inline-grid; place-items: center; min-width: 33px; min-height: 33px; border: 1px solid var(--line); border-radius: 7px; color: #b6cbe1; background: #172538; cursor: pointer; }
.icon-btn:hover { color: #fff; border-color: var(--blue-border); }
.field { display: grid; gap: 5px; color: #dce8f5; }
.field :is(input, select) { min-width: 0; width: 100%; padding: 7px 10px; border: 1px solid #355577; border-radius: 7px; background: #0d1726; color: #f0f6ff; }
.demo-note, .portal-notice { padding: 10px 12px; border: 1px solid #305679; border-radius: 9px; color: #c1def8; background: #132c46; font-size: 13px; }
.empty-state { padding: 27px 18px; text-align: center; color: var(--muted); }
.site-footer { max-width: 1400px; margin-inline: auto; padding: 16px 28px 20px; border-top: 1px solid var(--line-soft); color: var(--subtle); font-size: 12px; }
.site-footer a:hover { color: #caf0ff; }

@media (max-width: 970px) {
  .workspace { grid-template-columns: 183px minmax(0, 1fr); gap: 16px; padding-inline: 16px; }
  .sidebar { padding: 11px; }
  .topbar-inner { padding-inline: 16px; gap: 12px; }
  .welcome-copy { padding-inline: 20px; }
  .stat { padding-inline: 11px; gap: 8px; }
}

@media (max-width: 720px) {
  .topbar-inner { min-height: 59px; grid-template-columns: 1fr auto; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; margin-block-start: -6px; padding-block-end: 7px; overflow-x: auto; }
  .top-actions { grid-row: 1; grid-column: 2; }
  .preview-content { padding-inline: 14px; text-align: center; }
  .workspace { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 14px 14px 26px; }
  .sidebar { min-height: 0; padding: 6px; gap: 0; overflow: hidden; }
  .sidebar-brand, .sidebar-help { display: none; }
  .sidebar-nav { display: flex; overflow-x: auto; }
  .side-link { min-height: 39px; padding-inline: 9px; font-size: 12px; }
  .side-link svg { font-size: 15px; }
  .main-content { gap: 13px; }
  .welcome { min-height: 172px; grid-template-columns: 1.2fr .8fr; }
  .welcome-copy { padding: 15px; }
  .welcome-copy p { font-size: 13px; }
  img.welcome-visual { inline-size: 41%; }
  .stats { gap: 6px; }
  .stat { min-height: 74px; padding: 6px; gap: 6px; }
  .stat-copy :is(strong, b, .stat-value) { font-size: 19px; }
  .stat-copy { font-size: 11px; }
  .stat-icon { inline-size: 30px; block-size: 30px; font-size: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .surface-heading { align-items: start; flex-wrap: wrap; }
}

@media (max-width: 390px) {
  .topbar-inner { padding-inline: 12px; }
  .workspace { padding-inline: 11px; }
  .welcome-copy { padding-inline: 11px; }
  .welcome { grid-template-columns: 1.5fr .6fr; }
  .stat { flex-direction: column; justify-content: center; align-items: start; padding: 7px; }
  .products { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
