:root {
  --blue: #007AFF;
  --blue-hover: #0056CC;
  --blue-light: rgba(0, 122, 255, .08);
  --green: #34C759;
  --green-light: rgba(52, 199, 89, .1);
  --red: #FF3B30;
  --red-light: rgba(255, 59, 48, .08);
  --orange: #FF9500;
  --orange-light: rgba(255, 149, 0, .1);
  --purple: #AF52DE;
  --bg: #F5F5F7;
  --bg-card: #FFFFFF;
  --bg-sidebar: rgba(255, 255, 255, .72);
  --bg-input: #F2F2F7;
  --bg-hover: rgba(0, 0, 0, .04);
  --text: #1D1D1F;
  --text-secondary: #86868B;
  --text-tertiary: #AEAEB2;
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --header-height: 56px;
  /* Legacy mappings */
  --primary: #007AFF;
  --primary-light: #3399FF;
  --primary-dark: #0A1628;
  --accent: #FF9500;
  --success: #34C759;
  --danger: #FF3B30;
  --warning: #FF9500;
  --gray: #86868B;
  --light-gray: #F5F5F7;
  --white: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg-card: #1C1C1E; --bg-sidebar: rgba(28,28,30,.72);
    --bg-input: #2C2C2E; --bg-hover: rgba(255,255,255,.06);
    --text: #F5F5F7; --text-secondary: #98989D; --text-tertiary: #636366;
    --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.12);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3); --shadow-md: 0 4px 12px rgba(0,0,0,.4);
    --blue-light: rgba(0,122,255,.15); --green-light: rgba(52,199,89,.15);
    --red-light: rgba(255,59,48,.15); --orange-light: rgba(255,149,0,.15);
    --primary-dark: #0A1628; --light-gray: #1C1C1E;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; }
html, body { max-width: 100vw; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.47;
}

/* === Header === */
.header {
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  color: var(--text);
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header h1 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: var(--text); }
.header-right { display: flex; gap: 10px; align-items: center; }

/* District button */
.district-btn {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid transparent;
  border-radius: 980px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all .2s;
}
.district-btn:hover { background: var(--blue); color: #fff; }

/* === Login === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg);
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  text-align: center;
}

.login-card h1 { color: var(--blue); margin-bottom: 8px; font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.login-card h3 { color: var(--text); margin-bottom: 12px; font-size: 20px; font-weight: 600; }
.login-card p { color: var(--text-secondary); margin-bottom: 16px; font-size: 15px; }

.login-tabs {
  display: flex;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  padding: 3px;
}

.login-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s;
}

.login-tab.active { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow-sm); }

.passkey-btn { font-size: 15px; padding: 12px 20px; }

.login-divider {
  display: flex; align-items: center; margin: 16px 0;
  color: var(--text-tertiary); font-size: 13px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-divider span { padding: 0 12px; }
.link-sm { color: var(--blue); font-size: 13px; text-decoration: none; }
.link-sm:hover { text-decoration: underline; }
.text-danger { color: var(--red); }

/* === Forms === */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label {
  display: block; margin-bottom: 5px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}

.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,122,255,.15); }
.form-control.readonly { background: var(--bg-input); cursor: default; opacity: .7; }
.form-control::placeholder { color: var(--text-tertiary); }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-row { display: flex; gap: 12px; }
@media (max-width: 480px) { .form-row { flex-direction: column; gap: 0; } }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); transform: scale(1.02); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { opacity: .9; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-warning { background: var(--orange); color: #fff; }
.btn-warning:hover { opacity: .9; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: var(--bg-hover); border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-icon {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 4px 8px; font-size: 16px; transition: color .2s;
}
.btn-icon:hover { color: var(--text); }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 16px; overflow-x: hidden; }

.admin-layout { display: flex; min-height: calc(100vh - var(--header-height)); }

.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid var(--border);
  padding: 12px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover { background: var(--bg-hover); }
.sidebar-item.active { background: var(--blue-light); color: var(--blue); font-weight: 500; }
.sidebar-item[data-section="changelog"] { margin-top: auto; color: var(--text-tertiary); font-size: 12px; }

.main-content { flex: 1; padding: 24px 32px 48px; overflow-y: auto; animation: page-fade-in .25s ease; }
@keyframes page-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: box-shadow .2s;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }

/* === Stats === */
.stats-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--border);
  text-align: left;
}

