/* ───────────────────────────────────────────────────────────────────────────
   Tamam Store admin — Shopify Polaris (public/css/polaris.css) inside a dark sidebar frame.
   Arabic RTL first: every rule uses logical properties so it mirrors for free.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --p-font-family-sans: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --nt-side-w: 240px;
  --nt-dark: #0b0b0b;
  --nt-good: #006300;
  --nt-bad: #c0322f;
}
html.nt-collapsed { --nt-side-w: 64px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--nt-dark); color: var(--p-color-text);
  font-family: var(--p-font-family-sans); font-size: var(--p-font-size-325); line-height: var(--p-font-line-height-500);
  -webkit-font-smoothing: antialiased;
}
.nt-admin h1, .nt-admin h2, .nt-admin h3, .nt-admin p, .nt-auth h1, .nt-auth p, .nt-invoice h1, .nt-invoice p { margin: 0; }
a { color: inherit; }
.nt-admin button, .nt-admin input, .nt-admin select, .nt-admin textarea, .nt-auth input { font-family: inherit; }
.nt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nt-muted { color: var(--p-color-text-secondary); }
.nt-sub { font-size: 12px; line-height: 16px; color: var(--p-color-text-secondary); margin-block-start: 2px; }
.nt-strong { font-weight: 600; }
.nt-nowrap { white-space: nowrap; }
.nt-center { text-align: center !important; }
.nt-slug { unicode-bidi: isolate; }
.nt-num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
summary .Polaris-Icon, .nt-person .Polaris-Icon { margin: 0; }
.nt-pre { white-space: pre-line; }
.nt-slug.nt-link, a.nt-slug { direction: ltr; display: inline-block; }
.nt-link { color: var(--p-color-text-link); text-decoration: none; }
.nt-link:hover { text-decoration: underline; }
.nt-ltr { direction: ltr; text-align: start; }
.nt-grow { flex: 1 1 200px; min-width: 0; }
.nt-w-sm { flex: 0 0 110px; }

/* ═════ Frame ═════ */
.nt-admin { min-height: 100vh; background: var(--nt-dark); }
.nt-topbar, .nt-backdrop { display: none; }
.nt-nav {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--nt-side-w); z-index: 30;
  background: var(--nt-dark); transition: width .2s ease;
}
.nt-main { min-height: 100vh; padding-block-start: 8px; padding-inline-start: var(--nt-side-w); transition: padding .2s ease; }
.nt-content {
  background: var(--p-color-bg); min-height: calc(100vh - 8px); overflow-x: clip;
  border-start-start-radius: 14px; /* the corner that touches the sidebar */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
}

