:root {
  --sidebar: #0c1421;
  --sidebar-line: rgba(255, 255, 255, 0.06);
  --accent: #ff8a1f;
  --accent-bright: #ff9f1a;
  --accent-soft: #fff4e8;
  --canvas: #f8f9fb;
  --card: #ffffff;
  --text: #0f172a;
  --mute: #64748b;
  --line: #e6ebf2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.04);
  --radius: 14px;
  --font: "Inter", system-ui, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --side-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body.admin-body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }


/* Sidebar �? matched to close-up reference */
.sidebar {
  width: var(--side-w);
  background: #10141d;
  color: #a0aec0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 1.2rem 1.15rem 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  display: block;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 168px;
  height: auto;
  margin: 0 auto;
  filter: brightness(0) invert(1);
}

.sidebar-nav {
  flex: 1;
  overflow: auto;
  padding: 0.35rem 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #a0aec0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.7rem 0.72rem 0.55rem;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-mark {
  width: 10px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-mark::before {
  content: "";
  width: 7px;
  height: 1.5px;
  border-radius: 1px;
  background: #6b7280;
}

.nav-item > span:not(.nav-mark) {
  flex: 1;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-item > svg:not(.chevron) {
  width: 18px;
  height: 18px;
  stroke-width: 1.55;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item .chevron {
  width: 15px;
  height: 15px;
  opacity: 0.4;
  margin-left: auto;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #e2e8f0;
}

.nav-item.is-active {
  background: rgba(255, 138, 31, 0.22);
  color: #ffffff;
  box-shadow: none;
}

.nav-item.is-active > svg:not(.chevron) {
  opacity: 1;
  color: #ffffff;
}

.nav-item.is-active .nav-mark::before {
  width: 3px;
  height: 22px;
  border-radius: 99px;
  background: #ff8a1f;
  box-shadow: 0 0 10px rgba(255, 138, 31, 0.95), 0 0 18px rgba(255, 138, 31, 0.45);
}

.nav-group.is-open > .nav-toggle {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.035);
}

.nav-group.is-open > .nav-toggle .chevron {
  transform: rotate(90deg);
  opacity: 0.7;
}

.nav-children {
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.nav-group.is-open > .nav-children {
  /* Height/opacity animated in JS; auto keeps SSR-open menus visible before script runs */
  height: auto;
  opacity: 1;
  pointer-events: auto;
}

.nav-children-inner {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.1rem 0 0.3rem 2.55rem;
}

.nav-child {
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  color: #7b879c;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.72;
  transform: translateY(-3px);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.15s ease,
    background 0.15s ease;
}

.nav-group.is-open .nav-child {
  opacity: 1;
  transform: translateY(0);
}

.nav-group.is-open .nav-child:nth-child(1) { transition-delay: 0.05s; }
.nav-group.is-open .nav-child:nth-child(2) { transition-delay: 0.08s; }
.nav-group.is-open .nav-child:nth-child(3) { transition-delay: 0.11s; }
.nav-group.is-open .nav-child:nth-child(4) { transition-delay: 0.14s; }
.nav-group.is-open .nav-child:nth-child(5) { transition-delay: 0.17s; }
.nav-group.is-open .nav-child:nth-child(6) { transition-delay: 0.2s; }
.nav-group.is-open .nav-child:nth-child(7) { transition-delay: 0.23s; }
.nav-group.is-open .nav-child:nth-child(8) { transition-delay: 0.26s; }

.nav-group:not(.is-open) .nav-child {
  transition-delay: 0s;
  transition-duration: 0.34s, 0.38s, 0.15s, 0.15s;
}

.nav-child:hover,
.nav-child.is-active {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-end {
  padding: 0.75rem 0.85rem 1rem;
  margin-top: auto;
}

.admin-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 500;
  color: #a0aec0;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), 0 0 10px rgba(34, 197, 94, 0.55);
  flex-shrink: 0;
}

/* Shell */
.shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.search {
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  color: var(--mute);
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--text);
  font-size: 0.92rem;
}

.search .kbd {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 0.18rem 0.42rem;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Chip / pill style for header controls */
.hchip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 550;
  white-space: nowrap;
  line-height: 1.2;
}

.hchip-user {
  padding: 0.28rem 0.4rem 0.28rem 0.85rem;
}

.hchip-user .profile-text {
  text-align: left;
}

.hchip-user .avatar {
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
}

.signout-link {
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 550;
  padding: 0.25rem 0.35rem;
  white-space: nowrap;
}
.signout-link:hover { color: #111827; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.15s ease;
}

.btn-blue {
  background: linear-gradient(180deg, #ffc56e 0%, #ff951f 48%, #ef7a0e 100%);
  color: #fff;
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 16px rgba(255, 138, 31, 0.32);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}
.btn-blue:hover {
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 20px rgba(255, 138, 31, 0.38);
}

.btn-soft {
  background: #fff;
  border-color: var(--line);
  color: #334155;
}
.btn-soft:hover { background: #f8fafc; }

.btn-accent {
  background: #0f172a;
  color: #fff;
  border: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}
.btn-accent:hover {
  background: #1e293b;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

.btn-outline {
  background: #fff;
  border-color: #fdba74;
  color: var(--accent-bright);
}
.btn-outline:hover { background: var(--accent-soft); }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  color: #475569;
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: #f8fafc; }

.profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
}
.profile:hover { background: #f5f7fb; }

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(145deg, #ffb347, #ff8a1f);
}

.profile-text { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.profile-text strong { font-size: 0.88rem; font-weight: 700; }
.profile-text small { font-size: 0.74rem; color: var(--mute); font-weight: 550; }

.main {
  padding: 1.25rem 1.5rem 2rem;
  flex: 1;
  background: var(--canvas);
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: #e5e7eb;
  flex-shrink: 0;
  margin: 0 0.15rem;
}

.menu-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.menu-btn:hover { background: #f3f4f6; }

.btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero-card h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  color: var(--text);
}

.hero-card p {
  margin-top: 0.3rem;
  color: var(--mute);
  font-size: 0.92rem;
}

.hero-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; }

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0 0.1rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}
.hero p { color: var(--mute); margin: 0; font-size: 0.92rem; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 92px;
}

.kpi-text {
  min-width: 0;
  flex: 1;
}

.kpi-value {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.15;
  white-space: nowrap;
}

.kpi-label {
  margin-top: 0.35rem;
  color: var(--mute);
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1.25;
  white-space: nowrap;
}

.kpi-meta {
  display: inline;
  margin-left: 0.3rem;
  color: #dc2626;
  font-size: inherit;
  font-weight: 700;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 18px; height: 18px; stroke-width: 2; }

.tone-orange .kpi-icon { background: #fff7ed; color: #ea580c; }
.tone-rose .kpi-icon { background: #fff1f2; color: #e11d48; }
.tone-blue .kpi-icon { background: #fff4e8; color: #ff8a1f; }
.tone-red .kpi-icon { background: #fef2f2; color: #dc2626; }
.tone-green .kpi-icon { background: #f0fdf4; color: #16a34a; }
.tone-violet .kpi-icon { background: #f5f3ff; color: #7c3aed; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 1rem;
  align-items: start;
}

.feed, .rail { display: flex; flex-direction: column; gap: 1rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #334155;
}
.card-title svg { width: 16px; height: 16px; color: var(--accent-bright); }
.card-title h2 {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 720;
  color: var(--text);
}

.chip {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
}

.link {
  color: var(--accent-bright);
  font-size: 0.86rem;
  font-weight: 650;
}

.empty {
  padding: 2.6rem 1rem;
  text-align: center;
  color: var(--mute);
  font-size: 0.92rem;
}

.empty-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: #94a3b8;
}
.empty-badge svg { width: 22px; height: 22px; }

.shortcuts { padding: 0.45rem 0.55rem 0.7rem; }
.shortcuts a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.65rem;
  border-radius: 12px;
  color: #334155;
  font-weight: 550;
  font-size: 0.92rem;
}
.shortcuts a:hover { background: #f7f9fc; }

.sc {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  display: grid;
  place-items: center;
}
.sc svg { width: 15px; height: 15px; }

.monitor {
  list-style: none;
  padding: 0.2rem 1.05rem 1rem;
}
.monitor li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  font-weight: 550;
  color: #334155;
}
.monitor li:last-child { border-bottom: 0; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
}
.status.soon {
  background: #f1f5f9;
  color: #64748b;
}
.status.soon i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
}
.status.on {
  background: #dcfce7;
  color: #166534;
}
.status.on i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}

.toggle {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: 0.15s ease;
}
.toggle.on { background: #22c55e; }
.toggle-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transform: translateX(0);
  transition: 0.15s ease;
}
.toggle.on .toggle-knob { transform: translateX(18px); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.6rem 1.25rem;
  color: var(--mute);
  font-size: 0.8rem;
}
.powered { display: inline-flex; align-items: center; gap: 0.35rem; }
.powered svg { width: 14px; height: 14px; color: #f97316; }

@media (max-width: 1280px) {
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .top-actions .btn-soft { display: none; }
  .hchip-user .profile-text { display: none; }
  .search .kbd { display: none; }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr; }
  .main { padding: 1rem; }
  .top-actions .btn-blue { display: none; }
}
/* Accounts / Users CRUD */
.flash { margin: 0 1.6rem 1rem; padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.9rem; font-weight: 600; }
.flash-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.flash-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--mute); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.data-table .td-right { text-align: right; }
.data-table .empty-cell { text-align: center; color: var(--mute); padding: 2.5rem 1rem; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.72rem; font-weight: 750; background: #f1f5f9; color: #475569; text-transform: capitalize; }
.pill-active { background: #dcfce7; color: #166534; }
.pill-inactive { background: #fff7ed; color: #c2410c; }
.pill-closed { background: #f1f5f9; color: #64748b; }
.form-grid { padding: 1.25rem 1.35rem 1.5rem; display: grid; gap: 1rem; }
.form-row label { display: block; font-size: 0.82rem; font-weight: 650; color: #334155; margin-bottom: 0.35rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.85rem; background: #fff; color: var(--text);
}
.form-row small { display: block; margin-top: 0.35rem; color: var(--mute); font-size: 0.78rem; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row .check { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.form-row .check input { width: auto; }
.form-actions { display: flex; gap: 0.65rem; align-items: center; padding-top: 0.25rem; }
.detail-list { padding: 0.5rem 1.35rem 1.35rem; display: grid; gap: 0.85rem; }
.detail-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 0.75rem; }
.detail-list dt { color: var(--mute); font-size: 0.8rem; font-weight: 650; }
.detail-list dd { margin: 0; font-weight: 600; }
.attach-form { border-top: 1px solid var(--line); margin-top: 0.5rem; }
.link-danger { background: none; border: 0; color: #dc2626; cursor: pointer; font-weight: 650; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.35rem 0.35rem;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}
@media (max-width: 720px) {
  .form-row.two, .detail-list > div { grid-template-columns: 1fr; }
}

/* Database schema browser */
.schema-browser {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.schema-tables {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
}
.schema-side-head {
  padding: 0.9rem 1rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}
.schema-tables nav {
  overflow: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.schema-table-link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--text);
}
.schema-table-link strong { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.schema-table-link small { color: var(--mute); font-size: 0.72rem; }
.schema-table-link:hover { background: #f8fafc; }
.schema-table-link.is-active {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.schema-table-link.is-active strong { color: #9a3412; }
.schema-cols { min-height: 320px; padding: 0; overflow: hidden; }
.schema-main-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
.schema-main-head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
}
.schema-main-head p { margin: 0; color: var(--mute); font-size: 0.9rem; max-width: 52rem; }
.col-explain { color: #334155; font-size: 0.88rem; line-height: 1.4; max-width: 28rem; }
.col-extra { color: var(--mute); font-size: 0.72rem; font-weight: 600; margin-top: 0.15rem; }
.cell-sub { color: var(--mute); font-size: 0.75rem; font-weight: 500; margin-top: 0.15rem; }

/* Clients listing � modern table */
.list-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 12px 32px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 0;
}
.page-breadcrumb {
  margin: 0;
}
.breadcrumb a {
  color: #64748b;
  text-decoration: none;
}
.breadcrumb a:hover { color: #c2410c; }
.breadcrumb-sep {
  color: #cbd5e1;
  font-weight: 500;
}
.breadcrumb-current {
  color: var(--text);
  font-weight: 700;
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fcfcfd 0%, #fff 100%);
}
.per-page-top {
  margin-left: 0;
}
.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--line);
  background: #fcfcfd;
}
.list-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-left: auto;
}
.list-count {
  color: var(--mute);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}
.per-page {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.per-page-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.per-page-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 4.5rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.55rem center;
  padding: 0 1.7rem 0 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
}
.per-page-select:focus {
  outline: none;
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.15);
}
.page-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.page-status {
  font-size: 0.8rem;
  font-weight: 650;
  color: #64748b;
  white-space: nowrap;
  min-width: 2.75rem;
  text-align: center;
}
.page-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.page-btn i { width: 15px; height: 15px; }
.page-btn:hover:not(.is-disabled) {
  background: #f8fafc;
  color: #0f172a;
}
.page-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.list-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  max-width: 320px;
  background: #f4f6f9;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
}
.list-search i { width: 16px; height: 16px; color: #94a3b8; flex-shrink: 0; }
.list-search input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
}
.client-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.client-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 0.85rem 1.1rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.client-table tbody td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: var(--text);
}
.client-table tbody tr:last-child td { border-bottom: 0; }
.client-table tbody tr {
  transition: background 0.15s ease;
}
.client-table tbody tr:hover td {
  background: #e8edf5;
}

/* Clients filter panel */
.btn.is-filter-on {
  background: #fff4e8;
  color: #c2410c;
  border-color: #ffd7a8;
}
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}
.filter-shell {
  margin: 0 0 1rem;
}
.filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
  padding: 0.9rem 1rem 1rem;
}
.filter-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.filter-panel-top strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 750;
}
.filter-collapse {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
}
.filter-collapse i { width: 15px; height: 15px; }
.filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem 0.75rem;
}
.filter-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.filter-row label span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}
.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
}
.filter-row .ns-date-wrap {
  width: 100%;
}
.filter-row .ns-date-wrap input.ns-date {
  padding-right: 2.15rem;
}
.filter-row input:focus,
.filter-row select:focus {
  outline: none;
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.15);
}
.filter-row .ns-date-wrap.is-open input.ns-date,
.filter-row .ns-date-wrap input.ns-date:focus {
  border-color: #ff8a1f;
  box-shadow: none;
}
.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 1100px) {
  .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .filter-row { grid-template-columns: 1fr 1fr; }
  .filter-actions { flex-direction: column-reverse; align-items: stretch; }
}
@media (max-width: 480px) {
  .filter-row { grid-template-columns: 1fr; }
}

