@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-app: #020617;
  --bg-sidebar: rgba(15, 23, 42, 0.7);
  --bg-sidebar-solid: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-solid: #0f172a;
  --bg-input: #1e293b;
  --bg-input-focus: rgba(0, 0, 0, 0.4);
  --bg-disabled: rgba(255, 255, 255, 0.02);
  --bg-upload-zone: rgba(255, 255, 255, 0.02);
  
  --border-light: rgba(255, 255, 255, 0.1);
  --border-dashed: rgba(255, 255, 255, 0.15);
  
  --primary: #6366F1;
  --primary-text: #818CF8;
  --primary-hover: #4F46E5;
  --primary-glow: rgba(99, 102, 241, 0.3);
  --gradient-brand: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
  --gradient-cyan: linear-gradient(135deg, #22D3EE 0%, #6366F1 100%);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  
  --font-sans: 'Outfit', sans-serif;
  --font-display: 'Space Grotesk', 'Outfit', sans-serif;
  --glass: blur(12px) saturate(160%);
  
  --bg-overlay: rgba(15, 23, 42, 0.4);
  --bg-overlay-heavy: rgba(15, 23, 42, 0.85);
  --modal-border: rgba(255, 255, 255, 0.15);
  --modal-shadow-inset: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-sidebar: rgba(255, 255, 255, 0.8);
  --bg-sidebar-solid: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.65);
  --bg-card-solid: #ffffff;
  --bg-input: #f1f5f9;
  --bg-input-focus: #ffffff;
  --bg-disabled: #e2e8f0;
  --bg-upload-zone: rgba(0, 0, 0, 0.02);
  
  --border-light: rgba(0, 0, 0, 0.08);
  --border-dashed: rgba(0, 0, 0, 0.12);
  
  --primary: #4f46e5;
  --primary-text: #4f46e5;
  --primary-hover: #3730a3;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  
  --bg-overlay: rgba(15, 23, 42, 0.15);
  --bg-overlay-heavy: rgba(255, 255, 255, 0.9);
  --modal-border: rgba(0, 0, 0, 0.08);
  --modal-shadow-inset: rgba(0, 0, 0, 0.03);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Ambient gradient-mesh backdrop — signature depth layer for the whole app */
html:not([data-theme="light"]) body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 8% 8%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(700px circle at 92% 18%, rgba(168, 85, 247, 0.13), transparent 60%),
    radial-gradient(650px circle at 25% 92%, rgba(34, 211, 238, 0.09), transparent 60%);
  animation: meshDrift 24s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="light"]) body::before { animation: none; }
}
#dashboard-view, #auth-view { position: relative; z-index: 1; }

.hidden { display: none !important; }

/* Auth / Login Page Styling - Bento */
.flex-center {
  display: flex; justify-content: center; align-items: center; min-height: 100vh;
  background: var(--bg-app);
}

.login-box {
  width: 100%; max-width: 440px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: 32px; padding: 50px;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05); text-align: center;
}

.brand { margin-bottom: 40px; }
.brand-icon { width: 48px; height: 48px; color: var(--primary); margin-bottom: 20px; }
.brand h2 { font-size: 28px; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.5px; }
.brand p { color: var(--text-secondary); font-weight: 500; font-size: 15px; }

.input-group { position: relative; margin-bottom: 24px; text-align: left; }
.input-group i {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-secondary); width: 20px; height: 20px; pointer-events: none;
}
.input-group input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-light);
  padding: 16px 16px 16px 52px; color: var(--text-primary); border-radius: 16px;
  font-size: 15px; font-weight: 600; transition: 0.3s;
}
.input-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); outline: none; background: var(--bg-input); }

.secure-badge {
  margin-top: 32px; display: flex; align-items: center; justify-content: center;
  gap: 10px; font-size: 13px; color: var(--text-tertiary); font-weight: 600;
}
.secure-badge i { color: var(--success); width: 16px; height: 16px; }

/* Layout Shell */
#dashboard-view { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 280px; height: 100vh; background: var(--bg-sidebar); border-right: 1px solid var(--border-light);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  display: flex; flex-direction: column; padding: 40px 24px; position: fixed; left: 0; top: 0; z-index: 100;
}

.sidebar-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 48px; padding-left: 12px; }
.sidebar-brand h3 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: var(--text-primary); }

