:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --text: #111827;
  --muted: #657084;
  --line: rgba(17, 24, 39, 0.1);
  --brand: #2563eb;
  --brand-2: #14b8a6;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #16a34a;
  --shadow: 0 24px 70px rgba(30, 41, 59, 0.14);
  --soft-shadow: 0 12px 34px rgba(30, 41, 59, 0.09);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: rgba(20, 27, 45, 0.78);
  --panel-solid: #111827;
  --text: #eef2ff;
  --muted: #9aa8c7;
  --line: rgba(226, 232, 240, 0.13);
  --brand: #60a5fa;
  --brand-2: #2dd4bf;
  --accent: #fbbf24;
  --danger: #fb7185;
  --success: #4ade80;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --soft-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Roboto Condensed", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.2), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg));
}

body.role-admin {
  --bg: #fff7ed;
  --panel: rgba(255, 251, 235, 0.92);
  --panel-solid: #fffaf0;
  --text: #2f1515;
  --muted: #8a5a44;
  --line: rgba(127, 29, 29, 0.16);
  --brand: #b91c1c;
  --brand-2: #d97706;
  --accent: #b91c1c;
  --success: #15803d;
}

body.role-admin .topbar,
body.role-admin .sidebar {
  border-color: rgba(127, 29, 29, 0.24);
}

body.role-admin .profile-button {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #991b1b;
  box-shadow: 0 14px 28px rgba(153, 27, 27, 0.18);
}

body.role-admin .profile-button small,
body.role-admin .profile-button strong {
  color: #991b1b;
}

body.role-user {
  --bg: #f0f9ff;
  --brand: #0369a1;
  --brand-2: #059669;
}

body.admin-login-portal .auth-overlay {
  background: #fff8e7;
}

body.admin-login-portal .auth-card {
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 28px 80px rgba(185, 28, 28, 0.2);
}

body.admin-login-portal .auth-brand strong,
body.admin-login-portal .auth-brand span {
  color: #b91c1c;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(24px);
  overflow-y: auto;
}

[data-theme="dark"] .sidebar {
  background: rgba(8, 13, 28, 0.72);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.brand strong,
.profile-button strong {
  display: block;
  line-height: 1.1;
}

.brand span,
.profile-button small {
  color: var(--muted);
  font-size: 12px;
}

.nav-label {
  margin: 18px 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: 160ms ease;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.nav-item.active {
  border-color: rgba(37, 99, 235, 0.22);
}

.nav-item.locked::after {
  content: "Soon";
  margin-left: auto;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.1);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-card {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.sidebar-card svg {
  flex: 0 0 auto;
  color: var(--success);
}

.sidebar-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(20px);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 160px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

[data-theme="dark"] .search {
  background: rgba(15, 23, 42, 0.5);
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--muted);
  background: var(--panel-solid);
  font-size: 12px;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.api-status.online .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.11);
}

select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel-solid);
}

.icon-button,
.profile-button,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel-solid);
}

.icon-button {
  width: 42px;
  color: #0f172a;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 2.35;
}

[data-theme="dark"] .icon-button {
  color: #e5edff;
  background: #162033;
  border-color: rgba(226, 232, 240, 0.18);
}

.profile-button {
  padding: 5px 10px 5px 5px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #111827, #2563eb);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0;
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(20, 184, 166, 0.1)),
    var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-panel p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  padding: 0 16px;
  font-weight: 700;
}

.compact-btn {
  min-height: 34px;
  margin: 2px;
  padding: 0 10px;
  font-size: 12px;
}

.secondary-btn.danger,
.compact-btn.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .secondary-btn.danger,
[data-theme="dark"] .compact-btn.danger {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.12);
}

.primary-btn {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.25);
}

.content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.module-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.module-head h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
}

.module-head p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.service-section {
  display: grid;
  gap: 12px;
}

.service-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.service-section-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
}

.group-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.group-icon svg {
  width: 18px;
  height: 18px;
}

.service-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.service-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 276px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px 24px 26px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.2)),
    var(--panel);
  text-align: center;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

