:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-2: #1a1a1a;
    --surface-3: #222;
    --border: #222;
    --text: #ddd;
    --text-dim: #666;
    --gold: #c9a24d;
    --gold-dim: rgba(201, 162, 77, 0.1);
    --green: #4a9e75;
    --green-dim: rgba(74, 158, 117, 0.08);
    --red: #c0392b;
    --red-dim: rgba(192, 57, 43, 0.1);
    --blue: #4a80c4;
    --blue-dim: rgba(74, 128, 196, 0.1);
    --purple: #8a6bbf;
    --purple-dim: rgba(138, 107, 191, 0.1);
    --radius: 8px;
    --radius-sm: 5px;
}

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

body {
    font-family: "Outfit", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* ── Login ── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.login-container { width: 100%; max-width: 340px; text-align: center; }
.login-logo {
    font-family: "Playfair Display", serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 48px;
    letter-spacing: 1px;
}
.login-logo span { color: var(--gold); font-weight: 400; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-error {
    background: var(--red-dim);
    color: var(--red);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--gold); }
.form-group input::placeholder { color: var(--text-dim); }
.btn-login {
    padding: 13px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}
.btn-login:hover { opacity: 0.9; }

/* ── Shell ── */
.app-shell {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.logo {
    font-family: "Playfair Display", serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.logo span { color: var(--gold); font-weight: 400; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-pill {
    background: var(--surface-2);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.sign-out {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
}
.sign-out:hover { color: var(--red); }

/* ── Tabs ── */
.tab-bar { display: flex; border-bottom: 1px solid var(--border); }
.tab {
    flex: 1;
    padding: 11px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: "Outfit", sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-count {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-left: 2px;
}

/* ── Panels ── */
.panel { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.panel.active { display: flex; }

/* ── Toolbar ── */
.toolbar {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}
.toolbar-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}
.date-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    transition: border-color 0.15s;
}
.date-btn:hover { border-color: var(--gold); color: var(--gold); }
.today-btn { color: var(--gold); font-size: 0.78rem; }
.date-display { font-weight: 500; min-width: 150px; text-align: center; font-size: 0.92rem; }

.toolbar-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pill {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-dim);
    font-family: "Outfit", sans-serif;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.pill:hover { border-color: var(--text-dim); }
.pill.active { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.pill.cat-pill { color: var(--red); }
.pill.cat-pill.active { border-color: var(--red); color: var(--red); background: var(--red-dim); }
.search-wrap { flex: 1; min-width: 0; }
.search-input {
    width: 100%;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: "Outfit", sans-serif;
    font-size: 0.72rem;
    outline: none;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { border-color: var(--gold); }

/* ── Notes List ── */
.notes-list { flex: 1; overflow-y: auto; padding: 8px 16px; }

@keyframes fadeSlide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.note-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 6px;
    position: relative;
    animation: fadeSlide 0.2s ease-out;
}
.note-card[data-user="adam"] { border-left-color: var(--gold); }
.note-card[data-user="andrew"] { border-left-color: var(--green); }
.note-card.pinned { background: var(--gold-dim); border-color: rgba(201,162,77,0.2); }
.pin-indicator {
    font-size: 0.6rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}
.note-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.note-author { font-weight: 500; font-size: 0.78rem; }
.note-card[data-user="adam"] .note-author { color: var(--gold); }
.note-card[data-user="andrew"] .note-author { color: var(--green); }
.note-badges { display: flex; gap: 4px; align-items: center; }
.badge {
    font-size: 0.62rem;
    padding: 1px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}
.badge-voice { background: var(--surface-3); color: var(--text-dim); }
.badge-typed { background: var(--surface-3); color: var(--text-dim); }
.badge-business { background: var(--blue-dim); color: var(--blue); }
.badge-dev { background: var(--purple-dim); color: var(--purple); }
.badge-personal { background: var(--green-dim); color: var(--green); }
.badge-urgent { background: var(--red-dim); color: var(--red); }
.note-body {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}
.note-body.collapsed {
    max-height: 3.6em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 60%, transparent);
    mask-image: linear-gradient(#000 60%, transparent);
    cursor: pointer;
}
.expand-toggle {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 2px 0;
    font-family: "Outfit", sans-serif;
}
.expand-toggle:hover { color: var(--gold); }
.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.note-time { font-size: 0.68rem; color: var(--text-dim); }
.note-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.note-card:hover .note-actions { opacity: 1; }
.note-act {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.68rem;
    cursor: pointer;
    padding: 2px 6px;
    font-family: "Outfit", sans-serif;
}
.note-act:hover { color: var(--gold); }
.note-act.del:hover { color: var(--red); }
.notes-empty { text-align: center; color: var(--text-dim); padding: 40px 20px; font-size: 0.88rem; }

/* ── Controls Dock ── */
.controls-dock {
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    background: var(--surface);
}
.transcript-area {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 8px;
    max-height: 100px;
    overflow-y: auto;
}
.transcript-text { font-size: 0.85rem; line-height: 1.4; color: var(--text); }
.transcript-text .interim { color: var(--text-dim); }
.transcript-text .auto-saved { color: var(--green); font-style: italic; }
.dock-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-mic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    position: relative;
}
.btn-mic:hover { border-color: var(--red); color: var(--red); }
.btn-mic.recording {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red);
}
.btn-mic.recording .mic-icon { display: none; }
.btn-stop { background: var(--red); border-color: var(--red); color: #fff; }
.btn-stop:hover { opacity: 0.85; }

/* Waveform */
.waveform { display: none; gap: 2px; align-items: center; height: 16px; }
.btn-mic.recording .waveform { display: flex; }
.waveform span {
    width: 2px;
    background: var(--red);
    border-radius: 1px;
    animation: wave 1s ease-in-out infinite;
}
.waveform span:nth-child(1) { height: 6px; animation-delay: 0s; }
.waveform span:nth-child(2) { height: 12px; animation-delay: 0.12s; }
.waveform span:nth-child(3) { height: 16px; animation-delay: 0.24s; }
.waveform span:nth-child(4) { height: 12px; animation-delay: 0.36s; }
.waveform span:nth-child(5) { height: 6px; animation-delay: 0.48s; }
@keyframes wave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

.cat-select {
    padding: 0 4px;
    height: 38px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: "Outfit", sans-serif;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}
.note-input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    outline: none;
}
.note-input::placeholder { color: var(--text-dim); }
.note-input:focus { border-color: var(--gold); }
.btn-send {
    width: 38px;
    height: 38px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-send:hover { opacity: 0.85; }
.dock-actions {
    margin-top: 6px;
}
.btn-save {
    width: 100%;
    padding: 9px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-generate {
    width: 100%;
    margin-top: 6px;
    padding: 9px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: "Outfit", sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s;
}
.btn-generate:hover { border-color: var(--gold); }
.hidden { display: none !important; }

/* ── Plans ── */
.plans-panel { padding: 8px 16px; overflow-y: auto; }
.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    animation: fadeSlide 0.2s ease-out;
}
.plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}
.plan-date {
    font-family: "Playfair Display", serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
}
.plan-meta { font-size: 0.72rem; color: var(--text-dim); }
.plan-btns { display: flex; gap: 4px; }
.plan-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: "Outfit", sans-serif;
}
.plan-btn:hover { border-color: var(--gold); color: var(--gold); }
.plan-btn.del:hover { border-color: var(--red); color: var(--red); }
.plan-body { line-height: 1.6; font-size: 0.85rem; }
.plan-body h1 { font-size: 1.1rem; color: var(--gold); margin: 14px 0 6px; font-family: "Playfair Display", serif; }
.plan-body h2 { font-size: 0.95rem; color: var(--gold); margin: 12px 0 4px; font-family: "Playfair Display", serif; }
.plan-body h3 { font-size: 0.88rem; color: var(--text); margin: 10px 0 4px; }
.plan-body ul { padding-left: 18px; margin: 4px 0; }
.plan-body li { margin-bottom: 3px; }
.plan-body strong { color: var(--gold); }
.plan-body em { color: var(--text-dim); }
.plan-body p { margin-bottom: 6px; }
.plans-empty { text-align: center; color: var(--text-dim); padding: 40px 20px; }

/* ── Modals ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 320px;
}
.modal p { font-size: 0.9rem; margin-bottom: 16px; line-height: 1.4; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; }
.mbtn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: "Outfit", sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}
.mbtn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-text { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
.loading { text-align: center; padding: 20px; color: var(--text-dim); font-size: 0.85rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

/* ── Mobile ── */
@media (max-width: 500px) {
    .app-header { padding: 12px 14px; }
    .toolbar { padding: 10px 14px; }
    .notes-list, .plans-panel { padding: 6px 10px; }
    .controls-dock { padding: 8px 10px; }
    .note-actions { opacity: 1; }
    .note-card { padding: 9px 10px; }
    .plan-head { flex-wrap: wrap; }
}


/* ── Calendar ── */
.calendar-panel { display: none; flex-direction: column; overflow: hidden; }
.calendar-panel.active { display: flex; }
.cal-header { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.cal-title { font-family: "Playfair Display", serif; font-weight: 600; font-size: 0.95rem; min-width: 140px; text-align: center; }
.cal-view-toggle { background: var(--surface-2); border: 1px solid var(--border); color: var(--gold); padding: 4px 10px; border-radius: var(--radius-sm); font-family: "Outfit", sans-serif; font-size: 0.7rem; cursor: pointer; }
.cal-view-toggle:hover { border-color: var(--gold); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px 16px 0; }
.cal-day-label { text-align: center; font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 4px; }
.cal-dates { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 16px 6px; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.1s; min-height: 40px; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other-month { opacity: 0.15; pointer-events: none; }
.cal-cell.today { background: var(--gold-dim); border: 1px solid rgba(201,162,77,0.2); }
.cal-cell.selected { background: var(--gold); }
.cal-cell.selected .cal-num { color: #000; }
.cal-cell.selected .dot { background: rgba(0,0,0,0.4) !important; }
.cal-num { font-size: 0.78rem; font-weight: 500; color: var(--text); line-height: 1; }
.cal-dots { display: flex; gap: 2px; margin-top: 2px; min-height: 4px; }
.dot { width: 4px; height: 4px; border-radius: 50%; }
.dot-gold { background: var(--gold); }
.dot-dim { background: var(--text-dim); }
.dot-blue { background: var(--blue); }

/* Detail */
.cal-detail { flex: 1; overflow-y: auto; padding: 0 16px 6px; min-height: 60px; }
.cal-detail-empty { text-align: center; color: var(--text-dim); padding: 16px; font-size: 0.82rem; }
.cal-detail-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cal-detail-date { font-family: "Playfair Display", serif; font-size: 0.88rem; font-weight: 600; color: var(--gold); }
.cal-event-count { font-size: 0.68rem; color: var(--text-dim); }

/* Event cards */
.ev-card { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); margin-bottom: 4px; animation: fadeSlide 0.12s ease-out; }
.ev-time { font-size: 0.7rem; color: var(--gold); font-weight: 500; min-width: 48px; padding-top: 1px; white-space: nowrap; }
.ev-body { flex: 1; min-width: 0; }
.ev-title { font-size: 0.82rem; font-weight: 500; }
.ev-desc { font-size: 0.75rem; color: var(--text-dim); margin-top: 1px; }
.ev-meta { font-size: 0.62rem; color: var(--text-dim); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ev-cat { font-weight: 600; text-transform: uppercase; font-size: 0.58rem; letter-spacing: 0.3px; }
.ev-range { color: var(--text-dim); }
.ev-remind { color: var(--text-dim); }
.ev-actions { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.ev-edit { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.65rem; font-family: "Outfit",sans-serif; padding: 2px 4px; }
.ev-edit:hover { color: var(--gold); }
.ev-del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.9rem; padding: 0 4px; line-height: 1; }
.ev-del:hover { color: var(--red); }

/* Calendar dock */
.cal-dock { border-top: 1px solid var(--border); padding: 8px 16px; background: var(--surface); }
.cal-parse-result { margin-bottom: 8px; }
.parse-card { background: var(--gold-dim); border: 1px solid rgba(201,162,77,0.2); border-radius: var(--radius); padding: 10px; }
.parse-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.parse-cat { font-size: 0.62rem; text-transform: uppercase; font-weight: 600; }
.parse-desc { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 2px; }
.parse-when { font-size: 0.72rem; color: var(--gold); margin-bottom: 8px; }
.parse-btns { display: flex; gap: 8px; justify-content: flex-end; }
.mbtn-gold { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 600; }

/* ── Week View ── */
.week-header { display: grid; grid-template-columns: 40px repeat(7, 1fr); border-bottom: 1px solid var(--border); padding: 6px 8px; }
.wk-time-col { }
.wk-day-col { text-align: center; cursor: pointer; padding: 4px 0; border-radius: var(--radius-sm); }
.wk-day-col:hover { background: var(--surface-2); }
.wk-day-col.wk-today { background: var(--gold-dim); }
.wk-day-name { display: block; font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; }
.wk-day-num { display: block; font-size: 0.85rem; font-weight: 600; }
.week-body { overflow-y: auto; flex: 1; padding: 0 8px; }
.wk-row { display: grid; grid-template-columns: 40px repeat(7, 1fr); min-height: 48px; border-bottom: 1px solid var(--border); }
.wk-time { font-size: 0.6rem; color: var(--text-dim); padding-top: 2px; text-align: right; padding-right: 6px; }
.wk-cell { border-left: 1px solid var(--border); position: relative; min-height: 48px; cursor: pointer; padding: 2px; }
.wk-cell:hover { background: var(--surface-2); }

/* Week event block */
.wk-event { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 3px; padding: 2px 4px; margin-bottom: 1px; cursor: grab; font-size: 0.65rem; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wk-event:hover { background: var(--surface-3); }
.wk-event.dragging { opacity: 0.7; box-shadow: 0 4px 12px rgba(0,0,0,0.4); cursor: grabbing; }
.wk-ev-time { color: var(--gold); font-weight: 500; }
.wk-ev-title { color: var(--text); }

/* ── Edit Modal ── */
.modal-edit { max-width: 380px; }
.modal-title { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1rem; color: var(--gold); margin-bottom: 12px; }
.field-label { display: block; font-size: 0.7rem; color: var(--text-dim); margin-bottom: 3px; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.field-input { width: 100%; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: "Outfit",sans-serif; font-size: 0.82rem; outline: none; }
.field-input:focus { border-color: var(--gold); }
.field-row { display: flex; gap: 8px; }
.field-col { flex: 1; }

/* Mobile overrides for calendar */
@media (max-width: 500px) {
    .cal-header { padding: 8px 10px; gap: 6px; }
    .cal-grid, .cal-dates { padding-left: 6px; padding-right: 6px; }
    .cal-detail { padding: 0 6px 6px; }
    .cal-dock { padding: 6px 8px; }
    .cal-cell { min-height: 34px; }
    .cal-num { font-size: 0.72rem; }
    .week-header { padding: 4px 4px; }
    .week-body { padding: 0 4px; }
    .wk-row { min-height: 40px; }
    .wk-time { font-size: 0.55rem; }
    .wk-event { font-size: 0.58rem; }
    .field-row { flex-direction: column; gap: 0; }
    .modal-edit { max-width: 100%; }
}

/* ── Global Search ── */
.search-wrap { flex: 1; min-width: 0; display: flex; gap: 4px; align-items: center; }
.search-global-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 8px;
    border-radius: 14px;
    font-family: "Outfit", sans-serif;
    font-size: 0.62rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.search-global-btn:hover { border-color: var(--text-dim); }
.search-global-btn.active { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

.toolbar-top.hidden { display: none; }

.search-date-header {
    font-family: "Playfair Display", serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold);
    padding: 10px 0 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}
.search-date-header:first-child { padding-top: 4px; }

/* ── AI Suggestions ── */
.ai-suggestions {
    padding: 6px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    animation: fadeSlide 0.2s ease-out;
}
.scan-loading {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 6px 0;
}
.scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.scan-dismiss {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 2px;
}
.scan-dismiss:hover { color: var(--text); }
.scan-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 0.78rem;
    border-bottom: 1px solid var(--border);
}
.scan-item:last-child { border-bottom: none; }
.scan-icon { font-size: 0.85rem; flex-shrink: 0; }
.scan-text { flex: 1; color: var(--text); }
.scan-action {
    background: var(--gold-dim);
    border: 1px solid rgba(201,162,77,0.2);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 10px;
    font-family: "Outfit", sans-serif;
    font-size: 0.62rem;
    cursor: pointer;
    white-space: nowrap;
}
.scan-action:hover { border-color: var(--gold); }
