/* ============================================================
   style.css - Main Stylesheet - Absensi GAMKI
   Mobile-first, Modern, Clean
   ============================================================ */

/* ===================== CSS VARIABLES ===================== */
:root {
  --primary: #0f2b5c;          /* GAMKI Solid Navy */
  --primary-dark: #091c3d;
  --primary-light: #e0e7f5;
  --accent-gold: #EAB308;      /* Solid Yellow */
  --accent-gold-hover: #CA8A04;
  --secondary: #059669;
  --secondary-dark: #047857;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --info: #0284c7;
  --white: #ffffff;
  --black: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(15,43,92,0.12);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --bottom-nav-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ===================== TYPOGRAPHY ===================== */
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p { color: var(--gray-700); }

/* ===================== LOGIN PAGE ===================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  padding: 1rem;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .app-icon {
  width: 72px;
  height: 72px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
}

.login-logo h1 {
  font-size: 1.5rem;
  color: var(--gray-900);
}

.login-logo p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* ===================== LAYOUT ===================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 0.925rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 0.125rem;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--gray-200);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
}

.user-role {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-top: 0.25rem;
}

.btn-logout:hover { background: var(--danger-light); }

/* ===================== MAIN CONTENT ===================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================== TOP BAR ===================== */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 1.25rem;
}

.topbar-title {
  flex: 1;
}

.topbar-title h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.topbar-title p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

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

/* ===================== PAGE CONTENT ===================== */
.page-content {
  padding: 1.5rem;
  flex: 1;
}

/* ===================== STATS CARDS ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #e6f4ea; color: var(--secondary); }
.stat-icon.orange { background: #fef3e2; color: #f57c00; }
.stat-icon.purple { background: #f3e8fd; color: #9334e6; }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.stat-label {
  font-size: 0.825rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ===================== CARD ===================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.25rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.card-body {
  padding: 1.25rem;
}

.rekap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

thead th {
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: var(--gray-50); }

/* ===================== BADGE / STATUS ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-aktif {
  background: #e6f4ea;
  color: #1e8e3e;
}

.badge-nonaktif {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-warning {
  background: var(--warning-light);
  color: #b06000;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  transition: var(--transition);
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-200);
}

.btn-success {
  background: var(--secondary);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: var(--secondary-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #c5221f;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm {
  padding: 0.4rem 0.875rem;
  font-size: 0.82rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--gray-600);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-icon.danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ===================== FORMS ===================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: var(--danger);
  margin-left: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-control.error {
  border-color: var(--danger);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-text {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.3rem;
}

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

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.25rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  color: var(--gray-600);
  font-size: 1.1rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--white);
}

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: calc(100% - 2rem);
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--gray-900);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: slideUp 0.3s ease;
  pointer-events: auto;
}

.toast.success { background: #1e8e3e; }
.toast.error { background: var(--danger); }
.toast.warning { background: #f57c00; }
.toast.info { background: var(--primary); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-message { flex: 1; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== LOADING ===================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  text-align: center;
  margin-top: 1rem;
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* Inline spinner */
.btn .spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(255,255,255,0.3);
  border-top-color: white;
  display: inline-block;
  flex-shrink: 0;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ===================== CONFIRMATION DIALOG ===================== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.confirm-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-dialog {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.confirm-overlay.active .confirm-dialog {
  transform: scale(1);
}

.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.confirm-icon.warning { background: var(--warning-light); }
.confirm-icon.danger { background: var(--danger-light); }

.confirm-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.confirm-message {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.confirm-actions .btn { flex: 1; justify-content: center; }

/* ===================== SEARCH & FILTER ===================== */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}

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

.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 0.875rem 0.6rem 2.25rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  background: var(--gray-50);
}

.search-box input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.filter-select {
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  outline: none;
  background: var(--gray-50);
  color: var(--gray-700);
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary);
  background: var(--white);
}

