/* =========================================
   CSS Variables
========================================= */
:root {
  --color-primary: #1a56db;
  --color-primary-hover: #1648b8;
  --color-primary-light: #e8eefb;
  --color-secondary: #6b7280;
  --color-secondary-hover: #4b5563;
  --color-success: #059669;
  --color-success-light: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-light: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-light: #fef2f2;
  --color-info: #2563eb;
  --color-info-light: #eff6ff;

  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;

  --navbar-height: 56px;
  --container-max: 1120px;
  --container-sm: 640px;

  --transition: 150ms ease;
}

/* =========================================
   Reset & Base
========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

/* =========================================
   Layout Utilities
========================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-sm { max-width: var(--container-sm); }

.page-content { padding-top: calc(var(--navbar-height) + 1.5rem); padding-bottom: 2rem; }

.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.p-0 { padding: 0 !important; }

.text-small { font-size: 0.8125rem; }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }

@media (max-width: 767px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* =========================================
   Navbar
========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand svg { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
}

.nav-link {
  padding: 0.375rem 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--color-primary-light); color: var(--color-primary); text-decoration: none; }
.nav-link.active { color: var(--color-primary); background: var(--color-primary-light); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: background var(--transition);
}
.nav-icon-btn:hover { background: var(--color-bg); text-decoration: none; }

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* User menu */
.user-menu { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text);
  transition: border-color var(--transition);
}
.user-menu-btn:hover { border-color: var(--color-primary); }

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 110;
  padding: 0.25rem;
}
.user-dropdown.open { display: block; }

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
}
.dropdown-item:hover { background: var(--color-bg); text-decoration: none; }
.dropdown-item-danger { color: var(--color-danger); }
.dropdown-divider { height: 1px; background: var(--color-border); margin: 0.25rem 0; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 767px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem;
    box-shadow: var(--shadow);
  }
  .nav-links.nav-open { display: flex; }
  .nav-link { width: 100%; }
  .user-name { display: none; }
}

/* =========================================
   Buttons
========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); }

.btn-secondary { background: var(--color-bg); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover:not(:disabled) { background: var(--color-border); }

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

.btn-sm { padding: 0.3rem 0.625rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.875rem; }

/* =========================================
   Cards
========================================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.card-body { padding: 1rem; }

.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }

.card-hover { transition: border-color var(--transition), box-shadow var(--transition); }
.card-hover:hover { border-color: var(--color-primary); box-shadow: var(--shadow); text-decoration: none; color: inherit; }

/* =========================================
   Forms
========================================= */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1); }
.form-control:disabled { background: var(--color-bg); color: var(--color-text-muted); cursor: not-allowed; }
.form-control-sm { padding: 0.3rem 0.5rem; font-size: 0.8125rem; }

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }

.form-error { color: var(--color-danger); font-size: 0.75rem; margin-top: 0.25rem; min-height: 0; }
.form-help { font-size: 0.75rem; margin-top: 0.25rem; }

.otp-input { letter-spacing: 0.5em; text-align: center; font-size: 1.5rem; font-weight: 600; }

.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; }
.radio-label input[type="radio"] { accent-color: var(--color-primary); }

.toggle-label { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; }
.toggle-label input[type="checkbox"] { margin-top: 0.15rem; accent-color: var(--color-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; }
.checkbox-label input[type="checkbox"] { accent-color: var(--color-primary); }

/* =========================================
   Badges
========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 99px;
  white-space: nowrap;
  text-transform: capitalize;
}

.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-light); color: var(--color-danger); }
.badge-info { background: var(--color-info-light); color: var(--color-info); }
.badge-secondary { background: #f3f4f6; color: var(--color-secondary); }

/* =========================================
   Tables
========================================= */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th, .table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table th {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--color-bg);
  white-space: nowrap;
}
.table tbody tr:hover { background: rgba(26, 86, 219, 0.02); }
.table-empty { text-align: center; color: var(--color-text-muted); padding: 2rem; }

/* =========================================
   Progress Bar
========================================= */
.progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 99px;
  transition: width 0.4s ease;
  min-width: 0;
}

