/* =====================================================
   SIPDM - Sistem Informasi Perubahan Data Mahasiswa
   Main Stylesheet
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --primary: #1a3a5c;
  --primary-light: #2657a0;
  --primary-dark: #0f2338;
  --accent: #e8a020;
  --accent-light: #f5c050;
  --success: #1a8c5b;
  --danger: #c0392b;
  --warning: #e67e22;
  --info: #2980b9;
  --surface: #f4f6f9;
  --card: #ffffff;
  --border: #dde3ee;
  --text: #1c2b3a;
  --text-muted: #6b7c93;
  --text-light: #9aa8b5;
  --shadow: 0 2px 12px rgba(26, 58, 92, 0.08);
  --shadow-md: 0 4px 24px rgba(26, 58, 92, 0.12);
  --shadow-lg: 0 8px 40px rgba(26, 58, 92, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

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

.sidebar {
  width: 260px;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-brand .brand-text .brand-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.sidebar-brand .brand-text .brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  line-height: 1.2;
}

.nav-section {
  padding: 10px 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  padding: 12px 22px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  margin: 1px 0;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-left-color: rgba(255,255,255,0.3);
}

.nav-item.active {
  background: rgba(232, 160, 32, 0.15);
  color: var(--accent-light);
  border-left-color: var(--accent);
}

.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-user {
  margin-top: auto;
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-info .user-name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-user .user-info .user-role { font-size: 11px; color: rgba(255,255,255,0.4); }

.sidebar-user .logout-btn {
  margin-left: auto;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  text-decoration: none;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}
.sidebar-user .logout-btn:hover { color: var(--danger); background: rgba(192,57,43,0.1); }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title { font-size: 16px; font-weight: 700; color: var(--primary); }
.topbar-breadcrumb { font-size: 12px; color: var(--text-muted); }
.topbar-breadcrumb a { color: var(--primary-light); text-decoration: none; }
.topbar-breadcrumb span { color: var(--text-light); margin: 0 6px; }

.page-content { padding: 28px; flex: 1; }

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header .card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.card-header .card-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.card-body { padding: 24px; }
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(38, 87, 160, 0.1); color: var(--primary-light); }
.stat-icon.green { background: rgba(26, 140, 91, 0.1); color: var(--success); }
.stat-icon.amber { background: rgba(232, 160, 32, 0.1); color: var(--accent); }
.stat-icon.red { background: rgba(192, 57, 43, 0.1); color: var(--danger); }
.stat-icon.teal { background: rgba(41, 128, 185, 0.1); color: var(--info); }

.stat-info .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-label .optional { color: var(--text-muted); font-weight: 400; font-size: 11px; margin-left: 4px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(38, 87, 160, 0.1);
}

.form-control:disabled, .form-control[readonly] {
  background: #f8f9fc;
  color: var(--text-muted);
}

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7c93' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 5px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* File upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--primary-light);
  background: rgba(38, 87, 160, 0.03);
}

.file-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.file-upload-area .upload-icon { font-size: 28px; margin-bottom: 8px; }
.file-upload-area .upload-text { font-size: 13px; color: var(--text); font-weight: 500; }
.file-upload-area .upload-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.file-upload-area .file-name { font-size: 12px; color: var(--primary-light); margin-top: 8px; font-weight: 500; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-accent { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover { background: var(--accent-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(26,58,92,0.04); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---- BADGES / STATUS ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-menunggu { background: rgba(230, 126, 34, 0.12); color: #c0640d; }
.badge-diproses { background: rgba(41, 128, 185, 0.12); color: #1a6896; }
.badge-disetujui { background: rgba(26, 140, 91, 0.12); color: #1a7a4d; }
.badge-ditolak { background: rgba(192, 57, 43, 0.12); color: #a32a20; }
.badge-aktif { background: rgba(26, 140, 91, 0.12); color: #1a7a4d; }
.badge-lulus { background: rgba(38, 87, 160, 0.12); color: var(--primary-light); }
.badge-cuti { background: rgba(230, 126, 34, 0.12); color: #c0640d; }

/* ---- TABLE ---- */
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
  background: #f5f7fa;
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(26, 58, 92, 0.025); }
tbody td { padding: 13px 16px; font-size: 13.5px; vertical-align: middle; }

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(26,140,91,0.1); border-left: 4px solid var(--success); color: #155a3b; }
.alert-danger { background: rgba(192,57,43,0.1); border-left: 4px solid var(--danger); color: #7a1e18; }
.alert-warning { background: rgba(230,126,34,0.1); border-left: 4px solid var(--warning); color: #7a4312; }
.alert-info { background: rgba(41,128,185,0.1); border-left: 4px solid var(--info); color: #1a4d6e; }

/* ---- SEARCH BOX ---- */
.search-box {
  position: relative;
  max-width: 480px;
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.search-box input {
  padding-left: 42px;
  padding-right: 14px;
}

/* ---- PUBLIC LAYOUT ---- */
.public-wrap {
  min-height: 100vh;
  background: var(--surface);
}

.public-header {
  background: var(--primary-dark);
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.public-header .logo-wrap {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}

.public-header .logo-box {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.public-header .logo-text .logo-name { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.public-header .logo-text .logo-sub { font-size: 10px; color: rgba(255,255,255,0.5); }

.public-header .header-nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.public-header .nav-link { 
  color: rgba(255,255,255,0.75); text-decoration: none; font-size: 13px; font-weight: 500; 
  padding: 7px 14px; border-radius: 8px; transition: var(--transition);
}
.public-header .nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.public-header .nav-link.active { background: var(--accent); color: var(--primary-dark); }

.public-container { max-width: 900px; margin: 0 auto; padding: 36px 24px; }
.public-container-wide { max-width: 1100px; margin: 0 auto; padding: 36px 24px; }

/* Hero section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}

.hero-section .hero-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

/* Steps */
.steps-row { display: flex; gap: 0; counter-reset: step; }
.step-item {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 24px 16px;
}
.step-item::after {
  content: '';
  position: absolute;
  top: 38px;
  right: -1px;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-item:last-child::after { display: none; }

.step-num {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin: 0 auto 12px;
  position: relative;
  z-index: 1;
}

.step-title { font-size: 13px; font-weight: 700; color: var(--text); }
.step-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* Compare table */
.compare-table { width: 100%; }
.compare-table th { background: var(--primary); color: #fff; padding: 12px 16px; font-size: 13px; font-weight: 600; }
.compare-table td { padding: 10px 16px; font-size: 13px; }
.compare-table tr:nth-child(even) td { background: #f9fafc; }
.compare-table .changed { color: var(--primary-light); font-weight: 600; }
.compare-table .old-val { color: var(--text-muted); text-decoration: line-through; }
.compare-table .new-val { color: var(--primary-light); font-weight: 600; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 0; width: 2px; background: var(--border); }

.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--border);
}

.timeline-time { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.timeline-action { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-desc { font-size: 12px; color: var(--text-muted); }

/* Tiket display */
.tiket-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.tiket-box::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
.tiket-box .tiket-label { font-size: 13px; opacity: 0.75; position: relative; }
.tiket-box .tiket-number { font-size: 36px; font-weight: 800; letter-spacing: 3px; position: relative; margin: 8px 0; }
.tiket-box .tiket-sub { font-size: 12px; opacity: 0.6; position: relative; }

/* Status tracker */
.status-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  position: relative;
}
.status-tracker::before {
  content: '';
  position: absolute;
  top: 38px; left: 10%; right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.tracker-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: #eee;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: var(--transition);
}
.tracker-icon.done { background: var(--success); color: #fff; }
.tracker-icon.active { background: var(--primary); color: #fff; animation: pulse 2s infinite; }
.tracker-icon.rejected { background: var(--danger); color: #fff; }
.tracker-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.tracker-label.active { color: var(--primary); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,58,92,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(26,58,92,0); }
}

/* Search results */
.search-results {
  background: #fff;
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  position: absolute;
  width: 100%;
  z-index: 50;
}
.search-results.show { display: block; }
.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(26, 58, 92, 0.04); }
.result-nim { font-size: 11px; color: var(--text-muted); }
.result-nama { font-size: 13.5px; font-weight: 600; color: var(--text); }
.result-prodi { font-size: 11.5px; color: var(--primary-light); }

/* Mahasiswa card */
.mhs-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.mhs-avatar {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.mhs-info .mhs-nama { font-size: 18px; font-weight: 700; color: var(--primary); }
.mhs-info .mhs-nim { font-size: 13px; color: var(--text-muted); }
.mhs-info .mhs-prodi { font-size: 13px; color: var(--primary-light); font-weight: 500; margin-top: 2px; }

/* Jenis perubahan cards */
.jenis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.jenis-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}
.jenis-card:hover { border-color: var(--primary-light); background: rgba(38,87,160,0.03); }
.jenis-card.selected { border-color: var(--primary); background: rgba(26,58,92,0.05); }
.jenis-card .jenis-icon { font-size: 32px; margin-bottom: 12px; }
.jenis-card .jenis-title { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.jenis-card .jenis-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.jenis-card .jenis-items { margin-top: 10px; }
.jenis-card .jenis-item { font-size: 12px; color: var(--text-muted); padding: 2px 0; display: flex; align-items: center; gap: 6px; }
.jenis-card .jenis-item::before { content: '•'; color: var(--primary-light); }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Print */
@media print {
  .sidebar, .topbar, .btn, .filter-bar { display: none !important; }
  .main-content { margin-left: 0 !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Responsive — see additions below */


/* =====================================================
   BOTTOM NAV — PUBLIC (Mobile)
   ===================================================== */
.public-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.public-bottom-nav .pbn-inner {
  display: flex;
  height: 100%;
}
.public-bottom-nav .pbn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--transition);
  border-top: 2.5px solid transparent;
  padding-bottom: 4px;
}
.public-bottom-nav .pbn-item .pbn-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.18s;
}
.public-bottom-nav .pbn-item:hover,
.public-bottom-nav .pbn-item.active {
  color: #fff;
  border-top-color: var(--accent);
  background: rgba(255,255,255,0.05);
}
.public-bottom-nav .pbn-item.active .pbn-icon {
  transform: scale(1.12);
}
.public-bottom-nav .pbn-item.pbn-cta {
  color: var(--accent-light);
}
.public-bottom-nav .pbn-item.pbn-cta.active,
.public-bottom-nav .pbn-item.pbn-cta:hover {
  border-top-color: var(--accent-light);
  color: #fff;
}
/* Add bottom padding so content doesn't hide behind bottom nav */
.has-bottom-nav .public-wrap {
  padding-bottom: 64px;
}
.has-bottom-nav footer {
  margin-bottom: 0 !important;
}

/* =====================================================
   ADMIN — MOBILE SIDEBAR (Hamburger + Drawer)
   ===================================================== */
.admin-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.admin-hamburger:hover { background: rgba(26,58,92,0.07); }
.admin-hamburger .hb-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}
.admin-hamburger.open .hb-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.admin-hamburger.open .hb-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.admin-hamburger.open .hb-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sidebar overlay for mobile */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 299;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  visibility: hidden;
}
.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Admin mobile bottom nav */
.admin-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.admin-bottom-nav .abn-inner {
  display: flex;
  height: 100%;
}
.admin-bottom-nav .abn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: rgba(255,255,255,0.5);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-top: 2px solid transparent;
  transition: var(--transition);
  padding-bottom: 2px;
}
.admin-bottom-nav .abn-item .abn-icon { font-size: 19px; line-height: 1; }
.admin-bottom-nav .abn-item:hover,
.admin-bottom-nav .abn-item.active {
  color: #fff;
  border-top-color: var(--accent);
  background: rgba(255,255,255,0.06);
}
.admin-bottom-nav .abn-item.abn-menu {
  color: rgba(255,255,255,0.6);
}
.admin-bottom-nav .abn-item.abn-menu:hover { color: #fff; border-top-color: var(--accent-light); }

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */
@media (max-width: 768px) {
  /* Public: hide top nav links, show bottom nav */
  .public-header .header-nav { display: none; }
  .public-bottom-nav { display: block; }
  .public-wrap { padding-bottom: 64px; }
  .public-header { height: 58px; padding: 0 16px; }
  .public-container { padding: 16px 14px; }
  .public-container-wide { padding: 16px 14px; }

  /* Admin: show hamburger, hide sidebar by default, show bottom nav */
  .admin-hamburger { display: inline-flex; }
  .admin-bottom-nav { display: block; }
  .main-content { padding-bottom: 60px; }
  .page-content { padding: 16px 14px 80px; }
  .topbar { padding: 0 14px; height: 54px; }
  .topbar-title { font-size: 14px; }

  .layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 4px 0 32px rgba(0,0,0,0.25);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay { display: block; }
  .main-content { margin-left: 0 !important; width: 100%; }

  /* Stack grids on mobile */
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .jenis-grid { grid-template-columns: 1fr; }
  .steps-row { flex-direction: column; }

  /* Detail ajuan grid on mobile */
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns: 1fr 340px"] {
    display: block !important;
  }
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .public-header .logo-text .logo-sub { display: none; }
  [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
/* ── Safe area for notch/home-indicator phones ─── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .public-bottom-nav,
  .admin-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(64px + env(safe-area-inset-bottom));
  }
  .admin-bottom-nav { height: calc(60px + env(safe-area-inset-bottom)); }
  @media (max-width: 768px) {
    .public-wrap  { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .main-content { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  }
}

/* ── Sidebar scroll on mobile ─────────────────── */
@media (max-width: 768px) {
  .sidebar { overflow-y: auto; overscroll-behavior: contain; }
  .sidebar-brand { position: sticky; top: 0; z-index: 1;
    background: var(--primary-dark); border-bottom: 1px solid rgba(255,255,255,0.06); }
  .sidebar-user { position: sticky; bottom: 0; z-index: 1;
    background: rgba(15,35,56,0.95); backdrop-filter: blur(8px); }
}

/* ── Topbar: hamburger alignment ─────────────── */
.topbar { gap: 10px; }
.admin-hamburger + div { flex: 1; min-width: 0; }
.admin-hamburger + div .topbar-title { 
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}

