/* ═══════════════════════════════════════════════════════════════════════════
   WINE-RATING — Master Stylesheet
   Aesthetic: Luxury editorial — deep burgundy, aged parchment, refined serif
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --burgundy:       #8B0000;
    --burgundy-light: #A52020;
    --burgundy-deep:  #5C0000;
    --parchment:      #FEFCF8;
    --parchment-dark: #F5EFE4;
    --ink:            #1a0a05;
    --ink-mid:        #3D2314;
    --ink-light:      #7A5C42;
    --gold:           #C8A020;
    --gold-light:     #DEB887;
    --cream:          #F9F5EF;
    --border:         rgba(200, 160, 32, 0.25);
    --shadow:         rgba(26,10,5,0.12);
    --shadow-deep:    rgba(26,10,5,0.25);

    --radius:         8px;
    --radius-lg:      16px;
    --transition:     0.2s ease;

    font-family: 'Jost', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--parchment);
    color: var(--ink);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1,h2,h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: var(--ink);
    border-bottom: 1px solid rgba(200,160,32,0.3);
    backdrop-filter: blur(12px);
}
.nav-logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem; font-weight: 600; color: var(--gold-light);
    letter-spacing: 0.5px;
}
.nav-logo-icon { font-size: 1.1rem; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem; font-weight: 400; letter-spacing: 0.5px; text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    transition: all var(--transition);
}
.nav-link svg { width: 15px; height: 15px; }
.nav-link:hover, .nav-link.active { color: var(--gold-light); background: rgba(200,160,32,0.12); }
.nav-logout { color: rgba(255,255,255,0.4); }
.nav-logout:hover { color: #e87070; background: rgba(232,112,112,0.1); }

.main-content { min-height: calc(100vh - 60px); }
.full-height { min-height: 100vh; }

/* ── Flash Messages ────────────────────────────────────────────────────────── */
.flash-container { position: fixed; top: 70px; right: 1rem; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; }
.flash {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.87rem;
    min-width: 280px; max-width: 400px;
    box-shadow: 0 4px 16px var(--shadow-deep);
    animation: slideIn 0.3s ease;
}
.flash-error { background: #5C0000; color: #FFD0D0; border-left: 3px solid #FF6060; }
.flash-success { background: #0A3D1A; color: #C0F0D0; border-left: 3px solid #40C060; }
.flash-close { background: none; border: none; font-size: 1.2rem; opacity: 0.6; color: inherit; transition: opacity var(--transition); }
.flash-close:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 500; letter-spacing: 0.5px;
    border: none; transition: all var(--transition);
    text-transform: uppercase;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--burgundy); color: white; }
