html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ---- App Shell ---- */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #6366f1;
  --accent-2: #06b6d4;
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  --sidebar-hover: #1f2937;
  --sidebar-active: linear-gradient(90deg, rgba(99,102,241,.25) 0%, rgba(6,182,212,.25) 100%);
}
.app-header {
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(15,23,42,.06);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.brand-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 1.25rem;
}

.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 64px);
  background: var(--bg);
}

.app-sidebar {
  background: var(--sidebar-bg);
  color: #cbd5e1;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* improved nav styles for layout's .app-nav */
.app-nav .nav-link {
  color: #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.app-nav .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.app-nav .nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.app-sidebar .nav-link {
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
  background: #1e293b;
  color: #fff;
}

.nav-section {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.75rem 0.75rem 0.25rem;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}

.app-main {
  background: var(--bg);
}

.app-main-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.app-breadcrumb {
  font-size: 0.875rem;
  color: var(--muted);
}

.app-content {
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(15,23,42,.06);
}

/* ---- Login ---- */
.login-body {
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% 30%, rgba(99,102,241,.15) 0%, transparent 60%),
              radial-gradient(1000px 600px at 90% 70%, rgba(6,182,212,.18) 0%, transparent 60%),
              var(--bg);
}

.login-card {
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.06);
}

/* Cards & text */
.card { background: var(--card); }
.card .fw-bold { color: var(--text); }
.text-muted { color: var(--muted) !important; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
}
.btn-primary:hover { filter: brightness(0.95); }