:root {
  --nomagro-ink: #0f172a;
  --nomagro-muted: #64748b;
  --nomagro-line: #dbe3ef;
  --nomagro-surface: #ffffff;
  --nomagro-soft: #f6f8fb;
  --nomagro-blue: #2563eb;
  --nomagro-teal: #0f766e;
  --nomagro-emerald: #10b981;
  --nomagro-indigo: #312e81;
  --nomagro-danger: #dc2626;
  --nomagro-warning: #d97706;
}

html.nt-theme-dark body,
html.nt-theme-light body {
  --nomagro-ink: var(--nt-ink);
  --nomagro-muted: var(--nt-muted);
  --nomagro-line: var(--nt-line);
  --nomagro-surface: var(--nt-panel);
  --nomagro-soft: var(--nt-bg);
  --nomagro-blue: var(--nt-blue);
  --nomagro-teal: var(--nt-teal);
  --nomagro-emerald: var(--nt-emerald);
  --nomagro-danger: var(--nt-red);
  --nomagro-warning: var(--nt-amber);
}

html.nt-theme-dark body {
  --nomagro-ink: #e8f1ff;
  --nomagro-muted: #9fb0ca;
  --nomagro-line: #26344d;
  --nomagro-surface: #111a2b;
  --nomagro-soft: #0b1220;
  --nomagro-blue: #19b7ff;
  --nomagro-teal: #00d084;
  --nomagro-emerald: #00d084;
  --nomagro-danger: #ff4778;
  --nomagro-warning: #facc15;
}

html.nt-theme-light body {
  --nomagro-ink: #0f172a;
  --nomagro-muted: #64748b;
  --nomagro-line: #dbe3ef;
  --nomagro-surface: #ffffff;
  --nomagro-soft: #f6f8fb;
  --nomagro-blue: #2563eb;
  --nomagro-teal: #0f766e;
  --nomagro-emerald: #10b981;
  --nomagro-danger: #dc2626;
  --nomagro-warning: #d97706;
}

.nomagro-auth-shell,
.nomagro-page {
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--nomagro-ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(16, 185, 129, 0.18), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.16), transparent 24rem),
    linear-gradient(135deg, #f8fafc 0%, #eef4f8 55%, #f8fafc 100%);
}

.nomagro-auth-shell {
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.nomagro-auth-card {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.nomagro-brand-panel {
  position: relative;
  min-height: 660px;
  padding: 44px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 118, 110, 0.92)),
    radial-gradient(circle at 76% 22%, rgba(37, 99, 235, 0.45), transparent 20rem);
}

.nomagro-brand-panel:before,
.nomagro-brand-panel:after {
  content: "";
  position: absolute;
  inset: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(-10deg);
}

.nomagro-brand-panel:before {
  width: 300px;
  height: 300px;
  right: -60px;
  top: 80px;
  border-radius: 40px;
}

.nomagro-brand-panel:after {
  width: 190px;
  height: 190px;
  left: 44px;
  bottom: 90px;
  border-radius: 32px;
}

.nomagro-brand-panel > * {
  position: relative;
  z-index: 1;
}

.nomagro-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 84px;
}

.nomagro-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--nomagro-teal);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.nomagro-wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.nomagro-brand-panel h1 {
  max-width: 560px;
  margin: 0 0 18px;
  font-size: 44px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
}

.nomagro-brand-panel p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.7;
}

.nomagro-version-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}

.nomagro-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.nomagro-login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px;
  background: rgba(255, 255, 255, 0.94);
}

