@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --border: #E3E6EA;
  --border-light: #F0F1F3;
  --text: #1A1D21;
  --text-muted: #6B7280;
  --text-faint: #9AA1AC;
  --accent: #2563EB;
  --accent-bg: #EEF2FF;
  --accent-dark: #1D4ED8;
  --success: #16A34A;
  --success-bg: #ECFDF5;
  --neutral-bg: #F3F4F6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  height: 64px;
  flex-wrap: wrap;
}
.nav-left { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.2px; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.tabs { display: flex; gap: 4px; }
.tab { padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.tab.active { background: var(--accent-bg); color: var(--accent); font-weight: 700; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; font-weight: 600; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.logout { font-size: 13px; color: var(--text-faint); font-weight: 600; }

.content { flex: 1; display: flex; justify-content: center; padding: 40px 24px; }
.container { width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 22px; }
.container-narrow { max-width: 920px; }

h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.subtitle { margin: 0; font-size: 14px; color: var(--text-muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.card-title { font-size: 15px; font-weight: 800; }

label.field-label { font-size: 13px; font-weight: 700; color: #374151; display: block; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.hint { font-size: 12px; color: var(--text-faint); }
code.inline { background: var(--accent-bg); color: var(--accent); padding: 1px 5px; border-radius: 5px; }

input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  font-family: inherit;
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid #D7DBE1;
  border-radius: 10px;
  background: #FAFBFC;
  color: var(--text);
  width: 100%;
}
textarea { font-family: ui-monospace, monospace; resize: vertical; line-height: 1.6; }
.max-420 { max-width: 420px; }

.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 10px; padding: 12px 22px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: #fff; color: #374151; border: 1px solid #D7DBE1; padding: 9px 16px; font-size: 13px; }
.btn-small { padding: 6px 10px; font-size: 12px; border-radius: 8px; border: 1px solid #D7DBE1; background: #fff; color: #374151; cursor: pointer; }

.note { font-size: 13px; color: var(--text-muted); background: #FAFBFC; border: 1px solid var(--border-light); border-radius: 10px; padding: 10px 14px; }
.note strong { color: var(--text); }

.tab-switch { display: flex; gap: 4px; background: var(--neutral-bg); border-radius: 10px; padding: 3px; width: fit-content; }
.tab-switch a { padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.tab-switch a.active { background: #fff; color: var(--text); }

.dropzone { border: 1px dashed #D7DBE1; border-radius: 10px; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #FAFBFC; text-align: center; }

table { width: 100%; border-collapse: collapse; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.table-card th { text-align: left; padding: 10px 20px; background: #FAFBFC; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.table-card td { padding: 14px 20px; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.mono { font-family: ui-monospace, monospace; font-weight: 700; color: var(--accent); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-yes { background: var(--success-bg); color: var(--success); }
.badge-no { background: var(--neutral-bg); color: var(--text-faint); }

.empty-state { border: 1px dashed #D7DBE1; border-radius: 14px; padding: 48px 24px; text-align: center; color: var(--text-faint); font-size: 14px; }

.cards-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.stat-card.highlight { border-color: var(--accent); }
.stat-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-label.highlight { color: var(--accent); }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.stat-value.highlight { color: var(--accent); }
.stat-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

details.wave { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
details.wave summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding: 0; }
details.wave summary::-webkit-details-marker { display: none; }
.wave-head { flex: 1; display: flex; align-items: center; gap: 14px; padding: 14px 10px 14px 20px; }
.wave-chevron { font-size: 11px; color: var(--text-faint); width: 10px; }
.wave-name { font-weight: 700; font-size: 14px; flex: 1; }
.wave-metric { font-size: 12px; color: var(--text-muted); width: 150px; }
.wave-metric.reach { color: var(--accent); font-weight: 700; width: 120px; }
.wave-export { margin: 0 16px; }
.wave-body { border-top: 1px solid var(--border-light); background: #FAFBFC; }
.dispatch-row { display: flex; align-items: center; gap: 14px; padding: 11px 20px 11px 44px; border-bottom: 1px solid var(--border-light); }
.dispatch-row .arrow { color: var(--text-faint); font-size: 13px; }
.dispatch-row .name { font-size: 13px; font-weight: 600; flex: 1; }

.combobox { position: relative; }
.combobox-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(26,29,33,0.12); z-index: 20; }
.combobox-item { display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: 13px; cursor: pointer; background: none; border: none; font-family: inherit; color: var(--text); }
.combobox-item:hover { background: var(--accent-bg); color: var(--accent); }
.combobox-item-new { border-top: 1px solid var(--border-light); color: var(--accent); font-weight: 700; }
.combobox-empty { padding: 10px 14px; font-size: 13px; color: var(--text-faint); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 24px; }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.error { background: #FEF2F2; border: 1px solid #FCA5A5; color: #B91C1C; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
