/* ==========================================================================
   Strategic Claims Services — Secure File Upload Styles
   Brand Colors:
     Dark Green  #424F33  (primary)
     Light Green #878F68  (secondary)
     Orange      #9A5D0A  (accent)
     Tan         #C4A682  (warm neutral)
     Near Black  #141414  (text)
     Dark Brown  #2B0E00  (deep accent)
   Typography:
     Rakkas      — headlines / brand name
     Inter       — body copy (web substitute for GT America)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rakkas&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ── Brand palette ──────────────────────────────────────────────────── */
  --brand-dark-green: #424F33;
  --brand-light-green: #878F68;
  --brand-orange: #9A5D0A;
  --brand-tan: #C4A682;
  --brand-near-black: #141414;
  --brand-dark-brown: #2B0E00;

  /* ── Semantic tokens mapped to brand ────────────────────────────────── */
  --primary: #424F33;
  --primary-hover: #374428;
  --primary-light: #f0f2ec;
  --primary-lighter: #e8ebdf;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #16a34a;
  --warning: #9A5D0A;

  /* ── Neutrals ───────────────────────────────────────────────────────── */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #141414;

  /* ── Shared tokens ──────────────────────────────────────────────────── */
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);

  /* ── Font stacks ────────────────────────────────────────────────────── */
  --font-brand: "Rakkas", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  background: var(--primary);
  color: white;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 2px 8px rgba(66, 79, 51, 0.3);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.navbar-brand img {
  height: 32px;
  width: auto;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.navbar-brand-name {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.navbar-brand-sub {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
}

.navbar-links {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.navbar-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.navbar-links a:hover,
.navbar-links a.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.navbar-spacer {
  flex: 1;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.navbar-user span {
  opacity: 0.85;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: var(--font-body);
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

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

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-danger {
  background: white;
  color: var(--danger);
  border: 1px solid var(--gray-300);
}

.btn-danger:hover {
  background: #fef2f2;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 13px;
}

.btn .material-icons {
  font-size: 18px;
}

.btn-sm .material-icons {
  font-size: 16px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

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

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

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

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(66, 79, 51, 0.15);
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-body);
  background: white;
  cursor: pointer;
  transition: border-color 0.15s;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(66, 79, 51, 0.15);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.form-checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.form-checkbox-group label {
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
}

.error-message {
  background: #fef2f2;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid #fecaca;
  margin-top: 12px;
}

/* ==========================================================================
   Login page
   ========================================================================== */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-lighter) 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  display: block;
  margin: 0 auto 24px auto;
  max-width: 220px;
  height: auto;
}

.login-card h1 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  color: var(--brand-dark-green);
}

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

/* ==========================================================================
   Upload page
   ========================================================================== */

.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--gray-900);
}

.page-header .subtitle {
  color: var(--gray-500);
  font-size: 14px;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-zone .material-icons {
  font-size: 48px;
  color: var(--brand-light-green);
  margin-bottom: 12px;
}

.drop-zone h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.drop-zone p {
  font-size: 14px;
  color: var(--gray-500);
}

/* Upload progress */
.upload-progress {
  margin-bottom: 16px;
}

.progress-bar-bg {
  background: var(--gray-200);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  background: var(--brand-light-green);
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 13px;
  color: var(--gray-600);
}

/* ==========================================================================
   File list table
   ========================================================================== */

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

.file-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
}

.file-table td {
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

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

.file-icon {
  font-size: 18px;
  color: var(--brand-light-green);
  vertical-align: middle;
  margin-right: 8px;
}

.actions-cell {
  display: flex;
  gap: 6px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}

.empty-state .material-icons {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--gray-400);
}

.loading-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-orange {
  background: #fef3c7;
  color: #92400e;
}

.badge-red {
  background: #fef2f2;
  color: #991b1b;
}

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

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-purple {
  background: #f3e8ff;
  color: #6b21a8;
}

/* Brand-specific badge colors */
.badge-brand-green {
  background: #e8ebdf;
  color: #424F33;
}

.badge-brand-tan {
  background: #f5ede3;
  color: #6b4a23;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  width: 100%;
  max-width: 480px;
}

.modal-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--gray-600);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

#notifications {
  position: fixed;
  top: 68px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.2s ease;
  max-width: 400px;
}

.notification-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.notification-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Section spacing
   ========================================================================== */

.section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 18px;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .separator {
  color: var(--gray-400);
}

/* Clickable table rows */
.file-table tr.clickable-row {
  cursor: pointer;
}

.file-table tr.clickable-row:hover td {
  background: var(--primary-light);
}

/* ==========================================================================
   Upload metadata form
   ========================================================================== */

.form-help {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
}

/* Disabled drop zone (metadata not filled) */
.drop-zone.drop-zone-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  border-color: var(--gray-200);
  background: var(--gray-50);
}

.drop-zone-message {
  font-size: 13px;
  color: var(--gray-400);
  font-style: italic;
  margin-top: 8px;
}

/* ==========================================================================
   Search bar
   ========================================================================== */

.search-bar {
  position: relative;
  margin-bottom: 16px;
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--gray-400);
  pointer-events: none;
}

.search-bar .search-input {
  padding-left: 40px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  margin-top: 48px;
}

.footer a {
  color: var(--brand-light-green);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}
