
/* ==== TROYA - FULL DARK THEME (consolidated) ==== */
:root{
  --bg:#0b0e13;
  --panel:#121722;
  --panel-2:#171c27;
  --muted:#9fb0c7;
  --text:#eef3fb;
  --text-dim:#c9d3e3;
  --brand:#4ea1ff;
  --accent:#22c55e;
  --border:rgba(255,255,255,0.10);
  --shadow:0 6px 24px rgba(0,0,0,.35);
  --sbw: 248px;
}

/* Base */
html, body { height:100%; background:var(--bg) !important; color:var(--text) !important; }
.bg-body, .bg-dark-all { background:var(--bg) !important; color:var(--text) !important; }
.bg-nav{ background:#0f1420 !important; }
a{ color:#bcd9ff; }
a:hover{ color:#e6f1ff; }

/* Sidebar layout (matches sidebar-ready layout.php) */
.app-sb{ display:flex; min-height:100vh; }
.sb{ width:var(--sbw); background:#0f1420; border-right:1px solid var(--border); position:sticky; top:0; height:100vh; display:flex; flex-direction:column; }
.sb-brand{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border); }
.sb-logo{ height:28px; width:auto; display:block; }
.sb-title{ font-weight:600; color:#fff; }
.sb-nav{ display:flex; flex-direction:column; padding:10px; gap:6px; height:100%; }
.sb-link{ display:block; padding:10px 12px; color:#cfd6e4; text-decoration:none; border-radius:10px; }
.sb-link:hover{ color:#fff; background:rgba(255,255,255,.06); }
.sb-link.active{ color:#fff; background:rgba(78,161,255,.18); border:1px solid rgba(78,161,255,.35); }
.sb-grow{ flex:1; }
.sb-main{ flex:1; display:flex; flex-direction:column; min-width:0; }
.sb-top{ height:56px; background:#0f1420; display:flex; align-items:center; justify-content:flex-end; padding:0 16px; border-bottom:1px solid var(--border); }
.sb-wrap{ max-width:1320px; }

/* Cards */
.card{ background:var(--panel); color:var(--text); border:1px solid var(--border); box-shadow: var(--shadow); }
.card .card-title, h1,h2,h3,h4,h5{ color:var(--text); }
small, .text-muted, .input-hint{ color:var(--muted) !important; }

/* Forms */
.form-label{ color:var(--text-dim); font-weight:600; }
.form-control, .form-select, .form-check-input{
  background:#0e141d; border:1px solid var(--border); color:var(--text);
}
.form-control::placeholder{ color:#93a0b5; opacity:.7; }
.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .2rem rgba(78,161,255,.20);
  border-color: var(--brand);
}
.btn{ border-radius:.55rem; }
.btn-primary{ background:var(--brand); border:none; }
.btn-success{ background:var(--accent); border:none; }
.btn-outline-light{ color:#e3ecfb; border-color:#50607a; }
.btn-outline-light:hover{ background:#1a2232; }

/* Tables: dark-friendly variables and headers */
.table {
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255,255,255,0.12);
  --bs-table-striped-bg: rgba(255,255,255,0.04);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-bg: rgba(255,255,255,0.06);
  --bs-table-hover-color: var(--text);
}
.table thead th{
  color:#e6eef9 !important;
  background:var(--panel-2) !important;
  border-bottom:1px solid rgba(255,255,255,0.12) !important;
}
.table > :not(caption) > * > * {
  color: var(--text) !important;
  background-color: transparent !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255,255,255,0.04) !important;
  color: var(--text) !important;
}
.table td, .table th { border-color: rgba(255,255,255,0.10) !important; }

/* Badges */
.badge-soft{ background:rgba(78,161,255,.18); color:#cfe3ff; border:1px solid rgba(78,161,255,.35); }

/* Forms grid spacing */
.container, .container-fluid { padding-left: 12px; padding-right: 12px; }
.row.g-2 > [class^="col"] { margin-bottom: .25rem; }
.row.g-3 > [class^="col"] { margin-bottom: .35rem; }

/* Mobile: hide sidebar */
@media (max-width: 991px){
  .sb{ display:none; }
  .sb-main{ margin-left:0; }
}
