/* ══════════════════════════════════════
   Assist — TECHOS
   Brand: Navy (#1E3A5F) + Teal (#0D9488)
   Mobile-First Responsive
   ══════════════════════════════════════ */

:root {
  --navy: #1D88E5;
  --primary: #1D88E5;
  --border: #E2E6EE;
  --navy-light: #3B9FF5;
  --navy-dark: #14283F;
  --teal: #0D9488;
  --teal-light: #14B8A6;
  --teal-dark: #0F766E;
  --warn: #E67E22;
  --danger: #E74C3C;
  --gray-50: #F8F9FC;
  --gray-100: #F1F3F8;
  --gray-200: #E2E6EE;
  --gray-300: #C5CCD9;
  --gray-400: #9CA3B4;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(30,58,95,0.08);
  --shadow-md: 0 4px 16px rgba(30,58,95,0.1);
  --shadow-lg: 0 8px 32px rgba(30,58,95,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 50px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s ease;
  /* Mobile bottom nav height */
  --bottom-nav-height: 64px;
  /* Safe area for notched phones */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ══════════════════════════════════
   MOBILE-FIRST LAYOUT (default)
   ══════════════════════════════════ */

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* Top bar — mobile compact */
.topbar {
  background: var(--white);
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 56px;
}

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

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 20px;
  transition: var(--transition);
}

.menu-toggle:active { background: var(--gray-100); }

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

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

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.user-info { display: none; }

.page-content {
  padding: 16px;
  flex: 1;
  padding-bottom: calc(var(--bottom-nav-height) + 16px + var(--safe-bottom));
}

/* ═══ SIDEBAR — mobile drawer ═══ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.open {
  display: block;
  opacity: 1;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #14283F;
  color: var(--white);
  padding: 24px 16px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar.open { transform: translateX(0); }

.sidebar-logo {
  padding: 0 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:active { background: rgba(255,255,255,0.1); }

.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }

.nav-item.active {
  background: rgba(13,148,136,0.15);
  color: var(--teal-light);
}

.nav-item .icon { font-size: 20px; width: 26px; text-align: center; }

.nav-item .badge {
  margin-left: auto;
  background: var(--teal);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Sidebar section headers (collapsible) */
.nav-section {
  padding: 4px 0;
}

.nav-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-section-toggle:hover {
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
}

.nav-section-arrow {
  font-size: 9px;
  transition: transform 0.2s ease;
  line-height: 1;
}

.nav-section-toggle[aria-expanded="false"] .nav-section-arrow {
  transform: rotate(-90deg);
}

.nav-section-items {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 500px;
  opacity: 1;
}

.nav-section-items.collapsed {
  max-height: 0;
  opacity: 0;
}

.nav-item-nested {
  padding-left: 28px;
  font-size: 13px;
}

/* Close button in sidebar */
.sidebar-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ═══ BOTTOM NAV (mobile) ═══ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(30,58,95,0.06);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--gray-400);
  transition: var(--transition);
  flex: 1;
  max-width: 76px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:active { transform: scale(0.92); }

.bottom-nav-item .icon {
  font-size: 22px;
  line-height: 1;
}

.bottom-nav-item .label {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.bottom-nav-item.active { color: var(--teal); }

.bottom-nav-item .badge-dot {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(18px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--white);
}

/* ═══ AUTH PAGE ═══ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background: var(--gray-100);
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 28px 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-logo { margin-bottom: 8px; }
.auth-logo img { height: 32px; }

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-input {
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 16px; /* prevents iOS zoom on focus */
  font-family: var(--font);
  color: var(--gray-800);
  transition: var(--transition);
  outline: none;
  background: var(--gray-50);
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
  background: var(--white);
}

.form-input::placeholder { color: var(--gray-400); }

.auth-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-400);
}

/* ═══ BUTTONS ═══ */

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-appearance: none;
  appearance: none;
}

.btn:active { transform: scale(0.97); }

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

.btn-primary:hover { background: var(--navy-light); box-shadow: var(--shadow-md); }

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

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

.btn-full { width: 100%; }

.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:active { background: var(--gray-100); }

