/**
 * Admin Panel - Ana Layout (Modern Dark, Responsive)
 * Grid, Sidebar, Header, Footer, Container
 */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.body--sidebar-open {
  overflow: hidden;
}

body.body--card-maximized {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

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

/* Layout Grid */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr auto;
  grid-template-areas:
    "sidebar header"
    "sidebar main"
    "sidebar footer";
  min-height: 100vh;
}

.layout--sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}

/* Sidebar - glass effect (dark sidebar her temada) */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  color: var(--text-primary);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width var(--transition), grid-template-columns var(--transition), background var(--transition);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar__brand {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.sidebar__logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-accent);
  box-shadow: var(--accent-glow);
}

.sidebar__logo::before {
  content: "A";
  line-height: 1;
}

.sidebar__title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

/* Mobil menü kapatma — görünürlük mobile.css (≤992px) */
.sidebar__close {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  margin-left: var(--space-xs);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.sidebar__close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar__close-icon {
  display: block;
  flex-shrink: 0;
}

.sidebar--collapsed .sidebar__title {
  opacity: 0;
  width: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.sidebar--collapsed .nav__text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.sidebar__user {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.sidebar__user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar__user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar--collapsed .sidebar__user {
  justify-content: center;
  padding: var(--space-sm);
  position: relative;
}

.sidebar--collapsed .sidebar__user-name {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 50;
  width: auto;
  overflow: visible;
}

.sidebar--collapsed .sidebar__user:hover .sidebar__user-name {
  opacity: 1;
  visibility: visible;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-sm);
  margin-top: var(--space-xs);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.sidebar__nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar__nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar__nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.sidebar__nav::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

.nav__list {
  list-style: none;
}

.nav__item {
  margin-bottom: var(--space-xs);
}

.nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  border-left: 3px solid transparent;
}

.nav__link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav__link:active {
  transform: scale(0.98);
}

.nav__link:focus-visible,
.nav__link--parent:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav__link--active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 500;
  border-left-color: var(--accent);
}

.nav__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav__text {
  white-space: nowrap;
}

.nav__badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}

/* Collapsed: hover tooltip (text flies out to the right) */
.sidebar--collapsed .nav__link .nav__text {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 50;
  width: auto;
  overflow: visible;
  pointer-events: none;
}

.sidebar--collapsed .nav__item:hover .nav__link .nav__text {
  opacity: 1;
  visibility: visible;
}

.sidebar--collapsed .nav__link .nav__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  margin-left: 0;
}

/* Alt menü (collapsible) */
.nav__item--has-children .nav__link--parent {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text-muted);
}

.nav__item--has-active > .nav__link--parent {
  color: var(--text-primary);
  font-weight: 500;
}

.nav__chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform var(--transition);
  opacity: 0.7;
}

.nav__item--open .nav__chevron {
  transform: rotate(-135deg);
}

.nav__submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
  padding-left: 0;
}

.nav__item--open .nav__submenu {
  max-height: 400px;
}

.nav__submenu .nav__item {
  margin-bottom: 0;
}

.nav__submenu {
  border-left: 1px solid var(--border-color);
  margin-left: var(--space-md);
}

.nav__submenu .nav__link {
  padding-left: var(--space-lg);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
  font-size: 0.875rem;
  border-left: none;
}

.nav__submenu .nav__link--active {
  background: var(--accent-muted);
  color: var(--accent);
  border-left: 3px solid var(--accent);
  margin-left: -1px;
  padding-left: calc(var(--space-lg) - 2px);
}

.sidebar--collapsed .nav__submenu {
  display: none;
}

.sidebar--collapsed .nav__item--open .nav__submenu {
  display: none;
}

.sidebar--collapsed .nav__link {
  justify-content: center;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.sidebar--collapsed .nav__link--parent .nav__chevron {
  display: none;
}

/* ========== HEADER (Modern, glass, BEM - sidebar.md) ========== */
.header {
  grid-area: header;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(var(--space-sm), var(--safe-area-top)) var(--space-lg) var(--space-sm);
  padding-left: max(var(--space-lg), var(--safe-area-left));
  padding-right: max(var(--space-lg), var(--safe-area-right));
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  box-shadow: 0 1px 0 0 var(--glass-border), var(--shadow);
  gap: var(--space-md);
  transition: background var(--transition), border-color var(--transition);
}

.header__left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
  flex: 1;
}

.header__toggle {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.header__toggle:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.header__toggle:active {
  transform: scale(0.97);
}

.header__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.header__toggle-icon {
  width: 22px;
  height: 18px;
  position: relative;
  display: block;
}

.header__toggle-icon span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--radius-full);
  background: currentColor;
  transition: transform var(--transition-slow), opacity var(--transition);
}

.header__toggle-icon span:nth-child(1) { top: 0; }
.header__toggle-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.header__toggle-icon span:nth-child(3) { bottom: 0; }

/* Header breadcrumb - chevron separator */
.header__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__breadcrumb ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header__breadcrumb li:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: var(--space-xs);
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(-45deg);
  opacity: 0.7;
}

.header__breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
}

.header__breadcrumb a:hover {
  color: var(--accent);
}

.header__breadcrumb .header__breadcrumb--active {
  color: var(--text-primary);
  font-weight: 600;
}

.header__search-wrap {
  position: relative;
  flex-shrink: 0;
}