/* =========================================
   Stat Cards
========================================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.stat-number { font-size: 1.75rem; font-weight: 700; color: var(--color-primary); line-height: 1.2; }
.stat-label { font-size: 0.75rem; color: var(--color-text-secondary); margin-top: 0.25rem; }

/* =========================================
   Photo Slot Cards
========================================= */
.photo-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.photo-slot {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.photo-slot:hover { border-color: var(--color-primary); box-shadow: var(--shadow); }

.photo-slot-preview {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.photo-slot-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--color-bg-secondary, #f4f6f8);
  color: var(--color-text-muted);
  border-radius: 4px;
}

.photo-slot-info { padding: 0.5rem; }
.photo-slot-code { font-size: 0.6875rem; font-weight: 600; color: var(--color-primary); }
.photo-slot-name { font-size: 0.75rem; color: var(--color-text-secondary); display: block; margin-bottom: 0.25rem; }
.photo-slot-title { font-size: 0.75rem; color: var(--color-text); display: block; margin-bottom: 0.25rem; }

/* Photo slot card (submission page) */
.photo-slot-card .photo-slot-thumb {
  width: 100px;
  height: 75px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg);
}
.photo-slot-card .photo-slot-preview { width: 100%; height: 100%; object-fit: cover; }
.photo-slot-card .photo-slot-placeholder { width: 100%; height: 100%; }
.photo-slot-card .photo-slot-detail .photo-slot-code { font-size: 0.75rem; }
.photo-slot-card .photo-slot-name { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.25rem; }
.photo-slot-actions { display: flex; gap: 0.375rem; flex-wrap: wrap; }
.photo-slot-review-note {
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-size: 0.8125rem;
  background: var(--color-warning-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-warning);
}

/* =========================================
   Photo Upload Area
========================================= */
.photo-upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
  position: relative;
}
.photo-upload-area:hover, .photo-upload-area.drag-over { border-color: var(--color-primary); }

.upload-placeholder {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}
.upload-placeholder svg { margin: 0 auto 0.5rem; }
.upload-placeholder p { font-size: 0.875rem; margin-bottom: 0.25rem; }

.upload-preview { width: 100%; max-height: 400px; object-fit: contain; background: var(--color-bg); }

.file-input-hidden { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; }

/* =========================================
   Gallery Grid
========================================= */
.gallery-grid {
  columns: 3;
  column-gap: 0.75rem;
}

.gallery-card {
  break-inside: avoid;
  display: block;
  margin-bottom: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
}
.gallery-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); text-decoration: none; }

.gallery-card-img-wrap { overflow: hidden; }
.gallery-card-img { width: 100%; display: block; transition: transform 0.3s ease; }
.gallery-card:hover .gallery-card-img { transform: scale(1.02); }

.gallery-card-info { padding: 0.625rem 0.75rem; }
.gallery-card-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; line-height: 1.3; }
.gallery-card-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

@media (max-width: 1023px) { .gallery-grid { columns: 2; } }
@media (max-width: 639px) { .gallery-grid { columns: 1; } }

/* Gallery detail */
.gallery-detail { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; }
.gallery-full-img { width: 100%; border-radius: var(--radius); }
.gallery-detail-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.gallery-detail-student { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.125rem; }
.gallery-detail-narrative { margin-top: 1rem; }
.gallery-detail-narrative h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--color-text-secondary); }
.gallery-detail-narrative p { font-size: 0.875rem; line-height: 1.7; }

@media (max-width: 767px) { .gallery-detail { grid-template-columns: 1fr; } }