/* ═══ CARDS ═══ */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 20px;
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

/* ═══ DASHBOARD ═══ */



.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}




/* ═══ ACTIVITY LIST ═══ */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.activity-icon.support { background: rgba(13,148,136,0.1); }
.activity-icon.message { background: rgba(30,58,95,0.1); }
.activity-icon.delivery { background: rgba(245,158,11,0.1); }
.activity-icon.info { background: rgba(99,102,241,0.1); }

.activity-details { flex: 1; min-width: 0; }
.activity-text { font-size: 14px; color: var(--gray-700); line-height: 1.4; }
.activity-time { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ═══ CHAT — full-screen mobile ═══ */

.chat-page .page-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px - var(--bottom-nav-height) - var(--safe-bottom));
  height: calc(100dvh - 56px - var(--bottom-nav-height) - var(--safe-bottom));
  padding-bottom: 0;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.chat-header-info { flex: 1; min-width: 0; }

.chat-header-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.chat-header-status {
  font-size: 11px;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gray-50);
}

.message {
  display: flex;
  gap: 8px;
  max-width: 88%;
  animation: messageIn 0.25s ease;
}

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

.message.assist { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }

.message-bubble {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message.assist .message-bubble {
  background: var(--white);
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
  background: var(--teal);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.message.assist .message-avatar { background: linear-gradient(135deg, var(--teal), var(--navy)); }
.message.user .message-avatar { background: var(--navy); }

.chat-input-area {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 24px;
  font-size: 16px; /* prevents iOS zoom */
  font-family: var(--font);
  outline: none;
  resize: none;
  max-height: 100px;
  transition: var(--transition);
  background: var(--gray-50);
  -webkit-appearance: none;
  appearance: none;
}

.chat-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
  background: var(--white);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--teal);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-appearance: none;
}

.chat-send-btn:active { background: var(--teal-dark); transform: scale(0.92); }
.chat-send-btn:disabled { background: var(--gray-300); cursor: not-allowed; transform: none; }

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
  animation: typingBounce 1.4s infinite ease-in-out;
}

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

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ═══ EMPTY STATE ═══ */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}

.empty-state-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state-text { font-size: 14px; }

/* ═══ MISC ═══ */

.sign-out-link {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: none;
  padding: 6px;
}

.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ══════════════════════════════════
   TABLET (768px+)
   ══════════════════════════════════ */

@media (min-width: 768px) {
  .app-layout {
    flex-direction: row;
  }

  /* Persistent sidebar on desktop — always visible, no drawer */
  .sidebar {
    transform: none !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    padding: 24px 16px;
    z-index: 100;
  }
  .sidebar.open { transform: none !important; }
  .sidebar-overlay { display: none !important; }
  .sidebar-close { display: none !important; }
  .menu-toggle { display: none !important; }
  .bottom-nav { display: none !important; }

  .main-content {
    margin-left: 280px;
    flex: 1;
    min-width: 0;
  }

  .sidebar-logo { padding: 0 12px 24px; }
  .nav-item { padding: 10px 12px; font-size: 13px; }
  .nav-item .icon { font-size: 17px; width: 22px; }

  .topbar {
    padding: 12px 24px;
    position: static;
  }
  .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }
  .user-name { font-size: 13px; font-weight: 600; color: var(--gray-800); }
  .user-email { font-size: 11px; color: var(--gray-500); }

  .page-content {
    padding: 24px;
    padding-bottom: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .dashboard-grid { gap: 20px; }
  .dashboard-grid .card { display: flex; flex-direction: column; }
  .dashboard-grid .card .activity-list { flex: 1; }
  .stat-value { font-size: 26px; }

  /* Chat on tablet */
  .chat-page .page-content {
    height: calc(100vh - 56px);
    padding: 24px;
    display: flex;
    justify-content: center;
  }
  .chat-container {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
  }
  .message { max-width: 75%; }
}

/* ══════════════════════════════════
   DESKTOP (1024px+)
   ══════════════════════════════════ */

