/* ── Google Font (Inter) загружается через base.html ─────────────── */

/* ═══════════════════════════════════════════════════════════════════
   MINISTRY PREMIUM  —  navy + gold identity (matches landing page)
═══════════════════════════════════════════════════════════════════ */
:root {
  /* Brand */
  --c-navy:        #0C1330;
  --c-navy-2:      #15204A;
  --c-navy-3:      #1E2C5E;
  --c-gold:        #C9A227;
  --c-gold-bright: #D9B541;
  --c-gold-soft:   #FAF2D8;
  --c-gold-deep:   #9A7A14;

  /* Semantic */
  --c-primary:     #15204A;     /* navy buttons / primary actions */
  --c-primary-d:   #0C1330;
  --c-primary-l:   #EDEFF7;      /* soft navy tint */
  --c-success:     #1F8A5B;
  --c-warning:     #B7791F;
  --c-danger:      #C0392B;
  --c-info:        #1B6E8C;

  --c-bg:          #EEF1F8;
  --c-surface:     #FFFFFF;
  --c-sidebar:     #0C1330;
  --c-border:      #E5E8F2;
  --c-border-2:    #EDEFF6;
  --c-text:        #111733;
  --c-text-soft:   #4A5276;
  --c-muted:       #79809E;

  --shadow-xs: 0 1px 2px rgba(16,21,51,.05);
  --shadow-sm: 0 1px 3px rgba(16,21,51,.05), 0 6px 18px rgba(20,32,74,.06);
  --shadow-md: 0 2px 6px rgba(16,21,51,.05), 0 16px 38px rgba(20,32,74,.09);
  --shadow-lg: 0 10px 30px rgba(12,19,48,.16), 0 40px 90px rgba(12,19,48,.22);
  --shadow-gold: 0 6px 18px rgba(201,162,39,.30);

  --radius-sm: .5rem;
  --radius:    .9rem;
  --radius-lg: 1.15rem;

  --sidebar-w: 264px;
  --topbar-h:  62px;
  --ease:      .18s ease;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Manrope', 'Inter', system-ui, sans-serif;
}

/* ── Reset / Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--c-text);
  /* Праздничный баннер (35 лет независимости) — очень слабо, под осветляющим слоем */
  background-color: var(--c-bg);
  background-image:
    radial-gradient(1200px 600px at 110% -10%, rgba(21,32,74,.05), transparent 60%),
    linear-gradient(rgba(238,241,248,0.90), rgba(238,241,248,0.95)),
    url('/static/img/festival.jpg?v=1788504180');
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center top;
  background-size: auto, cover, cover;
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
  letter-spacing: -.005em;
}

a { text-decoration: none; color: var(--c-navy-2); transition: color var(--ease); }
a:hover { color: var(--c-gold-deep); }

/* ── Typography scale ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.22;
  color: var(--c-navy);
  text-wrap: balance;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: .98rem; }
h6 { font-size: .86rem; }

p  { line-height: 1.65; }
small, .small { font-size: .8rem; }
.lead { font-size: 1.02rem; color: var(--c-text-soft); line-height: 1.6; }
strong, b { font-weight: 700; }

/* Brand / data display use the heading face + tabular figures */
.brand-text, .topbar-title, .page-title, .stat-value,
.card-header, .modal-title, .login-box h2, .login-brand h1,
.navbar-org .navbar-brand, .sidebar-username, .sidebar-brand {
  font-family: var(--font-head);
}
.stat-value, .table, .pagination, .badge,
.lang-pill, .q-pct, .resp-meta { font-variant-numeric: tabular-nums; }

/* Secondary text — unify Bootstrap's muted with the brand palette */
.text-muted { color: var(--c-muted) !important; }
.text-soft  { color: var(--c-text-soft) !important; }

/* Bootstrap's default utility colours are far too pale on light surfaces
   (#ffc107 / #0dcaf0 fail contrast badly). Map them onto the brand palette. */
