/* ============================================
   GANGA MANAGEMENT — GLOBAL STYLES
   Theme: Deep Blue + Teal Accent
   Mobile-first, responsive, accessible
   ============================================ */

/* ----- CSS Variables ----- */
:root {
  --bg-body: #050913;
  --bg-surface: rgba(15, 24, 42, 0.78);
  --bg-elevated: rgba(20, 33, 58, 0.88);
  --bg-input: rgba(7, 14, 28, 0.92);
  --text-primary: #e7eef9;
  --text-secondary: #a6b6ce;
  --text-muted: #7f93b2;
  --accent: #2dd4bf;
  --accent-hover: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --primary: #4f8cff;
  --primary-hover: #3a77f0;
  --primary-soft: rgba(79, 140, 255, 0.16);
  --secondary: #5b6f92;
  --secondary-hover: #4d6080;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;
  --success: #22c55e;
  --border: rgba(145, 170, 216, 0.2);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --max-container: 1200px;
  --max-sm: 520px;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at 12% -8%, rgba(45, 212, 191, 0.2), transparent 38%),
    radial-gradient(circle at 90% 0%, rgba(79, 140, 255, 0.24), transparent 36%),
    radial-gradient(circle at 50% 120%, rgba(168, 85, 247, 0.16), transparent 48%),
    var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(85px);
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background: rgba(45, 212, 191, 0.65);
  top: -130px;
  left: -120px;
}

body::after {
  background: rgba(79, 140, 255, 0.6);
  right: -120px;
  top: 180px;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { text-decoration: underline; color: #5eead4; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* ----- Utilities ----- */
.hidden { display: none !important; }
.container {
  width: 100%;
  max-width: var(--max-container);
  margin: 0 auto;
  padding: 0 16px;
}
.container-sm {
  width: 100%;
  max-width: var(--max-sm);
  margin: 0 auto;
  padding: 0 16px;
}

/* ----- Navbar ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(120deg, rgba(10, 17, 33, 0.92), rgba(15, 28, 52, 0.9));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(138, 165, 210, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}
.nav-brand .logo {
  width: 32px;
  height: 32px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(3, 8, 19, 0.72);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
}
.drawer-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(170deg, rgba(12, 22, 43, 0.96), rgba(9, 17, 34, 0.96));
  border-left: 1px solid rgba(138, 165, 210, 0.25);
  padding: 80px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.mobile-drawer.open .drawer-content {
  transform: translateX(0);
}
.drawer-content a, .drawer-content button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: rgba(89, 121, 181, 0.12);
  border: none;
  font-size: 1rem;
}
.drawer-content a:hover, .drawer-content button:hover {
  background: rgba(100, 137, 204, 0.2);
}

/* ----- Hero ----- */
.hero {
  text-align: center;
  padding: 48px 16px 28px;
}
.hero-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  filter: drop-shadow(0 8px 20px rgba(45, 212, 191, 0.22));
}
.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-secondary);
  margin-top: 6px;
  font-size: 1.03rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- Portal Cards ----- */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  padding-bottom: 40px;
}

