

:root {
  --sidebar-width: 250px;
  --sidebar-bg: #1e2a3a;
  --sidebar-text: #c8d6e5;
  --sidebar-active: #ffffff;
  --sidebar-active-bg: rgba(255,255,255,0.12);
  --sidebar-hover-bg: rgba(255,255,255,0.07);
  --sidebar-section-color: rgba(255,255,255,0.35);
  --topbar-height: 56px;
  --topbar-bg: #ffffff;
  --content-bg: #f4f6f9;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--content-bg); }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition);
  z-index: 1000;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  height: var(--topbar-height);
  padding: 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav {
  padding: .5rem 0;
}

.sidebar-section {
  padding: .65rem 1rem .25rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sidebar-section-color);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-link i { font-size: 1rem; flex-shrink: 0; }

.sidebar-link:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-active);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 600;
}

.sidebar-footer {
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .3rem .25rem .5rem;
}

.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-username { font-weight: 600; color: #fff; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-role { font-size: .7rem; color: var(--sidebar-section-color); }

.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

body.sidebar-collapsed .sidebar { width: 0; overflow: hidden; }
body.sidebar-collapsed .main-wrapper { margin-left: 0; }

.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.topbar-left { display: flex; align-items: center; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }

.sidebar-toggle {
  background: transparent;
  border: none;
  color: #555;
  padding: .25rem .4rem;
}
.sidebar-toggle:hover { background: #f0f0f0; border-radius: .25rem; }

.breadcrumb-item a { color: #0d6efd; text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

.page-content {
  padding: 1.5rem 1.5rem 2rem;
  flex: 1;
}

.card { border: 1px solid #dee2e6; border-radius: .5rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card-header { background: #fff; border-bottom: 1px solid #dee2e6; padding: .75rem 1rem; }

.stat-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-value { font-size: 1.55rem; font-weight: 700; line-height: 1.1; color: #212529; }
.stat-label { font-size: .78rem; color: #6c757d; margin-top: .1rem; }

.bg-primary-soft  { background: rgba(13,110,253,.1); }
.bg-success-soft  { background: rgba(25,135,84,.1); }
.bg-warning-soft  { background: rgba(255,193,7,.15); }
.bg-danger-soft   { background: rgba(220,53,69,.1); }
.bg-info-soft     { background: rgba(13,202,240,.1); }

.table { --bs-table-striped-bg: #fafafa; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; font-weight: 600; white-space: nowrap; }
.table td { font-size: .875rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8f9fa; }

.info-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; margin-bottom: .15rem; }
.info-value { font-size: .9rem; color: #212529; }

.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e2a3a 0%, #2d4057 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card-wrapper { width: 100%; max-width: 420px; }

.auth-card {
  background: #fff;
  border-radius: .75rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.auth-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  margin: 0 auto 1rem;
}

.badge { font-weight: 500; }

.page-link { font-size: .8rem; }

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 250px; transform: translateX(-100%); transition: transform var(--transition); }
  .main-wrapper { margin-left: 0; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .page-content { padding: 1rem; }
}
