/* ============================================
   Lab Sistem Komputer — style.css
   ============================================ */

:root {
  --bg:         #0a0f0a;
  --bg2:        #111a11;
  --bg3:        #1a2a1a;
  --border:     #2a3d2a;
  --accent:     #1a6b1a;
  --accent2:    #2d9e2d;
  --accent3:    #3dbf3d;
  --text:       #e8f5e8;
  --text2:      #7aad7a;
  --text3:      #4d7a4d;
  --success:    #1a6b1a;
  --success-bg: #0a1f0a;
  --warning:    #8a6d00;
  --warning-bg: #1a1500;
  --danger:     #8b2020;
  --danger-bg:  #1f0a0a;
  --radius:     8px;
  --radius-lg:  12px;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

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

/* ── NAVBAR ── */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--text);
  text-decoration: none;
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border); flex-shrink: 0;
}
.navbar-nav { display: flex; gap: 4px; }
.nav-btn {
  background: none; border: none;
  padding: 6px 12px; border-radius: 6px;
  color: var(--text2); cursor: pointer;
  font-family: inherit; font-size: 13px; transition: all 0.15s;
}
.nav-btn:hover { background: var(--bg3); color: var(--text); }
.nav-btn.active { background: var(--bg3); color: var(--accent3); }
.user-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px 4px 4px;
  font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.user-pill:hover { border-color: var(--accent2); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); display: flex;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff;
}
.avatar.asisten { background: #1a4a6b; }
.avatar.admin   { background: #4a1a6b; }

/* ── MAIN ── */
.main { flex: 1; }

/* ── LOADING ── */
.loading-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: calc(100vh - 56px);
  gap: 16px; color: var(--text2); font-size: 14px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent3);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LANDING ── */
.landing {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - 56px);
  padding: 40px 24px; text-align: center;
}
.landing-badge {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 14px; font-size: 12px;
  color: var(--text2); margin-bottom: 24px;
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.05em;
}
.landing h1 {
  font-size: clamp(28px, 5vw, 48px); font-weight: 700;
  line-height: 1.2; margin-bottom: 16px; max-width: 600px;
}
.landing h1 span { color: var(--accent3); }
.landing p {
  color: var(--text2); font-size: 16px; max-width: 480px;
  margin-bottom: 32px; line-height: 1.7;
}
.landing-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.features-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; max-width: 680px; width: 100%;
}
.feature-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; text-align: center;
}
.feature-card .icon { font-size: 24px; margin-bottom: 8px; }
.feature-card .title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.feature-card .desc { font-size: 12px; color: var(--text2); }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent); color: #e8f5e8;
  border: none; padding: 10px 24px; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg3); color: var(--text);
  border: 1px solid var(--border); padding: 10px 24px; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--accent3); color: var(--accent3); }