.btn-primary:hover { background: var(--burgundy-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,0,0,0.4); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--parchment-dark); border-color: var(--gold-light); }
.btn-danger { background: transparent; color: #C04040; border: 1px solid rgba(192,64,64,0.3); }
.btn-danger:hover { background: rgba(192,64,64,0.1); }
.btn-ghost { background: transparent; color: var(--ink-light); }
.btn-ghost:hover { color: var(--ink); }
.btn-full { width: 100%; justify-content: center; padding: 0.85rem; }
.btn-large { padding: 1rem 2.5rem; font-size: 0.95rem; border-radius: 12px; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.78rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--ink);
    position: relative; overflow: hidden;
}
.auth-backdrop {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139,0,0,0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(200,160,32,0.08) 0%, transparent 60%);
}
.auth-ornament {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    font-size: 40rem; opacity: 0.015;
    color: var(--gold); pointer-events: none;
    font-family: 'Cormorant Garamond', serif;
    user-select: none;
}
.auth-card {
    position: relative; z-index: 1;
    background: var(--parchment);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    width: 100%; max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.auth-header { text-align: center; margin-bottom: 2.5rem; }
.auth-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.auth-title { font-size: 2rem; color: var(--burgundy); letter-spacing: 1px; }
.auth-subtitle { color: var(--ink-light); font-size: 0.9rem; margin-top: 0.25rem; font-weight: 300; }

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-light); font-weight: 500; }
.form-hint { font-weight: 300; color: var(--gold-light); font-size: 0.75rem; text-transform: none; letter-spacing: 0; }
.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    font-size: 0.95rem; font-family: inherit;
    color: var(--ink);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--burgundy);
    box-shadow: 0 0 0 3px rgba(139,0,0,0.1);
}
.auth-footer { text-align: center; margin-top: 2rem; font-size: 0.87rem; color: var(--ink-light); }
.auth-link { color: var(--burgundy); font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* ── Push Permission Banner ─────────────────────────────────────────────────── */
.push-banner {
    background: var(--ink);
    color: #fff;
    padding: 0.9rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.push-banner-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.push-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
}
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* Push status toast */
.push-status {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-family: var(--font-body);
    white-space: nowrap;
}
.push-status-success { background: #2d6a4f; color: #fff; }
.push-status-warn    { background: #8B6914; color: #fff; }
.push-status-error   { background: var(--burgundy); color: #fff; }

/* Two-column row inside auth forms (First / Last Name) */
.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
@media (max-width: 480px) {
    .form-row-two {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.dashboard-page { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; }
.dashboard-hero {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 3rem;
}
.dashboard-greeting { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 3px; color: var(--ink-light); margin-bottom: 0.5rem; }
.dashboard-title { font-size: 3.5rem; color: var(--burgundy); line-height: 1; }
.dashboard-subtitle { color: var(--ink-light); font-size: 1rem; margin-top: 0.75rem; font-weight: 300; max-width: 380px; }
.dashboard-decor { font-size: 6rem; color: var(--gold-light); opacity: 0.3; font-family: 'Cormorant Garamond', serif; line-height: 1; margin-top: -1rem; }

.dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.action-card {
    display: flex; align-items: center; gap: 1.5rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
    background: white;
}
.action-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(139,0,0,0.03) 100%);
    transition: opacity 0.3s;
}
.action-card:hover {
    border-color: var(--burgundy);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px var(--shadow);
}
.action-card-icon {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--cream); border: 1px solid var(--border);
}
.action-card-icon svg { width: 24px; height: 24px; color: var(--burgundy); }
.action-card-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--ink); margin-bottom: 0.4rem; }
.action-card-desc { font-size: 0.85rem; color: var(--ink-light); line-height: 1.5; font-weight: 300; }
.action-card-arrow { margin-left: auto; font-size: 1.4rem; color: var(--burgundy); opacity: 0; transition: all var(--transition); }
.action-card:hover .action-card-arrow { opacity: 1; transform: translateX(4px); }

/* ═══════════════════════════════════════════════════════════════════════════
   CREATE NOTE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.create-page { max-width: 860px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.create-header { margin-bottom: 3rem; border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
.page-title { font-size: 2.8rem; color: var(--burgundy); }
.page-subtitle { color: var(--ink-light); font-size: 0.95rem; margin-top: 0.3rem; font-weight: 300; }

/* Form sections */
.form-section {
    display: flex; gap: 2rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(200,160,32,0.15);
}
.form-section:last-of-type { border-bottom: none; }
.section-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem; font-weight: 300;
    color: rgba(139,0,0,0.15);
    line-height: 1; min-width: 60px; padding-top: 4px;
    user-select: none;
}
.section-content { flex: 1; }
.section-title { font-size: 1.4rem; color: var(--ink); margin-bottom: 0.3rem; }
.section-desc { font-size: 0.85rem; color: var(--ink-light); margin-bottom: 1.5rem; font-weight: 300; }

/* Wine type selector */
.type-selector { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.type-btn {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: white; color: var(--ink-mid);
    font-size: 0.88rem; font-weight: 400; font-family: inherit;
    transition: all var(--transition);
}
.type-icon { font-size: 1.1rem; }
.type-btn:hover { border-color: var(--burgundy); color: var(--burgundy); }
.type-btn.active { background: var(--burgundy); color: white; border-color: var(--burgundy); }

/* Fields grid */
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
.field-group { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-light); font-weight: 500; }
.field-input {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white; font-family: inherit; font-size: 0.95rem; color: var(--ink);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(139,0,0,0.08); }
.field-textarea { resize: vertical; min-height: 120px; }

/* Vintage scroll */
.vintage-scroll-container {
    overflow-x: auto; padding: 1rem 0; margin-top: 0.5rem;
    scrollbar-width: thin; scrollbar-color: var(--burgundy) transparent;
}
.vintage-scroll { display: flex; gap: 0.5rem; width: max-content; }
.vintage-item {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.9rem; font-weight: 400; color: var(--ink-light);
    cursor: pointer; transition: all var(--transition);
    background: white; flex-shrink: 0;
}
.vintage-item:hover { border-color: var(--burgundy); color: var(--burgundy); }
.vintage-item.active {
    background: var(--burgundy); color: white; border-color: var(--burgundy);
    font-weight: 600; font-size: 1rem;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(139,0,0,0.35);
}