[data-theme="dark"] .service-card {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.26)),
    var(--panel);
}

.service-card:hover,
.service-card.featured {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: var(--shadow);
}

.service-card.disabled-service {
  opacity: 0.62;
  background: var(--panel);
}

.service-card.disabled-service .service-icon {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  box-shadow: none;
}

.service-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.35), transparent 24%),
    linear-gradient(135deg, #2563eb 0%, #0ea5e9 48%, #14b8a6 100%);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.28);
  isolation: isolate;
}

.service-icon::after {
  content: "";
  position: absolute;
  inset: 13px;
  z-index: -1;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.16);
}

.service-icon svg {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.24));
  stroke-width: 2.4;
}

.service-status {
  position: absolute;
  top: 16px;
  right: 16px;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.11);
  font-size: 11px;
  font-weight: 800;
}

.service-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
}

.service-card small {
  max-width: 320px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.service-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.service-features span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.service-features svg {
  width: 14px;
  height: 14px;
}

[data-theme="dark"] .service-features span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.16);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--brand);
  font-weight: 800;
}

.service-link svg {
  width: 16px;
  height: 16px;
}

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

.card,
.table-card,
.form-card,
.coming-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.card {
  padding: 18px;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-top svg {
  color: var(--brand);
}

.stat-value {
  margin: 16px 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.trend {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.admin-dashboard-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.55fr);
  align-items: start;
}

.stack-layout {
  display: grid;
  gap: 18px;
}

.bulk-editor-card {
  padding: 18px;
}

.bulk-sheet-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--panel-solid);
}

.bulk-sheet {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.bulk-sheet th,
.bulk-sheet td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 7px;
  vertical-align: top;
}

.bulk-sheet th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #111827;
  background: #fef3c7;
  font-size: 12px;
  text-transform: uppercase;
}