.text-warning { color: var(--c-warning) !important; }
.text-info    { color: var(--c-info)    !important; }
.text-success { color: var(--c-success) !important; }
.text-danger  { color: var(--c-danger)  !important; }

/* Section subtitle under a heading */
.sec-sub { color: var(--c-muted); font-size: .86rem; line-height: 1.55; }

::selection { background: var(--c-gold-soft); color: var(--c-navy); }

/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR (admin layout)
═══════════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(201,162,39,.10), transparent 70%),
    linear-gradient(180deg, #0C1330 0%, #0A1028 100%);
  display: flex; flex-direction: column;
  z-index: 1040; overflow-y: auto;
  scrollbar-width: none;
  border-right: 1px solid rgba(201,162,39,.12);
}
.sidebar::-webkit-scrollbar { display: none; }

/* Brand */
.sidebar-brand {
  display: flex; align-items: center; gap: .875rem;
  padding: 1.2rem 1.25rem 1.2rem 1.375rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand img { box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold-deep));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: var(--c-navy);
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}
.brand-text {
  color: white; font-size: .8rem; font-weight: 700;
  line-height: 1.35; letter-spacing: -.01em;
}
.brand-text span { display: block; color: rgba(201,162,39,.75); font-weight: 500; font-size: .68rem; letter-spacing: .02em; }

/* Nav sections */
.sidebar-nav { padding: .75rem 0; flex: 1; }
.nav-section-label {
  font-size: .62rem; font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .12em;
  padding: 1rem 1.5rem .35rem;
}

.sidebar-link {
  display: flex; align-items: center; gap: .8rem;
  padding: .58rem 1rem .58rem 1.375rem;
  color: rgba(255,255,255,.62);
  font-size: .85rem; font-weight: 500;
  transition: background var(--ease), color var(--ease);
  position: relative;
}
.sidebar-link i { font-size: 1.05rem; width: 1.15rem; flex-shrink: 0; transition: color var(--ease); }
/* Счётчик непрочитанного в пункте меню */
.sidebar-badge {
  margin-left: auto; flex: none;
  min-width: 1.35rem; padding: 0 .35rem;
  border-radius: 99px;
  background: var(--c-gold-bright); color: #1B2340;
  font-size: .72rem; font-weight: 800; line-height: 1.35rem;
  text-align: center;
}
.sidebar-link:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.92); }
.sidebar-link:hover i { color: var(--c-gold-bright); }
.sidebar-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(201,162,39,.18), rgba(201,162,39,.04));
}
.sidebar-link.active i { color: var(--c-gold-bright); }
.sidebar-link.active::before {
  content: '';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--c-gold);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(201,162,39,.6);
}

/* Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold-deep));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-navy); font-weight: 800; font-size: .8rem;
  flex-shrink: 0;
}
.sidebar-username { color: white; font-size: .82rem; font-weight: 600; }
.sidebar-role     { color: rgba(201,162,39,.7); font-size: .72rem; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════
   ADMIN MAIN WRAPPER
═══════════════════════════════════════════════════════════════════ */
.app-admin {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
  gap: 1rem;
  box-shadow: var(--shadow-xs);
}
.topbar-title { font-size: 1rem; font-weight: 800; color: var(--c-navy); flex: 1; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.topbar-sep { width: 1px; height: 24px; background: var(--c-border); }

/* Lang switcher pill */
.lang-pill {
  display: flex; gap: 2px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 2rem;
  padding: 2px;
}
.lang-pill button {
  border: none; background: none; outline: none;
  padding: .2rem .65rem;
  border-radius: 2rem;
  font-size: .75rem; font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  transition: all var(--ease);
}
.lang-pill button.active-lang {
  background: var(--c-navy);
  color: var(--c-gold-bright);
  box-shadow: var(--shadow-xs);
}

/* ── Page content ────────────────────────────────────────────────── */
.main-content { padding: 1.75rem; flex: 1; }

/* ═══════════════════════════════════════════════════════════════════
   ORG / EMPLOYEE — TOP NAVBAR
═══════════════════════════════════════════════════════════════════ */
.navbar-org {
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(201,162,39,.12), transparent 70%),
    linear-gradient(180deg, #0C1330, #0A1028) !important;
  height: var(--topbar-h);
  box-shadow: var(--shadow-md);
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(201,162,39,.16);
}
.navbar-org .navbar-brand {
  font-size: .9rem; font-weight: 700;
  color: white !important;
  display: flex; align-items: center; gap: .5rem;
}
.navbar-org .navbar-brand .nb-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold-deep));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--c-navy);
}
.navbar-org .nav-link {
  font-size: .85rem; font-weight: 500;
  color: rgba(255,255,255,.65) !important;
  padding: .4rem .8rem !important;
  border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease);
}
.navbar-org .nav-link:hover  { background: rgba(255,255,255,.08); color: white !important; }
.navbar-org .nav-link.active {
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold)) !important;
  color: var(--c-navy) !important; font-weight: 600;
}
.navbar-org .dropdown-menu { border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .35rem; }
.navbar-org .dropdown-item { border-radius: var(--radius-sm); font-size: .85rem; padding: .5rem .7rem; }
.navbar-org .dropdown-item:hover { background: var(--c-gold-soft); color: var(--c-navy); }

