:root {
  --navy: #071b2f;
  --navy-2: #0d2b48;
  --blue: #1469aa;
  --blue-soft: #eaf2fb;
  --ink: #102a49;
  --muted: #647791;
  --line: #dce6f0;
  --surface: #ffffff;
  --page: #eef4f9;
  --green: #22a65a;
  --shadow: 0 10px 28px rgba(39, 78, 113, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-family: 'DM Sans', Arial, sans-serif; font-size: 15px; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.backend-shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 10; display: flex; flex: 0 0 224px; flex-direction: column; min-height: 100vh; padding: 26px 14px 18px; color: #fff; background: linear-gradient(180deg, #071b2f 0%, #092540 100%); }
.brand-mark { display: flex; align-items: center; justify-content: center; height: 62px; margin: 0 8px 22px; }
.brand-mark img { display: block; width: 170px; max-height: 60px; object-fit: contain; }
.side-nav { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 13px; min-height: 39px; padding: 8px 13px; border-radius: 10px; color: #eef7ff; font-size: 14px; font-weight: 600; transition: background .18s, transform .18s; }
.nav-item:hover, .nav-item.is-active { background: linear-gradient(90deg, #0f68aa, #155789); }
.nav-item:hover { transform: translateX(2px); }
.nav-icon { display: grid; width: 21px; place-items: center; color: #fff; font-size: 18px; line-height: 1; }
.sidebar-account { display: grid; grid-template-columns: 38px 1fr 28px; gap: 10px; align-items: center; margin-top: auto; padding: 18px 10px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--navy); background: #f6fbff; font-weight: 800; }
.sidebar-account strong, .sidebar-account small { display: block; }
.sidebar-account strong { font-size: 13px; }
.sidebar-account small { margin-top: 2px; color: #a9c1d8; font-size: 11px; }
.logout { border: 0; color: #f2f7fb; background: transparent; font-size: 23px; }

.workspace { min-width: 0; flex: 1; }
.topbar { display: flex; min-height: 84px; align-items: center; gap: 22px; padding: 17px 30px 15px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); }
.page-heading { min-width: 200px; }
.page-heading h1 { margin: 0; font-family: Manrope, Arial, sans-serif; font-size: 25px; line-height: 1.1; letter-spacing: -.04em; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-tools { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 18px; color: var(--muted); font-size: 12px; }
.online { color: #168a49; font-weight: 700; }
.online i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.current-date { white-space: nowrap; }
.tool-button, .mobile-menu { position: relative; border: 0; color: var(--ink); background: transparent; font-size: 24px; line-height: 1; }
.tool-button { display: inline-flex; align-items: center; justify-content: center; }
.tool-button:hover { color: var(--blue); }
.notification-button b { position: absolute; top: -7px; right: -8px; display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: #fff; background: #dc3e47; font-size: 10px; }
.top-slogan { margin-left: 7px; color: var(--navy); font-family: Caveat, cursive; font-size: 24px; font-weight: 700; white-space: nowrap; transform: rotate(-3deg); }
.locale-switcher { display: inline-flex; gap: 3px; margin-left: 4px; }
.locale-switcher a { padding: 4px 5px; border-radius: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.locale-switcher a.is-active { color: #fff; background: var(--blue); }
.mobile-menu { display: none; }

.dashboard-content { width: min(100%, 1440px); margin: 0 auto; padding: 18px 30px 34px; }
.hero-panel { position: relative; min-height: 184px; overflow: hidden; border-radius: 14px; color: #fff; box-shadow: var(--shadow); }
.hero-panel::after { position: absolute; inset: 0; content: ''; background: linear-gradient(90deg, rgba(7,27,47,.85) 0%, rgba(7,27,47,.47) 48%, rgba(7,27,47,.08) 82%); }
.hero-panel > img { display: block; width: 100%; height: 184px; object-fit: cover; object-position: center 53%; }
.hero-copy { position: absolute; z-index: 1; left: 20px; bottom: 17px; max-width: 690px; }
.hero-copy p { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.hero-copy h2 { margin: 0 0 5px; color: #fff; font-family: Manrope, Arial, sans-serif; font-size: clamp(20px, 2.25vw, 29px); letter-spacing: -.04em; }
.hero-copy strong { font-size: 16px; }
.hero-weather { position: absolute; z-index: 2; top: 23px; right: 22px; width: 142px; padding: 13px 15px; border-radius: 10px; color: #fff; background: rgba(7,27,47,.72); backdrop-filter: blur(6px); }
.hero-weather small, .hero-weather strong { display: block; }
.hero-weather small { font-size: 11px; opacity: .84; }
.hero-weather strong { margin: 3px 0 7px; font-size: 16px; }
.weather-reading { display: flex; align-items: center; gap: 10px; }
.weather-reading span { font-size: 30px; line-height: 1; }
.weather-reading b { font-size: 24px; }

.dashboard-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.dashboard-card { min-width: 0; padding: 13px 15px 15px; border: 1px solid rgba(211,224,237,.8); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.card-heading h3 { margin: 0; font-size: 14px; font-weight: 800; }
.card-menu { border: 0; color: var(--muted); background: transparent; font-size: 22px; line-height: 1; }
.stage-photo { position: relative; height: 100px; overflow: hidden; border-radius: 7px; }
.stage-photo::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, transparent 55%, rgba(7,27,47,.26)); }
.stage-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.stage-photo b { position: absolute; z-index: 1; top: 8px; right: 8px; padding: 5px 7px; border-radius: 6px; color: var(--ink); background: #fff; font-size: 11px; }
.stage-card h2 { margin: 8px 0 1px; font-family: Manrope, Arial, sans-serif; font-size: 17px; letter-spacing: -.03em; }
.location { margin: 0 0 10px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-line { position: relative; height: 18px; margin: 0 0 11px; background: transparent; }
.progress-line::before { position: absolute; top: 5px; right: 69px; left: 0; height: 8px; content: ''; border-radius: 10px; background: #e9eff5; }
.progress-line i { position: absolute; top: 5px; left: 0; display: block; max-width: calc(100% - 69px); height: 8px; border-radius: inherit; background: var(--green); }
.progress-line span { position: absolute; top: 1px; right: 0; white-space: nowrap; color: var(--muted); font-size: 10px; }
.progress-line.muted i { background: #a7b9ca; }
.primary-action, .secondary-action { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 34px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; }
.primary-action { color: #fff; background: #09609e; }
.secondary-action { color: #12385c; background: #edf4fb; }
.primary-action:hover, .secondary-action:hover, .quick-action:hover { filter: brightness(.97); transform: translateY(-1px); }
.progress-card { display: flex; flex-direction: column; align-items: center; }
.progress-card .card-heading { width: 100%; align-self: stretch; }
.donut { --progress: 27%; display: grid; width: 124px; height: 124px; margin: 8px auto 13px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 var(--progress), #e8eef4 var(--progress) 100%); }
.donut::before { width: 91px; height: 91px; position: absolute; content: ''; border-radius: 50%; background: #fff; }
.donut span { z-index: 1; font-family: Manrope, Arial, sans-serif; font-size: 25px; font-weight: 800; }
.donut small { font-size: 14px; }
.progress-card > strong { font-size: 11px; font-weight: 600; }
.quick-card { padding-left: 12px; padding-right: 12px; }
.quick-action { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 29px; margin: 0 0 5px; padding: 5px 10px; border: 0; border-radius: 7px; color: #183858; background: #edf4fb; text-align: left; font-size: 11px; transition: transform .18s, filter .18s; }
.quick-action:last-child { margin-bottom: 0; }
.quick-action span { width: 16px; color: var(--blue); font-size: 16px; text-align: center; }

.bottom-grid { display: grid; grid-template-columns: 1.17fr 1.28fr .82fr; gap: 16px; margin-top: 14px; }
.post-row { display: grid; grid-template-columns: 69px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #edf1f5; }
.post-row:last-child { border-bottom: 0; }
.post-row img { width: 69px; height: 55px; border-radius: 6px; object-fit: cover; }
.post-row strong, .post-row small { display: block; }
.post-row strong { font-size: 12px; }
.post-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.post-row em { padding: 5px 8px; border-radius: 6px; color: #177548; background: #ddf5e7; font-size: 10px; font-style: normal; white-space: nowrap; }
.post-row em.draft { color: #627992; background: #e8eef4; }
.mini-map { position: relative; overflow: hidden; height: 180px; border-radius: 8px; background: #c5e1ca; }
.mini-map::after { position: absolute; inset: 0; content: ''; opacity: .4; background: repeating-linear-gradient(26deg, transparent 0 28px, rgba(255,255,255,.5) 29px 31px), repeating-linear-gradient(112deg, transparent 0 45px, rgba(122,166,118,.3) 46px 48px); }
.mini-map svg { position: relative; z-index: 1; width: 100%; height: 100%; }
.route-water { fill: #c9e7f4; }
.route-road { fill: none; stroke: #1269b1; stroke-dasharray: 3 7; stroke-linecap: round; stroke-width: 7; }
.mini-map circle { fill: #1269b1; stroke: #fff; stroke-width: 4; }
.mini-map text { fill: #234b56; font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700; }
.map-open { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: flex; align-items: center; min-height: 31px; padding: 0 12px; border: 0; border-radius: 7px; color: #fff; background: #07538e; font-size: 11px; font-weight: 700; }
.country-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; min-height: 28px; border-bottom: 1px solid #edf1f5; font-size: 12px; }
.country-row:last-child { border-bottom: 0; }
.country-row b { font-size: 17px; }
.country-row strong { font-weight: 700; }
.country-row span { color: var(--muted); font-size: 10px; }

.mobile-nav { display: none; }
.toast { position: fixed; z-index: 30; right: 26px; bottom: 24px; padding: 12px 16px; border-radius: 9px; color: #fff; background: var(--navy); box-shadow: 0 12px 30px rgba(7,27,47,.25); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1000px) {
  .sidebar { flex-basis: 205px; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .dashboard-content { padding-left: 22px; padding-right: 22px; }
  .topbar-tools { gap: 11px; }
  .top-slogan { font-size: 21px; }
  .dashboard-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .countries-card { grid-column: span 2; }
  .countries-card { display: grid; grid-template-columns: auto repeat(5, 1fr); align-items: center; gap: 10px; }
  .countries-card .card-heading { margin: 0; }
  .country-row { border-bottom: 0; }
}

@media (max-width: 760px) {
  body { padding-bottom: 71px; }
  .backend-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: min(270px, 86vw); min-height: 100vh; padding-top: 20px; transform: translateX(-102%); transition: transform .24s ease; box-shadow: 10px 0 30px rgba(5,26,45,.22); }
  .sidebar.is-open { transform: translateX(0); }
  .topbar { min-height: 69px; padding: 11px 15px; gap: 11px; }
  .mobile-menu { display: block; flex: 0 0 29px; padding: 0; font-size: 20px; }
  .page-heading { min-width: 0; }
  .page-heading h1 { font-size: 19px; }
  .page-heading p { font-size: 11px; white-space: nowrap; }
  .topbar-tools { gap: 8px; }
  .online, .current-date, .top-slogan, .topbar-tools > .tool-button:last-child { display: none; }
  .tool-button { font-size: 22px; }
  .dashboard-content { padding: 11px 12px 23px; }
  .hero-panel, .hero-panel > img { min-height: 270px; height: 270px; }
  .hero-panel > img { object-position: 61% center; }
  .hero-panel::after { background: linear-gradient(0deg, rgba(7,27,47,.85) 3%, rgba(7,27,47,.17) 88%); }
  .hero-copy { left: 15px; right: 15px; bottom: 18px; }
  .hero-copy p { font-size: 11px; }
  .hero-copy h2 { max-width: 300px; font-size: 23px; line-height: 1.07; }
  .hero-copy strong { display: block; max-width: 250px; font-size: 13px; line-height: 1.3; }
  .hero-weather { top: 14px; right: 14px; width: 121px; padding: 9px 11px; }
  .hero-weather strong { font-size: 14px; }
  .weather-reading span { font-size: 25px; }
  .weather-reading b { font-size: 21px; }
  .dashboard-row, .bottom-grid { grid-template-columns: 1fr; gap: 11px; margin-top: 11px; }
  .dashboard-card { padding: 12px; }
  .stage-photo { height: 145px; }
  .progress-card { min-height: 236px; }
  .bottom-grid .countries-card { display: block; }
  .countries-card .card-heading { margin-bottom: 8px; }
  .country-row { border-bottom: 1px solid #edf1f5; }
  .country-row:last-child { border-bottom: 0; }
  .mini-map { height: 220px; }
  .mobile-nav { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: 70px; padding: 8px 12px 9px; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -6px 22px rgba(39,78,113,.08); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #71839a; font-size: 10px; font-weight: 700; }
  .mobile-nav a span { font-size: 20px; line-height: 1; }
  .mobile-nav a.is-active { color: #0a61a0; }
  .toast { right: 13px; bottom: 83px; left: 13px; text-align: center; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .top-slogan { display: none; }
  .topbar-tools { gap: 12px; }
}
