@import url('../fonts/inter/inter.css');

/* ─── Design Tokens ─── */
:root {
  --primary:       #1a2744;
  --primary-dark:  #111b33;
  --primary-light: #243660;
  --accent:        #c8102e;
  --accent-dark:   #a00d24;
  --bg:            #f0f2f7;
  --card:          #ffffff;
  --text:          #1e2d45;
  --text-muted:    #6b7a99;
  --border:        #dde3f0;
  --success:       #2d8c4e;
  --error:         #c8102e;
  --warning:       #c47c0a;
  --info:          #1a5fa8;
  --rail-w:        64px;
  --panel-w:       220px;
  --sidebar-total: 284px;
  --header-h:      64px;
  --radius:        8px;
  --radius-lg:     14px;
  --shadow:        0 2px 12px rgba(26,39,68,.08);
  --shadow-lg:     0 8px 32px rgba(26,39,68,.14);
  --transition:    .18s ease;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--card);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Typography ─── */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.25; }
h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

/* ─── Layout (authenticated) ─── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar Shell ─── */
.sidebar-shell {
  width: var(--sidebar-total);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  z-index: 100;
  transition: width var(--transition);
}
.layout.panel-hidden .sidebar-shell { width: var(--rail-w); }

/* ─── Icon Rail (Column 1) ─── */
.sidebar-rail {
  width: var(--rail-w);
  flex-shrink: 0;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .875rem 0 .75rem;
  overflow: visible;
}
.rail-logo {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  margin-bottom: .875rem;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
  text-decoration: none !important;
}
.rail-logo img { width: 28px; height: 28px; object-fit: contain; }
.rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  flex: 1;
  width: 100%;
  padding: 0 .625rem;
}
.rail-item {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.rail-item svg { width: 18px; height: 18px; }
.rail-item:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.rail-item.active { background: rgba(255,255,255,.18); color: #fff; }
.rail-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .75rem 0 .25rem;
  width: 100%;
}
.rail-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .75rem;
  cursor: default; flex-shrink: 0;
}
.rail-logout {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  color: rgba(255,255,255,.45);
  transition: background var(--transition), color var(--transition);
  text-decoration: none !important;
  flex-shrink: 0;
}
.rail-logout svg { width: 17px; height: 17px; }
.rail-logout:hover { background: rgba(200,16,46,.25); color: #ff8099; text-decoration: none !important; }

/* ─── Rail CSS Tooltips ─── */
.sidebar-rail [data-tip] { position: relative; }
.sidebar-rail [data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, .92);
  color: #fff;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  padding: .3rem .65rem;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  z-index: 500;
}
.sidebar-rail [data-tip]:hover::after { opacity: 1; }

