:root {
    --bg: #1a1a2e;
    --card: #16213e;
    --border: #1f3460;
    --text: #e2e8f0;
    --muted: #64748b;
    --accent: #4f8cff;
    --success: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 8px;
    line-height: 1.4;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-form {
    background: var(--card);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 240px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 14px;
    color: var(--accent);
}

.login-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 11px;
    background: var(--bg);
    color: var(--text);
}

.login-form button {
    width: 100%;
    padding: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
}

.error { color: var(--danger); text-align: center; margin-bottom: 8px; }

/* Header */
header {
    background: var(--card);
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

header h1 { font-weight: 500; font-size: 10px; color: var(--accent); }
.logout { color: var(--muted); text-decoration: none; font-size: 8px; }
.logout:hover { color: var(--text); }

/* Main Grid */
main {
    padding: 6px;
    height: calc(100vh - 26px);
    overflow: hidden;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 5px;
    height: 100%;
    align-content: start;
}

.category {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    max-height: calc(50vh - 16px);
    overflow: hidden;
}

.category h2 {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 6px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category h2 .count {
    font-weight: 400;
    opacity: 0.6;
}

/* Category Colors */
.category[data-category="work"] h2 { color: #60a5fa; }
.category[data-category="house"] h2 { color: #34d399; }
.category[data-category="thailand"] h2 { color: #c084fc; }
.category[data-category="urgent"] h2 { color: #f87171; }
.category[data-category="waiting"] h2 { color: #fbbf24; }
.category[data-category="someday"] h2 { color: #94a3b8; }

/* Task List */
.task-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.task-list::-webkit-scrollbar { width: 4px; }
.task-list::-webkit-scrollbar-track { background: transparent; }
.task-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.task {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    min-height: 16px;
}

.task:hover { background: rgba(79, 140, 255, 0.05); }

.done-btn {
    width: 10px;
    height: 10px;
    border: 1px solid var(--muted);
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    color: transparent;
    font-size: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.15s;
}

.done-btn:hover {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.task-tag {
    font-size: 7px;
    color: var(--muted);
    background: rgba(255,255,255,0.05);
    padding: 1px 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.task-title {
    flex: 1;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.due-date {
    font-size: 7px;
    color: var(--warn);
    flex-shrink: 0;
}

.has-notes {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    font-size: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: help;
    flex-shrink: 0;
}

/* Priority */
.priority-1 .task-title { color: var(--warn); }
.priority-2 .task-title { color: var(--danger); font-weight: 500; }

/* Empty */
.task-list:empty::after {
    content: 'Empty';
    display: block;
    padding: 8px;
    color: var(--muted);
    text-align: center;
    font-size: 7px;
    font-style: italic;
}

@media (max-width: 600px) {
    .categories { grid-template-columns: repeat(2, 1fr); }
}
