/* ============================================================
   ForeShiloh Client Portal - Stylesheet
   Light theme, Apple-inspired, clean and minimal
   ============================================================ */

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

:root,
[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-white: #ffffff;
  --bg-hover: #fafafa;
  --bg-input: #f5f5f7;
  --border: rgba(0,0,0,0.06);
  --border-hover: rgba(0,0,0,0.1);
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --primary: #D4A843;
  --primary-soft: rgba(212,168,67,0.10);
  --primary-hover: rgba(212,168,67,0.16);
  --success: #34c759;
  --success-soft: rgba(52,199,89,0.10);
  --warning: #ff9f0a;
  --warning-soft: rgba(255,159,10,0.10);
  --danger: #ff3b30;
  --danger-soft: rgba(255,59,48,0.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --chat-user-bg: #1d1d1f;
  --chat-user-text: #ffffff;
  --scrollbar-thumb: rgba(0,0,0,0.08);
  --scrollbar-hover: rgba(0,0,0,0.14);
  --badge-success-text: #248a3d;
  --badge-warning-text: #c77c00;
  --badge-danger-text: #d70015;
}

[data-theme="dark"] {
  --bg: #060608;
  --bg-white: #0d0d12;
  --bg-hover: #111118;
  --bg-input: #0a0a0f;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e0e0e0;
  --text-secondary: #999;
  --text-tertiary: #555;
  --primary: #D4A843;
  --primary-soft: rgba(212,168,67,0.12);
  --primary-hover: rgba(212,168,67,0.20);
  --success: #30d158;
  --success-soft: rgba(48,209,88,0.12);
  --warning: #ffd60a;
  --warning-soft: rgba(255,214,10,0.12);
  --danger: #ff453a;
  --danger-soft: rgba(255,69,58,0.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
  --chat-user-bg: rgba(212,168,67,0.15);
  --chat-user-text: var(--text);
  --scrollbar-thumb: rgba(255,255,255,0.08);
  --scrollbar-hover: rgba(255,255,255,0.14);
  --badge-success-text: #30d158;
  --badge-warning-text: #ffd60a;
  --badge-danger-text: #ff453a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body, .sidebar, .topbar, .main-content, .metric-card, .section-card, .module-card,
.report-card, .chat-page, .chat-input-bar, .chat-actions { transition: background-color 0.3s, border-color 0.3s, color 0.3s; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg);
}

.login-card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.login-card .wordmark {
  font-family: 'Julius Sans One', sans-serif;
  font-size: 22px;
  color: var(--text);
  letter-spacing: 4px;
  margin-bottom: 6px;
}

.shiloh-stamp {
  color: #34c759;
  position: relative;
}

.shiloh-stamp::before {
  content: '';
  position: absolute;
  inset: -3px -6px;
  border: 2px solid #34c759;
  border-radius: 4px;
  opacity: 0.35;
}

.login-card .subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 36px;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.login-card input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
  transition: all 0.2s;
}

.login-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.login-card input::placeholder { color: var(--text-tertiary); }

.login-card button {
  width: 100%;
  padding: 12px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.login-card button:hover { opacity: 0.85; }

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 14px;
  display: none;
}

/* ============================================================
   APP LAYOUT
   ============================================================ */

.app { display: none; height: 100vh; }
.app.active { display: flex; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 18px;
}

.sidebar-header .wordmark {
  font-family: 'Julius Sans One', sans-serif;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 3px;
}

.sidebar-header .company-name {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-weight: 500;
}

.sidebar-nav {
  padding: 8px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  user-select: none;
  margin: 1px 0;
}

.nav-item:hover {
  color: var(--text);
  background: var(--bg);
}

.nav-item.active {
  color: var(--text);
  background: var(--bg);
  border-left-color: var(--primary);
  font-weight: 600;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.tier-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.logout-btn {
  display: block;
  margin-top: 12px;
  padding: 4px 0;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 500;
  transition: color 0.15s;
}

.logout-btn:hover { color: var(--danger); }

/* Main content area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  background: var(--bg-white);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.topbar-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.hamburger:hover { background: var(--bg); }

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.25s;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  background: var(--bg);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Nav badges */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-badge.visible { display: flex; }

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */

/* Metric cards */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.metric-card:hover {
  box-shadow: var(--shadow);
}

.metric-card .label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.metric-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.metric-card .value.gold { color: var(--primary); }

.metric-card .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* Section cards */
.section-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.section-card .section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.1px;
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge.success { background: var(--success-soft); color: var(--badge-success-text); }
.badge.warning { background: var(--warning-soft); color: var(--badge-warning-text); }
.badge.danger { background: var(--danger-soft); color: var(--badge-danger-text); }
.badge.neutral { background: rgba(0,0,0,0.04); color: var(--text-secondary); }
.badge.gold { background: var(--primary-soft); color: #a07d28; }

/* Health dot */
.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.health-dot.green { background: var(--success); }
.health-dot.yellow { background: var(--warning); }
.health-dot.red { background: var(--danger); }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

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

.data-table tr:hover td { background: var(--bg); }

/* Activity items */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.success { background: var(--success); }
.activity-dot.failed { background: var(--danger); }
.activity-dot.skipped { background: var(--text-tertiary); }

.activity-text {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  line-height: 1.5;
}

.activity-text strong { color: var(--text); font-weight: 600; }

.activity-time {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  font-weight: 500;
}

/* Module cards */
.module-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.module-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.module-card .module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.module-card .module-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.1px;
}

.module-card .module-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.module-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.module-stat {
  font-size: 12px;
  color: var(--text-tertiary);
}

.module-stat .stat-value {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Filters bar */
.filters-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.filters-bar select,
.filters-bar input {
  padding: 8px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.filters-bar select {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aeaeb2' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filters-bar select:focus,
.filters-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Chart containers */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  margin: 16px 0;
}

/* ============================================================
   CHAT PAGE
   ============================================================ */

.chat-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height));
  padding: 0;
}

.chat-page {
  flex-direction: column;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
  background: var(--bg-white);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
  text-align: center;
}

.chat-empty h2 {
  font-size: 22px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.chat-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.chat-msg {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeIn 0.25s ease;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--chat-user-bg);
  color: var(--chat-user-text);
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg.assistant .msg-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.chat-msg.system {
  align-self: center;
  background: none;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
}

.chat-msg pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-xs);
  overflow-x: auto;
  margin: 8px 0;
  font-size: 13px;
  border: 1px solid var(--border);
}