/* ─── Sub-menu Panel (Column 2) ─── */
.sidebar-panel {
  width: var(--panel-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition);
}
.layout.panel-hidden .sidebar-panel { width: 0; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 .875rem;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-title {
  font-weight: 700; font-size: .9rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.panel-toggle:hover { background: var(--bg); color: var(--text); }
.panel-toggle svg { width: 13px; height: 13px; transition: transform var(--transition); }
.layout.panel-hidden .panel-toggle svg { transform: rotate(180deg); }
.panel-body { flex: 1; overflow-y: auto; padding: .5rem 0; }
.panel-section { display: none; padding: .25rem 0; }
.panel-section.active { display: block; }
.panel-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem 1rem;
  color: var(--text-muted);
  font-size: .85rem; font-weight: 400;
  text-decoration: none !important;
  transition: background var(--transition), color var(--transition);
  border-radius: 6px;
  margin: 0 .5rem .1rem;
  white-space: nowrap;
}
.panel-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .65; }
.panel-item:hover { background: var(--bg); color: var(--text); }
.panel-item:hover svg { opacity: .9; }
.panel-item.active { background: rgba(26,39,68,.07); color: var(--primary); font-weight: 600; }
.panel-item.active svg { opacity: 1; }
.panel-footer { padding: .875rem; border-top: 1px solid var(--border); flex-shrink: 0; }
.panel-user { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.panel-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .72rem; flex-shrink: 0;
}
.panel-user-info strong { display: block; font-size: .8rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.panel-user-info span   { display: block; font-size: .7rem; color: var(--text-muted); }
.panel-logout {
  display: block; text-align: center;
  background: rgba(200,16,46,.08);
  color: var(--accent) !important;
  border-radius: var(--radius);
  padding: .35rem; font-size: .78rem; font-weight: 600;
  transition: background var(--transition);
  text-decoration: none !important;
  margin-top: .5rem;
}
.panel-logout:hover { background: rgba(200,16,46,.18); text-decoration: none !important; }

/* ─── Main area ─── */
.main-wrap {
  margin-left: var(--sidebar-total);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.layout.panel-hidden .main-wrap { margin-left: var(--rail-w); }

/* ─── Top header ─── */
.top-header {
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }
.header-user { position: relative; }
.header-user-btn {
  display: flex; align-items: center; gap: .6rem;
  background: transparent; border: none; cursor: pointer;
  padding: .3rem .5rem; border-radius: var(--radius);
  transition: background var(--transition);
}
.header-user-btn:hover, .header-user-btn.open { background: var(--border); }
.header-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .8rem;
  flex-shrink: 0;
}
.header-user-info strong { display: block; font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.2; text-align: left; }
.header-user-info span   { display: block; font-size: .7rem; color: var(--text-muted); line-height: 1.2; text-align: left; }
.header-user-chevron { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; transition: transform var(--transition); }
.header-user-btn.open .header-user-chevron { transform: rotate(180deg); }

.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .35rem;
  display: none;
  z-index: 300;
}
.header-dropdown.open { display: block; }
.header-dropdown-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .75rem;
  font-size: .875rem; color: var(--text);
  border-radius: 6px;
  text-decoration: none !important;
  transition: background var(--transition), color var(--transition);
}
.header-dropdown-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .65; }
.header-dropdown-item:hover { background: var(--bg); }
.header-dropdown-item:hover svg { opacity: 1; }
.header-dropdown-danger { color: var(--accent); }
.header-dropdown-danger svg { color: var(--accent); opacity: .8; }
.header-dropdown-danger:hover { background: #fff1f3; }
.header-dropdown-divider { height: 1px; background: var(--border); margin: .3rem 0; }

/* ─── Page content ─── */
.page-content {
  flex: 1;
  padding: 2rem;
}
.page-header {
  margin-bottom: 1.75rem;
}
.page-header h1 { font-size: 1.5rem; }
.page-header p { color: var(--text-muted); margin-top: .25rem; }

/* ─── Cards ─── */
.card {
  background: var(--card);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.card + .card { margin-top: 1.25rem; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 { margin: 0; }
.card-title { font-size: 1rem; font-weight: 600; }

/* ─── Grid ─── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── Stat cards ─── */
.stat-card {
  background: var(--card);
  border-radius: 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--text); }
.stat-sub   { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; }

/* ─── Forms ─── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
  letter-spacing: .01em;
}
.form-control {
  width: 100%;
  padding: .625rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(26,39,68,.1);
}
.form-control::placeholder { color: #b0bacc; }
.form-text { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.form-error { font-size: .78rem; color: var(--error); margin-top: .3rem; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}
.btn-danger:hover { background: var(--accent-dark); }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--border); color: var(--text); }
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-sm { padding: .375rem .875rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ─── Alerts ─── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  border: 1px solid transparent;
}
.alert-error   { background: #fff1f3; color: #9a0e24; border-color: #fcc; }
.alert-success { background: #f0faf4; color: #1e6b39; border-color: #b8e8ca; }
.alert-warning { background: #fffbf0; color: #925d06; border-color: #f8d98a; }
.alert-info    { background: #f0f6ff; color: #1248a0; border-color: #b3d0ff; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(240,242,247,.6); }

/* ─── Badges ─── */
.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-admin      { background: #fde8ec; color: #9a0e24; }
.badge-finance    { background: #e8f5e9; color: #1e6b39; }
.badge-manager    { background: #e8eeff; color: #1248a0; }
.badge-editor     { background: #fff8e1; color: #925d06; }
.badge-journalist { background: #f3e8ff; color: #6b1fa6; }
.badge-active     { background: #e8f5e9; color: #1e6b39; }
.badge-inactive   { background: #fde8ec; color: #9a0e24; }
.badge-success    { background: #e8f5e9; color: #1e6b39; }
.badge-info       { background: #e8eeff; color: #1248a0; }
.badge-warning    { background: #fff8e1; color: #925d06; }
.badge-muted      { background: var(--border); color: var(--text-muted); }

/* ─── Pagination ─── */
.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .82rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.pagination li a:hover { background: var(--border); }
.pagination li.active a,
.pagination li.active span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.pagination li.disabled a,
.pagination li.disabled span {
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── Auth layout ─── */
.auth-wrap {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 60%, #0d1220 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2.25rem;
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo img {
  height: 112px;
  margin: 0 auto .75rem;
  object-fit: contain;
}
.auth-logo h1 {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}
.auth-logo p {
  font-size: .82rem;
  color: var(--text-muted);
  margin: .25rem 0 0;
}
.auth-divider {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin: 1.25rem 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.auth-divider span {
  position: relative;
  z-index: 1;
  background: var(--card);
  padding: 0 .75rem;
}
.auth-footer {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ─── Homepage ─── */
.home-wrap {
  min-height: 100vh;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
}
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.home-nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none !important;
}
.home-nav-brand img { height: 36px; object-fit: contain; }
.home-nav-brand span { color: #fff; font-weight: 700; font-size: 1rem; }
.home-nav-actions { display: flex; gap: .75rem; }
.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
}
.home-logo {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto 2rem;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.home-hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  max-width: 600px;
  margin-bottom: 1rem;
}
.home-hero h1 span { color: var(--accent); }
.home-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.home-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  padding: .85rem 2.25rem;
  font-size: 1rem;
}
.btn-hero-primary:hover { background: var(--accent-dark); }
.btn-hero-outline {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.2);
  padding: .85rem 2.25rem;
  font-size: 1rem;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.15); }
.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 900px;
  width: 100%;
  margin: 4rem auto 0;
  padding: 0 2rem;
}
.feature-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.feature-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.feature-card h3 { color: #fff; font-size: .95rem; margin-bottom: .4rem; }
.feature-card p { color: rgba(255,255,255,.5); font-size: .82rem; margin: 0; }
.home-footer {
  text-align: center;
  padding: 2rem;
  color: rgba(255,255,255,.3);
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 4rem;
}

/* ─── Notice register ─── */
.register-notice {
  background: rgba(26,39,68,.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ─── Utilities ─── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: .82rem; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .home-features { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 768px) {
  .sidebar-shell { transform: translateX(calc(-1 * var(--sidebar-total))); }
  .main-wrap { margin-left: 0 !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .home-nav { padding: 1rem 1.5rem; }
  .home-hero h1 { font-size: 2rem; }
  .page-content { padding: 1.25rem; }
}

/* ─── Language Switcher ─── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
}
.lang-switcher a {
  padding: .2rem .45rem;
  border-radius: 4px;
  color: rgba(255,255,255,.55);
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none !important;
  transition: background var(--transition), color var(--transition);
}
.lang-switcher a:hover { color: #fff; background: rgba(255,255,255,.1); }
.lang-switcher a.active { color: #fff; background: rgba(255,255,255,.15); }
.lang-switcher-dark a { color: var(--text-muted); }
.lang-switcher-dark a:hover { color: var(--text); background: var(--bg); }
.lang-switcher-dark a.active { color: var(--primary); background: var(--bg); }
.lang-sep { color: rgba(255,255,255,.2); padding: 0 .1rem; }
.lang-sep-dark { color: var(--border); }