.acct-chip {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 0.28rem 0.55rem;
}
.person-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.person-av {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #9a3412;
  background: linear-gradient(145deg, #fff4e8, #ffe8d1);
  border: 1px solid #ffd7a8;
  flex-shrink: 0;
}
.cell-strong { font-weight: 650; color: #0f172a; }
.cell-email { color: #334155; font-weight: 500; }
.cell-mute { color: #64748b; font-weight: 500; }
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.status-dot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.status-dot.st-active { background: #ecfdf5; color: #047857; }
.status-dot.st-inactive { background: #fff7ed; color: #c2410c; }
.status-dot.st-closed { background: #f8fafc; color: #64748b; }
.client-table .empty-cell {
  text-align: center;
  color: var(--mute);
  padding: 3rem 1rem;
}

/* Design 2 � clean spreadsheet */
.sheet-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.86rem;
}
.sheet-head strong { font-weight: 750; }
.sheet-head span { color: var(--mute); font-weight: 600; }
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.sheet-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.sheet-table td {
  padding: 0.78rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  color: #111827;
  font-weight: 500;
}
.sheet-table tbody tr:hover td { background: #f9fafb; }
.sheet-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
}
.sheet-table tbody tr {
  box-shadow: inset 3px 0 0 transparent;
}
.sheet-table tbody tr.st-active { box-shadow: inset 3px 0 0 #22c55e; }
.sheet-table tbody tr.st-inactive { box-shadow: inset 3px 0 0 #f59e0b; }
.sheet-table tbody tr.st-closed { box-shadow: inset 3px 0 0 #94a3b8; }
.sheet-status {
  font-size: 0.78rem;
  font-weight: 700;
}
.sheet-status.st-active { color: #15803d; }
.sheet-status.st-inactive { color: #c2410c; }
.sheet-status.st-closed { color: #64748b; }

/* Design 3 � stacked row cards */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.stack-meta {
  color: var(--mute);
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
}
.stack-cols-head,
.stack-row {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 1.1fr 1.4fr 1fr 0.9fr 0.8fr 0.8fr;
  gap: 0.75rem;
  align-items: center;
}
.stack-cols-head {
  padding: 0 1rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.stack-row {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.stack-row:hover {
  border-color: #ffd7a8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.stack-cell { font-size: 0.88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-cell.strong { font-weight: 700; color: #0f172a; }
.stack-cell.mute { color: #64748b; font-weight: 500; }
.stack-cell.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 750;
}
.stack-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 750;
  background: #f1f5f9;
  color: #475569;
}
.stack-pill.st-active { background: #dcfce7; color: #166534; }
.stack-pill.st-inactive { background: #ffedd5; color: #c2410c; }
.stack-pill.st-closed { background: #e2e8f0; color: #475569; }
.stack-empty {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 2.5rem;
  text-align: center;
  color: var(--mute);
}
@media (max-width: 1100px) {
  .stack-cols-head { display: none; }
  .stack-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 1rem;
  }
}

.hero code, .schema-main-head + .table-wrap code, .data-table code {
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
}
@media (max-width: 900px) {
  .schema-browser { grid-template-columns: 1fr; }
  .schema-tables { position: static; max-height: 240px; }
}

/* Client profile / view */
a.acct-link {
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
a.acct-link:hover {
  background: #fff4e8;
  color: #c2410c;
}

/* Client view � summary board layout */
.cv-identity {
  display: flex;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0 0.1rem;
}
.cv-identity-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.cv-identity .client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff8a1f, #f97316);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  flex-shrink: 0;
}
.cv-identity .client-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}
.cv-identity .client-title-row h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.cv-board {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}
.cv-rail {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.cv-rail-title {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.cv-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cv-contact li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  min-width: 0;
}
.cv-contact i {
  width: 15px;
  height: 15px;
  margin-top: 0.15rem;
  color: #fb923c;
  flex-shrink: 0;
}
.cv-contact small {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.12rem;
}
.cv-contact span {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
  line-height: 1.35;
}
.cv-rail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.1rem;
  color: #fdba74;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.cv-rail-link i { width: 14px; height: 14px; }
.cv-rail-link:hover { color: #ffedd5; }
.cv-main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}
.cv-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.cv-section-label h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text);
}
.cv-section-label p {
  margin: 0;
  color: var(--mute);
  font-size: 0.82rem;
}
.cv-billing,
.cv-services {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.cv-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.cv-metric {
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #eef2f7;
  padding: 0.75rem 0.8rem;
  min-width: 0;
}
.cv-metric span {
  display: block;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.cv-metric strong {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}
.cv-metric strong.ok { color: #15803d; }
.cv-metric strong.warn { color: #c2410c; }
.cv-metric small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}
.cv-services .service-cat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .cv-board { grid-template-columns: 1fr; }
  .cv-services .service-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cv-metrics { grid-template-columns: 1fr 1fr; }
  .cv-services .service-cat-grid { grid-template-columns: 1fr; }
}

.client-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.1rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.035);
  padding: 0.7rem 0.95rem;
  margin-bottom: 0.85rem;
}
.client-profile-main {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.client-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #ff8a1f, #f97316);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}
.client-profile-copy { min-width: 0; }
.client-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}
.client-title-row h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.client-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin-top: 0.45rem;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}
.meta-pin {
  background: #fff4e8;
  color: #c2410c;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.meta-mute {
  color: var(--mute);
  font-size: 0.75rem;
  font-weight: 600;
}
.client-contact-line {
  display: none;
}
.panel-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.panel-card > header .text-link {
  color: #c2410c;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.panel-card > header .text-link:hover { text-decoration: underline; }

.summary-duo {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.client-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}
.client-facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.client-facts .span-all { grid-column: 1 / -1; }
.client-facts span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.client-facts strong {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
  word-break: break-word;
}
.invoice-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.invoice-stat {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fcfcfd;
  padding: 0.7rem 0.55rem;
  text-align: center;
}
.invoice-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.invoice-stat span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.invoice-stat.tone-ok strong { color: #15803d; }
.invoice-stat.tone-warn strong { color: #c2410c; }
.invoice-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.invoice-money div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.invoice-money span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.invoice-money strong {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 750;
}

@media (max-width: 980px) {
  .summary-duo { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .client-facts,
  .invoice-overview,
  .invoice-money { grid-template-columns: 1fr 1fr; }
}
.client-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(5.5rem, 1fr));
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 28rem;
  max-width: 34rem;
}
.client-profile-stats div {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
}
.client-profile-stats small {
  display: block;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.12rem;
}
.client-profile-stats strong {
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--text);
  line-height: 1.2;
}
.client-profile-stats strong.is-placeholder { color: #cbd5e1; }

.client-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: nowrap;
  padding: 0;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 1px solid #e9ebec;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}
.client-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.7rem 0.65rem 0.55rem;
  margin: 0;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #666;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  clip-path: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.client-tab:first-child {
  border-radius: 0;
  clip-path: none;
}
.client-tab i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}
.client-tab.is-active i {
  opacity: 1;
  color: #0f172a;
}
a.client-tab:hover {
  background: var(--accent-soft);
  color: #c2410c;
}
a.client-tab:hover i {
  color: #c2410c;
  opacity: 1;
}
.client-tab.is-active {
  background: #fff;
  color: #0f172a;
  border-bottom-color: var(--accent);
  margin-right: 0;
  clip-path: none;
  z-index: 1;
}
.client-tab.is-active:first-child {
  clip-path: none;
  border-radius: 0;
}
.client-tab.is-active + .client-tab {
  clip-path: none;
  padding-left: 0.65rem;
}
.client-tab.is-soon {
  color: #cbd5e1;
  cursor: default;
  background: transparent;
}

.client-tab-panel {
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 1.15rem 1.15rem 1.25rem;
}
.account-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.account-stack .panel-card header .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}
.account-stack .panel-card header .btn i {
  width: 14px;
  height: 14px;
}
.profile-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.profile-form.is-locked .form-grid input,
.profile-form.is-locked .form-grid select,
.profile-form.is-locked .form-grid textarea {
  background: #f8fafc;
  color: #334155;
  cursor: default;
  border-color: #e2e8f0;
  box-shadow: none;
}
.profile-form.is-editing .form-grid input,
.profile-form.is-editing .form-grid select,
.profile-form.is-editing .form-grid textarea {
  background: #fff;
}
.detail-grid .span-2 { grid-column: 1 / -1; }
.panel-note {
  margin: 0 0 0.9rem;
  color: var(--mute);
  font-size: 0.88rem;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.summary-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  padding: 1rem 1.05rem 1.1rem;
  min-width: 0;
}
.panel-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.panel-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 750;
}
.card-tag {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}
.detail-list {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.detail-list > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}
.detail-list dt {
  margin: 0;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  word-break: break-word;
}
.empty-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem 0.15rem 0.35rem;
  color: var(--mute);
}
.empty-block i {
  width: 22px;
  height: 22px;
  color: #cbd5e1;
}
.empty-block p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.summary-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.summary-topbar strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 750;
}
.summary-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}
.summary-flags b.is-yes { color: #15803d; }
.summary-flags b.is-no { color: #dc2626; }

.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 18.5rem);
  gap: 0.85rem;
  align-items: start;
}
.summary-main,
.summary-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}
.info-split,
.billing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}
.soa-income-block {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  align-content: start;
}
.action-list-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}
.soa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}
.soa-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}
.soa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.soa-table td {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.soa-table tr:last-child td { border-bottom: 0; }
.soa-table .num {
  text-align: right;
  font-weight: 650;
  white-space: nowrap;
  color: var(--text);
}
.soa-income {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
}
.soa-income div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}
.soa-income span { color: #64748b; font-weight: 600; }
.soa-income strong { font-weight: 750; color: var(--text); }

.muted-line {
  margin: 0;
  color: var(--mute);
  font-size: 0.88rem;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.action-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  padding: 0.25rem 0;
  color: #334155;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.72;
}
.link-action i { width: 14px; height: 14px; color: #94a3b8; }
.link-action.is-warn { color: #c2410c; }
.link-action.is-danger { color: #dc2626; }
.send-email-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.send-email-row select {
  flex: 1;
  min-width: 0;
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 0.55rem;
  font: inherit;
  background: #f8fafc;
}
.notes-box {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  background: #f8fafc;
  color: var(--text);
  resize: vertical;
  box-sizing: border-box;
}
.service-cats {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  padding: 1rem 1.05rem 1.15rem;
  margin-bottom: 0.9rem;
}
.service-cats-compact {
  margin-bottom: 0;
}
.service-cat-grid-stack {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
.detail-list dd.is-placeholder { color: #cbd5e1; }

@media (max-width: 1280px) {
  .summary-layout { grid-template-columns: minmax(0, 1fr) minmax(15rem, 17rem); }
}
@media (max-width: 980px) {
  .summary-layout { grid-template-columns: 1fr; }
  .info-split,
  .billing-split { grid-template-columns: 1fr; }
}
.section-head {
  margin-bottom: 0.85rem;
}
.section-head h2 {
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 750;
}
.section-head p {
  margin: 0;
  color: var(--mute);
  font-size: 0.86rem;
}
.service-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}
.service-cat-card {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.8rem 0.75rem;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #fcfcfd;
  min-width: 0;
}
.service-cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #fff4e8;
  color: #c2410c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-cat-icon i { width: 17px; height: 17px; }
.service-cat-card h3 {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 750;
}
.service-cat-card p {
  margin: 0;
  color: var(--mute);
  font-size: 0.75rem;
  line-height: 1.35;
}
.service-cat-count {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 750;
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .service-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .client-profile-stats {
    flex: 1 1 100%;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .info-split,
  .billing-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .summary-grid,
  .summary-grid-3,
  .service-cat-grid { grid-template-columns: 1fr; }
  .client-profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-list > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}

.flash {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.flash-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.flash-err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.profile-form .panel-card header {
  margin-bottom: 1rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid label span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  box-sizing: border-box;
}
.form-grid textarea { resize: vertical; min-height: 96px; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.users-table { margin: 0; }
.panel-card > header .btn { margin-left: auto; }


/* ===== Client summary v2 (mockup layout) ===== */
.cv-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.cv-hero-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.cv-hero .client-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff8a1f, #f97316);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.cv-hero .client-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}
.cv-hero .client-title-row h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cv-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cv-hero-aside {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.acct-chip-lg {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.sum-top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.1rem;
}
.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}
.detail-grid span {
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.detail-grid strong {
  font-size: 0.88rem;
  font-weight: 650;
  color: #334155;
  word-break: break-word;
}
.detail-grid strong.is-empty { color: #cbd5e1; }

.snap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.snap-item {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fcfcfd;
  padding: 0.75rem 0.8rem;
}
.snap-item span {
  display: block;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.snap-item strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #334155;
}
.snap-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.snap-foot span {
  display: block;
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.snap-foot strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: #334155;
}

.services-strip { margin-bottom: 0.85rem; }
.svc-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}
.svc-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.55rem;
  border: 1px solid #eef2f7;
  border-radius: 11px;
  background: #fcfcfd;
  min-width: 0;
}
a.svc-chip-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
a.svc-chip-link:hover {
  border-color: #ffd7ae;
  background: #fffaf5;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.svc-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.svc-add-choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  padding: 0.8rem 0.85rem;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fcfcfd;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.svc-add-choice:hover {
  border-color: #ffd7ae;
  background: #fffaf5;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}
.svc-add-choice strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.svc-add-choice small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.75rem;
  color: #64748b;
}
@media (max-width: 560px) {
  .svc-add-grid { grid-template-columns: 1fr; }
}

/* Client store (WHMCS-style categories + product cards) */
.store-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.store-cats {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 1rem;
}
.store-cats-head {
  padding: 0.75rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.store-cats-nav {
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  gap: 0.15rem;
}
.store-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  background: transparent;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.12s ease, color 0.12s ease;
}
.store-cat:hover {
  background: #fff4e8;
  color: #c2410c;
}
.store-cat.is-active {
  background: #0f172a;
  color: #fff;
}
.store-cat-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
  opacity: 0.75;
}
.store-cat-group.is-open .store-cat-chevron {
  transform: rotate(90deg);
}
.store-cat-children {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.15rem 0.25rem 0.35rem 0.55rem;
}
.store-cat-children[hidden] {
  display: none !important;
}
.store-cat-child {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 550;
  color: #475569;
  text-decoration: none;
}
.store-cat-child:hover {
  background: #f8fafc;
  color: #0f172a;
}
.store-cat-child.is-active {
  background: #fff4e8;
  color: #c2410c;
  font-weight: 700;
}
.store-main {
  min-width: 0;
}
.store-main-head {
  margin: 0 0 1rem;
  padding: 0 0.1rem;
}
.store-main-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.store-main-head p {
  margin: 0;
  color: var(--mute);
  font-size: 0.92rem;
}
.store-domain-card {
  padding: 1.25rem 1.35rem 1.4rem;
  max-width: 42rem;
}
.store-domain-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}
.store-domain-row {
  margin-top: 0;
}
.store-domain-result {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.store-domain-result.is-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.store-domain-result.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.store-domain-price {
  margin-top: 0.35rem;
  font-weight: 700;
  color: #0f172a;
}
.store-domain-price span {
  font-weight: 550;
  color: #64748b;
}
.store-domain-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.store-domain-actions .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.store-section {
  margin-bottom: 1.35rem;
}
.store-section:last-child {
  margin-bottom: 0;
}
.store-section-head {
  margin: 0 0 0.75rem;
  padding: 0 0.1rem;
}
.store-section-head h3 {
  margin: 0 0 0.15rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
}
.store-section-head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--mute);
}
.store-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.store-type-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.store-type-card:hover {
  border-color: #ffd7ae;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.store-type-card strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
}
.store-type-card span {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}
@media (max-width: 900px) {
  .store-type-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .store-type-grid { grid-template-columns: 1fr; }
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

/* HostCloud.ie-style pricing cards */
.hc-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-top: 3px solid #0f2a5f;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 42, 95, 0.06);
  padding: 1rem 0.95rem 0.9rem;
  min-width: 0;
}
.hc-plan.is-popular {
  border-top-color: #0e7490;
  box-shadow: 0 12px 32px rgba(14, 116, 144, 0.12);
}
.hc-plan-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #0e7490;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hc-plan-top {
  margin-bottom: 0.65rem;
  padding-right: 3.25rem;
}
.hc-plan-name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f2a5f;
}
.hc-plan-pricebox {
  background: #eef3f9;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.55rem;
}
.hc-plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.hc-plan-price {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f2a5f;
  line-height: 1.1;
}
.hc-plan-per {
  font-size: 0.84rem;
  font-weight: 550;
  color: #64748b;
}
.hc-plan-features {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  flex: 1;
}
.hc-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.25;
}
.hc-plan-features li:last-child {
  border-bottom: 0;
}
.hc-plan-features i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #0e7490;
  margin-top: 0.08rem;
  stroke-width: 2.5;
}
.hc-plan-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.hc-plan-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: #0f2a5f;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}
.hc-plan-buy.is-accent {
  background: #0e7490;
}
.hc-plan-buy:hover:not(:disabled) {
  filter: brightness(1.06);
}
.hc-plan-buy:disabled {
  opacity: 0.9;
  cursor: not-allowed;
}
.hc-plan-guarantee {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

@media (max-width: 1400px) {
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .store-layout { grid-template-columns: 1fr; }
  .store-cats { position: static; }
  .store-cats-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .store-grid { grid-template-columns: 1fr; }
}
.svc-chip-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.svc-chip-icon i { width: 14px; height: 14px; }
.svc-chip-icon.tone-blue { background: #eff6ff; color: #2563eb; }
.svc-chip-icon.tone-orange { background: #fff4e8; color: #c2410c; }
.svc-chip-icon.tone-violet { background: #f5f3ff; color: #7c3aed; }
.svc-chip-icon.tone-slate { background: #f1f5f9; color: #475569; }
.svc-chip-icon.tone-teal { background: #f0fdfa; color: #0f766e; }
.svc-chip-icon.tone-rose { background: #fff1f2; color: #e11d48; }
.svc-chip-icon.tone-amber { background: #fffbeb; color: #d97706; }
.svc-chip-row {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
}
.svc-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-ratio {
  font-size: 0.72rem;
  font-weight: 550;
  color: #94a3b8;
  line-height: 1.15;
}
.svc-ratio b {
  font-weight: 700;
  color: #0f172a;
}

.sum-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 140px;
  padding: 1rem 0.75rem;
  color: var(--mute);
}
.empty-state i {
  width: 28px;
  height: 28px;
  color: #cbd5e1;
  margin-bottom: 0.2rem;
}
.empty-state strong {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 650;
}
.empty-state p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  max-width: 16rem;
}
.empty-state-wide {
  min-height: 100px;
  align-items: flex-start;
  text-align: left;
  flex-direction: row;
  gap: 0.75rem;
}
.empty-state-wide p { max-width: none; }

@media (max-width: 1100px) {
  .sum-top,
  .sum-bottom { grid-template-columns: 1fr; }
  .svc-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .svc-strip {
    grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
    overflow-x: auto;
  }
}
@media (max-width: 640px) {
  .detail-grid,
  .snap-grid,
  .snap-foot { grid-template-columns: 1fr; }
  .svc-strip {
    grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
    overflow-x: auto;
  }
}

/* Summary dummy lists / mini tables */
.sum-mini-table { font-size: 0.84rem; }
.sum-mini-table thead th {
  padding: 0.55rem 0.65rem;
  font-size: 0.66rem;
}
.sum-mini-table tbody td {
  padding: 0.65rem;
}
.sum-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.sum-badge.is-paid { background: #dcfce7; color: #166534; }
.sum-badge.is-due { background: #fff4e8; color: #c2410c; }
.sum-badge.is-active { background: #e0f2fe; color: #0369a1; }
.sum-list,
.sum-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.sum-list li,
.sum-activity li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #f1f5f9;
}
.sum-list li:last-child,
.sum-activity li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.sum-list strong,
.sum-activity strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 650;
  color: #334155;
}
.sum-list span,
.sum-activity span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 550;
  color: #94a3b8;
}
.sum-list em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 650;
  color: #94a3b8;
  white-space: nowrap;
}
.sum-activity li {
  justify-content: flex-start;
}
.sum-activity i {
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  color: #fb923c;
  flex-shrink: 0;
}

/* �� Modules / Servers �� */
.page-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.mod-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.mod-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 0.88rem;
  font-weight: 650;
  color: #64748b;
  text-decoration: none;
  background: transparent;
}
.mod-tab i { width: 16px; height: 16px; }
.mod-tab:hover { color: #0f172a; }
.mod-tab.is-active {
  color: #0f172a;
  border-bottom-color: var(--accent);
}
.mod-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.mod-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 42rem;
}
.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
}
.acct-free {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
}
.actions-cell {
  white-space: nowrap;
}
.btn-xs {
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 650;
}
.btn-danger-soft {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.btn-danger-soft:hover:not(:disabled) {
  background: #fef2f2;
}
.btn-danger-soft:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.form-grid-1 {
  grid-template-columns: 1fr;
  max-width: 44rem;
}
.form-grid label em,
.radio-fieldset legend em {
  color: #dc2626;
  font-style: normal;
  font-weight: 700;
}
.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}
.radio-fieldset {
  border: 0;
  margin: 0.25rem 0 0;
  padding: 0;
}
.radio-fieldset legend {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.55rem;
}
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: #334155;
  cursor: pointer;
}
.radio-row input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}
.transfer-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.85rem;
  align-items: center;
  margin: 0.5rem 0 1rem;
}
.transfer-col {
  min-width: 0;
}
.transfer-col strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: #0f172a;
}
.transfer-list {
  width: 100%;
  min-height: 180px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.35rem;
  background: #fff;
  font-size: 0.86rem;
}
.transfer-list option {
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
}
.transfer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.btn-icon {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.servers-group-form .panel-card + .panel-card {
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .transfer-box {
    grid-template-columns: 1fr;
  }
  .transfer-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* �� Server add/edit form (card stack) �� */
.server-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.server-card .server-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.server-card .server-card-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.server-card .server-card-head p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #94a3b8;
  max-width: 36rem;
}
.server-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: #c2410c;
  flex-shrink: 0;
}
.server-card-icon i { width: 18px; height: 18px; }
.server-form-stack .form-grid {
  padding: 0.35rem 0 0.15rem;
}
.input-with-action {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.input-with-action input { flex: 1; min-width: 0; }
.btn-icon-round {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-icon-round i { width: 15px; height: 15px; }
.btn-icon-round.is-spin i {
  animation: server-spin 0.6s linear;
}
@keyframes server-spin {
  to { transform: rotate(360deg); }
}
.input-prefix {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 0.75rem;
  background: #fff;
}
.input-prefix > span {
  font-weight: 700;
  color: #64748b;
  font-size: 0.9rem;
}
.input-prefix input {
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  background: transparent !important;
}
.server-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.25rem 0 0.5rem;
  position: sticky;
  bottom: 0.75rem;
  z-index: 2;
}
.server-form-footer .btn-blue[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* �� Edit Server: single card matching previous panel �� */
.server-edit-form {
  max-width: 920px;
}
.server-single-card {
  padding: 1.15rem 1.25rem 1.25rem;
}
.server-single-card header {
  margin-bottom: 1rem;
}
.server-single-card header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
}
.server-edit-form .form-grid {
  padding: 0;
}
.form-grid-spacer {
  display: none;
}
@media (min-width: 721px) {
  .form-grid-spacer { display: block; }
}
.server-edit-form .form-actions {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f7;
  justify-content: flex-end;
}

/* �� WHMCS-style server form �� */
.whmcs-form {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.whmcs-form-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.whmcs-section {
  padding: 0;
  border-bottom: 0;
  background: #fff;
}
.whmcs-section-last { border-bottom: 0; }
.whmcs-section-title {
  margin: 0;
  padding: 0.65rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #334155;
  background: #fff;
  border-top: 0;
  border-bottom: 1px solid #e8edf3;
  text-align: left;
}
.whmcs-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.55rem 1.15rem;
  text-align: left;
  background: #f3f5f8;
  border-bottom: 1px solid #e8edf3;
}
.whmcs-row[hidden],
.whmcs-row.is-hidden {
  display: none !important;
}
.whmcs-row:last-child {
  border-bottom: 0;
}
.whmcs-label {
  text-align: right;
  padding-top: 0.45rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: #334155;
}
.whmcs-field {
  min-width: 0;
  width: 100%;
  text-align: left;
}
.whmcs-field input[type="text"],
.whmcs-field input[type="number"],
.whmcs-field input[type="password"],
.whmcs-field select,
.whmcs-field textarea {
  width: 100%;
  max-width: 420px;
  border: 1px solid #c5ced9;
  border-radius: 4px;
  background: #fff;
  padding: 0.42rem 0.55rem;
  font: inherit;
  font-size: 0.88rem;
  color: #0f172a;
  text-align: left;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}
.whmcs-field textarea {
  max-width: 520px;
  min-height: 88px;
}
.whmcs-field input:focus,
.whmcs-field select:focus,
.whmcs-field textarea:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
  background: #fff;
}
.whmcs-input-sm {
  max-width: 140px !important;
  width: 140px !important;
}
.whmcs-input-ip {
  max-width: 160px !important;
  width: 160px !important;
}
.whmcs-ns-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}
.whmcs-ns-pair input:first-child {
  flex: 0 1 320px;
  width: 320px;
  max-width: 320px;
}
.whmcs-ns-pair .whmcs-ns-ip {
  max-width: none;
  width: auto;
  flex: 0 0 auto;
}
.whmcs-ns-pair .whmcs-ns-ip input {
  width: 160px;
  max-width: 160px;
  flex: 0 0 160px;
}
.whmcs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-start;
}
.whmcs-inline select {
  max-width: 220px;
  width: 220px;
}
.whmcs-sensitive {
  background: #fff !important;
}
.whmcs-help {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #64748b;
  max-width: 520px;
  text-align: left;
}
.whmcs-help code {
  font-size: 0.74rem;
  background: #fff;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
}
.whmcs-check,
.whmcs-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.15rem 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  text-align: left;
}
.whmcs-check input,
.whmcs-radio input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}
.btn-test {
  background: #dc2626;
  color: #fff;
  border: 1px solid #b91c1c;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
.btn-test:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.whmcs-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.35rem 0 0.5rem;
  border-top: 0;
  background: transparent;
}
.whmcs-field .input-with-action {
  max-width: 420px;
  width: 100%;
}
.whmcs-field .input-with-action input {
  max-width: none;
  flex: 1;
}
@media (max-width: 800px) {
  .whmcs-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .whmcs-label {
    text-align: left;
    padding-top: 0;
  }
  .whmcs-field input,
  .whmcs-field select,
  .whmcs-field textarea,
  .whmcs-ns-pair input:first-child,
  .whmcs-field .input-with-action {
    max-width: none;
    width: 100%;
  }
}