.stat-card .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-card .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* === Tables === */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th { font-weight: 600; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover { background: var(--bg-hover); }
.actions-cell { white-space: nowrap; }
.actions-cell .btn { margin-left: 4px; }

/* === Event cards (deputy view) === */
.event-list { display: flex; flex-direction: column; gap: 10px; }

.event-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
}

.event-card:hover { box-shadow: var(--shadow-md); }
.event-card:active { transform: scale(0.98); }
.event-card.type-regular { border-left-color: var(--blue); }
.event-card.type-extraordinary { border-left-color: var(--orange); }
.event-card.type-field { border-left-color: var(--green); }
.event-card.type-commission { border-left-color: var(--purple); }

.event-card .event-date { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.event-card .event-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.2px; }
.event-card .event-status { margin-top: 8px; font-size: 12px; font-weight: 500; }

.event-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}
.badge-regular { background: var(--blue); }
.badge-extraordinary { background: var(--orange); }
.badge-field { background: var(--green); }
.badge-commission { background: var(--purple); }

.status-pending { color: var(--orange); }
.status-seen { color: var(--blue); }
.status-confirmed { color: var(--green); }
.status-declined { color: var(--red); }

/* === Event detail === */
.event-detail { max-width: 600px; margin: 0 auto; }
.event-detail h2 { margin-bottom: 12px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }

.event-meta { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.event-meta div { margin-bottom: 4px; }

.event-description {
  background: var(--bg-input);
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.event-files { margin-bottom: 16px; }
.event-files a { display: block; padding: 8px 0; color: var(--blue); text-decoration: none; font-size: 14px; }
.event-files a:hover { text-decoration: underline; }

.event-actions { display: flex; gap: 12px; margin-top: 20px; }
.event-actions .btn { flex: 1; padding: 14px; font-size: 16px; }

.participants-list { margin-top: 16px; }
.participant-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* === Bottom nav (deputy) === */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  font-size: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  transition: color 0.2s;
  position: relative;
}

.nav-item.active { color: var(--blue); }
.nav-item .nav-icon { font-size: 20px; margin-bottom: 2px; }

.nav-badge {
  background: var(--red);
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 980px;
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
  animation: modal-fade-in .2s ease;
}

@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modal-slide-in .25s ease;
}

@keyframes modal-slide-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.modal h3 { margin-bottom: 16px; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* === Select list === */
.deputy-select-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.deputy-select-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer; font-size: 14px;
}
.deputy-select-item:last-child { border-bottom: none; }
.deputy-select-item:hover { background: var(--bg-hover); }
.deputy-select-item input { cursor: pointer; accent-color: var(--blue); }

/* === Notification preferences === */
.pref-list { margin-top: 8px; }
.pref-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 14px;
}
.pref-item:last-child { border-bottom: none; }
.pref-item input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; accent-color: var(--blue); }

