/* =========================
   VARIABLES
========================= */
:root{
  --bg:#0f172a; --panel:#1e293b; --muted:#cbd5e1; --accent:#38bdf8; --card:#334155;
  --success:#22c55e; --danger:#ef4444; --yellow:#facc15;
}

/* =========================
   GLOBAL RESET
========================= */
*{box-sizing:border-box;margin:0;padding:0}
body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial;
  background: var(--bg);
  color: #e6eef8;
  display:flex;
  min-height:100vh;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
  width: 220px;
  background: var(--panel);
  min-height: 100vh;
  padding: 22px 12px;
  flex-shrink: 0;
}
.sidebar h2 {
  text-align:center;
  margin-bottom:24px;
  color:#fff;
  font-size:20px;
}
.sidebar a {
  display:block;
  padding:10px 16px;
  color:var(--muted);
  text-decoration:none;
  margin-bottom:6px;
  border-radius:8px;
  transition:0.3s;
}
.sidebar a.active, .sidebar a:hover {
  background: var(--card);
  color:#fff;
}

/* =========================
   MAIN CONTENT
========================= */
.main { flex:1; padding:28px; }
.header {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin-bottom:18px;
}
.title { font-size:20px; font-weight:600; color:#fff; display:flex; align-items:center; gap:10px; }
.board { display:flex; gap:18px; margin-bottom:22px; flex-wrap:wrap; }
.card {
  background:var(--panel);
  padding:18px;
  border-radius:12px;
  flex:1;
  text-align:center;
  box-shadow:0 6px 20px rgba(2,6,23,0.6);
  min-width:120px;
}
.card h3 { margin:0; color:var(--accent); font-size:18px; }
.card p { margin:8px 0 0; color:var(--muted); font-size:13px; }

/* =========================
   TABLES
========================= */
.table-wrap { background:transparent; border-radius:12px; overflow:auto; margin-bottom:22px; }
table {
  width:100%; border-collapse:collapse; min-width:900px;
  background:linear-gradient(180deg,var(--panel),#172033);
}
th, td {
  padding:12px 10px;
  border-bottom:1px solid rgba(255,255,255,0.04);
  text-align:center; vertical-align:middle; color:#e6eef8;
  font-size:14px;
}
th { background:var(--card); font-weight:600; color:#fff; }
tr:hover td { background: rgba(255,255,255,0.02); }
img.thumb { width:56px; height:56px; object-fit:cover; border-radius:8px; display:inline-block; }

/* =========================
   BUTTONS
========================= */
.btn {
  padding:8px 12px;
  border-radius:8px;
  border:none;
  cursor:pointer;
  font-weight:600;
  transition:0.3s;
}
.btn.view { background:var(--success); color:#042007; margin-right:6px; }
.btn.delete { background:var(--danger); color:#fff; }
.btn.edit { background:var(--yellow); color:#111; }
.print-btn {
  background:#3b82f6;
  color:#fff;
  border:none;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  margin-top:12px;
}

/* =========================
   POPUP
========================= */
.popup {
  display:none;
  position:fixed; inset:0;
  background:rgba(2,6,23,0.6);
  align-items:center;
  justify-content:center;
  z-index:30;
}
.popup .box {
  width:420px; max-width:94%;
  background:var(--panel);
  border-radius:10px;
  padding:18px;
  color:var(--muted);
  position:relative;
}
.popup .close {
  position:absolute; right:12px; top:8px;
  font-size:20px; color:#fff;
  cursor:pointer;
}
.popup .box h3 { color:#fff; margin-top:0; margin-bottom:8px; }
.popup .info-row { display:flex; gap:12px; align-items:center; margin-bottom:6px; }
.popup .info { flex:1; text-align:left; color:var(--muted); }

/* =========================
   FORMS (edit.php / add.php)
========================= */
form { background:var(--panel); padding:20px; border-radius:12px; max-width:600px; margin:auto; }
form label { display:block; margin-bottom:6px; color:#fff; font-weight:500; }
form input, form select, form textarea {
  width:100%; padding:8px 10px; margin-bottom:12px; border-radius:6px;
  border:1px solid rgba(255,255,255,0.2); background:#1e293b; color:#fff;
}
form button { margin-top:6px; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width:980px){
  .board{flex-direction:column}
  .table-wrap{overflow:auto}
  .sidebar { position:fixed; z-index:100; left:-240px; transition:0.3s; }
  .sidebar.show { left:0; }
}