.bulk-sheet .row-index {
  width: 42px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.bulk-sheet input,
.bulk-sheet textarea {
  width: 100%;
  min-width: 140px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px;
  background: transparent;
  color: var(--text);
}

.bulk-sheet textarea {
  min-width: 320px;
  height: 42px;
  resize: vertical;
}

.bulk-sheet input:focus,
.bulk-sheet textarea:focus {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
  outline: none;
}

.compact-textarea {
  min-height: 72px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.section-head h2,
.section-head h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  padding: 14px 18px 18px;
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

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

.badge.success {
  color: var(--success);
  background: rgba(22, 163, 74, 0.12);
}

.badge.warning {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
}

.badge.danger {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

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

.mini-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}

.mini-btn:hover {
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--primary);
}

.mini-btn.danger {
  color: var(--danger);
}

.form-hint {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.app-toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 999;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 18px;
  color: #064e3b;
  background: rgba(236, 253, 245, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  transform: translateY(-18px) translateX(18px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  backdrop-filter: blur(18px);
}

.app-toast.visible {
  transform: translateY(0) translateX(0);
  opacity: 1;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.app-toast strong,
.app-toast small {
  display: block;
}

.app-toast strong {
  font-size: 15px;
}

.app-toast small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(6, 78, 59, 0.76);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-toast.warning {
  border-color: rgba(245, 158, 11, 0.26);
  color: #78350f;
  background: rgba(255, 251, 235, 0.96);
}

.app-toast.warning .toast-icon {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.app-toast.warning small {
  color: rgba(120, 53, 15, 0.76);
}

.app-toast.danger {
  border-color: rgba(239, 68, 68, 0.28);
  color: #7f1d1d;
  background: rgba(254, 242, 242, 0.96);
}

.app-toast.danger .toast-icon {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
}

.app-toast.danger small {
  color: rgba(127, 29, 29, 0.78);
}

[data-theme="dark"] .app-toast {
  border-color: rgba(45, 212, 191, 0.22);
  color: #ecfeff;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .app-toast small {
  color: #a7f3d0;
}

[data-theme="dark"] .app-toast.warning small {
  color: #fde68a;
}

[data-theme="dark"] .app-toast.danger small {
  color: #fecdd3;
}

.badge.info {
  color: var(--brand);
  background: rgba(37, 99, 235, 0.12);
}

.form-card {
  padding: 24px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

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

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: var(--panel-solid);
  outline: 0;
}

textarea {
  min-height: 136px;
  resize: vertical;
}

.progress-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.progress-row {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.18);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.timeline {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.time-dot {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.11);
}

.timeline-item p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
}

.coming-card {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 34px;
  text-align: center;
}

.coming-card .big-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: var(--shadow);
}

.coming-card p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.65;
}

.mobile-menu {
  display: none;
}

.sidebar-open .sidebar {
  transform: translateX(0);
}

.hidden {
  display: none !important;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #f7f9ff;
}

[data-theme="dark"] .auth-overlay {
  background: rgba(8, 13, 28, 0.88);
}

.auth-overlay.hidden {
  display: none;
}

.auth-card {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.auth-brand {
  padding: 0 0 18px;
}

.auth-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

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

  .hero-panel {
    display: grid;
  }

  .hero-actions {
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    width: min(286px, 86vw);
    transform: translateX(-110%);
    transition: 180ms ease;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search {
    order: 3;
    flex-basis: 100%;
  }

  .profile-copy {
    display: none;
  }

  .api-status {
    display: none;
  }

  .stats-grid,
  .service-grid,
  .grid-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .module-head {
    display: grid;
  }

  .main {
    padding: 10px;
  }

  .hero-panel {
    padding: 20px;
  }

  h1 {
    font-size: 34px;
  }
}

/* Premium skin inspired by the provided dashboard mockup. */
:root {
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --line: #e5e7eb;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow: 0 25px 80px rgba(37, 99, 235, 0.16);
  --soft-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --bg: #08111f;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #101827;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.36);
  --soft-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(6, 182, 212, 0.18), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(37, 99, 235, 0.14), transparent 34%),
    linear-gradient(135deg, var(--bg), var(--bg));
}

.app-shell {
  grid-template-columns: 270px 1fr;
}

.sidebar {
  padding: 24px 18px;
  border-right: 0;
  background: linear-gradient(180deg, #07111f, #0f172a);
  color: #fff;
  box-shadow: 14px 0 50px rgba(15, 23, 42, 0.14);
}

[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #050b16, #0f172a);
}

.brand {
  padding: 6px 8px 28px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
}

.brand span,
.profile-button small {
  color: #94a3b8;
}

.logo-mark {
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 16px;
  background: #0b1768;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 3px;
}

.auth-brand .logo-mark {
  width: 58px;
  height: 58px;
}

.nav-label {
  margin: 24px 12px 10px;
  color: #64748b;
  letter-spacing: 0.12em;
}

.nav-item {
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 14px;
  color: #cbd5e1;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  transform: translateX(4px);
}

.sidebar-card {
  margin-top: 28px;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.2));
  box-shadow: none;
}

.sidebar-card p {
  color: #cbd5e1;
}

.main {
  padding: 24px;
}

.topbar {
  top: 0;
  min-height: 72px;
  border-radius: 22px;
  padding: 12px 18px;
  background: #ffffff;
  box-shadow: 0 15px 50px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .topbar {
  background: #0f172a;
  border-color: rgba(226, 232, 240, 0.14);
}

.search,
select,
.icon-button,
.profile-button,
.primary-btn,
.secondary-btn,
input,
textarea {
  border-radius: 14px;
}

.search {
  height: 46px;
  background: #f8fafc;
}

.api-status {
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
}

[data-theme="dark"] .api-status {
  background: rgba(16, 185, 129, 0.14);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.2);
}

[data-theme="dark"] .api-status {
  background: rgba(20, 184, 166, 0.16);
  color: #7dd3fc;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  align-items: flex-end;
  margin: 22px 0;
  padding: 34px;
  border: 0;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.35), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0891b2);
  box-shadow: 0 25px 80px rgba(37, 99, 235, 0.25);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 35px solid rgba(255, 255, 255, 0.08);
}

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

.hero-panel .eyebrow {
  color: #67e8f9;
}

.hero-panel p {
  color: #dbeafe;
}

