/* ============================================
   TURT 803 - Facility Management System
   KPP Pratama Palopo
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary: #FEC931;
  --primary-dark: #e0b02a;
  --primary-light: #fff3cd;
  --dark: #0a0a0a;
  --dark-lighter: #1a1a1a;
  --dark-surface: #222222;
  --brand: #0d3472;
  --brand-dark: #092a5c;
  --brand-darker: #061e46;
  --bg-body: #f5f3ef;
  --bg-card: #ffffff;
  --text-primary: #212121;
  --text-secondary: #6a6a6a;
  --text-light: #999999;
  --text-white: #f0f0f0;
  --border: #e0e0e0;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(254,201,49,0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-width: 260px;
  --navbar-height: 64px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --status-pending: #f59e0b;
  --status-approved: #22c55e;
  --status-rejected: #ef4444;
  --status-active: #3b82f6;
  --status-dipinjam: #8b5cf6;
  --status-dikembalikan: #06b6d4;
  --status-dilaporkan: #f97316;
  --status-diproses: #3b82f6;
  --status-selesai: #22c55e;
  --text-muted: #6b7280;
  --surface: #ffffff;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

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

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

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* ---------- Layout ---------- */
.app-wrapper {
  display: flex;
  flex: 1 0 auto;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding-top: var(--navbar-height);
  transition: var(--transition);
}

.content-area {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeInUp 0.4s ease-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--navbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
  transition: var(--transition);
}

.navbar-title {
  font-family: 'Roboto', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.navbar-user .user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.navbar-user .user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

.hamburger .material-icons-outlined { font-size: 28px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--text-white);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1100;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.sidebar-logo .logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dark);
}

.sidebar-logo .logo-text {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 1px;
}

.sidebar-logo .logo-sub {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--primary);
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

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

.nav-section-title {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left-color: var(--primary);
}

