:root {
  --bg-page: #070709;
  --bg-card: #111116;
  --bg-elevated: #17171f;
  --bg-input: #0a0a0e;
  --text-main: #f8fafc;
  --text-muted: #a1a1aa;
  --gold-primary: #d4af37;
  --gold-light: #f5d76e;
  --gold-dark: #aa7c11;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f5d76e 50%, #b38728 100%);
  --gold-glow: 0 0 18px rgba(212, 175, 55, 0.25);
  --border-color: rgba(212, 175, 55, 0.24);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --emerald: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.65);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(212, 175, 55, 0.06) 0%, transparent 40%);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 56px;
  color-scheme: dark;
}

/* TOPBAR PRETO E DOURADO */
.topbar {
  background: linear-gradient(180deg, #0d0d12 0%, #07070a 100%);
  border-bottom: 2px solid var(--gold-primary);
  color: var(--text-main);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), 0 1px 12px rgba(212, 175, 55, 0.15);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #000000;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.topbar-brand h1 {
  font-size: 20px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}

.topbar-brand .subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.topbar-brand .subtitle strong {
  color: var(--gold-light);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* RELÓGIO OFICIAL DE BRASÍLIA */
.brasilia-clock-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0a0a0e;
  border: 1.5px solid var(--gold-primary);
  border-radius: 10px;
  padding: 6px 14px;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.12);
}

.clock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.2); }
}

.clock-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.clock-time {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* CONTAINER */
.container {
  max-width: 1480px;
  margin: 22px auto 0;
  padding: 0 24px;
}

/* PAINEL DE DATAS EM EVIDÊNCIA */
.date-command-panel {
  background: linear-gradient(145deg, #13131a 0%, #0b0b10 100%);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md), var(--gold-glow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.date-command-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.date-filter-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.date-inputs-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.date-field-capsule {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #08080b;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 12px;
  padding: 10px 14px;
}

.highlight-date-capsule {
  border: 2px solid var(--gold-light);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.14) 0%, #07070a 100%);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

.capsule-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.date-input-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prominent-date-input {
  background: #050507;
  border: 2px solid var(--gold-primary);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  color-scheme: dark;
  transition: all 0.2s ease;
}

.prominent-date-input:hover,
.prominent-date-input:focus {
  border-color: #ffffff;
  background: #0d0d12;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 215, 110, 0.5);
}

.prominent-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: sepia(100%) saturate(400%) brightness(110%) hue-rotate(5deg);
  transform: scale(1.2);
}

.date-br-preview {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--gold-gradient);
  color: #070709;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.prominent-select {
  background: #050507;
  border: 1.5px solid var(--gold-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
}

.prominent-select:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.quick-date-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-date-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  margin-right: 4px;
}

.btn-quick-date {
  background: #14141c;
  color: #f8fafc;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-quick-date:hover,
.btn-quick-date.active {
  background: var(--gold-gradient);
  color: #070709;
  border-color: var(--gold-light);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.btn-apply-period {
  height: 46px;
}

/* FAIXA DE CONFIRMAÇÃO DO PERÍODO ATIVO */
.active-period-strip {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.16) 0%, rgba(17, 17, 22, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-left: 5px solid var(--gold-light);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.active-period-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.active-period-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--gold-light);
}

.active-period-stats {
  font-size: 13px;
  color: #e4e4e7;
  font-weight: 600;
}

.active-period-right {
  font-size: 12.5px;
  color: var(--gold-light);
  font-weight: 600;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-gold-primary,
.btn-primary {
  background: var(--gold-gradient);
  color: #070709;
  border-color: var(--gold-light);
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.28);
}

.btn-gold-primary:hover,
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.42);
}

.btn-gold-secondary,
.btn-emerald {
  background: #171721;
  color: var(--gold-light);
  border: 1.5px solid var(--gold-primary);
}

.btn-gold-secondary:hover,
.btn-emerald:hover {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--gold-light);
}

.btn-outline-gold,
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
  border: 1px solid rgba(212, 175, 55, 0.38);
}

.btn-outline-gold:hover,
.btn-outline:hover {
  background: rgba(212, 175, 55, 0.14);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* API KEY BANNER */
.api-key-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--gold-primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.api-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.api-banner-left h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold-light);
}

.api-banner-left p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.api-banner-form {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 960px) {
  .api-banner-form {
    grid-template-columns: 1fr;
  }
}

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

.input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.3px;
}

.input-group input,
.input-group select,
.input-group textarea {
  padding: 10px 13px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  color: #f8fafc;
  background: var(--bg-input);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.api-sync-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px dashed rgba(212, 175, 55, 0.25);
  padding-top: 10px;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-gold,
.badge-blue {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.45);
}