@media (max-width: 47.9975em) {
  .nt-topbar {
    position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 25; height: 52px; padding-inline: 8px;
    display: flex; align-items: center; gap: 8px; background: var(--nt-dark);
  }
  .nt-topbar-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
  .nt-topbar-btn:hover { background: #1c1c1c; }
  .nt-topbar .Polaris-Icon svg { fill: #e3e3e3; }
  .nt-topbar-logo { text-decoration: none; }
  .nt-main { padding-inline-start: 0; padding-block-start: 52px; }
  .nt-content { min-height: calc(100vh - 52px); border-radius: 14px 14px 0 0; }
  .nt-nav { width: min(300px, 84vw); transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
  [dir="rtl"] .nt-nav { transform: translateX(100%); }
  .nt-admin.nt-nav-open .nt-nav { transform: none; }
  .nt-backdrop { position: fixed; inset: 0; z-index: 28; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s; display: block; }
  .nt-admin.nt-nav-open .nt-backdrop { opacity: 1; pointer-events: auto; }
  .nt-side-collapse { display: none !important; }
  .nt-side-close { display: grid !important; }
  .nt-side-search kbd { display: none; }
}
@media (min-width: 48em) { .nt-side-close { display: none !important; } }

/* ═════ Logo ═════ */
.nt-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.nt-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #d4ff3a; flex: none; }
.nt-logo-text { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.nt-logo-dark, .nt-logo-light .nt-logo { color: #0b0b0b; }

/* ═════ Dark sidebar (same look as the reference admin) ═════ */
.nt-side {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 10px 10px; background: var(--nt-dark); color: #e3e3e3; font-size: 13.5px;
}
.nt-side .Polaris-Icon { width: 20px; height: 20px; margin: 0; }
.nt-side .Polaris-Icon svg { fill: #b5b5b5; }
.nt-side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; min-height: 40px; gap: 6px; }
.nt-side-logo { text-decoration: none; display: block; }
.nt-side-collapse, .nt-side-close { background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.nt-side-close { display: none; }
.nt-side-collapse:hover, .nt-side-close:hover { background: #1f1f1f; }

.nt-side-search {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; margin-bottom: 6px;
  background: linear-gradient(180deg, #2c2c2c, #232323); border: 1px solid #3a3a3a; border-radius: 12px;
  color: #a8a8a8; font: inherit; cursor: pointer; text-align: start; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.nt-side-search:hover { border-color: #4a4a4a; color: #d0d0d0; }
.nt-side-search-label { flex: 1; }
.nt-side-search kbd { font: inherit; font-size: 12px; color: #8a8a8a; direction: ltr; }

.nt-side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nt-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nt-side-item {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px;
  color: #e3e3e3; text-decoration: none; font-weight: 550; border: 1px solid transparent; position: relative; cursor: pointer;
}
.nt-side-item:hover { background: #1c1c1c; color: #fff; }
.nt-side-item.active {
  background: linear-gradient(180deg, #2e2e2e, #262626); border-color: #383838; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .5);
}
.nt-side-item.active .Polaris-Icon svg { fill: #fff; }
.nt-side-icon { display: grid; place-items: center; flex: none; }
.nt-side-app { width: 24px; height: 24px; border-radius: 6px; background: #3a3a3a; margin-inline-start: -2px; }
.nt-side-app .Polaris-Icon { width: 16px; height: 16px; }
.nt-side-app .Polaris-Icon svg { fill: #f1f1f1; }
.nt-side-badge { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #3a3a3a; color: #f1f1f1; font-size: 11.5px; font-weight: 650; display: grid; place-items: center; }
.nt-side-item.has-action { padding: 0; }
.nt-side-item-link { display: flex; align-items: center; gap: 10px; flex: 1; height: 100%; padding: 0 10px; color: inherit; text-decoration: none; min-width: 0; }
.nt-side-eye { display: grid; place-items: center; padding: 6px; margin-inline-end: 4px; border-radius: 8px; opacity: 0; }
.nt-side-item:hover .nt-side-eye, .nt-side-eye:focus-visible { opacity: 1; }
.nt-side-eye:hover { background: #333; }
@media (hover: none) { .nt-side-eye { opacity: .7; } }

.nt-side-sub { list-style: none; margin: 2px 0 4px; padding: 0; padding-inline-start: 40px; display: grid; gap: 1px; position: relative; }
.nt-side-sub::before { content: ''; position: absolute; inset-inline-start: 20px; top: 2px; bottom: 10px; width: 1px; background: #333; }
.nt-side-subitem { display: block; padding: 6px 10px; border-radius: 8px; color: #a8a8a8; text-decoration: none; font-weight: 500; }
.nt-side-subitem:hover { background: #1c1c1c; color: #fff; }
.nt-side-subitem.active { color: #fff; font-weight: 650; background: #1f1f1f; }

.nt-side-section { display: flex; align-items: center; gap: 2px; padding: 18px 10px 6px; color: #9a9a9a; font-size: 13px; font-weight: 550; }

.nt-side-bottom { display: grid; gap: 6px; padding-top: 6px; }
.nt-side-store { display: flex; align-items: center; gap: 4px; }
.nt-usermenu { position: relative; flex: 1; min-width: 0; }
.nt-usermenu > summary { list-style: none; }
.nt-usermenu > summary::-webkit-details-marker { display: none; }
.nt-side-store-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: #f1f1f1; font: inherit; font-weight: 600; cursor: pointer; text-align: start; }
.nt-side-store-btn:hover, .nt-usermenu[open] > .nt-side-store-btn { background: #1c1c1c; }
.nt-side-avatar { flex: none; width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #8a5cf6, #6d3cd8); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nt-side-store-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-side-bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; cursor: pointer; flex: none; }
.nt-side-bell:hover { background: #1c1c1c; }
.nt-side-dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 7px; height: 7px; border-radius: 50%; background: #ff5c5c; }

.nt-menu-panel {
  position: absolute; z-index: 40; inset-block-end: calc(100% + 6px); inset-inline-start: 0; min-width: 230px;
  background: var(--p-color-bg-surface); color: var(--p-color-text); border-radius: 12px; padding: 6px;
  box-shadow: var(--p-shadow-400); border: 1px solid var(--p-color-border-secondary);
}
.nt-menu-title { padding: 8px 10px 6px; font-size: 12px; color: var(--p-color-text-secondary); direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; }
.nt-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--p-color-text); font: inherit; font-weight: 450; text-decoration: none; cursor: pointer; text-align: start;
}
.nt-menu-item:hover { background: var(--p-color-bg-surface-hover); }
.nt-menu-item .Polaris-Icon { width: 18px; height: 18px; margin: 0; }
.nt-menu-item .Polaris-Icon svg { fill: var(--p-color-icon); }

/* Collapsed (desktop): icons only */
@media (min-width: 48em) {
  html.nt-collapsed .nt-side { padding-inline: 8px; }
  html.nt-collapsed .nt-side-label-text, html.nt-collapsed .nt-side-section, html.nt-collapsed .nt-side-badge, html.nt-collapsed .nt-side-eye, html.nt-collapsed .nt-side-sub, html.nt-collapsed .nt-logo-text { display: none; }
  html.nt-collapsed .nt-side-head { flex-direction: column; gap: 8px; padding-inline: 0; }
  html.nt-collapsed .nt-side-item, html.nt-collapsed .nt-side-item-link, html.nt-collapsed .nt-side-search, html.nt-collapsed .nt-side-store-btn { justify-content: center; padding: 0; }
  html.nt-collapsed .nt-side-store { flex-direction: column; }
  html.nt-collapsed .nt-menu-panel { inset-inline-start: 0; }
}

/* ⌘K / Ctrl-K page jump */
dialog.nt-search { border: 0; border-radius: 16px; padding: 0; width: min(560px, 92vw); margin: 12vh auto auto; box-shadow: var(--p-shadow-600); color: var(--p-color-text); font-family: inherit; }
dialog.nt-search::backdrop { background: rgba(0, 0, 0, .4); }
.nt-search-input { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--p-color-border-secondary); }
.nt-search-input input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; background: none; color: var(--p-color-text); min-width: 0; }
.nt-search-results { max-height: 380px; overflow-y: auto; padding: 6px; }
.nt-search-row { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--p-color-text); text-align: start; text-decoration: none; cursor: pointer; }
.nt-search-row.active, .nt-search-row:hover { background: var(--p-color-bg-surface-hover); }
.nt-search-empty { padding: 20px; text-align: center; color: var(--p-color-text-secondary); }

/* ═════ RTL tweaks for Polaris parts that use physical properties ═════ */
[dir="rtl"] .Polaris-Page-Header__BreadcrumbWrapper .Polaris-Icon,
[dir="rtl"] .Polaris-Pagination .Polaris-Icon,
[dir="rtl"] .nt-side-collapse .Polaris-Icon { transform: scaleX(-1); }
[dir="rtl"] .Polaris-Badge__Icon { margin: calc(var(--p-space-050) * -1) calc(var(--p-space-200) * -1) calc(var(--p-space-050) * -1) 0; }
.Polaris-Page-Header__RightAlign { margin-left: 0; margin-inline-start: var(--p-space-400); }

/* ═════ Page ═════ */
.Polaris-Page { max-width: 62rem; }
.Polaris-Page.Polaris-Page--fullWidth { max-width: none; }
.Polaris-Page.Polaris-Page--narrowWidth { max-width: 40rem; }
.nt-page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.nt-page-actions form { margin: 0; }
.Polaris-Header-Title__TitleMetadataWrapper { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 0; margin-inline-start: 12px; vertical-align: middle; }
.Polaris-Header-Title__TitleWrapper { display: flex; align-items: center; flex-wrap: wrap; }
.Polaris-Page-Header__TitleWrapper { min-width: 0; }
.nt-page-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block-end: 48px; align-content: start; min-width: 0; }
.nt-page-body > * { min-width: 0; }
@media (max-width: 30.6em) {
  .nt-page-body { padding-inline: 12px; }
  .Polaris-Page-Header__Row { flex-wrap: wrap; gap: 8px; }
  .nt-page-actions { flex: 1 1 100%; justify-content: flex-start; margin-inline-start: 0; }
}
.nt-flash { animation: nt-fade .25s ease; }
@keyframes nt-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nt-banner .Polaris-Link { font-weight: 600; text-decoration: underline; }

/* ═════ Cards, stacks, grids ═════ */
.nt-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--p-space-300); padding: var(--p-space-400); min-width: 0; align-content: start;
  background: var(--p-color-bg-surface); border-radius: var(--p-border-radius-300); box-shadow: var(--p-shadow-bevel-100);
}
.nt-card--flush { padding: 0; gap: 0; overflow: hidden; }
.nt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nt-card--flush > .nt-card-head { padding: var(--p-space-400) var(--p-space-400) var(--p-space-200); }
.nt-card-actions { display: flex; gap: 8px; align-items: center; }
.nt-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.nt-grid { display: grid; gap: 16px; align-items: start; }
.nt-grid--main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 62em) { .nt-grid--main-side { grid-template-columns: minmax(0, 1fr); } }
.nt-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nt-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nt-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e0f0ff; color: #00527c; font-weight: 650; font-size: 13px; }
.nt-address { font-style: normal; display: grid; gap: 2px; }
.nt-notes { white-space: pre-line; color: var(--p-color-text-secondary); }
.nt-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nt-btn-row form { margin: 0; }
.nt-progress { height: 6px; border-radius: 6px; background: var(--p-color-bg-fill-secondary); overflow: hidden; }
.nt-progress > span { display: block; height: 100%; border-radius: 6px; background: var(--p-color-bg-fill-brand, #303030); }
.nt-savebar { position: sticky; inset-block-end: 12px; }

/* Collapsible "new …" card */
.nt-add { padding: 0; gap: 0; overflow: hidden; }
.nt-add-summary { display: flex; align-items: center; gap: 10px; padding: var(--p-space-400); cursor: pointer; list-style: none; }
.nt-add-summary::-webkit-details-marker { display: none; }
.nt-add-summary .Polaris-Icon { flex: none; }
.nt-add-summary .Polaris-Text--subdued { margin-inline-start: auto; }
.nt-add[open] .nt-add-summary { border-block-end: 1px solid var(--p-color-border-secondary); }
.nt-form { display: grid; gap: 16px; padding: var(--p-space-400); }

/* ═════ Forms ═════ */
.nt-field { min-width: 0; }
.nt-form-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nt-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nt-form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 62em) { .nt-form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) { .nt-form-grid, .nt-form-grid--2, .nt-form-grid--4 { grid-template-columns: minmax(0, 1fr); } }
.nt-form-actions { display: flex; gap: 8px; justify-content: flex-start; }
.nt-inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.nt-inline-form .nt-field { width: 100%; }
.nt-inline-btn { display: flex; }
.nt-searchbar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-block-end: 1px solid var(--p-color-border-secondary); margin: 0; }
.Polaris-Labelled__LabelWrapper { padding-block-end: var(--p-space-100); }
.Polaris-Labelled__HelpText { margin-block-start: var(--p-space-100); }
.Polaris-Labelled__Error { margin-block-start: var(--p-space-100); }
.Polaris-TextField__Prefix { margin-left: 0; margin-inline-end: var(--p-space-100); }
.Polaris-TextField__Suffix { margin-left: 0; margin-inline-start: var(--p-space-100); }
.Polaris-Select__Input { padding-inline: 12px 8px; }
textarea.Polaris-TextField__Input { resize: vertical; min-height: 5rem; }
.Polaris-InlineError__Icon { margin-left: 0; margin-inline-end: var(--p-space-100); }
input.Polaris-TextField__Input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input.Polaris-TextField__Input[type="number"]::-webkit-outer-spin-button, input.Polaris-TextField__Input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nt-file { font: inherit; font-size: 13px; max-width: 100%; }
.nt-file::file-selector-button { margin-inline-end: 10px; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--p-color-bg-fill-secondary); font: inherit; font-weight: 550; cursor: pointer; }
.nt-upload { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; padding: 12px; border: 1px dashed var(--p-color-border); border-radius: 12px; }
.nt-upload .Polaris-Text--subdued { flex: 1 1 200px; }
.nt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.nt-gallery-item { position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--p-color-border-secondary); background: var(--p-color-bg-surface-secondary); aspect-ratio: 1; }
.nt-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-gallery-del { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .92); cursor: pointer; box-shadow: var(--p-shadow-200); }
.nt-gallery-del:hover { background: #fff; }
.nt-gallery-del .Polaris-Icon { width: 16px; height: 16px; }
.nt-gallery-del .Polaris-Icon svg { fill: var(--p-color-icon-critical, #8e0b21); }

/* ═════ Tables (IndexTable look) ═════ */
.nt-table-wrap { overflow-x: auto; position: relative; }
.nt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nt-table th {
  padding: 8px 16px; text-align: start; font-weight: 550; font-size: 12.5px; color: var(--p-color-text-secondary); white-space: nowrap;
  background: var(--p-color-bg-surface-secondary); border-block: 1px solid var(--p-color-border-secondary);
}
.nt-table td { padding: 12px 16px; border-block-end: 1px solid var(--p-color-border-secondary); vertical-align: middle; }
.nt-table tbody tr:last-child td { border-block-end: 0; }
.nt-table tbody tr:hover { background: var(--p-color-bg-surface-hover); }
.nt-table--rows tbody tr[data-href] { cursor: pointer; }
.nt-table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-table tfoot td, .nt-table tfoot th { padding: 10px 16px; border-block-start: 1px solid var(--p-color-border-secondary); text-align: start; background: none; border-block-end: 0; font-size: 13px; color: var(--p-color-text); }
.nt-table tfoot .num { text-align: end; }
.nt-table tfoot .nt-total th { font-size: 14px; font-weight: 650; }
.nt-th-thumb, .nt-td-thumb { width: 1%; padding-inline-end: 0 !important; }
.nt-th-actions { width: 1%; }
.nt-td-actions { white-space: nowrap; }
.nt-td-actions > * { display: inline-block; vertical-align: middle; margin: 0; }
.nt-td-input { width: 220px; max-width: 220px; }
.nt-thumb {
  display: inline-grid; place-items: center; flex: none; overflow: hidden; vertical-align: middle;
  background: var(--p-color-bg-surface-secondary); border: var(--p-border-width-025) solid var(--p-color-border); border-radius: var(--p-border-radius-200);
}
.nt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-thumb .Polaris-Icon { width: 20px; height: 20px; }
.nt-thumb .Polaris-Icon svg { fill: var(--p-color-icon-secondary); }

.nt-row-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.nt-row-form .nt-field { min-width: 120px; flex: 1 1 130px; }
.nt-table .Polaris-Button { white-space: nowrap; }
.nt-table td.nt-nowrap, .nt-table td .nt-nowrap { white-space: nowrap; }
.nt-row-form .nt-field:has(.nt-days) { min-width: 0; width: 76px; }
.nt-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.nt-row-actions form { margin: 0; }
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-block-start: 1px solid var(--p-color-border-secondary); flex-wrap: wrap; }
.nt-list-row form { margin: 0; }
.nt-list-meta { white-space: nowrap; }

/* Tabs (filter chips above a list) */
.nt-tabs { display: flex; gap: 4px; padding: 8px 12px; border-block-end: 1px solid var(--p-color-border-secondary); overflow-x: auto; scrollbar-width: none; }
.nt-tab { padding: 5px 12px; border-radius: 8px; color: var(--p-color-text-secondary); font-weight: 550; font-size: 13px; text-decoration: none; white-space: nowrap; }
.nt-tab:hover { background: var(--p-color-bg-surface-hover); color: var(--p-color-text); }
.nt-tab.is-active { background: var(--p-color-bg-fill-secondary); color: var(--p-color-text); }

.nt-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 16px; text-align: center; }
.nt-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--p-color-bg-surface-secondary); margin-block-end: 4px; }
.nt-empty-icon .Polaris-Icon { width: 28px; height: 28px; }
.nt-empty-icon .Polaris-Icon svg { fill: var(--p-color-icon-secondary); }
.nt-empty-action { margin-block-start: 8px; }

.nt-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding-block-start: 4px; }

/* ═════ Metrics bar (dashboard) ═════ */
.nt-metrics {
  display: flex; align-items: stretch; background: var(--p-color-bg-surface); border-radius: var(--p-border-radius-300);
  box-shadow: var(--p-shadow-100); outline: var(--p-border-width-025) solid var(--p-color-border-secondary); outline-offset: calc(-1 * var(--p-border-width-025));
  overflow-x: auto; scrollbar-width: thin; min-width: 0;
}
.nt-metric { flex: 1 0 184px; min-width: 184px; padding: 12px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-decoration: none; color: inherit; }
.nt-metric:hover { background: var(--p-color-bg-surface-hover); }
.nt-metric + .nt-metric { border-inline-start: var(--p-border-width-025) solid var(--p-color-border-secondary); }
.nt-metric-title { align-self: flex-start; font-size: 13px; font-weight: 600; line-height: 18px; border-block-end: 2px dotted var(--p-color-border); white-space: nowrap; }
.nt-metric-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 30px; }
.nt-metric-figure { display: flex; align-items: baseline; gap: 6px; flex: none; }
.nt-metric-value { font-size: 20px; font-weight: 650; line-height: 28px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nt-metric-suffix { font-weight: 450; color: var(--p-color-text-secondary); font-size: 13px; }
.nt-metric-spark { flex: 0 1 96px; min-width: 36px; direction: ltr; line-height: 0; }
.nt-metric-spark svg { display: block; width: 100%; height: 28px; overflow: visible; }
.nt-mx-line { fill: none; stroke: #2a78d6; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.nt-mx-base { stroke: #e8e8e4; stroke-width: 1; shape-rendering: crispEdges; vector-effect: non-scaling-stroke; }
@media (max-width: 47.9975em) {
  .nt-metrics { border-radius: 0; box-shadow: none; outline: none; border-block: var(--p-border-width-025) solid var(--p-color-border-secondary); margin-inline: -12px; }
  .nt-metric { flex-basis: 164px; min-width: 164px; padding: 10px 12px; }
}

/* ═════ Auth pages ═════ */
.nt-auth-body { background: radial-gradient(1200px 500px at 50% -10%, #1d1d1d, var(--nt-dark) 70%); min-height: 100vh; }
.nt-auth { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 20px; padding: 32px 16px; }
.nt-auth-logo { text-decoration: none; }
.nt-auth-logo .nt-logo-text { font-size: 20px; }
.nt-auth-card {
  width: min(440px, 100%); display: grid; gap: 14px; padding: 28px; background: var(--p-color-bg-surface);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); color: var(--p-color-text);
}
.nt-auth-card h1 { margin-block-end: 2px; }
.nt-auth-foot { color: #a8a8a8; font-size: 13px; margin: 0; }
.nt-auth-foot a { color: #fff; font-weight: 600; }

/* ═════ Invoice (printable) ═════ */
.nt-invoice-body { margin: 0; background: #ececec; color: #1a1a1a; font-family: var(--p-font-family-sans); font-size: 14px; }
.nt-invoice-bar { max-width: 780px; margin: 0 auto; padding: 14px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nt-invoice-bar .nt-logo-light { text-decoration: none; }
.nt-invoice-bar .nt-logo { color: #0b0b0b; }
.nt-invoice { max-width: 780px; margin: 14px auto 40px; padding: 36px; background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); display: grid; gap: 18px; }
.nt-invoice .nt-logo { color: #0b0b0b; margin-block-end: 14px; }
.nt-invoice-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block-end: 18px; border-block-end: 2px solid #0b0b0b; }
.nt-invoice-issuer { text-align: end; display: grid; gap: 2px; align-content: start; justify-items: end; }
.nt-invoice-status { margin-block-start: 8px; }
.nt-invoice-table th { background: #f7f7f7; }
.nt-invoice-pay { padding: 14px 16px; border-radius: 12px; background: #f7f7f7; display: grid; gap: 4px; }
.nt-paid { color: var(--nt-good); font-weight: 700; }
.nt-invoice-foot { text-align: center; font-size: 12px; padding-block-start: 14px; border-block-start: 1px solid #e3e3e3; }
@media (max-width: 40em) { .nt-invoice { padding: 20px; margin-inline: 8px; } }
@media print {
  .noprint { display: none !important; }
  .nt-invoice-body { background: #fff; }
  .nt-invoice { box-shadow: none; margin: 0 auto; border-radius: 0; padding: 0; }
}

/* Super admin: collapsible "delete store" and the domain tool */
.nt-del { margin-top: 8px; }
.nt-del summary { cursor: pointer; color: var(--p-color-text-critical); font-size: 13px; width: fit-content; }
.nt-del[open] summary { margin-bottom: 8px; }
.nt-sep { height: 1px; background: var(--p-color-border-secondary); margin: 16px 0; }
