/* ============================================================
   МОЕОСС — Premium Dark/Light Design System
   ============================================================ */

:root[data-theme="dark"] {
  --bg-root: #070912;
  --bg-0: #0b0f1a;
  --bg-1: #111626;
  --bg-2: #161c30;
  --bg-3: #1c2340;
  --bg-elev: rgba(22, 28, 48, 0.7);
  --bg-glass: rgba(17, 22, 38, 0.65);
  --bg-glass-strong: rgba(17, 22, 38, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(99, 102, 241, 0.35);
  --text-0: #f5f7fb;
  --text-1: #e0e5f0;
  --text-2: #9aa3b8;
  --text-3: #6b7490;
  --text-inv: #ffffff;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --accent-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(139,92,246,.15) 50%, rgba(236,72,153,.15) 100%);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.45);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --transition-slow: .4s cubic-bezier(.4,0,.2,1);
  --transition-spring: .5s cubic-bezier(.34,1.56,.64,1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

:root[data-theme="light"] {
  /* Тёплый бежевый фон */
  --bg-root: #e8dfd0;
  --bg-0: #f3ebe0;
  --bg-1: #faf6ef;
  --bg-2: #efe6d8;
  --bg-3: #e3d7c5;
  --bg-elev: rgba(250, 246, 239, 0.88);
  --bg-glass: rgba(250, 246, 239, 0.78);
  --bg-glass-strong: rgba(250, 246, 239, 0.94);
  --border: rgba(120, 95, 60, 0.14);
  --border-strong: rgba(120, 95, 60, 0.22);
  --border-accent: rgba(99, 102, 241, 0.28);
  --text-0: #2a241c;
  --text-1: #3d3428;
  --text-2: #6b5e4e;
  --text-3: #8a7d6b;
  --text-inv: #ffffff;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --accent-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(139,92,246,.1) 50%, rgba(236,72,153,.1) 100%);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.1);
  --shadow-sm: 0 2px 8px rgba(90, 70, 45, 0.07);
  --shadow-md: 0 8px 24px rgba(90, 70, 45, 0.1);
  --shadow-lg: 0 20px 60px rgba(90, 70, 45, 0.14);
  --shadow-glow: 0 0 40px rgba(196, 168, 120, 0.22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --transition-slow: .4s cubic-bezier(.4,0,.2,1);
  --transition-spring: .5s cubic-bezier(.34,1.56,.64,1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-1);
  background: var(--bg-0);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(99,102,241,.18), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(236,72,153,.15), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(139,92,246,.08), transparent 60%),
    var(--bg-0);
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(15deg); }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 18% 0%, rgba(212, 184, 150, 0.45), transparent 52%),
    radial-gradient(ellipse 70% 50% at 85% 100%, rgba(196, 168, 140, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 40% at 50% 45%, rgba(232, 214, 186, 0.4), transparent 62%),
    var(--bg-0);
  animation: none;
}

:root[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(120, 95, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 95, 60, 0.04) 1px, transparent 1px);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-2), var(--accent-3));
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-0);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

/* ============ LAYOUT ============ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  min-height: 40px;
  user-select: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.2), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--accent-grad);
  color: var(--text-inv);
  box-shadow: 0 4px 16px rgba(99, 102, 241, .35), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .5), inset 0 1px 0 rgba(255,255,255,.2);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-accent);
  color: var(--text-0);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: var(--text-inv);
  box-shadow: 0 4px 16px rgba(239, 68, 68, .3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, .45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-0);
  border-color: var(--border);
}

.btn-sm { padding: 6px 14px; font-size: 12px; min-height: 32px; }
.btn-lg { padding: 14px 28px; font-size: 15px; min-height: 48px; }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius);
}
.btn-icon.btn-sm { width: 32px; height: 32px; }

/* ============ FORM CONTROLS ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.form-input, .form-control,
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"],
input[type="search"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-0);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  outline: none;
}

.form-input:hover, .form-control:hover,
input:hover, select:hover, textarea:hover {
  border-color: var(--border-strong);
}

.form-input:focus, .form-control:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15), 0 0 20px rgba(99, 102, 241, .1);
  background: var(--bg-glass-strong);
}

input::placeholder, textarea::placeholder { color: var(--text-3); }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

textarea { resize: vertical; min-height: 80px; }

input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-glow {
  position: relative;
}
.card-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--accent-grad);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition);
  filter: blur(12px);
}
.card-glow:hover::after { opacity: .3; }

/* ============ HEADER ============ */
.app-header {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 16px;
  z-index: 100;
  animation: slideDown .5s ease both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.brand-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .4), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.3), transparent 50%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-org {
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-org-badge {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.2); }
}

