/* EZEvict Platform — Admin Dashboard */
/* Design tokens aligned with ezevictusa.com */

:root {
  /* Primary brand palette from ezevictusa.com */
  --primary: #0077D8;
  --primary-hover: #008BFE;
  --primary-dark: #005fa3;
  --primary-light: #F2F9FF;
  --primary-50: #F2F9FF;

  /* Dark navy tones from site */
  --navy: #0A0935;
  --navy-light: #16155B;
  --text-secondary: #4C4B66;

  /* Semantic colors */
  --success: #0D9E4F;
  --success-light: #ecfdf5;
  --success-bg: #d1fae5;
  --warning: #D97706;
  --warning-light: #fffbeb;
  --warning-bg: #fef3c7;
  --danger: #DC2626;
  --danger-light: #fef2f2;
  --danger-bg: #fee2e2;
  --info: #0077D8;
  --info-light: #F2F9FF;
  --info-bg: #DBEAFE;

  /* Grays (aligned with site palette) */
  --gray-50: #FAFBFC;
  --gray-100: #f2f5f7;
  --gray-200: #e1e8ed;
  --gray-300: #D5E2EE;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4C4B66;
  --gray-700: #16155B;
  --gray-800: #0A0935;
  --gray-900: #060520;

  /* Border radius from site */
  --radius: 5px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 2px 8px rgba(2,46,81,0.06);
  --shadow-md: 0 4px 12px rgba(2,46,81,0.08);
  --shadow-lg: 0 8px 24px rgba(2,46,81,0.1);

  --transition: .2s ease;

  /* Gradient from site buttons */
  --gradient-primary: linear-gradient(270deg, #008BFE 0%, #0077D8 100%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.65;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); text-decoration: none; }

/* ========================
   Layout
   ======================== */
.layout { display: flex; min-height: 100vh; }

/* ========================
   Sidebar
   ======================== */
.sidebar {
  width: 256px;
  background: linear-gradient(180deg, var(--gray-900) 0%, #0a0a2e 100%);
  color: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
}

.sidebar-brand {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.sidebar-brand h1 i {
  color: var(--primary-hover);
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,119,216,0.15);
  border-radius: var(--radius);
}

.sidebar-brand span {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  display: block;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.sidebar-nav { padding: 16px 0; flex: 1; overflow-y: auto; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,.55);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  margin: 1px 0;
}

.sidebar-nav a i {
  width: 20px;
  font-size: 15px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav a:hover {
  background: rgba(0,119,216,0.08);
  color: white;
  border-left-color: rgba(0,139,254,0.3);
}

.sidebar-nav a.active {
  background: rgba(0,119,216,0.12);
  color: white;
  border-left-color: var(--primary-hover);
}

.sidebar-nav a.active i {
  color: var(--primary-hover);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px;
  color: rgba(255,255,255,.35);
}

.sidebar-footer strong { color: rgba(255,255,255,.7); }
.sidebar-footer a { color: rgba(255,255,255,.35); }
.sidebar-footer a:hover { color: rgba(255,255,255,.7); }

/* ========================
   Main Content
   ======================== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 256px;
}

.topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 28px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 3px rgba(2,46,81,0.04);
}

.topbar h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-600);
}

.topbar-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.content {
  padding: 28px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* ========================
   Login Page
   ======================== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--gray-900) 0%, #0a0a2e 50%, #0d0d3d 100%);
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.login-card .login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.login-card .login-logo i {
  font-size: 32px;
  color: var(--primary);
}

.login-card h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 4px;
  color: var(--navy);
  font-weight: 700;
}

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

/* ========================
   Forms
   ======================== */
.form-group { margin-bottom: 18px; }

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--navy);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: white;
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,119,216,0.1);
}

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

select.form-control { cursor: pointer; }

/* ========================
   Buttons (site gradient style)
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
  letter-spacing: 0.1px;
}

.btn i { font-size: 13px; }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0,119,216,0.25);
}
.btn-primary:hover {
  background: linear-gradient(270deg, #0077D8 0%, #0060b8 100%);
  box-shadow: 0 4px 12px rgba(0,119,216,0.3);
  color: white;
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #0b8a43; color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }

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

.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);
  color: var(--gray-800);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ========================
   Cards
   ======================== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-300);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--primary);
}

.card-body { padding: 22px; }

/* ========================
   Stat Cards
   ======================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-300);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-200);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-icon.total { background: var(--primary-light); color: var(--primary); }
.stat-icon.pending { background: var(--warning-bg); color: var(--warning); }
.stat-icon.mailed { background: var(--info-bg); color: var(--info); }
.stat-icon.delivered { background: var(--success-bg); color: var(--success); }
.stat-icon.bounced { background: var(--danger-bg); color: var(--danger); }

.stat-card .stat-info { flex: 1; }

.stat-card .stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

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

.stat-card .stat-change {
  font-size: 12px;
  margin-top: 4px;
  color: var(--gray-400);
}

.stat-card .stat-change a {
  font-weight: 600;
}

/* ========================
   Tables
   ======================== */
.table-wrapper { overflow-x: auto; }

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

th, td {
  padding: 12px 18px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-200);
}

th {
  font-weight: 600;
  color: var(--gray-500);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gray-50);
  white-space: nowrap;
}

tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--primary-light); }

td a {
  font-weight: 500;
}

