:root {
  --primary: #123f5d;
  --primary-dark: #08283d;
  --primary-light: #1f6a92;
  --accent: #b98a34;
  --accent-soft: #f7efe1;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --text: #17202e;
  --muted: #66758a;
  --border: #d9e2ec;
  --border-strong: #c5d1dc;
  --danger: #a33124;
  --success-bg: #e8f6ef;
  --success-text: #126b4a;
  --warning-bg: #fff5d8;
  --warning-text: #77510b;
  --error-bg: #fdebe8;
  --error-text: #922a20;
  --shadow-sm: 0 8px 20px rgba(21, 36, 55, 0.07);
  --shadow-md: 0 18px 42px rgba(21, 36, 55, 0.12);
  --shadow-lg: 0 28px 80px rgba(8, 40, 61, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(
      180deg,
      rgba(18, 63, 93, 0.08),
      rgba(238, 243, 247, 0) 320px
    ),
    linear-gradient(135deg, #eef3f7 0%, #f8fafc 48%, #e8eef4 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 15px;
}

button,
input,
textarea,
select {
  font: inherit;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 44px);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark,
.logo-mark {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.brand-logo {
  width: 188px;
  height: 54px;
  padding: 8px 12px;
}

.sidebar-logo-mark {
  width: 74px;
  height: 42px;
  padding: 6px;
}

.brand-mark img,
.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow,
.badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

h1 {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7ee0a5;
  box-shadow: 0 0 0 5px rgba(126, 224, 165, 0.14);
}

main {
  max-width: 1440px;
  margin: 28px auto 44px;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

.card,
.landing-card,
.dashboard-card,
.admin-table-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.card,
.dashboard-card,
.admin-table-panel {
  padding: 28px;
  margin-bottom: 22px;
}

.landing-card {
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 430px;
  min-height: 520px;
}

.hero-copy {
  padding: 58px 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(18, 63, 93, 0.96), rgba(8, 40, 61, 0.98)),
    linear-gradient(135deg, rgba(185, 138, 52, 0.18), transparent);
  color: #fff;
}

.hero-copy .badge {
  color: #dcb86d;
  margin-bottom: 18px;
}

.hero-copy h2 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.65;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 32px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-left: 1px solid var(--border);
}

.panel-glow {
  position: absolute;
  inset: auto -80px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(185, 138, 52, 0.13);
  filter: blur(18px);
}

.hero-panel-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.metric-stack {
  position: relative;
  display: grid;
  gap: 14px;
}

.metric-stack article,
.feature-item,
.auth-panel,
.form-section,
.insight-card,
.insight-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.metric-stack article {
  padding: 18px;
}

.metric-stack small,
.mini-note,
.subtitle,
.table-note,
.insight-card small,
.kpi-card small {
  color: var(--muted);
  line-height: 1.5;
}

.metric-stack strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 17px;
  line-height: 1.35;
}

.premium-features,
.feature-list {
  display: grid;
  gap: 14px;
}

.premium-features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.feature-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #8b671f;
  font-size: 12px;
  font-weight: 900;
}

h2 {
  color: var(--primary-dark);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  color: var(--primary-dark);
  font-size: 17px;
  line-height: 1.25;
}

.home-buttons,
.actions,
.admin-tools,
.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

button,
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

button:hover,
.btn:hover {
  background: var(--primary-light);
  box-shadow: 0 10px 22px rgba(18, 63, 93, 0.18);
  transform: translateY(-1px);
}