.user-menu-wrap { position: relative; }

.user-menu-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  color: var(--text-1);
}
.user-menu-btn:hover {
  background: var(--accent-grad-soft);
  border-color: var(--border-accent);
  transform: rotate(90deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1000;
  display: none;
  animation: dropdownIn .2s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-menu-dropdown.show { display: block; }

.user-menu-title {
  padding: 12px 14px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-1);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.user-menu-item:hover {
  background: var(--accent-grad-soft);
  color: var(--text-0);
}
.user-menu-item.danger { color: var(--danger); }
.user-menu-item.danger:hover { background: var(--danger-soft); }

.user-menu-icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* ============ MAIN NAVIGATION ============ */
.main-sections {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}
.main-sections::-webkit-scrollbar { display: none; }

.main-section-btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
}

.main-section-btn:hover {
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.04);
}

.main-section-btn.active {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: none;
}

.main-section-btn .nav-icon {
  width: 16px; height: 16px;
  display: inline-grid;
  place-items: center;
}

.main-section-content { display: none; animation: fadeUp .4s ease both; }
.main-section-content.active { display: block; }

/* ============ SUB TABS ============ */
.sub-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-tabs::-webkit-scrollbar { display: none; }

.sub-tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--transition);
}
.sub-tab-btn:hover { color: var(--text-0); background: var(--bg-glass); }
.sub-tab-btn.active {
  color: var(--text-0);
  background: var(--bg-glass-strong);
  box-shadow: var(--shadow-sm);
}

.sub-tab-content { display: none; animation: fadeUp .3s ease both; }
.sub-tab-content.active { display: block; }

/* ============ TABLES ============ */
.table-wrap {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table-scroll { overflow-x: auto; }

table.data-table, table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table thead {
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 2;
}

table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table td {
  padding: 14px 16px;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table tbody tr {
  transition: all var(--transition);
}
table tbody tr:hover {
  background: var(--accent-grad-soft);
}
table tbody tr:last-child td { border-bottom: none; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  letter-spacing: .02em;
  white-space: nowrap;
}

.badge-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(245,158,11,.2); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239,68,68,.2); }
.badge-info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(59,130,246,.2); }
.badge-neutral { background: var(--bg-glass); color: var(--text-2); border: 1px solid var(--border); }
.badge-accent { background: var(--accent-grad-soft); color: var(--accent); border: 1px solid var(--border-accent); }

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 18, .7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn .2s ease;
  overflow-y: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal.modal--wide { max-width: 1000px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--accent-grad-soft);
  border: 1px solid var(--border-accent);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 18px;
}

.close-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  font-size: 18px;
}
.close-btn:hover {
  background: var(--danger-soft);
  border-color: rgba(239,68,68,.3);
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============ LOGIN PAGE ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-bg-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.login-bg-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  animation: orbFloat 15s ease-in-out infinite;
}
.login-bg-orbs span:nth-child(1) {
  width: 400px; height: 400px;
  background: var(--accent);
  top: -100px; left: -100px;
}
.login-bg-orbs span:nth-child(2) {
  width: 350px; height: 350px;
  background: var(--accent-3);
  bottom: -100px; right: -100px;
  animation-delay: -5s;
}
.login-bg-orbs span:nth-child(3) {
  width: 300px; height: 300px;
  background: var(--accent-2);
  top: 40%; left: 50%;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(.95); }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  animation: modalIn .6s cubic-bezier(.34,1.56,.64,1);
}

.login-card {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-brand-logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 12px 32px rgba(99, 102, 241, .4), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

.login-brand-text {
  font-size: 22px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-0);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form .form-group { margin-bottom: 0; }

.login-form input {
  padding: 14px 16px;
  font-size: 14px;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: all var(--transition);
}
.password-toggle:hover { color: var(--text-0); background: var(--bg-glass); }

.login-form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
}

.forgot-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.forgot-link:hover { color: var(--accent-2); }

.btn-login {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  background: var(--accent-grad);
  color: var(--text-inv);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .4), inset 0 1px 0 rgba(255,255,255,.15);
  position: relative;
  overflow: hidden;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, .5), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-login:active { transform: translateY(0); }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-tariffs {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-glass);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
}
.btn-tariffs:hover {
  background: var(--accent-grad-soft);
  border-color: var(--border-accent);
  color: var(--text-0);
}

/* ============ SECTION TITLE ============ */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding: 4px 0 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.section-title-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .3);
  flex-shrink: 0;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}

