:root {
    color-scheme: light;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f6f8;
    color: #1f2933;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.app-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1.5rem 2rem;
    background: transparent;
    color: #0f172a;
}

.app-header h1 {
    margin: 0;
    font-size: 1.7rem;
    width: 100%;
}

.subhead {
    margin: 0;
    opacity: 0.75;
    font-size: 1rem;
}

.header-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.total-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #eef2f8;
    border: 1px solid #d7dee9;
    font-size: 0.8rem;
    color: #0c3953;
}

.total-label {
    font-weight: 600;
}

.filter-bar {
    margin-top: 1rem;
    width: 100%;
}

.filter-bar input {
    width: min(100%, 50ch);
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
}

.filter-bar input:focus {
    outline: 2px solid #2563eb33;
    border-color: #2563eb;
}

#root {
    padding: 1.5rem;
    overflow-x: auto;
}

.board-wrapper {
    display: flex;
    gap: 1rem;
    min-height: calc(100vh - 160px);
}

.list-column {
    flex: 0 0 320px;
    background: #e4e9f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: auto;
}

.list-header {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #0c3953;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.list-subhead {
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-clickable {
    cursor: pointer;
}

.card:hover {
    cursor: pointer;
}

.card-summary {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-summary::-webkit-details-marker {
    display: none;
}

.card-comments {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #334155;
    max-height: 220px;
    overflow-y: auto;
}

.comment-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e2e8f0;
}

.comment-meta {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.comment-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.card[open] {
    border: 1px solid #cbd5f5;
}

.card-due-none {
    background: #d1d5db;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.card-subhead {
    font-size: 0.8rem;
    color: #475569;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #e0f2ff;
    color: #0b4f7a;
    border: 1px solid #b6e0ff;
    font-weight: 600;
    font-size: 0.75rem;
}

.card-meta {
    display: flex;
    justify-content: flex-start;
    font-size: 0.75rem;
    color: inherit;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.empty-list {
    font-size: 0.85rem;
    color: #6b7280;
    padding: 0.5rem 0;
    text-align: center;
}

.status-pill {
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    background: rgba(80, 167, 241, 0.2);
    color: #0c3953;
    font-size: 0.75rem;
    font-weight: 600;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-weight: 600;
    font-size: 0.72rem;
}

.pill-info {
    background: #e0f2ff;
    color: #0b4f7a;
    border: 1px solid #b6e0ff;
}

.error-state,
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #475569;
    min-height: 50vh;
}
.pill-warning {
    background: #fcd34d;
    color: #4a2c0a;
    border: 1px solid #f59e0b;
}

.pill-upcoming {
    background: #fef9c3;
    color: #4a2c0a;
    border: 1px solid #fcd34d;
}
