* {
    box-sizing: border-box;
}

:root {
    --background: #0f1116;
    --panel: #181b22;
    --panel-secondary: #20242d;
    --border: #2b303a;
    --text: #f4f5f7;
    --muted: #9199a8;
    --danger: #ff7070;
    --warning: #eabf65;
    --success: #70c995;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

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

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #15181e;
    border-right: 1px solid var(--border);
    padding: 28px 18px;
}

.brand h1 {
    margin: 0;
    font-size: 2rem;
}

.brand p {
    color: var(--muted);
    margin: 6px 0 0;
}

.overwhelm-button {
    width: 100%;
    margin: 28px 0;
    padding: 13px;
    border: 1px solid #554c3a;
    background: #27231b;
    color: #ffe3a0;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #aeb5c2;
    text-decoration: none;
    padding: 11px 13px;
    border-radius: 8px;
}

nav a:hover,
nav a.active {
    background: var(--panel-secondary);
    color: white;
}

.nav-badge {
    background: #3a404c;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.lock-icon {
    font-size: 0.8rem;
}

.dashboard {
    width: 100%;
    max-width: 1500px;
    padding: 35px;
}

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

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12rem;
}

.topbar h2 {
    font-size: 2rem;
    margin: 0;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 0;
}

.energy-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.energy-control > span {
    color: var(--muted);
    font-size: 0.8rem;
}

.energy-options {
    display: flex;
    gap: 6px;
}

.energy-options button {
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    padding: 8px 11px;
    border-radius: 7px;
}

.energy-options button.selected {
    color: white;
    background: #343a46;
}

.time-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.time-stat {
    padding: 16px 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    color: var(--muted);
    font-size: 0.8rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 20px;
}

.quick-add {
    margin-bottom: 20px;
}

.quick-add h3,
.card h3 {
    margin-top: 0;
}

.quick-add p {
    color: var(--muted);
}

.quick-add form {
    display: flex;
    gap: 10px;
}

.quick-add input {
    flex: 1;
    padding: 13px;
    color: white;
    background: var(--background);
    border: 1px solid #383e49;
    border-radius: 8px;
}

.quick-add button {
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.helper-text {
    display: block;
    color: var(--muted);
    margin-top: 9px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.section-heading h3 {
    margin: 0;
}

.section-heading p {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 4px 0 0;
}

.section-heading > span {
    color: var(--muted);
    font-size: 0.8rem;
}

.task {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.task-content {
    flex: 1;
}

.task-content strong {
    display: block;
    margin-bottom: 7px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.chip {
    padding: 4px 7px;
    border-radius: 5px;
    background: #272c35;
    color: var(--muted);
    font-size: 0.68rem;
}

.chip.hard {
    background: #382121;
    color: #ff9999;
}

.chip.soft {
    background: #37321f;
    color: #e8d181;
}

.commitment-chip {
    background: #222f3c;
    color: #9cc8ef;
}

.hard-deadline {
    border-left: 3px solid var(--danger);
    padding-left: 10px;
}

.commitment {
    border-left: 3px solid #82b7e5;
    padding-left: 10px;
}

.more-button,
.secondary-button {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel-secondary);
    color: var(--text);
    cursor: pointer;
}

.commitment-row,
.waiting-item,
.inbox-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.commitment-row div,
.inbox-item div {
    display: flex;
    flex-direction: column;
}

.commitment-row small,
.waiting-item small,
.inbox-item small {
    color: var(--muted);
    margin-top: 4px;
}

.status {
    padding: 5px 7px;
    font-size: 0.7rem;
    border-radius: 6px;
    background: var(--panel-secondary);
}

.status.progress {
    color: #e5cf80;
}

.warning-count {
    color: var(--warning) !important;
}

.inbox-item.overdue {
    border-left: 3px solid var(--warning);
    padding-left: 10px;
}

.needs-triage {
    color: var(--warning);
    font-size: 0.7rem;
}

.schedule-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.schedule-time {
    width: 75px;
    color: var(--muted);
    font-size: 0.85rem;
}

.schedule-item div:last-child {
    display: flex;
    flex-direction: column;
}

.schedule-item small {
    color: var(--muted);
    margin-top: 3px;
}

.schedule-item.fixed {
    border-left: 3px solid #d47777;
    padding-left: 10px;
}

.schedule-item.flexible {
    border-left: 3px solid #7aa5ce;
    padding-left: 10px;
}

.project {
    margin-bottom: 18px;
}

.project-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}

.project-title span {
    color: var(--muted);
    font-size: 0.8rem;
}

progress {
    width: 100%;
    height: 10px;
}

.upcoming-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.upcoming-item div {
    display: flex;
    flex-direction: column;
}

.upcoming-item small {
    color: var(--muted);
    margin-top: 4px;
}

.date-box {
    background: var(--panel-secondary);
    padding: 8px;
    border-radius: 7px;
    font-size: 0.7rem;
}

.wins {
    padding-left: 18px;
    margin-bottom: 0;
}

.wins li {
    margin-bottom: 9px;
}

.suggestion {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 25px;
}

.suggestion p {
    color: var(--muted);
}

.suggested-tasks {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 240px;
}

.suggested-tasks span {
    padding: 9px;
    background: var(--panel-secondary);
    border-radius: 6px;
    font-size: 0.8rem;
}

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

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

@media (max-width: 700px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 18px;
    }

    nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .overwhelm-button {
        margin: 18px 0;
    }

    .dashboard {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar h2 {
        font-size: 1.7rem;
    }

    .quick-add form {
        flex-direction: column;
    }

    .quick-add button {
        width: 100%;
    }

    .suggestion {
        flex-direction: column;
    }

    .suggested-tasks {
        min-width: 0;
    }
}

@media (max-width: 420px) {
    nav {
        grid-template-columns: 1fr;
    }

    .meta-row {
        gap: 4px;
    }
}