/* Connection result modal (match success mockup) */
body.srv-modal-open { overflow: hidden; }
.srv-modal[hidden] { display: none !important; }
.srv-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.srv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.srv-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}
.srv-modal-x {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.srv-modal-x:hover {
  background: #f1f5f9;
  color: #334155;
}
.srv-modal-body {
  padding: 1.35rem 1.4rem 0.35rem;
}
.srv-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.4rem 1.25rem;
}
.srv-conn-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-right: 1.75rem;
  margin-bottom: 1.15rem;
}
.srv-conn-check {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #22c55e;
  color: #fff;
}
.srv-conn-head h2 {
  margin: 0.1rem 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.srv-conn-lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #64748b;
}
.srv-conn-lead strong { color: #0f172a; font-weight: 700; }
.srv-conn-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.srv-stat {
  text-align: center;
  padding: 1rem 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid transparent;
}
.srv-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.srv-stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}
.srv-stat-total {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.srv-stat-total strong { color: #0f766e; }
.srv-stat-active {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.srv-stat-active strong { color: #1e3a5f; }
.srv-stat-susp {
  background: #fff7ed;
  border-color: #fed7aa;
}
.srv-stat-susp strong { color: #ea580c; }
.srv-stat-pkgs {
  background: #f5f3ff;
  border-color: #ddd6fe;
}
.srv-stat-pkgs strong { color: #5b21b6; }
.srv-pkg-block {
  margin-top: 0.35rem;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 0.75rem 0.85rem 0.85rem;
}
.srv-pkg-head {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}
.srv-pkg-head em {
  font-style: normal;
  color: #64748b;
}
.srv-pkg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 11rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.srv-pkg-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #fff;
}
.srv-pkg-list strong {
  font-size: 0.84rem;
  font-weight: 650;
  color: #0f172a;
}
.srv-pkg-list span {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}
.srv-pkg-empty,
.srv-pkg-more {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}
.srv-conn-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid #eef2f7;
}
.srv-conn-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0 0.55rem 1.1rem;
  position: relative;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}
.srv-conn-list li:last-child { border-bottom: 0; }
.srv-conn-list li::before {
  content: "�";
  position: absolute;
  left: 0;
  top: 0.5rem;
  color: #94a3b8;
  font-weight: 700;
}
.srv-conn-list span { color: #64748b; }
.srv-conn-list strong {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}
@media (max-width: 560px) {
  .srv-conn-stats { grid-template-columns: 1fr; }
}
/* Server group form */
.group-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.group-edit-form .panel-card header {
  margin-bottom: 0.85rem;
}
.group-edit-form .form-grid {
  padding: 0;
}
.group-edit-form .radio-fieldset.span-2 {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f7;
}
.group-form-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f7;
  justify-content: flex-end;
}
.group-edit-form .transfer-box {
  margin-top: 0.75rem;
}
/* Stripe: test left, live right */
.stripe-keys-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.stripe-keys-duo .form-grid-1 {
  max-width: none;
}
.stripe-keys-duo .panel-card {
  margin: 0;
  min-width: 0;
}
@media (max-width: 900px) {
  .stripe-keys-duo { grid-template-columns: 1fr; }
}
.stripe-conn-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 0.35rem;
}
.stripe-conn-check .stripe-check-msg {
  display: inline;
  margin: 0;
}

/* Domain registrar list + sticky configure popup */
.registrar-table {
  table-layout: fixed;
}
.registrar-table .col-reg { width: auto; }
.registrar-table .col-status { width: 8.5rem; }
.registrar-table .col-actions { width: 13.5rem; }
.registrar-table th:nth-child(2),
.registrar-table td:nth-child(2),
.registrar-table th:nth-child(3),
.registrar-table td:nth-child(3) {
  white-space: nowrap;
}
.registrar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
}
.registrar-table .inline-form {
  display: inline;
  margin: 0;
}
.registrar-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}
.registrar-brand {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}
.registrar-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
  max-width: 36rem;
}