.nav-links { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overflow-x: hidden; padding-right: 8px; margin-right: -8px; }
.nav-links::-webkit-scrollbar { width: 4px; }
.nav-links::-webkit-scrollbar-track { background: transparent; }
.nav-links::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
.nav-links a {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  color: var(--text-secondary); text-decoration: none; border-radius: 14px; 
  font-weight: 600; font-size: 15px; transition: all 0.2s ease;
}
.nav-links a:hover { background: var(--bg-input); color: var(--text-primary); }
.nav-links a.active {
  background: var(--primary); color: white;
}
.nav-links a i {
  width: 18px; height: 18px; color: inherit;
  background: rgba(99, 102, 241, 0.08); border-radius: 8px; padding: 6px;
  box-sizing: content-box;
}
.nav-links a.active i { background: rgba(255,255,255,0.2); }

.main-content {
  margin-left: 280px; flex: 1; padding: clamp(24px, 4vw, 60px) clamp(20px, 6vw, 80px); width: calc(100% - 280px);
  position: relative; z-index: 1;
}

.top-header { margin-bottom: 48px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; color: var(--text-primary); }
.date-display { color: var(--text-secondary); font-size: 14px; font-weight: 500; }

#menu-toggle { display: none; }

.admin-profile {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  padding: 8px 18px 8px 8px; border-radius: 100px;
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  flex-shrink: 0;
}
.admin-profile .avatar { background: var(--gradient-brand); border: none; }
.admin-profile .avatar i { color: #fff; width: 18px; height: 18px; }
.admin-profile span { font-family: var(--font-display); font-weight: 600; font-size: 14px; white-space: nowrap; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 48px; }
.metric-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border-light); border-radius: 32px; padding: 32px;
  display: flex; flex-direction: column; gap: 20px; transition: all 0.3s ease;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
}
.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gradient, var(--primary));
  box-shadow: 0 16px 40px -12px var(--primary-glow);
}
.metric-card.accent-blue:hover   { box-shadow: 0 16px 40px -12px rgba(59, 130, 246, 0.35); }
.metric-card.accent-green:hover  { box-shadow: 0 16px 40px -12px rgba(16, 185, 129, 0.35); }
.metric-card.accent-orange:hover { box-shadow: 0 16px 40px -12px rgba(245, 158, 11, 0.35); }
.metric-card.accent-purple:hover { box-shadow: 0 16px 40px -12px rgba(139, 92, 246, 0.35); }
.metric-card .card-header { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; }
.metric-card i { width: 24px; height: 24px; color: var(--primary); }
.metric-card h3 { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.metric-card h2 {
  font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 40px); font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.5px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Color Utilities */
.text-blue { color: #3b82f6; }
.text-green { color: #10b981; }
.text-orange { color: #f59e0b; }
.text-purple { color: #8b5cf6; }
.text-danger { color: #ef4444; }

/* Sections & Tables */
.moderation-section { margin-bottom: 48px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }

.table-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border-light); border-radius: 32px; 
  overflow-x: auto; /* Enable horizontal scrolling for smaller screens */
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
}

/* Restrict min-height only to tables containing 3-dot dropdowns to prevent empty space on other tabs */
#tab-workers .table-container,
#tab-customers .table-container {
  min-height: 380px;
}

.table-container table { width: 100%; border-collapse: collapse; min-width: 950px; }
th {
  padding: 20px 24px; background: var(--bg-app); text-align: left;
  font-size: 12px; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary-glow);
}
td { padding: 22px 24px; border-bottom: 1px solid var(--border-light); font-size: 15px; font-weight: 500; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-app); }

.name-text { display: block; font-weight: 700; color: var(--text-primary); font-size: 16px; margin-bottom: 4px; }
.sub-text { display: block; color: var(--text-secondary); font-size: 13px; }

/* Action Buttons */
.btn-sm {
  padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: 13px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-primary); transition: 0.2s ease;
}
.btn-sm:hover { background: var(--bg-input); border-color: var(--primary); color: var(--primary); }
.btn-sm i { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary); color: #fff; border: none; padding: 18px 32px;
  border-radius: 16px; font-weight: 800; font-size: 16px; cursor: pointer; transition: 0.3s ease;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 10px 20px -5px var(--primary-glow); }

.btn-ghost {
  background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary);
  padding: 16px 24px; border-radius: 14px; cursor: pointer; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 12px; transition: 0.2s;
  width: 100%;
}
.btn-ghost:hover { background: rgba(239, 68, 68, 0.05); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }

/* Settings Layout */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.settings-card { background: var(--bg-card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); padding: 40px; border-radius: 32px; border: 1px solid var(--border-light); }

.input-group label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.input-group input, .input-group select, .input-group textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 16px 18px; color: var(--text-primary); font-family: inherit; font-size: 15px; font-weight: 500; margin-bottom: 24px;
}
.input-group input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--primary-glow); background: var(--bg-input); }