/* =========================================
   Review Layout (Lecturer)
========================================= */
.review-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; }
.review-photo-full { width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
.review-history-item { padding: 0.5rem; border-radius: var(--radius-sm); background: var(--color-bg); margin-bottom: 0.5rem; }

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

/* Meta grid */
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.meta-item { display: flex; flex-direction: column; }
.meta-label { font-size: 0.6875rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.meta-value { font-size: 0.875rem; }

/* =========================================
   Toast
========================================= */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.toast-enter { opacity: 1; transform: translateX(0); }
.toast.toast-exit { opacity: 0; transform: translateX(20px); }

.toast-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.0625rem; }
.toast-message { flex: 1; line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-success .toast-icon { color: var(--color-success); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-error .toast-icon { color: var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-info { border-left: 3px solid var(--color-info); }
.toast-info .toast-icon { color: var(--color-info); }

/* =========================================
   Auth Pages
========================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--color-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.auth-brand h1 { font-size: 1.25rem; }

.auth-title { font-size: 1.25rem; margin-bottom: 0.25rem; }
.auth-desc { font-size: 0.875rem; color: var(--color-text-secondary); margin-bottom: 1.25rem; }

/* =========================================
   Notifications
========================================= */
.notif-list { display: flex; flex-direction: column; gap: 0; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background var(--transition);
}
.notif-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.notif-item:last-child { border-bottom: none; border-radius: 0 0 var(--radius) var(--radius); }
.notif-item:hover { background: var(--color-bg); }
.notif-unread { background: var(--color-primary-light); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  margin-top: 0.4rem;
}
.notif-dot.active { background: var(--color-primary); }

.notif-content { flex: 1; }
.notif-message { font-size: 0.875rem; margin-bottom: 0.125rem; }
.notif-time { display: block; }

/* =========================================
   Alerts
========================================= */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-danger { background: var(--color-danger-light); color: var(--color-danger); border: 1px solid rgba(220, 38, 38, 0.15); }
.alert-info { background: var(--color-info-light); color: var(--color-info); border: 1px solid rgba(37, 99, 235, 0.15); }
.alert-success { background: var(--color-success-light); color: var(--color-success); border: 1px solid rgba(5, 150, 105, 0.15); }

/* =========================================
   Spinner
========================================= */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   Empty State
========================================= */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.6; }
.empty-state h2 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1rem; }

/* =========================================
   Modal
========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.modal-header h2 { font-size: 1.1rem; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.25rem;
}

.modal-body { padding: 1rem; }
.modal-footer { padding: 1rem; border-top: 1px solid var(--color-border); display: flex; justify-content: flex-end; gap: 0.5rem; }

/* =========================================
   Pagination
========================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* =========================================
   Filter Bar
========================================= */
.filter-bar .form-group { min-width: 140px; }

/* =========================================
   Section & Page Titles
========================================= */
.page-title { margin-bottom: 1rem; }
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--color-text-secondary); }

/* =========================================
   Print
========================================= */
@media print {
  .navbar, .toast-container { display: none; }
  .page-content { padding-top: 0; }
}

/* ======================================
   Rating System
   ====================================== */
