/* ============================================
   CARDTRIA - Arsela Resources Branding
   Business Card OCR & Contact Capture App
   ============================================ */

:root {
  --navy: #001F3D;
  --navy-dark: #001628;
  --navy-light: #002D5A;
  --blue: #1346B8;
  --teal: #00AB96;
  --teal-light: #00C4AC;
  --bg-grey: #F4F6F8;
  --card-white: #FFFFFF;
  --border-grey: #E2E6F0;
  --text-primary: #1A1F2E;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --success-bg: #DCFCE7;
  --warning-bg: #FEF9C3;
  --danger-bg: #FEE2E2;
  --font: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-width: 240px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-grey);
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
  min-height: 100vh;
  display: flex;
}

.login-left {
  flex: 0 0 460px;
  background: var(--card-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  position: relative;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.login-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.login-logo-text {
  display: flex;
  flex-direction: column;
}

.login-logo-text .brand { font-size: 16px; font-weight: 700; color: var(--navy); letter-spacing: 0.05em; }
.login-logo-text .product { font-size: 11px; color: var(--text-secondary); letter-spacing: 0.08em; text-transform: uppercase; }

.login-heading { font-size: 28px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.login-subtext { color: var(--text-secondary); margin-bottom: 32px; font-size: 14px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.login-input {
  border: 1.5px solid var(--border-grey);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(19,70,184,0.1);
}

.login-btn {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  font-family: var(--font);
  transition: opacity 0.2s, transform 0.1s;
}

.login-btn:hover { opacity: 0.95; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  font-weight: 500;
}

.login-powered {
  position: absolute;
  bottom: 24px;
  left: 56px;
  font-size: 11px;
  color: var(--text-muted);
}

.first-time-notice {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.first-time-notice i { margin-top: 2px; flex-shrink: 0; }

.login-right {
  flex: 1;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1346B8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.login-right::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(0,171,150,0.2) 0%, transparent 60%);
  pointer-events: none;
}

.login-preview {
  color: white;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-preview-icon {
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  margin: 0 auto 24px;
  border: 1px solid rgba(255,255,255,0.2);
}

.login-preview h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.login-preview p { font-size: 14px; color: rgba(255,255,255,0.7); max-width: 320px; line-height: 1.6; }

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.feature-pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
}

/* ============================================
   APP SHELL
   ============================================ */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-logo-text { display: flex; flex-direction: column; }
.sidebar-logo-text .brand { font-size: 14px; font-weight: 700; color: white; letter-spacing: 0.05em; }
.sidebar-logo-text .product { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 0.08em; text-transform: uppercase; }

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

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  font-size: 13.5px;
  font-weight: 500;
  user-select: none;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}

.nav-item.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left-color: var(--teal);
}

.nav-item i { width: 16px; text-align: center; font-size: 13px; }

.nav-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 8px 0; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

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

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: rgba(255,255,255,0.4); }

.logout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logout-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }

.powered-by {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin-top: 10px;
  text-align: center;
}

/* MAIN CONTENT */
.main-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.topbar {
  background: var(--card-white);
  border-bottom: 1px solid var(--border-grey);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-grey);
  border: 1.5px solid var(--border-grey);
  border-radius: 8px;
  padding: 6px 14px;
  width: 300px;
}

.topbar-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font);
  width: 100%;
}

.topbar-search i { color: var(--text-muted); font-size: 13px; }

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

.topbar-new-btn {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  transition: opacity 0.15s;
}

.topbar-new-btn:hover { opacity: 0.9; }

#main-content {
  padding: 28px 32px;
  max-width: 1400px;
}

/* ============================================
   CARDS & LAYOUT
   ============================================ */
.card {
  background: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-grey);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-grey);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

/* ============================================
   PAGE HEADERS
   ============================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}

.page-subtitle { font-size: 13px; color: var(--text-secondary); }

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

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

.stat-card {
  background: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-grey);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

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

.stat-value { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: var(--font);
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: white;
  border-color: transparent;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(19,70,184,0.3); }

.btn-secondary {
  background: var(--card-white);
  color: var(--text-primary);
  border-color: var(--border-grey);
}
.btn-secondary:hover { background: var(--bg-grey); border-color: #CBD5E1; }

.btn-danger {
  background: var(--card-white);
  color: var(--danger);
  border-color: #FECACA;
}
.btn-danger:hover { background: var(--danger-bg); }

.btn-ghost { background: none; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-grey); color: var(--text-primary); }

.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 5px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.w-full { width: 100%; justify-content: center; }
.mr-2 { margin-right: 8px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.hidden { display: none !important; }

/* ============================================
   FORMS
   ============================================ */
.form-input {
  width: 100%;
  border: 1.5px solid var(--border-grey);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text-primary);
  background: white;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(19,70,184,0.08);
}

textarea.form-input { resize: vertical; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.field-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-grey);
  margin-bottom: 12px;
}