@media (min-width: 1024px) {
  .sidebar { width: 320px; padding: 24px 20px; }
  .main-content { margin-left: 320px; }
  .nav-item { padding: 12px 16px; font-size: 14px; }
  .nav-item .icon { font-size: 18px; width: 24px; }

  .topbar { padding: 16px 32px; }
  .user-name { font-size: 14px; }
  .user-email { font-size: 12px; }

  .page-content { padding: 28px; }

  .stats-grid { gap: 20px; }
  .dashboard-grid { gap: 20px; }

  .chat-page .page-content { padding: 28px; }
  .message { max-width: 70%; }
}

/* ══════════════════════════════════
   USER MANAGEMENT
   ══════════════════════════════════ */

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table thead {
  border-bottom: 2px solid #e5e7eb;
}

.users-table th {
  text-align: left;
  padding: 14px 28px;
  font-weight: 600;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f9fafb;
}

.users-table td {
  padding: 16px 28px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  line-height: 1.4;
}

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

.users-table tbody tr:hover {
  background: #f9fafb;
}

.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

.role-admin {
  background: #eef2ff;
  color: #4338ca;
}

.role-user {
  background: #f3f4f6;
  color: #6b7280;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 0 2px #dcfce7;
}

.status-dot.inactive {
  background: #d1d5db;
}

/* Status badges for users table */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-badge.status-active {
  background: #dcfce7;
  color: #166534;
}
.status-badge.status-disabled {
  background: #fef3c7;
  color: #92400e;
}

.actions-cell {
  white-space: nowrap;
  text-align: right;
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: flex-end;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 15px;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  line-height: 1;
}

.action-link:hover {
  background: #f3f4f6;
}