/* Badges */
.badge {
  padding: 6px 14px; border-radius: 10px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg-input); color: var(--text-secondary);
}

.sidebar-footer { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--border-light); }

/* Toast */
.toast {
  position: fixed; top: 32px; right: 32px; background: var(--bg-sidebar); color: var(--text-primary);
  padding: 16px 24px; border-radius: 16px; border: 1px solid var(--border-light);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3); z-index: 10000; display: none; font-weight: 600;
}
.toast.show { display: block; animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Profile Avatar in tables */
.avatar { width: 44px; height: 44px; border-radius: 14px; overflow: hidden; background: var(--bg-input); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; }
.avatar i { width: 20px; height: 20px; color: var(--text-tertiary); }

.spinner { border: 3px solid var(--border-light); border-top: 3px solid var(--primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Modals */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-overlay); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  transition: all 0.3s ease;
}

.modal-content {
  background: var(--bg-overlay-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--modal-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 1px var(--modal-shadow-inset);
  width: 100%; max-width: 640px; border-radius: 24px; padding: 32px;
  max-height: 90vh; overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: var(--bg-input-focus);
}

.form-control::placeholder {
    color: #475569;
}

.form-control:disabled {
    background: var(--bg-disabled);
    color: #64748b;
    cursor: not-allowed;
}

/* Document Upload Zones */
.doc-upload-zone {
    border: 2px dashed var(--border-dashed);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    background: var(--bg-upload-zone);
    transition: all 0.2s ease;
    cursor: pointer;
}
.doc-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}
.doc-upload-zone label {
    font-size: 13px; margin-bottom: 8px; display: block; color: var(--text-secondary); font-weight: 600;
}
.doc-upload-zone input[type="file"] {
    font-size: 11px; width: 100%; color: var(--text-secondary);
}

/* --- MODERN WORKER DOCUMENT CARDS & UPLOAD TILES --- */
.modal-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 20px;
}
.modal-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}
.modal-sticky-footer {
  flex-shrink: 0;
  padding: 16px 28px;
  background: var(--bg-card-solid);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  z-index: 10;
}
.modal-sticky-header {
  flex-shrink: 0;
  padding: 20px 28px;
  background: var(--bg-card-solid);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.worker-doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}
.worker-doc-card:hover {
  border-color: var(--primary);
  background: var(--bg-input);
}
.doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.doc-card-header span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.doc-card-header span i {
  width: 13px;
  height: 13px;
  color: var(--primary-text);
}
.doc-status-chip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.doc-status-chip.optional {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.doc-status-chip.uploaded {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}
.doc-dropzone {
  border: 1.5px dashed var(--border-dashed);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  background: var(--bg-input);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
.doc-dropzone:hover {
  border-color: var(--primary);
  background: var(--bg-upload-zone);
}
.doc-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.doc-preview-wrapper img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-light);
}
.modal-header h2 { font-size: 24px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.5px; }

.modal-body { display: flex; flex-direction: column; gap: 24px; }

.data-block { display: flex; flex-direction: column; gap: 8px; }
.data-label { font-size: 12px; font-weight: 800; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 1px; }
.data-value { font-size: 15px; font-weight: 600; color: var(--text-primary); background: var(--bg-app); padding: 16px 20px; border-radius: 20px; border: 1px solid var(--border-light); }

.icon-btn {
  background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.icon-btn:hover { background: var(--bg-input); color: var(--text-primary); border-color: var(--text-tertiary); }

/* MOBILE AND TABLET RESPONSIVENESS */
@media (max-width: 991px) {
  .sidebar { left: -280px; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
  .sidebar.open { left: 0; }
  .main-content { margin-left: 0; width: 100%; padding: 30px 20px; }
  #menu-toggle { display: flex !important; }
  .settings-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .table-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 700px; }
  .top-header { margin-bottom: 30px; }
  .metrics-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 30px; }
  .metric-card { padding: 24px; }
  .metric-card h2 { font-size: 32px; }
}

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.empty-state i { width: 48px; height: 48px; color: var(--border-light); }
.empty-state p { font-size: 16px; font-weight: 600; margin: 0; }

/* ===================================================================
   DASHBOARD (Overview) — modern visual system
   Purely additive/cosmetic: no IDs touched, no DOM contracts broken.
   =================================================================== */

/* Gradient icon badges behind each metric icon, keyed to the existing
   .text-blue/green/orange/purple color utilities already in app.js/HTML */
