/* ===== shanik.lol — Design System ===== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,200;0,9..144,300;1,9..144,200;1,9..144,300&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== CSS Variables ===== */
:root,
[data-theme="dark"] {
    --nik: #e05252;
    --shannon: #e87aaa;
    --home: #5db87e;
    --office: #6b9bd2;
    /* --remote removed */
    --bg: #0e0e0d;
    --bg-card: #191817;
    --bg-card-2: #232220;
    --border: #2c2b29;
    --text: #eeeae4;
    --text-muted: #a09b94;
    --text-dim: #6e6a63;
    --accent: #c8a96e;
    --danger: #e05252;
    --success: #5db87e;
    --shadow: rgba(0,0,0,0.4);
}

[data-theme="light"] {
    --bg: #f5f3ef;
    --bg-card: #ffffff;
    --bg-card-2: #f0eeea;
    --border: #ddd9d2;
    --text: #1a1918;
    --text-muted: #6b6860;
    --text-dim: #a8a49c;
    --shadow: rgba(0,0,0,0.08);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

/* ===== Layout Shell ===== */
.app-shell {
    display: flex;
    flex-direction: column;
    width: 1920px;
    height: 1080px;
}

/* --- Topbar --- */
.topbar {
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 100;
}

.topbar-logo {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 22px;
    color: var(--text);
    margin-right: 32px;
    cursor: default;
    user-select: none;
}
.topbar-logo .lol {
    color: var(--text-muted);
}

.topbar-nav {
    display: flex;
    gap: 4px;
}

.topbar-nav button {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    min-height: 44px;
    min-width: 44px;
}
.topbar-nav button:hover {
    background: var(--bg-card-2);
    color: var(--text);
}
.topbar-nav button.active {
    background: var(--bg-card-2);
    color: var(--text);
    font-weight: 600;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.theme-toggle:hover {
    background: var(--bg-card-2);
}

/* --- Main Area --- */
.main-area {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* --- Sidebar --- */
.sidebar {
    width: 274px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.sidebar-widget {
    background: var(--bg-card-2);
    border-radius: 12px;
    padding: 16px;
}

/* Spotify activate overlay */
.spotify-activate-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(20, 20, 25, 0.92);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.spotify-activate-overlay:hover {
    background: rgba(30, 30, 38, 0.95);
}
.spotify-activate-overlay.hidden {
    display: none;
}
.spotify-activate-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.spotify-activate-icon {
    font-size: 22px;
    color: #1db954;
}
.sidebar-widget-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Sidebar rotator */
.sidebar-rotator {
    position: relative;
    height: 125px;
    overflow: hidden;
}
.rotator-panel {
    opacity: 0;
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.rotator-panel.active {
    opacity: 1;
    pointer-events: auto;
}

/* Clock widget */
.clock-time {
    font-family: 'Fraunces', serif;
    font-weight: 200;
    font-size: 52px;
    line-height: 1;
    color: var(--text);
}
.clock-ampm {
    font-size: 20px;
    color: var(--text-muted);
    margin-left: 4px;
}
.clock-day {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
}
.clock-date {
    font-size: 13px;
    color: var(--text-dim);
}

/* Weather mini */
.weather-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}
.weather-mini-icon {
    font-size: 42px;
}
.weather-mini-temp {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 36px;
}
.weather-mini-details {
    font-size: 14px;
    color: var(--text-muted);
}
.weather-mini-hl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Work status widget */
.work-person {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.work-person:last-child { margin-bottom: 0; }
.work-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.work-dot.nik { background: var(--nik); }
.work-dot.shannon { background: var(--shannon); }
.work-name {
    font-size: 13px;
    font-weight: 500;
    width: 64px;
}
.work-btns {
    display: flex;
    gap: 4px;
}
.work-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    min-height: 30px;
}
.work-btn:hover { border-color: var(--text); color: var(--text); }
.work-btn.active-home { background: var(--home); color: #fff; border-color: var(--home); }
.work-btn.active-office { background: var(--office); color: #fff; border-color: var(--office); }
/* remote status removed */

/* Spotify mini widget */
.spotify-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}
.spotify-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--bg-card);
    object-fit: cover;
}
.spotify-info {
    flex: 1;
    min-width: 0;
}
.spotify-track {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotify-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotify-controls {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    justify-content: center;
}
.spotify-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.spotify-btn:hover { background: var(--border); }

.spotify-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}
.spotify-volume-icon {
    font-size: 13px;
    color: var(--text-dim);
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}
.spotify-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}
.spotify-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s;
}
.spotify-volume-slider::-webkit-slider-thumb:hover {
    background: var(--text);
}
.spotify-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
}
.spotify-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
}