.nav-link .material-icons-outlined {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link .nav-text { flex: 1; }

.nav-link .nav-chevron {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.nav-link .nav-chevron.rotated { transform: rotate(90deg); }

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: rgba(0,0,0,0.2);
}

.submenu.open { max-height: 300px; }

.submenu .nav-link {
  padding-left: 3.5rem;
  font-size: 0.82rem;
  border-left: none;
}

.submenu .nav-link.active {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Badge counter on sidebar links (e.g. Approval Center pending count) */
.nav-link .nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin-left: auto;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sidebar-footer .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sidebar-footer .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.sidebar-footer .user-role {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: capitalize;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem;
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(239,68,68,0.25);
  color: #fca5a5;
}

/* ---------- Overlay (mobile) ---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

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

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

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

.card-header h2, .card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Dashboard Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-card:hover .stat-icon {
  box-shadow: var(--shadow-glow);
  transform: scale(1.08);
}

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

.stat-icon .material-icons-outlined { font-size: 26px; }

.stat-icon.yellow { background: rgba(254,201,49,0.15); color: #d4a017; }
.stat-icon.red { background: rgba(239,68,68,0.12); color: #dc2626; }
.stat-icon.blue { background: rgba(59,130,246,0.12); color: #2563eb; }
.stat-icon.green { background: rgba(34,197,94,0.12); color: #16a34a; }
.stat-icon.purple { background: rgba(139,92,246,0.12); color: #7c3aed; }
.stat-icon.orange { background: rgba(249,115,22,0.12); color: #ea580c; }
.stat-icon.cyan { background: rgba(6,182,212,0.12); color: #0891b2; }
.stat-icon.pink { background: rgba(236,72,153,0.12); color: #db2777; }

.stat-info h3 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  color: white;
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.hero h1 span { color: var(--primary); }

.hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  letter-spacing: 2px;
  font-weight: 500;
}

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-header h1 .material-icons-outlined {
  color: var(--primary);
  font-size: 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn .material-icons-outlined { font-size: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--dark);
  border-color: var(--primary);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: var(--dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

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

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

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 12px rgba(239,68,68,0.3);
}

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

.btn-success:hover {
  background: #16a34a;
}

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

.btn-info:hover {
  background: #2563eb;
  box-shadow: 0 0 12px rgba(59,130,246,0.3);
}

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

.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 0 12px rgba(245,158,11,0.3);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-sm .material-icons-outlined { font-size: 16px; }

.btn-icon {
  padding: 0.45rem;
  border-radius: 50%;
  width: 34px;
  height: 34px;
}

/* ---------- Tables ---------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

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

thead {
  background: var(--bg-body);
}

thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover {
  background: rgba(254,201,49,0.04);
}

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

.table-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

/* ---------- Badges / Status Pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-pending { background: rgba(245,158,11,0.12); color: #b45309; }
.badge-approved, .badge-selesai { background: rgba(34,197,94,0.12); color: #15803d; }
.badge-rejected, .badge-ditolak { background: rgba(239,68,68,0.12); color: #b91c1c; }
.badge-active, .badge-aktif { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge-dipinjam { background: rgba(139,92,246,0.12); color: #6d28d9; }
.badge-dikembalikan { background: rgba(6,182,212,0.12); color: #0e7490; }
.badge-dilaporkan { background: rgba(249,115,22,0.12); color: #c2410c; }
.badge-diproses { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge-nonaktif { background: rgba(107,114,128,0.12); color: #4b5563; }

.badge-rendah { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge-sedang { background: rgba(245,158,11,0.12); color: #b45309; }
.badge-tinggi { background: rgba(239,68,68,0.12); color: #b91c1c; }

.badge-baik { background: rgba(34,197,94,0.12); color: #15803d; }
.badge-cukup { background: rgba(245,158,11,0.12); color: #b45309; }
.badge-kurang { background: rgba(239,68,68,0.12); color: #b91c1c; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 700px;
}

.form-card .card-body { padding: 2rem; }

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(254,201,49,0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236a6a6a'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 24px;
  padding-right: 2.5rem;
}

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

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

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ---------- Flash Messages ---------- */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeInUp 0.3s ease-out;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert .material-icons-outlined { font-size: 22px; flex-shrink: 0; }

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: inherit;
}

.alert-close:hover { opacity: 1; }

.alert-success { background: rgba(34,197,94,0.1); color: #15803d; border-color: rgba(34,197,94,0.2); }
.alert-error { background: rgba(239,68,68,0.1); color: #b91c1c; border-color: rgba(239,68,68,0.2); }
.alert-warning { background: rgba(245,158,11,0.1); color: #92400e; border-color: rgba(245,158,11,0.2); }
.alert-info { background: rgba(59,130,246,0.1); color: #1e40af; border-color: rgba(59,130,246,0.2); }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-state .material-icons-outlined {
  font-size: 56px;
  color: var(--border);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

/* ---------- Filter Tabs ---------- */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.filter-tab.active {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
}

/* ---------- Approval Center ---------- */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
}
.section-toolbar h2 {
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-toolbar h2 .material-icons-outlined.warning { color: var(--warning); }
.section-toolbar > form { margin: 0; }

.section-subhead {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.module-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.module-card {
  flex: 1 1 160px;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.module-card-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.module-card-icon .material-icons-outlined { font-size: 26px; }
.module-card-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.3rem;
}
.module-card-counts {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
  font-size: 0.8rem;
}

.filter-form {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.filter-form .filter-icon { color: var(--text-secondary); }
.filter-form .filter-input,
.filter-form .filter-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}
.filter-form .filter-input { flex: 1 1 220px; }
.filter-form .filter-select { min-width: 180px; cursor: pointer; }
.filter-form .filter-count {
  font-size: 0.85rem;
  margin-left: auto;
  color: var(--text-secondary);
}

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

.module-icon {
  vertical-align: middle;
  color: var(--primary);
}

.row-meta-block {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.inline-form { margin: 0; }

/* Read-only finality badge */
.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  color: var(--text-secondary);
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ---------- Vehicle Assignment Modal ---------- */
.vehicle-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.vehicle-modal-overlay.active {
  display: flex;
}

.vehicle-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.vehicle-modal h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.vehicle-modal h3 .material-icons-outlined {
  color: var(--primary);
}

.vehicle-modal .modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Detail modal content */
.detail-modal-content dl.detail-data {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
}
.detail-data dt {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.detail-data dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-word;
}

/* ---------- Enhanced Detail Modal ---------- */
.detail-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.detail-foto-wrap {
  flex-shrink: 0;
}
.detail-foto {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}
.detail-foto:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}
.detail-header-info {
  flex: 1;
  min-width: 0;
}
.detail-nopol {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}
.detail-section {
  margin-bottom: 0.85rem;
}
.detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #dc3545;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed var(--border);
}
.detail-section-title .material-icons-outlined {
  font-size: 1rem;
}
.detail-section-muted {
  opacity: 0.7;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.detail-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-word;
}
.detail-empty {
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 480px) {
  .detail-header { flex-direction: column; align-items: center; text-align: center; }
  .detail-foto { width: 100%; max-width: 200px; height: auto; aspect-ratio: 4/3; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-nopol { margin-top: 0.5rem; }
  .bkdo-toolbar { flex-direction: column; }
  .bkdo-filter-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* ---------- Booking KDO Toolbar ---------- */
.bkdo-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.bkdo-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.bkdo-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}
.bkdo-search .form-control {
  padding-left: 2.5rem;
  padding-right: 2.2rem;
  height: 40px;
}
.bkdo-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition);
}
.bkdo-search-clear:hover {
  background: rgba(0,0,0,0.08);
  color: var(--text-primary);
}
.bkdo-search-clear .material-icons-outlined {
  font-size: 1.1rem;
}
.bkdo-filter-tabs {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}
.bkdo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.bkdo-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb, 59,130,246), 0.05);
}
.bkdo-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.bkdo-tab.active .bkdo-tab-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.bkdo-tab-count {
  font-size: 0.7rem;
  background: var(--bg-body);
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-weight: 600;
}
.bkdo-result-info {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(var(--primary-rgb, 59,130,246), 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* ---------- Pagination ---------- */
.bkdo-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.bkdo-page-info {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.bkdo-page-btns {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.bkdo-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.bkdo-page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}
.bkdo-page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.bkdo-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bkdo-page-btn .material-icons-outlined {
  font-size: 1.1rem;
}
.bkdo-page-dots {
  padding: 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(244, 199, 54, 0.2);
}

.action-form {
  display: flex;
  gap: 0.25rem;
}

.action-form-wrap {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.page-header-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #050d1a 0%, var(--brand-darker) 40%, var(--brand) 100%);
  position: relative;
  overflow: hidden;
  padding: 0.5rem;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  border-radius: 50%;
  animation: pulse 6s ease-in-out infinite;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
  border-radius: 50%;
}

.login-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  margin: 1rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 16px 64px rgba(0,0,30,0.5);
}

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

.login-card .login-logo .logo-badge {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,30,100,0.3);
}

.login-card .login-logo h1 {
  color: white;
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin-bottom: 0.25rem;
}

.login-card .login-logo p {
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 3px;
  font-weight: 600;
}

.login-card .form-group label {
  color: rgba(255,255,255,0.7);
}

.login-card .form-control {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: white;
}

.login-card .form-control::placeholder { color: rgba(255,255,255,0.35); }

.login-card .form-control:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
}

.login-card .btn-primary {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.login-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-align: center;
}

.login-error--warning {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.3);
  color: #fcd34d;
}