.metric-icon-badge {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
}
.metric-icon-badge i { width: 20px; height: 20px; color: var(--text-secondary) !important; }

/* Give each metric card a slim gradient accent along the top edge so the
   four KPIs are instantly distinguishable at a glance */
.metric-card { position: relative; overflow: hidden; }
.metric-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-gradient, var(--gradient-brand));
  opacity: 0.95;
}
.metric-card.accent-blue   { --accent-gradient: linear-gradient(90deg, #3b82f6, #2563eb); }
.metric-card.accent-green  { --accent-gradient: linear-gradient(90deg, #10b981, #059669); }
.metric-card.accent-orange { --accent-gradient: linear-gradient(90deg, #f59e0b, #d97706); }
.metric-card.accent-purple { --accent-gradient: linear-gradient(90deg, #a855f7, #7c3aed); }

.metric-card .card-header { align-items: flex-start; }
.metric-card h3 { margin-top: 4px; }

/* Reusable header pattern for chart panels / table sections so every
   block on the dashboard reads with the same visual grammar */
.panel-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; row-gap: 8px;
}
.panel-header .panel-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand); color: #fff;
}
.panel-header .panel-icon i { width: 17px; height: 17px; }
.panel-header h3 {
  font-family: var(--font-display); font-weight: 600; color: var(--text-primary); font-size: 16px; margin: 0;
}
.panel-header .panel-sub {
  font-size: 12px; color: var(--text-tertiary); font-weight: 500; margin-top: 2px; white-space: nowrap;
}

/* Small live-status dot for real-time panels (search log, charts) */
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  display: inline-block; margin-right: 6px; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* Section header badge (e.g. queue-count) upgraded to a pill */
.section-header .badge {
  background: var(--primary-glow); color: var(--primary-text);
  padding: 8px 16px; border-radius: 20px; font-size: 12px;
}

/* Slightly richer row zebra so dense tables are easier to scan */
#pending-table tbody tr:nth-child(even) td,
#search-logs-tbody tr:nth-child(even) td { background: rgba(99, 102, 241, 0.025); }

#pending-table tbody tr:hover td,
#search-logs-tbody tr:hover td { background: rgba(99, 102, 241, 0.06) !important; }

/* Chart panel polish */
.chart-panel canvas { max-width: 100%; }

/* Entrance animation — staggered fade/rise, scoped to the overview tab only */
@keyframes fadeRiseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
#tab-overview .metrics-grid > .metric-card,
#tab-overview .charts-section > .table-container,
#tab-overview .search-logs-section .table-container,
#tab-overview .moderation-section .table-container {
  animation: fadeRiseIn 0.5s ease both;
}
#tab-overview .metrics-grid > .metric-card:nth-child(1) { animation-delay: 0.02s; }
#tab-overview .metrics-grid > .metric-card:nth-child(2) { animation-delay: 0.08s; }
#tab-overview .metrics-grid > .metric-card:nth-child(3) { animation-delay: 0.14s; }
#tab-overview .metrics-grid > .metric-card:nth-child(4) { animation-delay: 0.2s; }
#tab-overview .charts-section > .table-container:nth-child(2) { animation-delay: 0.08s; }
@media (prefers-reduced-motion: reduce) {
  #tab-overview .metrics-grid > .metric-card,
  #tab-overview .charts-section > .table-container,
  #tab-overview .search-logs-section .table-container,
  #tab-overview .moderation-section .table-container { animation: none; }
}

/* ---------------------------------------------------------------
   RESPONSIVE — refined breakpoints for the dashboard shell
   --------------------------------------------------------------- */
@media (max-width: 1200px) {
  .charts-section { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  .login-box { padding: 32px 24px; border-radius: 24px; }
  .main-content { padding: 20px 16px !important; }
  .top-header { margin-bottom: 24px; gap: 12px; }
  .admin-profile span { display: none; }
  .admin-profile { padding: 8px; }
  .metrics-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .metric-card { padding: 20px; border-radius: 22px; }
  .metric-icon-badge { width: 40px; height: 40px; }
  .panel-header h3 { font-size: 14px; }
  .section-header { flex-wrap: wrap; gap: 10px; }
  .table-container { border-radius: 20px; }
}

/* Proper colors for edit/delete buttons (previously unstyled everywhere) */
.btn-sm.btn-view { background: var(--primary-glow); border-color: transparent; color: var(--primary-text); }
.btn-sm.btn-view:hover { background: var(--primary); color: #fff; }
.btn-sm.btn-danger { background: rgba(239, 68, 68, 0.1); border-color: transparent; color: #ef4444; }
.btn-sm.btn-danger:hover { background: #ef4444; color: #fff; }

/* Reusable icon badge for section headers (used by the Offers header above) */
.panel-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand); color: #fff;
}
.panel-icon i { width: 17px; height: 17px; }

/* Offer / banner card grid */
.offers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.offer-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border-light); border-radius: 24px; overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; transition: all 0.3s ease;
}
.offer-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 16px 40px -12px var(--primary-glow); }

/* Fixed-height box so every banner image — whatever its original size — renders identically */
.offer-banner {
  position: relative; width: 100%; height: 170px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.offer-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.offer-banner.no-image::after,
.offer-banner:not(:has(img))::after {
  content: "No banner image"; font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  color: rgba(255,255,255,0.75); text-transform: uppercase;
}

.offer-discount-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(2, 6, 23, 0.75); backdrop-filter: blur(6px);
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 13px;
  padding: 6px 14px; border-radius: 100px; letter-spacing: 0.3px;
  border: 1px solid rgba(255,255,255,0.15);
}

.offer-body { padding: 20px 22px 4px; flex: 1; }
.offer-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 14px; letter-spacing: -0.2px;
}
.offer-meta { display: flex; flex-direction: column; gap: 8px; }
.offer-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.offer-tag i { width: 14px; height: 14px; color: var(--text-tertiary); flex-shrink: 0; }

.offer-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; margin-top: 16px; border-top: 1px solid var(--border-light);
}

@media (max-width: 640px) {
  .offers-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   LIVE CUSTOMER APP PREVIEW — phone-frame auto-sliding carousel
   Mirrors the real app's "Discover" banner exactly.
   =================================================================== */
.phone-preview-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border-light); border-radius: 28px;
  padding: 28px; margin-bottom: 32px;
  display: flex; flex-direction: column; align-items: center;
}
.phone-preview-panel .panel-header { width: 100%; margin-bottom: 24px; }
.phone-preview-panel .panel-sub { display: block; margin-top: 2px; }