.text-muted {
  color: #9ca3af;
  font-size: 13px;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* User form */
.user-form {
  padding: 28px 32px;
}

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

.form-group:last-of-type {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #1D88E5;
  box-shadow: 0 0 0 3px rgba(29, 136, 229, 0.1);
}

.form-group input[readonly] {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-group input[type="date"],
.form-group input[type="time"] {
  color-scheme: light;
  color: var(--text, #1a1a2e);
}

.help-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #9ca3af;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  gap: 6px;
  line-height: 1;
}

.btn-primary {
  background: #1D88E5;
  color: #fff;
}

.btn-primary:hover {
  background: #3B9FF5;
}

.btn-secondary {
  background: #f3f4f6;
  color: #6b7280;
}

.btn-secondary:hover {
  background: #e5e7eb;
  color: #374151;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin: 0 24px 20px;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

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

.card-header .btn {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 6px;
}

.card-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Filter bar ─── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.filter-group select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--gray-800);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(29, 136, 229, 0.15);
}
.filter-clear {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
}
.filter-count {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* ─── Sortable column headers ─── */
.sort-link {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: color 0.15s;
}
.sort-link:hover {
  color: var(--primary);
}
.sort-link.active {
  color: var(--primary);
}
.sort-link .sort-icon {
  display: inline-block;
  width: 10px;
  text-align: center;
}

/* Responsive filter bar */
@media (max-width: 768px) {
  .filter-bar {
    padding: 0 16px 12px;
  }
  .filter-form {
    gap: 8px;
  }
  .filter-group select {
    font-size: 14px;
    padding: 8px 30px 8px 10px;
  }
}

/* Keep card-header consistent */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

@media (max-width: 600px) {
  .users-table th,
  .users-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  .user-form {
    padding: 20px 16px;
  }
  .alert {
    margin: 0 12px 16px;
  }
  .card-header {
    padding: 16px 16px 0;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ══════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════ */

.settings-card {
  max-width: 800px;
  margin: 0 auto;
}

.settings-body {
  padding: 20px 24px 24px;
}

.m365-status {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.m365-status-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m365-status-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.m365-status-details strong {
  font-size: 15px;
  color: #111827;
}

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

.m365-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-top: 2px;
}

.m365-status-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
  margin-top: 4px;
}

.m365-status-badge.connected {
  background: rgba(13, 148, 136, 0.1);
  color: var(--teal-dark);
}

.m365-status-badge.expired {
  background: rgba(245, 158, 11, 0.1);
  color: #B45309;
}

.m365-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.m365-note {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
  margin-top: 16px;
}

.m365-disconnect-form {
  margin-top: 4px;
}

.btn-danger {
  background: #FEE2E2 !important;
  color: #DC2626 !important;
  border: 1px solid #FECACA !important;
}

.btn-danger:hover {
  background: #FECACA !important;
}

.briefing-rules-textarea {
  width: 100%;
  font-size: 14px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  line-height: 1.6;
  transition: border-color 0.2s;
}
.briefing-rules-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 136, 229, 0.1);
}
.briefing-rules-textarea::placeholder {
  color: var(--gray-400);
  font-size: 13px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.alert-success {
  background: rgba(13, 148, 136, 0.08);
  color: var(--teal-dark);
  border: 1px solid rgba(13, 148, 136, 0.15);
}

.alert-info {
  background: rgba(29, 136, 229, 0.08);
  color: #1E6BB8;
  border: 1px solid rgba(29, 136, 229, 0.15);
}

.alert-error {
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

@media (max-width: 600px) {
  .settings-body {
    padding: 16px;
  }
  .m365-status {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .m365-status-details {
    align-items: center;
  }
  .m365-connect-btn {
    width: 100%;
    justify-content: center;
  }
  .m365-disconnect-form {
    text-align: center;
  }
}

/* ══════════════════════════════════
   CHAT — Full Chat Experience
   ══════════════════════════════════ */

.chat-page {
  display: flex;
  height: calc(100vh - 56px - var(--bottom-nav-height, 0px) - var(--safe-bottom, 0px));
  overflow: hidden;
  padding: 0 !important;
  background: var(--white);
}

/* Conversation sidebar (desktop) */
.chat-sidebar {
  display: none;
  width: 280px;
  border-right: 1px solid var(--gray-200);
  background: var(--gray-50);
  flex-shrink: 0;
  overflow-y: auto;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-sidebar-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-sidebar-new-btn {
  background: var(--teal);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.chat-sidebar-new-btn:hover {
  background: var(--teal-dark);
}

.chat-conv-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}

.chat-conv-item:hover {
  background: var(--gray-100);
}

.chat-conv-item.active {
  background: rgba(13, 148, 136, 0.08);
  border-left: 3px solid var(--teal);
}

.chat-conv-preview {
  font-size: 12px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-time {
  font-size: 11px;
  color: var(--gray-300);
  margin-top: 2px;
}

/* ─── Chat conversation title row + actions ─── */

.chat-conv-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}

.chat-conv-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.chat-conv-actions {
  display: none;
  flex-shrink: 0;
  gap: 2px;
}

.chat-conv-item:hover .chat-conv-actions,
.chat-conv-item.active .chat-conv-actions {
  display: flex;
}

.conv-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 3px;
  border-radius: 4px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.conv-action-btn:hover {
  opacity: 1;
  background: var(--gray-200);
}

.conv-rename-input {
  font-size: 13px;
  font-weight: 500;
  padding: 2px 6px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  outline: none;
  width: 100%;
  background: var(--white);
  color: var(--gray-800);
  font-family: inherit;
}

/* Main chat area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 100%;
  margin: 0;
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: var(--white);
}

.chat-header-back {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-600);
  padding: 4px;
}

.chat-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-600);
  padding: 4px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
}

.chat-header-status {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--gray-50);
  scroll-behavior: smooth;
}

/* Message bubbles */
.message {
  display: flex;
  gap: 8px;
  max-width: 85%;
  animation: msg-in 0.2s ease;
}

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

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.assist {
  align-self: flex-start;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 4px;
}

.message.assist .message-avatar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: white;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.message.assist .message-bubble {
  background: var(--white);
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
  background: var(--navy);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bubble p {
  margin: 4px 0;
}

.message-bubble strong {
  font-weight: 600;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 60px;
}

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

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

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Suggestion chips (welcome state) */
.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  gap: 16px;
  background: var(--gray-50);
}

.chat-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.2);
}

.chat-welcome h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
}

.chat-welcome p {
  font-size: 14px;
  color: var(--gray-500);
  max-width: 320px;
  line-height: 1.6;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 400px;
  margin-top: 8px;
}

.chat-suggestion-chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chat-suggestion-chip:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* Input area */
.chat-input-area {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 6px 6px 6px 14px;
  transition: var(--transition);
}

.chat-input-wrapper:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  font-family: var(--font);
  color: var(--gray-800);
  outline: none;
  resize: none;
  min-height: 24px;
  max-height: 120px;
  line-height: 1.5;
  padding: 4px 0;
}

.chat-input::placeholder {
  color: var(--gray-400);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--teal-dark);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* No conversation selected state */
.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  color: var(--gray-400);
  gap: 8px;
  background: var(--gray-50);
}