.rating-section { padding: 1rem 0; }
.rating-display { display: flex; align-items: center; gap: 0.5rem; }
.rating-stars { display: inline-flex; gap: 2px; }
.star-display, .star-btn { font-size: 1.5rem; color: #d1d5db; transition: color 0.15s; user-select: none; }
.star-filled { color: #f59e0b; }
.star-btn { cursor: pointer; }
.star-btn:hover, .star-hover { color: #fbbf24; }
.rating-avg { font-size: 1.25rem; font-weight: 700; color: #1f2937; }
.rating-count { font-size: 0.875rem; }
.rating-interactive { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.rating-stars-input { display: inline-flex; gap: 2px; }
.rating-login-prompt { margin-top: 0.5rem; }
.btn-outline { border: 1px solid #d1d5db; background: #fff; color: #374151; padding: 0.375rem 0.75rem; border-radius: 6px; font-size: 0.875rem; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; transition: all 0.15s; }
.btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }

/* ======================================
   Share Buttons
   ====================================== */
.share-section { border-top: 1px solid #e5e7eb; padding-top: 1rem; }
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; color: #6b7280; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.share-btn:hover { background: #f3f4f6; }
.share-facebook:hover { color: #1877f2; border-color: #1877f2; }
.share-twitter:hover { color: #000; border-color: #000; }
.share-whatsapp:hover { color: #25d366; border-color: #25d366; }
.share-copy:hover { color: #3b82f6; border-color: #3b82f6; }

/* ======================================
   Lightbox
   ====================================== */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; z-index: 10000; line-height: 1; padding: 0.5rem; }
.lightbox-content { max-width: 95vw; max-height: 85vh; overflow: auto; display: flex; align-items: center; justify-content: center; }
.lightbox-content img { max-width: 100%; max-height: 85vh; object-fit: contain; transition: transform 0.2s; }
.lightbox-controls { display: flex; gap: 0.5rem; margin-top: 1rem; }
.lightbox-btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-size: 1.1rem; }
.lightbox-btn:hover { background: rgba(255,255,255,0.25); }

/* ======================================
   Confirmation Modal
   ====================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { background: #fff; border-radius: 12px; padding: 1.5rem; max-width: 500px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.confirm-summary { background: #f9fafb; border-radius: 8px; padding: 1rem; }
.confirm-item { padding: 0.25rem 0; font-size: 0.875rem; border-bottom: 1px solid #e5e7eb; }
.confirm-item:last-child { border-bottom: none; }

/* ======================================
   Monitoring Dashboard
   ====================================== */
.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 120px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1rem; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: #1f2937; }
.stat-label { font-size: 0.8rem; color: #6b7280; margin-top: 0.25rem; }
.photo-status-dots { display: flex; gap: 2px; font-size: 1rem; }
.progress-mini { height: 6px; background: #e5e7eb; border-radius: 3px; width: 60px; display: inline-block; vertical-align: middle; margin-right: 0.5rem; }
.progress-bar-mini { height: 100%; background: #10b981; border-radius: 3px; transition: width 0.3s; }
.btn-info { background: #3b82f6; color: #fff; border: none; }
.btn-info:hover { background: #2563eb; }

/* ======================================
   Gallery card enhancements
   ====================================== */
.gallery-detail-student { margin-top: 0.5rem; }
.gallery-detail-student strong { display: block; font-size: 1rem; }

/* =========================================
   Landing Page — Redesign
   Prefix: l (lhero, lgallery, lcategories,
   lworkflow, lpillars, lcta, lfooter)
========================================= */

/* ── Keyframes ─────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Skeleton ───────────────────────────── */
.lskel {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin-bottom: 0.75rem;
  animation: lskelPulse 1.4s ease-in-out infinite;
}
@keyframes lskelPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.7; }
}
.lskel-eyebrow { height: 14px; width: 55%; }
.lskel-h1      { height: 48px; width: 90%; }
.lskel-h1b     { width: 65%; }
.lskel-p       { height: 16px; width: 100%; }
.lskel-pb      { width: 80%; }
.lskel-btn     { height: 42px; width: 200px; border-radius: 6px; }
.lskel-card    { height: 320px; border-radius: 12px; }

/* ── Main wrap ──────────────────────────── */
.landing-wrap { width: 100%; }

/* =========================================
   HERO
========================================= */
.lhero {
  background: #070c1a;
  color: #fff;
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.lhero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* ── Hero left ──────────────────────────── */
.lhero-left { min-width: 0; }

.lhero-animate {
  animation: fadeInUp 0.5s ease both;
}
.lhero-animate--delay {
  animation-delay: 0.12s;
}

.lhero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.lhero-headline {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.25rem;
}

.lhero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 2.25rem;
}

.lhero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  align-items: center;
}

.lhero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  border: none;
  cursor: pointer;
}
.lhero-btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,86,219,0.35);
  text-decoration: none;
  color: #fff;
}
.lhero-btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.lhero-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
  cursor: pointer;
}
.lhero-btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  text-decoration: none;
}
.lhero-btn-ghost:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ── Hero right ─────────────────────────── */
.lhero-right { min-width: 0; }

.lhero-preview-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lhero-preview-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0d1424;
}

.lhero-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}
.lhero-preview-card:hover .lhero-preview-img img {
  transform: scale(1.03);
}

.lhero-preview-img--err {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lhero-preview-img--err::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.02) 0px,
    rgba(255,255,255,0.02) 1px,
    transparent 1px,
    transparent 10px
  );
}

.lhero-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(7,12,26,0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.lhero-preview-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(26,86,219,0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
}

.lhero-preview-name {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

/* Fallback SVG dekorasi */
.lhero-preview-fallback {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1424 0%, #111827 100%);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}
.lhero-preview-fallback svg {
  width: 85%;
  height: auto;
}

/* =========================================
   KATEGORI
========================================= */
.lcategories {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.lcategories-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.lcategories-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  padding-bottom: 2px;
}
.lcategories-scroll::-webkit-scrollbar { display: none; }

.lcat-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: var(--color-bg);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}
.lcat-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}
.lcat-chip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.lcat-chip--all {
  background: var(--color-primary-light);
  border-color: transparent;
  color: var(--color-primary);
  font-weight: 600;
}
.lcat-chip--all:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* =========================================
   GALLERY PREVIEW
========================================= */
.lgallery {
  background: var(--color-bg);
  padding: 4rem 0;
}

.lgallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.lgallery-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.lgallery-viewall {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  flex-shrink: 0;
  transition: gap 150ms ease;
}
.lgallery-viewall:hover {
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-primary-hover);
}

.lgallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.lgallery-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.lgallery-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.lgallery-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.lgallery-card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg);
}