.section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ STATS CARDS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-color, var(--accent-grad));
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--stat-soft, var(--accent-grad-soft));
  color: var(--stat-color, var(--accent));
  display: grid;
  place-items: center;
  font-size: 18px;
}

.stat-card-trend {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}
.stat-card-trend.up { background: var(--success-soft); color: var(--success); }
.stat-card-trend.down { background: var(--danger-soft); color: var(--danger); }

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

/* ============ NEWS CARDS ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.news-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.news-card-cover {
  height: 160px;
  background: var(--accent-grad);
  position: relative;
  overflow: hidden;
}

.news-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6));
}

.news-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.news-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.3;
}

.news-card-excerpt {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-3);
}

/* ============ HOUSE CARDS ============ */
.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.house-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.house-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
}

.house-card-media,
.house-card__media {
  height: 140px;
  background: var(--accent-grad);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.house-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5));
}

.house-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: white;
  z-index: 1;
}

.house-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.house-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.3;
}

.house-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}

.house-card-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.house-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ============ ADMIN TABS ============ */
.admin-tabs-main {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs-main::-webkit-scrollbar { display: none; }

.admin-group-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-group-btn:hover {
  color: var(--text-0);
  background: var(--bg-glass);
}

.admin-group-btn.active {
  color: var(--text-inv);
  background: var(--accent-grad);
  box-shadow: 0 4px 16px rgba(99, 102, 241, .35);
}

.admin-sub-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-sub-tabs::-webkit-scrollbar { display: none; }

.admin-tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--transition);
}
.admin-tab-btn:hover { color: var(--text-0); background: var(--bg-glass); }
.admin-tab-btn.active {
  color: var(--text-0);
  background: var(--bg-glass-strong);
  box-shadow: var(--shadow-sm);
}

.admin-tab-content { display: none; animation: fadeUp .3s ease both; }
.admin-tab-content.active { display: block; }

/* ============ TOOLBAR ============ */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toolbar input, .toolbar select {
  flex: 1;
  min-width: 160px;
}

/* ============ TOAST NOTIFICATIONS ============ */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 400px;
}

.notification {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  animation: toastIn .4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

.notification::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--toast-color, var(--accent-grad));
}

.notification.success { --toast-color: linear-gradient(180deg, var(--success), #059669); }
.notification.warning { --toast-color: linear-gradient(180deg, var(--warning), #d97706); }
.notification.error { --toast-color: linear-gradient(180deg, var(--danger), #dc2626); }
.notification.info { --toast-color: linear-gradient(180deg, var(--info), #2563eb); }

.notification-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: var(--toast-soft, var(--accent-grad-soft));
  color: var(--toast-color-icon, var(--accent));
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification.success .notification-icon {
  --toast-soft: var(--success-soft);
  --toast-color-icon: var(--success);
}
.notification.error .notification-icon {
  --toast-soft: var(--danger-soft);
  --toast-color-icon: var(--danger);
}
.notification.warning .notification-icon {
  --toast-soft: var(--warning-soft);
  --toast-color-icon: var(--warning);
}
.notification.info .notification-icon {
  --toast-soft: var(--info-soft);
  --toast-color-icon: var(--info);
}

.notification-content { flex: 1; min-width: 0; }
.notification-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 2px;
}
.notification-message {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

.notification-close {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.notification-close:hover { color: var(--text-0); background: var(--bg-glass); }

/* ============ PROGRESS BAR ============ */
.progress-bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: var(--radius-pill);
  transition: width .6s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}

.empty-state-icon {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 32px;
  opacity: .6;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-3);
}

/* ============ LOADING SKELETON ============ */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-2) 0%,
    var(--bg-3) 50%,
    var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text-1);
  transition: all var(--transition);
  font-size: 18px;
}
.theme-toggle:hover {
  background: var(--accent-grad-soft);
  border-color: var(--border-accent);
  transform: rotate(180deg);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .container { padding: 16px; }
  .app-header { padding: 12px 16px; border-radius: var(--radius-lg); }
  .brand-subtitle { display: none; }
  .user-org { display: none; }
  .modal { padding: 20px; border-radius: var(--radius-lg); }
  .login-card { padding: 28px 20px; }
  .login-title { font-size: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card-value { font-size: 24px; }
  .section-title { font-size: 18px; }
  .section-title-icon { width: 36px; height: 36px; font-size: 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-section-btn { padding: 10px 14px; font-size: 12px; }
  .main-section-btn .nav-icon { display: none; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
}

/* ============ UTILITIES ============ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ============ ANIMATIONS ============ */
.fade-in { animation: fadeIn .3s ease both; }
.fade-up { animation: fadeUp .4s ease both; }
.scale-in { animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1) both; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .2s; }
.stagger > *:nth-child(5) { animation-delay: .25s; }
.stagger > *:nth-child(6) { animation-delay: .3s; }
.stagger > *:nth-child(7) { animation-delay: .35s; }
.stagger > *:nth-child(8) { animation-delay: .4s; }

/* ============ SPECIAL COMPONENTS ============ */

/* Tariff cards */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.tariff-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.tariff-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
}

.tariff-card.featured {
  background: var(--accent-grad-soft);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.tariff-card.featured::before {
  content: 'Популярный';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: var(--accent-grad);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .06em;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .4);
}

.tariff-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .35);
}

.tariff-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-0);
  margin-bottom: 6px;
}

.tariff-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 20px;
  line-height: 1.5;
}

