﻿:root {
  --ink: #0e1a26;
  --cloud: #f6f2ea;
  --accent: #d4572b;
  --accent-dark: #b34018;
  --sea: #0d8d8f;
  --sea-dark: #066a6b;
  --gold: #f1c55a;
  --mint: #e0f3ee;
  --shadow: rgba(14, 26, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff8ec 0%, #f3efe6 55%, #e7f0f0 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-shell {
  width: min(460px, 92%);
  position: relative;
  z-index: 2;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 60px var(--shadow);
  border: 1px solid rgba(14, 26, 38, 0.08);
}

.login-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.login-header h1 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 24px;
}

.login-header p {
  margin: 0;
  opacity: 0.7;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  opacity: 0.8;
}

.login-form input {
  border: 1px solid rgba(14, 26, 38, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.login-message {
  font-size: 13px;
  min-height: 18px;
  opacity: 0.85;
}

.login-message.error {
  color: var(--accent-dark);
}

.hidden {
  display: none;
}

.bg-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.45;
  z-index: 0;
  animation: float 12s ease-in-out infinite;
}

.orb-a {
  background: radial-gradient(circle, #f8d7b4 0%, rgba(248, 215, 180, 0) 70%);
  top: -120px;
  left: -80px;
}

.orb-b {
  background: radial-gradient(circle, #bfe7e0 0%, rgba(191, 231, 224, 0) 70%);
  bottom: -160px;
  right: -60px;
  animation-delay: 2s;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(14, 26, 38, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 26, 38, 0.06) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(20px);
  }
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px 16px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 22px;
}

.brand-subtitle {
  font-size: 13px;
  opacity: 0.7;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 16px 48px;
  backdrop-filter: blur(12px);
  background: rgba(246, 242, 234, 0.75);
  border-bottom: 1px solid rgba(14, 26, 38, 0.08);
  overflow-x: auto;
}

.tab {
  border: none;
  background: transparent;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background: var(--ink);
  color: #fff;
}

.content {
  position: relative;
  z-index: 1;
  padding: 24px 48px 80px;
}

.panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 10px;
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: 40px;
  margin: 0 0 16px;
}

.hero p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.hero-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 60px var(--shadow);
  border: 1px solid rgba(14, 26, 38, 0.08);
}

.hero-card h2 {
  margin-top: 0;
  font-family: "Fraunces", serif;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: grid;
  gap: 10px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.span-3 {
  grid-column: span 3;
}
.span-2 {
  grid-column: span 2;
}

.span-1 {
  grid-column: span 1;
}

.card.panel-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 30px var(--shadow);
  border: 1px solid rgba(14, 26, 38, 0.08);
}

.card-header h3 {
  margin: 0 0 4px;
  font-family: "Fraunces", serif;
  font-size: 18px;
}

.card-header p {
  margin: 0 0 12px;
  opacity: 0.7;
  font-size: 13px;
}

.mini-chart {
  display: grid;
  gap: 10px;
}

.bar-chart {
  display: grid;
  gap: 12px;
  min-height: 140px;
}

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

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(14, 26, 38, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.fill-new {
  background: var(--gold);
}

.fill-progress {
  background: var(--sea);
}

.fill-completed {
  background: var(--mint);
}

.fill-failed {
  background: var(--accent);
}

.trend-chart {
  display: grid;
  gap: 10px;
  height: 200px;
}

.trend-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.trend-svg {
  height: 140px;
  background: rgba(14, 26, 38, 0.04);
  border-radius: 16px;
  padding: 12px;
}

.trend-svg svg {
  width: 100%;
  height: 100%;
}

.trend-line {
  fill: none;
  stroke: var(--sea);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-area {
  fill: url(#trendFill);
}

.trend-grid {
  stroke: rgba(14, 26, 38, 0.12);
  stroke-width: 0.6;
  stroke-dasharray: 2 2;
}

.trend-dot {
  fill: var(--sea-dark);
  stroke: #fff;
  stroke-width: 0.8;
}

.trend-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 11px;
  opacity: 0.6;
  text-align: center;
}

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

.insight-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(14, 26, 38, 0.04);
}

.insight-item strong {
  font-weight: 600;
}

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

.recent-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(14, 26, 38, 0.04);
  font-size: 13px;
}

.recent-item .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  opacity: 0.7;
  font-size: 12px;
}

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

.rank-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(14, 26, 38, 0.04);
  font-size: 13px;
}

.rank-item .label {
  font-weight: 600;
}

.rank-item .value {
  opacity: 0.7;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: 0 16px 30px var(--shadow);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.6;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  margin-top: 8px;
}

.callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(110deg, rgba(13, 141, 143, 0.12), rgba(241, 197, 90, 0.2));
  border-radius: 20px;
  border: 1px solid rgba(14, 26, 38, 0.08);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0;
  font-family: "Fraunces", serif;
}

.panel-header p {
  margin: 6px 0 0;
  opacity: 0.7;
}

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

input,
select {
  border: 1px solid rgba(14, 26, 38, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: "Space Grotesk", sans-serif;
  background: rgba(255, 255, 255, 0.9);
  min-width: 200px;
}

.table-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 18px 40px var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(14, 26, 38, 0.08);
}

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

thead {
  background: rgba(14, 26, 38, 0.06);
  text-align: left;
  font-size: 13px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(14, 26, 38, 0.06);
  font-size: 14px;
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 141, 143, 0.12);
  color: var(--sea-dark);
  font-weight: 600;
}

.badge.disabled {
  background: rgba(212, 87, 43, 0.12);
  color: var(--accent-dark);
}

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

button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(212, 87, 43, 0.25);
}

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

button.ghost {
  background: transparent;
  border: 1px solid rgba(14, 26, 38, 0.2);
}

button.ghost:hover {
  border-color: var(--ink);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 38, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 10;
}

.modal.show {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: min(520px, 100%);
  box-shadow: 0 24px 60px var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

#infoModal .modal-body {
  grid-template-columns: 1fr;
}

.modal-body label {
  font-size: 13px;
  opacity: 0.7;
}

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

.modal-field.full {
  grid-column: span 2;
}

.modal-field.half {
  grid-column: span 1;
}

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

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.page-info {
  font-size: 13px;
  opacity: 0.7;
}

.muted {
  opacity: 0.6;
}

.reason-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.empty {
  padding: 24px;
  text-align: center;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

  .content,
  .tabs {
    padding: 16px 20px;
  }
}

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

  .span-3,
  .span-1 {
    grid-column: span 2;
  }
}

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

  .span-3,
  .span-1 {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-field.full,
  .modal-field.half {
    grid-column: span 1;
  }
}