body.reg-modal-open { overflow: hidden; }
.reg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.reg-modal.is-open {
  display: flex;
}
.reg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: default;
}
.reg-modal-panel {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  max-height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: nsSheetIn 0.22s ease;
}
@keyframes nsSheetIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.reg-modal-head {
  flex-shrink: 0;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid #eef2f7;
}
.reg-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  color: #0f172a;
}
.reg-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.reg-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.15rem 1.35rem 1.25rem;
}
.reg-mode-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
  max-width: 22rem;
}
.reg-mode-field > span,
.reg-key-block label > span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}
.reg-mode-field select,
.reg-key-block input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.7rem;
  color: var(--text);
}
.reg-mode-field select:focus,
.reg-key-block input:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.reg-modal-keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.reg-key-block {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fcfcfd;
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.domain-sheet .reg-key-block {
  background: #f8fafc;
  border-color: #e8edf3;
}
.domain-sheet .reg-key-block h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 750;
  color: #0f172a;
}
.domain-sheet .reg-key-block label > span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}
.domain-sheet .reg-key-block input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.7rem;
  color: var(--text);
}
.domain-sheet .reg-key-block input:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.reg-key-block h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
}
.reg-key-block label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.reg-conn-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 0.15rem;
}
.reg-conn-check .js-dynadot-msg {
  font-size: 0.8rem;
  color: #64748b;
}
.reg-modal-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid #eef2f7;
  background: #fff;
}
@media (max-width: 900px) {
  .reg-modal-keys { grid-template-columns: 1fr; }
  .registrar-table .col-status,
  .registrar-table .col-actions { width: auto; }
}

/* Domain products (TLD list) */
.domain-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.domain-toolbar-count {
  font-size: 0.88rem;
  font-weight: 650;
  color: #64748b;
}
.domain-filter-shell {
  margin-bottom: 1rem;
}
.domain-filter-panel {
  padding: 1rem 1.15rem 1.05rem;
}
.domain-filter-row {
  grid-template-columns: minmax(8rem, 10.5rem) repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}
.domain-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  justify-content: flex-end;
  white-space: nowrap;
}
.domain-filter-actions .btn {
  min-height: 2.35rem;
}
@media (max-width: 900px) {
  .domain-filter-row {
    grid-template-columns: 1fr 1fr;
  }
  .domain-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
@media (max-width: 560px) {
  .domain-filter-row {
    grid-template-columns: 1fr;
  }
}
.domain-usage {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #64748b;
}
.domain-move {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.domain-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid #eef2f7;
  font-size: 0.82rem;
  color: #64748b;
}
.domain-pager-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.domain-edit-tld {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
}
.domain-config-panel {
  width: min(720px, 100%);
}
.domain-config-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
  margin-bottom: 1.15rem;
}
.domain-config-meta .reg-mode-field {
  max-width: none;
  margin-bottom: 0;
}
.domain-config-usage {
  grid-column: 1 / -1;
}
.domain-config-prices-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
}
.domain-price-grid input[type="number"] {
  width: 100%;
  max-width: 8.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}
@media (max-width: 700px) {
  .domain-config-meta { grid-template-columns: 1fr; }
}

