/* style.css: Sistem Presensi Mahasiswa (Neo-Brutalist design tokens and layout) */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* Design tokens */
:root {
  --bg-main:         #ffffff;
  --bg-card:         #ffffff;
  --bg-alt:          #f4f4f5;
  --bg-hover:        #e4e4e7;
  
  --text-main:       #000000;
  --text-secondary:  #3f3f46;
  --text-muted:      #52525b;
  
  --border-color:    #000000;
  --border-thin:     1px solid #000000;
  --border-thick:    2px solid #000000;
  --border-hero:     3px solid #000000;
  
  --shadow-sm:       2px 2px 0px #000000;
  --shadow-md:       4px 4px 0px #000000;
  --shadow-lg:       6px 6px 0px #000000;
  --shadow-modal:    8px 8px 0px #000000;
  
  /* Neo-brutalist accents */
  --color-yellow:          #ffe600;
  --color-yellow-hover:    #ffd600;
  --color-yellow-light:    #fffde0;
  
  --color-red:             #dc2626;
  --color-red-hover:       #b91c1c;
  --color-red-light:       #fee2e2;

  --color-danger:          #dc2626;
  --color-warning:         #ffe600;
  --color-success:         #16a34a;
  --color-info:            #2563eb;
  
  --font-sans:       'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:       'JetBrains Mono', 'Courier New', monospace;
  
  --transition-fast: all 0.12s cubic-bezier(0, 0, 0.2, 1);
}

/* Reset and global base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0px !important;
}

/* Keyboard accessibility focus indicator (WCAG AA / R-32) */
:focus-visible {
  outline: 3px solid #000000 !important;
  outline-offset: 2px !important;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Wireframe design identity: minimal blueprint grid (desain.md / R-07 purpose-gate) */
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* --- Scrollbar Kaku --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
  border-left: 2px solid #000000;
}
::-webkit-scrollbar-thumb {
  background: #000000;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* ============================================================
   LAYOUT ARCHITECTURE
   ============================================================ */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 270px;
  background: var(--bg-main);
  border-right: 3px solid #000000;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  user-select: none;
}

.sidebar-logo {
  padding: 20px 18px 18px;
  border-bottom: 3px solid #000000;
  background: var(--bg-main);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: none;
  transition: transform 0.2s ease;
}

.sidebar-logo-img:hover {
  transform: scale(1.05);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--color-yellow);
  color: #000000;
  border: 1.5px solid #000000;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  box-shadow: 1.5px 1.5px 0px #000000;
  margin-bottom: 4px;
}

.sidebar-logo h1,
.sidebar-logo .sidebar-brand-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.sidebar-logo .logo-box {
  height: 32px;
  background: var(--color-yellow);
  color: #000000;
  border: 2px solid #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.sidebar-logo .version {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-weight: 600;
  display: block;
  background: var(--bg-alt);
  border: 1px solid #000000;
  padding: 3px 8px;
  box-shadow: 1px 1px 0px #000000;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-label {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-fast);
}

.nav-item:hover {
  background: var(--bg-alt);
  border-color: #000000;
  box-shadow: var(--shadow-sm);
  transform: translate(-1px, -1px);
}

.nav-item.active {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  box-shadow: var(--shadow-sm);
}

.nav-item .nav-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.nav-item.active .nav-indicator {
  color: var(--color-yellow);
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--color-red);
  color: #ffffff;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 6px;
  border: 1px solid #000000;
  min-width: 20px;
  text-align: center;
  box-shadow: 1px 1px 0px #000000;
}

.nav-item.active .nav-badge {
  border-color: #ffffff;
}

/* Sidebar Footer (ESP Status & Admin Box) */
.sidebar-footer {
  padding: 16px;
  border-top: 3px solid #000000;
  background: var(--bg-alt);
}

.admin-profile-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-main);
  border: 2px solid #000000;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.admin-avatar {
  width: 28px;
  height: 28px;
  background: var(--color-yellow);
  color: #000000;
  border: 1px solid #000000;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-details {
  flex: 1;
  overflow: hidden;
  line-height: 1.2;
}

.admin-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-role {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-weight: 600;
}

.audio-toggle-btn {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
}

.esp-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-main);
  border: 2px solid #000000;
  box-shadow: var(--shadow-sm);
}

.esp-dot {
  width: 10px;
  height: 10px;
  background: #71717a;
  border: 1px solid #000000;
  flex-shrink: 0;
}

.esp-dot.online {
  background: var(--color-success);
}

.esp-dot.offline {
  background: var(--color-red);
}