.phone-frame {
  width: 240px; height: 490px;
  background: #111827; border-radius: 36px;
  padding: 14px 10px; box-shadow: 0 20px 50px -15px rgba(0,0,0,0.5);
  position: relative; flex-shrink: 0;
}
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 18px; background: #111827; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%; background: #f4f6fb; border-radius: 24px;
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
}
.phone-discover-label {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: #0f172a; margin-bottom: 10px; flex-shrink: 0;
}

.phone-carousel-viewport { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; position: relative; }
.phone-carousel { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.phone-slide { min-width: 100%; height: 100%; }
.phone-slide-banner { width: 100%; height: 100%; background-size: cover; background-position: center; position: relative; }

.phone-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(30, 45, 168, 0.94) 0%, rgba(30, 45, 168, 0.8) 40%, rgba(30, 45, 168, 0.2) 68%, rgba(30, 45, 168, 0) 85%);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 14px 16px;
}
.phone-slide-title {
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  color: #FFD400; line-height: 1.15; letter-spacing: -0.2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.phone-slide-subtitle { font-size: 11px; color: #fff; font-weight: 500; opacity: 0.9; }
.phone-slide-cta {
  align-self: flex-start; margin-top: 10px;
  background: #FFD400; color: #1e2a5e; font-weight: 700; font-size: 11px;
  padding: 7px 16px; border-radius: 100px;
}

.phone-slide-empty {
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 10px; color: #94a3b8; height: 100%; background: #eef1f8;
}
.phone-slide-empty i { width: 32px; height: 32px; }
.phone-slide-empty p { font-size: 13px; font-weight: 600; margin: 0; }

.phone-carousel-dots {
  display: flex; justify-content: center; gap: 6px; margin-top: 14px; flex-shrink: 0;
}
.phone-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(15, 23, 42, 0.15); transition: all 0.3s ease; }
.phone-dot.active { background: #2b59ff; width: 18px; border-radius: 4px; }

@media (max-width: 640px) {
  .phone-frame { width: 200px; height: 410px; }
}

/* ===================================================================
   SYSTEM & AUDIT LOGS — severity badges, inspect modal, live toggle
   =================================================================== */

.log-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 100px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.4px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.log-badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.log-badge-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.35); color: #60a5fa; }
.log-badge-info .log-badge-dot { background: #3b82f6; animation: logPulse 2s ease-in-out infinite; }

.log-badge-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); color: #fbbf24; }
.log-badge-warning .log-badge-dot { background: #f59e0b; }

.log-badge-error {
  background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.5); color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}
