/* Finance starter — minimal styling inspired by the Capacity app */

:root {
    color-scheme: light;
    --page-bg: #eef2f8;
    --surface: #ffffff;
    --text: #4a4f57;
    --heading: #374151;
    --muted: #7b8491;
    --border: #d8e0eb;
    --border-soft: #e3e8ef;
    --blue: #1976d2;
    --blue-hover: #1565c0;
    --blue-soft: #edf5fd;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--blue);
    text-decoration: none;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    margin: 20px 0 8px;
    color: var(--blue);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 650;
}

h2 {
    margin-bottom: 8px;
    color: var(--heading);
    font-size: 20px;
    font-weight: 600;
}

h3 {
    color: var(--heading);
    font-size: 15px;
    font-weight: 600;
}

/* Sidebar */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 230px;
    padding: 24px 16px 16px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    margin-bottom: 42px;
    color: var(--heading);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.brand-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    background: var(--blue);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
}

.brand-dot {
    color: var(--blue);
}

.nav-label,
.eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-label {
    margin: 0 10px 10px;
}

.sidebar nav {
    display: grid;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #606770;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: #f4f6f9;
    color: var(--blue);
}

.nav-link.active {
    background: var(--blue-soft);
    border-color: #d5e6f8;
    color: var(--blue);
}

.nav-icon {
    width: 20px;
    color: inherit;
    font-size: 17px;
    text-align: center;
}

.sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 14px 7px 4px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8a94a3;
}

.version {
    margin-left: auto;
}

/* Main page */
.main {
    width: calc(100% - 230px);
    max-width: 1600px;
    margin-left: 230px;
    padding: 28px 32px 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eyebrow {
    margin-bottom: 3px;
}

.topbar h1 {
    margin-top: 10px;
}

.subtitle {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.date-label,
.muted-label,
.count {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #ccd5e2;
    border-radius: 6px;
    background: #fff;
    color: #606770;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.muted-label {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}

/* Informational notice */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 28px;
    background: #f8fbff;
    border: 1px solid #cbdff3;
    border-radius: 8px;
}

.notice-icon {
    display: grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: #dcecfb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.notice strong {
    display: block;
    margin-bottom: 2px;
    color: var(--heading);
    font-size: 13px;
}

.notice p {
    margin: 0;
    color: #657080;
    font-size: 12px;
}

/* Metric cards */
.section {
    margin-bottom: 28px;
}

.section-heading,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2,
.panel-heading h2 {
    margin-bottom: 3px;
}

.section-heading p,
.panel-heading p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card,
.panel {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.metric-card {
    padding: 17px 18px;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.metric-label {
    color: #606770;
    font-size: 12px;
    font-weight: 500;
}

.metric-symbol {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    background: #f2f5f9;
    border: 1px solid #e5eaf1;
    border-radius: 6px;
    color: #68778c;
    font-size: 16px;
}

.metric-value {
    margin: 15px 0 5px;
    color: var(--heading);
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -0.6px;
}

.metric-value small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
}

.metric-foot {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 11px;
}

/* Lower panels */
.lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 16px;
}

.panel {
    padding: 18px;
}

.panel-heading {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-soft);
}

.count {
    padding: 4px 8px;
    font-size: 11px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 12px 22px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    place-items: center;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #f6f8fb;
    color: #7b8491;
    font-size: 21px;
}

.empty-state h3 {
    margin-bottom: 5px;
}

.empty-state p {
    max-width: 270px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
}

.review-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-soft);
}

.review-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid #e3e8ef;
    border-radius: 6px;
    background: #f6f8fb;
    color: #68778c;
    font-size: 17px;
}

.review-item strong {
    color: var(--heading);
    font-size: 12px;
    font-weight: 600;
}

.review-item p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.panel-note {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 11px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

/* Responsive layouts */
@media (max-width: 1200px) {
    .main {
        padding-right: 24px;
        padding-left: 24px;
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@media (max-width: 700px) {
    .sidebar {
        position: static;
        width: 100%;
        padding: 14px 14px 10px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        margin-bottom: 18px;
    }

    .nav-label,
    .sidebar-bottom {
        display: none;
    }

    .sidebar nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .nav-link {
        flex: 0 0 auto;
        padding: 8px 10px;
        font-size: 12px;
    }

    .main {
        width: 100%;
        margin-left: 0;
        padding: 24px 14px;
    }

    .topbar {
        align-items: flex-start;
    }

    h1 {
        font-size: 27px;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
    }

    footer {
        flex-direction: column;
        gap: 4px;
    }
}


/* YY/MM/DD date field with a native calendar picker over the calendar icon. */
.setup-date-control {
  position: relative;
  width: 100%;
}

.setup-date-control > input[type="text"] {
  padding-right: 3.25rem !important;
}

.setup-date-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 1;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 1;
}

/* Keep the native calendar input clickable while hiding its browser-specific UI. */
.setup-date-control > input.setup-native-date-picker {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  opacity: 0;
  cursor: pointer;
}

.setup-date-control:focus-within {
  outline: 3px solid rgb(58 107 222 / 14%);
  border-radius: 8px;
}


/* Header action links — shared button style */
.topbar .category-header-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar .setup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid #d8dfeb;
    border-radius: 9px;
    background: #fff;
    color: #2457c5;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.topbar .setup-link:hover {
    background: #f5f7fb;
    border-color: #b9c8e0;
}

.topbar .setup-link:focus-visible {
    outline: 3px solid rgb(58 107 222 / 20%);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .topbar .category-header-links {
        gap: 8px;
    }

    .topbar .setup-link {
        padding: 8px 10px;
        font-size: 12px;
    }
}