.lgallery-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.lgallery-card:hover .lgallery-card-img-wrap img {
  transform: scale(1.04);
}

.lgallery-img-err {
  background: repeating-linear-gradient(
    45deg,
    var(--color-bg) 0px,
    var(--color-bg) 2px,
    var(--color-border) 2px,
    var(--color-border) 4px
  );
}

.lgallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 200ms ease;
  display: flex;
  align-items: flex-end;
}
.lgallery-card:hover .lgallery-card-overlay {
  opacity: 1;
}

.lgallery-card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.lgallery-card-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.lgallery-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lgallery-card-author {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.lgallery-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 1rem;
  color: var(--color-text-muted);
  text-align: center;
}
.lgallery-empty p { font-size: 0.9rem; }

/* =========================================
   ALUR KERJA
========================================= */
.lworkflow {
  background: var(--color-surface);
  padding: 4.5rem 0;
  border-top: 1px solid var(--color-border);
}

.lworkflow-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.lworkflow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.lworkflow-step {
  position: relative;
  padding-top: 0.5rem;
}

.lworkflow-step-num {
  position: absolute;
  top: -0.5rem;
  left: -0.25rem;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-border);
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.lworkflow-step-body {
  position: relative;
  z-index: 1;
  padding-top: 3rem;
}

.lworkflow-step-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.lworkflow-step-body p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* =========================================
   PILAR PLATFORM
========================================= */
.lpillars {
  background: var(--color-bg);
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
}

.lpillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.lpillar-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lpillar-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.lpillar-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}

.lpillar-item p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* =========================================
   CTA BOTTOM
========================================= */
.lcta {
  background: #0a0f1a;
  padding: 5rem 0;
}

.lcta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.lcta-headline {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.lcta-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.lcta-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.72rem 1.4rem;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
  cursor: pointer;
}
.lcta-btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  text-decoration: none;
}
.lcta-btn-ghost:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.lcta-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  border: none;
  cursor: pointer;
}
.lcta-btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,86,219,0.35);
  text-decoration: none;
  color: #fff;
}
.lcta-btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* =========================================
   FOOTER
========================================= */
.lfooter {
  background: #0a0f1a;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.75rem 0 2rem;
}

.lfooter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.lfooter-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  letter-spacing: -0.01em;
}

.lfooter-nav {
  display: flex;
  gap: 1.5rem;
}

.lfooter-nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 150ms ease;
}
.lfooter-nav a:hover {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.lfooter-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* =========================================
   RESPONSIVE — Tablet ≤768px
========================================= */
@media (max-width: 768px) {
  .lhero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .lhero-right {
    order: -1;
  }

  .lhero-desc {
    max-width: 100%;
  }

  .lgallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .lworkflow-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.25rem;
  }

  .lpillars-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .lcta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* =========================================
   RESPONSIVE — Mobile ≤480px
========================================= */
@media (max-width: 480px) {
  .lhero {
    min-height: auto;
  }

  .lgallery-grid {
    grid-template-columns: 1fr;
  }

  .lworkflow-steps {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .lgallery {
    padding: 3rem 0;
  }

  .lworkflow {
    padding: 3rem 0;
  }

  .lpillars {
    padding: 3rem 0;
  }

  .lcta {
    padding: 3.5rem 0;
  }

  .lfooter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .lcta-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .lcta-btn-ghost,
  .lcta-btn-primary {
    justify-content: center;
  }
}

/* ── Reduced motion override ───────────── */
@media (prefers-reduced-motion: reduce) {
  .lhero-animate { animation: none; }
  .lgallery-card { transition: none; }
  .lgallery-card-img-wrap img { transition: none; }
  .lhero-preview-img img { transition: none; }
  .lskel { animation: none; opacity: 0.5; }
}

/* =========================================
   Mobile Bottom Nav Bar
========================================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 1000;
  padding: 0.25rem 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 150ms ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item.active {
  color: var(--color-primary);
}

.mobile-nav-item:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

.mobile-nav-item .mobile-nav-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: block;
  }

  /* Add bottom padding to body so content doesn't hide behind bottom nav */
  body.has-bottom-nav {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  /* Hide desktop nav-links on mobile when logged in */
  .nav-links {
    display: none !important;
  }

  /* Keep navbar simple on mobile */
  .navbar-inner {
    justify-content: space-between;
  }

  .hamburger {
    display: none !important;
  }
}

/* =========================================
   Landing Page - Extended
========================================= */
.landing-wrap {
  overflow-x: hidden;
}

.landing-hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.landing-hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.landing-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  background: #3b82f6;
}

.landing-shape-1 {
  width: 500px;
  height: 500px;
  top: -200px;
  right: -100px;
}

.landing-shape-2 {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -50px;
  background: #a78bfa;
}

.landing-shape-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #60a5fa;
  opacity: 0.03;
}