/* Domain configure sheet (2026) */
.domain-sheet {
  width: min(760px, 100%);
  max-height: min(92vh, 880px);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  background: #f4f6f9;
}
.domain-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e8edf3;
}
.domain-sheet-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.domain-sheet-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.domain-sheet-x {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.domain-sheet-x:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.domain-sheet-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.domain-sheet-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.domain-sheet-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
}
.domain-sheet-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  font-weight: 750;
  color: #0f172a;
}
.domain-sheet-card-lead {
  margin: -0.35rem 0 0.95rem;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
}
.domain-sheet-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.domain-sheet-card-top h3 {
  margin: 0 0 0.15rem;
}
.domain-sheet-card-top p {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}
.domain-year-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #fff4e8;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 700;
}
.domain-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.domain-sheet-grid .span-all {
  grid-column: 1 / -1;
}
.domain-sheet-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.domain-sheet-grid label > span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.domain-sheet-grid input,
.domain-sheet-grid select,
.domain-sheet-grid textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.58rem 0.72rem;
  color: var(--text);
  font: inherit;
}
.domain-sheet-grid textarea {
  min-height: 4.5rem;
  resize: vertical;
}
.domain-sheet-grid input:focus,
.domain-sheet-grid select:focus,
.domain-sheet-grid textarea:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.domain-price-head,
.domain-price-row {
  display: grid;
  grid-template-columns: 4.2rem repeat(3, minmax(0, 1fr)) 4.2rem;
  gap: 0.55rem;
  align-items: center;
}
.domain-price-head {
  padding: 0 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0.35rem;
}
.domain-price-row {
  padding: 0.35rem 0.15rem;
  border-radius: 10px;
}
.domain-price-row.is-collapsed {
  display: none;
}
.domain-price-row.is-just-added {
  animation: domainYearIn 0.35s ease;
  background: #fff8f1;
}
@keyframes domainYearIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.domain-price-period {
  font-size: 0.86rem;
  font-weight: 700;
  color: #334155;
}
.domain-price-row input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.5rem 0.6rem;
}
.domain-price-row input:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.domain-price-row label.is-blocked input,
.domain-price-row input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  box-shadow: none;
}
.domain-min-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 650;
  color: #94a3b8;
}
.domain-min-years-hint {
  margin: 0.75rem 0 0;
}
.domain-year-del {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.35rem 0.15rem;
  text-align: right;
  white-space: nowrap;
}
.domain-year-del:hover {
  color: #b91c1c;
  text-decoration: underline;
}
.domain-add-year-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fbfcfe;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.domain-add-year-btn:hover {
  border-color: #ff8a1f;
  background: #fff8f1;
}
.domain-add-year-btn span {
  font-size: 0.88rem;
  font-weight: 700;
}
.domain-add-year-btn small {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}
.domain-sheet-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.95rem 1.25rem;
  background: #fff;
  border-top: 1px solid #e8edf3;
}
@media (max-width: 640px) {
  .domain-sheet-grid,
  .domain-price-head,
  .domain-price-row {
    grid-template-columns: 1fr 1fr;
  }
  .domain-price-head span:first-child,
  .domain-price-period {
    grid-column: 1 / -1;
  }
  .domain-price-head span:nth-child(n+2) {
    display: none;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Hosting products catalog */
.hosting-toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.hosting-filter-row {
  grid-template-columns: minmax(8rem, 10.5rem) repeat(3, minmax(0, 1fr)) auto;
}
.hosting-sheet {
  width: min(820px, 100%);
}
.hosting-sheet-wide {
  width: min(1180px, 98vw);
  max-height: min(94vh, 960px);
}
.hosting-sheet-sm {
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
}
.hosting-sheet-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.hosting-prod-catbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e8edf3;
}
.hosting-prod-cat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  min-width: min(320px, 100%);
}
.hosting-prod-cat > span {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.hosting-prod-cat select {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.58rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
}
.hosting-prod-cat select:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.hosting-prod-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.2fr);
  gap: 0.85rem;
  align-items: stretch;
}
.hosting-desc-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hosting-desc-label {
  display: flex;
  flex: 1;
  min-height: 0;
  margin: 0;
}
.hosting-desc-html {
  flex: 1;
  width: 100%;
  min-height: 280px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.85rem 1rem;
}
.hosting-desc-html:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.hosting-desc-html::placeholder {
  color: #94a3b8;
}
@media (max-width: 900px) {
  .hosting-prod-split {
    grid-template-columns: 1fr;
  }
  .hosting-sheet-wide {
    width: min(100%, 98vw);
  }
}
.hosting-url-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.hosting-url-label {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.hosting-url-row {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  overflow: hidden;
}
.hosting-url-row:focus-within {
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.hosting-url-prefix {
  flex: 0 1 auto;
  max-width: 58%;
  padding: 0.58rem 0.55rem 0.58rem 0.72rem;
  font-size: 0.78rem;
  color: #64748b;
  background: #f1f5f9;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.hosting-url-row input {
  flex: 1 1 auto;
  min-width: 5rem;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.58rem 0.55rem !important;
  font-size: 0.88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hosting-url-sync {
  flex: 0 0 auto;
  width: 2.4rem;
  border: 0;
  border-left: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 1rem;
  cursor: pointer;
}
.hosting-url-sync:hover {
  background: #fff8f1;
  color: #c2410c;
}
.hosting-url-cell {
  display: inline-block;
  max-width: 14rem;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hosting-group-row td {
  padding: 0 !important;
  border-bottom: 0 !important;
  background: #f8fafc;
}
.hosting-group-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-top: 1px solid #e8edf3;
  border-bottom: 1px solid #e8edf3;
  background: #f8fafc;
}
.hosting-group-bar strong {
  font-size: 0.88rem;
  color: #0f172a;
}
.hosting-group-count {
  font-size: 0.75rem;
  font-weight: 650;
  color: #94a3b8;
}
.hosting-group-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hosting-group-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.hosting-group-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: #334155;
  color: #fff;
}
.hosting-group-card-kicker {
  display: block;
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.hosting-group-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
  letter-spacing: -0.01em;
}
.hosting-group-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.hosting-group-card-count {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.hosting-group-create {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  border-radius: 999px;
  background: #ff8a1f;
  color: #fff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.hosting-group-create:hover {
  background: #f07a0d;
  color: #fff;
}
.hosting-group-create i {
  width: 14px;
  height: 14px;
}
.hosting-group-card .table-wrap {
  border: 0;
  border-radius: 0;
}
.hosting-group-card .client-table thead th {
  background: #f8fafc;
}
.hosting-payment-type {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 16rem;
  margin-bottom: 0.85rem;
}
.hosting-payment-type > span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.hosting-payment-type select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.55rem 0.7rem;
}
.hosting-price-head,
.hosting-price-row {
  display: grid;
  grid-template-columns: 8.5rem 4rem repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: center;
}
.hosting-price-head {
  padding: 0 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0.35rem;
}
.hosting-price-row {
  padding: 0.35rem 0.15rem;
  border-radius: 10px;
}
.hosting-price-row.is-blocked {
  opacity: 0.45;
}
.hosting-price-cycle {
  font-size: 0.86rem;
  font-weight: 700;
  color: #334155;
}
.hosting-price-enable {
  display: flex;
  justify-content: center;
}
.hosting-price-row input[type="number"] {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.5rem 0.6rem;
}
.hosting-feature-head,
.hosting-feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 4.5rem;
  gap: 0.55rem;
  align-items: center;
}
.hosting-feature-head {
  padding: 0 0.15rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.hosting-feature-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.hosting-feature-row input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.5rem 0.6rem;
}
.hosting-package-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.hosting-package-row select {
  flex: 1;
  min-width: 0;
}
.hosting-sg-pick {
  display: block;
  margin-bottom: 1rem;
}
.hosting-sg-pick > span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.hosting-sg-pick .ns-mselect {
  max-width: 28rem;
}
.hosting-sg-multi {
  margin-bottom: 0.35rem;
}
.hosting-sg-multi-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.hosting-sg-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.hosting-sg-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}
.hosting-sg-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #ea580c;
}

/* Modern select (2026) */
.ns-mselect {
  position: relative;
  width: 100%;
}
.ns-mselect-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0);
}
.ns-mselect-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem 0.65rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ns-mselect-trigger:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.ns-mselect.is-open .ns-mselect-trigger,
.ns-mselect-trigger:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.14);
}
.ns-mselect-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-mselect-value.is-placeholder {
  color: #94a3b8;
  font-weight: 550;
}
.ns-mselect-chevron {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f1f5f9;
  transition: transform 0.18s ease, background 0.15s ease, color 0.15s ease;
}
.ns-mselect.is-open .ns-mselect-chevron {
  transform: rotate(180deg);
  background: #fff7ed;
  color: #c2410c;
}
.ns-mselect.is-disabled .ns-mselect-trigger {
  opacity: 0.6;
  cursor: not-allowed;
}
.ns-mselect-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  animation: nsMselectIn 0.14s ease;
}
@keyframes nsMselectIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.ns-mselect-search-wrap {
  padding: 0.65rem 0.65rem 0.35rem;
  border-bottom: 1px solid #f1f5f9;
}
.ns-mselect-search {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.86rem;
  color: #0f172a;
}
.ns-mselect-search:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.ns-mselect-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  max-height: 16rem;
  overflow-y: auto;
}
.ns-mselect-option {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.ns-mselect-option:hover {
  background: #fff7ed;
}
.ns-mselect-option.is-selected {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fed7aa;
}
.ns-mselect-option-main {
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
  word-break: break-word;
}
.ns-mselect-option-meta {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 550;
}
.ns-mselect-option.is-blank .ns-mselect-option-main {
  color: #94a3b8;
  font-weight: 550;
}
.ns-mselect-empty {
  padding: 0.85rem 0.75rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.84rem;
}

.hosting-sg-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfcfe;
  overflow: visible;
  min-height: 9rem;
}
.hosting-sg-panel-servers,
.hosting-sg-panel-pkg {
  padding: 0.85rem 1rem;
  min-width: 0;
}
.hosting-sg-panel-servers {
  border-right: 1px solid #e8edf3;
  background: #fff;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
}
.hosting-sg-panel-pkg {
  overflow: visible;
}
.hosting-sg-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.hosting-sg-servers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 14rem;
  overflow-y: auto;
}
.hosting-sg-servers li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.1rem 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
}
.hosting-sg-srv-name {
  font-size: 0.86rem;
  font-weight: 650;
  color: #0f172a;
  grid-column: 1;
}
.hosting-sg-srv-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  grid-column: 1;
}
.hosting-sg-srv-type {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
}
.hosting-sg-empty {
  border: 0 !important;
  background: transparent !important;
  color: #94a3b8;
  font-size: 0.84rem;
  padding: 0.35rem 0 !important;
}
@media (max-width: 720px) {
  .hosting-sg-panel {
    grid-template-columns: 1fr;
  }
  .hosting-sg-panel-servers {
    border-right: 0;
    border-bottom: 1px solid #e8edf3;
    border-radius: 12px 12px 0 0;
  }
}
.hosting-sheet-foot {
  justify-content: space-between;
  align-items: center;
}
.domain-sheet-foot-right {
  display: flex;
  gap: 0.65rem;
  margin-left: auto;
}
.hosting-prod-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.55rem 1.15rem 0;
  border-bottom: 1px solid var(--line, #e8edf3);
  background: #fafbfc;
}
.hosting-prod-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
}
.hosting-prod-tab:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.03);
}
.hosting-prod-tab.is-active {
  color: #0f172a;
  border-bottom-color: #ff8a1f;
}
.hosting-prod-body {
  min-height: 280px;
}
.hosting-prod-pane {
  display: none;
}
.hosting-prod-pane.is-active {
  display: block;
}
.hosting-prod-foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-left: auto;
  align-items: center;
}
.hosting-groups-manage > header {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.hosting-groups-manage > header h2 {
  margin: 0;
  font-size: 1rem;
}
@media (max-width: 900px) {
  .hosting-filter-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .hosting-price-head,
  .hosting-price-row,
  .hosting-feature-head,
  .hosting-feature-row {
    grid-template-columns: 1fr 1fr;
  }
}


/* Orders � modern NexStack create form (WHMCS flow) */
.sum-badge.is-warn { background: #fff7ed; color: #c2410c; }
.sum-badge.is-cancelled { background: #f1f5f9; color: #64748b; }

/* Order view */
.ns-ov-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ns-ov-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ns-ov-status.is-pending { background: #fff7ed; color: #c2410c; }
.ns-ov-status.is-active { background: #ecfdf5; color: #047857; }
.ns-ov-status.is-cancelled { background: #f1f5f9; color: #64748b; }
.ns-ov-status-inline { font-size: 0.72rem; }
.ns-ov-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 320px);
  gap: 1.15rem;
  align-items: start;
}
.ns-ov-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.ns-ov-card.panel-card {
  padding: 0;
  overflow: hidden;
}
.ns-ov-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.ns-ov-card > header h2 {
  margin: 0;
  font-size: 0.98rem;
}
.ns-ov-meta {
  margin: 0;
  padding: 1rem 1.15rem 1.15rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}
.ns-ov-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ns-ov-meta dt {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ns-ov-meta dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}
.ns-ov-client {
  color: #0f172a;
  font-weight: 700;
}
.ns-ov-client:hover { color: #c2410c; }
.ns-ov-items th,
.ns-ov-items td { vertical-align: top; }
.ns-ov-notes {
  margin: 0;
  padding: 1rem 1.15rem 1.15rem;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.ns-ov-aside {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ns-ov-summary.panel-card {
  padding: 0;
  overflow: hidden;
}
.ns-ov-summary > header {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.ns-ov-summary > header h2 {
  margin: 0;
  font-size: 0.98rem;
}
.ns-ov-totals {
  margin: 0;
  padding: 0.35rem 0;
}
.ns-ov-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  border-top: 1px solid #f1f5f9;
}
.ns-ov-totals > div:first-child { border-top: 0; }
.ns-ov-totals dt {
  margin: 0;
  color: #64748b;
  font-weight: 550;
}
.ns-ov-totals dd {
  margin: 0;
  font-weight: 750;
  color: #0f172a;
}
.ns-ov-totals .is-grand {
  background: #f8fafc;
  border-top: 1px dashed #e2e8f0;
  font-size: 1.02rem;
}
.ns-ov-totals .is-grand dd {
  color: #0f172a;
  font-weight: 800;
}
.ns-ov-back {
  width: 100%;
  justify-content: center;
}
.ns-ov-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--line);
}
.ns-ov-actions-muted {
  flex-direction: column;
  gap: 0.65rem;
  color: #64748b;
  font-size: 0.9rem;
}
.ns-ov-action-btn {
  min-width: 10.5rem;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
}
@media (max-width: 980px) {
  .ns-ov-layout { grid-template-columns: 1fr; }
  .ns-ov-aside { position: static; }
  .ns-ov-meta { grid-template-columns: 1fr; }
}


.ns-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(375px, 475px);
  gap: 1.15rem 1.25rem;
  align-items: start;
  overflow: visible;
}
.ns-order-form {
  overflow: visible;
}
.ns-order-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ns-order-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: 0.05em;
}
.ns-order-section {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}
.ns-order-section.is-locked {
  opacity: 0.48;
  filter: grayscale(0.15);
  pointer-events: none;
  user-select: none;
}
.ns-order-lock-note {
  display: none;
  margin: 0;
  padding: 0.7rem 0.95rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 550;
}
.ns-order-section.is-locked .ns-order-lock-note {
  display: block;
}
.ns-order-submit.is-disabled,
.ns-order-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ns-order-card.panel-card {
  padding: 0;
  overflow: hidden;
}
.ns-order-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.ns-order-card > header h2 {
  margin: 0;
  font-size: 0.98rem;
}
.ns-order-card > .form-grid {
  padding: 1rem 1.15rem 1.15rem;
}
.ns-order-checks,
.ns-order-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  align-items: center;
}
.ns-check {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 550;
  color: #334155;
  cursor: pointer;
}
.ns-check input {
  width: 16px !important;
  height: 16px !important;
  margin: 0;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.ns-check input[type="checkbox"] {
  border-radius: 4px;
}
.ns-check input[type="radio"] {
  border-radius: 50%;
}
.ns-check input:hover {
  border-color: #94a3b8;
}
.ns-check input:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 2px rgba(255, 138, 31, 0.15);
}
.ns-check input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #ff8a1f;
  border-bottom: 2px solid #ff8a1f;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  margin-top: -1px;
  transition: transform 0.1s ease;
}
.ns-check input[type="checkbox"]:checked {
  background: #fff;
  border-color: #94a3b8;
}
.ns-check input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}
.ns-check input[type="radio"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8a1f;
  transform: scale(0);
  transition: transform 0.1s ease;
}
.ns-check input[type="radio"]:checked {
  background: #fff;
  border-color: #94a3b8;
}
.ns-check input[type="radio"]:checked::after {
  transform: scale(1);
}
.ns-order-products-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.ns-order-products-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
}
.ns-order-product-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ns-order-add {
  align-self: flex-start;
}
.ns-order-add i {
  width: 15px;
  height: 15px;
}
.ns-order-hint {
  margin: 0.65rem 1.15rem 1.05rem;
  font-size: 0.82rem;
  color: #94a3b8;
}
.ns-order-domain-card .ns-order-radios {
  padding: 0.15rem 1.15rem 0;
}
.ns-order-notes-card textarea {
  max-width: none;
  min-height: 7rem;
}
.ns-product-block .wp-domain-row.is-hidden {
  display: none !important;
}
.ns-order-card .field-hint {
  display: inline;
  margin: 0 0 0 0.35rem;
  font-style: normal;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  color: #94a3b8;
}
.ns-order-aside {
  position: sticky;
  top: 5.25rem; /* sit below sticky topbar */
  align-self: start;
  z-index: 25;
  max-height: calc(100vh - 6rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 0.25rem;
}
.ns-order-summary-title {
  margin: 0 0 0.55rem;
  text-align: center;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  color: #334155;
}
.ns-order-summary {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.ns-order-summary-items {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.9rem;
  max-height: 16rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 3.25rem;
  border-bottom: 1px dashed #e2e8f0;
}
.ns-order-summary-items li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0;
  background: transparent;
  border: 0;
}
.ns-order-summary-items li.is-empty {
  justify-content: center;
  color: #94a3b8;
  font-size: 0.86rem;
  padding: 0.85rem 0.5rem;
}
.ns-order-summary-items li.is-setup strong {
  font-weight: 650;
  color: #64748b;
}
.ns-sum-line strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.ns-sum-cycle,
.ns-sum-domain {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: #64748b;
}
.ns-order-summary-items em {
  font-style: normal;
  font-weight: 750;
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
  padding-top: 0.05rem;
}
.ns-order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: #334155;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}
.ns-order-total-row.is-sub {
  background: #f8fafc;
  color: #64748b;
}
.ns-order-total-row.is-sub strong {
  color: #0f172a;
  font-weight: 700;
}
.ns-order-total-row.is-grand {
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 750;
}
.ns-order-total-row.is-grand strong {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
}
.ns-order-total-row.is-recurring {
  background: #fff;
  color: #64748b;
  font-weight: 650;
}
.ns-order-total-row.is-recurring strong {
  color: #334155;
  font-weight: 750;
}
.ns-order-total-row strong {
  text-align: right;
  font-weight: 750;
}
.ns-order-submit,
.ns-order-cancel {
  width: 100%;
  margin: 0 0 0.5rem;
  justify-content: center;
}
.ns-order-cancel {
  margin-bottom: 0;
}

/* WHMCS-style Manage Order — white page, gray data panels, black text */
.ns-ov-status.is-fraud { background: #fef2f2; color: #b91c1c; }
.sum-badge.is-fraud { background: #fef2f2; color: #b91c1c; }

.ns-mo-form {
  background: #fff;
  color: #111;
}

.ns-mo-box-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  align-items: stretch;
}
.ns-mo-box {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  padding: 0.75rem 0.85rem 0.65rem;
  margin-bottom: 0;
  min-width: 0;
}
.ns-mo-field {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.3rem 0.45rem;
  align-items: center;
  padding: 0.28rem 0;
  border-bottom: 1px solid #e2e2e2;
}
.ns-mo-field:last-child { border-bottom: 0; }
.ns-mo-field-top { align-items: start; }
.ns-mo-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #222;
}
.ns-mo-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: #111;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.ns-mo-value a {
  color: #1a5fb4;
  font-weight: 650;
  text-decoration: none;
}
.ns-mo-value a:hover { text-decoration: underline; }
.ns-mo-line {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #444;
  line-height: 1.35;
}
.ns-mo-muted {
  font-style: normal;
  font-weight: 500;
  color: #666;
  font-size: 0.82rem;
}
.ns-mo-placeholder {
  color: #777;
}
.ns-mo-placeholder em {
  font-style: normal;
  font-size: 0.75rem;
  color: #999;
}
.ns-mo-select {
  width: 100%;
  max-width: 100%;
  min-height: 2.15rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 0.86rem;
}