.org-content { padding: 1.75rem; }

/* ═══════════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--c-border);
  font-weight: 700; font-size: .9rem; color: var(--c-navy);
  padding: .95rem 1.35rem;
}
.card-body { padding: 1.35rem; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }

/* ── Stat cards ──────────────────────────────────────────────────── */
.stat-card {
  border: none; border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex; align-items: flex-start; gap: 1rem;
}
.stat-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--c-gold-bright), var(--c-gold-deep));
  opacity: .9;
}
.stat-card::after {
  content: '';
  position: absolute; right: -16px; bottom: -16px;
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: white;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.stat-value { font-size: 1.9rem; font-weight: 800; color: white; line-height: 1; letter-spacing: -.03em; }
.stat-label { font-size: .77rem; color: rgba(255,255,255,.8); margin-top: .25rem; }
.stat-card-blue  { background: linear-gradient(135deg,#1E2C5E 0%,#0C1330 100%); }
.stat-card-green { background: linear-gradient(135deg,#1F8A5B 0%,#0F5C3C 100%); }
.stat-card-amber { background: linear-gradient(135deg,#C49A2A 0%,#9A7A14 100%); }
.stat-card-slate { background: linear-gradient(135deg,#3A456E 0%,#222C4E 100%); }
.stat-card-violet{ background: linear-gradient(135deg,#6B3FA0 0%,#432866 100%); }

/* ═══════════════════════════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════════════════════════ */
.table-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table { margin: 0; }
.table thead th {
  background: #F6F8FD;
  border-bottom: 1.5px solid var(--c-border);
  color: var(--c-muted);
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: .9rem 1rem; white-space: nowrap;
}
.table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--c-border-2);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--ease); }
.table-hover tbody tr:hover  { background: #FBFAF3; }
.table tbody tr.row-deleted  { background: #FAFAFA; }
.table tbody tr.row-deleted td { color: var(--c-muted); }

/* ═══════════════════════════════════════════════════════════════════
   BADGES & PILLS
═══════════════════════════════════════════════════════════════════ */
.badge { font-size: .7rem; font-weight: 600; padding: .34em .7em; border-radius: 2rem; letter-spacing: .01em; }
.badge.bg-success { background: var(--c-success) !important; }
.badge.bg-secondary { background: #6B7396 !important; }
.badge.bg-warning { background: var(--c-warning) !important; }
/* bg-info (#0dcaf0) + белый текст — нечитаемо; bg-primary тоже слабоват */
.badge.bg-info    { background: var(--c-info) !important;    color: #fff !important; }
.badge.bg-primary { background: var(--c-navy-2) !important;  color: #fff !important; }
.modal-header.bg-info { background: var(--c-info) !important; }
.bg-info:not(.bg-opacity-10):not(.bg-opacity-25) { background-color: var(--c-info) !important; }
.badge-soft-primary { background: var(--c-primary-l); color: var(--c-navy-2); }
.badge-soft-success { background: #E9F7EF; color: var(--c-success); }
.badge-soft-danger  { background: #FCEEEC; color: var(--c-danger); }
.badge-soft-gold    { background: var(--c-gold-soft); color: var(--c-gold-deep); }
.badge-soft-muted   { background: var(--c-bg); color: var(--c-muted); border: 1px solid var(--c-border); }

/* ═══════════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════════ */
.form-control, .form-select {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  padding: .55rem .8rem;
  color: var(--c-text);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-control:focus, .form-select:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
  outline: none;
}
.form-control-sm, .form-select-sm { font-size: .82rem; }
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: var(--c-text-soft); }
.form-text  { font-size: .78rem; }

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════ */
.btn { font-weight: 600; border-radius: var(--radius-sm); font-size: .875rem; transition: all var(--ease); }
.btn-sm { font-size: .8rem; }
.btn:focus { box-shadow: 0 0 0 3px rgba(201,162,39,.22); }

.btn-primary { background: var(--c-navy-2); border-color: var(--c-navy-2); color: #fff; }
.btn-primary:hover { background: var(--c-navy); border-color: var(--c-navy); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* Gold CTA */
.btn-gold {
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold));
  border: none; color: var(--c-navy);
}
.btn-gold:hover { box-shadow: var(--shadow-gold); transform: translateY(-1px); color: var(--c-navy); }

.btn-success { background: var(--c-success); border-color: var(--c-success); }
.btn-success:hover { filter: brightness(.94); }
.btn-outline-primary { color: var(--c-navy-2); border-color: var(--c-navy-2); }
.btn-outline-primary:hover { background: var(--c-navy-2); border-color: var(--c-navy-2); }
.btn-outline-secondary:hover { background: var(--c-text-soft); border-color: var(--c-text-soft); }

.btn-icon {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════════════ */
.alert {
  border: none; border-radius: var(--radius-sm);
  font-size: .875rem; border-left: 3px solid;
  padding: .8rem 1.05rem;
}
.alert-success { border-color: var(--c-success); background: #EEF8F2; color: #14613E; }
.alert-danger  { border-color: var(--c-danger);  background: #FCEEEC; color: #8E2C20; }
.alert-warning { border-color: var(--c-warning); background: #FBF4E6; color: #7A5410; }
.alert-info    { border-color: var(--c-info);    background: #EAF4F8; color: #135267; }

/* ═══════════════════════════════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════════════════════════════ */
.filter-bar {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: .95rem 1.35rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.35rem;
}

/* ═══════════════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════════════ */
.pagination .page-link {
  border: 1.5px solid var(--c-border);
  color: var(--c-navy-2);
  border-radius: var(--radius-sm) !important;
  margin: 0 2px; font-size: .8rem; font-weight: 600;
  transition: all var(--ease);
}
.pagination .page-link:hover { background: var(--c-gold-soft); border-color: var(--c-gold); color: var(--c-gold-deep); }
.pagination .page-item.active .page-link { background: var(--c-navy-2); border-color: var(--c-navy-2); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   LIST GROUP
═══════════════════════════════════════════════════════════════════ */
.list-group-item { border-color: var(--c-border-2); font-size: .875rem; }
.list-group-item-action:hover { background: #FBFAF3; }

/* ═══════════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════════ */
.login-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

.login-brand {
  background:
    radial-gradient(600px 360px at 88% 8%, rgba(201,162,39,.16), transparent 60%),
    linear-gradient(150deg, #0C1330 0%, #15204A 60%, #1E2C5E 100%);
  display: flex; flex-direction: column;
  justify-content: center; padding: 3rem 3.5rem;
  position: relative; overflow: hidden;
}
.login-brand::before, .login-brand::after {
  content: ''; position: absolute;
  border-radius: 50%;
}
.login-brand::before { width: 480px; height: 480px; top: -140px; right: -120px; background: rgba(201,162,39,.06); }
.login-brand::after  { width: 320px; height: 320px; bottom: -80px; left: -80px; background: rgba(255,255,255,.03); }

.login-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(201,162,39,.16);
  border: 1px solid rgba(201,162,39,.45);
  color: var(--c-gold-bright);
  padding: .35rem .9rem;
  border-radius: 2rem; font-size: .75rem; font-weight: 600;
  margin-bottom: 1.75rem;
  position: relative; z-index: 1;
}
.login-brand h1 {
  color: white; font-size: 2.2rem; font-weight: 800;
  line-height: 1.18; margin-bottom: .9rem;
  position: relative; z-index: 1;
}
.login-brand p {
  color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.65;
  max-width: 380px; position: relative; z-index: 1;
}
.login-features { margin-top: 2.25rem; position: relative; z-index: 1; }
.login-feat {
  display: flex; align-items: center; gap: .75rem;
  color: rgba(255,255,255,.7); font-size: .845rem; margin-bottom: .8rem;
}
.login-feat-icon {
  width: 30px; height: 30px;
  background: rgba(201,162,39,.2);
  border: 1px solid rgba(201,162,39,.35);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-gold-bright); font-size: .875rem; flex-shrink: 0;
}

.login-form-side {
  background: #FAFAFB;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem;
}
.login-box { width: 100%; max-width: 360px; }
.login-box-logo {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold-deep));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--c-navy);
  box-shadow: var(--shadow-gold);
  margin-bottom: 1.5rem;
}
.login-box h2 { font-size: 1.5rem; font-weight: 800; color: var(--c-navy); margin-bottom: .2rem; }
.login-box .sub { color: var(--c-muted); font-size: .85rem; margin-bottom: 1.75rem; }
.login-lang-bar {
  display: flex; justify-content: flex-end; gap: .5rem;
  margin-bottom: 2rem;
}
.login-lang-btn {
  border: none; background: none;
  font-size: .75rem; font-weight: 600;
  color: var(--c-muted); cursor: pointer;
  padding: .2rem .5rem;
  border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease);
}
.login-lang-btn:hover, .login-lang-btn.active { background: var(--c-gold-soft); color: var(--c-gold-deep); }

/* ═══════════════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════════════ */
.modal-content { border: none; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header  { border-bottom: 1px solid var(--c-border); padding: 1.05rem 1.35rem; }
.modal-header .modal-title { font-weight: 700; color: var(--c-navy); }
.modal-footer  { border-top: 1px solid var(--c-border); padding: .9rem 1.35rem; }

/* ═══════════════════════════════════════════════════════════════════
   FILE CARDS
═══════════════════════════════════════════════════════════════════ */
.file-card { border-radius: var(--radius); border: 1px solid var(--c-border); overflow: hidden; transition: box-shadow var(--ease), transform var(--ease); }
.file-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.file-card-thumb {
  height: 120px; background: #F6F8FD;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--c-muted);
}
.file-card-body { padding: .65rem .8rem; }
.file-name { font-size: .78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════════════════════
   PAGE HEADER UTIL
═══════════════════════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.35rem;
}
.page-title {
  font-size: 1.2rem; font-weight: 800; color: var(--c-navy);
  display: flex; align-items: center; gap: .55rem; margin: 0; letter-spacing: -.02em;
}
.page-title i { color: var(--c-gold); }

/* Accent helpers */
.text-gold { color: var(--c-gold-deep) !important; }
.text-navy { color: var(--c-navy) !important; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.show { transform: translateX(0); }
  /* Без display:block !important: он перебивал .d-none, и затемнение
     висело поверх страницы всегда — на телефоне ничего не нажималось.
     Видимость управляется только классом d-none из toggleSidebar(). */
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(12,19,48,.5); z-index: 1039; }
  .app-admin { margin-left: 0; }
}
@media (max-width: 767.98px) {
  .login-wrapper { grid-template-columns: 1fr; }
  .login-brand   { display: none; }
  .main-content, .org-content { padding: 1rem; }
}
@media (max-width: 575.98px) {
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.5rem; }
}
