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

/* CSS variables used by the workouts feature only. Keeping them here so
 * the workouts dark theme keeps working; the rest of the site is light. */
:root {
    --bg-elevated: #1c1c1e;
    --bg-input: #2c2c2e;
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --text-tertiary: #636366;
    --border: #2c2c2e;
    --border-strong: #3a3a3c;
    --accent: #4f8df3;
    --accent-strong: #1d4ed8;
    --success: #34c759;
    --warning: #ff9500;
    --danger: #ff3b30;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f5f7;
    color: #2c3e50;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    background: #1e293b;
    color: #f1f5f9;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: #f1f5f9;
    flex-shrink: 0;
}

.nav-center { flex: 1; display: flex; gap: 8px; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-link {
    color: #94a3b8;
    font-size: .875rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.nav-link:hover { color: #f1f5f9; background: rgba(255,255,255,.08); }

.nav-logout { color: #94a3b8; }

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name { font-size: .875rem; color: #cbd5e1; }

/* ── Flash Messages ───────────────────────────────────────── */
.flash-container {
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: .875rem;
}
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; color: #1e293b; }

/* ── Login Page ───────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f4f5f7;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    width: 100%;
    max-width: 380px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #64748b;
    margin-bottom: 32px;
    font-size: .95rem;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: .9rem;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    width: 100%;
    justify-content: center;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.google-icon { width: 18px; height: 18px; flex-shrink: 0; }

.btn-secondary {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-size: .875rem;
    transition: background .15s;
}
.btn-secondary:hover { background: #f1f5f9; }

/* ── Status Pages (pending/denied) ───────────────────────── */
.status-icon { font-size: 2.5rem; margin-bottom: 16px; }
.status-pending { color: #f59e0b; }
.status-denied  { color: #ef4444; }

/* ── Home — Tool Grid ─────────────────────────────────────── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.tool-card {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    border: 1px solid #e2e8f0;
    transition: box-shadow .15s, transform .15s;
    cursor: pointer;
}
.tool-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.tool-coming-soon { opacity: .7; cursor: default; }
.tool-coming-soon:hover { box-shadow: none; transform: none; }

.tool-icon { font-size: 2rem; margin-bottom: 12px; }
.tool-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: #1e293b; }
.tool-card p  { font-size: .85rem; color: #64748b; line-height: 1.5; margin-bottom: 12px; }

.badge-coming-soon {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #f1f5f9;
    color: #94a3b8;
    border-radius: 4px;
    padding: 2px 8px;
}

/* ── Admin — Users Table ──────────────────────────────────── */
.user-section { margin-bottom: 40px; }

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}
.section-pending { color: #b45309; }

.user-table {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    border-collapse: collapse;
    overflow: hidden;
}

.user-table th {
    background: #f8fafc;
    text-align: left;
    padding: 10px 16px;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.user-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: .875rem;
    vertical-align: middle;
}

.user-table tr:last-child td { border-bottom: none; }

.user-cell { display: flex; align-items: center; gap: 10px; }

.table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 600;
}
.status-approved { background: #d1fae5; color: #065f46; }
.status-pending  { background: #fef3c7; color: #92400e; }
.status-denied   { background: #fee2e2; color: #991b1b; }

.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 600;
    background: #ede9fe;
    color: #5b21b6;
}

.role-select {
    font-size: .8rem;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
}

.action-cell { display: flex; gap: 6px; align-items: center; }
.inline-form  { display: inline; }

.btn {
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-approve { background: #10b981; color: #fff; }
.btn-deny    { background: #ef4444; color: #fff; }

/* ── Coffee Explorer ──────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: #64748b; }
.filter-select {
    font-size: .875rem;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
    min-width: 110px;
}
.filter-select:focus { outline: 2px solid #3b82f6; outline-offset: 1px; }

.filter-clear {
    align-self: flex-end;
    font-size: .8rem;
    color: #64748b;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    transition: background .15s;
    white-space: nowrap;
}
.filter-clear:hover { background: #f1f5f9; color: #1e293b; }

.results-meta {
    font-size: .875rem;
    color: #64748b;
    margin-bottom: 16px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.shop-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .15s;
}
.shop-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.card-avoid { border-left: 3px solid #ef4444; }

.shop-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.shop-name { font-size: .95rem; font-weight: 600; color: #1e293b; line-height: 1.3; }
.shop-city { font-size: .78rem; color: #94a3b8; margin-top: 2px; }

.shop-badges { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.badge-avoid { background: #fee2e2; color: #991b1b; }
.badge-drive { background: #f1f5f9; color: #475569; }

.shop-today-hours {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 500;
}
.hours-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-open   { background: #10b981; }
.dot-closed { background: #94a3b8; }

.shop-hours { font-size: .78rem; color: #64748b; line-height: 1.4; }

.shop-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .72rem; font-weight: 500; }
.tag-food    { background: #fef3c7; color: #92400e; }
.tag-outdoor { background: #d1fae5; color: #065f46; }
.tag-seating { background: #ede9fe; color: #5b21b6; }

.shop-notes { font-size: .8rem; color: #475569; line-height: 1.5; font-style: italic; }
.shop-address { font-size: .75rem; color: #94a3b8; margin-top: auto; }

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #94a3b8;
    font-size: .95rem;
}

/* ── Coffee form & edit controls ─────────────────────────── */
.page-header-row { display: flex; align-items: center; justify-content: space-between; }
.btn-add {
    padding: 8px 16px;
    background: #3b82f6;
    color: #fff;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s;
}
.btn-add:hover { background: #2563eb; }

.shop-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.shop-address { font-size: .75rem; color: #94a3b8; }
.edit-link { font-size: .75rem; color: #3b82f6; white-space: nowrap; flex-shrink: 0; }
.edit-link:hover { text-decoration: underline; }

.back-link { font-size: .875rem; color: #64748b; display: inline-block; margin-bottom: 8px; }
.back-link:hover { color: #1e293b; }

.shop-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-section-title {
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.form-section-hint { font-size: .78rem; font-weight: 400; color: #94a3b8; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-grid-days { grid-template-columns: repeat(7, 1fr); }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: .8rem; font-weight: 500; color: #475569; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .875rem;
    color: #1e293b;
    background: #fff;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }
.form-group textarea { resize: vertical; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.btn-save {
    padding: 9px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.btn-save:hover { background: #2563eb; }
.btn-delete {
    padding: 9px 20px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.btn-delete:hover { background: #dc2626; }

/* ── Location bar ─────────────────────────────────────────── */
.location-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 10px;
    font-size: .875rem;
}

.location-label { font-weight: 600; color: #475569; white-space: nowrap; }

.location-options { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.loc-btn {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.loc-btn:hover  { background: #f1f5f9; border-color: #94a3b8; }
.loc-btn.active { background: #1e293b; border-color: #1e293b; color: #fff; }

.loc-divider { color: #94a3b8; font-size: .8rem; }

.loc-custom-form { display: flex; gap: 6px; }
.loc-input {
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .8rem;
    width: 220px;
    color: #1e293b;
}
.loc-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }

.location-status { font-size: .78rem; color: #64748b; }

.badge-drive-estimated { background: #e0f2fe; color: #0369a1; }

/* ── Google lookup bar ────────────────────────────────────── */
.lookup-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    max-width: 800px;
}

.lookup-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .875rem;
    color: #1e293b;
}
.lookup-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }

.btn-lookup {
    padding: 8px 16px;
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.btn-lookup:hover    { background: #0284c7; }
.btn-lookup:disabled { background: #94a3b8; cursor: default; }

.lookup-status { font-size: .8rem; }

/* ── Lookup results dropdown ──────────────────────────────── */
.lookup-input-row { display: flex; gap: 10px; width: 100%; }
.lookup-input-row .lookup-input { flex: 1; }

.lookup-results {
    list-style: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    overflow: hidden;
    margin-top: 4px;
    width: 100%;
}

.lookup-result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}
.lookup-result-item:last-child { border-bottom: none; }
.lookup-result-item:hover { background: #f8fafc; }

.result-name    { font-size: .875rem; font-weight: 600; color: #1e293b; }
.result-address { font-size: .78rem; color: #64748b; }

/* ── Recipes — Grid & Cards ───────────────────────────────── */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.recipe-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .15s;
    display: flex;
    flex-direction: column;
}
.recipe-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.recipe-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }

.recipe-photo {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
    flex-shrink: 0;
}
.recipe-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.recipe-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.recipe-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.recipe-name { font-size: .95rem; font-weight: 600; color: #1e293b; line-height: 1.3; }

.recipe-meta {
    display: flex;
    gap: 10px;
    font-size: .78rem;
    color: #94a3b8;
    margin-top: auto;
    padding-top: 4px;
    flex-wrap: wrap;
}
.recipe-uploader { margin-left: auto; }

/* ── Dietary flags ────────────────────────────────────────── */
.recipe-flags { display: flex; flex-wrap: wrap; gap: 5px; }

.dietary-flag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: lowercase;
    white-space: nowrap;
}
.flag-vegetarian { background: #d1fae5; color: #065f46; }
.flag-vegan      { background: #bbf7d0; color: #14532d; }
.flag-gluten-free { background: #fef3c7; color: #92400e; }
.flag-dairy-free { background: #dbeafe; color: #1e40af; }
.flag-nut-free   { background: #ffedd5; color: #9a3412; }

/* ── Recipe tags (categories) ─────────────────────────────── */
.recipe-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.recipe-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 500;
    background: #ede9fe;
    color: #5b21b6;
    white-space: nowrap;
}

/* ── Favorite button ──────────────────────────────────────── */
.fav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #cbd5e1;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .12s, transform .12s;
}
.fav-btn:hover    { color: #f43f5e; transform: scale(1.15); }
.fav-btn.fav-active { color: #f43f5e; }
.fav-btn-lg { font-size: 1.5rem; }

/* ── Recipe Detail ────────────────────────────────────────── */
.recipe-detail { max-width: 760px; }

.recipe-detail-photo {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin-bottom: 24px;
}

.recipe-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.recipe-detail-title { font-size: 1.6rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; }

.recipe-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .875rem;
    color: #64748b;
}

.recipe-detail-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

/* ── Serving scaler ───────────────────────────────────────── */
.scaler-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 24px;
}

.scaler-label { font-size: .875rem; font-weight: 600; color: #475569; }

.scaler-controls { display: flex; align-items: center; gap: 6px; }

.scaler-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
}
.scaler-btn:hover { background: #f1f5f9; }

.scaler-input {
    width: 52px;
    text-align: center;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
}
.scaler-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }

/* ── Recipe body ──────────────────────────────────────────── */
.recipe-body { display: flex; flex-direction: column; gap: 28px; }

.recipe-section {}

.recipe-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.ingredient-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.ingredient-item { font-size: .9rem; color: #374151; display: flex; flex-wrap: wrap; }

.ingredient-section {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    margin-top: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f1f5f9;
}
.ingredient-section:first-child { margin-top: 0; }

.step-section {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    margin-top: 8px;
    list-style: none;
    margin-left: -20px;
}
.step-section:first-child { margin-top: 0; }

.markdown-body p  { margin-bottom: .5em; }
.markdown-body ul { padding-left: 1.2em; margin-bottom: .5em; }
.markdown-body strong { font-weight: 600; }
.markdown-body em { font-style: italic; }

.ing-qty  { font-weight: 600; min-width: 36px; }
.ing-unit { color: #475569; }
.ing-item { color: #374151; }

.step-list { display: flex; flex-direction: column; gap: 14px; padding-left: 20px; }

.step-item { font-size: .9rem; color: #374151; line-height: 1.6; }

.recipe-notes { font-size: .875rem; color: #475569; line-height: 1.7; font-style: italic; }

/* ── Recipe photo thumb (edit form) ──────────────────────── */
.recipe-photo-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* ── Recipe Form — parse section ─────────────────────────── */
.parse-section {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 20px 24px;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.parse-section-title { font-size: .95rem; font-weight: 600; color: #0369a1; }
.parse-hint { font-size: .82rem; color: #0c4a6e; }

.parse-url-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: .875rem;
    color: #1e293b;
    background: #fff;
}
.parse-url-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }

.parse-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: .875rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    resize: vertical;
}
.parse-textarea:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }

.parse-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.parse-file-wrap { display: flex; align-items: center; gap: 8px; }

.parse-file-label {
    padding: 6px 12px;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    background: #fff;
    font-size: .8rem;
    color: #0369a1;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s;
}
.parse-file-label:hover { background: #e0f2fe; }

.parse-file-input { display: none; }
.parse-file-name { font-size: .78rem; color: #64748b; }

.btn-parse {
    padding: 8px 18px;
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    margin-left: auto;
}
.btn-parse:hover    { background: #0284c7; }
.btn-parse:disabled { background: #94a3b8; cursor: default; }
.btn-parse-opus { background: #7c3aed; }
.btn-parse-opus:hover { background: #6d28d9; }
.btn-parse-haiku { background: #10b981; }
.btn-parse-haiku:hover { background: #059669; }

.parse-status { font-size: .82rem; min-height: 18px; }

/* ── Recipe Form — ingredient / step rows ────────────────── */
.ingredient-row, .step-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.ing-qty-input  { width: 70px; }
.ing-unit-input { width: 90px; }
.ing-item-input { flex: 1; }

.ing-qty-input,
.ing-unit-input,
.ing-item-input,
.step-input {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .875rem;
    color: #1e293b;
    background: #fff;
    font-family: inherit;
}
.ing-qty-input:focus,
.ing-unit-input:focus,
.ing-item-input:focus,
.step-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }

.step-input { flex: 1; resize: vertical; }

.row-remove {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .12s;
}
.row-remove:hover { color: #ef4444; }

.section-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
    margin-top: 8px;
}

.section-input {
    flex: 1;
    padding: 5px 10px;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    background: transparent;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #475569;
}
.section-input:focus { outline: none; border-bottom-color: #3b82f6; }

.btn-row-add {
    font-size: .8rem;
    color: #3b82f6;
    background: none;
    border: 1px dashed #93c5fd;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    margin-top: 4px;
}
.btn-row-add:hover { background: #eff6ff; border-color: #3b82f6; }

/* ── Dietary flag checkboxes (form) ──────────────────────── */
.flag-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; }

.flag-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.flag-checkbox-label input[type="checkbox"] { cursor: pointer; }

/* ── Mobile (≤ 640px) ─────────────────────────────────────── */
@media (max-width: 640px) {

    /* Navbar */
    .nav-container { padding: 0 16px; gap: 12px; }
    .user-name { display: none; }
    .nav-link  { padding: 4px 6px; }

    /* Main content */
    .main-content { padding: 20px 16px; }

    /* Page header */
    .page-header { margin-bottom: 18px; }
    .page-header h1 { font-size: 1.4rem; }

    /* Location bar */
    .location-bar { padding: 10px 12px; gap: 8px; }
    .location-options { width: 100%; }
    .loc-custom-form { flex: 1; }
    .loc-input { width: auto; flex: 1; min-width: 0; }

    /* Filter bar */
    .filter-bar { padding: 12px 14px; gap: 10px; }
    .filter-group { flex: 1 1 calc(50% - 5px); min-width: 0; }
    .filter-select { min-width: 0; width: 100%; }
    .filter-clear { align-self: center; }

    /* Shop grid — single column, tighter padding */
    .shop-grid { grid-template-columns: 1fr; gap: 12px; }
    .shop-card { padding: 14px 16px; }

    /* Home tool grid */
    .tool-grid { grid-template-columns: 1fr; }

    /* Login card */
    .login-card { padding: 36px 24px; margin: 16px; }

    /* Shop form */
    .shop-form { padding: 20px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-full { grid-column: 1; }
    .form-grid-days { grid-template-columns: repeat(4, 1fr); }

    /* Lookup bar */
    .lookup-bar { padding: 12px 14px; }
    .lookup-input-row { flex-direction: column; }
    .btn-lookup { width: 100%; }

    /* Admin table — horizontal scroll */
    .user-section { overflow-x: auto; }
    .user-table { min-width: 600px; }

    /* Recipes */
    .recipe-grid { grid-template-columns: 1fr; }
    .recipe-detail-header { flex-direction: column; }
    .recipe-detail-actions { justify-content: flex-start; }
    .recipe-detail-photo { height: 200px; }
    .parse-section { padding: 16px; }
    .parse-row { flex-direction: column; align-items: flex-start; }
    .btn-parse { width: 100%; margin-left: 0; }
    .ingredient-row { flex-wrap: wrap; }
    .ing-qty-input  { width: calc(50% - 4px); }
    .ing-unit-input { width: calc(50% - 4px); }
    .ing-item-input { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────
   Restaurants
   ───────────────────────────────────────────────────────────────── */
.shop-card-link { text-decoration: none; color: inherit; display: block; }
.shop-card-link .shop-card { cursor: pointer; transition: transform .08s ease; }
.shop-card-link:hover .shop-card { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }

.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.restaurant-info { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.restaurant-info > div { color: #475569; }
.restaurant-info strong { color: #1e293b; font-weight: 600; }
.restaurant-links { display: flex; gap: 14px; padding-top: 4px; }
.restaurant-links a { font-size: .85rem; color: #0369a1; }
.restaurant-links a:hover { text-decoration: underline; }

.section-divider { height: 1px; background: #e2e8f0; margin: 28px 0 18px; }
.section-h2 { font-size: 1.15rem; font-weight: 700; color: #1e293b; }

.menu-display { display: flex; flex-direction: column; gap: 18px; }
.menu-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 20px; }
.menu-section-title { font-size: .95rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.menu-item-list { list-style: none; padding: 0; margin: 0; }
.menu-item-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; gap: 12px; }
.menu-item-row:last-child { border-bottom: none; }
.menu-item-name { color: #1e293b; font-size: .9rem; }
.menu-item-price { color: #64748b; font-size: .9rem; white-space: nowrap; }

.empty-state-small { color: #64748b; font-size: .9rem; padding: 14px 0; }

/* Order rows on detail page */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-row-link { text-decoration: none; color: inherit; display: block; }
.order-row { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; transition: background .12s; }
.order-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.order-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-date { font-weight: 700; color: #1e293b; font-size: .95rem; }
.order-photo-count { color: #64748b; font-size: .82rem; }
.order-items-summary { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.order-item-summary { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #1e293b; }
.order-item-name { flex: 1; }
.order-items-empty { color: #94a3b8; font-size: .85rem; font-style: italic; }
.order-notes-preview { color: #64748b; font-size: .82rem; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }

/* Rating pills — always include text so the UI works without color */
.rating-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.rating-pill-always        { background: #d1fae5; color: #065f46; border-color: #10b981; }
.rating-pill-would_again   { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }
.rating-pill-wouldnt_again { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.rating-pill-never_again   { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.rating-pill-unrated       { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }

/* Order view */
.view-items-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.view-item-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.view-item-row:last-child { border-bottom: none; }
.view-item-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.view-item-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.view-item-name { font-weight: 600; color: #1e293b; font-size: .95rem; }
.view-item-price { color: #64748b; font-size: .85rem; }
.view-item-notes { color: #64748b; font-size: .85rem; font-style: italic; }
.view-notes { color: #1e293b; font-size: .92rem; white-space: pre-wrap; line-height: 1.5; }

/* Read-only photo tag (no drag/resize) */
.photo-tag-view { cursor: default; }
.photo-tag-view .photo-tag-resize { display: none; }
.photo-tag-view .photo-tag-label { cursor: default; }

/* Menu editor */
.menu-parse-bar { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.menu-parse-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.menu-upload-label { cursor: pointer; }
.menu-parse-hint { font-size: .78rem; color: #94a3b8; }

.menu-editor { display: flex; flex-direction: column; gap: 16px; margin-bottom: 14px; }
.menu-edit-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; }
.menu-edit-section-header { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.menu-edit-section-name { flex: 1; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-weight: 600; font-size: .9rem; }
.menu-edit-section-name:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }
.menu-edit-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.menu-edit-item { display: grid; grid-template-columns: 1fr 100px 2fr auto; gap: 6px; align-items: start; }
.menu-edit-item input, .menu-edit-item textarea { padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 5px; font-size: .85rem; }
.menu-edit-item textarea { resize: vertical; min-height: 30px; }
.menu-item-name-input { font-weight: 500; }

.btn-row-add-small { font-size: .8rem; padding: 6px 10px; }
.btn-row-remove { background: transparent; border: none; color: #94a3b8; cursor: pointer; font-size: 1.2rem; padding: 0 6px; line-height: 1; }
.btn-row-remove:hover { color: #ef4444; }

/* Order page */
.order-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }

.item-picker { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.item-picker-section { display: flex; flex-direction: column; gap: 4px; }
.item-pick-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.item-pick-row:hover { background: #f1f5f9; }
.item-pick-check { cursor: pointer; }
.item-pick-name { flex: 1; font-size: .9rem; color: #1e293b; }
.item-pick-price { color: #64748b; font-size: .85rem; }
.save-status { font-size: .8rem; color: #059669; }
.items-save-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.quick-add-row { display: flex; gap: 8px; margin: 12px 0 4px; align-items: center; }
.quick-add-row input { flex: 1; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: .88rem; }
.quick-add-row input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; border-color: transparent; }
#quick-add-price { max-width: 110px; flex: 0 0 auto; }
.quick-add-row .btn-row-add { white-space: nowrap; padding: 8px 14px; }
.btn-dirty { background: #f59e0b; }
.btn-dirty:hover { background: #d97706; }

/* Rating buttons */
.rating-row { padding: 12px 0; border-bottom: 1px dashed #e2e8f0; display: flex; flex-direction: column; gap: 8px; }
.rating-row:last-child { border-bottom: none; }
.rating-item-name { font-weight: 600; color: #1e293b; font-size: .95rem; }
.rating-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.rating-btn { padding: 6px 12px; border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; font-size: .82rem; cursor: pointer; transition: all .12s; color: #64748b; }
.rating-btn:hover { border-color: #94a3b8; color: #1e293b; }
.rating-btn.active.rating-btn-always       { background: #d1fae5; border-color: #10b981; color: #065f46; }
.rating-btn.active.rating-btn-would_again  { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.rating-btn.active.rating-btn-wouldnt_again{ background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.rating-btn.active.rating-btn-never_again  { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.rating-notes { width: 100%; padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: .85rem; resize: vertical; }

/* Photo upload + bbox tagging */
.photo-upload-bar { display: flex; gap: 12px; align-items: center; margin: 10px 0 14px; flex-wrap: wrap; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.photo-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.photo-frame { position: relative; width: 100%; user-select: none; }
.photo-img { width: 100%; height: auto; display: block; border-radius: 6px; }
.photo-tag { position: absolute; border: 2px solid #3b82f6; background: rgba(59,130,246,.12); border-radius: 4px; cursor: default; box-sizing: border-box; }
.photo-tag-label { position: absolute; top: -24px; left: -2px; background: #3b82f6; color: #fff; font-size: .72rem; font-weight: 600; border-radius: 4px; white-space: nowrap; max-width: calc(100% + 120px); display: flex; align-items: center; }
.photo-tag-label-text { padding: 3px 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.photo-tag-label-text:hover { background: rgba(255,255,255,.1); border-radius: 4px 0 0 4px; }
.photo-tag-close { background: rgba(0,0,0,.18); border: none; color: #fff; font-size: 1rem; line-height: 1; padding: 0 6px; cursor: pointer; border-radius: 0 4px 4px 0; height: 100%; }
.photo-tag-close:hover { background: #ef4444; }
.photo-tag-corner { position: absolute; width: 14px; height: 14px; background: #3b82f6; border: 2px solid #fff; border-radius: 50%; box-sizing: border-box; }
.photo-tag-corner-tl { left: -7px;  top:    -7px; cursor: nwse-resize; }
.photo-tag-corner-tr { right: -7px; top:    -7px; cursor: nesw-resize; }
.photo-tag-corner-bl { left: -7px;  bottom: -7px; cursor: nesw-resize; }
.photo-tag-corner-br { right: -7px; bottom: -7px; cursor: nwse-resize; }
.photo-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.photo-card-actions .btn-secondary { padding: 6px 12px; font-size: .82rem; }
.photo-card-actions .btn-delete { padding: 6px 12px; font-size: .82rem; }

@media (max-width: 720px) {
    .menu-edit-item { grid-template-columns: 1fr; }
    .photo-list { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────
   Columbus / Neighborhoods
   ───────────────────────────────────────────────────────────────── */
.city-banner { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; margin-bottom: 18px; }
.city-banner > div { color: #475569; }
.city-banner strong { color: #1e293b; }
.city-banner-notes { padding-top: 6px; color: #64748b; font-style: italic; }

.view-toggle { display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.view-btn { padding: 6px 16px; font-size: .85rem; color: #64748b; border-radius: 6px; }
.view-btn.active { background: #fff; color: #1e293b; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.columbus-map { height: 600px; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.pin-marker { background: transparent; border: none; }
.pin-label { background: #1e293b; color: #fff; padding: 3px 8px; border-radius: 4px; font-size: .72rem; font-weight: 600; white-space: nowrap; display: inline-block; box-shadow: 0 1px 4px rgba(0,0,0,.2); }

.neighborhood-card { position: relative; }
.neighborhood-card .compare-check-label { position: absolute; top: 10px; right: 10px; z-index: 2; }
.compare-check-label input { display: none; }
.compare-check-box { display: block; width: 22px; height: 22px; border: 2px solid #cbd5e1; border-radius: 4px; background: #fff; cursor: pointer; }
.compare-check:checked + .compare-check-box { background: #3b82f6; border-color: #3b82f6; position: relative; }
.compare-check:checked + .compare-check-box::after { content: '✓'; position: absolute; top: -2px; left: 3px; color: #fff; font-size: 16px; font-weight: 700; }
.compare-bar { display: flex; gap: 12px; align-items: center; padding: 8px 0 14px; }
.compare-hint { color: #64748b; font-size: .85rem; }

/* Inline status toggle on neighborhood cards */
.status-toggle { display: flex; gap: 4px; padding: 10px 14px 0; }
.status-btn { flex: 1; padding: 4px 6px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #64748b; font-size: .72rem; font-weight: 600; cursor: pointer; transition: all .12s; }
.status-btn:hover { background: #f1f5f9; color: #1e293b; }
.status-btn:disabled { opacity: .5; cursor: default; }
.status-btn.active.status-btn-favorite { background: #d1fae5; color: #065f46; border-color: #10b981; }
.status-btn.active.status-btn-maybe    { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }
.status-btn.active.status-btn-avoid    { background: #fee2e2; color: #991b1b; border-color: #ef4444; }

.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; border: 1px solid transparent; }
.status-pill-favorite { background: #d1fae5; color: #065f46; border-color: #10b981; }
.status-pill-maybe    { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }
.status-pill-avoid    { background: #fee2e2; color: #991b1b; border-color: #ef4444; }

.vibe-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .7rem; font-weight: 500; margin-right: 4px; }

.neighborhood-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; margin: 8px 0; font-size: .82rem; color: #475569; }
.neighborhood-stats strong { color: #1e293b; font-weight: 600; }

.card-thumb { margin-top: 8px; border-radius: 6px; overflow: hidden; height: 110px; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.streetview-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.streetview-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.streetview-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.streetview-label { padding: 6px 10px; font-size: .78rem; color: #64748b; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; }
.stat-label { font-size: .72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.stat-value { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin-top: 2px; }
.stat-unit  { font-size: .82rem; color: #64748b; font-weight: 500; margin-left: 2px; }

.info-line { background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; color: #92400e; font-size: .9rem; }
.prose-block { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; color: #1e293b; font-size: .92rem; line-height: 1.5; margin-bottom: 10px; }
.prose-block strong { color: #475569; }

.drive-times-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.drive-times-list li { font-size: .9rem; color: #1e293b; }
.pin-cat { color: #64748b; font-size: .82rem; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pros, .cons { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 18px; }
.pros h3 { color: #065f46; font-size: .92rem; font-weight: 700; margin-bottom: 6px; }
.cons h3 { color: #991b1b; font-size: .92rem; font-weight: 700; margin-bottom: 6px; }
.pros ul, .cons ul { padding-left: 18px; margin: 0; }
.pros li, .cons li { font-size: .88rem; color: #1e293b; line-height: 1.5; }

.visit-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.visit-form textarea { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: .9rem; resize: vertical; }
.visit-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.visit-row { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; }
.visit-date { font-weight: 600; color: #1e293b; font-size: .85rem; margin-bottom: 4px; }
.visit-impressions { color: #475569; font-size: .9rem; line-height: 1.5; }

.caption-input { flex: 1; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: .88rem; }
.photo-caption { padding: 6px 8px 0; font-size: .8rem; color: #64748b; font-style: italic; }

.checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 6px 0; }
.checkbox-grid label { font-size: .85rem; color: #475569; display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* Pins admin */
.pin-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.pin-cat-header { font-size: .92rem; font-weight: 700; color: #1e293b; text-transform: uppercase; letter-spacing: .4px; margin: 14px 0 8px; }
.pin-row { display: flex; gap: 6px; align-items: center; padding: 6px 0; flex-wrap: wrap; }
.pin-row input, .pin-row select { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 5px; font-size: .82rem; }
.pin-name-input { flex: 1; min-width: 160px; }
.pin-cat-input  { width: 130px; }
.pin-addr-input { flex: 1.5; min-width: 180px; }
.pin-coord-input { width: 90px; }

/* Compare table */
.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.compare-table th, .compare-table td { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; font-size: .85rem; }
.compare-table th { background: #f8fafc; font-weight: 700; color: #1e293b; }
.compare-row-label { font-weight: 600; color: #475569; background: #f8fafc; white-space: nowrap; }
.compare-prose { font-size: .82rem; color: #475569; line-height: 1.4; }
.compare-list { padding-left: 18px; margin: 0; font-size: .82rem; }

@media (max-width: 720px) {
    .pros-cons { grid-template-columns: 1fr; }
    .streetview-gallery { grid-template-columns: 1fr 1fr; }
}

/* Collapsible sections (Apartments, Restaurants) */
.collapsible-section { background: transparent; border: none; }
.collapsible-header { list-style: none; cursor: pointer; padding: 14px 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; user-select: none; transition: background .12s; }
.collapsible-header::-webkit-details-marker { display: none; }
.collapsible-header:hover { background: #f8fafc; }
.collapsible-chevron { color: #64748b; font-size: 1rem; transition: transform .15s ease; }
.collapsible-section[open] .collapsible-chevron { transform: rotate(180deg); }
.collapsible-section[open] .collapsible-header { border-radius: 10px 10px 0 0; border-bottom: none; margin-bottom: 0; }
.collapsible-section > *:not(summary) { padding-top: 14px; }

/* Restaurants table */
.restaurant-table-wrap { overflow-x: auto; }
.restaurant-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.restaurant-table th, .restaurant-table td { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: .85rem; vertical-align: top; }
.restaurant-table th { background: #f8fafc; font-weight: 700; color: #1e293b; }
.restaurant-table tr:last-child td { border-bottom: none; }
.restaurant-table .num { text-align: right; white-space: nowrap; }
.r-name { font-weight: 600; color: #1e293b; }
.r-addr { color: #64748b; font-size: .78rem; font-weight: 400; margin-top: 2px; }
.r-yelp { color: #d32323; font-size: .82rem; margin-left: 2px; }
.jb-badge { display: inline-block; background: #fde68a; color: #92400e; padding: 1px 7px; border-radius: 999px; font-size: .65rem; font-weight: 700; letter-spacing: .5px; vertical-align: middle; margin-left: 4px; border: 1px solid #f59e0b; }
.r-google { color: #4285f4; font-size: .82rem; margin-left: 2px; }
.r-links { white-space: nowrap; }
.r-links a { display: inline-block; padding: 1px 6px; margin-right: 3px; background: #f1f5f9; color: #475569; border-radius: 4px; font-size: .75rem; }
.r-links a:hover { background: #e2e8f0; color: #1e293b; }
.cuisine-tag { display: inline-block; background: #f1f5f9; color: #475569; padding: 1px 7px; border-radius: 999px; font-size: .7rem; margin: 1px 3px 1px 0; }

/* Apartments section */
.apt-tier-header { font-size: .95rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .4px; margin: 18px 0 10px; }
.apt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 12px; }
.apt-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.apt-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.apt-photo { height: 180px; overflow: hidden; background: #f1f5f9; }
.apt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apt-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.apt-name { font-weight: 700; color: #1e293b; font-size: 1rem; }
.apt-addr { color: #64748b; font-size: .82rem; }
.apt-prices { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; color: #1e293b; }
.apt-prices span { font-weight: 600; }
.apt-amenities { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-top: 4px; }
.amenity-tag { background: #f1f5f9; color: #475569; padding: 2px 8px; border-radius: 999px; font-size: .72rem; }
.amenity-tag-more { color: #94a3b8; font-size: .72rem; font-style: italic; }
.apt-links { display: flex; gap: 12px; padding-top: 4px; }
.apt-links a { color: #0369a1; font-size: .85rem; }
.apt-links a:hover { text-decoration: underline; }
@media (max-width: 720px) { .apt-grid { grid-template-columns: 1fr; } }

/* Address → Neighborhood lookup */
.addr-lookup { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; margin: 14px 0 18px; }
.addr-lookup .section-h2 { margin-bottom: 8px; }
.addr-lookup-form { display: flex; gap: 8px; flex-wrap: wrap; }
.addr-lookup-input { flex: 1; min-width: 220px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: .9rem; }
.addr-lookup-result { margin-top: 10px; font-size: .88rem; color: #1e293b; }
.addr-lookup-hit { padding: 8px 0; }
.addr-lookup-formatted { color: #475569; font-size: .82rem; margin-bottom: 4px; }
.addr-lookup-match { font-size: 1rem; }
.addr-lookup-match a { color: #0369a1; text-decoration: none; }
.addr-lookup-match a:hover { text-decoration: underline; }
.addr-lookup-dist { color: #64748b; font-size: .8rem; font-weight: 400; }
.addr-lookup-osm { color: #64748b; font-size: .78rem; margin-top: 4px; }
.addr-lookup-others { color: #475569; font-size: .82rem; margin-top: 6px; }
.addr-lookup-others a { color: #0369a1; }
.addr-lookup-err { color: #b91c1c; }

/* Home page Pins grid (across all neighborhoods) */
.home-pins { margin: 8px 0 22px; }
.home-pins .section-h2 { margin-bottom: 10px; }
.home-pins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.home-pin-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.home-pin-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.home-pin-cat { background: #e0f2fe; color: #0369a1; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.home-pin-n { color: #475569; font-size: .78rem; font-weight: 600; text-decoration: none; }
.home-pin-n:hover { color: #0369a1; }
.home-pin-label { font-weight: 600; color: #1e293b; font-size: .95rem; }
.home-pin-label a { color: #1e293b; text-decoration: none; }
.home-pin-label a:hover { color: #0369a1; }
.home-pin-addr { color: #64748b; font-size: .78rem; }
.home-pin-notes { color: #475569; font-size: .82rem; font-style: italic; }
.home-pin-del { margin-top: 4px; }

/* Neighborhood detail Pin add form + list */
.pin-add-form { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 6px; }
.pin-add-form input, .pin-add-form select { padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 5px; font-size: .82rem; }
.pin-add-label { flex: 1.5; min-width: 180px; }
.pin-add-cat { width: 130px; }
.pin-add-url { flex: 1; min-width: 160px; }
.pin-add-addr { flex: 1; min-width: 160px; }
.pin-add-notes { flex: 1; min-width: 160px; }
.neighborhood-pin-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.neighborhood-pin-row { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.neighborhood-pin-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.neighborhood-pin-label { font-weight: 600; color: #1e293b; font-size: .95rem; }
.neighborhood-pin-label a { color: #1e293b; text-decoration: none; }
.neighborhood-pin-label a:hover { color: #0369a1; }


/* Pin-existing buttons on restaurant rows + apartment cards */
.r-pin-col { white-space: nowrap; text-align: right; width: 1%; }
.pin-btn {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pin-btn:hover { background: #ffedd5; border-color: #fdba74; }
.pin-already {
    display: inline-block;
    color: #65a30d;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Apartment comparison page */
.compare-wrap { overflow-x: auto; }
.compare-table {
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
    min-width: 600px;
}
.compare-table th, .compare-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: top;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-label-col { font-weight: 600; color: #475569; font-size: .82rem; background: #f8fafc; width: 160px; }
.compare-apt-col { vertical-align: top; background: #fff; }
.compare-photo {
    width: 100%; height: 140px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}
.compare-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compare-photo-blank { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: .8rem; }
.compare-apt-name { font-size: 1.05rem; font-weight: 700; color: #1e293b; }
.compare-apt-sub  { font-size: .8rem; margin-top: 2px; }
.compare-apt-sub a { color: #2563eb; }
.compare-apt-addr { font-size: .75rem; color: #94a3b8; margin-top: 2px; }
.compare-row-links { display: flex; gap: 8px; margin-top: 6px; }
.compare-row-links a { font-size: .75rem; color: #2563eb; }
.compare-num { font-variant-numeric: tabular-nums; font-weight: 500; }
.compare-win {
    background: #ecfdf5 !important;
    color: #065f46;
    font-weight: 700;
    position: relative;
}
.compare-win::after { content: ' ★'; color: #10b981; }
.compare-section-row td {
    background: #f1f5f9;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
    padding: 6px 14px;
}
.compare-notes, .compare-gym-perk { font-size: .85rem; line-height: 1.4; white-space: pre-wrap; }
.apt-tier { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: .7rem; font-weight: 600; margin-top: 6px; }
.apt-tier-below { background: #d1fae5; color: #065f46; }
.apt-tier-median { background: #dbeafe; color: #1e40af; }
.apt-tier-above { background: #fee2e2; color: #991b1b; }

/* Pinned places — apartment compare picker */
.pin-compare-row { display: flex; align-items: center; gap: 8px; }
.pin-compare-checkbox { width: 18px; height: 18px; cursor: pointer; }
.pin-compare-bar {
    position: fixed;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: .9rem;
    box-shadow: 0 6px 24px rgba(0,0,0,.2);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 100;
}
.pin-compare-bar.show { display: inline-flex; }
.pin-compare-bar button {
    background: #10b981; color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.pin-compare-bar button:disabled { background: #94a3b8; cursor: not-allowed; }