.ns-mo-field-notes .ns-mo-notes-text {
  font-size: 0.84rem;
  font-weight: 500;
  color: #111;
  line-height: 1.45;
}
.ns-mo-field-notes .ns-mo-placeholder {
  font-style: italic;
}

.ns-mo-placedby {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  color: #1a5fb4;
  cursor: pointer;
  line-height: 1.35;
}
.ns-mo-placedby:hover {
  text-decoration: underline;
}
.ns-mo-placedby-role {
  font-weight: 500;
  color: #555;
}
.ns-mo-placedby:hover .ns-mo-placedby-role {
  color: #1a5fb4;
}
body.ns-mo-placedby-open { overflow: hidden; }
.ns-mo-placedby-pop[hidden] { display: none !important; }
.ns-mo-placedby-pop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.ns-mo-placedby-pop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}
.ns-mo-placedby-pop-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 1rem 1.1rem 0.95rem;
}
.ns-mo-placedby-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ns-mo-placedby-pop-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  color: #0f172a;
}
.ns-mo-placedby-pop-x {
  appearance: none;
  border: 0;
  background: #f1f5f9;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
  color: #475569;
  cursor: pointer;
}
.ns-mo-placedby-pop-x:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.ns-mo-placedby-dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.ns-mo-placedby-dl > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #eef2f7;
}
.ns-mo-placedby-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ns-mo-placedby-dl dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}
.ns-mo-placedby-dl dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 550;
  color: #0f172a;
  min-width: 0;
  word-break: break-word;
}
.ns-mo-placedby-dl a {
  color: #1a5fb4;
  text-decoration: none;
  font-weight: 650;
}
.ns-mo-placedby-dl a:hover { text-decoration: underline; }
.ns-mo-placedby-pop-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
}

.ns-mo-items-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.ns-mo-items-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.ns-mo-items-table thead th {
  background: #e8e8e8;
  color: #111;
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #c8c8c8;
  white-space: nowrap;
}
.ns-mo-items-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #e4e4e4;
  color: #111;
  font-size: 0.86rem;
  vertical-align: top;
  background: #fff;
}
.ns-mo-item-row td { background: #fafafa; }
.ns-mo-desc-meta {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #555;
}
.ns-mo-empty {
  text-align: center;
  color: #666;
  padding: 1.25rem !important;
}
.ns-mo-paystatus {
  font-weight: 700;
  font-size: 0.8rem;
}
.ns-mo-paystatus.is-unpaid { color: #b45309; }
.ns-mo-paystatus.is-paid { color: #15803d; }
.ns-mo-placeholder-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #888;
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 0.08rem 0.4rem;
  border-radius: 8px;
  vertical-align: middle;
}

.ns-mo-config-row td {
  background: #efefef !important;
  border-bottom: 1px solid #d0d0d0;
  padding: 0.65rem 0.7rem 0.75rem !important;
}
.ns-mo-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: end;
  width: 100%;
}
.ns-mo-config > label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  min-width: 0;
}
.ns-mo-config input[type="text"],
.ns-mo-config select {
  width: 100%;
  min-height: 2.15rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
}
.ns-mo-config input:focus,
.ns-mo-config select:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.ns-mo-config.is-locked,
.ns-mo-config-row.is-locked td {
  opacity: 1;
}
.ns-mo-config.is-locked input[type="text"],
.ns-mo-config.is-locked .ns-mo-ss-trigger,
.ns-mo-config.is-locked .ns-check {
  opacity: 0.72;
  cursor: not-allowed;
  color: #64748b;
}
.ns-mo-config.is-locked input[type="text"],
.ns-mo-ss.is-locked .ns-mo-ss-trigger {
  background: #eef2f7 !important;
  border-color: #d8dee8 !important;
  color: #475569 !important;
  box-shadow: none !important;
}
.ns-mo-ss.is-locked .ns-mo-ss-trigger:hover,
.ns-mo-ss.is-locked .ns-mo-ss-trigger:focus {
  border-color: #d8dee8 !important;
  box-shadow: none !important;
}
.ns-mo-ss.is-locked .ns-mo-ss-chevron {
  opacity: 0.45;
}
.ns-mo-config.is-locked .ns-check input {
  cursor: not-allowed;
  opacity: 0.85;
}

/* Searchable server picker (opens downward, filter + scroll) */
.ns-mo-ss {
  position: relative;
  width: 100%;
}
.ns-mo-ss-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0);
}
.ns-mo-ss-trigger {
  width: 100%;
  min-height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.ns-mo-ss-trigger:hover {
  border-color: #cbd5e1;
}
.ns-mo-ss.is-open .ns-mo-ss-trigger,
.ns-mo-ss-trigger:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.ns-mo-ss-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-mo-ss-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f1f5f9;
  transition: transform 0.15s ease;
}
.ns-mo-ss.is-open .ns-mo-ss-chevron {
  transform: rotate(180deg);
  background: #fff7ed;
  color: #c2410c;
}
.ns-mo-ss-panel {
  position: fixed;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  max-width: min(28rem, calc(100vw - 1rem));
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.ns-mo-ss-panel[hidden] { display: none !important; }
.ns-mo-ss-pinned {
  flex-shrink: 0;
  padding: 0.3rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.ns-mo-ss-search-wrap {
  flex-shrink: 0;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.ns-mo-ss-search {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  color: #0f172a;
  min-height: 2rem;
}
.ns-mo-ss-search:focus {
  outline: none;
  border-color: #ff8a1f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.ns-mo-ss-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.3rem 0.3rem 0.65rem;
  max-height: 11rem;
  scrollbar-gutter: stable;
}
.ns-mo-ss-group {
  padding: 0.35rem 0.55rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.ns-mo-ss-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.42rem 0.65rem 0.42rem 0.9rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 450;
  color: #111;
  cursor: pointer;
}
.ns-mo-ss-option:hover,
.ns-mo-ss-option.is-active {
  background: #fff7ed;
}
.ns-mo-ss-option.is-selected {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fed7aa;
  font-weight: 600;
}
.ns-mo-ss-option.is-special {
  font-weight: 600;
  color: #334155;
  padding-left: 0.65rem;
}
.ns-mo-ss-empty {
  padding: 0.75rem 0.65rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
}
.ns-mo-config-checks {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.85rem 1rem;
  padding-bottom: 0.28rem;
  white-space: nowrap;
}
.ns-mo-config-checks .ns-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #222;
  margin: 0;
  white-space: nowrap;
}
.ns-mo-config-checks .ns-check input {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: #333;
}

.ns-mo-items-table tfoot td {
  background: #333 !important;
  color: #fff !important;
  border-bottom: 0;
  padding: 0.7rem 0.75rem !important;
  font-size: 0.92rem;
}
.ns-mo-total-label {
  text-align: right;
  font-weight: 700;
}
.ns-mo-total-amount {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ns-mo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 1.15rem 0 0.75rem;
  padding: 0.95rem 0.35rem 0.15rem;
  border-top: 1px solid #ddd;
  background: #fff;
}
.ns-mo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.ns-mo-btn i { width: 14px; height: 14px; }
.ns-mo-btn:hover:not(:disabled) { background: #e8e8e8; }
.ns-mo-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ns-mo-btn-soft {
  background: #fff;
  border-color: #bbb;
}
.ns-mo-btn-accept {
  background: #2e7d32;
  border-color: #1b5e20;
  color: #fff;
}
.ns-mo-btn-accept:hover:not(:disabled) {
  background: #1b5e20;
  color: #fff;
}
.ns-mo-btn-delete {
  background: #c62828;
  border-color: #8e0000;
  color: #fff;
}
.ns-mo-btn-delete:hover:not(:disabled) {
  background: #8e0000;
  color: #fff;
}
.ns-mo-foot {
  display: flex;
  justify-content: flex-start;
  margin: 0.35rem 0 0.75rem;
  background: #fff;
}

/* Accept order confirmation modal */
body.ns-mo-confirm-open { overflow: hidden; }
.ns-mo-confirm[hidden] { display: none !important; }
.ns-mo-confirm {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.ns-mo-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}
.ns-mo-confirm-panel {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 1.55rem 1.45rem 1.3rem;
  animation: nsMoConfirmIn 0.22s ease-out;
}
@keyframes nsMoConfirmIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.ns-mo-confirm-x {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.ns-mo-confirm-x:hover {
  background: #f1f5f9;
  color: #334155;
}
.ns-mo-confirm-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto 0.85rem;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #15803d;
}
.ns-mo-confirm-icon i {
  width: 1.45rem;
  height: 1.45rem;
}
.ns-mo-confirm-icon.is-warn {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
}
.ns-mo-confirm-item-meta em.is-terminate {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.ns-mo-confirm-note {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  color: #64748b;
  text-align: center;
}
.ns-mo-confirm-ask {
  margin-top: 0.35rem !important;
  margin-bottom: 1.05rem !important;
  font-weight: 650;
  color: #0f172a !important;
}
.ns-mo-confirm-title {
  margin: 0 0 0.4rem;
  text-align: center;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.ns-mo-confirm-lead {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}
.ns-mo-confirm-lead strong { color: #0f172a; font-weight: 700; }
.ns-mo-confirm-items {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
  max-height: 14rem;
  overflow-y: auto;
}
.ns-mo-confirm-items > li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid #e8edf3;
}
.ns-mo-confirm-items > li:first-child { border-top: 0; }
.ns-mo-confirm-items > li.is-empty {
  justify-content: center;
  color: #94a3b8;
  font-size: 0.86rem;
}
.ns-mo-confirm-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.ns-mo-confirm-item-main strong {
  font-size: 0.9rem;
  color: #0f172a;
}
.ns-mo-confirm-item-main span {
  font-size: 0.78rem;
  color: #64748b;
}
.ns-mo-confirm-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}
.ns-mo-confirm-item-meta strong {
  font-size: 0.86rem;
  color: #0f172a;
}
.ns-mo-confirm-item-meta em.is-module {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: #15803d;
  background: #ecfdf5;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.ns-mo-confirm-total {
  margin: 0 0 1.15rem;
  text-align: right;
  font-size: 0.88rem;
  color: #64748b;
}
.ns-mo-confirm-total strong {
  color: #0f172a;
  font-weight: 800;
}
.ns-mo-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
.ns-mo-confirm-actions .ns-mo-btn {
  min-width: 6.5rem;
}

/* Order action progress / result popups (2026) */
body.ns-mo-progress-open { overflow: hidden; }
.ns-mo-progress[hidden] { display: none !important; }
.ns-mo-progress {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: nsMoProgressFade 0.22s ease-out;
}
@keyframes nsMoProgressFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ns-mo-progress-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}
.ns-mo-progress-card {
  position: relative;
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  padding: 2rem 1.7rem 1.65rem;
  text-align: center;
  animation: nsMoConfirmIn 0.28s ease-out;
}
.ns-mo-result-card {
  width: min(420px, 100%);
}
.ns-mo-result-message {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}
.ns-mo-confirm-icon.is-error {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #b91c1c;
}
.ns-mo-result-actions {
  display: flex;
  justify-content: center;
}
.ns-mo-result-actions .ns-mo-btn {
  min-width: 7.5rem;
}
.ns-mo-progress-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c2410c;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
.ns-mo-progress-kicker i {
  width: 0.9rem;
  height: 0.9rem;
}
.ns-mo-progress-title {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.ns-mo-progress-lead {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.45;
}
.ns-mo-progress-lead strong {
  color: #0f172a;
  font-weight: 700;
}
.ns-mo-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e8edf3;
  overflow: hidden;
  margin: 0 0 0.55rem;
}
.ns-mo-progress-fill {
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a1f 0%, #ffb347 55%, #2e7d32 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 0 1px rgba(255, 138, 31, 0.12);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  animation: nsMoProgressShimmer 1.8s linear infinite;
}
@keyframes nsMoProgressShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.ns-mo-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  color: #64748b;
}
.ns-mo-progress-pct {
  font-weight: 780;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.ns-mo-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}
.ns-mo-progress-steps > li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.9rem;
  border-top: 1px solid #e8edf3;
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color 0.2s ease, background 0.2s ease;
}
.ns-mo-progress-steps > li:first-child { border-top: 0; }
.ns-mo-progress-step-dot {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 2px solid #cbd5e1;
  background: #fff;
  color: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ns-mo-progress-step-dot i {
  width: 0.72rem;
  height: 0.72rem;
}
.ns-mo-progress-steps > li.is-active {
  color: #0f172a;
  background: #fff;
  font-weight: 650;
}
.ns-mo-progress-steps > li.is-active .ns-mo-progress-step-dot {
  border-color: #ff8a1f;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.15);
  animation: nsMoProgressPulse 1.2s ease-in-out infinite;
}
.ns-mo-progress-steps > li.is-done {
  color: #15803d;
}
.ns-mo-progress-steps > li.is-done .ns-mo-progress-step-dot {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
}
@keyframes nsMoProgressPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12); }
  50% { box-shadow: 0 0 0 6px rgba(255, 138, 31, 0.08); }
}
.ns-mo-progress.is-pending-mode .ns-mo-progress-kicker {
  color: #9a3412;
}
.ns-mo-progress.is-pending-mode .ns-mo-progress-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #ff8a1f 55%, #c2410c 100%);
  background-size: 200% 100%;
}
.ns-mo-progress.is-pending-mode .ns-mo-progress-steps > li.is-done {
  color: #c2410c;
}
.ns-mo-progress.is-pending-mode .ns-mo-progress-steps > li.is-done .ns-mo-progress-step-dot {
  border-color: #c2410c;
  background: #c2410c;
}