/* --- Content Area --- */
.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-width: 0;
}

/* View switching */
.view { display: none; height: 100%; }
.view.active { display: flex; flex-direction: column; }

/* ===== Dashboard View ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.dash-left, .dash-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.dash-right-top, .dash-right-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card base */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.btn-inline-add {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.btn-inline-add:hover { opacity: 0.8; }

.card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Mini calendar (dashboard) */
.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    flex: 1;
}
.mini-cal-day {
    background: var(--bg-card-2);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    min-height: 100px;
    transition: border-color 0.15s;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}
.mini-cal-day:hover {
    border-color: var(--border);
}
.mini-cal-day.today {
    border-color: var(--accent);
}
.mini-cal-dayname {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}
.mini-cal-day-header {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mini-cal-daynum {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 22px;
}
.mini-cal-events {
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.mini-cal-event {
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}
.mini-cal-event.nik { background: rgba(224,82,82,0.15); color: var(--nik); }
.mini-cal-event.shannon { background: rgba(232,122,170,0.15); color: var(--shannon); }

.mini-cal-todos {
    padding-top: 4px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.mini-cal-todo {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mini-cal-todo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mini-cal-todo-dot.nik { background: var(--nik); }
.mini-cal-todo-dot.shannon { background: var(--shannon); }
.mini-cal-todo-dot.both { background: var(--accent); }

.mini-cal-meals {
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mini-cal-meal {
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mini-cal-meal-type {
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    background: var(--accent);
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-cal-meal-type.type-b { background: #c8a96e; }
.mini-cal-meal-type.type-l { background: #6b9bd2; }
.mini-cal-meal-type.type-d { background: #e05252; }
.mini-cal-meal-type.type-s { background: #5db87e; }

.mini-cal-status {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: auto;
}
.status-icon svg {
    width: 100%;
    height: 100%;
}

/* Meal cards (dashboard) */
.meal-cards {
    display: flex;
    gap: 10px;
}
.meal-card {
    flex: 1;
    background: var(--bg-card-2);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s;
    border: 1px solid transparent;
    min-height: 80px;
}
.meal-card:hover { border-color: var(--border); }
.meal-card-type {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.meal-card-title {
    font-size: 14px;
    font-weight: 500;
}
.meal-card-empty {
    color: var(--text-dim);
    font-style: italic;
    font-size: 13px;
}

/* Todo/Grocery preview (dashboard) */
.preview-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
}
.preview-item:hover { background: var(--bg-card-2); }
.preview-item.checked {
    text-decoration: line-through;
    color: var(--text-dim);
}
.preview-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.15s;
}
.preview-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.preview-due {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
    margin-left: auto;
}
.preview-due.overdue { color: var(--danger); }

/* ===== Calendar View ===== */
.calendar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.calendar-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 24px;
}
.cal-nav-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-nav-btn:hover { background: var(--bg-card-2); }

.cal-person-toggle {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    min-height: 36px;
    transition: opacity 0.15s;
}
.cal-person-toggle.off {
    opacity: 0.25;
}
.cal-person-toggle.on {
    opacity: 1;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    flex: 1;
    min-height: 0;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.cal-header-cell {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 4px;
    background: var(--bg-card);
}
.cal-cell {
    background: var(--bg-card);
    padding: 4px;
    cursor: pointer;
    transition: background 0.15s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cal-cell:hover { background: var(--bg-card-2); }
.cal-cell.today { background: rgba(200,169,110,0.06); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.other-month { opacity: 0.35; }
.cal-cell-header {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 2px;
}
.cal-cell-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}
.cal-cell-status {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.cal-cell-events {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.cal-chip {
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.cal-chip.nik { background: rgba(224,82,82,0.15); color: var(--nik); }
.cal-chip.shannon { background: rgba(232,122,170,0.15); color: var(--shannon); }
.cal-more {
    font-size: 9px;
    color: var(--text-dim);
    text-align: center;
    padding: 1px 0;
    margin-top: auto;
}

/* ===== Meals View ===== */
.meals-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.meals-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 24px;
}

.meals-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    flex: 1;
    min-height: 0;
}
.meals-col-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: 8px;
}
.meals-col-header .date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    display: block;
    color: var(--text-dim);
    margin-top: 2px;
}
.meal-cell {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
}
.meal-cell:hover { border-color: var(--text-muted); }
.meal-cell-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.meal-cell-title {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}
.meal-cell-empty {
    font-size: 22px;
    color: var(--text-dim);
    text-align: center;
    line-height: 1;
    margin: auto;
}

/* ===== Grocery View ===== */
.grocery-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.grocery-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 24px;
    flex: 1;
}

.grocery-actions {
    display: flex;
    gap: 8px;
}

.grocery-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.grocery-category {
    margin-bottom: 16px;
}
.grocery-cat-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.grocery-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
    min-height: 44px;
}
.grocery-item:hover { background: var(--bg-card-2); }
.grocery-item.checked .grocery-item-title {
    text-decoration: line-through;
    color: var(--text-dim);
}
.grocery-item-title {
    font-size: 14px;
    flex: 1;
}
.grocery-item-delete {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
}
.grocery-item:hover .grocery-item-delete { display: flex; }
.grocery-item-delete:hover { background: rgba(224,82,82,0.15); color: var(--danger); }

/* ===== Todo View ===== */
.todo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.todo-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 24px;
}

.todo-filters {
    display: flex;
    gap: 4px;
    margin-left: 16px;
}
.todo-filter-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 36px;
}
.todo-filter-btn:hover { border-color: var(--text-muted); }
.todo-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.todo-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
    min-height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.todo-item:hover { border-color: var(--text-dim); }
.todo-item.checked .todo-item-title {
    text-decoration: line-through;
    color: var(--text-dim);
}
.todo-item-title {
    flex: 1;
    font-size: 14px;
}
.todo-item-person {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}
.todo-item-person.nik { background: rgba(224,82,82,0.15); color: var(--nik); }
.todo-item-person.shannon { background: rgba(232,122,170,0.15); color: var(--shannon); }
.todo-item-person.both { background: rgba(200,169,110,0.15); color: var(--accent); }
.todo-item-due {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
}
.todo-item-due.overdue { color: var(--danger); font-weight: 500; }
.todo-item-actions {
    display: flex;
    gap: 4px;
}
.todo-item-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
}
.todo-item:hover .todo-item-btn { display: flex; }
.todo-item-btn:hover { background: var(--bg-card-2); }

/* ===== Weather View ===== */
/* Weather split layout */
.weather-split {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.weather-data {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}
.weather-radar {
    width: 630px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.radar-container {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 300px;
    cursor: pointer;
}
.radar-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.radar-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: rgba(14,14,13,0.8);
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.15s;
    pointer-events: auto;
}
.radar-expand-btn:hover { background: rgba(14,14,13,0.95); }

/* Fullscreen radar — fills content area */
.content-area { position: relative; }
.weather-radar.expanded {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 50;
    background: var(--bg);
    padding: 8px;
}
.weather-radar.expanded .radar-container {
    border-radius: 12px;
    height: 100%;
}
.weather-radar.expanded .weather-section-title { display: none; }

.weather-header {
    margin-bottom: 20px;
}
.weather-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 24px;
}

.weather-current {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 24px;
}
.weather-current-icon {
    font-size: 64px;
}
.weather-current-temp {
    font-family: 'Fraunces', serif;
    font-weight: 200;
    font-size: 72px;
    line-height: 1;
}
.weather-current-unit {
    font-size: 28px;
    color: var(--text-muted);
}
.weather-current-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}
.weather-detail {
    font-size: 13px;
}
.weather-detail-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}
.weather-detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.weather-hourly {
    margin-bottom: 24px;
}
.weather-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
}
.hourly-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.hourly-item {
    flex-shrink: 0;
    text-align: center;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 72px;
}
.hourly-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}
.hourly-icon { font-size: 22px; margin: 4px 0; }
.hourly-temp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
}
.hourly-precip {
    font-size: 10px;
    color: var(--office);
}