.chat-empty-state .icon {
  font-size: 48px;
  opacity: 0.5;
}

.chat-empty-state p {
  font-size: 14px;
  max-width: 240px;
  line-height: 1.5;
}

/* Markdown in messages */
.message-bubble strong {
  font-weight: 600;
}

.message-bubble a {
  color: inherit;
  text-decoration: underline;
}

/* ── Desktop overrides ── */

@media (min-width: 768px) {
  .chat-page {
    height: calc(100vh - 60px);
  }

  .chat-sidebar {
    display: flex;
    flex-direction: column;
  }

  .chat-sidebar-toggle {
    display: none !important;
  }

  .chat-container {
    max-width: 100%;
  }

  .chat-messages {
    padding: 20px 24px 8px;
  }

  .message {
    max-width: 70%;
  }

  .chat-welcome h2 {
    font-size: 20px;
  }
}

/* Mobile: sidebar slides in */
@media (max-width: 767px) {
  .chat-sidebar-toggle {
    display: inline-flex;
  }

  .chat-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    bottom: 0;
    width: 280px;
    z-index: 100;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: left 0.25s ease;
    display: flex;
    flex-direction: column;
  }

  .chat-sidebar.open {
    left: 0;
  }

  .chat-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
  }

  .chat-sidebar-overlay.open {
    display: block;
  }

  .chat-header-back {
    display: inline-flex;
  }

  .chat-empty-state {
    display: flex;
  }

  /* Show conv action buttons on mobile (no hover) */
  .chat-conv-actions {
    display: flex;
    opacity: 0.6;
  }
  .conv-action-btn {
    font-size: 16px;
    padding: 4px 6px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ══════════════════════════════════════
   Audit Log Page
   ══════════════════════════════════════ */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-primary { background: #E0F2FE; color: #0369A1; }
.badge-success { background: #DCFCE7; color: #15803D; }
.badge-danger  { background: #FEE2E2; color: #B91C1C; }
.badge-warning { background: #FEF3C7; color: #B45309; }
.badge-info    { background: #E0F2FE; color: #0369A1; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.audit-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--gray-500);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

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

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

.details-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--gray-200);
}

.pagination-link {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--teal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.pagination-link:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

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

/* Responsive audit table */
@media (max-width: 767px) {
  .audit-table th:nth-child(2),
  .audit-table td:nth-child(2) { display: none; }
  .audit-table th:nth-child(3),
  .audit-table td:nth-child(3) { display: none; }
  .audit-table th:nth-child(6),
  .audit-table td:nth-child(6) { display: none; }
  .audit-table th:nth-child(7),
  .audit-table td:nth-child(7) { display: none; }
}

/* ══════════════════════════════════════
   HR Module
   ══════════════════════════════════════ */

/* Stats grid – 4 stat cards across the top */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  max-width: 1040px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.2;
}

.stat-footer {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* HR module cards grid */
.hr-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 1040px;
}

.hr-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: var(--transition);
  border: 1px solid var(--gray-100);
}

.hr-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.hr-card-icon {
  font-size: 20px;
  line-height: 1;
}

.hr-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
}

.hr-card-desc {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.3;
}

/* Mobile: stats stack vertically, cards go 2-col */
@media (max-width: 767px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .hr-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .hr-card {
    flex: 0 0 calc(50% - 6px);
    padding: 14px 12px;
  }

  .hr-card-icon {
    font-size: 22px;
  }
}

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

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

  .hr-grid {
    gap: 10px;
  }
}