.badge-emerald,
.badge-green {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.badge-red {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: linear-gradient(160deg, #15151d 0%, #0d0d12 100%);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--gold-primary);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.kpi-highlight-gold,
.kpi-highlight-blue { color: var(--gold-light); }
.kpi-highlight-emerald { color: #34d399; }
.kpi-highlight-amber,
.kpi-highlight-purple { color: #fbbf24; }

.kpi-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.mini-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.pill-green { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.pill-amber { background: rgba(245, 158, 11, 0.16); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.35); }
.pill-red { background: rgba(239, 68, 68, 0.16); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }

/* TABS */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 12px 18px;
  background: #101016;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-bottom: 3px solid transparent;
  border-radius: 10px 10px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  white-space: nowrap;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--gold-light);
  background: #171720;
}

.tab-btn.active {
  color: #070709;
  background: var(--gold-gradient);
  border-color: var(--gold-light);
  font-weight: 800;
}

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

/* SECTION HEADER & FILTERS */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--gold-light);
}
.section-header p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: #121218;
  font-size: 12.5px;
  font-weight: 700;
  color: #e4e4e7;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.filter-btn.active {
  background: var(--gold-gradient);
  color: #070709;
  border-color: var(--gold-light);
  font-weight: 800;
}

/* 3 COLUMNS BOARD FOR GROUPS */
.three-columns-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 1100px) {
  .three-columns-board {
    grid-template-columns: 1fr;
  }
}

.group-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.col-high { border-top: 4px solid var(--emerald); }
.col-interactive { border-top: 4px solid var(--gold-primary); }
.col-inactive { border-top: 4px solid var(--red); }

.col-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.col-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 4px;
}

.col-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.col-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.col-count {
  background: var(--gold-gradient);
  color: #070709;
  font-weight: 900;
  font-size: 15px;
  min-width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.group-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 4px;
}

.group-item-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-item-card:hover {
  border-color: var(--gold-primary);
}

.group-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.group-item-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--gold-light);
}

.group-item-dept {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.group-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #0b0b10;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.18);
}

.g-stat {
  display: flex;
  flex-direction: column;
}
.g-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}
.g-stat-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
}

.group-details-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: #d4d4d8;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.detail-line strong {
  color: #ffffff;
  text-align: right;
}

/* LISTA DE MENSAGENS REAIS DENTRO DO CARD DO GRUPO */
.group-messages-feed {
  background: #09090d;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.group-messages-feed-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.group-msg-row {
  font-size: 12px;
  line-height: 1.35;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2.5px solid var(--gold-primary);
  color: #e4e4e7;
}

.group-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 2px;
}

.group-msg-text {
  color: #f4f4f5;
  word-break: break-word;
}

.group-reason-note {
  font-size: 11.5px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.07);
  border: 1px solid rgba(212, 175, 55, 0.16);
  color: #d4d4d8;
}

/* CARDS & TABLES */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.mt-24 { margin-top: 24px; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--gold-light);
}

.card-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.table-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input {
  padding: 9px 14px;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  background: #08080c;
  color: #ffffff;
  border-radius: 8px;
  font-size: 13px;
  min-width: 270px;
  font-family: inherit;
  outline: none;
}

.search-input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 12px;
  background: #0b0b10;
  color: var(--gold-light);
  font-weight: 800;
  border-bottom: 2px solid var(--gold-primary);
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.4px;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(212, 175, 55, 0.07);
}

/* TWO COLS LAYOUT */
.two-cols-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .two-cols-layout {
    grid-template-columns: 1fr;
  }
}

/* BARS & RANKING */
.bars-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.bar-track {
  height: 11px;
  background: #09090d;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 999px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.rank-pos {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #27272a;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rank-pos.pos-1 { background: var(--gold-gradient); color: #070709; }
.rank-pos.pos-2 { background: #a1a1aa; color: #09090b; }
.rank-pos.pos-3 { background: #b45309; color: #ffffff; }

.rank-info {
  flex: 1;
}

.rank-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rank-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--gold-light);
}

.rank-role {
  font-size: 12px;
  color: var(--text-muted);
}

.rank-groups-list {
  font-size: 11.5px;
  color: #d4d4d8;
  margin-top: 4px;
}

.rank-score {
  text-align: right;
}
.rank-score strong {
  font-size: 16px;
  color: var(--gold-light);
  display: block;
}
.rank-score span {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* SETTINGS FORM */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recipients-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipients-box label {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-light);
}

.recipient-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recipient-tag {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold-light);
  min-width: 75px;
}

.recipient-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: #08080c;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.help-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

.form-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* TOAST */
.toast {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.toast.success { background: #064e3b; color: #a7f3d0; border: 1px solid #10b981; }
.toast.warning { background: #451a03; color: #fde68a; border: 1px solid var(--gold-primary); }
.toast.error { background: #450a0a; color: #fecaca; border: 1px solid #ef4444; }
.hidden { display: none !important; }

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-card {
  background: #121218;
  border: 2px solid var(--gold-primary);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), var(--gold-glow);
}

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

.modal-header h3 {
  color: var(--gold-light);
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--gold-light);
}