.nomagro-login-panel h2,
.nomagro-section-title {
  margin: 0;
  color: var(--nomagro-ink);
  font-size: 28px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

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

.nomagro-form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.nomagro-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--nomagro-line);
  border-radius: 10px;
  background: var(--nomagro-surface);
  color: var(--nomagro-ink);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.nomagro-input:focus {
  border-color: var(--nomagro-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nomagro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nomagro-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.nomagro-btn-primary {
  background: linear-gradient(135deg, var(--nomagro-teal), var(--nomagro-blue));
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.nomagro-btn-secondary {
  border-color: var(--nomagro-line);
  background: var(--nomagro-surface);
  color: var(--nomagro-ink);
}

.nomagro-page {
  padding: 32px;
}

.nomagro-app-frame {
  max-width: 1440px;
  margin: 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  overflow: hidden;
  background: var(--nomagro-surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.nomagro-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 0 28px;
  border-bottom: 1px solid var(--nomagro-line);
  background: color-mix(in srgb, var(--nomagro-surface) 92%, transparent);
}

.nomagro-app-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 760px;
}

.nomagro-sidebar {
  padding: 22px 16px;
  border-right: 1px solid var(--nomagro-line);
  background: var(--nomagro-surface);
}

.nomagro-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--nomagro-muted);
  font-weight: 700;
}

.nomagro-nav-item.is-active {
  background: #e6f5f3;
  color: var(--nomagro-teal);
}

.nomagro-content {
  padding: 30px;
  background: var(--nomagro-soft) !important;
  color: var(--nomagro-ink);
}

.nomagro-content h1,
.nomagro-content h2,
.nomagro-content h3,
.nomagro-content h4,
.nomagro-content p,
.nomagro-content label,
.nomagro-content strong,
.nomagro-content li {
  color: inherit;
}

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

.nomagro-content .nomagro-btn-primary,
.nomagro-content .nomagro-btn-primary:focus,
.nomagro-content .nomagro-btn-primary:hover {
  color: #fff;
}

.nomagro-content .nomagro-btn-secondary,
.nomagro-content .nomagro-mini-btn,
.nomagro-content .nomagro-btn-secondary:focus,
.nomagro-content .nomagro-mini-btn:focus {
  color: var(--nomagro-ink);
}

.nomagro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.nomagro-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.nomagro-card,
.nomagro-table-card {
  border: 1px solid var(--nomagro-line);
  border-radius: 12px;
  background: var(--nomagro-surface);
  color: var(--nomagro-ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.nomagro-card {
  padding: 18px;
}

.nomagro-kpi-label {
  margin: 0 0 12px;
  color: var(--nomagro-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nomagro-kpi-value {
  margin: 0;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 0;
}

.nomagro-table-card {
  overflow: hidden;
}

.nomagro-table {
  width: 100%;
  border-collapse: collapse;
}

.nomagro-table th,
.nomagro-table td {
  padding: 16px;
  border-bottom: 1px solid var(--nomagro-line);
  text-align: left;
  vertical-align: middle;
  color: var(--nomagro-ink);
}

.nomagro-table th {
  color: var(--nomagro-muted);
  background: color-mix(in srgb, var(--nomagro-surface) 86%, var(--nomagro-teal));
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.nomagro-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.nomagro-status-active {
  background: #dcfce7;
  color: #166534;
}

.nomagro-status-suspended {
  background: #fee2e2;
  color: #991b1b;
}

.nomagro-status-expired {
  background: #fef3c7;
  color: #92400e;
}

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

.nomagro-mini-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--nomagro-line);
  border-radius: 8px;
  background: var(--nomagro-surface);
  color: var(--nomagro-ink);
  font-size: 12px;
  font-weight: 800;
}

.nomagro-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

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

.nomagro-form-card {
  max-width: 1180px;
}

.nomagro-subtitle {
  margin: 28px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--nomagro-line);
  color: var(--nomagro-ink);
  font-size: 17px;
  font-weight: 850;
}

.nomagro-subtitle:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nomagro-input-sm {
  min-height: 36px;
  padding: 0 10px;
}

.nomagro-payment-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--nomagro-line);
  border-radius: 10px;
  background: var(--nomagro-surface);
}

.nomagro-payment-table th,
.nomagro-payment-table td {
  padding: 10px 12px;
}

.nomagro-payment-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--nomagro-teal);
}

.nomagro-actions .nomagro-btn,
.nomagro-actions form {
  white-space: nowrap;
}

.nomagro-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.nomagro-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nomagro-teal), var(--nomagro-blue));
}

.nomagro-style-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.nomagro-swatch {
  min-height: 96px;
  padding: 12px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .nomagro-auth-card,
  .nomagro-app-grid,
  .nomagro-form-grid,
  .nomagro-form-grid-3,
  .nomagro-form-grid-4 {
    grid-template-columns: 1fr;
  }

  .nomagro-brand-panel {
    min-height: 420px;
  }

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

  .nomagro-sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .nomagro-page {
    padding: 14px;
  }

  .nomagro-login-panel,
  .nomagro-brand-panel {
    padding: 28px;
  }

  .nomagro-brand-panel h1 {
    font-size: 34px;
  }

  .nomagro-toolbar,
  .nomagro-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nomagro-kpi-grid,
  .nomagro-style-swatches {
    grid-template-columns: 1fr;
  }
}