.daily-forecast {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.daily-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.daily-day {
    width: 80px;
    font-weight: 500;
    font-size: 14px;
}
.daily-icon { font-size: 22px; width: 32px; text-align: center; }
.daily-temps {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    width: 100px;
}
.daily-hi { font-weight: 500; }
.daily-lo { color: var(--text-dim); }
.daily-condition {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
}
.daily-precip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--office);
    width: 48px;
    text-align: right;
}

.weather-note {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
}

/* ===== Modals ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.22s ease-out;
}
.modal-overlay.open .modal {
    transform: translateY(0);
}
.modal-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 22px;
    margin-bottom: 20px;
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--bg-card-2);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card-2);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    min-height: 44px;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Meal suggestions dropdown */
.meal-suggest-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}
.meal-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.1s;
    min-height: 40px;
}
.meal-suggest-item:hover {
    background: var(--bg-card-2);
}
.meal-suggest-item:first-child {
    font-weight: 600;
    color: var(--accent);
}
.meal-suggest-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
}
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card-2);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    min-height: 44px;
    cursor: pointer;
}
textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); }

/* FAB */
.fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--shadow);
    transition: transform 0.15s;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
}
.fab:hover { transform: scale(1.08); }

/* ===== Sidebar Cameras ===== */
.sidebar-cam-widget { padding: 12px !important; }
.sidebar-cam-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    height: 150px;
}
.sidebar-cam-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.sidebar-cam-panel.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}
.sidebar-cam-video {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.sidebar-cam-wrap.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 900;
    height: 100vh !important;
    width: 100vw;
    border-radius: 0;
    background: #000;
}
.sidebar-cam-wrap.fullscreen .sidebar-cam-video {
    border-radius: 0;
    object-fit: contain;
}
.sidebar-cam-wrap.fullscreen .sidebar-cam-label {
    font-size: 16px;
    bottom: 20px;
    left: 20px;
    padding: 6px 16px;
}