/* Confidence indicators */
.confidence-low .form-input { border-color: #FCA5A5; background: #FFF7F7; }
.confidence-medium .form-input { border-color: #FCD34D; background: #FFFDF0; }

.input-with-status { position: relative; }
.key-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
}
.key-status.configured { color: var(--success); }
.key-status.not-configured { color: var(--warning); }

/* ============================================
   DATA TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  background: var(--bg-grey);
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-grey);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-grey);
  transition: background 0.1s;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-grey); }

.data-table td {
  padding: 11px 14px;
  vertical-align: middle;
  color: var(--text-primary);
}

.table-footer {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-grey);
  background: var(--bg-grey);
}

.actions-cell { display: flex; gap: 4px; align-items: center; }

.contact-name-link {
  cursor: pointer;
  color: var(--blue);
}
.contact-name-link:hover { text-decoration: underline; }

/* ============================================
   BADGES & STATUS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-secondary { background: var(--bg-grey); color: var(--text-secondary); border: 1px solid var(--border-grey); }

/* ============================================
   UPLOAD ZONE
   ============================================ */
.upload-zone {
  border: 2px dashed var(--border-grey);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-grey);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--blue);
  background: rgba(19,70,184,0.03);
}

.upload-icon {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.upload-text p { font-size: 15px; color: var(--text-primary); margin-bottom: 4px; }
.upload-subtext { font-size: 13px; color: var(--text-secondary) !important; }
.upload-types { font-size: 12px; color: var(--text-muted) !important; margin-top: 8px !important; }

.upload-actions { display: flex; gap: 10px; justify-content: center; }

/* ============================================
   PREVIEW & REVIEW LAYOUT
   ============================================ */
.preview-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.preview-img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  object-fit: contain;
  max-height: 300px;
}

.review-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

.review-image-panel { position: sticky; top: 80px; }

.card-preview-img {
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  max-height: 260px;
  box-shadow: var(--shadow);
}

.card-preview-img-sm {
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  max-height: 180px;
}

.no-image {
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 32px;
}

.ocr-pre {
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  background: var(--bg-grey);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  max-height: 300px;
  overflow-y: auto;
}

.review-save-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================
   PROCESSING STATUS
   ============================================ */
.processing-card {
  text-align: center;
  padding: 40px 32px;
  background: var(--card-white);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-lg);
}

.processing-spinner { color: var(--blue); margin-bottom: 16px; }
.processing-card h4 { font-size: 17px; margin-bottom: 24px; color: var(--navy); }

.processing-steps { display: flex; flex-direction: column; gap: 10px; max-width: 300px; margin: 0 auto; }

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-grey);
  transition: all 0.3s;
}

.step-item.active { color: var(--blue); background: rgba(19,70,184,0.06); font-weight: 600; }
.step-item.done { color: var(--success); background: var(--success-bg); }

/* ============================================
   CAMERA
   ============================================ */
.camera-container { text-align: center; }
.camera-video { width: 100%; max-height: 480px; border-radius: 12px; background: #000; }
.camera-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* ============================================
   CONTACT DETAIL
   ============================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.detail-sidebar { position: sticky; top: 80px; }

.contact-avatar-row { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-grey); }

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

.contact-full-name { font-size: 19px; font-weight: 700; color: var(--navy); }
.contact-role { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.contact-fields { display: flex; flex-direction: column; gap: 12px; }

.contact-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.field-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-grey);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.field-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.field-value { font-size: 13.5px; color: var(--text-primary); }

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-grey);
  font-size: 12.5px;
}
.meta-row:last-child { border-bottom: none; }
.meta-row > span:first-child { color: var(--text-muted); }

.tags-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  background: rgba(19,70,184,0.07);
  color: var(--blue);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar-wrap { flex: 1; }

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border-grey);
  border-radius: 8px;
  padding: 7px 14px;
  background: var(--bg-grey);
  max-width: 440px;
}

.search-input { background: none; border: none; outline: none; font-size: 13px; font-family: var(--font); width: 100%; }
.search-icon { color: var(--text-muted); }

.select-actions { display: flex; align-items: center; gap: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
}

.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid #FCD34D; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

.duplicate-item {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.04);
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 12px;
}

/* ============================================
   EXPORTS PAGE
   ============================================ */
.exports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.export-card {
  padding: 32px 24px !important;
}

.export-icon {
  font-size: 40px;
  color: var(--blue);
  margin-bottom: 14px;
}

.coming-soon-icon { color: var(--text-muted) !important; }

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

.instruction-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.instruction-step p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

/* ============================================
   LOADING / EMPTY / ERROR STATES
   ============================================ */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state i { font-size: 36px; display: block; margin-bottom: 12px; }
.error-state { text-align: center; padding: 24px; color: var(--danger); font-size: 13px; }

.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-grey) 25%, #eaecf0 50%, var(--bg-grey) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-grey);
}

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--navy);
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  max-width: 380px;
  pointer-events: auto;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #15803D; }
.toast-error { background: #B91C1C; }
.toast-info { background: var(--navy); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .exports-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 200px; }
  .review-layout, .detail-layout { grid-template-columns: 1fr; }
  .review-image-panel, .detail-sidebar { position: static; }
  #main-content { padding: 20px 20px; }
}

@media (max-width: 768px) {
  .sidebar { width: 60px; overflow: hidden; }
  .sidebar-logo-text, .nav-item span, .sidebar-footer .user-info,
  .sidebar-footer .logout-btn span, .nav-section-label, .powered-by { display: none; }
  .sidebar-logo { justify-content: center; padding: 14px; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item i { width: auto; font-size: 16px; }
  .main-area { margin-left: 60px; }
  .login-right { display: none; }
  .login-left { flex: 1; padding: 40px 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .exports-grid { grid-template-columns: 1fr; }
  .preview-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .sidebar { display: none; }
  .main-area { margin-left: 0; }
  .page-header { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  #main-content { padding: 16px; }
}