.esp-info {
  flex: 1;
  overflow: hidden;
}

.esp-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.esp-status-text {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
  flex: 1;
  margin-left: 270px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* --- Top Bar --- */
.top-bar {
  background: var(--bg-main);
  border-bottom: 3px solid #000000;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.datetime-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-main);
  border: 2px solid #000000;
  padding: 6px 14px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
}

.datetime-display .date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.datetime-display .time {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  background: var(--bg-alt);
  border-left: 2px solid #000000;
  padding-left: 10px;
}

/* ============================================================
   PANELS & CONTAINERS
   ============================================================ */

.panel {
  display: none;
  padding: 28px 32px;
  flex: 1;
}

.panel.active {
  display: block;
  animation: panelFade 0.15s ease-out;
}

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

/* --- Wireframe Card Box --- */
.card {
  background: var(--bg-card);
  border: 2px solid #000000;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  position: relative;
}

.card-header {
  padding: 16px 20px;
  background: var(--bg-main);
  border-bottom: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Live Feed Box --- */
.live-feed {
  background: var(--bg-main);
  border: 2px solid #000000;
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.live-feed-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-yellow);
  color: #000000;
  border: 1px solid #000000;
  padding: 4px 10px;
  box-shadow: 1px 1px 0px #000000;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border: 1px solid #000000;
}

.latest-tap {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.latest-tap .tap-name {
  background: #000000;
  color: var(--color-yellow);
  padding: 2px 8px;
  margin-right: 6px;
  font-weight: 800;
  border: 1px solid #000000;
}

.latest-tap .tap-time {
  color: var(--text-secondary);
}

/* ============================================================
   STATS GRID (WIREFRAME TILES)
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-main);
  border: 2px solid #000000;
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: var(--transition-fast);
  position: relative;
}

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

/* Modifier Aksen Stat Card */
.stat-card-danger {
  border-top: 5px solid var(--color-red);
}

.stat-card-danger .stat-value {
  color: var(--color-red);
}

.stat-card-danger .stat-label {
  color: var(--color-red);
  font-weight: 800;
}

.stat-card-warning {
  border-top: 5px solid var(--color-yellow);
}

.stat-card-warning .stat-label {
  color: #000000;
  font-weight: 800;
}

.stat-card-success {
  border-top: 5px solid var(--color-success);
}

.stat-card-primary {
  border-top: 5px solid #000000;
}

.stat-info {
  width: 100%;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
}

/* Attendance Progress Bar (Neo-Brutalist Hazard Stripes) */
.attendance-bar {
  height: 22px;
  background: var(--bg-alt);
  border: 2px solid #000000;
  margin-top: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 1px 1px 0px rgba(0,0,0,0.1);
}

.attendance-bar-fill {
  height: 100%;
  background-color: var(--color-yellow);
  transition: width 0.4s ease;
  border-right: 2px solid #000000;
  /* Striping Neo-Brutalist Kuning-Hitam */
  background-image: repeating-linear-gradient(
    -45deg,
    var(--color-yellow),
    var(--color-yellow) 10px,
    #000000 10px,
    #000000 18px
  );
}

/* ============================================================
   DATA TABLES (WIREFRAME GRID)
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

thead {
  background: #000000;
  color: #ffffff;
}

th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-right: 1px solid #3f3f46;
  white-space: nowrap;
}

th:last-child {
  border-right: none;
}

tbody tr {
  border-bottom: 2px solid #000000;
  background: var(--bg-main);
  transition: var(--transition-fast);
}

tbody tr:hover {
  background: var(--bg-alt);
}

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

td {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  border-right: 1px solid #e4e4e7;
  vertical-align: middle;
}

td:last-child {
  border-right: none;
}

.td-uid {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  background: var(--bg-alt);
  border: 1px solid #000000;
  padding: 2px 8px;
  display: inline-block;
  letter-spacing: 0.05em;
}

.td-name {
  font-weight: 700;
}

/* Empty State */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-text {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.empty-sub {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ============================================================
   BUTTONS & ACTIONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 2px solid #000000;
  transition: var(--transition-fast);
  user-select: none;
  text-decoration: none;
  background: var(--bg-main);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Hover: Geser sedikit ke bayangan */
.btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

/* Active / Pressed: Efek klik mekanis */
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px #000000;
}

/* Primary Button (Hitam Solid) */
.btn-primary {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-yellow);
  color: #000000;
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-sm);
}

.btn-primary:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px #000000;
}