/* ===================== BOTTOM NAVIGATION (MOBILE) ===================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 100;
  padding: 0 0.5rem;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  font-size: 0.65rem;
  font-weight: 500;
  transition: var(--transition);
  min-width: 60px;
  text-align: center;
}

.bottom-nav-item .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

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

.bottom-nav-item.active .nav-icon {
  transform: scale(1.1);
}

/* ===================== SIDEBAR OVERLAY (MOBILE) ===================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ===================== DETAIL VIEW ===================== */
.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section h4 {
  color: var(--gray-700);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.detail-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.detail-label {
  color: var(--gray-500);
  min-width: 120px;
  flex-shrink: 0;
}

.detail-value {
  color: var(--gray-900);
  font-weight: 500;
  word-break: break-word;
}

/* ===================== SESI LIST ===================== */
.sesi-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sesi-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
}

.sesi-card:hover { border-color: var(--primary); }

.sesi-info { flex: 1; }
.sesi-name { font-weight: 600; color: var(--gray-900); margin-bottom: 0.25rem; }
.sesi-time { font-size: 0.85rem; color: var(--gray-600); }
.sesi-actions { display: flex; gap: 0.25rem; }

/* ===================== KEGIATAN CARD (MOBILE) ===================== */
.kegiatan-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.kegiatan-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }

.kegiatan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.kegiatan-card-title {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.975rem;
}

.kegiatan-card-meta {
  font-size: 0.825rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.kegiatan-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem;
  border-top: 1px solid var(--gray-100);
}

.page-info {
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 0 0.5rem;
}

/* ===================== UTILITIES ===================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--secondary); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.fw-medium { font-weight: 500; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mb-md { margin-bottom: 1rem; }
.hidden { display: none !important; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.full-width { width: 100%; }

/* ===================== RESPONSIVE - TABLET ===================== */
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
  
  .modal {
    border-radius: var(--radius-lg);
    max-width: 560px;
    max-height: 85vh;
    transform: scale(0.95);
  }
  
  .modal-overlay.active .modal {
    transform: scale(1);
  }
  
  .toast-container {
    left: auto;
    right: 1.5rem;
    transform: none;
    width: auto;
    max-width: 380px;
  }
}

/* ===================== RESPONSIVE - MOBILE (<= 768px) ===================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    height: 100dvh; /* Dynamic viewport height fix for Android URL bar */
    padding-bottom: 5rem; /* Extra space at bottom to ensure footer is reachable over system navigation */
  }
  
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
    padding-bottom: var(--bottom-nav-height);
  }
  
  .topbar-menu-btn { display: flex; }
  
  .bottom-nav { display: flex; }
  
  .page-content {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .table-responsive-card table { display: none; }
  
  .topbar {
    padding: 0 1rem;
  }
  
  .toast-container {
    bottom: calc(var(--bottom-nav-height) + 0.75rem);
  }
}

@media (max-width: 360px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .stat-value { font-size: 1.5rem; }
}

/* ===================== SPA & VECTOR ICONS v2.0 ===================== */
.spa-screen { display: none; width: 100%; min-height: 100vh; }
.spa-screen.active { display: flex; }
.app-layout.active { display: flex; }
.app-view { display: none; width: 100%; animation: fadeIn 0.15s ease; }
.app-view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.icon { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; vertical-align: middle; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }
.icon-lg { width: 1.75rem; height: 1.75rem; }
.btn .icon { margin-right: 0.35rem; }
.nav-item .icon { margin-right: 0.75rem; color: var(--gray-500); }
.nav-item.active .icon { color: var(--primary); }
.bottom-nav-item .icon { width: 1.5rem; height: 1.5rem; margin-bottom: 0.2rem; }
.count-badge { background: var(--gray-100); color: var(--gray-700); font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; margin-left: 0.5rem; }