.tariff-price {
  font-size: 32px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.tariff-period {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 20px;
}

.tariff-features {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}

.tariff-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}
.tariff-features li:last-child { border-bottom: none; }

.tariff-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
  flex-shrink: 0;
}

/* Meeting detail tabs */
.meeting-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.meeting-tabs::-webkit-scrollbar { display: none; }

.meeting-tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--transition);
}
.meeting-tab-btn:hover { color: var(--text-0); background: var(--bg-glass); }
.meeting-tab-btn.active {
  color: var(--text-inv);
  background: var(--accent-grad);
  box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}

.meeting-tab-content { display: none; animation: fadeUp .3s ease both; }
.meeting-tab-content.active { display: block; }

/* Question item */
.question-item {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

.question-item:hover {
  border-left-color: var(--accent-2);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Voting buttons */
.vote-buttons {
  display: flex;
  gap: 6px;
}

.vote-btn {
  width: 36px; height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all var(--transition);
  display: grid;
  place-items: center;
}

.vote-btn.vote-yes { background: var(--success-soft); color: var(--success); }
.vote-btn.vote-no { background: var(--danger-soft); color: var(--danger); }
.vote-btn.vote-abstain { background: var(--warning-soft); color: var(--warning); }

.vote-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.vote-btn.active { transform: scale(1.05); }
.vote-btn.vote-yes.active { background: var(--success); color: white; box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.vote-btn.vote-no.active { background: var(--danger); color: white; box-shadow: 0 4px 12px rgba(239,68,68,.3); }
.vote-btn.vote-abstain.active { background: var(--warning); color: white; box-shadow: 0 4px 12px rgba(245,158,11,.3); }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.status-badge.active { background: var(--success-soft); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.status-badge.inactive { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239,68,68,.2); }
.status-badge.admin { background: var(--info-soft); color: var(--info); border: 1px solid rgba(59,130,246,.2); }
.status-badge.user { background: var(--accent-grad-soft); color: var(--accent); border: 1px solid var(--border-accent); }

/* Role badges */
.role-badge {
  display: inline-flex;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.role-badge.admin { background: var(--info-soft); color: var(--info); }
.role-badge.user { background: var(--accent-grad-soft); color: var(--accent); }
.role-badge.moderator { background: var(--warning-soft); color: var(--warning); }
.role-badge.manager { background: rgba(96,165,250,.15); color: #60a5fa; }
.role-badge.inspector { background: var(--success-soft); color: var(--success); }
.role-badge.obzvon { background: rgba(139,92,246,.15); color: var(--accent-2); }

/* Profile */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
}

.profile-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-grad);
}

.profile-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  min-width: 180px;
}

.info-value {
  font-size: 14px;
  color: var(--text-0);
  font-weight: 500;
  flex: 1;
}

/* ============ MISC ============ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-3);
  font-size: 13px;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Gradient text utility */
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass card with glow on hover */
.glow-hover {
  position: relative;
  transition: all var(--transition);
}
.glow-hover::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--accent-grad);
  opacity: 0;
  z-index: -1;
  filter: blur(16px);
  transition: opacity var(--transition);
}
.glow-hover:hover::before { opacity: .4; }

/* Animated gradient border */
.gradient-border {
  position: relative;
  background: var(--bg-1);
  border-radius: var(--radius-lg);
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--accent-grad);
  z-index: -1;
  animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .4);
  display: grid;
  place-items: center;
  font-size: 24px;
  z-index: 90;
  transition: all var(--transition);
}
.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 32px rgba(99, 102, 241, .6);
}

/* Icon helper */
.icon {
  display: inline-grid;
  place-items: center;
  width: 1em; height: 1em;
  flex-shrink: 0;
}

.icon svg { width: 100%; height: 100%; }
