@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-base: #080808;
  --bg-surface: #111111;
  --bg-card: #161616;
  --bg-elevated: #1e1e1e;
  --bg-hover: #242424;
  --accent: #00e676;
  --accent-dim: #00b248;
  --accent-bright: #69ff47;
  --accent-glow: rgba(0, 230, 118, 0.12);
  --accent-glow-strong: rgba(0, 230, 118, 0.25);
  --text-primary: #e8e8e8;
  --text-secondary: #888888;
  --text-muted: #555555;
  --border: #242424;
  --border-accent: rgba(0, 230, 118, 0.3);
  --red: #ff4444;
  --red-dim: #cc2222;
  --yellow: #ffcc00;
  --blue: #4488ff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 0 20px rgba(0, 230, 118, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* Pages */
.page { display: none; }
.page:not(.hidden) { display: block; }
.hidden { display: none !important; }

/* ─── LOGIN ────────────────────────────────────── */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,230,118,0.08) 0%, transparent 60%),
    var(--bg-base);
}

#login-page.page:not(.hidden) {
  display: flex;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-accent);
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder { color: var(--text-muted); }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-group input[readonly] { color: var(--text-muted); cursor: not-allowed; }
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.6; }

#login-form input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  margin-bottom: 12px;
}

#login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#login-form input::placeholder { color: var(--text-muted); }

.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  min-height: 20px;
}

/* ─── BUTTONS ───────────────────────────────────── */
button { font-family: inherit; cursor: pointer; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: #444;
  background: var(--bg-hover);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(255, 68, 68, 0.3);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: var(--red);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

/* ─── NAVBAR ────────────────────────────────────── */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.navbar h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-user::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}

/* ─── CONTAINER ─────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ─── PAGE HEADER ───────────────────────────────── */
.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header-actions h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-actions h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── GROUPS GRID ───────────────────────────────── */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.group-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.group-card:hover::before { opacity: 1; }

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

.group-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.group-card-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.group-card-meta-item .meta-label {
  color: var(--text-muted);
  min-width: 60px;
}

