/* ── Sidebar Layout Theme ── */
:root {
  --bg:        #07101F;
  --surface:   #0D1B2E;
  --teal:      #00D4B8;
  --teal-dim:  rgba(0, 212, 184, 0.12);
  --gold:      #FFB03A;
  --text:      #E8F0F8;
  --muted:     #617D9A;
  --border:    rgba(0, 212, 184, 0.18);
  --sidebar-width: 260px;
  --sidebar-collapsed: 0px;
}

/* ── Base reset ── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

/* ── Layout wrapper ── */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 1030;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 1.25rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-brand:hover {
  background: var(--teal-dim);
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  line-height: 1;
}

.sidebar-brand-text .brand-top {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--teal);
  display: block;
}

.sidebar-brand-text .brand-bottom {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  margin-top: 1px;
}

/* ── Navigation ── */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  flex: 1;
}

.sidebar-nav .nav-item {
  margin: 2px 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
  color: var(--teal);
  background: var(--teal-dim);
}

.sidebar-nav .nav-link.active {
  color: var(--teal);
  background: var(--teal-dim);
  border-left-color: var(--teal);
}

.sidebar-nav .nav-link .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.sidebar-nav .nav-link:hover .nav-icon,
.sidebar-nav .nav-link.active .nav-icon {
  opacity: 1;
}

/* ── Sidebar footer ── */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
}

.sidebar-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-footer a:hover {
  color: var(--teal);
}

/* ── Main content area ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* ── Top bar (mobile toggle) ── */
.top-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.top-bar-brand {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.2s;
}

.top-bar-brand:hover {
  color: var(--gold);
}

.sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  transition: color 0.2s, border-color 0.2s;
}

.sidebar-toggle:hover {
  color: var(--teal);
  border-color: var(--teal);
}

/* ── Page body ── */
.page-body {
  flex: 1;
  padding: 1.5rem;
}

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 31, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1025;
}

.sidebar-overlay.is-visible {
  display: block;
}

/* ── Layout footer ── */
.layout-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-sep {
  color: var(--border);
  font-size: 0.78rem;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer-copy a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-copy a:hover {
  color: var(--teal);
}

@media (max-width: 767.98px) {
  .footer-links {
    flex-direction: column;
    gap: 0.3rem;
  }

  .footer-sep {
    display: none;
  }
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .top-bar {
    display: flex;
  }
}