.header__search-wrap .header__search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.header__search-wrap:focus-within .header__search-icon {
  color: var(--accent);
}

.header__search {
  width: 220px;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.header__search::placeholder {
  color: var(--text-muted);
}

.header__search:hover {
  border-color: var(--border-light);
}

.header__search:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

/* Header right: balance, rank, notifications, profile */
.header__right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Bakiye göstergesi - wallet icon, artış/azalış animasyonu */
.header__balance {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--bg-hover);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.header__balance:hover {
  background: var(--bg-active);
  border-color: var(--border-light);
}

.header__balance-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.9;
}

.header__balance--positive {
  color: var(--success);
}

.header__balance--positive .header__balance-icon {
  color: var(--success);
}

.header__balance--negative {
  color: var(--danger);
}

.header__balance--negative .header__balance-icon {
  color: var(--danger);
}

.header__balance--neutral {
  color: var(--text-muted);
}

.header__balance--neutral .header__balance-icon {
  color: var(--text-muted);
  opacity: 0.75;
}

/* Bakiye değişim animasyonu (artış/azalış) */
.header__balance-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  transition: transform var(--transition), opacity var(--transition);
}

.header__balance--up .header__balance-value {
  animation: balanceUp 0.6s ease;
}

.header__balance--down .header__balance-value {
  animation: balanceDown 0.6s ease;
}

@keyframes balanceUp {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); color: var(--success); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes balanceDown {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); color: var(--danger); }
  100% { opacity: 1; transform: scale(1); }
}

.header__balance--pulse .header__balance-value {
  animation: balancePulse 1.5s ease;
}

@keyframes balancePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .header__balance--up .header__balance-value,
  .header__balance--down .header__balance-value,
  .header__balance--pulse .header__balance-value {
    animation: none;
  }
  .header__icon-btn .badge--danger {
    animation: none;
  }
}

/* Rütbe badge - reusable, gradient, pill */
.header__rank {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition);
}

.header__rank:hover {
  transform: translateY(-1px);
}

.header__rank--bronze {
  background: linear-gradient(135deg, rgba(168, 162, 158, 0.35) 0%, rgba(168, 162, 158, 0.12) 100%);
  color: var(--rank-bronze);
  border-color: rgba(168, 162, 158, 0.4);
}

.header__rank--silver {
  background: linear-gradient(135deg, rgba(214, 211, 209, 0.35) 0%, rgba(214, 211, 209, 0.12) 100%);
  color: var(--rank-silver);
  border-color: rgba(214, 211, 209, 0.4);
}

.header__rank--gold {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.35) 0%, rgba(250, 204, 21, 0.12) 100%);
  color: var(--rank-gold);
  border-color: rgba(250, 204, 21, 0.4);
}

.header__rank--platinum {
  background: linear-gradient(135deg, var(--accent-muted) 0%, rgba(91, 141, 239, 0.08) 100%);
  color: var(--rank-platinum);
  border-color: rgba(91, 141, 239, 0.35);
}

.header__rank--admin {
  background: linear-gradient(135deg, var(--danger-muted) 0%, rgba(248, 113, 113, 0.08) 100%);
  color: var(--rank-admin);
  border-color: rgba(248, 113, 113, 0.4);
}

.header__icon-btn {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.header__icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header__icon-btn:active {
  transform: scale(0.96);
}

.header__icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.header__icon-btn .header__icon-btn-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.header__icon-btn .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 2px var(--bg-card);
}

.header__icon-btn .badge--danger {
  animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

/* Tema değiştirici - pill style */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}

.theme-toggle__btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.theme-toggle__btn:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.theme-toggle__btn:active {
  transform: scale(0.95);
}

[data-theme="dark"] .theme-toggle__btn[data-theme-set="dark"],
[data-theme="light"] .theme-toggle__btn[data-theme-set="light"] {
  background: var(--accent-muted);
  color: var(--accent);
}

.theme-toggle__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Profil - avatar ring, online durumu, chevron animasyonu */
.header__profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  padding-right: var(--space-md);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
}

.header__profile:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.header__profile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.header__profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.header__profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
  border: 2px solid var(--border-color);
  display: block;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header__profile:hover .header__profile-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-muted);
}

.header__profile-avatar-wrap::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--success);
}

.header__profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.header__profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.header__profile-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header__profile-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-slow);
}

.dropdown--open .header__profile-chevron,
.header__profile--btn[aria-expanded="true"] .header__profile-chevron {
  transform: rotate(180deg);
}

.header__profile--btn {
  width: auto;
  font-family: inherit;
  cursor: pointer;
}

/* Main Content */
.main {
  grid-area: main;
  padding: var(--space-lg);
  padding-bottom: max(var(--space-lg), var(--safe-area-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.main__breadcrumb {
  margin-bottom: var(--space-md);
}

.main__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.content-header .main__title {
  margin-bottom: 0;
}

.content-header__subtitle,
.main__subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: var(--space-xs) 0 0 0;
  font-weight: 400;
}

.content-header > div:first-child {
  min-width: 0;
}

.content-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Container & Grid */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* Footer */
.footer {
  grid-area: footer;
  padding: var(--space-md) var(--space-lg);
  padding-bottom: max(var(--space-md), var(--safe-area-bottom));
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__copy {
  text-align: center;
}
