/* BO Guard Panel — Design System
   Accent: #d42020 | Background: #0d0d0d | Sidebar: #111111
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --red:          #d42020;
  --red-bright:   #e53030;
  --red-dark:     #8a0000;
  --red-sub:      rgba(213,32,32,0.10);
  --red-border:   rgba(213,32,32,0.18);
  --bg:           #0d0d0d;
  --bg2:          #111111;
  --card-bg:      #141414;
  --card-border:  #1e1e1e;
  --sidebar-bg:   #111111;
  --sidebar-border: #1c1c1c;
  --text:         #e8e8e8;
  --text-dim:     #aaaaaa;
  --muted:        #666666;
  --border:       #1e1e1e;
  --row-hover:    rgba(255,255,255,0.03);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ── Particles bg ── */
#particles-js {
  position: fixed; top:0; left:0; width:100%; height:100%; z-index:0;
  background: var(--bg);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Layout ── */
.layout {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }

.sidebar-title {
  color: var(--text);
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--sidebar-border);
}

/* ── Menu buttons ── */
.menu-btn {
  width: 100%;
  display: block;
  background: transparent;
  border: none;
  color: var(--text-dim);
  border-radius: 7px;
  padding: 9px 12px;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
  line-height: 1.4;
}

.menu-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.menu-btn.active {
  background: var(--red-sub);
  color: var(--red-bright);
  font-weight: 600;
  border-left: 3px solid var(--red);
  padding-left: 9px;
}

/* ── Sidebar footer ── */
.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: 14px 12px;
  text-align: center;
}

.footer-btn {
  display: inline-block;
  margin: 3px;
  padding: 7px 12px;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: 0.18s;
}

.footer-btn:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text);
  border-color: #2a2a2a;
}

.footer-btn.logout {
  background: rgba(180,0,0,0.12);
  color: #ff7070;
  border: 1px solid rgba(180,0,0,0.2);
}

.footer-btn.logout:hover {
  background: var(--red-dark);
  color: #fff;
  border-color: transparent;
}

.copyright { margin-top: 8px; font-size: 11px; color: var(--muted); }
.copyright span { color: var(--text-dim); }

/* ── Content area ── */
.content {
  flex: 1;
  padding: 28px 30px;
  overflow-y: auto;
}

/* ── Cards / boxes ── */
.card, .table-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  animation: fadeIn 0.3s ease;
}

/* ── Headings ── */
h1 { color: var(--text); margin-top:0; font-size:22px; font-weight:700; }
h2 { color: var(--text); margin-top:0; font-size:18px; font-weight:700; }
h3 { color: var(--text); margin-top:0; font-size:16px; font-weight:600; }

/* ── Tables ── */
table { width:100%; border-collapse:collapse; }

th, td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--row-hover); }
td { color: var(--text); font-size: 13.5px; }

/* ── Inputs ── */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #1a1a1a;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select option { background: #1a1a1a; color: var(--text); }

input:focus, select:focus, textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213,32,32,0.12);
}

input::placeholder, textarea::placeholder { color: var(--muted); }

/* ── Buttons ── */
button, .btn {
  padding: 9px 18px;
  border-radius: 7px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s;
}

button[type="submit"], .btn-primary {
  background: var(--red);
  color: #fff;
}

button[type="submit"]:hover, .btn-primary:hover {
  background: var(--red-bright);
  box-shadow: 0 4px 14px rgba(213,32,32,0.35);
}

.btn-danger { background: var(--red-dark); color: #fff; }
.btn-danger:hover { background: var(--red); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); color: var(--text); }

/* ── Search bar ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 18px;
}

.search-bar input {
  background: transparent;
  border: none;
  box-shadow: none;
  flex: 1;
  padding: 6px 8px;
}

.search-input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #1a1a1a;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(213,32,32,0.1); }

.search-btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 7px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: 0.18s;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--red-bright);
  box-shadow: 0 3px 10px rgba(213,32,32,0.3);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pagination a {
  padding: 6px 12px;
  border-radius: 6px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: 0.18s;
}

.pagination a:hover { background: #222; color: var(--text); }

.pagination a.active,
.pagination a.active-page {
  background: var(--red);
  border-color: transparent;
  color: #fff;
}

/* ── Edit button ── */
.edit-btn {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: 0.18s;
}

.edit-btn:hover {
  background: var(--red);
  border-color: transparent;
  color: #fff;
}

/* ── Toast ── */
.toast {
  position: fixed; right: 20px; bottom: 20px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 18px;
  border-radius: 9px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  z-index: 9999;
  font-size: 14px;
  min-width: 220px;
}

.toast.success { border-left: 3px solid #2ed47a; }
.toast.error   { border-left: 3px solid var(--red); }

/* ── Misc ── */
.result-count { color: var(--muted); font-size:12px; text-align:right; margin-top:8px; }
.success-msg  { text-align:center; padding:10px; color:#2ed47a; font-weight:600; margin-bottom:10px; }
.loading      { text-align:center; padding:30px; color:var(--muted); font-size:14px; }
p             { color: var(--text-dim); }

/* ── Bottom bar ── */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Actions cell ── */
.actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }

/* ── Section loading ── */
#sectionContainer.loading { opacity: 0.5; }

/* ── Responsive ── */
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width:100%; min-width:unset; height:auto; }
}