/* === Calendar === */
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.calendar-day { padding: 8px 4px; font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; transition: background .15s; }
.calendar-day:hover { background: var(--bg-hover); }
.calendar-day.today { background: var(--blue); color: #fff; }
.calendar-day.has-event { font-weight: 700; color: var(--blue); }
.calendar-day.has-reception { border: 2px solid var(--green); }
.calendar-day.has-vacation { background: #fff3e0; color: #e65100; }
.calendar-weekday { font-size: 11px; color: var(--text-tertiary); padding: 4px; }
.calendar-day.other-month { color: var(--text-tertiary); }

/* Calendar legend */
.calendar-legend { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin: 0 4px; vertical-align: middle; }
.has-event-dot { background: var(--blue); }
.has-reception-dot { border: 2px solid var(--green); }

/* === Toast === */
.toast {
  position: fixed;
  bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: 980px;
  font-size: 14px;
  z-index: 300;
  animation: fadeInUp 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === Back button === */
.back-btn {
  background: none; border: none; color: var(--blue); cursor: pointer;
  font-size: 18px; padding: 4px 8px; margin-right: 8px;
}

/* === Admin mobile nav === */
.mobile-nav { display: none; }
@media (max-width: 768px) {
  .sidebar { display: none; }
  .admin-layout { flex-direction: column; }
  .main-content { padding: 12px; padding-bottom: 64px; }
  .stats-grid { flex-wrap: wrap; }
  .stat-card { min-width: calc(50% - 6px); flex: 0 0 calc(50% - 6px); }
  .modal { max-width: 100% !important; margin: 8px; max-height: 90vh; }
  .header { padding: 0 12px; }
  .header h1 { font-size: 15px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .form-row { flex-direction: column; gap: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-header { gap: 12px; }
  .profile-avatar { width: 44px; height: 44px; font-size: 16px; }
  .mobile-nav {
    display: flex;
    overflow-x: auto;
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0 8px;
  }
  .mobile-nav button {
    padding: 10px 12px;
    white-space: nowrap;
    border: none;
    background: none;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color .2s;
  }
  .mobile-nav button.active { color: var(--blue); border-bottom-color: var(--blue); }
  .district-btn { max-width: 130px; font-size: 11px; }
}

/* === Badges === */
.badge-role { background: var(--blue-light); color: var(--blue); padding: 2px 8px; border-radius: 980px; font-size: 11px; font-weight: 500; }
.badge-head { background: var(--orange-light); color: var(--orange); padding: 2px 8px; border-radius: 980px; font-size: 11px; font-weight: 500; }
.badge-vacation { background: var(--purple); color: white; padding: 2px 8px; border-radius: 980px; font-size: 11px; white-space: nowrap; }
.badge-closed { background: var(--text-tertiary); color: white; padding: 2px 8px; border-radius: 980px; font-size: 11px; }
.badge-planned { background: var(--blue-light); color: var(--blue); padding: 2px 8px; border-radius: 980px; font-size: 11px; }
.badge-ai { background: var(--green-light); color: var(--green); padding: 2px 8px; border-radius: 980px; font-size: 11px; font-weight: 500; }
.badge-sub { background: var(--blue); color: white; padding: 2px 8px; border-radius: 980px; font-size: 11px; margin-left: 4px; }

/* === Voting === */
/* Agenda list for deputy */
.agenda-list { padding-left: 20px; margin: 8px 0; }
.agenda-list li { padding: 6px 0; font-size: 14px; line-height: 1.5; border-bottom: 1px solid var(--border); }
.agenda-list li:last-child { border-bottom: none; }

.vote-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.vote-item:last-child { border-bottom: none; }
.vote-title { font-weight: 500; margin-bottom: 4px; }
.ai-hint { font-size: 13px; color: var(--green); margin-bottom: 8px; }
.vote-btns { display: flex; gap: 8px; }

/* Agenda item */
.agenda-item { position: relative; margin-bottom: 8px; padding-right: 36px; }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 8px; }
.photo-grid img { width: 100%; height: 100px; object-fit: cover; border-radius: var(--radius-sm); }
.photo-grid a { display: block; }
.photo-item { position: relative; }
.photo-item .photo-cb {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  width: 20px; height: 20px; accent-color: var(--blue);
  cursor: pointer;
}

/* === District picker === */
.district-picker-list {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}
.district-group-label {
  padding: 8px 12px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-tertiary);
  background: var(--bg-input);
  position: sticky; top: 0;
}
.district-pick-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.district-pick-item:hover { background: var(--blue-light); }
.district-pick-item.highlighted { background: var(--blue-light); font-weight: 600; color: var(--blue); }
.district-pick-name { font-size: 14px; }
.district-pick-okrug { font-size: 12px; color: var(--text-secondary); }

/* === Changelog === */
.changelog-entry { padding: 14px 0; border-bottom: 1px solid var(--border); }
.changelog-entry:last-child { border-bottom: none; }
.changelog-version { font-weight: 700; color: var(--blue); font-size: 16px; }
.changelog-title { font-weight: 600; margin: 4px 0; }
.changelog-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* === Hints === */
.hint-text {
  display: block; font-size: 13px; color: var(--text-secondary);
  margin-bottom: 16px; line-height: 1.5;
  padding: 10px 14px; background: var(--bg-input);
  border-radius: var(--radius-sm); border-left: 3px solid var(--blue);
}
.field-hint { display: block; font-size: 11px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.4; }
.field-hint a { color: var(--blue); }

/* === Brand footer === */
.brand-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--primary-dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 6px 12px;
  z-index: 50;
  font-size: 11px; line-height: 1.4;
}
.brand-link { text-decoration: none; color: inherit; display: inline-block; }
.brand-link:hover .brand-logo { opacity: 1; }
.brand-link:hover .brand-sub { color: rgba(255,255,255,.7); }
.brand-logo { height: 20px; margin-bottom: 2px; opacity: .85; transition: opacity .2s; }
.brand-name { font-weight: 800; font-size: 13px; letter-spacing: 3px; color: rgba(255,255,255,.9); }
.brand-sub { font-size: 10px; color: rgba(255,255,255,.5); }
.brand-version { font-size: 9px; color: rgba(255,255,255,.3); margin-top: 1px; }
.brand-inline { text-align: center; padding: 16px 0 8px; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: all .2s;
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--blue); background: var(--blue-light); }
.dropzone-content {
  padding: 20px; text-align: center;
  font-size: 13px; color: var(--text-secondary);
}

/* File chips */
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip {
  position: relative; width: 80px; text-align: center;
  padding: 8px 4px 6px; background: var(--bg-input);
  border-radius: var(--radius-sm); cursor: default;
}
.file-chip-remove {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red); color: #fff; border: none;
  font-size: 10px; cursor: pointer; line-height: 18px;
  display: flex; align-items: center; justify-content: center;
}
.file-chip-icon { font-size: 24px; line-height: 1; }
.file-chip-ext { font-size: 9px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; margin: 2px 0; }
.file-chip-name { font-size: 10px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dashboard deputy list */
.deputy-dashboard-list { display: flex; flex-direction: column; gap: 2px; }
.deputy-dash-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s;
}
.deputy-dash-item:hover { background: var(--bg-hover); }
.deputy-dash-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.deputy-dash-name { font-weight: 500; font-size: 14px; }
.deputy-dash-sub { font-size: 12px; color: var(--text-tertiary); }

