/* ===== Layout ===== */
:root {
  --sidebar-width: 260px;
  --sidebar-bg: #1a1d21;
  --topbar-height: 56px;
}

html, body {
  height: 100%;
}

#wrapper {
  min-height: 100vh;
}

/* ===== Sidebar ===== */
#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.2s ease;
  flex-shrink: 0;
}

#sidebar.collapsed {
  width: 60px;
  overflow: hidden;
}

#sidebar.collapsed .brand-link span,
#sidebar.collapsed .nav-link span,
#sidebar.collapsed .sidebar-heading,
#sidebar.collapsed .avatar-circle + div {
  display: none !important;
}

#sidebar .nav-link {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: background 0.15s;
}

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

#sidebar .nav-link.active {
  background-color: #0d6efd;
  color: #fff !important;
}

/* ===== Main content ===== */
#page-content {
  min-width: 0;
  background-color: var(--bs-body-bg);
  overflow: hidden;
}

main {
  max-width: 1400px;
}

/* ===== Avatar circle ===== */
.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0d6efd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===== Icon boxes ===== */
.icon-box {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Cards ===== */
.card {
  border-radius: 10px;
}

.card-header {
  border-bottom-color: rgba(255,255,255,0.05);
  background-color: rgba(255,255,255,0.03);
  padding: 0.875rem 1.25rem;
}

/* ===== Tables ===== */
.table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Auth layout ===== */
.auth-card {
  margin: auto;
}

/* ===== Tariff selection cards ===== */
.tariff-card, .os-card {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tariff-card:hover, .os-card:hover {
  border-color: #0d6efd !important;
  box-shadow: 0 0 0 2px rgba(13,110,253,.2);
}

.tariff-card.selected, .os-card.selected {
  border-color: #0d6efd !important;
  box-shadow: 0 0 0 2px rgba(13,110,253,.25);
}

/* ===== Status badges ===== */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    z-index: 1050;
    left: -260px;
    transition: left 0.2s ease;
  }
  #sidebar.mobile-open {
    left: 0;
  }
  #page-content {
    width: 100%;
  }
}