.btn-sm {
  padding: 4px 10px; font-size: 12px; border-radius: 5px;
  background: none; border: 1px solid var(--border); color: var(--text2);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-sm:hover { border-color: var(--accent3); color: var(--accent3); }
.btn-danger-sm {
  padding: 4px 10px; font-size: 12px; border-radius: 5px;
  background: var(--danger-bg); border: 1px solid rgba(139,32,32,0.4);
  color: #f85149; cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-danger-sm:hover { opacity: 0.8; }
.btn-warning-sm {
  padding: 4px 10px; font-size: 12px; border-radius: 5px;
  background: var(--warning-bg); border: 1px solid rgba(138,109,0,0.4);
  color: #d4a017; cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-warning-sm:hover { opacity: 0.8; }

/* ── PAGE ── */
.page { padding: 32px 24px; max-width: 1100px; margin: 0 auto; }
.page-header { margin-bottom: 28px; }
.page-header h2 { font-size: 22px; font-weight: 600; }
.page-header p { color: var(--text2); margin-top: 4px; font-size: 14px; }

/* ── CARD ── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 13px; color: var(--text2); font-weight: 500; }
input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=number], select, textarea {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 12px;
  color: var(--text); font-family: inherit; font-size: 14px;
  transition: border-color 0.15s; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent3); }
select option { background: var(--bg3); }
textarea { resize: vertical; min-height: 80px; }

/* ── FILE UPLOAD ── */
.file-upload {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all 0.15s; position: relative;
}
.file-upload:hover { border-color: var(--accent3); background: rgba(45,158,45,0.05); }
.file-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-text { font-size: 13px; color: var(--text2); line-height: 1.8; }
.upload-text strong { color: var(--accent3); }
.file-preview {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-top: 12px;
}
.file-preview span { font-size: 13px; color: var(--text); flex: 1; }
.remove-file {
  background: none; border: none; color: var(--text3);
  cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px;
}
.remove-file:hover { color: #f85149; background: var(--danger-bg); }

/* ── BADGE ── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 500; font-family: 'IBM Plex Mono', monospace;
}
.badge-green  { background: rgba(29,107,29,0.2);  color: var(--accent3); border: 1px solid rgba(45,158,45,0.4); }
.badge-blue   { background: rgba(26,74,107,0.2);  color: #5ab4f0;        border: 1px solid rgba(90,180,240,0.3); }
.badge-purple { background: rgba(74,26,107,0.2);  color: #c084fc;        border: 1px solid rgba(192,132,252,0.3); }
.badge-gray   { background: var(--bg3);            color: var(--text2);   border: 1px solid var(--border); }
.badge-red    { background: var(--danger-bg);      color: #f85149;        border: 1px solid rgba(139,32,32,0.4); }
.badge-yellow { background: var(--warning-bg);     color: #d4a017;        border: 1px solid rgba(138,109,0,0.4); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg3); }
th {
  padding: 10px 14px; text-align: left; font-size: 12px;
  font-weight: 500; color: var(--text2); letter-spacing: 0.04em; text-transform: uppercase;
}
td { padding: 11px 14px; font-size: 13px; border-top: 1px solid var(--border); }
tr:hover td { background: rgba(45,158,45,0.03); }

/* ── STATS ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.stat-label { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; }
.stat-value.green  { color: var(--accent3); }
.stat-value.blue   { color: #5ab4f0; }
.stat-value.yellow { color: #d4a017; }
.stat-value.purple { color: #c084fc; }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab {
  padding: 8px 16px; background: none; border: none;
  border-bottom: 2px solid transparent; color: var(--text2);
  cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 500; transition: all 0.15s; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent3); border-bottom-color: var(--accent3); }

/* ── PROGRESS ── */
.pertemuan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.progress-bar-wrap { height: 4px; background: var(--bg3); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent2); border-radius: 4px; transition: width 0.5s; }

/* ── MODUL ── */
.modul-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.modul-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
}
.modul-icon {
  width: 36px; height: 36px; min-width: 36px;
  background: rgba(139,32,32,0.2); border: 1px solid rgba(139,32,32,0.3);
  border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.modul-info { flex: 1; overflow: hidden; }
.modul-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modul-meta { font-size: 11px; color: var(--text2); }
.btn-unduh {
  background: none; border: 1px solid var(--border); padding: 5px 10px;
  border-radius: 5px; color: var(--text2); font-family: inherit; font-size: 11px;
  cursor: pointer; margin-top: 8px; transition: all 0.15s; display: block; text-align: center; width: 100%;
}
.btn-unduh:hover { border-color: var(--accent3); color: var(--accent3); }

/* ── CO-ASS ── */
.coass-list { display: grid; gap: 12px; }
.coass-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.coass-avatar {
  width: 44px; height: 44px; min-width: 44px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-size: 15px; font-weight: 600; color: #fff;
}
.coass-info { flex: 1; }
.coass-name { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.coass-sub { font-size: 12px; color: var(--text2); }

/* ── ABSENSI ── */
.absensi-btn {
  background: var(--success); color: #e8f5e8; border: none; padding: 8px 20px;
  border-radius: var(--radius); font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.absensi-btn:hover { opacity: 0.85; }
.absensi-btn:disabled { background: var(--bg3); color: var(--text2); cursor: not-allowed; }

/* ── ALERT ── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-info { background: rgba(26,74,107,0.15); border: 1px solid rgba(90,180,240,0.3); color: #5ab4f0; }
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(138,109,0,0.3); color: #d4a017; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px; font-size: 13px;
  z-index: 999; display: flex; align-items: center; gap: 8px; max-width: 320px;
  transform: translateY(80px); opacity: 0; transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent3); flex-shrink: 0; }

/* ── SUCCESS STATE ── */
.success-state { text-align: center; padding: 40px 20px; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--success-bg); border: 2px solid var(--accent2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 16px;
}

/* ── ALAT LAB ── */
.alat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.alat-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
}
.alat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.alat-nama { font-size: 14px; font-weight: 600; }
.alat-qty {
  font-size: 22px; font-weight: 700; color: var(--accent3);
  font-family: 'IBM Plex Mono', monospace;
}
.alat-satuan { font-size: 11px; color: var(--text2); margin-left: 2px; }
.alat-keterangan { font-size: 12px; color: var(--text2); margin-top: 8px; line-height: 1.6; }
.alat-actions { display: flex; gap: 6px; margin-top: 12px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); font-size: 16px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: inherit;
}
.qty-btn:hover { border-color: var(--accent3); color: var(--accent3); }
.qty-display {
  flex: 1; text-align: center; font-family: 'IBM Plex Mono', monospace;
  font-size: 14px; font-weight: 500; padding: 4px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
}
.kondisi-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 6px; }
.kondisi-baik { background: rgba(29,107,29,0.2); color: var(--accent3); border: 1px solid rgba(45,158,45,0.3); }
.kondisi-rusak { background: var(--danger-bg); color: #f85149; border: 1px solid rgba(139,32,32,0.3); }
.kondisi-servis { background: var(--warning-bg); color: #d4a017; border: 1px solid rgba(138,109,0,0.3); }

/* ── MODAL FORM ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text2); font-size: 20px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: var(--bg3); }

/* ── SECTION GRID ── */
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── ADMIN LOGIN HIDDEN ── */
.admin-login-trigger {
  position: fixed; bottom: 16px; right: 16px; z-index: 50;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0.3; transition: opacity 0.3s; font-size: 14px;
}
.admin-login-trigger:hover { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .form-grid, .section-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 16px; }
  .page { padding: 20px 16px; }
  .tabs { gap: 0; }
  .tab { padding: 8px 10px; font-size: 12px; }
}

/* ── LANDING BG ── */
.landing {
  position: relative;
  background-image: url('bg-lab.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: calc(100vh - 56px);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 24px; text-align: center;
}
.landing-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5,15,5,0.82) 0%, rgba(5,15,5,0.75) 60%, rgba(5,15,5,0.92) 100%);
  backdrop-filter: blur(1px);
}
.landing-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
}
.landing-content h1 { text-shadow: 0 2px 20px rgba(0,0,0,0.8); }
.landing-content p  { text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
.btn-glass {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 24px; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255,255,255,0.15); border-color: var(--accent3); color: var(--accent3); }

/* ── ASISTEN CARDS ── */
.asisten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.asisten-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 16px;
  text-align: center; transition: border-color 0.2s;
}
.asisten-card:hover { border-color: var(--accent2); }
.asisten-nama { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.asisten-nim  { font-size: 12px; color: var(--text2); font-family: 'IBM Plex Mono', monospace; margin-bottom: 8px; }
.asisten-matkul { font-size: 12px; color: var(--accent3); margin-bottom: 4px; }
.asisten-kelas { font-size: 11px; color: var(--text3); }

/* ── OPT BUTTON (hadir/izin) ── */
.opt-btn {
  padding: 12px; border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--bg3); color: var(--text2); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500; transition: all 0.15s;
}
.opt-btn.active { border-color: var(--accent3); background: rgba(45,158,45,0.1); color: var(--accent3); }
.opt-btn:hover  { border-color: var(--accent2); }

/* ── PULSE ANIMATION ── */
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