.portal-card {
  background: linear-gradient(160deg, rgba(17, 30, 56, 0.82), rgba(11, 20, 40, 0.88));
  border: 1px solid rgba(138, 165, 210, 0.22);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.portal-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  border-color: rgba(96, 189, 242, 0.42);
  background: linear-gradient(160deg, rgba(23, 41, 73, 0.9), rgba(13, 25, 49, 0.9));
}
.portal-card h2 {
  font-size: 1.25rem;
  margin: 14px 0 6px;
}
.portal-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.portal-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.staff-icon { background: var(--primary-soft); color: var(--primary); }
.admin-icon { background: rgba(148,163,184,0.12); color: var(--text-secondary); }
.customer-icon { background: var(--accent-soft); color: var(--accent); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition), filter var(--transition);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: linear-gradient(135deg, #5ea0ff, #3f7df2); }
.btn-primary:hover { background: linear-gradient(135deg, #6aabff, #4687f6); }
.btn-secondary { background: linear-gradient(135deg, #677da3, #566987); }
.btn-secondary:hover { background: linear-gradient(135deg, #7288af, #5f7393); }
.btn-accent { background: linear-gradient(135deg, #2dd4bf, #14b8a6); color: #06251f; }
.btn-accent:hover { background: linear-gradient(135deg, #42dfcc, #1dc8b4); }
.btn-ghost { background: rgba(100, 137, 204, 0.08); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(100, 137, 204, 0.18); color: var(--text-primary); }
.btn-danger { background: linear-gradient(135deg, #f55f5f, #dc3f3f); }
.btn-danger:hover { background: linear-gradient(135deg, #ff7070, #e14d4d); }
.btn-success { background: var(--success); color: #052e16; }

.btn-block { width: 100%; }
.btn-large { padding: 14px 20px; font-size: 1rem; }
.btn-small { padding: 6px 10px; font-size: 0.85rem; }

/* ----- Cards ----- */
.card {
  background: linear-gradient(165deg, rgba(17, 30, 56, 0.84), rgba(12, 22, 42, 0.88));
  border: 1px solid rgba(138, 165, 210, 0.22);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card-header { margin-bottom: 20px; }
.card-header h2 { font-size: 1.35rem; margin-bottom: 4px; }
.card-header p { color: var(--text-secondary); font-size: 0.95rem; }
.card-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; color: var(--text-secondary); font-size: 0.9rem; }

.auth-card { padding-top: 24px; padding-bottom: 24px; }

/* ----- Forms ----- */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid rgba(126, 157, 204, 0.24);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.form-input:focus {
  border-color: #5eead4;
  background: rgba(12, 24, 45, 0.98);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2), 0 8px 20px rgba(0, 0, 0, 0.25);
}
.form-input::placeholder { color: var(--text-muted); }

.input-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* File Dropzone */
.file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  border: 2px dashed rgba(126, 157, 204, 0.3);
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.file-dropzone:hover {
  border-color: #5eead4;
  background: rgba(45, 212, 191, 0.12);
  transform: translateY(-1px);
}
.file-dropzone input { display: none; }
.dropzone-hint { font-size: 0.85rem; color: var(--text-muted); }

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.preview-chip button {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

/* ----- Dashboard Layout ----- */
.dashboard-header {
  padding: 24px 0 12px;
}
.dashboard-header h2 { font-size: 1.4rem; }
.dashboard-header p { color: var(--text-secondary); margin-top: 2px; }

.admin-header h2 { color: var(--text-secondary); }
.customer-header h2 { color: var(--accent); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 40px;
}

.dashboard-card {
  background: linear-gradient(165deg, rgba(17, 30, 56, 0.84), rgba(12, 22, 42, 0.88));
  border: 1px solid rgba(138, 165, 210, 0.22);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 189, 242, 0.35);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}
.dashboard-card h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-card .meta-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.profile-card .meta-row:last-child { border-bottom: none; }
.meta-label { color: var(--text-secondary); font-size: 0.9rem; }
.meta-value { font-weight: 600; font-size: 0.95rem; }

.action-card .date-display {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.attendance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.attendance-status {
  margin-top: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}
.attendance-status.checked-in { color: var(--success); background: rgba(34,197,94,0.08); }
.attendance-status.checked-out { color: var(--accent); background: var(--accent-soft); }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.data-table thead th {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(138, 165, 210, 0.22);
  background: rgba(107, 139, 198, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 12px;
  border-bottom: 1px solid rgba(138, 165, 210, 0.16);
  vertical-align: middle;
  color: var(--text-primary);
}
.data-table tbody tr:hover { background: rgba(96, 189, 242, 0.1); }

.table-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: pointer;
}

/* ----- Tabs ----- */
.tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.tab-btn.active {
  color: #68f0dd;
  border-bottom-color: #5eead4;
  text-shadow: 0 0 18px rgba(45, 212, 191, 0.35);
}
.tab-btn:hover { color: var(--text-primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ----- Toolbar ----- */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar.split { justify-content: space-between; }
.toolbar .form-group.inline { margin-bottom: 0; }
.toolbar .form-group.inline label { font-size: 0.8rem; margin-bottom: 4px; }
.toolbar .form-input { min-width: 160px; }

/* ----- Credentials Box ----- */
.credentials-box {
  margin-top: 16px;
  padding: 16px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-md);
}
.credentials-box h4 { color: var(--success); margin-bottom: 8px; }
.credential-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 0.95rem;
}
.credential-chip span { color: var(--text-secondary); min-width: 70px; }
.credential-chip code {
  background: var(--bg-body);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* ----- Gallery ----- */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(138, 165, 210, 0.24);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.gallery-item:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 189, 242, 0.45);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}
.gallery-item img, .gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img, .gallery-item:hover video {
  transform: scale(1.04);
}
.gallery-item .media-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.gallery-item .media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 0.8rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.hidden { display: none; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: linear-gradient(165deg, rgba(17, 30, 56, 0.9), rgba(10, 20, 40, 0.92));
  border: 1px solid rgba(138, 165, 210, 0.25);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.camera-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px;
}
.camera-body video, .camera-body img, .camera-body canvas {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius-md);
  background: #000;
  object-fit: cover;
}
.camera-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}
.camera-footer { justify-content: center; }

/* ----- Toast ----- */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  left: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: linear-gradient(165deg, rgba(17, 30, 56, 0.95), rgba(10, 20, 40, 0.95));
  border: 1px solid rgba(138, 165, 210, 0.25);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: toastIn 0.25s ease;
  font-size: 0.95rem;
}
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.toast-close:hover { color: var(--text-primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Spinner ----- */
.spinner-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(4px);
}
.spinner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
#spinner-text { color: var(--text-secondary); font-size: 0.95rem; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Empty State ----- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ----- Upload Meta ----- */
.upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.upload-meta .meta-chip {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ----- Misc ----- */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-active { background: rgba(34,197,94,0.12); color: var(--success); }
.status-inactive { background: rgba(239,68,68,0.12); color: var(--danger); }
.status-pending { background: rgba(245,158,11,0.12); color: var(--warning); }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (min-width: 640px) {
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .attendance-actions { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .navbar { padding: 14px 24px; }
  .hero { padding: 56px 24px 32px; }
  .hero-title { font-size: 2.25rem; }
  .portal-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .wide-card { grid-column: 1 / -1; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .toast-container { left: auto; width: 380px; }
}

@media (max-width: 639px) {
  .nav-actions { display: none; }
  .mobile-menu-toggle { display: flex; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar.split { flex-direction: column; }
  .toolbar .form-input { width: 100%; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
}

/* Print */
@media print {
  .navbar, .mobile-menu-toggle, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ============================================
   AMAZON-STYLE THEME OVERRIDES + GLOBAL LOGO
   ============================================ */
:root {
  --bg-body: #eaeded;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  --text-primary: #0f1111;
  --text-secondary: #565959;
  --text-muted: #6f7373;
  --accent: #007185;
  --accent-hover: #005f73;
  --accent-soft: rgba(0, 113, 133, 0.12);
  --primary: #ffd814;
  --primary-hover: #f7ca00;
  --primary-soft: rgba(255, 216, 20, 0.2);
  --secondary: #232f3e;
  --secondary-hover: #37475a;
  --border: #d5d9d9;
  --shadow: 0 2px 10px rgba(15, 17, 17, 0.15);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font: Arial, Helvetica, sans-serif;
}

body {
  background: var(--bg-body);
  color: var(--text-primary);
}

body::before,
body::after {
  display: none;
}

#app {
  position: relative;
  isolation: isolate;
}

#app::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../logo.jpeg');
  background-repeat: repeat;
  background-size: 110px;
  opacity: 0.018;
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.navbar {
  background: #131921;
  border-bottom: 1px solid #0f1111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav-brand,
.nav-brand:hover,
.brand-text {
  color: #ffffff;
}

.nav-brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  border: 1px solid #d5d9d9;
}

.mobile-menu-toggle span {
  background: #ffffff;
}

.mobile-drawer {
  background: rgba(17, 24, 39, 0.45);
}

.drawer-content {
  background: #232f3e;
  border-left: 1px solid #3a4553;
}

.drawer-content a,
.drawer-content button {
  background: rgba(255, 255, 255, 0.06);
}

.drawer-content a:hover,
.drawer-content button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  background: #ffffff;
  border-bottom: 1px solid #d5d9d9;
  margin-bottom: 8px;
}

.hero-logo {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  border: 1px solid #d5d9d9;
  filter: none;
}

.hero-title {
  background: none;
  -webkit-text-fill-color: initial;
  color: #131921;
}

.hero-subtitle {
  color: #3f4b57;
}

.portal-card,
.card,
.dashboard-card,
.modal-content,
.toast {
  background: #ffffff;
  border: 1px solid #d5d9d9;
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portal-card:hover,
.dashboard-card:hover,
.gallery-item:hover {
  background: #fffaf2;
  border-color: #ff9900;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.22);
}

.portal-card h2,
.dashboard-card h3,
.card-header h2,
.dashboard-header h2,
.modal-header h3 {
  color: #131921;
}

.portal-card p,
.card-header p,
.dashboard-header p,
.meta-label {
  color: #565959;
}

.card-header h2,
.dashboard-header h2,
.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h2::before,
.dashboard-header h2::before,
.modal-header h3::before {
  content: '';
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #ffffff url('../logo.jpeg') center / cover no-repeat;
  border: 1px solid #d5d9d9;
  flex: 0 0 auto;
}

.staff-icon,
.admin-icon,
.customer-icon {
  background: #f3f3f3;
  color: #232f3e;
}

.btn {
  border-color: #d5d9d9;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(180deg, #f7dfa5, #f0c14b);
  border-color: #a88734 #9c7e31 #846a29;
  color: #111111;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #f5d78e, #eeb933);
}

.btn-secondary {
  background: #32445c;
  border-color: #32445c;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #415979;
}

.btn-accent {
  background: #007185;
  border-color: #007185;
  color: #ffffff;
}

.btn-accent:hover {
  background: #005f73;
}

.btn-ghost {
  background: #ffffff;
  color: #0f1111;
}

.form-input {
  background: #ffffff;
  color: #0f1111;
  border: 1px solid #888c8c;
  box-shadow: none;
}

.form-input:focus {
  border-color: #ff9900;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.25);
}

.file-dropzone {
  background: #fafafa;
  border-color: #c8cece;
}

.file-dropzone:hover {
  background: #fff8e8;
  border-color: #ff9900;
}

.tabs {
  border-bottom: 1px solid #d5d9d9;
}

.tab-btn.active {
  color: #131921;
  border-bottom-color: #ff9900;
  text-shadow: none;
}

.tab-btn:hover {
  color: #131921;
}

.table-wrap {
  border: 1px solid #d5d9d9;
  border-radius: 10px;
  background: #ffffff;
}

.data-table thead th {
  background: #f0f2f2;
  color: #0f1111;
  border-bottom: 1px solid #d5d9d9;
}

.data-table tbody td {
  color: #0f1111;
  border-bottom: 1px solid #ebeded;
}

.data-table tbody tr:hover {
  background: #fff8e8;
}

.gallery-item {
  background: #ffffff;
  border: 1px solid #d5d9d9;
  box-shadow: none;
}

.modal-header,
.modal-footer {
  border-color: #d5d9d9;
}

.modal-overlay {
  background: rgba(15, 17, 17, 0.45);
  backdrop-filter: blur(2px);
}

.toast {
  border-left-color: #ff9900;
}

.spinner-overlay {
  background: rgba(15, 17, 17, 0.45);
}