.sidebar-cam-label {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 2px 8px;
    border-radius: 4px;
}
.sidebar-cam-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 12px;
}

/* ===== Thermostat Arc Widget ===== */
.thermo-arc-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.thermo-arc-wrap {
    position: relative;
    width: 100%;
    max-width: 220px;
}
.thermo-arc-svg {
    width: 100%;
    display: block;
}
.thermo-arc-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -25%);
    text-align: center;
}
.thermo-arc-status {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.thermo-arc-temp {
    font-family: 'Fraunces', serif;
    font-weight: 200;
    font-size: 38px;
    line-height: 1;
    color: var(--text);
}
.thermo-arc-range {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.thermo-arc-controls {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    align-items: center;
}
.thermo-mode-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
    min-height: 44px;
    min-width: 44px;
    padding: 0;
}
.thermo-mode-btn:hover { transform: scale(1.1); }
.thermo-mode-btn svg { border-radius: 50%; }
.thermo-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
    min-height: 44px;
    min-width: 44px;
}
.thermo-btn:hover {
    border-color: var(--accent);
    background: rgba(200,169,110,0.1);
}
.thermo-btn:active {
    background: rgba(200,169,110,0.2);
}

/* ===== Windows View ===== */
/* Admin terminal */
.admin-terminal-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    color-scheme: normal;
}
#view-admin {
    padding: 0;
    overflow: hidden;
    scrollbar-width: none;
}
#view-admin::-webkit-scrollbar {
    display: none;
}

.windows-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.window-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.window-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.window-group-icon { font-size: 24px; }
.window-group-name { font-size: 16px; font-weight: 600; }
.window-group-room { font-size: 13px; color: var(--text-muted); margin-left: 8px; }

.window-controls {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.window-control {
    flex: 1;
}
.window-control-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.window-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.window-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
.window-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}
.window-slider-val {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 22px;
    min-width: 50px;
    text-align: right;
}
.window-quick-btns {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.window-quick-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 40px;
    transition: all 0.15s;
}
.window-quick-btn:hover { border-color: var(--accent); color: var(--text); }
.window-quick-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Thermostat Full Page ===== */
.thermo-page {
    display: flex;
    gap: 40px;
    flex: 1;
    min-height: 0;
    align-items: flex-start;
}
.thermo-page-left {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}
.thermo-page-arc-wrap {
    position: relative;
    width: 340px;
}
.thermo-page-arc-svg { width: 100%; display: block; }
.thermo-page-arc-center {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -25%);
    text-align: center;
}
.thermo-page-status {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.thermo-page-temp {
    font-family: 'Fraunces', serif;
    font-weight: 200;
    font-size: 72px;
    line-height: 1;
    color: var(--text);
}
.thermo-page-range {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 4px;
}
.thermo-page-adjust {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
}
.thermo-page-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
    min-height: 56px;
}
.thermo-page-btn:hover { border-color: var(--accent); background: rgba(200,169,110,0.1); }
.thermo-page-target {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 32px;
    color: var(--text-muted);
    min-width: 80px;
    text-align: center;
}
.thermo-page-humidity {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 16px;
}

