/* ROOT VOD Panel - Dark Professional Theme */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0e14;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- LOGIN --- */
.login-card {
  max-width: 380px;
  margin: 0 auto;
  padding: 48px 32px;
  text-align: center;
  position: relative;
  top: 50vh;
  transform: translateY(-60%);
}
.login-icon {
  width: 56px; height: 56px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.login-sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 28px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-input {
  width: 100%;
  padding: 12px 16px;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 1px;
}
.login-input:focus {
  border-color: #f59e0b;
}
.login-btn {
  width: 100%;
  padding: 12px;
  background: #f59e0b;
  border: none;
  border-radius: 10px;
  color: #0a0e14;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.login-btn:hover { background: #d97706; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- LAYOUT --- */
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  background: #0f172a;
  border-right: 1px solid #1e293b;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  z-index: 10;
}
.sidebar-brand {
  font-size: 16px;
  font-weight: 800;
  color: #f59e0b;
  padding: 0 24px 24px;
  letter-spacing: 1.5px;
}
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  border-radius: 0;
}
.nav-link:hover {
  color: #e2e8f0;
  background: rgba(245, 158, 11, 0.06);
}
.nav-link.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border-right: 2px solid #f59e0b;
}
.nav-link svg { flex-shrink: 0; }

.btn-logout {
  margin: 16px 24px;
  padding: 10px;
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.12);
}

.main {
  flex: 1;
  margin-left: 220px;
  padding: 28px 32px;
  max-width: 1400px;
}

/* --- PAGE --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1e293b;
}

/* --- STATS --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 20px;
}
.stat-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
}
.stat-primary { color: #3b82f6; }
.stat-success { color: #22c55e; }
.stat-danger { color: #ef4444; }
.stat-warn { color: #f59e0b; }
.stat-info { color: #06b6d4; }
.stat-secondary { color: #94a3b8; }

/* --- SECTIONS --- */
.section { margin-top: 24px; }
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: #f59e0b;
}

/* --- TABLE --- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #111827;
  border-radius: 10px;
  overflow: hidden;
}
.table th {
  text-align: left;
  padding: 12px 16px;
  background: #0f172a;
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #1e293b;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #1e293b;
  vertical-align: top;
}
.table tr:hover td {
  background: rgba(245, 158, 11, 0.04);
}

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-secondary { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  background: transparent;
  color: #e2e8f0;
}
.btn:hover { opacity: 0.85; }
.btn-primary {
  background: #f59e0b;
  color: #0a0e14;
  border: none;
}
.btn-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }
.btn-outline { background: transparent; border: 1px solid #334155; }
.btn-outline:hover { background: rgba(255,255,255,0.04); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* --- ROW/COL --- */
.row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.col-4 { width: 33%; min-width: 280px; }
.col-8 { width: 67%; flex: 1; }

/* --- CARD --- */
.card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #f59e0b;
}

/* --- FORM --- */
.form { display: flex; flex-direction: column; gap: 12px; }
.label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input {
  width: 100%;
  padding: 10px 14px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.input:focus { border-color: #f59e0b; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}
.check input { accent-color: #f59e0b; }

/* --- HW BLOCK --- */
.hw-block {
  background: #0a0e14;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 14px;
  font-size: 12px;
  margin-top: 8px;
}

/* --- MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #f59e0b;
}

/* --- TERMINAL --- */
.terminal {
  background: #050810;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.8;
  max-height: 70vh;
  overflow-y: auto;
}
.log-line {
  padding: 4px 0;
  border-bottom: 1px solid #0f172a;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.log-time { color: #475569; font-size: 11px; }
.log-type { color: #f59e0b; font-weight: 600; font-size: 11px; }
.log-uri { color: #3b82f6; }
.log-data { color: #94a3b8; flex: 1; word-break: break-all; }

/* --- STATUS --- */
.status-line {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* --- UTILS --- */
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.text-muted { color: #64748b; }
.text-warn { color: #f59e0b; }
.text-primary { color: #3b82f6; }

/* --- TOAST --- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  transition: opacity 0.3s;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.toast-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.toast-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-brand { display: none; }
  .nav-link { padding: 10px; justify-content: center; }
  .nav-link span { display: none; }
  .btn-logout { display: none; }
  .main { margin-left: 64px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .row { flex-direction: column; }
  .col-4, .col-8 { width: 100%; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .table { font-size: 11px; }
  .table th, .table td { padding: 8px 10px; }
}