/* Bottle selector */
.bottle-selector { margin-top: 1rem; }
.bottle-track { display: flex; gap: 0.75rem; overflow-x: auto; padding: 1rem 0; scrollbar-width: thin; }
.bottle-option {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 1rem 0.75rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: white; cursor: pointer; transition: all var(--transition);
    min-width: 80px; flex-shrink: 0;
}
.bottle-option:hover { border-color: var(--burgundy); }
.bottle-option.active {
    border-color: var(--burgundy); background: rgba(139,0,0,0.04);
    box-shadow: 0 4px 16px rgba(139,0,0,0.15);
}
.bottle-visual { height: 80px; display: flex; align-items: flex-end; justify-content: center; }
.bottle-svg-wrap { transform-origin: bottom center; }
.bottle-svg-wrap svg { width: 30px; height: 80px; }
.bottle-option { color: var(--ink-mid); }
.bottle-option.active { color: var(--burgundy); }
.bottle-label { text-align: center; }
.bottle-vol { display: block; font-size: 0.82rem; font-weight: 600; color: inherit; }
.bottle-name { display: block; font-size: 0.68rem; color: var(--ink-light); font-weight: 300; }
.bottle-option.active .bottle-name { color: var(--burgundy); opacity: 0.7; }

/* Wine Color Chart */
.color-chart-container { margin: 1rem 0; }
.color-chart-img {
    width: 100%; max-width: 600px; border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block; margin: 0 auto;
}
.wine-colors-grid {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 1rem 0 0.5rem;
}
.color-swatch-item {
    width: 36px; height: 44px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    position: relative;
}
.color-swatch-item:hover { transform: scale(1.15); z-index: 1; }
.color-swatch-item.active {
    border-color: var(--ink);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2;
}
.color-selection-label { font-size: 0.85rem; color: var(--ink-light); margin-top: 0.5rem; }
.color-selection-label strong { color: var(--ink); }

/* Aroma Wheel */
.aroma-wheel-wrap {
    display: flex; justify-content: center;
    margin: 1rem 0;
}
.aroma-wheel-wrap canvas { max-width: 100%; height: auto; cursor: pointer; }
.aroma-selected-list {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-top: 1rem; min-height: 40px;
}
.aroma-placeholder { color: var(--ink-light); font-size: 0.85rem; font-style: italic; align-self: center; }
.aroma-tag-ui {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    background: var(--burgundy); color: white;
    border-radius: 50px; font-size: 0.82rem; cursor: pointer;
    transition: background var(--transition);
}
.aroma-tag-ui:hover { background: var(--burgundy-light); }
.aroma-remove { font-size: 1rem; opacity: 0.7; }

/* Taste Profile */
.taste-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; margin-top: 1rem; }
.taste-sliders { display: flex; flex-direction: column; gap: 0.75rem; }
.taste-row { display: flex; align-items: center; gap: 0.75rem; }
.taste-label { width: 70px; font-size: 0.8rem; font-weight: 400; color: var(--ink-mid); flex-shrink: 0; }
.taste-pip-row { display: flex; gap: 5px; }
.taste-pip {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--parchment-dark);
    border: 1.5px solid var(--border);
    transition: all var(--transition);
}
.taste-pip.active { background: var(--burgundy); border-color: var(--burgundy); }
.taste-pip:hover { border-color: var(--burgundy); transform: scale(1.15); }
.taste-value { font-size: 0.8rem; color: var(--ink-light); width: 20px; text-align: right; }
.taste-radar-wrap canvas { width: 100% !important; max-height: 280px; }

/* Rating Slider */
.rating-slider-wrap { margin-top: 0.75rem; }
.rating-display {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem; font-weight: 700;
    color: var(--burgundy); line-height: 1;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}
.rating-slider-track { padding: 0.5rem 0; }
.rating-slider {
    width: 100%; height: 4px;
    appearance: none; background: var(--border);
    border-radius: 2px; outline: none; cursor: pointer;
}
.rating-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--burgundy);
    box-shadow: 0 2px 8px rgba(139,0,0,0.4);
    cursor: pointer;
}
.rating-slider::-moz-range-thumb {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--burgundy);
    border: none;
    box-shadow: 0 2px 8px rgba(139,0,0,0.4);
}
.rating-labels { display: flex; justify-content: space-between; font-size: 0.73rem; color: var(--ink-light); margin-top: 0.3rem; }