.landing-icon-blue {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}

.landing-icon-indigo {
  background: rgba(99,102,241,0.1);
  color: #6366f1;
}

.landing-icon-violet {
  background: rgba(139,92,246,0.1);
  color: #8b5cf6;
}

/* How it works */
.landing-howto {
  padding: 5rem 1.5rem;
  background: var(--color-bg);
}

.landing-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.landing-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 180px;
  flex: 1;
}

.landing-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.landing-step-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.landing-step-content p {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.landing-step-arrow {
  display: flex;
  align-items: center;
  padding: 1rem 0.5rem 0;
  color: var(--color-text-muted);
}

/* CTA Bottom */
.landing-cta {
  padding: 5rem 1.5rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  text-align: center;
}

.landing-cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.landing-cta h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.landing-cta p {
  color: #94a3b8;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.landing-btn-outline-light {
  background: transparent;
  color: #e2e8f0;
  border: 1.5px solid rgba(226,232,240,0.2);
}

.landing-btn-outline-light:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(226,232,240,0.4);
  text-decoration: none;
}

.landing-btn-white {
  background: #fff;
  color: #0f172a;
}

.landing-btn-white:hover {
  background: #f1f5f9;
  text-decoration: none;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .landing-steps {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .landing-step {
    max-width: 280px;
    flex-direction: row;
    text-align: left;
    gap: 1rem;
  }
  .landing-step-num {
    flex-shrink: 0;
  }
  .landing-step-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }
  .landing-howto {
    padding: 3rem 1.25rem;
  }
  .landing-cta {
    padding: 3rem 1.25rem;
  }
  .landing-cta h2 {
    font-size: 1.35rem;
  }
}

/* =========================================
   Gallery Premium (gal-* components)
========================================= */

/* Hero */
@keyframes gal-orb-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.18; }
  50% { transform: translateY(-24px) scale(1.08); opacity: 0.26; }
}

@keyframes gal-orb-float2 {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.14; }
  50% { transform: translateY(20px) scale(0.92); opacity: 0.22; }
}

@keyframes gal-orb-float3 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.10; }
  33% { transform: translateY(-12px) translateX(10px) scale(1.05); opacity: 0.18; }
  66% { transform: translateY(10px) translateX(-8px) scale(0.95); opacity: 0.08; }
}

@keyframes gal-wave {
  0% { d: path("M0,32 C180,0 360,64 540,32 C720,0 900,64 1080,32 L1080,80 L0,80 Z"); }
  50% { d: path("M0,48 C180,80 360,16 540,48 C720,80 900,16 1080,48 L1080,80 L0,80 Z"); }
  100% { d: path("M0,32 C180,0 360,64 540,32 C720,0 900,64 1080,32 L1080,80 L0,80 Z"); }
}

@keyframes gal-dot-drift {
  0% { background-position: 0 0; }
  100% { background-position: 32px 32px; }
}

@keyframes gal-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
  50% { box-shadow: 0 0 0 6px rgba(99,102,241,0.12); }
}

.gal-hero {
  position: relative;
  min-height: 260px;
  margin-top: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
}

.gal-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Animated orbs */
.gal-hero-bg::before,
.gal-hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.gal-hero-bg::before {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -60px;
  background: rgba(99,102,241,0.22);
  animation: gal-orb-float 6s ease-in-out infinite;
}

.gal-hero-bg::after {
  width: 320px;
  height: 320px;
  bottom: -100px;
  right: -40px;
  background: rgba(59,130,246,0.18);
  animation: gal-orb-float2 7.5s ease-in-out infinite;
}