.thermo-page-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-top: 20px;
}
.thermo-page-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.thermo-page-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.thermo-page-mode-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.thermo-page-mode-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 44px;
    transition: all 0.15s;
}
.thermo-page-mode-btn:hover { border-color: var(--text); color: var(--text); }
.thermo-page-mode-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.thermo-page-mode-btn.active-heat { background: #e8811c; color: #fff; border-color: #e8811c; }
.thermo-page-mode-btn.active-cool { background: #2196f3; color: #fff; border-color: #2196f3; }
.thermo-page-mode-btn.active-heat_cool { background: var(--accent); color: #fff; border-color: var(--accent); }
.thermo-page-mode-btn.active-off { background: var(--text-dim); color: #fff; border-color: var(--text-dim); }

.thermo-page-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.thermo-page-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
.thermo-page-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
.heat-slider::-webkit-slider-thumb { background: #e8811c; }
.cool-slider::-webkit-slider-thumb { background: #2196f3; }
.thermo-page-slider-val {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 24px;
    min-width: 50px;
    text-align: right;
}

.thermo-page-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.thermo-detail-item { }
.thermo-detail-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
}
.thermo-detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 500;
    margin-top: 2px;
}

/* ===== Lights View ===== */
.home-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.home-title { font-family: 'Fraunces', serif; font-weight: 300; font-size: 24px; }
.home-status { font-size: 12px; color: var(--text-dim); margin-left: auto; }

.lights-rooms { display: flex; flex-direction: column; gap: 20px; overflow-y: auto; flex: 1; min-height: 0; }

.lights-room {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.lights-room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 180px;
    padding-top: 8px;
}
.lights-room-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}
.lights-room-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.lights-room-toggle.on {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.lights-room-status {
    font-size: 13px;
    color: var(--text-dim);
}

/* Reorder mode */
.lights-room.reorder-mode {
    border: 2px dashed var(--accent);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 4px;
    background: var(--bg-card);
    cursor: grab;
}
.lights-room.reorder-mode:active { cursor: grabbing; }
.lights-room.reorder-mode .lights-grid { display: none; }
.lights-room.drag-over {
    border-color: var(--success);
    background: rgba(93,184,126,0.05);
}
.reorder-bar {
    display: none;
    gap: 8px;
    padding: 12px 0;
    align-items: center;
    justify-content: center;
}
.reorder-bar.visible { display: flex; }

.lights-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
    align-content: flex-start;
}
.light-card {
    min-width: 180px;
    flex: 1 1 200px;
    max-width: 280px;
}

/* Light card — HA style */
.light-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-height: 56px;
    user-select: none;
    touch-action: none;
    position: relative;
    overflow: hidden;
}
.light-card:hover { border-color: var(--text-dim); }
.light-card.on {
    background: var(--bg-card-2);
    border-color: var(--accent);
}
.light-card-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(200,169,110,0.08);
    transition: width 0.15s;
    pointer-events: none;
}
.light-card.on .light-card-fill {
    background: rgba(200,169,110,0.12);
}
.light-card-icon {
    font-size: 22px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-card-2);
    position: relative;
    z-index: 1;
}
.light-card.on .light-card-icon {
    background: rgba(255,180,0,0.2);
}
.light-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.light-card-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.light-card-state {
    font-size: 12px;
    color: var(--text-dim);
}
.light-card.on .light-card-state {
    color: var(--accent);
}
.light-card.unavailable {
    opacity: 0.4;
}
.light-card.unavailable .light-card-state {
    color: var(--danger);
}

/* ===== Spotify Overlay ===== */
.spotify-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    background: var(--bg);
    display: none;
    flex-direction: column;
}
.spotify-overlay.open {
    display: flex;
}

.spotify-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.spotify-search-wrap {
    flex: 1;
}
.spotify-search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-card-2);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    min-height: 44px;
}
.spotify-search-input:focus {
    outline: none;
    border-color: var(--accent);
}
.spotify-search-input::placeholder { color: var(--text-dim); }
.spotify-who-btn, .spotify-close-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.spotify-who-btn:hover, .spotify-close-btn:hover { background: var(--bg-card-2); }

.spotify-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.spotify-tab {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    min-height: 36px;
    transition: background 0.15s, color 0.15s;
}
.spotify-tab:hover { background: var(--bg-card-2); color: var(--text); }
.spotify-tab.active { background: var(--accent); color: #fff; }

.spotify-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.spotify-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 60px 20px;
    font-size: 15px;
}

