:root {
  --color-bg: #F7F5F0;
  --color-surface: #FFFFFF;
  --color-ink: #1E2B38;
  --color-brand: #2E5266;
  --color-brand-dark: #1E3745;
  --color-accent: #DB9435;
  --color-accent-dark: #B8761E;
  --color-muted: #6B7A87;
  --color-line: #DEDACF;
  --radius: 6px;
  --font-display: 'PT Serif', Georgia, serif;
  --font-body: 'PT Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-brand-dark);
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--color-brand); }
a:hover { color: var(--color-accent-dark); }
.muted { color: var(--color-muted); font-size: 0.92rem; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.site-topbar {
  background: var(--color-brand-dark);
  color: #E9EEF1;
  font-size: 0.85rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar-inner a { color: #E9EEF1; text-decoration: none; }
.topbar-inner a:hover { color: var(--color-accent); }

/* Header */
.site-header { background: var(--color-surface); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--color-brand-dark); }
.brand-text small { color: var(--color-muted); font-size: 0.75rem; letter-spacing: 0.03em; text-transform: uppercase; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--color-ink);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.main-nav a:hover { background: var(--color-bg); }
.main-nav a.active { color: var(--color-brand-dark); font-weight: 700; background: var(--color-bg); }
.nav-toggle { display: none; }

.horizon-line {
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand) 0%, var(--color-brand) 55%, var(--color-accent) 100%);
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.btn-accent { background: var(--color-accent); color: #2A1B04; }
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--color-brand); color: var(--color-brand); }
.btn-outline:hover { background: var(--color-brand); color: #fff; }
.header-cta { white-space: nowrap; }

/* Hero */
.hero {
  position: relative;
  background: var(--color-brand-dark);
  color: #EDF2F4;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; padding: 64px 20px 96px; }
.hero h1 { color: #fff; max-width: 640px; }
.hero p.lead { max-width: 560px; font-size: 1.1rem; color: #CBD8DE; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-skyline {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  z-index: 1;
  opacity: 0.5;
}

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--color-surface); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-bottom: 8px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 2.2rem; color: var(--color-brand); display: block; }
.stat .label { color: var(--color-muted); font-size: 0.9rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; background: var(--color-surface); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--color-line); }
th { background: var(--color-bg); font-family: var(--font-display); }
tr:hover td { background: #FBFAF7; }

/* Forms */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.92rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-ink);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 3px solid rgba(46,82,102,0.25);
  border-color: var(--color-brand);
}
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.filter-bar input, .filter-bar select { padding: 8px 12px; border: 1px solid var(--color-line); border-radius: var(--radius); }

.alert { padding: 14px 16px; border-radius: var(--radius); margin: 16px 0; }
.alert-success { background: #E4F1E7; color: #245A34; border: 1px solid #B7DCC0; }
.alert-error { background: #FBE7E4; color: #7A2A20; border: 1px solid #F0BFB6; }

/* News */
.news-item { border-bottom: 1px solid var(--color-line); padding: 20px 0; }
.news-item:last-child { border-bottom: none; }
.news-date { color: var(--color-accent-dark); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase; }

/* Footer */
.site-footer { background: var(--color-brand-dark); color: #C9D4D9; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  padding: 40px 20px;
}
.footer-col strong { color: #fff; display: block; margin-bottom: 10px; font-family: var(--font-display); }
.footer-col a { color: #C9D4D9; }
.footer-col a:hover { color: var(--color-accent); }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}
.footer-bottom a { color: #C9D4D9; }

/* Admin */
.admin-body { background: var(--color-bg); font-family: var(--font-body); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--color-brand-dark);
  color: #EDF2F4;
  padding: 20px 0;
  flex-shrink: 0;
}
.admin-sidebar h2 { color: #fff; padding: 0 20px; font-size: 1.1rem; }
.admin-sidebar ul { list-style: none; margin: 20px 0 0; padding: 0; }
.admin-sidebar a {
  display: block;
  padding: 10px 20px;
  color: #C9D4D9;
  text-decoration: none;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { flex: 1; padding: 30px 36px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-login { max-width: 360px; margin: 80px auto; background: var(--color-surface); padding: 32px; border-radius: var(--radius); border: 1px solid var(--color-line); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; }
.badge-new { background: #FDEBD3; color: #8A5A0F; }
.badge-progress { background: #DCE7F0; color: #274C6B; }
.badge-done { background: #E1EFE3; color: #2A6338; }
.actions-row { display: flex; gap: 8px; }
.btn-small { padding: 5px 10px; font-size: 0.82rem; }
.btn-danger { background: #C0453A; color: #fff; border-color: #C0453A; }

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 8px 12px;
  }
  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--color-surface);
    border-top: 1px solid var(--color-line);
    padding: 10px 20px;
    z-index: 10;
  }
  .main-nav ul.open { display: flex; }
  .main-nav { position: relative; }
  .header-cta { display: none; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}