/* Silk wave canvas */
.gal-silk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Wave at bottom */
.gal-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
  pointer-events: none;
}

.gal-hero-wave svg {
  width: 100%;
  height: 48px;
  display: block;
}

.gal-hero-wave path {
  animation: gal-wave 5s ease-in-out infinite;
}

.gal-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.25rem 1.5rem 3rem;
  max-width: 640px;
}

.gal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a5b4fc;
  margin-bottom: 1rem;
  animation: gal-badge-pulse 3s ease-in-out infinite;
}

.gal-hero-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.gal-hero-content h1 span {
  background: linear-gradient(135deg, #818cf8, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gal-hero-content p {
  font-size: 0.9375rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.gal-hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gal-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gal-hero-btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.gal-hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.5);
  text-decoration: none;
  color: #fff;
}

.gal-hero-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
}

.gal-hero-btn-secondary:hover {
  background: rgba(255,255,255,0.14);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
}

/* Section + Container */
.gal-section {
  padding: 2.5rem 0;
  background: var(--color-bg);
}

.gal-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Toolbar */
.gal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.gal-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.gal-search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.gal-search {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gal-search:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.gal-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gal-select {
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  transition: border-color 0.15s ease;
}

.gal-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Masonry Grid */
.gal-masonry {
  columns: 4;
  column-gap: 1rem;
}

/* Cards */
.gal-card {
  break-inside: avoid;
  display: block;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.gal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  text-decoration: none;
  color: inherit;
}

.gal-card-img {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  aspect-ratio: 4/3;
}

.gal-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gal-card:hover .gal-card-img img {
  transform: scale(1.05);
}

.gal-card-img-err {
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gal-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
}

.gal-card:hover .gal-card-overlay {
  opacity: 1;
}

.gal-card-body {
  padding: 0.75rem 0.875rem 0.875rem;
}

.gal-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gal-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.gal-card-author {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.gal-card-cat {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Pagination */
.gal-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.gal-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gal-page-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.gal-page-info {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Footer */
.gal-footer {
  text-align: center;
  padding: 1.5rem;
  background: #0f172a;
  color: #475569;
  font-size: 0.8125rem;
}

.gal-footer span {
  color: #ef4444;
}

/* Loading + Empty */
.gallery-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 300px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 3rem 1.5rem;
}

.gallery-empty h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.gallery-empty p {
  font-size: 0.875rem;
}

/* Responsive Gallery */
@media (max-width: 1279px) { .gal-masonry { columns: 3; } }
@media (max-width: 899px) { .gal-masonry { columns: 2; } }
@media (max-width: 599px) {
  .gal-masonry { columns: 2; column-gap: 0.625rem; }
  .gal-card-body { padding: 0.5rem 0.625rem 0.625rem; }
  .gal-card-title { font-size: 0.8125rem; }
  .gal-card-author { max-width: 80px; }
}
@media (max-width: 399px) { .gal-masonry { columns: 1; } }

@media (max-width: 768px) {
  .gal-hero { min-height: 200px; }
  .gal-hero-content { padding: 1.75rem 1.25rem 2.5rem; }
  .gal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .gal-search-wrap { min-width: unset; }
  .gal-filters { justify-content: stretch; }
  .gal-select { flex: 1; min-width: 0; }
  .gal-section { padding: 1.5rem 0; }
  .gal-container { padding: 0 1rem; }
}

/* =========================================
   Impersonation Banner
========================================= */
.impersonation-banner {
  background: #fef3c7;
  border-bottom: 2px solid #f59e0b;
  color: #92400e;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  width: 100%;
}

.impersonation-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.impersonation-banner strong {
  font-weight: 700;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
  border-color: #d97706;
}
.btn-warning:hover:not(:disabled) {
  background: #d97706;
}

/* When impersonation banner is active, navbar grows to auto height */
body.has-impersonation-banner .navbar {
  height: auto;
}

/* Adjust page-content top padding to account for navbar + banner */
body.has-impersonation-banner .page-content {
  padding-top: calc(var(--navbar-height) + 3rem);
}

@media (max-width: 768px) {
  .impersonation-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  body.has-impersonation-banner .page-content {
    padding-top: calc(var(--navbar-height) + 4.5rem);
  }
}
