:root {
    --ink: #19201e;
    --muted: #75807b;
    --line: #e4e9e6;
    --soft: #f2f5f3;
    --sidebar: #0f1d18;
    --green: #398275;
    --green-dark: #2f7166;
    --chip: #eaf2ef;
    --danger: #a94038;
    --warn: #9a6428;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #eef2ef;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    flex: 0 0 280px;
    background: var(--sidebar);
    color: #f3faf7;
    padding: 22px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #55ae9d;
    color: #0d281f;
    font-weight: 900;
}

.brand h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.brand p,
.queue-header p,
.console-panel p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, .68);
    font-weight: 650;
}

.side-nav {
    display: grid;
    gap: 12px;
}

.side-nav a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 750;
}

.side-nav a.active,
.side-nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 28px;
    overflow: hidden;
}

.topbar,
.top-actions,
.capture-panel,
.capture-form,
.quick-tags,
.queue-header,
.queue-tools,
.item-row,
.item-meta,
.item-actions,
.next-actions {
    display: flex;
    align-items: center;
}

.topbar {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.date-label,
.section-kicker {
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 900;
}

.date-label {
    font-size: 14px;
}

.topbar h2 {
    margin: 6px 0 0;
    font-size: 36px;
    line-height: 1;
    font-weight: 950;
}

.top-actions {
    gap: 10px;
}

.btn {
    border-radius: 8px;
    font-weight: 900;
    padding: 10px 16px;
}

.btn-primary {
    background: var(--green);
    border-color: var(--green);
}

.btn-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.btn-light {
    background: #fff;
    border-color: var(--line);
}

.icon-alert {
    width: 46px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card,
.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 29, 24, .05);
}

.summary-card {
    padding: 18px 20px;
}

.summary-card span {
    display: block;
    font-size: 18px;
    font-weight: 650;
}

.summary-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr .96fr;
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    padding: 22px;
}

.ritual-panel {
    min-height: 210px;
    display: grid;
    grid-template-columns: 1fr 145px auto auto;
    align-items: center;
    gap: 16px;
}

.section-kicker {
    font-size: 14px;
    margin-bottom: 8px;
}

.panel h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 950;
}

.ritual-panel p,
.queue-header p,
.console-panel p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.15;
}

.streak-box {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f2f7f5;
}

.streak-box span,
.streak-box small {
    display: block;
    color: var(--muted);
    font-weight: 900;
}

.streak-box strong {
    display: block;
    font-size: 44px;
    line-height: .9;
    font-weight: 950;
}

.next-action-panel h4 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.status-pill,
.type-pill,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 900;
    line-height: 1;
}

.status-pill {
    padding: 8px 10px;
    background: #f9e8df;
    color: var(--danger);
    font-size: 13px;
}

.status-pill.warning {
    background: #fff0d7;
    color: var(--warn);
}

.status-pill.done {
    background: var(--chip);
    color: var(--green-dark);
}

.next-meta,
.item-subline {
    color: var(--muted);
    font-size: 16px;
    font-weight: 650;
}

.next-actions {
    gap: 10px;
    margin-top: 18px;
}

.capture-panel {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.capture-panel h3 {
    max-width: 350px;
}

.capture-form {
    flex: 1;
    gap: 10px;
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 8px;
    min-height: 46px;
    font-size: 17px;
}

.quick-tags {
    gap: 9px;
}

.tag {
    border: 1px solid var(--line);
    background: var(--chip);
    color: #286154;
    padding: 12px 16px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 18px;
}

.list-only-grid {
    display: block;
}

.queue-panel {
    padding: 0;
    overflow: hidden;
}

.queue-header {
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.queue-tools {
    gap: 10px;
}

.queue-tools .form-control {
    width: 230px;
}

.queue-tools .form-select {
    width: 180px;
}

.item-row {
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.item-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.item-title strong {
    font-size: 19px;
}

.type-pill {
    padding: 8px 10px;
    background: var(--chip);
    color: #286154;
    font-size: 12px;
}

.item-meta {
    gap: 14px;
    flex-wrap: wrap;
}

.item-actions {
    gap: 8px;
}

.lifeops-table {
    min-width: 900px;
}

.lifeops-table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 900;
    padding: 14px 22px;
    background: #f7faf8;
}

.lifeops-table td {
    padding: 16px 22px;
    border-color: var(--line);
    color: var(--ink);
    font-size: 15px;
}

.table-note {
    max-width: 420px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    margin-right: 6px;
}

.console-panel {
    align-self: start;
}

.console-panel p {
    margin-bottom: 18px;
}

#assistant-console {
    margin: 0;
    min-height: 250px;
    padding: 18px;
    border-radius: 8px;
    background: #111f1a;
    color: #f1faf6;
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.5;
}

.autopay-field {
    display: flex;
    align-items: end;
    padding-bottom: 9px;
}

@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .ritual-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .app-shell,
    .topbar,
    .capture-panel,
    .queue-header,
    .item-row {
        display: block;
    }

    .sidebar {
        width: 100%;
    }

    .main-content {
        padding: 18px;
    }

    .topbar h2 {
        font-size: 30px;
    }

    .top-actions,
    .capture-form,
    .quick-tags,
    .queue-tools,
    .item-actions {
        margin-top: 14px;
        flex-wrap: wrap;
    }

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

    .queue-tools .form-control,
    .queue-tools .form-select {
        width: 100%;
    }
}