/* ===================== REKAP ABSENSI & PHOTO LIGHTBOX ===================== */
.photo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  background-color: var(--gray-100);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}
.photo-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.photo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: var(--gray-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  border: 1px dashed var(--gray-300);
}
.stat-icon.red {
  background-color: #fee2e2;
  color: #dc2626;
}
.badge-hadir {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-luar-radius {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ===================== LANDING PAGE STYLES ===================== */
.landing-view {
  display: none;
  width: 100%;
  min-height: 100vh;
  background: #f8fafc;
  color: var(--gray-900);
}
.landing-view.active {
  display: block;
}

/* Header & Navbar - Solid Flat GAMKI Navy */
.landing-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0f2b5c !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 0.75rem 1.5rem;
}
.landing-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff !important;
}
.navbar-brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.landing-nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.landing-nav-link:hover {
  color: #f59e0b;
}
.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Solid Flat Hero Section (GAMKI Identity) */
.landing-hero {
  position: relative;
  background-color: #0f2b5c;
  color: #ffffff;
  padding: 4.5rem 1.5rem 4.5rem;
  border-bottom: 3px solid #d97706;
}
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-logo {
  max-height: 85px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.6rem;
}
.hero-title-gold {
  color: #f59e0b !important;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}
.hero-desc {
  font-size: 1.05rem;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
  max-width: 560px;
}
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.btn-gold {
  background: #EAB308 !important;
  color: #1e293b !important;
  font-weight: 700;
  border: none !important;
  padding: 12px 30px;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}
.btn-gold:hover {
  background: #CA8A04 !important;
  color: #1e293b !important;
  transform: translateY(-2px);
  box-shadow: none;
}
.btn-outline-white {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: #ffffff !important;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff !important;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Hero Photo Showcase Frame (Real Documentation) */
.hero-photo-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.hero-photo-card {
  position: relative;
  border-radius: 1.5rem;
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.hero-photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}
.hero-photo-wrapper {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  width: 100%;
  height: 440px;
  background: #0f172a;
}
.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.6s ease;
}
.hero-photo-card:hover .hero-photo-img {
  transform: scale(1.04);
}
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 27, 56, 0.85) 0%, rgba(15, 27, 56, 0.15) 50%, rgba(15, 27, 56, 0.25) 100%);
  pointer-events: none;
}
.hero-float-badge.badge-top {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 43, 92, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}
.hero-float-card.badge-bottom {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}
.float-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.float-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.float-card-desc {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
  font-weight: 500;
}

