:root {
  --brand-primary: #1a3c5e;
  --brand-primary-dark: #12283f;
  --brand-accent: #d98e2b;
  --brand-bg: #f4f6f9;
  --brand-success: #1f8a4c;
  --brand-danger: #c0392b;
  --sidebar-width: 260px;
}

body {
  background-color: var(--brand-bg);
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2a2f36;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #eef2f6;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  transition: transform .2s ease;
}

.app-sidebar .brand {
  padding: 1.25rem 1.25rem 1rem;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.app-sidebar .brand small {
  display: block;
  font-weight: 400;
  opacity: .7;
  font-size: .72rem;
  margin-top: .15rem;
}

.app-sidebar .nav-link {
  color: #cfd9e3;
  padding: .65rem 1.25rem;
  font-size: .92rem;
  border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.app-sidebar .nav-link.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: var(--brand-accent);
  font-weight: 600;
}

.app-sidebar .nav-link i {
  width: 1.4rem;
  display: inline-block;
  text-align: center;
  margin-right: .4rem;
}

.app-sidebar .nav-section-title {
  color: rgba(255,255,255,.45);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 1rem 1.25rem .35rem;
}

/* Main content */
.app-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.app-topbar {
  background: #fff;
  border-bottom: 1px solid #e4e8ee;
  padding: .75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.75rem;
}

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
}

/* Cards & stat tiles */
.stat-card {
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: .75rem;
  padding: 1.1rem 1.3rem;
  height: 100%;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.stat-card .stat-label {
  color: #6b7685;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.stat-card .stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(26,60,94,.08);
  color: var(--brand-primary);
}

.card {
  border: 1px solid #e9edf2;
  border-radius: .75rem;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #eef1f5;
  font-weight: 600;
}

.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #6b7685;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}

.btn-accent {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}

a { text-decoration: none; }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 1rem;
  padding: 2.25rem;
  box-shadow: 0 20px 45px rgba(0,0,0,.25);
}