.log-badge-error .log-badge-dot { background: #ef4444; animation: logPulse 1.3s ease-in-out infinite; }

.log-badge-critical {
  background: rgba(220, 38, 38, 0.22); border: 1px solid rgba(220, 38, 38, 0.6); color: #fca5a5;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.45);
}
.log-badge-critical .log-badge-dot { background: #dc2626; animation: logPulse 0.9s ease-in-out infinite; }

@keyframes logPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.35; }
}

.btn-inspect {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-glow); color: var(--primary-text);
  border: none; padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease; font-family: var(--font-sans);
}
.btn-inspect i { width: 13px; height: 13px; }
.btn-inspect:hover { background: var(--primary); color: #fff; }

.log-inspect-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: var(--bg-input); border: 1px solid var(--border-light); border-radius: 12px; padding: 16px;
}
.log-inspect-meta-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-tertiary); margin-bottom: 4px; }
.log-inspect-meta-value { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); word-break: break-word; }

.log-meta-block {
  background: #05070d; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 16px; font-family: 'Menlo', 'Consolas', monospace; font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow-y: auto; margin: 0;
}
.json-key { color: #818cf8; }
.json-string { color: #34d399; }
.json-number { color: #fbbf24; }
.json-boolean { color: #f472b6; }
.json-null { color: #64748b; font-style: italic; }

.live-toggle-wrap { display: flex; align-items: center; gap: 10px; }
.live-toggle-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: 100px; cursor: pointer; transition: all 0.25s ease;
}
.toggle-slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: all 0.25s ease;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); border-color: var(--success); box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.log-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.log-pagination-indicator { color: var(--text-tertiary); font-size: 13px; font-weight: 600; }
.btn-page {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text-secondary);
  padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease; font-family: var(--font-sans);
}
.btn-page i { width: 15px; height: 15px; }
.btn-page:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-text); background: var(--primary-glow); }
.btn-page:disabled { opacity: 0.4; cursor: not-allowed; }

/* Phone preview navigation arrows */
.phone-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
}

.phone-nav-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    transform: translateY(-50%) scale(1.08);
}

.phone-nav-btn.prev {
    left: 8px;
}

.phone-nav-btn.next {
    right: 8px;
}

.phone-nav-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5px;
}
/* Carousel controls bar below the phone */
.phone-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    width: 100%;
}

.carousel-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-control-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.05);
}

.carousel-control-btn svg {
    width: 16px;
    height: 16px;
}

/* Override existing dots margin if necessary */
.phone-carousel-dots {
    margin: 0 !important;
    display: flex;
    gap: 6px;
}

/* --- BROADCAST PAGE UPGRADE STYLES --- */
.broadcast-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    max-width: 950px;
    margin: 0 auto;
    align-items: start;
}

/* Uploader drop zone */
.broadcast-drop-zone {
    width: 100%;
    min-height: 120px;
    border: 1.5px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    padding: 16px;
}

.broadcast-drop-zone:hover, .broadcast-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

.drop-zone-limit {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Image preview in uploader */
.drop-zone-preview {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
}

.drop-zone-preview img {
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-remove-preview {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-remove-preview:hover {
    background: #ef4444;
    color: #fff;
}

/* Live phone lock screen mockup styling */
.preview-phone {
    width: 270px;
    height: 520px;
    border-radius: 36px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    margin: 0 auto;
}

.phone-screen.lockscreen {
    background-image: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #030712 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 16px 16px;
}

.lockscreen-time {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -1px;
}

.lockscreen-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 2px;
}

/* Rich push notification card (Mockup) */
.push-notification-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px;
    margin-top: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    animation: pushIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.push-app-icon {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.push-app-icon svg {
    width: 10px;
    height: 10px;
    color: #fff;
}

.push-app-name {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

.push-time {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
}

.push-body {
    display: flex;
    flex-direction: column;
}

.push-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px 0;
}

.push-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin: 0;
    word-break: break-word;
}

/* Rich Image attachments inside push mockup */
.push-attachment {
    display: none;
    margin-top: 8px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}

.push-attachment img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

@keyframes pushIn {
    from { transform: translateY(12px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 820px) {
    .broadcast-layout {
        grid-template-columns: 1fr;
    }
}

/* Style for Search inputs & Dropdowns in headers */
.form-input {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 38px;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-input);
}

/* Specific styling for select dropdowns to match the theme */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
}

/* Fix refresh logs button size to match input heights */
#btn-refresh-logs {
    height: 38px;
    width: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

#btn-refresh-logs svg {
    width: 14px;
    height: 14px;
}

/* --- BENTO GRID FOR SERVICE CATEGORIES --- */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.category-bento-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(99, 102, 241, 0.3);
}