@media (max-width: 980px) {
  .ns-mo-config {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .ns-mo-config-checks {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}
@media (max-width: 640px) {
  .ns-mo-box-grid { grid-template-columns: 1fr; }
  .ns-mo-field { grid-template-columns: 1fr; gap: 0.15rem; }
  .ns-mo-config { grid-template-columns: 1fr; }
}

.order-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr);
  gap: 1rem;
}
.order-view-dl {
  margin: 0;
  padding: 0.85rem 1.15rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}
.order-view-dl > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
}
.order-view-dl dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}
.order-view-dl dd { margin: 0; color: #0f172a; }
.order-view-totals {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1.15rem 1.15rem;
}
.order-view-totals li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
}
.order-view-totals .is-grand {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 1.05rem;
}
.order-view-totals .is-grand strong { color: #c2410c; }

@media (max-width: 980px) {
  .ns-order-layout,
  .order-view-grid {
    grid-template-columns: 1fr;
  }
  .ns-order-aside { position: static; }
}

/* Email Settings (UI) */
.email-settings-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.email-tpl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.15rem 0.95rem;
}
.email-tpl-filter {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}
.email-tpl-filter:hover {
  border-color: #fdba74;
  color: #c2410c;
  background: var(--accent-soft);
}
.email-tpl-filter.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}
.email-field textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  resize: vertical;
  min-height: 120px;
  box-sizing: border-box;
}
.email-field textarea:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.email-config-modal-panel-sm {
  width: min(460px, 100%);
  max-height: none;
}
body.email-config-modal-open { overflow: hidden; }
.email-config-modal[hidden] { display: none !important; }
.email-config-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.email-config-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}
.email-config-modal-panel {
  position: relative;
  width: min(760px, 100%);
  min-height: min(72vh, 640px);
  max-height: min(99vh, 1012px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  animation: nsMoConfirmIn 0.22s ease-out;
}
.email-config-modal-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.2rem 1.35rem 1rem;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  flex-shrink: 0;
}
.email-config-modal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  color: var(--text);
}
.email-config-modal-head p {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--mute);
}
.email-config-modal-x {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin-top: -0.15rem;
}
.email-config-modal-x:hover {
  background: #f1f5f9;
  color: #334155;
}
.email-config-modal-body {
  overflow: hidden;
  padding: 1.1rem 1.35rem 1.25rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.email-config-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 1.05rem 1.1rem 1.1rem;
}
.email-config-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}
.email-settings-form { margin: 0; }
.email-settings-subtitle {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.01em;
}
.email-settings-lead {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.86rem;
  color: var(--mute);
  line-height: 1.45;
}
.email-settings-form .form-grid,
.email-config-card .form-grid {
  padding: 0;
}
.email-settings-test-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}
.email-settings-test-field {
  flex: 1;
  min-width: 0;
}
.email-settings-test-row > .btn {
  flex-shrink: 0;
  white-space: nowrap;
  margin-bottom: 1px;
}
@media (max-width: 720px) {
  .email-settings-test-row {
    flex-direction: column;
    align-items: stretch;
  }
}
.email-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.email-field:has(.email-field-info.is-open) {
  z-index: 5;
}
.email-field-top {
  display: flex;
  align-items: flex-start;
  gap: 0.22rem;
  min-height: 0.95rem;
  margin-bottom: 0.28rem;
}
.email-field-top > span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  line-height: 1;
}
.email-field-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: -1px;
}
.email-field-info {
  width: 0.81rem;
  height: 0.81rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transform: translateY(-1px);
}
.email-field-info i,
.email-field-info svg {
  width: 0.73rem !important;
  height: 0.73rem !important;
  stroke-width: 2.25;
}
.email-field-info:hover,
.email-field-info.is-open {
  color: #c2410c;
  background: transparent;
}
.email-field-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(260px, 72vw);
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
  animation: nsMoConfirmIn 0.16s ease-out;
  pointer-events: none;
}
.email-field-tip::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: -5px;
  width: 10px;
  height: 10px;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
}
.email-field-tip[hidden] {
  display: none !important;
}
/* Right-column tips open leftward so they stay in the modal */
.email-config-card .form-grid .email-field:nth-child(2n) .email-field-tip {
  left: auto;
  right: 0;
}
.email-config-card .form-grid .email-field:nth-child(2n) .email-field-tip::before {
  left: auto;
  right: 0.55rem;
}
/* Bottom test-email tip opens upward so it never overflows the popup */
.email-settings-test-field .email-field-tip {
  top: auto;
  bottom: calc(100% + 8px);
}
.email-settings-test-field .email-field-tip::before {
  top: auto;
  bottom: -5px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.email-field input,
.email-field select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  box-sizing: border-box;
}
.email-field input:focus,
.email-field select:focus {
  outline: none;
  border-color: #ff8a1f;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.email-settings-toggle-row {
  display: flex;
  align-items: center;
  min-height: 2.4rem;
}
.email-settings-toggle-row .toggle {
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
}
.email-settings-slug {
  font-size: 0.82rem;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  color: #334155;
}
.email-settings-actions {
  display: inline-flex;
  gap: 0.4rem;
  justify-content: flex-end;
}
.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* General Settings (tabbed) */
.gs-panel > header {
  border-bottom: 0;
  padding-bottom: 0.35rem;
}
.gs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.15rem 1.15rem 0.95rem;
  border-bottom: 1px solid #eef2f7;
}
.gs-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.gs-tab:hover {
  border-color: #fdba74;
  color: #c2410c;
  background: var(--accent-soft);
}
.gs-tab.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}
.gs-tab-body {
  padding: 1.25rem 1.2rem 1.55rem;
  background:
    radial-gradient(900px 380px at 8% -8%, rgba(255, 138, 31, 0.11), transparent 55%),
    radial-gradient(700px 320px at 92% 0%, rgba(56, 189, 248, 0.09), transparent 50%),
    linear-gradient(180deg, #eef2f7 0%, #f5f7fb 45%, #f8fafc 100%);
}
.gs-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  max-width: 78rem;
  align-items: stretch;
}
.gs-section {
  --gs-accent: #ff8a1f;
  --gs-accent-soft: rgba(255, 138, 31, 0.14);
  --gs-accent-wash: rgba(255, 138, 31, 0.07);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.045);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.gs-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gs-accent), color-mix(in srgb, var(--gs-accent) 55%, #38bdf8));
}
.gs-section:nth-of-type(4n + 1) {
  --gs-accent: #ff8a1f;
  --gs-accent-soft: rgba(255, 138, 31, 0.14);
  --gs-accent-wash: rgba(255, 138, 31, 0.07);
}
.gs-section:nth-of-type(4n + 2) {
  --gs-accent: #0ea5e9;
  --gs-accent-soft: rgba(14, 165, 233, 0.14);
  --gs-accent-wash: rgba(14, 165, 233, 0.07);
}
.gs-section:nth-of-type(4n + 3) {
  --gs-accent: #10b981;
  --gs-accent-soft: rgba(16, 185, 129, 0.14);
  --gs-accent-wash: rgba(16, 185, 129, 0.07);
}
.gs-section:nth-of-type(4n + 4) {
  --gs-accent: #8b5cf6;
  --gs-accent-soft: rgba(139, 92, 246, 0.14);
  --gs-accent-wash: rgba(139, 92, 246, 0.07);
}
.gs-section:hover {
  border-color: color-mix(in srgb, var(--gs-accent) 35%, #e2e8f0);
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.05),
    0 16px 36px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.gs-section-wide {
  grid-column: 1 / -1;
}
.gs-company-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem 1.15rem 1.2rem 1.25rem;
}
.gs-company-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
}
.gs-company-col:nth-child(1) {
  --col-accent: #ff8a1f;
  --col-soft: rgba(255, 138, 31, 0.12);
}
.gs-company-col:nth-child(2) {
  --col-accent: #0ea5e9;
  --col-soft: rgba(14, 165, 233, 0.12);
}
.gs-company-col:nth-child(3) {
  --col-accent: #10b981;
  --col-soft: rgba(16, 185, 129, 0.12);
}
.gs-company-col-head {
  padding: 0.9rem 1rem 0.8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--col-accent) 14%, #eef2f7);
  background: linear-gradient(135deg, var(--col-soft), transparent 60%);
}
.gs-company-col-head h4 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #0f172a;
}
.gs-company-col-head h4::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--col-accent);
  box-shadow: 0 0 0 3px var(--col-soft);
  flex-shrink: 0;
}
.gs-company-col .gs-fields {
  grid-template-columns: 1fr;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem 1rem;
}
.gs-company-col .gs-field {
  padding: 0.7rem 0.75rem;
}
@media (max-width: 1100px) {
  .gs-company-cols {
    grid-template-columns: 1fr;
  }
}
.gs-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 1.25rem 1.05rem 1.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--gs-accent) 12%, #eef2f7);
  background:
    linear-gradient(135deg, var(--gs-accent-soft), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--gs-accent-wash) 100%);
}
.gs-section-head h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.gs-section-head h3::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--gs-accent);
  box-shadow: 0 0 0 4px var(--gs-accent-soft);
  flex-shrink: 0;
}
.gs-section-head p {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.45;
}
.gs-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  max-width: none;
  padding: 1rem 1.15rem 1.2rem 1.25rem;
  flex: 1;
  align-content: start;
}
.gs-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  align-items: start;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.gs-field:hover {
  border-color: color-mix(in srgb, var(--gs-accent) 28%, #e2e8f0);
  background: linear-gradient(180deg, #ffffff 0%, var(--gs-accent-wash) 100%);
}
.gs-field:has(textarea),
.gs-field:has(.gs-choice-stack),
.gs-field:has(select[multiple]),
.gs-field:has(.gs-code),
.gs-field-tall,
.gs-field-wide {
  grid-column: auto;
}
.gs-field > label,
.gs-field > .gs-label {
  padding-top: 0;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #334155;
  text-transform: none;
}
/* Checkbox / radio rows: title + control as one readable block */
.gs-field:has(> .gs-control > .gs-check),
.gs-field:has(> .gs-control > .gs-choice-stack) {
  gap: 0.45rem;
}
.gs-field:has(> .gs-control > .gs-check:only-child) > label,
.gs-field:has(> .gs-control > .gs-check:only-child) > .gs-label {
  display: none;
}
.gs-field:has(> .gs-control > .gs-check:only-child) .gs-check {
  margin-top: 0;
  width: 100%;
  align-items: flex-start;
}
.gs-field:has(> .gs-control > .gs-check:only-child) .gs-check span {
  font-size: 0.9rem;
  font-weight: 550;
  color: #334155;
  line-height: 1.45;
}
.gs-choice-stack {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.gs-choice-stack .gs-check {
  margin-top: 0;
}
.gs-choice-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.gs-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.35rem 0.85rem;
}
.gs-section-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--gs-accent-wash, #f8fafc);
  border: 1px solid color-mix(in srgb, var(--gs-accent, #94a3b8) 18%, #eef2f7);
  font-size: 0.82rem;
  font-weight: 650;
  color: #475569;
}
.gs-phone-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.55rem;
}
.gs-field-tall {
  align-items: stretch;
}
.gs-field-tall > label,
.gs-field-tall > .gs-label {
  padding-top: 0.85rem;
}
.gs-control textarea.gs-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  min-height: 220px;
}
.gs-control select.gs-multiselect {
  min-height: 11rem;
  padding: 0.45rem;
}
.gs-suffix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  max-width: 16rem;
}
.gs-suffix-row.gs-prefix-row {
  grid-template-columns: auto minmax(0, 1fr);
}
.gs-suffix {
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
}
.gs-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.25rem;
}
.gs-control input[type="text"],
.gs-control input[type="email"],
.gs-control input[type="url"],
.gs-control input[type="number"],
.gs-control select,
.gs-control textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.8rem;
  font-size: 0.92rem;
  color: #0f172a;
}
.gs-control textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.45;
}
.gs-control textarea.gs-textarea-fixed {
  resize: none;
  min-height: 11.5rem;
  height: 11.5rem;
  line-height: 1.5;
}
.gs-control input:focus,
.gs-control select:focus,
.gs-control textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--gs-accent, #ff8a1f) 65%, #fdba74);
  box-shadow: 0 0 0 3px var(--gs-accent-soft, rgba(255, 138, 31, 0.14));
}
.gs-hint {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.4;
}
.gs-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.15rem;
  font-size: 0.86rem;
  font-weight: 550;
  color: #334155;
  cursor: pointer;
}
.gs-check input[type="radio"],
.gs-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 1.5px solid #334155;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  accent-color: unset;
}
.gs-check input[type="checkbox"] {
  border-radius: 4px;
}
.gs-check input[type="radio"] {
  border-radius: 50%;
}
.gs-check input[type="radio"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8a1f;
  transform: scale(0);
  transition: transform 0.1s ease;
}
.gs-check input[type="radio"]:checked {
  background: #fff;
  border-color: #334155;
}
.gs-check input[type="radio"]:checked::after {
  transform: scale(1);
}
.gs-check input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #ff8a1f;
  border-bottom: 2px solid #ff8a1f;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  margin-top: -1px;
  transition: transform 0.1s ease;
}
.gs-check input[type="checkbox"]:checked {
  background: #fff;
  border-color: #334155;
}
.gs-check input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}
.gs-check input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 138, 31, 0.18);
}
.gs-form-footer {
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 138, 31, 0.06), transparent 45%),
    #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  max-width: none;
}
.gs-placeholder {
  text-align: center;
  padding: 2.5rem 1rem 2.2rem;
  color: #64748b;
}
.gs-placeholder-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.85rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
}
.gs-placeholder-icon i {
  width: 1.25rem;
  height: 1.25rem;
}
.gs-placeholder h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #0f172a;
}
.gs-placeholder p {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
@media (max-width: 980px) {
  .gs-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .gs-field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .gs-field > label,
  .gs-field > .gs-label {
    padding-top: 0;
  }
  .gs-section-head p {
    padding-left: 0;
  }
}

/* Staff / Admins */
.staff-you {
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.staff-role {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.staff-role-full_admin {
  background: #fff7ed;
  color: #c2410c;
}
.staff-role-sales {
  background: #e0f2fe;
  color: #0369a1;
}
.staff-role-support {
  background: #ecfdf5;
  color: #047857;
}

/* Invoice list summary + filter card (corporate) */
.invoice-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.invoice-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}
.invoice-summary-label {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
}
.invoice-summary-value {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
}
.invoice-summary-item.is-paid {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.invoice-summary-item.is-paid .invoice-summary-value { color: #166534; }
.invoice-summary-item.is-unpaid {
  border-color: #fed7aa;
  background: #fff7ed;
}
.invoice-summary-item.is-unpaid .invoice-summary-value { color: #c2410c; }
.invoice-summary-item.is-overdue {
  border-color: #fecaca;
  background: #fef2f2;
}
.invoice-summary-item.is-overdue .invoice-summary-value { color: #b91c1c; }

.invoice-filter-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.75rem;
}

.invoice-filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}
.invoice-filter-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 1.1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.invoice-filter-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--text);
}
.invoice-filter-heading-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid #fed7aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #c2410c;
}
.invoice-filter-heading-icon i,
.invoice-filter-heading-icon svg {
  width: 16px;
  height: 16px;
  color: #ea580c;
}
.invoice-filter-heading strong {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text);
}
.invoice-filter-heading p {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--mute);
  font-weight: 500;
}
.invoice-filter-panel-top .filter-collapse {
  background: #fff;
  border-color: var(--line);
  color: #64748b;
}