/* Deputy tabs */
.dep-tabs {
  display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto;
  padding-bottom: 4px; flex-wrap: wrap;
}
.dep-tab {
  padding: 8px 16px; border-radius: 980px; border: 1px solid var(--border);
  background: var(--bg-card); font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: all .2s; color: var(--text);
}
.dep-tab:hover { border-color: var(--blue); color: var(--blue); }
.dep-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Profile page */
.profile-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.profile-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 2px; }
.profile-header .text-secondary { color: var(--text-secondary); font-size: 14px; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-col { display: flex; flex-direction: column; gap: 16px; }

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--text); }

/* Event create modal */
.evt-modal { max-width: 1000px !important; max-height: 92vh !important; padding: 20px !important; }
.evt-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.evt-header h3 { margin: 0; }
.evt-form { display: flex; flex-direction: column; gap: 0; }
.evt-row-3 { display: flex; gap: 12px; }
.evt-row-3 > .form-group { flex: 1; }
.evt-row-2 { display: flex; gap: 12px; }
.evt-row-2 > .form-group { flex: 1; }
.evt-datetime { display: flex; gap: 12px; align-items: start; }
.evt-datetime > .form-group:first-child { flex: 0 0 180px; }
.evt-datetime > .form-group:last-child { flex: 1; }
.evt-date-input { font-size: 16px; font-weight: 600; }
.evt-content-3 { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 16px; margin-top: 8px; }
.evt-bottom { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
  .evt-modal { max-width: 100% !important; }
  .evt-row-3, .evt-row-2, .evt-datetime { flex-direction: column; gap: 0; }
  .evt-datetime > .form-group:first-child { flex: auto; }
  .evt-content-3 { grid-template-columns: 1fr; }
  .evt-bottom { flex-wrap: wrap; }
}

/* Time option buttons */
.time-options { display: flex; gap: 8px; flex-wrap: wrap; }
.time-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 980px; cursor: pointer;
  border: 1px solid var(--border); font-size: 14px; transition: all .2s;
}
.time-opt:has(input:checked) { background: var(--blue-light); border-color: var(--blue); color: var(--blue); font-weight: 500; }
.time-opt input { display: none; }

/* Reception cards */
.reception-card { cursor: pointer; }
.reception-time { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; }
.reception-date { font-size: 15px; color: var(--text-secondary); margin-bottom: 4px; }
.event-detail .reception-time { font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.event-detail .reception-date { font-size: 18px; margin-bottom: 8px; }
body.deputy-view .brand-footer { display: none; }
body.deputy-view { padding-bottom: 70px; }

/* Admin layout: brand footer sits below sidebar, add bottom padding to main */
.admin-layout .main-content { padding-bottom: 64px; }

/* === Utilities === */
.text-center { text-align: center; }
.text-gray { color: var(--text-secondary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); font-size: 12px; }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.hidden { display: none !important; }