/* Track rows */
.sp-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
    min-height: 52px;
}
.sp-track-row:hover { background: var(--bg-card-2); }
.sp-track-row:active { background: var(--bg-card); }
.sp-track-row.sp-playing { background: var(--bg-card-2); }
.sp-track-row.sp-playing .sp-track-name { color: var(--accent); }
.sp-track-art {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}
.sp-track-info { flex: 1; min-width: 0; }
.sp-track-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-track-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-track-album {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 180px;
    flex-shrink: 0;
}
.sp-track-duration {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    width: 45px;
    text-align: right;
    flex-shrink: 0;
}
.sp-track-queue-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sp-track-row:hover .sp-track-queue-btn { display: flex; }
.sp-track-queue-btn:hover { background: var(--bg-card); color: var(--accent); }

/* Section headers in results */
.sp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 10px;
}
.sp-section-title:first-child { margin-top: 0; }

/* Playlist grid */
.sp-playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.sp-playlist-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}
.sp-playlist-card:hover { border-color: var(--text-dim); }
.sp-playlist-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.sp-playlist-card-info {
    padding: 10px;
}
.sp-playlist-card-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-playlist-card-count {
    font-size: 11px;
    color: var(--text-dim);
}

/* Artist cards in search */
.sp-artist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
}
.sp-artist-row:hover { background: var(--bg-card-2); }
.sp-artist-art {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
}
.sp-artist-name { font-size: 14px; font-weight: 500; }
.sp-artist-type { font-size: 11px; color: var(--text-dim); }

/* Horizontal scroll row for artists/albums */
.sp-hscroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.sp-album-card {
    flex-shrink: 0;
    width: 140px;
    cursor: pointer;
}
.sp-album-card img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.sp-album-card-name {
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-album-card-artist {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Now playing bar */
.spotify-npbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    min-height: 64px;
}
.spotify-npbar-art {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-card-2);
}
.spotify-npbar-info { flex: 1; min-width: 0; }
.spotify-npbar-track {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotify-npbar-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotify-npbar-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.spotify-npbar-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-card-2);
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.spotify-npbar-btn:hover { background: var(--border); }
.spotify-npbar-play {
    background: var(--accent);
    color: #fff;
    width: 48px;
    height: 48px;
    font-size: 18px;
}
.spotify-npbar-play:hover { opacity: 0.9; background: var(--accent); }

/* ===== Screensaver ===== */
.screensaver {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #0e0e0d;
    display: none;
    opacity: 0;
    transition: opacity 0.9s;
    cursor: none;
}
.screensaver.active {
    display: flex;
    opacity: 1;
}
.screensaver-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0e0e0d 0%, #1a1520 25%, #0e0e0d 50%, #15181a 75%, #0e0e0d 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* Polaroid pile */
.ss-polaroid-pile {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}
.ss-polaroid {
    position: absolute;
    width: 320px;
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.ss-polaroid-frame {
    position: relative;
    width: 100%;
}
.ss-polaroid-bg {
    width: 100%;
    display: block;
}
.ss-polaroid-img {
    position: absolute;
    top: 5.8%;
    left: 6.5%;
    width: 87%;
    height: 69%;
    object-fit: cover;
}

.screensaver-clock {
    position: absolute;
    bottom: 48px;
    left: 48px;
    z-index: 1;
}
.screensaver-time {
    font-family: 'Fraunces', serif;
    font-weight: 200;
    font-size: 96px;
    color: rgba(238,234,228,0.9);
    line-height: 1;
}
.screensaver-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 22px;
    color: rgba(238,234,228,0.5);
    margin-top: 8px;
}

.screensaver-weather {
    position: absolute;
    bottom: 48px;
    right: 48px;
    z-index: 1;
    text-align: right;
}
.ss-weather-icon {
    font-size: 48px;
    text-align: right;
}
.ss-weather-temp {
    font-family: 'Fraunces', serif;
    font-weight: 200;
    font-size: 64px;
    color: rgba(238,234,228,0.9);
    line-height: 1;
}
.ss-weather-condition {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    color: rgba(238,234,228,0.6);
    margin-top: 4px;
}
.ss-weather-hl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: rgba(238,234,228,0.4);
    margin-top: 4px;
}

/* ===== Skeleton loading ===== */
.skeleton {
    background: var(--bg-card-2);
    border-radius: 6px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== Utility ===== */
.flex-1 { flex: 1; }
.text-nik { color: var(--nik); }
.text-shannon { color: var(--shannon); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.mono { font-family: 'JetBrains Mono', monospace; }