/* Submit Section */
.submit-section {
    display: flex; justify-content: center;
    padding: 3rem 0 1rem;
}

/* Toast */
.toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: white; padding: 0.75rem 1.5rem;
    border-radius: 50px; font-size: 0.85rem; z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { bottom: 0; opacity: 0; } to { bottom: 2rem; opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════════════════
   VIEW NOTE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.view-page { max-width: 800px; margin: 0 auto; padding: 2rem 2rem 5rem; }
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.back-link { color: var(--ink-light); font-size: 0.85rem; transition: color var(--transition); }
.back-link:hover { color: var(--burgundy); }
.view-header-actions { display: flex; gap: 0.75rem; }

.degustation-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 4px 24px var(--shadow);
}
.deg-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--ink) 0%, #2C1810 100%);
    color: white;
}
.deg-type-badge {
    display: inline-block; padding: 0.2rem 0.8rem;
    border: 1px solid rgba(200,160,32,0.4);
    border-radius: 50px; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--gold-light); margin-bottom: 0.75rem;
}
.deg-wine-name { font-size: 2.2rem; color: white; line-height: 1.1; }
.deg-winery { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin-top: 0.4rem; font-weight: 300; }

.deg-rating-circle {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--burgundy);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.deg-rating-circle.rating-gold { background: linear-gradient(135deg, #8B6820, #C8A020); }
.deg-rating-circle.rating-silver { background: linear-gradient(135deg, #606070, #909098); }
.deg-rating-num { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 700; color: white; line-height: 1; }
.deg-rating-pts { font-size: 0.65rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; }

.deg-info-row {
    display: flex; gap: 0; border-bottom: 1px solid var(--border);
    background: var(--cream);
}
.deg-info-item {
    flex: 1; display: flex; flex-direction: column;
    padding: 1.25rem 2rem;
    border-right: 1px solid var(--border);
}
.deg-info-item:last-child { border-right: none; }
.deg-info-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-light); font-weight: 500; margin-bottom: 0.25rem; }
.deg-info-val { font-size: 1rem; color: var(--ink); }

.deg-section { padding: 2rem 2.5rem; border-bottom: 1px solid var(--border); }
.deg-section:last-of-type { border-bottom: none; }
.deg-section-title {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--burgundy); font-family: 'Jost', sans-serif; font-weight: 500;
    margin-bottom: 1rem;
}

.deg-color-display { display: flex; align-items: center; gap: 1rem; }
.deg-color-swatch { width: 50px; height: 70px; border-radius: 8px; border: 1px solid var(--border); }
.deg-color-name { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-style: italic; }

.deg-aroma-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.deg-aroma-tag {
    padding: 0.35rem 0.9rem;
    background: var(--cream); border: 1px solid var(--border);
    border-radius: 50px; font-size: 0.85rem; color: var(--ink-mid);
}

.deg-radar-wrap { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.deg-radar-wrap canvas { max-width: 380px; max-height: 380px; }

.deg-taste-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 2rem; }
.deg-taste-item { display: flex; align-items: center; gap: 0.75rem; }
.deg-taste-label { font-size: 0.8rem; color: var(--ink-light); width: 70px; flex-shrink: 0; }
.deg-taste-bar { flex: 1; height: 4px; background: var(--parchment-dark); border-radius: 2px; overflow: hidden; }
.deg-taste-fill { height: 100%; background: var(--burgundy); border-radius: 2px; transition: width 0.8s ease; }
.deg-taste-score { font-size: 0.78rem; color: var(--ink-mid); width: 28px; text-align: right; flex-shrink: 0; }

.deg-note {
    background: var(--cream);
    border-left: 3px solid var(--burgundy);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem; font-style: italic; line-height: 1.7;
    color: var(--ink-mid);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
.deg-empty { font-size: 0.85rem; color: var(--ink-light); font-style: italic; }
.deg-footer {
    padding: 1rem 2.5rem;
    font-size: 0.78rem; color: var(--ink-light);
    background: var(--cream);
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIBRARY PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.library-page { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.library-header { margin-bottom: 2rem; }

/* Filter Panel */
.filter-panel {
    background: white; border-radius: var(--radius-lg);
    border: 1px solid var(--border); padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.filter-group { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.filter-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-light); font-weight: 500; }
.filter-input, .filter-select {
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--parchment); font-family: inherit; font-size: 0.88rem; color: var(--ink);
    transition: border-color var(--transition);
    width: 100%; min-width: 0; box-sizing: border-box;
}
.filter-input:focus, .filter-select:focus { outline: none; border-color: var(--burgundy); }
.filter-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

/* Note Cards Grid */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.note-card {
    background: white; border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden; transition: all 0.3s ease;
    display: flex; flex-direction: column;
}
.note-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px var(--shadow); border-color: rgba(139,0,0,0.2); }
.note-card-header { position: relative; }
.note-card-color-strip { height: 6px; }
.note-card-meta { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem 0; }
.note-card-type { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-light); }
.note-card-rating {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem; font-weight: 700;
    color: var(--burgundy);
}
.note-card-rating.gold { color: var(--gold); }
.note-card-rating.silver { color: #909098; }
.note-card-body { padding: 0.75rem 1rem 1rem; flex: 1; }
.note-card-name { font-size: 1.25rem; color: var(--ink); line-height: 1.2; margin-bottom: 0.2rem; }
.note-card-winery { font-size: 0.82rem; color: var(--ink-light); font-weight: 300; margin-bottom: 0.5rem; }
.note-card-details { font-size: 0.78rem; color: var(--ink-light); margin-bottom: 0.75rem; display: flex; gap: 0.5rem; }
.note-card-aromas { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.note-aroma-mini {
    padding: 0.15rem 0.55rem;
    background: var(--cream); border: 1px solid var(--border);
    border-radius: 50px; font-size: 0.7rem; color: var(--ink-light);
}
.note-aroma-more { color: var(--burgundy); border-color: rgba(139,0,0,0.2); background: rgba(139,0,0,0.04); }
.note-card-footer { padding: 0.6rem 1rem; background: var(--cream); border-top: 1px solid var(--border); font-size: 0.73rem; color: var(--ink-light); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; }
.page-btn { color: var(--burgundy); font-size: 0.85rem; padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: white; transition: all var(--transition); }
.page-btn:hover { background: var(--burgundy); color: white; border-color: var(--burgundy); }
.page-info { font-size: 0.85rem; color: var(--ink-light); }

/* Empty State */
.library-empty { text-align: center; padding: 5rem 2rem; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-title { font-size: 1.8rem; color: var(--ink-mid); margin-bottom: 0.5rem; }
.empty-desc { color: var(--ink-light); font-size: 0.95rem; margin-bottom: 2rem; font-weight: 300; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dashboard-actions { grid-template-columns: 1fr; }
    .dashboard-hero { flex-direction: column; }
    .dashboard-decor { display: none; }
    .form-section { flex-direction: column; gap: 1rem; }
    .section-label { font-size: 1.5rem; min-width: auto; }
    .fields-grid { grid-template-columns: 1fr; }
    .taste-layout { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .deg-info-row { flex-wrap: wrap; }
    .deg-info-item { min-width: 50%; }
    .deg-taste-grid { grid-template-columns: 1fr; }
    .library-grid { grid-template-columns: 1fr; }
    .view-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .navbar { padding: 0 1rem; }
    .nav-link span:not(.nav-logo *):not(.nav-badge-dot) { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATCH BANNER (view_note flash)
   ═══════════════════════════════════════════════════════════════════════════ */
.match-banner {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #1a0a05 0%, #2C1810 100%);
    border: 1px solid rgba(200,160,32,0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(26,10,5,0.25);
    animation: slideIn 0.4s ease;
}
.match-banner-icon { font-size: 2rem; flex-shrink: 0; }
.match-banner-body { flex: 1; }
.match-banner-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem; font-weight: 600;
    color: var(--gold-light); margin-bottom: 0.2rem;
}
.match-banner-text { font-size: 0.88rem; color: rgba(255,255,255,0.75); line-height: 1.4; }
.match-banner-text strong { color: white; }
.match-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.notif-page { max-width: 900px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.notif-header { margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
.notif-section { margin-bottom: 3rem; }
.notif-section-title {
    display: flex; align-items: center; gap: 0.6rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem; color: var(--ink);
    margin-bottom: 1.25rem;
}
.notif-badge {
    background: var(--burgundy); color: white;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem; font-weight: 600;
    padding: 0.1rem 0.5rem; border-radius: 50px;
}
.notif-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

.notif-card {
    background: white; border-radius: var(--radius-lg);
    border: 1px solid var(--border); overflow: hidden;
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
.notif-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--shadow); border-color: rgba(139,0,0,0.2); }
.notif-card-accepted { cursor: pointer; }
.notif-card-color-strip { height: 5px; }
.notif-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.notif-card-meta { display: flex; align-items: center; justify-content: space-between; }
.notif-card-type { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-light); }
.notif-from { font-size: 0.78rem; color: var(--ink-light); }
.notif-from strong { color: var(--ink); }
.notif-card-name { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--ink); line-height: 1.2; }
.notif-card-winery { font-size: 0.82rem; color: var(--ink-light); font-weight: 300; }
.notif-card-text { font-size: 0.83rem; color: var(--ink-light); line-height: 1.5; }
.notif-card-text strong { color: var(--ink); }
.notif-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.notif-ratings { display: flex; gap: 0.4rem; }
.notif-rating-pill {
    font-size: 0.72rem; font-weight: 600;
    padding: 0.15rem 0.6rem; border-radius: 50px;
}
.notif-rating-pill.their { background: rgba(139,0,0,0.1); color: var(--burgundy); }
.notif-rating-pill.mine  { background: rgba(0,80,140,0.08); color: #00508C; }
.notif-compare-hint {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.78rem; color: var(--burgundy);
    margin-top: 0.5rem; font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED NOTE — COMPARE COLUMNS
   ═══════════════════════════════════════════════════════════════════════════ */
.compare-columns {
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border);
}
.compare-col { border-right: 1px solid var(--border); }
.compare-col:last-child { border-right: none; }
.compare-col-mine { background: #FAFCFF; }
.compare-col-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
}
.compare-col-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--ink-light); font-weight: 500;
}
.compare-col-mine .compare-col-label { color: #00508C; }
.compare-col-mine .deg-taste-fill { background: #00508C; }
.compare-col-mine .deg-section-title { color: #00508C; }
.compare-col-mine .deg-note { border-left-color: #00508C; }
.compare-col .deg-section { padding: 1.5rem 2rem; }
.compare-col .deg-section-title { margin-bottom: 0.75rem; }
.compare-col .deg-radar-wrap canvas { max-width: 300px; max-height: 300px; }

@media (max-width: 768px) {
    .compare-columns { grid-template-columns: 1fr; }
    .compare-col { border-right: none; border-bottom: 1px solid var(--border); }
    .match-banner { flex-wrap: wrap; }
    .notif-cards { grid-template-columns: 1fr; }
}

/* Nav badge */
.nav-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--burgundy); color: white;
    font-size: 0.62rem; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%;
    margin-left: 2px; vertical-align: middle;
    animation: pulse 2s infinite;
}
/* Badge dot — shown absolute over the bell icon, visible on mobile too */
.nav-badge-dot {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: var(--burgundy);
    color: white;
    font-size: 0.6rem; font-weight: 700;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    animation: pulse 2s infinite;
    border: 1.5px solid var(--ink);
    z-index: 10;
    pointer-events: none;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* ── Compare overlay section (mobile only) ─────────────────────────────────── */
.compare-overlay-section {
    display: none; /* hidden on desktop */
    border-top: 1px solid var(--border);
    background: var(--cream);
}
.compare-overlay-legend {
    display: flex; justify-content: center; gap: 1.5rem;
    padding: 0 2rem 1.5rem;
    font-size: 0.82rem; font-weight: 500;
}
.overlay-legend-item.their { color: #8B0000; }
.overlay-legend-item.mine  { color: #00508C; }

@media (max-width: 768px) {
    /* Show overlay radar on mobile */
    .compare-overlay-section { display: block; }

    /* Fix compare columns on mobile — full width, no overflow */
    .compare-columns {
        grid-template-columns: 1fr;
        overflow: hidden;
    }
    .compare-col {
        border-right: none;
        border-bottom: 1px solid var(--border);
        min-width: 0;
        width: 100%;
    }
    .compare-col .deg-section {
        padding: 1.25rem 1rem;
    }
    .compare-col-header {
        padding: 1rem;
    }
    .compare-col .deg-radar-wrap canvas {
        max-width: 100%;
    }
    .compare-col .deg-taste-grid {
        grid-template-columns: 1fr;
    }
    .deg-taste-item {
        gap: 0.5rem;
    }
    .deg-taste-label {
        width: 90px;
        font-size: 0.75rem;
    }
}