.btn-admin {
  background: linear-gradient(135deg, #b98a34, #8f691f);
  box-shadow: 0 16px 34px rgba(185, 138, 52, 0.24);
}

.btn-admin:hover {
  background: linear-gradient(135deg, #c69845, #9b7226);
}

.btn-secondary,
.btn-ghost,
button.btn-secondary,
button.btn-ghost {
  background: #fff;
  border-color: var(--border-strong);
  color: var(--primary-dark);
}

.btn-secondary:hover,
.btn-ghost:hover,
button.btn-secondary:hover,
button.btn-ghost:hover {
  background: #f5f8fb;
  border-color: var(--primary-light);
}

.btn-danger {
  background: var(--danger);
}

.choice-buttons {
  max-width: 560px;
}

.section-heading,
.dashboard-header,
.dashboard-section-title,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.compact-heading {
  margin-bottom: 12px;
}

.form-card {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.form-card form {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 22px;
}

.accent-section {
  background: linear-gradient(180deg, #fff, #fbf8f1);
  border-color: #ead9b8;
}

.form-section h3,
.dashboard-card h3,
.admin-table-panel h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-section h3 span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #8b671f;
  font-size: 12px;
}

.dashboard-card h3::before,
.admin-table-panel h3::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
}

.form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.form-group label,
.search-label span {
  min-height: 36px;
  display: flex;
  align-items: flex-end;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.form-group.full label {
  min-height: 0;
}

.full {
  grid-column: 1 / -1;
}

.required {
  color: var(--danger);
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #a9bbc9;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(31, 106, 146, 0.13);
}

input[readonly] {
  background: #eef4f8;
  color: #43546a;
}

input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  background: #edf2f6;
  color: #7a8796;
}

.money-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.money-field:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(31, 106, 146, 0.13);
}

.money-field span {
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--accent-soft);
  color: #8b671f;
  font-weight: 900;
}

.money-field input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.money-field input:focus {
  box-shadow: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.message {
  margin: 18px 0;
  padding: 13px 14px;
  border: 1px solid rgba(18, 107, 74, 0.16);
  border-radius: 8px;
  background: var(--success-bg);
  color: var(--success-text);
  font-weight: 800;
}

.message.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.message.error,
.error {
  border-color: rgba(146, 42, 32, 0.16);
  background: var(--error-bg);
  color: var(--error-text);
}

.form-actions {
  justify-content: flex-end;
  padding-top: 8px;
}

.login-card {
  max-width: 680px;
  margin: 0 auto;
}

.auth-panel {
  padding: 20px;
  background: var(--surface-soft);
}

.login-card .actions {
  justify-content: flex-end;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 154px);
  overflow: hidden;
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 12px;
  background: #f6f9fc;
  box-shadow: var(--shadow-lg);
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  min-height: calc(100vh - 154px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 190px),
    radial-gradient(
      circle at 24px 26px,
      rgba(185, 138, 52, 0.18),
      transparent 118px
    ),
    linear-gradient(180deg, var(--primary-dark), #0b314b);
  color: #fff;
  padding: 24px 18px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.12);
  font-weight: 900;
}

.sidebar-logo::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: #7ee0a5;
  box-shadow: 0 0 0 5px rgba(126, 224, 165, 0.12);
}

.sidebar-logo + .sidebar-nav {
  padding-top: 18px;
}

.sidebar-logo > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-logo small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-section-label {
  margin: 0 8px 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-action-group {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-action-group .sidebar-section-label {
  margin-top: 0;
}

.sidebar-nav button {
  position: relative;
  justify-content: flex-start;
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px 12px 18px;
  box-shadow: none;
  font-size: 14px;
  letter-spacing: 0;
}

.sidebar-nav button::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 8px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.sidebar-nav button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sidebar-nav button:hover,
.sidebar-nav button.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 22px rgba(0, 0, 0, 0.12);
  transform: none;
}

.sidebar-nav button:hover::after,
.sidebar-nav button.active::after {
  opacity: 1;
}

.sidebar-nav button.active::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(185, 138, 52, 0.16);
}

