:root {
  /* Dark Mode Base Colors */
  --bg: #09090b;
  /* Very dark zinc */
  --surface: rgba(24, 24, 27, 0.45);
  /* Translucent dark surface */
  --card: rgba(24, 24, 27, 0.65);
  /* Less translucent for cards */
  --card-strong: #18181b;
  /* Solid dark zinc */

  /* Text Colors */
  --ink: #f4f4f5;
  /* Light text */
  --ink-soft: #a1a1aa;
  /* Secondary light text */
  --muted: #71717a;
  /* Muted text */

  /* Borders and Lines */
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.15);

  /* Vibrant Accents */
  --brand: #10b981;
  /* Emerald green */
  --brand-2: #059669;
  --gold: #f59e0b;
  /* Brilliant amber */
  --danger: #ef4444;
  /* Red */
  --danger-bg: rgba(239, 68, 68, 0.1);
  --notice-bg: rgba(16, 185, 129, 0.1);

  /* Shadows and Structure */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.08), transparent 30%),
    radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.06), transparent 35%);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4,
.brand-title,
.eyebrow {
  font-family: "Outfit", sans-serif;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #34d399;
  /* Lighter emerald on hover */
}

button,
input,
textarea {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand-card {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(16, 185, 129, 0.25));
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.brand-title {
  margin: 0;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.14em;
}

.brand-subtitle {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
}

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

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  transform: translateX(4px);
}

.nav a.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand);
}

.nav a .nav-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.main {
  padding: 22px;
}

.main-shell {
  max-width: 1320px;
  margin: 0 auto;
}

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

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 800;
}

.page-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.05;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 760px;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.button,
button,
input[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #34d399, var(--brand));
}

.button.secondary,
button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.button.secondary:hover,
button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
}

.button.subtle,
button.subtle {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.subtle:hover,
button.subtle:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.notice,
.error {
  margin: 0 0 16px;
  border-radius: 14px;
  border: 1px solid;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notice {
  background: var(--notice-bg);
  border-color: rgba(15, 91, 56, 0.18);
  color: #145235;
}

.error {
  background: var(--danger-bg);
  border-color: rgba(170, 52, 41, 0.18);
  color: #8c2f26;
}

.notice::before,
.error::before {
  font-weight: 900;
  line-height: 1;
}

.notice::before {
  content: "•";
}

.error::before {
  content: "!";
}

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

.grid.two {
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
}

.grid.two.reverse {
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card-body {
  padding: 16px;
}

.card+.card {
  margin-top: 0;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 18px;
}

.card-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.card-header.compact {
  padding-bottom: 10px;
}

.card-footer {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(8, 145, 178, 0.05));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.hero-copy {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.hero-side {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.hero-side .mini-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.hero-side .mini-value {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
}

.hero-side .mini-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.stat {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.3);
}

.stat::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
}

.stat .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.stat .value {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.stat .hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.kpi {
  border-radius: 12px;
  border: 1px solid rgba(203, 189, 168, 0.65);
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
}

.kpi .k-label {
  color: var(--muted);
  font-size: 11px;
}

.kpi .k-value {
  margin-top: 4px;
  font-weight: 700;
}

.section-stack {
  display: grid;
  gap: 16px;
}

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

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

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

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

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: -2px;
}

input[type="text"],
input[type="url"],
input[type="date"],
input[type="password"],
textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  padding: 12px 14px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

textarea.large {
  min-height: 180px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(24, 24, 27, 0.95);
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-primary {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.table-secondary {
  color: var(--muted);
  line-height: 1.45;
}

.table-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.table-actions a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 12px;
  transition: all 0.15s ease;
}

.table-actions a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge.live {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--brand);
}

.badge.draft {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--muted);
}

.list-reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline {
  display: grid;
  gap: 10px;
}

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

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.timeline-content {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child .timeline-content {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-title {
  font-weight: 700;
}

.timeline-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.empty-row {
  color: var(--muted);
  text-align: center;
  padding: 20px 14px;
}

.inline-form {
  display: inline;
}

.helper-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.login-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  background: rgba(24, 24, 27, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login-showcase {
  padding: 40px;
  background:
    radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.15), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(8, 145, 178, 0.15), transparent 50%),
    rgba(9, 9, 11, 0.4);
  border-right: 1px solid var(--line);
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: var(--brand);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-showcase h1 {
  margin: 20px 0 12px;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.05;
}

.login-showcase p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.login-feature-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.login-feature-list li {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 14px;
}

.login-card {
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 252, 246, 0.94) 100%);
}

.login-card .brand-title-inline {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.login-card h2 {
  margin: 10px 0 6px;
  font-size: 28px;
}

.login-card .login-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.form-divider {
  height: 1px;
  background: rgba(217, 207, 191, 0.7);
  margin: 16px 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(203, 189, 168, 0.55);
  border-radius: 8px;
  padding: 2px 6px;
}

@media (max-width: 1120px) {

  .grid.two,
  .grid.two.reverse {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(201, 188, 168, 0.65);
  }

  .main {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .user-meta {
    justify-content: flex-start;
  }

  .stats,
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .form-grid.two-col {
    grid-template-columns: 1fr;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    border-right: 0;
    border-bottom: 1px solid rgba(201, 188, 168, 0.55);
  }
}