﻿:root {
  --font-family-base: "Tactic Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --color-bg: #1f1d24;
  --color-bg-elevated: #282732;
  --color-bg-muted: #23212b;
  --color-text: #f3f5f8;
  --color-text-muted: #a0a4b8;
  --color-border: #3a3947;
  --color-primary: #bbff00;
  --color-primary-ink: #1f1d24;
  --color-secondary: #64647a;
  --color-accent: #9054ff;
  --color-danger: #ff4000;
  --color-info: #05c5ff;
  --color-success: #7fd665;
  --shadow-soft: 0 12px 32px rgba(15, 16, 22, 0.35);
  --radius-sm: 0.5rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.2rem;
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 86px;
  --topbar-height: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  color: var(--color-text);
  background: radial-gradient(1200px 700px at 100% -20%, rgba(144, 84, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(5, 197, 255, 0.1), transparent 50%),
    var(--color-bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-primary);
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  color: #111;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, rgba(40, 39, 50, 0.96), rgba(31, 29, 36, 0.98));
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.2rem 0.8rem;
  z-index: 1025;
  transition: width 0.25s ease, transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--color-primary), #93cb00);
  color: var(--color-primary-ink);
  font-weight: 700;
}

.brand-text {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sidebar-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 0.85rem 0.75rem 0.35rem;
}

.sidebar-nav .nav-link {
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  padding: 0.58rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: var(--color-text);
  background: rgba(187, 255, 0, 0.12);
}

.sidebar-nav .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.main-shell {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease, width 0.25s ease;
}

.topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(14px);
  background: rgba(31, 29, 36, 0.82);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.content-area {
  padding: 1.4rem;
}

.app-main {
  flex: 1 0 auto;
}

.app-footer {
  margin-top: auto;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(22, 22, 30, 0.92);
  z-index: 2000;
  display: grid;
  place-items: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(187, 255, 0, 0.16);
  border-top-color: var(--color-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.quick-search-wrap {
  position: relative;
  width: min(540px, 60vw);
}

.quick-search-results {
  width: 100%;
  max-height: 340px;
  overflow-y: auto;
  border-color: var(--color-border);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-soft);
}

.quick-search-results .dropdown-item {
  white-space: normal;
}

.quick-search-results .dropdown-item.active,
.quick-search-results .dropdown-item:active {
  background: rgba(5, 197, 255, 0.18);
  color: var(--color-text);
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--color-text-muted);
  --bs-breadcrumb-item-active-color: var(--color-text);
  margin-bottom: 1rem;
}

.breadcrumb .breadcrumb-item a {
  color: var(--color-text-muted);
}

.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-width-collapsed);
}

.sidebar-collapsed .main-shell {
  margin-left: var(--sidebar-width-collapsed);
  width: calc(100% - var(--sidebar-width-collapsed));
}

.sidebar-collapsed .sidebar-nav .label-text,
.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .brand-text {
  display: none;
}

.auth-shell .app-sidebar,
.auth-shell .topbar {
  display: none;
}

.auth-shell .main-shell {
  margin-left: 0;
  width: 100%;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: min(var(--sidebar-width), 84vw);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .main-shell,
  .sidebar-collapsed .main-shell {
    margin-left: 0;
    width: 100%;
  }

  .quick-search-wrap {
    width: 100%;
  }

  .content-area {
    padding: 1rem;
  }
}