/* ========================
   Badges
   ======================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.badge i { font-size: 10px; }

.badge-received, .badge-document_generated { background: var(--gray-100); color: var(--gray-600); }
.badge-under_review { background: var(--warning-bg); color: var(--warning); }
.badge-approved { background: var(--primary-light); color: var(--primary-dark); }
.badge-submitted_to_docsmit { background: var(--info-bg); color: var(--info); }
.badge-certified_mail_sent { background: var(--info-bg); color: var(--info); }
.badge-delivered { background: var(--success-bg); color: #0b8a43; }
.badge-bounced { background: var(--danger-bg); color: var(--danger); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }

/* ========================
   Alerts
   ======================== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}

.alert i { margin-top: 1px; }
.alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(220,38,38,0.15); }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid rgba(13,158,79,0.15); }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(217,119,6,0.15); }
.alert-info { background: var(--info-light); color: var(--info); border: 1px solid rgba(0,119,216,0.15); }

/* ========================
   Pagination
   ======================== */
.pagination {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  justify-content: center;
}

.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pagination a:hover {
  background: var(--primary-light);
  text-decoration: none;
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0,119,216,0.25);
}

/* ========================
   Detail Pages
   ======================== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.detail-section { margin-bottom: 28px; }
.detail-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
}

.detail-section h3 i { color: var(--primary); font-size: 15px; }

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
}

.detail-row .label {
  color: var(--gray-500);
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-row .value {
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  color: var(--navy);
}

/* ========================
   Toolbar
   ======================== */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar .search-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230077D8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a4.008 4.008 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 12px center;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--navy);
}

.toolbar .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,119,216,0.1);
}

/* ========================
   Back Link
   ======================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 18px;
  transition: color var(--transition);
}

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

/* ========================
   Activity Timeline
   ======================== */
.timeline { list-style: none; }

.timeline-item {
  padding: 12px 0;
  border-left: 2px solid var(--gray-200);
  padding-left: 22px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 2px solid white;
}

.timeline-item:first-child { border-left-color: var(--primary); }
.timeline-item:first-child::before { background: var(--primary); }

.timeline-time {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}
.timeline-action { font-size: 14px; font-weight: 600; color: var(--navy); }
.timeline-details { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* ========================
   PDF Frame
   ======================== */
.pdf-frame {
  width: 100%;
  height: 560px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
}

/* ========================
   Empty State
   ======================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}

.empty-state i {
  font-size: 44px;
  margin-bottom: 14px;
  color: var(--gray-300);
  display: block;
}
.empty-state h3 { color: var(--gray-600); margin-bottom: 6px; font-size: 16px; font-weight: 600; }
.empty-state p { font-size: 14px; color: var(--gray-400); }

/* ========================
   Status Bar
   ======================== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.status-bar .stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
}

.status-bar .stage-time {
  font-size: 12px;
  color: var(--gray-400);
}

/* ========================
   Divider
   ======================== */
hr.divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 24px 0;
}

/* ========================
   Utility Classes
   ======================== */
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--gray-500); }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }

/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
}
.hamburger:hover {
  background: var(--gray-100);
}

/* Notification Bell */
.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--gray-500);
  transition: all var(--transition);
}
.notification-bell:hover {
  background: var(--gray-100);
  color: var(--primary);
  text-decoration: none;
}
.notification-bell i {
  font-size: 16px;
}
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Notification List */
.notification-list {
  display: flex;
  flex-direction: column;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-unread {
  background: #f0f5ff;
}
.notification-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}
.notification-unread .notification-icon {
  background: #e0ecff;
  color: var(--primary);
}
.notification-body {
  flex: 1;
  min-width: 0;
}
.notification-message {
  font-size: 14px;
  color: var(--gray-700);
}
.notification-unread .notification-message {
  font-weight: 600;
  color: var(--gray-800);
}
.notification-time {
  margin-top: 4px;
}
.notification-actions {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
}

/* ========================
   Date Range Toggle
   ======================== */
.date-range-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}
.date-range-toggle a {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  transition: all var(--transition);
}
.date-range-toggle a:hover {
  color: var(--gray-700);
  text-decoration: none;
}
.date-range-toggle a.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ========================
   Bulk Action Toolbar
   ======================== */
.bulk-toolbar {
  position: sticky;
  bottom: 16px;
  background: white;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 20px;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  z-index: 20;
}
.bulk-count {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
}

/* ========================
   Comments / Internal Notes
   ======================== */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-bubble {
  background: var(--gray-50, #f8f9fa);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius);
  padding: 12px 16px;
  position: relative;
}
.comment-bubble::before {
  content: '';
  position: absolute;
  top: 12px;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--gray-200, #e5e7eb);
}
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
.comment-header strong {
  color: var(--gray-700);
}
.comment-time {
  color: var(--gray-400);
  font-size: 12px;
}
.comment-body {
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ========================
   Edit Form
   ======================== */
.edit-form .detail-section {
  margin-bottom: 24px;
}
.edit-form .form-group {
  margin-bottom: 16px;
}

/* ========================
   Global Search
   ======================== */
.global-search {
  position: relative;
  flex: 1;
  max-width: 400px;
  margin: 0 24px;
}
.global-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
  pointer-events: none;
}
.global-search-input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  color: var(--navy);
  background: var(--gray-50);
  transition: all var(--transition);
}
.global-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(0,119,216,0.1);
}
.global-search-input::placeholder {
  color: var(--gray-400);
}
.global-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 50;
  max-height: 400px;
  overflow-y: auto;
}
.global-search-dropdown.active {
  display: block;
}
.global-search-group {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
}
.global-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-700);
  text-decoration: none;
  transition: background var(--transition);
}
.global-search-item:hover {
  background: var(--primary-light);
  text-decoration: none;
}
.global-search-item i {
  width: 16px;
  color: var(--gray-400);
  flex-shrink: 0;
}
.global-search-item .search-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search-item .search-sub {
  font-size: 11px;
  color: var(--gray-400);
}
.global-search-empty {
  padding: 16px;
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 50;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 45;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .hamburger {
    display: block;
  }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
  .global-search { display: none; }
}
