/* ==========================================================================
   ABSENSI ELITE — Dominant Warm Orange & Yellow Design System
   Rich, Humanized, Warm Amber Canvas, Zero Screen Glare
   ========================================================================== */

:root {
  /* Warm Amber & Honey Canvas (Never Stark White, Never Glaring) */
  --bg: #f8efe2;
  --bg-alt: #f3e3ce;
  --bg-sand: #faebd7;

  /* Card Surfaces */
  --surface: #ffffff;
  --surface-warm: #fff9f0;
  --surface-hover: #fff3e0;

  /* Prominent Yellow & Orange Borders */
  --border: #fed7aa;
  --border-subtle: #fde8c8;
  --border-strong: #f97316;
  --border-yellow: #facc15;
  --border-focus: #ea580c;

  /* Primary (Warm Solid Orange) */
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-active: #9a3412;
  --primary-light: #ffedd5;
  --primary-border: #fdba74;

  /* Secondary (Warm Golden Yellow) */
  --secondary: #d97706;
  --secondary-hover: #b45309;
  --secondary-light: #fef08a;
  --secondary-border: #facc15;
  --yellow-accent: #f59e0b;
  --yellow-deep: #78350f;

  /* Text Colors */
  --text: #26190d;
  --text-muted: #66523d;
  --text-subtle: #91775e;
  --text-inverse: #ffffff;

  /* Semantic Feedback */
  --success: #15803d;
  --success-light: #dcfce7;
  --success-border: #86efac;

  --warning: #b45309;
  --warning-light: #fef3c7;
  --warning-border: #fde68a;

  --danger: #b91c1c;
  --danger-light: #fee2e2;
  --danger-border: #fca5a5;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Soft Warm Shadows */
  --shadow-sm: 0 2px 4px 0 rgba(234, 88, 12, 0.08);
  --shadow: 0 4px 10px 0 rgba(234, 88, 12, 0.1), 0 1px 3px 0 rgba(234, 88, 12, 0.06);
  --shadow-md: 0 8px 20px -2px rgba(234, 88, 12, 0.15), 0 3px 6px -2px rgba(234, 88, 12, 0.08);
  --shadow-lg: 0 16px 36px -4px rgba(234, 88, 12, 0.18), 0 6px 12px -4px rgba(234, 88, 12, 0.1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   Typography Hierarchy
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.65rem, 3.5vw, 2.15rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.65rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p {
  color: var(--text-muted);
}

/* ==========================================================================
   Navigation Bar (Vibrant Rich Orange & Yellow Theme)
   ========================================================================== */
nav.app-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
  border-bottom: 2.5px solid #c2410c;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.28);
  padding: 0.85rem 1.5rem;
  color: #ffffff;
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.brand-title span {
  color: #fef08a;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: #fef08a;
  color: #78350f;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: #fef08a;
  border: 1.5px solid #facc15;
  border-radius: var(--radius-full);
  color: #78350f;
  font-size: 0.74rem;
  font-weight: 800;
}

.btn-nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-nav-logout:hover {
  background: #b91c1c;
  border-color: #f87171;
}

.btn-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-nav-back:hover {
  background: #ffffff;
  color: #ea580c;
}

/* ==========================================================================
   Page Layout & Containers
   ========================================================================== */
main.app-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 3.5rem;
}

main.app-content-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 3.5rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-greeting {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.header-greeting span {
  color: #ea580c;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  background: #fef08a;
  border: 1.5px solid #facc15;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 800;
  color: #78350f;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Cards & Containers
   ========================================================================== */
.card {
  background: #fffdf9;
  border: 2px solid #fed7aa;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.card-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon-orange {
  background: #ffedd5;
  border: 1.5px solid #fdba74;
  color: #ea580c;
}

.card-icon-yellow {
  background: #fef08a;
  border: 1.5px solid #fde047;
  color: #854d0e;
}

/* Layout Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

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

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

/* ==========================================================================
   GPS Location Component
   ========================================================================== */
.gps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.gps-item {
  background: #fff8ee;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.gps-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.gps-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.gps-value small {
  font-weight: 700;
  color: #9a3412;
  font-size: 0.82rem;
  margin-left: 3px;
}

.gps-status-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 800;
}

.gps-status-box.idle {
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  color: #92400e;
}

.gps-status-box.valid {
  background: #dcfce7;
  border: 1.5px solid #86efac;
  color: #166534;
}

.gps-status-box.invalid {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}

.status-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.status-indicator-dot.idle { background: #b45309; }
.status-indicator-dot.valid { background: #15803d; }
.status-indicator-dot.invalid { background: #dc2626; }

/* ==========================================================================
   Form Controls & Buttons
   ========================================================================== */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #ea580c;
  pointer-events: none;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1.05rem;
  background: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.input-with-icon input {
  padding-left: 2.85rem;
}

select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  cursor: pointer;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a88d72;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 3.5px rgba(234, 88, 12, 0.2);
}

/* File Upload Field */
.file-upload-box {
  border: 2px dashed #f59e0b;
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  background: #fff7ed;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  font-size: 0.9rem;
  color: #9a3412;
  font-weight: 700;
}

.file-upload-box:hover {
  border-color: #ea580c;
  background: #ffedd5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.35rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.25;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border-color: #ea580c;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  border-color: #c2410c;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fef08a;
  border-color: #facc15;
  color: #713f12;
  box-shadow: 0 2px 5px rgba(234, 179, 8, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: #fde047;
  border-color: #eab308;
  color: #451a03;
}

.btn-outline {
  background: #fffaf2;
  border-color: #fdba74;
  color: #9a3412;
}

.btn-outline:hover:not(:disabled) {
  background: #fef08a;
  border-color: #facc15;
  color: #713f12;
}

.btn-gps-check {
  background: #fef08a;
  border-color: #facc15;
  color: #713f12;
  font-weight: 800;
}

.btn-gps-check:hover {
  background: #fde047;
  border-color: #eab308;
}

.btn:disabled {
  background: #eddcc6;
  border-color: #dec8ad;
  color: #9e8972;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   Quick Navigation Cards (Yellow & Orange Dominant)
   ========================================================================== */
.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.quick-nav-grid.has-admin {
  grid-template-columns: repeat(3, 1fr);
}

.quick-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff8ee;
  border: 2px solid #fed7aa;
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
  text-decoration: none;
}

.quick-nav-item:hover {
  background: #ffedd5;
  border-color: #ea580c;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-nav-item .icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-nav-item.item-orange .icon-box {
  background: #ffedd5;
  border: 2px solid #fdba74;
  color: #ea580c;
}

.quick-nav-item.item-yellow .icon-box {
  background: #fef08a;
  border: 2px solid #fde047;
  color: #854d0e;
}

.quick-nav-item.item-neutral .icon-box {
  background: #fff7ed;
  border: 2px solid #fbd38d;
  color: #c2410c;
}

.quick-nav-item .item-content {
  flex: 1;
  min-width: 0;
}

.quick-nav-item .item-tag {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ea580c;
  margin-bottom: 0.2rem;
}

.quick-nav-item .item-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
}

.quick-nav-item .item-arrow {
  color: #d97706;
  transition: transform 0.15s ease, color 0.15s ease;
}

.quick-nav-item:hover .item-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* ==========================================================================
   Stat Cards & Metrics (Warm Tinted)
   ========================================================================== */
.stat-card {
  background: #fffaf2;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.stat-value.color-orange { color: #ea580c; }
.stat-value.color-yellow { color: #d97706; }
.stat-value.color-dark   { color: #78350f; }
.stat-value.color-danger { color: var(--danger); }

.stat-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Tables & Badges (Yellow-Amber Header)
   ========================================================================== */
.table-container {
  overflow-x: auto;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fffdf9;
  box-shadow: var(--shadow);
}

table.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

table.app-table th {
  background: #fef08a;
  color: #713f12;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.95rem 1.15rem;
  border-bottom: 2px solid #facc15;
  white-space: nowrap;
}

table.app-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1.5px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}

table.app-table tr:last-child td {
  border-bottom: none;
}

table.app-table tr:hover td {
  background: #fff1d6;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-hadir, .badge-success {
  background: #dcfce7;
  border: 1.5px solid #86efac;
  color: #166534;
}

.badge-lain, .badge-warning {
  background: #fef08a;
  border: 1.5px solid #fde047;
  color: #854d0e;
}

.badge-danger {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}

/* ==========================================================================
   Timeline / Riwayat Absensi
   ========================================================================== */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-card {
  background: #fffdf9;
  border: 2px solid #fed7aa;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.15s ease;
}

.timeline-card:hover {
  border-color: #ea580c;
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.4rem;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.timeline-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.timeline-date-block {
  flex-shrink: 0;
  min-width: 4rem;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border-radius: var(--radius-sm);
  text-align: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.timeline-day {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.timeline-month {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fef08a;
  margin-top: 3px;
}

.timeline-meta {
  min-width: 0;
}

.timeline-time {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 0.15rem;
}

.timeline-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.4rem;
  border-top: 2px solid var(--border-subtle);
  background: #fdf1dc;
}

.timeline-info-item {
  background: #fffdf8;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
}

.timeline-info-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #8c6d46;
  margin-bottom: 3px;
}

.timeline-info-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-photo-wrap {
  padding: 0 1.4rem 1.25rem;
}

.timeline-photo-wrap img {
  width: 100%;
  max-width: 230px;
  height: 145px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.timeline-photo-wrap img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Filter Bar Component
   ========================================================================== */
.filter-bar-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.4rem;
  background: #fffdf9;
  border: 2px solid #fed7aa;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.35rem;
}

.filter-bar-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #713f12;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-select {
  width: auto;
  min-width: 160px;
}

/* ==========================================================================
   Empty States & Alerts
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: #fef08a;
  border: 2px solid #fde047;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  color: #713f12;
}

.empty-state-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.15rem;
}

.alert-danger {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  border: 1.5px solid #86efac;
  color: #166534;
}

/* ==========================================================================
   Auth Pages (Login / Register) Modern Orange-Yellow Card
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--bg);
  background-image: radial-gradient(#f6ad55 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

.auth-card-modern {
  width: 100%;
  max-width: 440px;
  background: #fffdf9;
  border: 2.5px solid #fed7aa;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-header-banner {
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
  padding: 2rem 2rem 1.75rem;
  color: #ffffff;
  text-align: center;
}

.auth-banner-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #ea580c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.auth-banner-brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.auth-banner-brand span {
  color: #fef08a;
}

.auth-banner-desc {
  font-size: 0.88rem;
  color: #fff4e5;
  font-weight: 500;
}

.auth-body {
  padding: 2rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0;
  color: #947758;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: #fed7aa;
}

/* ==========================================================================
   Lightbox / Modal
   ========================================================================== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(38, 26, 14, 0.82);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-container img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  border: 2.5px solid #f6ad55;
}

.lightbox-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: #fef08a;
  border: 2px solid #facc15;
  color: #713f12;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.15s ease;
}

.lightbox-close-btn:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 820px) {
  .quick-nav-grid.has-admin {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  nav.app-navbar {
    padding: 0.75rem 1rem;
  }

  .nav-container {
    flex-wrap: wrap;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }

  main.app-content,
  main.app-content-narrow {
    padding: 1.5rem 1rem 2.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .quick-nav-grid,
  .quick-nav-grid.has-admin {
    grid-template-columns: 1fr;
  }

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

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

  .filter-bar-card {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }

  .auth-body {
    padding: 1.5rem;
  }
}