/* Hero Mockup Card */
.hero-mockup-wrapper {
  position: relative;
}
.hero-card-preview {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0,0,0,0.02);
  padding: 1.5rem;
  position: relative;
  transition: transform 0.3s ease;
}
.hero-card-preview:hover {
  transform: translateY(-4px);
}
.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1.25rem;
}
.mockup-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mockup-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.mockup-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(37,99,235,0.25);
  flex-shrink: 0;
}
.mockup-details {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.mockup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mockup-badge-verified {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}

/* Floating badge decoration */
.mockup-floating-badge {
  position: absolute;
  bottom: -15px;
  right: -15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
}

/* Stats Strip */
.stats-strip-section {
  padding: 0 1.5rem;
  margin-top: -1.5rem;
  position: relative;
  z-index: 10;
}
.stats-strip-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.5rem 1rem;
}
.strip-item {
  text-align: center;
  padding: 0.5rem 1rem;
  border-right: 1px solid #f1f5f9;
}
.strip-item:last-child {
  border-right: none;
}
.strip-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: #1e40af;
  line-height: 1.2;
}
.strip-lbl {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Sections */
.landing-section {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}
.section-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}
.section-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  line-height: 1.6;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.feature-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  transition: all 0.25s ease;
  position: relative;
}
.feature-card:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.08);
}
.feature-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.feature-icon-box.blue { background: #eff6ff; color: #2563eb; }
.feature-icon-box.green { background: #ecfdf5; color: #059669; }
.feature-icon-box.purple { background: #f5f3ff; color: #7c3aed; }
.feature-icon-box.amber { background: #fffbeb; color: #d97706; }
.feature-card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.6rem;
}
.feature-card p {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Step Cards / How It Works */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}
.workflow-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}
.workflow-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.workflow-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.6rem;
}
.workflow-card p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

/* Access Split Cards */
.portal-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.portal-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.portal-card.peserta::before {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}
.portal-card.admin::before {
  background: linear-gradient(90deg, #1e293b, #64748b);
}
.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}
.portal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.portal-card.peserta .portal-badge {
  background: #eff6ff;
  color: #1d4ed8;
}
.portal-card.admin .portal-badge {
  background: #f1f5f9;
  color: #334155;
}
.portal-card h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.75rem;
}
.portal-card p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Footer */
.landing-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 1.5rem 2.5rem;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #1e293b;
}
.footer-brand h4 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  max-width: 360px;
}
.footer-motto {
  font-style: italic;
  font-weight: 600;
  color: #38bdf8;
  font-size: 0.85rem;
}
.footer-col h5 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: #ffffff;
}
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.gallery-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 43, 92, 0.12);
}
.gallery-img-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #0f172a;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}
.gallery-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}
.gallery-tag {
  background: rgba(15, 43, 92, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.gallery-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.gallery-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}
.gallery-card-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

/* ============================================================ */
/* ULTRA RESPONSIVE DESIGN (All Screen Sizes)                    */
/* ============================================================ */

/* Tablet & Mobile Landscape (< 960px) */
@media (max-width: 960px) {
  .landing-nav-links {
    display: none;
  }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-logo {
    max-height: 75px;
    margin: 0 auto 1.25rem;
  }
  .hero-badge {
    margin: 0 auto 1rem;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
  }
  .hero-cta-group {
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero-trust {
    justify-content: center;
  }
  .hero-event-pill {
    margin: 0 auto;
  }
  .stats-strip-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .workflow-grid,
  .portal-cards-grid,
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Mobile Portrait (< 640px) */
@media (max-width: 640px) {
  .landing-navbar {
    padding: 0.5rem 1rem !important;
  }
  .landing-nav-container {
    padding: 0;
  }
  .navbar-brand-logo {
    height: 28px;
  }
  .brand-name {
    font-size: 0.88rem;
  }
  .brand-sub {
    font-size: 0.6rem;
  }
  .landing-nav-actions {
    gap: 0.4rem;
  }
  .landing-nav-actions .btn-outline-white,
  .landing-nav-actions .btn-gold {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.75rem !important;
  }
  /* Hide Portal Admin button on very small screens to prevent overflow */
  @media (max-width: 480px) {
    .landing-nav-actions .btn-gold {
      display: none !important;
    }
  }
  .landing-hero {
    padding: 1.75rem 1rem 2.25rem !important;
  }
  .hero-container {
    gap: 1.5rem !important;
  }
  .hero-logo {
    max-height: 54px !important;
    margin-bottom: 0.85rem !important;
  }
  .hero-badge {
    padding: 0.25rem 0.65rem !important;
    font-size: 0.72rem !important;
    margin-bottom: 0.75rem !important;
  }
  .hero-title {
    font-size: 1.65rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.35rem !important;
  }
  .hero-title-gold {
    font-size: 0.95rem !important;
    margin-bottom: 0.75rem !important;
  }
  .hero-desc {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.25rem !important;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem !important;
    margin-bottom: 1rem !important;
  }
  .hero-cta-group .btn-gold,
  .hero-cta-group .btn-outline-white {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem !important;
    font-size: 0.88rem !important;
  }
  .hero-photo-container {
    max-width: 100%;
  }
  .hero-photo-wrapper {
    height: 240px !important;
  }
  .hero-float-badge.badge-top {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.65rem !important;
    top: 8px !important;
    left: 8px !important;
  }
  .stats-strip-container {
    grid-template-columns: 1fr 1fr;
    padding: 1rem 0.85rem;
  }
  .strip-val {
    font-size: 1.35rem;
  }
  .strip-lbl {
    font-size: 0.72rem;
  }
  .landing-section {
    padding: 2.5rem 1rem !important;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .section-subtitle {
    font-size: 0.88rem;
  }
}

/* Extra Small Phones (< 400px) */
@media (max-width: 400px) {
  .hero-title {
    font-size: 1.45rem !important;
  }
  .hero-title-gold {
    font-size: 0.88rem !important;
  }
  .hero-photo-wrapper {
    height: 210px !important;
  }
  .stats-strip-container {
    grid-template-columns: 1fr;
  }
  .hero-badge span {
    font-size: 0.68rem;
  }
}


/* ==========================================================================
   HCI REDESIGN: NEW COMPONENTS
   ========================================================================== */

/* Progress Indicator (Stepper) */
.progress-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  max-width: 100%;
}
.progress-stepper::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0 0.5rem;
  flex: 1;
}
.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--gray-300);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.step-item.active .step-circle {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #ffffff;
}
.step-item.completed .step-circle {
  border-color: var(--success-color);
  background: var(--success-color);
  color: #ffffff;
}
.step-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  text-align: center;
}
.step-item.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}
.step-item.completed .step-label {
  color: var(--success-color);
}