.category-bento-banner {
    height: 110px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.category-bento-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.25) 100%);
    z-index: 1;
}

.category-bento-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.category-bento-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.category-bento-icon svg {
    width: 16px;
    height: 16px;
}

.category-bento-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.category-bento-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    font-size: 8px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-bento-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Accordion styles inside the card body */
.bento-subservice-accordion {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01);
}

.bento-subservice-header {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.2s ease;
    user-select: none;
}

.bento-subservice-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.bento-subservice-content {
    display: none;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-light);
}

.bento-subservice-accordion.active .bento-subservice-content {
    display: block;
}

.bento-subservice-accordion.active .chevron-icon {
    transform: rotate(180deg);
}

.chevron-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    color: var(--text-dim);
}

.bento-action-row {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: rgba(0,0,0,0.06);
}

/* --- THREE-DOT ACTION DROPDOWNS --- */
.actions-dropdown-container {
    position: relative;
    display: inline-block;
}

.action-trigger-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-trigger-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* REPLACE the top position with bottom in admin/style.css: */
/* Update this block in admin/style.css: */
.actions-dropdown-menu {
    position: absolute;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    z-index: 100;
    min-width: 200px;
    overflow: hidden;
    padding: 6px 0;
}

.actions-dropdown-menu button {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

.actions-dropdown-menu button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.actions-dropdown-menu button.text-danger {
    color: #fca5a5;
}

.actions-dropdown-menu button.text-danger:hover {
    color: #ff8080 !important;
    background: rgba(239, 68, 68, 0.15);
}

.actions-dropdown-menu button svg {
    width: 14px;
    height: 14px;
    color: inherit;
}

/* --- MODERN WORKER STATUS PILLS & RATINGS --- */

/* Glowing Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-pill-active {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.15);
}

.status-pill-pending {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.15);
}

.status-pill-suspended {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.15);
}

/* Pulsing Status Lights */
.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: relative;
}

.pulse-dot-active { background-color: #10b981; box-shadow: 0 0 8px #10b981; animation: statusPulse 1.8s infinite; }
.pulse-dot-pending { background-color: #f59e0b; box-shadow: 0 0 8px #f59e0b; animation: statusPulse 1.8s infinite; }
.pulse-dot-suspended { background-color: #ef4444; box-shadow: 0 0 8px #ef4444; animation: statusPulse 1.8s infinite; }

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* Star Ratings */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fbbf24;
    font-weight: 700;
}

.rating-badge svg {
    width: 12px;
    height: 12px;
    fill: #fbbf24;
    stroke: #fbbf24;
}

/* NEW Professional Glowing Badge */
.badge-new-glow {
    display: inline-block;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
    text-transform: uppercase;
}

/* --- WORKER DRAWER STYLING --- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    transition: opacity 0.3s ease;
}

.drawer-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.drawer-content {
    width: 440px;
    height: 100%;
    background: #0f172a;
    border-left: 1px solid var(--border-light);
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

.drawer-overlay:not(.hidden) .drawer-content {
    transform: translateX(0);
}

.drawer-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.drawer-close-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.drawer-header-brand {
    padding: 32px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
}

.drawer-avatar-wrapper {
    position: relative;
}

.drawer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.drawer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-avatar svg {
    width: 32px;
    height: 32px;
}

.drawer-tabs {
    display: flex;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.1);
}

.drawer-tab-btn {
    flex: 1;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.drawer-tab-btn:hover {
    color: var(--text-primary);
}

.drawer-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.drawer-tab-content {
    display: none;
}

.drawer-tab-content.active {
    display: block;
}

.drawer-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.drawer-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.drawer-section-title {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 12px;
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 6px;
}

.drawer-section-title:first-of-type {
    margin-top: 0;
}

.document-preview-box {
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.document-preview-box:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.document-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.document-preview-box span {
    font-size: 11px;
    color: var(--text-dim);
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 12px;
}

/* --- NOTIFICATIONS BELL & DROPDOWN --- */
.notifications-bell-container {
    position: relative;
    display: inline-block;
}

.notif-bell-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notif-bell-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: scale(1.03);
}

.notif-bell-btn svg {
    width: 20px;
    height: 20px;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-app);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    animation: pulseNotif 2.2s infinite;
}