.login-hint {
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Login Container (two-column, 9:4) ---------- */
.login-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 2rem);
  gap: 1.5rem;
  align-items: stretch;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.login-chatbot {
  flex: 9;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.login-chatbot-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
}

.login-chatbot-header .material-icons-outlined {
  font-size: 18px;
  color: var(--primary);
}

.login-chatbot-body {
  flex: 1;
  min-height: 0;
  position: relative;
}

.login-chatbot-body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.login-card {
  flex: 4;
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .login-page {
    align-items: flex-start;
    padding: 0.75rem;
  }
  .login-container {
    flex-direction: column;
    padding: 0.75rem;
    gap: 1rem;
    max-height: none;
  }
  .login-chatbot {
    flex: none;
    height: 50vh;
    min-height: 320px;
  }
  .login-card {
    flex: none;
  }
}

/* ---------- Footer ---------- */
.app-footer {
  margin-left: var(--sidebar-width);
  text-align: center;
  padding: 1.5rem 2rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .navbar {
    left: 0;
  }

  .app-footer {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .content-area {
    padding: 1.25rem;
  }

  .hero {
    padding: 2rem 1.5rem;
  }

  .hero h1 { font-size: 1.5rem; }

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

  .stat-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }

  .stat-info h3 { font-size: 1.35rem; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.3rem; }
  .login-card { padding: 1.75rem; }
}

