:root,
[data-theme='light'] {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #475569;
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-soft: #ECFDF5;
  --primary-border: #A7F3D0;
  --danger: #B91C1C;
  --danger-hover: #991B1B;
  --danger-soft: #FEF2F2;
  --danger-border: #FECACA;
  --success: #166534;
  --success-soft: #DCFCE7;
  --warning: #92400E;
  --warning-soft: #FEF3C7;
  --warning-border: #FDE68A;
  --info: #1D4ED8;
  --info-soft: #DBEAFE;
  --placeholder: #94A3B8;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.09);
  --shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.05);
  --radius: 18px;
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --bg: #0B0F17;
  --surface: #131A26;
  --border: #1F2937;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --primary: #10B981;
  --primary-dark: #34D399;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --primary-border: #065F46;
  --danger: #FCA5A5;
  --danger-hover: #FECACA;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --danger-border: #7F1D1D;
  --success: #6EE7B7;
  --success-soft: rgba(16, 185, 129, 0.16);
  --warning: #FCD34D;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --warning-border: #92400E;
  --info: #93C5FD;
  --info-soft: rgba(59, 130, 246, 0.14);
  --placeholder: #94A3B8;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.32);
}

[data-theme='neutral'] {
  --bg: #F4F1EA;
  --surface: #FCFBF9;
  --border: #E5E0D5;
  --text: #1C1917;
  --muted: #57534E;
  --primary: #2F6F4E;
  --primary-dark: #245A3D;
  --primary-soft: #EDE7D9;
  --primary-border: #B7A98F;
  --danger: #991B1B;
  --danger-hover: #7F1D1D;
  --danger-soft: #FEE2E2;
  --danger-border: #FECACA;
  --success: #166534;
  --success-soft: #DCFCE7;
  --warning: #92400E;
  --warning-soft: #FEF3C7;
  --warning-border: #FDE68A;
  --info: #1D4ED8;
  --info-soft: #DBEAFE;
  --placeholder: #78716C;
  --shadow: 0 20px 48px rgba(92, 69, 38, 0.12);
  --shadow-sm: 0 10px 28px rgba(92, 69, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.35);
  outline-offset: 2px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark svg,
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-text {
  min-width: 0;
}

.brand-text strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text small {
  display: none;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.94rem;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.24);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.btn-xs {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  border-radius: 9px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow-light {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.hero {
  padding: 52px 0 36px;
}

.hero-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.25rem, 8.5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero h1 span {
  color: var(--primary-dark);
}

.hero-lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row span::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.hero-visual {
  position: relative;
  padding-bottom: 18px;
}

.mock-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.mock-tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mock-title {
  margin: 14px 0 2px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.mock-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mock-check {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 800;
}

.mock-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.mock-line strong {
  color: var(--text);
}

.mock-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.88rem;
}

.mock-total strong {
  font-size: 1.15rem;
}

.mock-float {
  position: absolute;
  right: 12px;
  bottom: 0;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mock-float strong {
  font-size: 0.85rem;
}

.mock-float span {
  color: var(--muted);
  font-size: 0.74rem;
}

.section {
  padding: 56px 0;
}

.section-tint {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg));
}

.section-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  gap: 18px;
}

.feature-card,
.step,
.stat-card,
.panel-card,
.welcome-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feature-card {
  padding: 26px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-card h3 {
  margin: 18px 0 8px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.feature-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.feature-card li + li {
  margin-top: 8px;
}

.feature-card li::marker {
  color: var(--primary);
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  padding: 24px;
}

.step-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 800;
}

.step h3 {
  margin: 16px 0 6px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cta {
  margin: 56px 0 72px;
  padding: 44px 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 24px 50px rgba(5, 150, 105, 0.24);
}

.cta h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.cta p {
  max-width: 560px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.88);
}

.footer {
  padding: 26px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 30px 24px;
  background: linear-gradient(145deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
}

.auth-aside .brand-mark {
  background: transparent;
  box-shadow: none;
}

.auth-aside .brand-text small {
  color: rgba(255, 255, 255, 0.76);
}

.auth-message h1 {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.auth-message p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.auth-points {
  display: grid;
  gap: 10px;
}

.auth-points span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-points span::before {
  content: '✓';
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.72rem;
}

.auth-card-wrap {
  display: grid;
  place-items: center;
  padding: 34px 20px 48px;
}

.auth-card {
  width: min(100%, 430px);
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card-head h2 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.85rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field select {
  cursor: pointer;
}

.field textarea {
  min-height: 92px;
  padding: 11px 14px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--placeholder);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.13);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.alert-error {
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger);
}

.auth-back {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
}

.auth-back:hover {
  color: var(--primary-dark);
}

.app-page {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 88px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
}

.app-header-inner {
  width: min(1280px, calc(100% - 24px));
  min-height: 68px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-compact .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 800;
}

.header-user {
  display: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.app-body {
  width: min(1280px, calc(100% - 24px));
  margin-inline: auto;
  display: grid;
  gap: 20px;
  padding: 22px 0 32px;
}

.sidebar {
  display: none;
}

.nav-label {
  margin: 0 0 10px 14px;
  color: var(--placeholder);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.nav-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.nav-item.active .nav-dot {
  opacity: 1;
}

.content {
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: start;
}

.welcome-card {
  padding: 26px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-head h1,
.panel-head h2 {
  margin: 10px 0 4px;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.stat-grid {
  display: grid;
  gap: 12px;
}

.stat-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  box-shadow: none;
}

.stat-card > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-value {
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.stat-text {
  font-size: 1.35rem;
  color: var(--primary-dark);
}

.seller-note {
  padding: 18px;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.seller-note p {
  margin: 4px 0 0;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

.panel-card {
  padding: 24px;
}

.panel-card .panel-head {
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-actions {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.status-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-inactive {
  background: var(--border);
  color: var(--muted);
}

.empty {
  color: var(--muted);
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
}

.bottom-nav .nav-item {
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 4px;
  font-size: 0.72rem;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text);
  color: #FFFFFF;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  text-align: center;
  transform: translateX(-50%);
}

.toast-error {
  background: var(--danger);
}

.clients-head,
.products-head {
  align-items: center;
}

.clients-tools,
.products-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.clients-tools .field,
.products-tools .field {
  flex: 1 1 240px;
  min-width: 0;
}

.client-list {
  display: grid;
  gap: 12px;
}

.client-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}

.client-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.client-title {
  min-width: 0;
}

.client-title h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.client-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.client-seller {
  flex: 0 0 auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.client-detail {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-size: 0.88rem;
}

.client-detail span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.client-detail strong {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.client-notes {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.client-actions .btn {
  flex: 1 1 110px;
}

.client-delete-button {
  border-color: var(--danger-border);
  color: var(--danger);
}

.client-delete-button:hover {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.product-list {
  display: grid;
  gap: 12px;
}

.product-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}

.product-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-title {
  min-width: 0;
}

.product-title h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.product-unit {
  display: inline-flex;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.stock-badge-available {
  background: var(--success-soft);
  color: var(--success);
}

.stock-badge-empty {
  background: var(--warning-soft);
  color: var(--warning);
}

.product-price {
  margin-top: 14px;
  color: var(--primary-dark);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.product-card-inactive .product-price {
  color: var(--muted);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.product-actions .btn {
  flex: 1 1 120px;
}

.product-restock-button {
  flex-basis: 100%;
}

.product-delete-button {
  border-color: var(--danger-border);
  color: var(--danger);
}

.product-delete-button:hover {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.product-card-compact {
  padding: 16px;
}

.product-card-compact .product-price {
  font-size: 1.5rem;
}

.product-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.product-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.product-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.product-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.product-metric strong.product-metric-sale {
  color: var(--primary-dark);
}

.product-metric-negative strong {
  color: var(--danger);
}

.product-card-inactive .product-metric-sale {
  color: var(--muted);
}

.product-profit {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.product-profit strong {
  color: var(--text);
}

.product-basics-grid,
.product-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profit-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  background: var(--primary-soft);
}

.profit-preview-item {
  min-width: 0;
}

.profit-preview-item span {
  display: block;
  color: var(--primary-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profit-preview-item strong {
  display: block;
  margin-top: 5px;
  color: var(--primary-dark);
  font-size: 1.15rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profit-preview-negative {
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.profit-preview-negative .profit-preview-item span {
  color: var(--danger);
}

.profit-preview-negative .profit-preview-item strong {
  color: var(--danger-hover);
}

.restock-current {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.restock-current-item {
  min-width: 0;
}

.restock-current-item span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.restock-current-item strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.restock-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cost-change-tools {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #A7F3D0;
  border-radius: 14px;
  background: var(--bg);
}

.cost-change-tools .btn {
  width: 100%;
  min-height: 44px;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.modal {
  width: min(560px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #FFFFFF !important;
  color: #0F172A;
  overflow-x: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.modal * {
  box-sizing: border-box;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-card {
  display: grid;
  gap: 18px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
  border: 0;
  border-radius: 20px;
  background: #FFFFFF !important;
  color: #0F172A;
  box-shadow: none;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2 {
  margin: 10px 0 0;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.modal-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 auto;
  padding: 0 !important;
  margin: 0;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #475569;
  font-size: 0;
  line-height: 1;
}

.modal-close svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.modal-close:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.modal-fields {
  display: grid;
  gap: 14px;
}

#provision-dialog .modal-head h2,
#provision-dialog .field-label,
#provision-dialog label {
  color: #0F172A;
}

#provision-dialog .field-hint,
#provision-dialog .file-upload-hint {
  color: #475569;
}

#provision-dialog input {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
}

#provision-dialog .trial-note {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions .alert {
  flex: 1 1 100%;
}

.modal-history {
  width: min(520px, calc(100% - 24px));
}

.cost-history-list {
  display: grid;
  gap: 10px;
}

.cost-history-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.cost-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cost-history-date {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.cost-history-note {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.movement-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.movement-badge-restock {
  background: var(--success-soft);
  color: var(--success);
}

.movement-badge-initial {
  background: var(--info-soft);
  color: var(--info);
}

.movement-badge-manual {
  background: var(--border);
  color: var(--muted);
}

.cost-history-change {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.95rem;
}

.cost-history-old {
  color: var(--muted);
  text-decoration: line-through;
  overflow-wrap: anywhere;
}

.cost-history-arrow {
  color: var(--muted);
}

.cost-history-new {
  color: var(--primary-dark);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.cost-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.cost-history-stock {
  color: var(--muted);
  font-size: 0.78rem;
}

.cost-history-stock strong {
  color: var(--text);
}

.seller-note-action {
  margin-top: 14px;
}

.orders-head {
  align-items: center;
}

.orders-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orders-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.orders-tools .field {
  flex: 1 1 220px;
  min-width: 0;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}

.order-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.order-card-title {
  min-width: 0;
  flex: 1 1 260px;
}

.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.order-card-title h3 {
  margin: 7px 0 0;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.order-card-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.order-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.order-seller {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.order-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.order-status-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.order-status-preparing {
  background: var(--info-soft);
  color: var(--info);
}

.order-status-delivered {
  background: var(--success-soft);
  color: var(--success);
}

.order-status-cancelled {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.order-card-amount {
  flex: 0 0 auto;
  text-align: right;
}

.order-card-amount span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-card-amount strong {
  display: block;
  margin-top: 3px;
  color: var(--primary-dark);
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.order-details {
  margin-top: 14px;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.order-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.order-details summary::-webkit-details-marker {
  display: none;
}

.order-details summary::after {
  content: '+';
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 1rem;
  line-height: 1;
}

.order-details[open] summary::after {
  content: '−';
}

.order-items {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
}

.order-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.order-item-main {
  min-width: 0;
}

.order-item-main strong,
.order-item-main span {
  display: block;
  overflow-wrap: anywhere;
}

.order-item-main strong {
  font-size: 0.86rem;
}

.order-item-main span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.order-item-main .order-item-cost {
  color: var(--placeholder);
  font-size: 0.7rem;
}

.order-item-main .order-list-price {
  display: inline;
  color: var(--placeholder);
  font-size: 0.72rem;
  font-weight: 600;
}

.order-list-price s {
  color: var(--placeholder);
}

.order-item-subtotal {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
}

.order-notes {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.order-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.order-totals > div {
  flex: 1 1 140px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.order-totals span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-totals strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.order-totals-admin > div:last-child strong {
  color: var(--primary-dark);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.order-actions .btn {
  flex: 1 1 135px;
  min-height: 44px;
}

.order-cancel-button {
  border-color: var(--danger-border);
  color: var(--danger);
}

.order-cancel-button:hover {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.delivery-head {
  align-items: center;
}

.delivery-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.delivery-tools .field {
  flex: 1 1 220px;
  min-width: 0;
}

.delivery-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.delivery-summary-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  background: var(--primary-soft);
}

.delivery-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.delivery-summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.delivery-summary-money {
  color: var(--primary-dark);
}

.delivery-list {
  display: grid;
  gap: 14px;
}

.delivery-stop {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.delivery-stop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.delivery-stop-title {
  min-width: 0;
  flex: 1 1 200px;
}

.delivery-stop-title h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.delivery-stop-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.delivery-stop-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.delivery-collect,
.delivery-paid {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.delivery-collect {
  background: var(--warning-soft);
  color: var(--warning);
}

.delivery-paid {
  background: var(--success-soft);
  color: var(--success);
}

.delivery-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.delivery-address-icon {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 1.1rem;
  line-height: 1.2;
}

.delivery-items-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
}

.delivery-items-heading span {
  color: var(--muted);
  font-weight: 800;
}

.delivery-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.delivery-item {
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.delivery-links .btn {
  min-width: 0;
  padding: 0 10px;
  font-size: 0.82rem;
  white-space: normal;
}

.delivery-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.delivery-actions .btn {
  width: 100%;
  min-height: 44px;
  white-space: normal;
}

.delivery-done {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.modal-wide {
  width: min(720px, calc(100% - 24px));
}

.order-step {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.order-step-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.order-step-number {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
}

.order-step-head h3 {
  margin: 2px 0 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.order-step-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.order-client-list,
.order-product-picker {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.order-client-option {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.order-client-option:hover {
  border-color: var(--primary-border);
}

.order-client-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.order-client-option strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.order-client-option span {
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.order-product-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.order-product-main {
  min-width: 0;
}

.order-product-main strong,
.order-product-main span {
  display: block;
  overflow-wrap: anywhere;
}

.order-product-main strong {
  font-size: 0.88rem;
}

.order-product-main span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.order-product-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-quantity-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.order-quantity-button:hover:not(:disabled) {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.order-quantity-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.order-quantity-value {
  min-width: 28px;
  text-align: center;
  font-size: 1rem;
}

.order-price-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.order-price-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.order-price-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.order-price-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.order-price-input {
  width: 100px;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  text-align: right;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.order-price-input::-webkit-inner-spin-button,
.order-price-input::-webkit-outer-spin-button {
  margin: 0;
}

.order-special-price {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.order-product-subtotal {
  grid-column: 1 / -1;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.order-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  background: var(--primary-soft);
}

.order-preview span {
  display: block;
  color: var(--primary-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-preview strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 1.15rem;
  line-height: 1.2;
}

.order-preview strong.order-profit-negative {
  color: var(--danger);
}

.load-summary-list {
  display: grid;
  gap: 8px;
}

.load-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.load-summary-item div {
  min-width: 0;
}

.load-summary-item div strong,
.load-summary-item div span {
  display: block;
  overflow-wrap: anywhere;
}

.load-summary-item div strong {
  font-size: 0.88rem;
}

.load-summary-item div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.load-summary-item > strong {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 1rem;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .panel-card,
  .welcome-card {
    padding: 18px;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .clients-head .btn,
  .products-head .btn,
  .clients-tools .field,
  .products-tools .field {
    flex-basis: 100%;
    width: 100%;
  }

  .client-card-head,
  .product-card-head {
    flex-wrap: wrap;
  }

  .client-seller {
    max-width: 100%;
  }

  .product-basics-grid,
  .product-pricing-grid,
  .profit-preview,
  .restock-current {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-actions .btn {
    min-height: 44px;
  }

  .btn,
  .btn-sm,
  .btn-xs,
  .modal-close,
  .field input,
  .field select,
  .field textarea {
    min-height: 44px;
  }

  .btn {
    min-width: 0;
    white-space: normal;
  }

  .modal-close {
    width: 44px;
    height: 44px;
  }

  .orders-head .btn,
  .orders-tools .field,
  .seller-note-action {
    flex-basis: 100%;
    width: 100%;
  }

  .orders-head-actions {
    width: 100%;
  }

  .order-card {
    padding: 16px;
  }

  .order-card-amount {
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
  }

  .order-card-amount strong {
    margin-top: 0;
  }

  .order-actions .btn {
    flex-basis: 100%;
  }

  .delivery-tools .field {
    flex-basis: 100%;
    width: 100%;
  }

  .delivery-summary {
    gap: 8px;
  }

  .delivery-summary-item {
    padding: 12px;
  }

  .delivery-summary-item strong {
    font-size: 1.2rem;
  }

  .delivery-stop {
    padding: 14px;
  }

  .modal-card {
    padding: 18px;
  }

  .modal-actions .btn {
    flex: 1 1 100%;
  }

  .form-grid,
  .form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-actions .alert {
    margin: 0;
  }

  .field input,
  .field select,
  .field textarea,
  .form-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .form-actions .btn {
    white-space: normal;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .table-wrap table {
    width: 100%;
    min-width: 0;
  }

  .table-wrap thead {
    display: none;
  }

  #sellers-body {
    display: grid;
    gap: 12px;
  }

  #sellers-body tr {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  #sellers-body td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  #sellers-body td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  #sellers-body td.seller-main {
    display: block;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  #sellers-body td.seller-main::before,
  #sellers-body td.seller-action::before,
  #sellers-body td.empty::before {
    display: none;
  }

  #sellers-body td.seller-main strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.3;
  }

  #sellers-body td.seller-main .cell-sub {
    margin-top: 2px;
    overflow-wrap: anywhere;
  }

  #sellers-body td.seller-action {
    display: block;
    padding-top: 2px;
  }

  #sellers-body td.seller-action .btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.9rem;
  }

  #sellers-body td.empty {
    display: block;
    padding: 4px 0;
    text-align: center;
  }

  #sellers-body tr:last-child td.seller-main {
    border-bottom: 1px solid var(--border);
  }

  .bottom-nav .nav-item {
    min-width: 0;
  }
}

@media (min-width: 768px) {
  .container {
    width: min(1120px, calc(100% - 48px));
  }

  .brand-text small {
    display: block;
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .form-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .form-actions .alert {
    margin: 0;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 88px 0 56px;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }

  .section {
    padding: 72px 0;
  }

  .auth-layout {
    grid-template-columns: minmax(320px, 42%) 1fr;
  }

  .auth-aside {
    padding: 48px;
  }

  .auth-card-wrap {
    padding: 48px;
  }

  .app-shell {
    padding-bottom: 0;
  }

  .app-body {
    grid-template-columns: 230px minmax(0, 1fr);
    padding: 28px 0 48px;
  }

  .sidebar {
    position: sticky;
    top: 92px;
    align-self: start;
    display: block;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
  }

  .bottom-nav {
    display: none;
  }

  .header-user {
    display: inline;
  }

  .toast {
    bottom: 28px;
  }
}

@media (min-width: 1100px) {
  .app-body {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .client-list,
  .product-list,
  .delivery-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat-grid.stat-grid-kpi,
.stat-grid.stat-grid-seller {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-grid-kpi .stat-value {
  font-size: 1.55rem;
}

.stat-grid-kpi .stat-text {
  font-size: 1.15rem;
}

.dashboard-section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.dashboard-section-head,
.account-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-section-head {
  margin-bottom: 10px;
}

.dashboard-section-head strong {
  display: block;
  font-size: 0.95rem;
}

.dashboard-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.low-stock-list {
  display: grid;
  gap: 8px;
}

.low-stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.low-stock-item > div {
  min-width: 0;
}

.low-stock-item strong,
.low-stock-item span {
  display: block;
  overflow-wrap: anywhere;
}

.low-stock-item strong {
  font-size: 0.86rem;
}

.low-stock-item div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.client-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.client-balance div {
  min-width: 0;
}

.client-balance span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-balance strong {
  display: block;
  margin-top: 2px;
  font-size: 1.15rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.client-balance small {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.client-balance-clear {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--success);
}

.client-balance-due {
  border-color: var(--warning-border);
  background: var(--warning-soft);
  color: var(--warning);
}

.payment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.payment-status-unpaid {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.payment-status-partial {
  background: var(--warning-soft);
  color: var(--warning);
}

.payment-status-paid {
  background: var(--success-soft);
  color: var(--success);
}

.payment-context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.payment-context > div {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.payment-context span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.payment-context strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.payment-context .payment-context-due {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.payment-context .payment-context-due strong {
  color: var(--warning);
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.account-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1rem, 4vw, 1.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.account-summary-due {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.account-summary-due strong {
  color: var(--warning);
}

.account-section {
  display: grid;
  gap: 8px;
}

.account-section-head {
  align-items: center;
}

.account-section-head h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.account-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.account-row-main {
  flex: 1 1 150px;
  min-width: 0;
}

.account-row-main strong,
.account-row-main span,
.account-row-main small {
  display: block;
  overflow-wrap: anywhere;
}

.account-row-main strong {
  font-size: 0.86rem;
}

.account-row-main span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.account-row-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: pre-line;
}

.account-row-amount {
  flex: 0 0 auto;
  text-align: right;
}

.account-row-amount strong {
  display: block;
  color: var(--primary-dark);
  font-size: 0.95rem;
  white-space: nowrap;
}

.account-row-amount span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.account-order-ref {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.account-payment-form {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.account-payment-form[hidden] {
  display: none;
}

.account-payment-submit {
  width: 100%;
  min-height: 44px;
}

@media (min-width: 768px) {
  .stat-grid.stat-grid-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid-kpi .stat-value,
  .stat-grid-kpi .stat-text {
    font-size: 1.5rem;
  }
}

@media (min-width: 1100px) {
  .stat-grid.stat-grid-kpi {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .stat-grid.stat-grid-seller {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .client-balance {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .client-balance small {
    text-align: left;
  }

  .account-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .bottom-nav {
    gap: 2px;
    padding-inline: 6px;
  }

  .bottom-nav .nav-item {
    min-height: 52px;
    padding: 5px 2px;
    font-size: 0.64rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
  }

  .bottom-nav .nav-dot {
    width: 6px;
    height: 6px;
  }
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  height: 46px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  border-radius: 6px;
}

.brand-compact .brand-logo {
  height: 46px;
  width: auto;
  max-width: 210px;
}

.brand.has-client-logo .brand-mark {
  display: none !important;
}

@media (max-width: 640px) {
  .brand-logo,
  .brand-compact .brand-logo {
    height: 40px;
    max-width: 150px;
  }
}

.brand-settings-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.brand-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.brand-settings-logo,
.provision-logo-preview {
  width: 64px;
  height: 64px;
  margin-top: 10px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  object-fit: contain;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  font-size: 0.76rem;
  cursor: pointer;
}

.theme-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.theme-option input:checked + .theme-preview {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.theme-preview {
  width: 100%;
  height: 66px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto 1fr;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

.theme-preview i {
  display: block;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.theme-preview i:first-child {
  grid-row: 1 / span 2;
  border-color: var(--primary);
  background: var(--primary);
}

.theme-preview i:nth-child(3) {
  background: var(--primary-soft);
}

.provision-credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.provision-success {
  padding: 42px 24px;
  text-align: center;
  background: #FFFFFF !important;
  color: #0F172A;
}

.provision-success-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 1.8rem;
  font-weight: 800;
}

.provision-success h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  color: #0F172A;
}

.provision-success p {
  margin: 0 0 24px;
  color: #475569;
  overflow-wrap: anywhere;
}

.provision-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  text-align: left;
}

.provision-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
}

.provision-step.is-done {
  border-color: #A7F3D0;
  background: #ECFDF5;
  color: #065F46;
}

.provision-step.is-active {
  border-color: #BFDBFE;
  background: #EFF6FF;
  color: #1D4ED8;
}

.provision-step-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.provision-step .progress-spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.provision-progress-bar {
  width: 100%;
  height: 8px;
  margin: 0 0 20px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
}

.provision-progress-bar-fill {
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10B981, #34D399);
  animation: provision-bar 1.4s ease-in-out infinite;
}

.provision-progress-bar.is-complete .provision-progress-bar-fill {
  width: 100%;
  animation: none;
}

@keyframes provision-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

.provision-enter-btn:disabled {
  background: #94A3B8;
  border-color: #94A3B8;
  color: #FFFFFF;
  opacity: 1;
}

.provision-enter-btn:not(:disabled) {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}

.trial-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--primary-border);
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.file-upload-btn {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  min-height: 42px !important;
  padding: 0 16px !important;
  margin: 0;
  border: 1px dashed var(--primary-border);
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.file-upload-btn > * {
  margin: 0;
}

.file-upload-btn:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.file-upload-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.file-upload-hint {
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.provision-logo-upload .provision-logo-preview {
  margin-top: 0;
}

.provision-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: silo-spin 800ms linear infinite;
}

@keyframes silo-spin {
  to {
    transform: rotate(360deg);
  }
}

.theme-quick-btn {
  white-space: nowrap;
}

.subscription-notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.88rem;
  font-weight: 600;
}

.subscription-expired-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.subscription-expired-card {
  width: min(100%, 520px);
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.subscription-expired-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 1.8rem;
  font-weight: 800;
}

.subscription-expired-card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  letter-spacing: -0.03em;
}

.subscription-expired-card p {
  margin: 0 0 24px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .brand-settings-grid,
  .provision-credentials-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .theme-options {
    gap: 6px;
  }

  .theme-option {
    padding: 8px 4px;
    font-size: 0.7rem;
  }

  .theme-preview {
    height: 54px;
    padding: 6px;
  }
}

.superadmin-page {
  background: var(--bg);
}

.superadmin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.superadmin-login-card {
  width: min(100%, 460px);
}

.superadmin-shell {
  padding-bottom: 40px;
}

.superadmin-main {
  width: min(1280px, calc(100% - 24px));
  margin: 24px auto 0;
  display: grid;
  gap: 18px;
}

.superadmin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.superadmin-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
}

.superadmin-list {
  display: grid;
  gap: 14px;
}

.tenant-card {
  display: grid;
  gap: 16px;
}

.tenant-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.tenant-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tenant-url {
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-all;
}

.tenant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.tenant-badge,
.tenant-pm2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.tenant-badge.is-success {
  background: var(--success-soft);
  color: var(--success);
}

.tenant-badge.is-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.tenant-badge.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.tenant-pm2 {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tenant-pm2-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.tenant-pm2.is-online {
  color: var(--success);
}

.tenant-pm2.is-offline {
  color: var(--muted);
}

.tenant-meta,
.tenant-slug {
  color: var(--muted);
  font-size: 0.82rem;
}

.tenant-id {
  display: grid;
  gap: 4px;
  text-align: right;
}

.tenant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tenant-btn-renew {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tenant-btn-renew:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.tenant-btn-suspend {
  background: var(--warning-soft);
  border-color: var(--warning-border);
  color: var(--warning);
}

.tenant-btn-suspend:hover {
  filter: brightness(0.98);
}

.tenant-btn-delete {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.tenant-btn-delete:hover {
  filter: brightness(0.98);
}

@media (max-width: 920px) {
  .superadmin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .superadmin-toolbar-grid,
  .tenant-head {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .tenant-id {
    text-align: left;
  }

  .tenant-actions .btn {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .superadmin-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .tenant-actions .btn {
    flex-basis: 100%;
  }
}

.superadmin-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tenant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.tenant-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.tenant-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px;
}

.tenant-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary-border);
}

.tenant-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tenant-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tenant-copy-btn {
  min-height: 30px;
  padding: 0 10px;
}

.tenant-url-text {
  word-break: break-all;
}

.tenant-expiry-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.tenant-expiry-fill {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
}

.tenant-expiry-bar.is-success { color: var(--success); border-color: rgba(22, 101, 52, 0.2); background: var(--success-soft); }
.tenant-expiry-bar.is-warning { color: var(--warning); border-color: var(--warning-border); background: var(--warning-soft); }
.tenant-expiry-bar.is-danger { color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }

.tenant-expiry-bar .tenant-badge { background: transparent; padding: 0; min-height: auto; color: inherit; }
.tenant-expiry-bar .tenant-meta { color: inherit; opacity: 0.9; }
.tenant-expiry-text { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.tenant-card.is-warning { border-color: rgba(146, 64, 14, 0.22); }
.tenant-card.is-danger { border-color: rgba(185, 28, 28, 0.2); }

@media (max-width: 1100px) {
  .superadmin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .superadmin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tenant-main { flex-direction: column; }
}

.subscription-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subscription-notice-actions,
.subscription-renew-actions,
.subscription-expired-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subscription-renew-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subscription-renew-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.subscription-expired-actions {
  justify-content: center;
}