.chat-msg.user pre {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.chat-msg code {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
}

.typing-indicator {
  display: none;
  align-self: flex-start;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-left: 32px;
}

.typing-indicator.active { display: flex; gap: 5px; align-items: center; }

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Quick actions */
.chat-actions {
  display: flex;
  gap: 8px;
  padding: 12px 32px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  background: var(--bg-white);
}

.chat-action-btn {
  padding: 7px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.chat-action-btn:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-white);
}

/* Chat input */
.chat-input-bar {
  display: flex;
  gap: 12px;
  padding: 16px 32px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
  flex-shrink: 0;
}

.chat-input-bar textarea {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  min-height: 44px;
  line-height: 1.4;
  transition: all 0.2s;
}

.chat-input-bar textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.chat-input-bar textarea::placeholder { color: var(--text-tertiary); }

.chat-send-btn {
  width: 44px;
  height: 44px;
  background: var(--text);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.chat-send-btn:hover { opacity: 0.85; }
.chat-send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.chat-send-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Prime button */
.prime-btn {
  padding: 7px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.prime-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ============================================================
   SUPPORT PAGE
   ============================================================ */

.support-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.support-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.support-form button {
  padding: 10px 24px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.support-form button:hover { opacity: 0.85; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 10px;
  display: none;
}

.faq-item.open .faq-answer { display: block; }

/* Report cards */
.report-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.report-card:hover { box-shadow: var(--shadow); }

.report-card .report-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.report-card .report-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  font-weight: 500;
}

.report-card .report-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.report-download {
  padding: 7px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.report-download:hover {
  border-color: var(--text);
  background: var(--bg-white);
}

/* Contact card */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card .contact-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.contact-card .contact-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.contact-card .contact-detail a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-card .contact-detail a:hover { text-decoration: underline; }

/* Schedule items */
.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.schedule-item:last-child { border-bottom: none; }

.schedule-module {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.schedule-time {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Cost of Inaction */
.coi-card {
  background: var(--bg-white);
  border: 1px solid rgba(255,59,48,0.15);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.coi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--danger);
  margin-bottom: 8px;
  font-weight: 700;
}

.coi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: -0.5px;
}

.coi-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    z-index: 100;
    transition: left 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open {
    left: 0;
    box-shadow: var(--shadow-lg);
  }

  .metric-grid { grid-template-columns: 1fr 1fr; }
  .chat-msg { max-width: 90%; }
  .page-content { padding: 20px 16px; }
  .chat-messages { padding: 20px 16px; }
  .chat-actions { padding: 12px 16px; }
  .chat-input-bar { padding: 12px 16px 16px; }
  .topbar { padding: 0 16px; }
}

/* Page transitions */
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }

/* Chat page needs flex not block */
.page.chat-page.active { display: flex; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
