* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #000;
  --white: #fff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --gray-950: #0a0a0a;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
}

/* ---- LOGIN ---- */
.login-body {
  background: var(--gray-950);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.login-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 40px 32px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  color: var(--gray-950);
  margin-bottom: 4px;
}

.login-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  background: var(--white);
  color: var(--gray-900);
  transition: border-color 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--gray-900);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 10px 20px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; }

.btn-primary {
  background: var(--gray-950);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  border-color: var(--gray-900);
  color: var(--gray-900);
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ---- ALERT ---- */
.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-error {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--red);
}

/* ---- NAVBAR ---- */
.navbar {
  background: var(--gray-950);
  color: var(--white);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-brand-sub {
  font-weight: 400;
  color: var(--gray-400);
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--gray-700);
}

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

.nav-user {
  font-size: 14px;
  color: var(--gray-400);
}

.nav-right .btn-outline {
  border-color: var(--gray-600);
  color: var(--gray-300);
}

.nav-right .btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
}

/* ---- CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ---- STATS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-950);
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ---- FILTER BAR ---- */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.filter-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-form select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
}

.filter-form select:focus {
  outline: none;
  border-color: var(--gray-900);
}

/* ---- TABLE ---- */
.table-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow-x: auto;
}

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

.table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

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

.fw-medium { font-weight: 500; }

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 28px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
}

.score-high {
  background: var(--gray-950);
  color: var(--white);
}

.score-mid {
  background: var(--gray-200);
  color: var(--gray-800);
}

.score-low {
  background: var(--white);
  color: var(--gray-400);
  border: 1px solid var(--gray-300);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

.status-pending {
  background: var(--gray-100);
  color: var(--gray-600);
}

.status-scored {
  background: var(--gray-950);
  color: var(--white);
}

.status-error {
  background: var(--white);
  color: var(--red);
  border: 1px solid var(--gray-200);
}

/* ---- TEXT UTILS ---- */
.text-center { text-align: center; }
.text-muted { color: var(--gray-400); }

/* ---- DETAIL PAGE ---- */
.back-link {
  display: inline-block;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
}

.back-link:hover { color: var(--gray-900); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 28px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}

.card-subtitle {
  font-size: 14px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: 13px;
  color: var(--gray-500);
}

.detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
}

/* ---- SCORE DISPLAY ---- */
.score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}

.score-big {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  background: none;
}

.score-big.score-high {
  color: var(--gray-950);
  background: none;
}
.score-big.score-mid {
  color: var(--gray-500);
  background: none;
}
.score-big.score-low {
  color: var(--gray-300);
  background: none;
}

.score-label {
  font-size: 24px;
  color: var(--gray-400);
}

.analysis-text {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  padding: 20px;
  background: var(--gray-50);
  border-radius: 6px;
  border: 1px solid var(--gray-100);
}

.score-date {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  /* Navbar improvements */
  .navbar {
    padding: 0 16px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-brand {
    font-size: 13px;
    flex: 1;
    min-width: 0;
  }

  .nav-brand-sub {
    display: none;
  }

  .nav-right {
    gap: 10px;
  }

  .nav-user {
    display: none;
  }

  /* Container */
  .container {
    padding: 20px 16px;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 16px 12px;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-label {
    font-size: 12px;
  }

  /* Filter Bar */
  .filter-bar {
    padding: 12px 16px;
  }

  .filter-form {
    flex-direction: column;
    gap: 8px;
  }

  .filter-form select,
  .filter-form .btn {
    width: 100%;
  }

  /* Table - make it card-style on mobile */
  .table-wrapper {
    border: none;
    background: transparent;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: block;
  }

  .table tbody tr {
    display: block;
    margin-bottom: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
  }

  .table tbody tr:hover {
    background: var(--white);
  }

  .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .table td:last-child {
    border-bottom: none;
    padding-top: 12px;
  }

  .table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .table td:last-child .btn {
    width: 100%;
  }

  /* Detail Grid */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 20px;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .score-big {
    font-size: 48px;
  }

  .score-label {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .login-box {
    padding: 32px 24px;
  }

  .navbar {
    padding: 12px;
  }

  .nav-brand {
    font-size: 12px;
  }

  .container {
    padding: 16px 12px;
  }

  .card {
    padding: 16px;
  }

  .score-big {
    font-size: 40px;
  }
}