.invoice-filter-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
}
.invoice-filter-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  padding: 1rem 1.1rem 1.1rem;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.invoice-filter-col-main {
  border-right: 1px solid var(--line);
  background: #fff;
}
.invoice-filter-col-dates {
  background: #fbfdff;
}
.invoice-filter-col-head {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.15rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}
.invoice-filter-col-head i,
.invoice-filter-col-head svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}
.invoice-filter-col > label {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.invoice-filter-col > label > span {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  text-align: right;
}
.invoice-filter-col > label input,
.invoice-filter-col > label select,
.invoice-filter-range-inputs input {
  width: 100%;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
}
.invoice-filter-col > label input:focus,
.invoice-filter-col > label select:focus,
.invoice-filter-range-inputs input:focus {
  outline: none;
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.invoice-filter-col .ns-date-wrap {
  width: 100%;
}
.invoice-filter-col .ns-date-wrap input.ns-date {
  padding-right: 2.15rem;
}
.invoice-filter-range {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}
.invoice-filter-range-label {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  text-align: right;
}
.invoice-filter-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  align-items: center;
}
.invoice-filter-actions {
  margin: 0;
  padding: 0.85rem 1.1rem 1rem;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
@media (max-width: 900px) {
  .invoice-summary {
    grid-template-columns: 1fr;
  }
  .invoice-filter-cols {
    grid-template-columns: 1fr;
  }
  .invoice-filter-col-main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .invoice-filter-col > label,
  .invoice-filter-range {
    grid-template-columns: 1fr;
  }
  .invoice-filter-col > label > span,
  .invoice-filter-range-label {
    text-align: left;
  }
}

/* Invoice client searchable dropdown (single-field typeahead) */
.invoice-filter-client-label {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.invoice-filter-client-label > span {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  text-align: right;
}
.ns-client-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}
.ns-client-picker-input {
  width: 100%;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #fff;
  padding: 0.55rem 2.1rem 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
}
.ns-client-picker-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.ns-client-picker-input:focus,
.ns-client-picker.is-open .ns-client-picker-input {
  outline: none;
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.12);
}
.ns-client-picker-caret {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #94a3b8;
  pointer-events: none;
}
.ns-client-picker-drop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.ns-client-picker-list {
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  max-height: 260px;
  overflow: auto;
}
.ns-client-picker-option {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.ns-client-picker-option:hover,
.ns-client-picker-option:focus {
  background: var(--accent-soft);
  outline: none;
}
.ns-client-picker-option.is-selected {
  background: #fff4e8;
  font-weight: 650;
}
.ns-client-picker-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-client-picker-option-meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .invoice-filter-client-label {
    grid-template-columns: 1fr;
  }
  .invoice-filter-client-label > span {
    text-align: left;
  }
}

/* Invoice view modal */
body.inv-modal-open { overflow: hidden; }
.inv-modal[hidden] { display: none !important; }
.inv-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.inv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.inv-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  max-height: min(92vh, 1100px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}
.inv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.inv-modal-header-text {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.inv-modal-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-modal-x {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.inv-modal-x:hover {
  background: #f1f5f9;
  color: #334155;
}
.inv-modal-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0;
  background: #fff;
  clear: both;
}
.inv-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.inv-modal-footer .btn {
  min-height: 2.15rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 650;
}
.inv-modal-footer .btn:disabled,
.inv-modal-footer .btn[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}
.inv-doc-frame {
  background: #fff;
  padding: 1.15rem 1.35rem 1.5rem;
}

/* WHMCS-style invoice document (popup + PDF) — match BT generateInvoiceHTML */
.inv-doc {
  width: 100%;
  font-family: Arial, Helvetica, DejaVu Sans, sans-serif;
  font-size: 14px;
  color: #000;
  line-height: 1.45;
  background: #fff;
  padding: 0 4px;
  box-sizing: border-box;
}
.inv-doc-top {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
}
.inv-doc-logo-img {
  max-width: 187px;
  height: auto;
  width: auto;
  display: block;
}
.inv-doc-logo-fallback {
  font-size: 18px;
  font-weight: 700;
  color: #000;
}
.inv-doc-company {
  text-align: right;
  color: #000;
}
.inv-doc-company-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #000;
}
.inv-doc-company-line {
  font-size: 12px;
  color: #000;
  margin: 0;
  line-height: 1.45;
}
.inv-doc-bar {
  background: #efefef;
  padding: 8px;
  margin: 0 0 5px;
}
.inv-doc-bar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  display: block;
  line-height: 1.2;
}
.inv-doc-bar-sm {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: #000;
}
.inv-doc-acct-bar {
  width: 100%;
  border-collapse: collapse;
  background: #efefef;
  margin: 0 0 18px;
}
.inv-doc-acct-bar td {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  vertical-align: middle;
}
.inv-doc-acct-left { text-align: left; }
.inv-doc-acct-right { text-align: right; }
.inv-doc-meta {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
  color: #000;
}
.inv-doc-meta-left {
  width: 50%;
  vertical-align: top;
  padding-right: 18px;
}
.inv-doc-meta-right {
  width: 50%;
  vertical-align: top;
  padding-left: 18px;
  line-height: 1.8;
}
.inv-doc-cust-line {
  color: #000;
  font-size: 14px;
  margin: 0;
}
.inv-doc-cust-line.is-bold,
.inv-doc-cust-line strong {
  font-weight: 700;
}
.inv-doc-items {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  color: #000;
}
.inv-doc-items th,
.inv-doc-items td {
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
}
.inv-doc-items th {
  background: #efefef;
  font-weight: 700;
  text-align: center;
  padding: 5px;
  height: 30px;
}
.inv-doc-items tfoot td {
  background: #efefef;
  font-weight: 700;
  padding: 5px;
  height: 30px;
}
.inv-doc-td-desc.is-main {
  font-weight: 700;
}
.inv-doc-td-desc.is-addon {
  padding-left: 40px;
  font-weight: 400;
}
.inv-doc-td-amt {
  text-align: center;
}
.inv-doc-td-amt.is-main {
  font-weight: 700;
}
.inv-doc-pay-title {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 10px;
  color: #000;
}
.inv-doc-pay {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
}
.inv-doc-pay td {
  border: 1px solid #111;
  padding: 6px 8px;
  font-size: 13px;
  color: #000;
}
.inv-doc-pay-label {
  background: #efefef;
  font-weight: 600;
  width: 30%;
}
.inv-doc-pay-note {
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.45;
  color: #000;
}
.inv-doc-notes {
  margin-top: 18px;
  font-size: 13px;
  color: #000;
  white-space: pre-wrap;
}