/* Responsive table → card view (mobile only, ≤768px) */
@media (max-width: 768px) {
  table.responsive-table {
    border: 0;
  }
  table.responsive-table thead {
    display: none;
  }
  table.responsive-table tbody,
  table.responsive-table tbody tr {
    display: block;
    width: 100%;
  }
  table.responsive-table tbody tr {
    margin-bottom: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
  }
  table.responsive-table tbody tr:last-child {
    margin-bottom: 0;
  }
  table.responsive-table tbody tr:hover {
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transform: none;
  }
  table.responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    text-align: right;
  }
  table.responsive-table tbody td:last-child {
    border-bottom: 0;
    padding-top: 0.75rem;
  }
  table.responsive-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 40%;
    max-width: 40%;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
  }
  table.responsive-table tbody td .table-actions {
    width: 100%;
    justify-content: flex-end;
  }
  table.responsive-table tbody td.row-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  table.responsive-table tbody td.row-actions form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
  }
  table.responsive-table tbody td.row-actions .btn {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
  }
  table.responsive-table tbody td.row-actions .btn .material-icons-outlined {
    font-size: 20px;
  }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ==================================================
   Evaluasi KDO — Custom Styles
   ================================================== */

/* Evaluation Cards (sectioned form/summary) */
.eval-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.eval-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--border);
}

.eval-card-title .material-icons-outlined {
  color: var(--primary);
  font-size: 22px;
}

/* Info Grid */
.eval-info-grid {
  display: grid;
  gap: 0;
}

.eval-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.eval-info-row:last-child { border-bottom: none; }

.eval-info-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.eval-info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

/* Form Row (two columns inside eval cards) */
.eval-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.eval-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

/* Star Ratings */
.rating-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.rating-label {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 160px;
  color: var(--text-primary);
}

.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 2px;
}

.star-rating input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.star-rating label {
  cursor: pointer;
  font-size: 26px;
  color: #d1d5db;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #facc15;
}

.star-rating label:hover {
  transform: scale(1.15);
}

.rating-level {
  font-size: 0.82rem;
  color: #9ca3af;
  font-weight: 600;
  min-width: 80px;
}

/* BBM Visual Bar */
.bbm-display {
  padding: 0.5rem 0;
}

.bbm-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bbm-bar {
  flex: 1;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.bbm-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.6s ease;
  border-radius: 12px;
  position: relative;
}

.bbm-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  border-radius: 12px;
}

.bbm-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.bbm-percent {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 40px;
  text-align: right;
}