@keyframes pulseNotif {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notif-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInDropdown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.notif-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.notif-count-label {
    font-size: 12px;
    color: var(--primary-text);
    background: var(--primary-glow);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.notif-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: background 0.2s ease;
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.notif-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.notif-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-meta {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Scrollbar styling for notification list */
.notif-list::-webkit-scrollbar {
    width: 6px;
}
.notif-list::-webkit-scrollbar-track {
    background: transparent;
}
.notif-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.notif-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   DARK THEME & CORE LAYOUT FOR QUILL RICH TEXT EDITOR
   ========================================================================== */
.ql-toolbar.ql-snow {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    padding: 8px 10px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.ql-toolbar .ql-formats {
    display: inline-flex !important;
    align-items: center !important;
    margin-right: 12px !important;
    gap: 2px !important;
}

.ql-toolbar button {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 28px !important;
    width: 28px !important;
    padding: 4px !important;
    border-radius: 6px !important;
    transition: background 0.15s ease !important;
}

.ql-toolbar button:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.ql-toolbar button svg,
.ql-snow .ql-picker-label svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block !important;
}

.ql-container.ql-snow {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: none !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: #f1f5f9 !important;
    position: relative !important;
}

.ql-snow .ql-stroke {
    stroke: #94a3b8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2 !important;
    transition: stroke 0.15s ease;
}

.ql-snow .ql-fill {
    fill: #94a3b8 !important;
    transition: fill 0.15s ease;
}

.ql-snow .ql-picker {
    display: inline-block !important;
    position: relative !important;
    height: 28px !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.ql-snow .ql-picker-label {
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 100% !important;
    padding: 0 8px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    position: relative !important;
}

.ql-snow .ql-picker-label:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

.ql-snow .ql-picker-options {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
    padding: 6px !important;
    z-index: 1000 !important;
}

.ql-snow .ql-picker.ql-expanded .ql-picker-options {
    display: block !important;
}

.ql-snow .ql-color-picker .ql-picker-options {
    width: 160px !important;
    padding: 6px !important;
    display: none !important;
}

.ql-snow .ql-color-picker.ql-expanded .ql-picker-options {
    display: grid !important;
    grid-template-columns: repeat(7, 18px) !important;
    gap: 3px !important;
}

.ql-snow .ql-color-picker .ql-picker-item {
    width: 18px !important;
    height: 18px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ql-snow .ql-picker-item {
    color: #94a3b8 !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
    color: #fff !important;
    background: rgba(59, 130, 246, 0.25) !important;
}

.ql-snow button:hover .ql-stroke,
.ql-snow button:focus .ql-stroke,
.ql-snow .ql-picker:hover .ql-stroke,
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
    stroke: #38bdf8 !important;
}

.ql-snow button:hover .ql-fill,
.ql-snow button:focus .ql-fill,
.ql-snow .ql-picker:hover .ql-fill,
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
    fill: #38bdf8 !important;
}

.ql-snow button.ql-active .ql-stroke {
    stroke: #3b82f6 !important;
}

.ql-snow button.ql-active .ql-fill {
    fill: #3b82f6 !important;
}

.ql-editor.ql-blank::before {
    color: #64748b !important;
    font-style: normal !important;
    left: 15px !important;
    right: 15px !important;
}

.ql-editor {
    min-height: 160px;
    padding: 14px 16px !important;
    line-height: 1.6;
    color: #f1f5f9 !important;
}

.ql-hidden {
    display: none !important;
}

/* ==========================================================================
   BROADCAST CHANNEL CARDS & LIVE PREVIEW
   ========================================================================== */
.channel-selector-card {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.channel-selector-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.channel-selector-card.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
}

.channel-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.channel-selector-card.active .channel-card-icon {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.channel-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
}

.channel-card-sub {
    font-size: 11px;
    color: #64748b;
}

.channel-selector-card.active .channel-card-sub {
    color: #93c5fd;
}

/* Preview Tabs */
.preview-tabs-container {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 16px;
    gap: 4px;
}

.preview-tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.preview-tab-btn.active {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.preview-tab-btn:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

/* Email Mockup Client Window */
.email-preview-window {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.email-preview-header {
    background: #1e293b;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-preview-meta-row {
    display: flex;
    align-items: center;
    font-size: 12px;
    gap: 8px;
}

.email-preview-meta-label {
    color: #64748b;
    font-weight: 600;
    width: 60px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.email-preview-meta-val {
    color: #f1f5f9;
    font-weight: 500;
    word-break: break-all;
}

.email-preview-body {
    padding: 20px;
    min-height: 240px;
    max-height: 360px;
    overflow-y: auto;
    background: #0b1329;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.6;
}

.email-preview-body p {
    margin: 0 0 10px 0;
}

.email-preview-body img {
    max-width: 100%;
    border-radius: 8px;
}