h1 {
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.04;
}

.primary-btn {
  min-height: 52px;
  border-radius: 15px;
  padding: 0 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.secondary-btn {
  min-height: 52px;
  padding: 0 22px;
  font-weight: 900;
  background: #fff;
  color: #0f172a;
  transition: transform 180ms ease, border-color 180ms ease;
}

[data-theme="dark"] .secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #eef2ff;
}

.primary-btn:hover,
.secondary-btn:hover,
.mini-btn:hover {
  transform: translateY(-2px);
}

.module-head,
.card,
.table-card,
.form-card,
.coming-card {
  border-radius: 26px;
  border-color: #e5e7eb;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .module-head,
[data-theme="dark"] .card,
[data-theme="dark"] .table-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .coming-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.84);
}

.module-head {
  padding: 28px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  transition: transform 180ms ease;
}

.card:hover,
.table-card:hover,
.form-card:hover {
  transform: translateY(-3px);
}

.card::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -35px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.18));
}

.stat-top svg {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  padding: 11px;
  background: #eff6ff;
}

.stat-value {
  font-size: 20px;
}

.table-card,
.form-card {
  padding: 6px;
}

th,
td {
  padding: 15px;
}

.badge {
  min-height: 28px;
  padding: 5px 11px;
}

.service-card {
  border-radius: 26px;
  background: #fff;
}

.service-icon {
  border-radius: 26px;
}

.mini-btn {
  border-radius: 12px;
}

.nav-item[data-view="settings"] {
  display: none;
}

.app-booting .app-shell {
  visibility: hidden;
  opacity: 0;
}

.app-booting .auth-overlay {
  display: grid !important;
}

.app-booting .auth-card {
  opacity: 0;
  pointer-events: none;
}

@keyframes mf-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -40% 0; }
}

body.role-admin {
  background:
    radial-gradient(circle at 18% 10%, rgba(217, 119, 6, 0.16), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(185, 28, 28, 0.12), transparent 30%),
    linear-gradient(135deg, #fff7ed, #fef3c7);
}

body.role-admin .sidebar {
  color: #fee2e2;
  background:
    linear-gradient(180deg, rgba(69, 10, 10, 0.96), rgba(127, 29, 29, 0.94)),
    #450a0a;
  border-right-color: rgba(251, 191, 36, 0.26);
  box-shadow: 16px 0 50px rgba(69, 10, 10, 0.18);
}

body.role-admin .brand strong,
body.role-admin .nav-item,
body.role-admin .nav-label,
body.role-admin .sidebar-card,
body.role-admin .sidebar-card p {
  color: #fee2e2;
}

body.role-admin .brand span {
  color: #fcd34d;
}

body.role-admin .brand-mark {
  background: linear-gradient(135deg, #b91c1c, #f59e0b);
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.24);
}

body.role-admin .nav-item:hover,
body.role-admin .nav-item.active {
  color: #fff7ed;
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.16);
  box-shadow: none;
}

body.role-admin .nav-item.active {
  border-left: 4px solid #fbbf24;
}

body.role-admin .sidebar-card {
  border-color: rgba(251, 191, 36, 0.26);
  background: rgba(251, 191, 36, 0.12);
}

body.role-admin .topbar {
  border-color: rgba(127, 29, 29, 0.18);
  background: rgba(255, 250, 240, 0.94);
}

body.role-admin .module-head,
body.role-admin .card,
body.role-admin .table-card,
body.role-admin .form-card,
body.role-admin .coming-card {
  border-color: rgba(127, 29, 29, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 60px rgba(127, 29, 29, 0.08);
}

body.role-admin th,
body.role-admin .bulk-sheet th {
  color: #7f1d1d;
  background: #fde68a;
}

body.role-admin .primary-btn {
  background: linear-gradient(135deg, #b91c1c, #d97706);
  box-shadow: 0 16px 34px rgba(185, 28, 28, 0.2);
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
  }

  .main {
    padding: 14px;
  }

  .topbar {
    top: 0;
  }

  .hero-panel {
    padding: 24px;
  }
}