/* Yellow / Warning Button (Aksen Aksi Utama) */
.btn-warning, .btn-yellow {
  background: var(--color-yellow);
  color: #000000;
  border-color: #000000;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.btn-warning:hover, .btn-yellow:hover {
  background: #000000;
  color: var(--color-yellow);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

.btn-warning:active, .btn-yellow:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px #000000;
}

/* Secondary Button (Putih Berbingkai) */
.btn-secondary {
  background: var(--bg-main);
  color: var(--text-main);
  border-color: #000000;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

/* Danger Button (Merah Solid Aksen Hapus/Batal) */
.btn-danger {
  background: var(--color-red);
  color: #ffffff;
  border-color: #000000;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.btn-danger:hover {
  background: var(--color-red-hover);
  color: #ffffff;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

.btn-danger:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px #000000;
}

/* Success Button */
.btn-success {
  background: var(--color-success);
  color: #000000;
  border-color: #000000;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.btn-success:hover {
  background: #16a34a;
  color: #ffffff;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

.btn-success:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px #000000;
}

/* Ukuran Tombol */
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  box-shadow: 1px 1px 0px #000000;
}

.btn-xs:hover {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0px #000000;
}

/* ============================================================
   BADGES & CHIPS (WIREFRAME)
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid #000000;
  background: var(--bg-main);
  color: var(--text-main);
  box-shadow: 1px 1px 0px #000000;
}

.badge-warning, .badge-yellow {
  background: var(--color-yellow);
  color: #000000;
  border: 1px solid #000000;
}

.badge-success {
  background: #bbf7d0;
  color: #000000;
  border: 1px solid #000000;
}

.badge-danger, .badge-red {
  background: var(--color-red);
  color: #ffffff;
  border: 1px solid #000000;
}

.badge-info {
  background: var(--bg-alt);
  color: var(--text-main);
  border: 1px solid #000000;
}

.badge-primary {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}

.badge-secondary {
  background: var(--bg-alt);
  color: var(--text-main);
  border: 1px solid #000000;
}

.badge-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px dashed #000000;
  box-shadow: none;
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 6px;
}

input[type="text"],
input[type="search"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  border: 2px solid #000000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: #000000;
  box-shadow: var(--shadow-md);
  transform: translate(-1px, -1px);
}

.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 260px;
}

#rekap-date {
  height: 32px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
}

/* Alert Box */
.alert-box {
  padding: 16px 20px;
  border: 2px solid #000000;
  box-shadow: var(--shadow-md);
  background: var(--bg-main);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.alert-info, .alert-warning {
  border-left: 8px solid var(--color-yellow);
  background: #fffdf0;
}

.alert-danger {
  border-left: 8px solid var(--color-red);
  background: #fff5f5;
}

.alert-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 4px;
}

.alert-desc {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   MODALS (WIREFRAME POPUPS)
   ============================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.modal-overlay.open,
.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-main);
  border: 3px solid #000000;
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: min(480px, calc(100vw - 32px));
  padding: 24px;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  padding-bottom: 14px;
  border-bottom: 3px solid #000000;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid #000000;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-main);
  border: 2px solid #000000;
  box-shadow: var(--shadow-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.2s ease-out;
}

.toast-label {
  background: #000000;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #000000;
}

.toast.hiding {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

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

.toast-success {
  border-left: 8px solid var(--color-success);
}

.toast-error {
  border-left: 8px solid var(--color-red);
}

.toast-error .toast-label {
  background: var(--color-red);
  color: #ffffff;
}

.toast-warning {
  border-left: 8px solid var(--color-yellow);
}

.toast-warning .toast-label {
  background: var(--color-yellow);
  color: #000000;
}

.toast-info {
  border-left: 8px solid var(--color-info);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--text-main); }
.text-primary { color: var(--text-main); }

/* Responsive layout */

@media (max-width: 900px) {
  .sidebar {
    width: 220px;
  }
  .main-content {
    margin-left: 220px;
  }
  .top-bar {
    padding: 16px 20px;
  }
  .panel {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .app-wrapper {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 3px solid #000000;
  }
  .main-content {
    margin-left: 0;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .top-bar-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
  }
  .nav-item {
    flex: 1 1 auto;
    min-width: 130px;
  }
  /* Accessible touch targets for mobile (minimum 44px, WCAG / R-03) */
  .btn, .nav-item {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Program Kerja / Active Event Neo-Brutalist Additions --- */
.row-active-event {
  background-color: var(--color-yellow-light) !important;
}

.active-event-badge {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
  max-width: 100%;
}
#active-event-title {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
@media (max-width: 768px) {
  #active-event-title {
    max-width: 160px;
  }
}
.active-event-badge:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #000000;
}
.active-event-badge:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