.group-card-meta-item .meta-value {
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.group-card-meta-item .meta-value.connected {
  color: var(--accent);
}

/* ─── TABS ──────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}

.tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

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

.tab.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── CARD ──────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

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

.card form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 16px;
  margin-bottom: 6px;
}

.card form label:first-of-type { margin-top: 0; }

.card form input,
.card form select {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card form input:focus,
.card form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.card form input::placeholder { color: var(--text-muted); }
.card form input[readonly] { color: var(--text-muted); cursor: not-allowed; }
.card form select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.card form button { margin-top: 20px; }

small { font-size: 12px; color: var(--text-secondary); display: block; margin-top: 5px; line-height: 1.6; }

/* ─── INFO BANNER ───────────────────────────────── */
.info-banner {
  background: rgba(68, 136, 255, 0.06);
  border: 1px solid rgba(68, 136, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.info-banner h3 {
  font-size: 13px;
  font-weight: 600;
  color: #6699ff;
  margin-bottom: 10px;
}

.info-banner ol,
.info-banner ul {
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.9;
}

.info-banner a { color: #6699ff; text-decoration: none; }
.info-banner a:hover { text-decoration: underline; }
.info-banner code {
  background: var(--bg-elevated);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.info-banner p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.8;
}

.success-banner {
  background: rgba(0, 230, 118, 0.06);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.success-banner strong { color: var(--accent); }

/* ─── LIST ITEMS ────────────────────────────────── */
.list-container {
  display: flex;
  flex-direction: column;
}

.participant-item,
.meeting-item,
.report-item,
.penalty-item,
.deadline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.participant-item:last-child,
.meeting-item:last-child,
.report-item:last-child,
.penalty-item:last-child,
.deadline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.participant-item:first-child,
.meeting-item:first-child,
.report-item:first-child,
.penalty-item:first-child,
.deadline-item:first-child {
  padding-top: 0;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-info strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.item-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.item-actions select {
  padding: 6px 28px 6px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.item-actions select:focus {
  border-color: var(--accent);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.badge-green { background: rgba(0,230,118,0.12); color: var(--accent); }
.badge-red { background: rgba(255,68,68,0.12); color: var(--red); }
.badge-blue { background: rgba(68,136,255,0.12); color: var(--blue); }
.badge-yellow { background: rgba(255,204,0,0.12); color: var(--yellow); }

/* ─── MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1;
}

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

.modal-body {
  padding: 24px;
}

.modal-body form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 16px;
  margin-bottom: 6px;
}

.modal-body form label:first-of-type { margin-top: 0; }

.modal-body form input,
.modal-body form select,
.modal-body form textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-body form input:focus,
.modal-body form select:focus,
.modal-body form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-body form input::placeholder { color: var(--text-muted); }

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* ─── EMPTY STATE ───────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state::before {
  content: '—';
  display: block;
  font-size: 24px;
  margin-bottom: 12px;
  color: #333;
}

/* ─── BALANCE CARD ──────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, #111 0%, #161f16 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-accent);
}

.balance-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.balance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.balance-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.balance-stat-paid  { border-color: rgba(0,230,118,0.25); background: rgba(0,230,118,0.04); }
.balance-stat-unpaid { border-color: rgba(255,68,68,0.2); background: rgba(255,68,68,0.04); }

.balance-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.balance-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.balance-stat-paid  .balance-stat-value { color: var(--accent); }
.balance-stat-unpaid .balance-stat-value { color: var(--red); }

@media (max-width: 600px) {
  .balance-stats { grid-template-columns: 1fr; }
}

/* ─── PARTICIPANT DEBT BUTTON ────────────────────── */
.participant-debt-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,68,68,0.1);
  color: var(--red);
  border: 1px solid rgba(255,68,68,0.25);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.participant-debt-btn:hover {
  background: rgba(255,68,68,0.18);
  border-color: var(--red);
}

.participant-clear-badge {
  font-size: 12px;
  color: var(--accent);
  opacity: 0.7;
}

/* ─── PARTICIPANT PENALTIES MODAL ────────────────── */
.pp-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.pp-penalty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.pp-penalty-row:last-child { border-bottom: none; }

.pp-penalty-paid { opacity: 0.5; }

/* ─── SCHEDULE PARAMS ───────────────────────────── */
#schedule-params label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 16px;
  margin-bottom: 6px;
}

#schedule-params input,
#schedule-params select {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#schedule-params input:focus,
#schedule-params select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#schedule-params select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* ─── INLINE SCHEDULE INFO ──────────────────────── */
.schedule-info-banner {
  background: rgba(0,230,118,0.05);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.schedule-info-banner strong { color: var(--accent); }

/* ─── WEEK GROUPS ───────────────────────────────── */
.week-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.week-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.week-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.week-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.week-body {
  padding: 0 20px;
  background: var(--bg-card);
}

.week-body .report-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.week-body .report-item:last-of-type {
  border-bottom: none;
}

.week-missing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
}

.week-missing-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.week-missing-name {
  font-size: 12px;
  background: rgba(255,68,68,0.08);
  color: var(--red);
  border: 1px solid rgba(255,68,68,0.2);
  padding: 3px 10px;
  border-radius: 20px;
}

.week-all-submitted {
  font-size: 13px;
  color: var(--accent);
  padding: 12px 0;
  border-top: 1px dashed var(--border);
}

/* ─── REPORT CONTENT ────────────────────────────── */
.report-content {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-left: 2px solid var(--border-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
}

/* ─── MEETING MODAL NOTE ────────────────────────── */
.meeting-modal-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.meeting-modal-note-icon { flex-shrink: 0; font-size: 16px; }

/* ─── MEETING ITEM ───────────────────────────────── */
.meeting-item {
  align-items: flex-start;
}

.meeting-item .item-info .meeting-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.rsvp-summary {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsvp-empty {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.rsvp-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.rsvp-badge {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.rsvp-badge.rsvp-yes { color: #4caf50; }
.rsvp-badge.rsvp-no  { color: #f44336; }

.rsvp-names {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ─── DATE INPUTS ───────────────────────────────── */
input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .container { padding: 20px 16px; }
  .tabs { overflow-x: auto; }
  .tab { padding: 8px 12px; font-size: 12px; }
  .groups-grid { grid-template-columns: 1fr; }
  .header-actions { flex-wrap: wrap; gap: 12px; }
  .modal { max-width: 95vw; }
}

/* ─── SEEN TELEGRAM USERS ───────────────────────── */
.seen-users-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.seen-users-hint {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0 0 16px 0;
}

.seen-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.seen-user-row:last-child { border-bottom: none; }

.seen-user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-muted), var(--bg-card));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.seen-user-info {
  flex: 1;
  min-width: 0;
}
.seen-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.seen-user-username {
  font-size: 12px;
  color: var(--accent);
}
.seen-user-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-link-user {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-link-user:hover { background: rgba(0,230,118,.2); }

/* ─── LINK USER MODAL ───────────────────────────── */
.link-user-options { display: flex; flex-direction: column; gap: 16px; }

.link-option { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.link-option h4 { margin: 0 0 10px 0; font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.link-option-divider {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  position: relative;
}
.link-option-divider::before,
.link-option-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--border);
}
.link-option-divider::before { left: 0; }
.link-option-divider::after { right: 0; }

/* ─── DANGER ZONE ───────────────────────────────── */
.danger-zone {
  border-color: rgba(255, 68, 68, 0.3) !important;
}
.danger-zone h3 {
  color: #ff4444;
}

/* ─── SCHEDULE TYPE TABS ────────────────────────── */
.schedule-type-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.schedule-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.schedule-tab:hover { border-color: var(--accent); color: var(--accent); }
.schedule-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

/* ─── DAYS OF WEEK PICKER ───────────────────────── */
.days-of-week-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.day-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.day-chip input { display: none; }
.day-chip:hover { border-color: var(--accent); color: var(--accent); }
.day-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}

.form-input {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.form-input:focus { border-color: var(--accent); }

/* ─── CHAT COMMANDS ─────────────────────────────── */
.command-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.command-row:last-child { border-bottom: none; }
.command-row--inactive { opacity: 0.45; }

.command-info { flex: 1; min-width: 0; }
.command-name { font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.command-trigger { margin-bottom: 5px; }
.command-trigger-chip {
  display: inline-block;
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.command-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}
.command-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 2px; top: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-muted); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { background: var(--accent); transform: translateX(16px); }

/* form-hint */
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ─── TEXT TOOLBAR ──────────────────────────────── */
.text-toolbar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.text-toolbar-btn {
  padding: 3px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.text-toolbar-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── JOIN CODE CARD ────────────────────────────── */
.join-code-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, #111 0%, #141a11 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.join-code-icon { font-size: 28px; line-height: 1; margin-top: 2px; }
.join-code-body { flex: 1; }
.join-code-label { font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.join-code-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.join-code-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
