/* ==== Layout ============================================================ */
:root{
  --sidebar-w: 250px;
  --bg-gradient-1: #0f172a; /* slate-900 */
  --bg-gradient-2: #111827; /* gray-900 */
  --card-glass: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.12);
}

html, body {
  height: 100%;
}

body {
  background: radial-gradient(1200px 800px at 100% -10%, #1f2937 0%, transparent 60%) ,
              radial-gradient(900px 600px at -10% 20%, #0ea5e9 0%, transparent 45%) ,
              linear-gradient(160deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  background-attachment: fixed;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ==== Sidebar =========================================================== */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.85);
  border-right: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  padding-bottom: 1rem;
}

.app-brand {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 600;
  letter-spacing: .2px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.app-brand i { color: #60a5fa; }

.sidebar-section {
  margin-top: .5rem;
  margin-bottom: .25rem;
}

.app-sidenav .nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1rem;
  color: #cbd5e1;
  border-radius: 8px;
  margin: 2px 8px;
  transition: background-color .15s ease, color .15s ease, transform .05s ease-in;
}
.app-sidenav .nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  transform: translateX(2px);
}
.app-sidenav .nav-link.active {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}
.app-sidenav .nav-link i {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

/* ==== Main ============================================================== */
.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(17,24,39,.35);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: .6rem 1rem;
}

.app-content {
  padding-top: 1rem;
}

/* ==== Cards / Panels ==================================================== */
.card.glassy {
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border-radius: 14px;
}
.table-dark {
  --bs-table-bg: rgba(0,0,0,0.25);
  --bs-table-striped-bg: rgba(255,255,255,0.03);
  --bs-table-hover-bg: rgba(255,255,255,0.06);
}

/* Buttons */
.btn-light, .btn-outline-light, .btn-secondary, .btn-warning, .btn-danger, .btn-success {
  border-radius: 10px;
}

/* Forms */
.form-control, .form-select, .input-group-text, .form-check-input {
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #e5e7eb;
}
.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 .2rem rgba(59,130,246,.25);
  border-color: #3b82f6;
}

/* Toasts at bottom-right */
.toast-container .toast {
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
}

/* Utilities */
.text-secondary { color: #9ca3af !important; }