/* Redesigned Success Receipt */
.digital-receipt {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-200);
  margin-top: 1rem;
}
.receipt-header {
  text-align: center;
  border-bottom: 1px dashed var(--gray-300);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.receipt-header svg {
  color: var(--success-color);
  margin-bottom: 0.5rem;
}
.receipt-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.receipt-subtitle {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}
.receipt-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.receipt-row:last-child {
  border-bottom: none;
}
.receipt-label {
  color: var(--gray-500);
  font-size: 0.85rem;
}
.receipt-value {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9rem;
  text-align: right;
}

/* Name Confirmation Box */
.name-confirm-box {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease;
}
.name-confirm-text {
  font-size: 0.9rem;
  color: var(--primary-900);
  margin: 0;
}
.name-confirm-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-700);
  margin: 0;
}
.name-confirm-actions {
  display: flex;
  gap: 0.5rem;
}

/* Checklist for Selfie */
.selfie-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 0.85rem;
  color: var(--gray-600);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.selfie-checklist li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.selfie-checklist li svg {
  color: var(--secondary);
}

/* Adjust Step Cards visibility */
.step-card {
  display: none;
  animation: fadeIn 0.3s ease;
}
.step-card.active {
  display: block;
}

/* Refined GPS Badge Colors */
.gps-badge {
  padding: 0.85rem;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.gps-loading {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.gps-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.gps-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Modern Header / Admin Cards */
.admin-overview-card {
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(15, 43, 92, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-overview-title {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}
.admin-overview-event {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.15);
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
}
.status-indicator .dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

/* Recent Attendance List */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.recent-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  gap: 1rem;
}
.recent-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recent-item-icon.success { background: #ecfdf5; color: #10b981; }
.recent-item-icon.warning { background: #fffbeb; color: #f59e0b; }
.recent-item-info { flex: 1; }
.recent-item-name { font-weight: 600; color: var(--gray-800); margin: 0 0 0.1rem 0; font-size: 0.95rem; }
.recent-item-time { font-size: 0.75rem; color: var(--gray-500); }
.recent-item-status { font-size: 0.8rem; font-weight: 500; }
.recent-item-status.success { color: #10b981; }
.recent-item-status.warning { color: #f59e0b; }

/* ===================== MOBILE REDESIGN 2026 ===================== */
/* Default Mobile-First Styles for new classes */

/* Mobile Navbar */
.mobile-navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  height: 64px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}
.nav-brand img {
  height: 32px;
  width: auto;
}
.nav-toggle {
  background: transparent;
  border: none;
  color: white;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-menu {
  display: none;
}
.nav-menu.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--primary);
  padding: 1rem 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.nav-menu .nav-link {
  color: rgba(255,255,255,0.9);
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Hero Mobile Updates */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7; /* Bright light green for high contrast on navy */
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  color: #ffffff;
  font-weight: 500;
}
.hero-features li .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.hero-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent-gold);
  color: #1e293b;
  font-weight: 700;
  font-size: 1.1rem;
  height: 54px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: none;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}
.hero-cta-btn:active {
  transform: scale(0.98);
}

.hero-photo-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 18px;
  overflow: hidden;
}
.hero-photo-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-photo-badge .pulse-dot {
  width: 6px; height: 6px;
}

/* Mobile Timeline */
.mobile-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 1rem 0;
}
.timeline-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.timeline-num {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--gray-400);
  padding-top: 2px;
}
.timeline-text h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  color: var(--gray-900);
}
.timeline-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Mobile Footer */
.mobile-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #34d399;
}
.footer-admin-link a {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 10px;
  display: inline-block;
  min-height: 44px;
}