.bbm-details {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.bbm-estimate strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Review Text */
.review-text {
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* Photo Upload Grid */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.photo-slot {
  background: var(--bg-body);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
  transition: var(--transition);
}

.photo-slot:hover {
  border-color: var(--primary);
  background: rgba(254, 201, 49, 0.04);
}

.photo-slot-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.photo-slot-preview {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.photo-slot-input input[type="file"] {
  width: 100%;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.photo-slot-input input[type="file"]::file-selector-button {
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.75rem;
  cursor: pointer;
  margin-right: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
}

.photo-slot-input input[type="file"]::file-selector-button:hover {
  background: var(--primary);
  border-color: var(--primary-dark);
}

/* Photo Gallery (show view) */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-body);
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Ratings Panel (show view) */
.ratings-panel {
  padding: 0.5rem 0;
}

.rating-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--border);
}

.rating-item:last-child { border-bottom: none; }

.rating-item-avg {
  background: rgba(254, 201, 49, 0.06);
  margin: 0.5rem -1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-bottom: none;
}

.rating-item-label {
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 140px;
  color: var(--text-primary);
}

.rating-item-stars {
  display: inline-flex;
  gap: 2px;
}

.rating-star {
  font-size: 22px;
  color: #d1d5db;
  transition: color 0.2s;
}

.rating-star.rated { color: #facc15; }

.rating-item-level {
  font-size: 0.82rem;
  font-weight: 700;
}

/* Kondisi Badge */
.kondisi-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Badge helpers */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-badge-primary { background: var(--primary); color: var(--dark); }

.badge-info {
  background: rgba(59,130,246,0.12);
  color: #1d4ed8;
}

.badge-success {
  background: rgba(34,197,94,0.12);
  color: #15803d;
}

.badge-warning {
  background: rgba(245,158,11,0.12);
  color: #92400e;
}

.badge-danger {
  background: rgba(239,68,68,0.12);
  color: #b91c1c;
}

.badge-secondary {
  background: rgba(107,114,128,0.12);
  color: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
  .eval-form-row {
    grid-template-columns: 1fr;
  }

  /* Reduce card padding on smaller screens */
  .eval-card {
    padding: 1rem;
  }
  .eval-card-gallery {
    padding: 1rem;
  }

  .photo-upload-grid,
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Make gallery images fill card on narrow screens */
  .gallery-item img {
    height: 120px;
  }

  .rating-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .rating-label {
    min-width: auto;
  }

  .eval-info-row {
    flex-direction: column;
    gap: 0.15rem;
  }

  .eval-info-value {
    text-align: left;
  }

}

@media (max-width: 480px) {
  .eval-card,
  .eval-card-gallery {
    padding: 0.75rem;
  }

  .photo-upload-grid,
  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 100px;
  }

  .page-header h1 {
    font-size: 1.1rem;
  }

  .eval-card-title {
    font-size: 0.95rem;
  }
}

/* ======================================================
   DASHBOARD KDO
   ====================================================== */

/* Filter Bar */
.dkdo-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dkdo-filter-presets {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.dkdo-preset {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-body);
  transition: var(--transition);
  white-space: nowrap;
}
.dkdo-preset:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.dkdo-preset.active {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}
.dkdo-custom-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.dkdo-custom-date label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.dkdo-range-info {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* KPI Grid */
.dkdo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.dkdo-kpi {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}
.dkdo-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.dkdo-kpi-blue   { border-left-color: #3b82f6; }
.dkdo-kpi-green  { border-left-color: #10b981; }
.dkdo-kpi-yellow { border-left-color: #f59e0b; }
.dkdo-kpi-cyan   { border-left-color: #06b6d4; }
.dkdo-kpi-red    { border-left-color: #ef4444; }
.dkdo-kpi-orange { border-left-color: #f97316; }
.dkdo-kpi-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}
.dkdo-kpi-blue .dkdo-kpi-icon   { background: rgba(59,130,246,0.1); color: #3b82f6; }
.dkdo-kpi-green .dkdo-kpi-icon  { background: rgba(16,185,129,0.1); color: #10b981; }
.dkdo-kpi-yellow .dkdo-kpi-icon { background: rgba(245,158,11,0.1); color: #f59e0b; }
.dkdo-kpi-cyan .dkdo-kpi-icon   { background: rgba(6,182,212,0.1); color: #06b6d4; }
.dkdo-kpi-red .dkdo-kpi-icon    { background: rgba(239,68,68,0.1); color: #ef4444; }
.dkdo-kpi-orange .dkdo-kpi-icon { background: rgba(249,115,22,0.1); color: #f97316; }
.dkdo-kpi-icon .material-icons-outlined { font-size: 1.3rem; }
.dkdo-kpi-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.dkdo-kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Cards */
.dkdo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.dkdo-card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #dc3545;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
}
.dkdo-card-title .material-icons-outlined { font-size: 1.1rem; }

/* Charts Row */
.dkdo-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .dkdo-charts-row { grid-template-columns: 1fr; }
  .dkdo-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dkdo-filter-bar { flex-direction: column; align-items: stretch; }
  .dkdo-range-info { margin-left: 0; margin-top: 0.3rem; }
}
@media (max-width: 480px) {
  .dkdo-kpi-grid { grid-template-columns: 1fr; }
}

/* Bar Chart */
.dkdo-status-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dkdo-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dkdo-bar-label {
  width: 100px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
}
.dkdo-bar-track {
  flex: 1;
  height: 20px;
  background: var(--bg-body);
  border-radius: 4px;
  overflow: hidden;
}
.dkdo-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 2px;
}
.dkdo-bar-val {
  width: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* Top Vehicles */
.dkdo-top-vehicles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dkdo-vehicle-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.dkdo-vehicle-row:last-child { border-bottom: none; }
.dkdo-vehicle-rank {
  font-size: 0.85rem;
  font-weight: 700;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.dkdo-vehicle-thumb {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.dkdo-vehicle-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  color: var(--text-muted);
}
.dkdo-vehicle-thumb-empty .material-icons-outlined { font-size: 1rem; }
.dkdo-vehicle-info {
  flex: 1;
  min-width: 0;
}
.dkdo-vehicle-info strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.dkdo-vehicle-info small {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.dkdo-vehicle-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #dc3545;
  flex-shrink: 0;
}

/* Calendar */
.dkdo-calendar-card {
  overflow: hidden;
}
.dkdo-cal-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.dkdo-cal-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.dkdo-cal-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dkdo-cal-btn .material-icons-outlined { font-size: 1rem; }
.dkdo-cal-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 0.3rem;
}
.dkdo-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dkdo-cal-header {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.3rem 0;
}
.dkdo-cal-day {
  min-height: 48px;
  padding: 0.2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
}
.dkdo-cal-day:hover:not(.dkdo-cal-empty) {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb,59,130,246), 0.04);
}
.dkdo-cal-empty { opacity: 0; }
.dkdo-cal-today {
  background: rgba(220,53,69,0.08);
  border: 1px solid #dc3545;
}
.dkdo-cal-has-event { background: rgba(var(--primary-rgb,59,130,246), 0.03); }
.dkdo-cal-num {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.dkdo-cal-today .dkdo-cal-num {
  color: #dc3545;
  font-weight: 700;
}
.dkdo-cal-dots {
  display: flex;
  gap: 2px;
  margin-top: 1px;
}
.dkdo-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.dkdo-cal-dot-more {
  font-size: 0.55rem;
  color: var(--text-muted);
}
.dkdo-cal-thumb {
  width: 100%;
  height: 22px;
  object-fit: cover;
  border-radius: 2px;
  margin-top: 2px;
  display: block;
}
.dkdo-cal-legend {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border);
}
.dkdo-cal-legend span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Booking Lists */
.dkdo-booking-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dkdo-booking-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.dkdo-booking-row:last-child { border-bottom: none; }
.dkdo-booking-thumb {
  width: 42px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.dkdo-booking-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  color: var(--text-muted);
}
.dkdo-booking-thumb-empty .material-icons-outlined { font-size: 1rem; }
.dkdo-booking-info {
  flex: 1;
  min-width: 0;
}
.dkdo-booking-info strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.dkdo-booking-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.dkdo-booking-status {
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Unit table */
.dkdo-unit-table {
  overflow-x: auto;
}

/* Section Title */
.dkdo-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #dc3545;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dc3545;
  margin-bottom: 0.75rem;
}
.dkdo-section-title .material-icons-outlined {
  font-size: 1.2rem;
}

/* Review List */
.dkdo-review-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dkdo-review-card {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-body);
  transition: var(--transition);
}
.dkdo-review-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
}
.dkdo-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.dkdo-review-vehicle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dkdo-review-vehicle strong {
  font-size: 0.82rem;
  display: block;
}
.dkdo-review-vehicle small {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.dkdo-review-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.dkdo-review-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  padding: 0.3rem 0;
  border-left: 3px solid var(--border);
  padding-left: 0.6rem;
  margin: 0.3rem 0;
}
.dkdo-review-footer {
  margin-top: 0.3rem;
}
.dkdo-review-footer small {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.dkdo-review-photos {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}
.dkdo-review-photo {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}
.dkdo-review-photo:hover {
  transform: scale(1.1);
  border-color: var(--primary);
}
.dkdo-review-photo-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 45px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
