:root {
    --black: #000000;
    --navy: #0b1f33;
    --navy-soft: #16314c;
    --blue: #1d5fd1;
    --blue-dark: #174ca8;
    --blue-tint: #e8f0fc;
    --ink: #12263a;
    --muted: #5b6b7c;
    --line: #dce4ee;
    --bg: #ffffff;
    --bg-soft: #f4f7fb;
    --green: #1b8a5a;
    --amber: #b86e00;
    --radius: 8px;
    --header-h: 60px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

:focus-visible { outline: 3px solid #7fb0ff; outline-offset: 2px; }

[data-feather], .feather { width: 20px; height: 20px; stroke-width: 2; flex-shrink: 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { color: #fff; border-color: #3a5572; }
.btn-ghost:hover { background: var(--navy-soft); }
.btn-outline { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: var(--header-h);
    padding: 0 1.25rem;
    background: var(--black);
    color: #fff;
}
.logo img { height: 36px; width: auto; }

.nav { display: flex; align-items: center; gap: 2rem; flex: 1; justify-content: space-between; margin-left: 2rem; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a { color: #c9d6e4; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; gap: 0.6rem; }


@media (max-width: 767px) {
    .nav { margin-left: 0; justify-content: flex-end; }
    .nav-links { display: none; }
    .nav-actions .btn { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 3rem;
    max-width: 1160px;
    margin: 0 auto;
    padding: 4.5rem 1.25rem;
}
.hero-copy h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; max-width: 14ch; }
.hero-copy > p { margin-top: 1.25rem; max-width: 52ch; font-size: 1.1rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.75rem; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.hero-points li { display: flex; align-items: center; gap: 0.4rem; }
.hero-points .feather { width: 16px; height: 16px; color: var(--green); }

/* Daily summary card */
.today {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(11, 31, 51, 0.08);
}
.today-head { display: flex; align-items: center; justify-content: space-between; }
.today-head h2 { font-size: 1rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.today-total { margin-top: 0.75rem; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.today-note { color: var(--muted); font-size: 0.9rem; }
.today-list { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.today-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.today-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.today-list .feather { width: 18px; height: 18px; color: var(--blue); }
.today-list span { flex: 1; color: var(--muted); }

.badge {
    padding: 0.2rem 0.6rem;
    background: var(--blue-tint);
    color: var(--blue-dark);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.25rem; }
}

/* Sections */
.section { padding: 4.5rem 1.25rem; }
.section > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.section-tint { background: var(--bg-soft); border-top: 1px solid var(--line); }
.section-head { margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.section-head p { margin-top: 0.75rem; max-width: 56ch; color: var(--muted); }
.section-head .btn { margin-top: 1.25rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; }
.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.feature .feather { width: 40px; height: 40px; padding: 9px; background: var(--blue-tint); color: var(--blue); border-radius: var(--radius); }
.feature h3 { margin-top: 1rem; font-size: 1.1rem; }
.feature p { margin-top: 0.4rem; color: var(--muted); font-size: 0.93rem; }

/* Dashboard preview */
.dashboard {
    display: grid;
    grid-template-columns: 200px 1fr;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(11, 31, 51, 0.1);
}
.dash-nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 0.75rem; background: var(--navy); }
.dash-nav a { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; border-radius: var(--radius); color: #b7c7d9; font-size: 0.92rem; font-weight: 500; }
.dash-nav a:hover { background: var(--navy-soft); color: #fff; }
.dash-nav a.active { background: var(--blue); color: #fff; }
.dash-nav .feather { width: 18px; height: 18px; }

.dash-main { padding: 1.5rem; min-width: 0; }
.dash-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.dash-top h3 { font-size: 1.25rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.stat .feather { width: 18px; height: 18px; color: var(--blue); }
.stat p { margin-top: 0.5rem; color: var(--muted); font-size: 0.82rem; }
.stat strong { font-size: 1.25rem; letter-spacing: -0.02em; }

.dash-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1rem; margin-top: 1rem; }
.panel { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel h4 { font-size: 0.95rem; margin-bottom: 1rem; }

/* Bar chart: bar height comes from --h on each item */
.chart { display: flex; align-items: flex-end; gap: 0.6rem; height: 180px; }
.chart li {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    height: 100%;
    font-size: 0.75rem;
    color: var(--muted);
}
.chart li::before { content: ""; width: 100%; height: var(--h); background: var(--blue); border-radius: 4px 4px 0 0; }
.chart li:nth-child(1) { --h: 45%; }
.chart li:nth-child(2) { --h: 62%; }
.chart li:nth-child(3) { --h: 55%; }
.chart li:nth-child(4) { --h: 78%; }
.chart li:nth-child(5) { --h: 92%; }
.chart li:nth-child(6) { --h: 70%; }
.chart li:nth-child(7) { --h: 38%; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8rem; }
th, td { padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:last-child, th:last-child { text-align: right; }
td:last-child { font-weight: 600; }

@media (max-width: 900px) {
    .dashboard { grid-template-columns: 1fr; }
    .dash-nav { flex-direction: row; overflow-x: auto; padding: 0.6rem; }
    .dash-nav a { flex-shrink: 0; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .section { padding: 3rem 1.25rem; }
    .dash-main { padding: 1rem; }
    .dash-nav a span { display: none; }
    .dash-nav a { padding: 0.6rem; }
}

/* Footer */
.footer { padding: 3rem 1.25rem 1.5rem; background: var(--navy); color: #c9d6e4; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; max-width: 1160px; margin: 0 auto; }
.footer-brand { max-width: 36ch; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.92rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }
.footer-nav a { font-size: 0.92rem; font-weight: 500; }
.footer-nav a:hover { color: #fff; }
.copyright { max-width: 1160px; margin: 2rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--navy-soft); font-size: 0.85rem; color: #8aa0b6; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