/* Base Overrides for Mobile Layout */
@media (max-width: 767px) {
  .hide-on-mobile {
    display: none !important;
  }

  /* Nuclear overflow containment */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .page-content,
  .app-view,
  .card,
  .card-body,
  .table-wrapper {
    max-width: 100% !important;
    overflow-x: auto;
  }

  table {
    table-layout: auto;
    word-break: break-word;
  }

  .action-buttons,
  .table-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem !important;
  }
  
  .action-buttons .btn,
  .card-header > .btn,
  .table-actions .btn {
    width: 100%;
    justify-content: center !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .rekap-header {
    flex-direction: column;
    align-items: stretch;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box, .filter-select {
    min-width: 0 !important;
    width: 100% !important;
    flex: none !important;
  }

  html {
    font-size: 14px; /* Mengecilkan skala UI 12.5% di mobile */
  }

  .card-header {
    padding: 1rem 1rem 0.75rem !important;
  }

  .card-body {
    padding: 1rem !important;
  }

  th, td {
    padding: 0.75rem 0.5rem !important;
  }

  #fitur, #ctaBanner {
    display: none !important;
  }
  
  .landing-hero {
    padding: 28px 20px 36px !important;
  }
  
  .hero-container {
    flex-direction: column;
    padding: 0;
  }
  
  .hero-title {
    font-size: 32px !important;
    line-height: 1.1 !important;
    margin-bottom: 6px !important;
    color: white;
  }
  
  .hero-subtitle {
    font-size: 19px !important;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 12px;
  }
  
  .hero-desc {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
    color: rgba(255, 255, 255, 0.85);
  }
  
  .landing-section {
    padding: 40px 20px !important;
  }

  .hero-cta-btn {
    max-width: none !important;
    height: 54px !important;
  }
  
  .hero-photo-wrapper {
    height: auto !important;
    max-height: 250px;
    border-radius: 18px;
    margin-top: 10px;
  }
  .hero-photo-img {
    height: 100% !important;
    aspect-ratio: 16/10;
    object-fit: cover;
  }
  
  #alur {
    padding: 40px 20px !important;
    background: var(--white);
  }
  #alur .section-title {
    font-size: 26px !important;
    margin-bottom: 8px !important;
  }
  #alur .section-subtitle {
    display: none; /* Hide to save space as requested */
  }

  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  /* Sembunyikan elemen footer lama jika terender */
  .footer-container, .footer-bottom {
    display: none !important;
  }
  
  /* Sembunyikan desktop navbar di mobile */
  .desktop-navbar, #appNavbar {
    display: none !important;
  }
}

/* Desktop overrides to hide mobile-specific elements if resizing window */
@media (min-width: 768px) {
  .mobile-navbar {
    display: none !important; /* Kembalikan ke desain asli / hapus navbar mobile di desktop */
  }
  .mobile-footer {
    display: none !important;
  }
  .hero-cta-btn {
    width: auto;
    display: inline-flex;
    padding: 0 2rem;
  }
}