.sidebar-action-group button {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-content {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(180deg, #f8fbfd, #f2f6fa);
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 5;
  align-items: center;
  margin-bottom: 2px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.dashboard-title-block {
  min-width: 0;
  max-width: 760px;
}

.dashboard-title-block .subtitle {
  margin-top: 6px;
}

.dashboard-header-meta {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.admin-session-card {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
}

.admin-session-card small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-session-card strong {
  color: var(--primary-dark);
  font-size: 14px;
}

.dashboard-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.dashboard-actions button {
  min-height: 40px;
  padding: 9px 14px;
}

.admin-dashboard .dashboard-card,
.admin-dashboard .admin-table-panel,
.admin-dashboard .chart-card,
.admin-dashboard .kpi-card,
.admin-dashboard .record-card {
  border-radius: 8px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.overview-board {
  display: grid;
  gap: 20px;
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid #c9d6e2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 63, 93, 0.96), rgba(14, 52, 77, 0.98)),
    linear-gradient(135deg, rgba(185, 138, 52, 0.18), transparent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.overview-hero h3 {
  margin-top: 8px;
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}

.overview-hero p {
  max-width: 760px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}

.overview-status {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.overview-status span,
.overview-status small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-status strong {
  color: #fff;
  font-size: 46px;
  line-height: 1;
}

.overview-kpis {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.kpi-grid,
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.kpi-card {
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpi-card h4,
.insight-card h4 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-dark);
  font-size: 30px;
  line-height: 1;
}

.kpi-card .kpi-date {
  font-size: 17px;
  line-height: 1.22;
}

.kpi-ring {
  --ring-color: var(--accent);
  --ring-percent: 70%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--ring-percent), #e8edf2 0);
}

.kpi-ring::after {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.chart-card {
  min-height: 310px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-card .panel-heading,
.admin-table-panel .panel-heading {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h3 {
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: 0;
}

.chart-card-large {
  min-height: 330px;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.chart-heading h4 {
  margin-bottom: 5px;
  color: var(--primary-dark);
  font-size: 15px;
}

.chart-heading span {
  color: var(--muted);
  font-size: 12px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 228px;
  padding-top: 10px;
}

.bar-item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 9px;
  min-width: 0;
  height: 228px;
}

.bar-track {
  display: flex;
  align-items: flex-end;
  min-height: 176px;
  border-radius: 8px;
  background: #edf3f7;
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  min-height: 6px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #4e91af, var(--primary));
}

.bar-label {
  display: grid;
  gap: 3px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.bar-label strong {
  color: var(--primary-dark);
  font-size: 14px;
}

.donut-chart {
  display: grid;
  place-items: center;
  gap: 18px;
}

.donut-visual {
  --passage-percent: 0%;
  --combo-percent: 0%;
  width: 164px;
  height: 164px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    #1f6a92 0 var(--passage-percent),
    #65a782 var(--passage-percent) var(--combo-percent),
    #b98a34 var(--combo-percent) 100%
  );
}

.donut-visual::after {
  content: attr(data-total);
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-dark);
  font-size: 28px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--border);
}

.chart-legend {
  display: grid;
  gap: 10px;
  width: 100%;
}

.legend-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-light);
}

.legend-dot.gold {
  background: var(--accent);
}

.legend-dot.green {
  background: #65a782;
}

.horizontal-chart {
  display: grid;
  gap: 12px;
}

.horizontal-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.horizontal-item span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-track {
  height: 12px;
  border-radius: 999px;
  background: #edf3f7;
  overflow: hidden;
}

.horizontal-fill {
  height: 100%;
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #4e91af);
}

.horizontal-value {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-mini-grid {
  display: grid;
  gap: 12px;
}

.finance-mini-grid div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.finance-mini-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-mini-grid strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.insight-card {
  padding: 16px;
}

.insight-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1.18;
}

.insight-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.insight-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.insight-list-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.edit-lookup-section {
  background: linear-gradient(180deg, #fff, #f7fafc);
}

.edit-lookup-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.search-label {
  display: grid;
  gap: 7px;
}

.queue-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 220px)) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.queue-toolbar label {
  display: grid;
  gap: 7px;
}

.queue-toolbar label span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.queue-meta {
  justify-self: end;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 850;
}

.pagination-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pagination-row span {
  color: var(--muted);
  font-weight: 850;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.audit-panel {
  border-top: 3px solid var(--accent);
}

.audit-count {
  min-width: 82px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.audit-count strong {
  color: var(--primary-dark);
  font-size: 26px;
  line-height: 1;
}

.audit-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.audit-table {
  min-width: 1520px;
  font-size: 12px;
}

.audit-table th {
  background: #fff;
  color: #111827;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 3px 0 var(--accent);
}

.audit-table td {
  max-width: 190px;
  color: #243244;
}

.notifications-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.notification-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(185, 138, 52, 0.14);
}

.notification-item strong {
  display: block;
  color: var(--primary-dark);
  font-size: 14px;
}

.notification-item p {
  margin-top: 3px;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notification-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

table {
  width: 100%;
  min-width: 3900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

th,
td {
  max-width: 260px;
  padding: 13px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #102f47;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tr:nth-child(even) {
  background: #f8fafc;
}

tr:hover {
  background: #eef5f8;
}

.records-list {
  display: grid;
  gap: 16px;
}

.empty-records {
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.record-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.record-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.record-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0;
}

.record-card.expanded .record-card-header {
  border-bottom: 1px solid var(--border);
}

.record-id {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #795812;
  font-size: 12px;
  font-weight: 900;
}

.record-card h4 {
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.25;
}

.record-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.record-toggle {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--primary-dark);
  box-shadow: none;
}

.record-toggle:hover {
  background: #fff;
  border-color: var(--primary-light);
  box-shadow: 0 8px 18px rgba(18, 63, 93, 0.12);
}

.record-toggle span {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.record-card.expanded .record-toggle span {
  transform: rotate(180deg);
}

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.record-card-body {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.record-card.expanded .record-card-body {
  display: grid;
}

.record-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.record-section > strong {
  color: var(--primary-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.record-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.record-field {
  min-width: 0;
}

.record-field span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.record-field b {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.record-actions {
  display: none;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
}

.record-card.expanded .record-actions {
  display: flex;
}

.record-actions button {
  min-height: 38px;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .topbar,
  .section-heading,
  .dashboard-header,
  .panel-heading,
  .search-row,
  .edit-lookup-row,
  .record-card-header {
    display: grid;
  }

  .premium-hero,
  .premium-features,
  .dashboard-shell,
  .overview-hero,
  .overview-kpis,
  .chart-layout,
  .form-grid,
  .record-card-body,
  .record-fields {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .dashboard-sidebar {
    position: static;
    min-height: 0;
    padding: 16px;
  }

  .sidebar-logo {
    margin-bottom: 14px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-section-label,
  .sidebar-action-group {
    grid-column: 1 / -1;
  }

  .sidebar-action-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-nav button {
    justify-content: center;
  }

  .dashboard-header-meta {
    justify-items: stretch;
  }

  .admin-session-card {
    min-width: 0;
  }

  .hero-copy {
    padding: 38px 24px;
  }

  .card,
  .dashboard-card,
  .chart-card,
  .admin-table-panel,
  .dashboard-content,
  .form-section {
    padding: 18px;
  }

  .horizontal-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .form-group label,
  .search-label span {
    min-height: 0;
  }

  .form-actions,
  .login-card .actions,
  .dashboard-actions,
  .admin-tools,
  .record-actions {
    justify-content: stretch;
  }

  .form-actions > *,
  .login-card .actions > *,
  .dashboard-actions > *,
  .admin-tools > *,
  .record-actions > *,
  .edit-lookup-row > button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  main {
    padding: 0 14px;
  }

  .topbar {
    padding: 18px 16px;
  }

  .sidebar-nav,
  .sidebar-action-group {
    grid-template-columns: 1fr;
  }
}
