@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3/tabler-icons.min.css');

:root {
  --ink: #17212b;
  --text: #17212b;
  --muted: #617181;
  --line: #d9e2ea;
  --soft: #f4f7fa;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --bg: #f5f7fb;
  --nav: #123047;
  --nav-2: #1d4f65;
  --teal: #a22f43;
  --brand: #8f2f40;
  --brand-dark: #752636;
  --brand-soft: #fff7f8;
  --gold: #d99a28;
  --green: #2f9e44;
  --good: #2f9e44;
  --good-bg: #eaf8ee;
  --good-text: #1d7e34;
  --warn: #d99a28;
  --watch-bg: #fff1cc;
  --watch-text: #946200;
  --alert: #c92a2a;
  --alert-bg: #fde6e5;
  --alert-text: #b02a37;
  --red: #d9480f;
  --blue: #3d6da8;
  --shadow: 0 22px 44px rgba(23, 33, 43, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --radius: var(--radius-lg);
  --font-base: 'Inter', Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(143, 47, 64, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(217, 154, 40, 0.1), transparent 22%),
    linear-gradient(180deg, #f8f9fb 0%, #eef2f6 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.link-btn,
.action-link {
  min-height: 42px;
  border: 1px solid #d9e2ea;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.primary,
.link-btn.primary,
.action-link.primary {
  border-color: var(--brand);
  color: #fff;
  background: linear-gradient(135deg, #9b3346, #7f2839);
  box-shadow: 0 12px 24px rgba(143, 47, 64, 0.18);
}

input,
select,
textarea {
  border: 1px solid #d9e2ea;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.page {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.topbar,
.panel,
.hero-panel,
.side-panel,
.summary-board,
.metric-card,
.front-card,
.country-card,
.alert-card,
.module-card,
.agenda-card,
.note-card,
.org-card,
.area-card,
.leader-card,
.empty-card {
  border: 1px solid rgba(217, 226, 234, 0.92);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  backdrop-filter: blur(12px);
}

.panel,
.hero-panel,
.side-panel,
.summary-board {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.hero-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 20px 38px rgba(143, 47, 64, 0.18);
}

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

.brand-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
}

.brand-copy p,
.hero-copy p,
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 920px;
}

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

.back-link {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  border-color: #e6c8cf;
  box-shadow: 0 10px 22px rgba(143, 47, 64, 0.12);
}

.user-card {
  min-width: 240px;
  padding: 10px 18px;
  border: 1px solid #ead7dc;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffafa 0%, #fff4f5 100%);
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.user-card strong {
  color: var(--brand);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.country-filter-bar {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid rgba(217, 226, 234, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.country-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.country-flag {
  width: 108px;
  min-height: 106px;
  padding: 10px 10px 8px;
  border-radius: 16px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d9e2ea;
  cursor: pointer;
}

.country-flag.active {
  border-color: #d8aeb8;
  background: #fff6f7;
  box-shadow: 0 10px 20px rgba(143, 47, 64, 0.12);
}

.flag-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
}

.country-flag img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

.country-flag span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 10px;
  font-size: 36px;
  line-height: 1.02;
}

.soft-chip,
.signal-pill,
.meta-chip {
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: fit-content;
}

.soft-chip,
.meta-chip {
  color: var(--brand);
  border: 1px solid #ead7dc;
  background: #fff7f8;
}

.signal-pill,
.signal-watch {
  color: var(--watch-text);
  background: var(--watch-bg);
}

.signal-good {
  color: var(--good-text);
  background: var(--good-bg);
}

.signal-alert {
  color: var(--alert-text);
  background: var(--alert-bg);
}

.progress-track,
.metric-track,
.bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e9eef4;
  overflow: hidden;
}

.progress-fill,
.metric-fill,
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(23, 33, 43, 0.92);
  color: #fff;
  box-shadow: 0 18px 38px rgba(23, 33, 43, 0.24);
  z-index: 9999;
}

.toast[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .page {
    padding: 18px;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: start;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 14px;
  }

  .topbar {
    padding: 16px;
  }

  .brand {
    flex-direction: column;
    align-items: start;
  }

  .brand-mark {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .brand-copy strong,
  h1 {
    font-size: 28px;
  }

  .country-flag {
    width: 90px;
    min-height: 92px;
  }
}
