/* ============================================
   AI Event Planner — Premium UI
   ============================================ */

/* --- Section Icon Color Tokens --- */
:root {
    --planner-color-budget:       #4f46e5;
    --planner-color-venue:        #059669;
    --planner-color-vendor:       #d97706;
    --planner-color-theme:        #db2777;
    --planner-color-food:         #ea580c;
    --planner-color-entertainment:#7c3aed;
    --planner-color-timeline:     #0284c7;
    --planner-color-logistics:    #475569;
}

/* --- Animations --- */
@keyframes planner-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes planner-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes planner-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes planner-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes planner-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(34,109,180,0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(34,109,180,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,109,180,0); }
}
@keyframes planner-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes planner-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes planner-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes planner-check-pop {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes planner-progress-bar {
    from { width: 0; }
}
@keyframes planner-slide-right {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes planner-float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-6px); }
}

/* --- Hero Header --- */
.planner-hero {
    background: var(--primary);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.planner-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.planner-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.planner-hero-content {
    position: relative;
    z-index: 1;
}
.planner-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.planner-hero h2 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fbbf24;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.planner-hero-sub {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0 0 1.25rem;
}
.planner-hero-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.planner-hero-stat {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    min-width: 130px;
    animation: planner-fade-up 0.5s ease both;
}
.planner-hero-stat:nth-child(2) { animation-delay: 0.1s; }
.planner-hero-stat:nth-child(3) { animation-delay: 0.2s; }
.planner-hero-stat:nth-child(4) { animation-delay: 0.3s; }
.planner-hero-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 2px;
}
.planner-hero-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
}
.planner-hero-status {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    z-index: 2;
}
.planner-status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.planner-status-badge--draft {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.planner-status-badge--confirmed {
    background: rgba(46,164,79,0.9);
    color: #fff;
}
.planner-status-badge--generated {
    background: rgba(59,130,246,0.9);
    color: #fff;
}

/* --- Section Cards --- */
.planner-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    animation: planner-fade-up 0.4s ease both;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.planner-section:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.planner-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}
.planner-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.planner-section-icon--budget   { background: var(--planner-color-budget); }
.planner-section-icon--venue    { background: var(--planner-color-venue); }
.planner-section-icon--vendor   { background: var(--planner-color-vendor); }
.planner-section-icon--theme    { background: var(--planner-color-theme); }
.planner-section-icon--food     { background: var(--planner-color-food); }
.planner-section-icon--enter    { background: var(--planner-color-entertainment); }
.planner-section-icon--timeline { background: var(--planner-color-timeline); }
.planner-section-icon--logistics{ background: var(--planner-color-logistics); }
.planner-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.planner-section-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}
.planner-section-body {
    padding: 1.25rem;
    overflow-x: hidden;
    word-break: break-word;
}

/* Stagger animations for sections */
.planner-section:nth-child(1)  { animation-delay: 0.05s; }
.planner-section:nth-child(2)  { animation-delay: 0.1s; }
.planner-section:nth-child(3)  { animation-delay: 0.15s; }
.planner-section:nth-child(4)  { animation-delay: 0.2s; }
.planner-section:nth-child(5)  { animation-delay: 0.25s; }
.planner-section:nth-child(6)  { animation-delay: 0.3s; }
.planner-section:nth-child(7)  { animation-delay: 0.35s; }
.planner-section:nth-child(8)  { animation-delay: 0.4s; }

/* --- AI Summary --- */
.planner-section-icon--summary { background: linear-gradient(135deg, var(--primary), #7c3aed); }

.summary-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.summary-highlight-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    font-size: 0.78rem;
    white-space: nowrap;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.summary-highlight-chip:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.summary-highlight-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.summary-highlight-label {
    color: var(--text-muted, #64748b);
    font-weight: 500;
}
.summary-highlight-value {
    color: var(--text);
    font-weight: 600;
}

.summary-text-area {
    position: relative;
}
.summary-text-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.summary-text-hint {
    margin-left: auto;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.6;
}
.summary-textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.7;
    resize: vertical;
    background: var(--bg-secondary, #f8fafc);
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.summary-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}
.summary-actions {
    min-height: 1.5rem;
    margin-top: 0.35rem;
}
.summary-revert-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.2rem 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.summary-revert-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Legacy .planner-summary (keep for backward compat) */
.planner-summary {
    background: color-mix(in srgb, var(--primary) 4%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--border));
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.planner-summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}
.planner-summary-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

/* --- Suggestions Panel --- */
.planner-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border: 1px solid #fcd34d;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    animation: planner-slide-right 0.3s ease both;
    transition: all 0.2s ease;
}
.planner-suggestion:hover {
    box-shadow: 0 4px 12px rgba(245,158,11,0.15);
    transform: translateX(4px);
}
.planner-suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.planner-suggestion-text {
    flex: 1;
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.4;
}
.planner-suggestion-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* --- Budget Chart --- */
.planner-donut-wrap {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem;
}
.planner-donut {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}
.planner-donut:hover {
    transform: scale(1.05);
}
.planner-donut-center {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}
.planner-donut-label {
    display: none;
}
.planner-donut-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    text-align: center;
}
.planner-budget-legend {
    flex: 1;
}
.planner-budget-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding: 0.3rem 0;
}
.planner-budget-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}
.planner-budget-name {
    font-size: 0.82rem;
    min-width: 110px;
    color: var(--text);
}
.planner-budget-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: color-mix(in srgb, var(--primary) 15%, var(--bg-card));
    border-radius: 3px;
    outline: none;
    transition: background 0.2s;
}
.planner-budget-slider:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.planner-budget-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
    margin-top: -6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.planner-budget-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.planner-budget-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--primary) 15%, var(--bg-card));
    border: none;
}
.planner-budget-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(99,102,241,0.35), 0 0 0 1px rgba(0,0,0,0.04);
}
.planner-budget-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(99,102,241,0.35), 0 0 0 1px rgba(0,0,0,0.04);
}
.planner-budget-pct {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 3rem;
    text-align: right;
    color: var(--primary);
}
.planner-budget-amt {
    font-size: 0.75rem;
    min-width: 5.5rem;
    text-align: right;
    color: var(--text-muted);
}
.planner-tips-box {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #166534;
    line-height: 1.5;
}

/* --- Venue Cards --- */
.planner-venue-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.15rem;
    margin-bottom: 0.75rem;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.planner-venue-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.planner-venue-card--top {
    border-left: 4px solid var(--primary);
    background: color-mix(in srgb, var(--primary) 3%, var(--bg-card));
}
.planner-venue-card--top::after {
    content: 'TOP PICK';
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--primary);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 30px;
    transform: rotate(45deg);
}
.planner-venue-card--accepted {
    border-color: var(--success) !important;
    border-width: 2px;
    background: color-mix(in srgb, var(--success) 3%, var(--bg-card));
}
.planner-venue-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 3px solid;
}
.planner-venue-score--high   { color: #059669; border-color: #059669; background: #ecfdf5; }
.planner-venue-score--medium { color: #d97706; border-color: #d97706; background: #fffbeb; }
.planner-venue-score--low    { color: #dc2626; border-color: #dc2626; background: #fef2f2; }

/* --- Theme Cards --- */
.planner-theme-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.planner-theme-scroll::-webkit-scrollbar {
    height: 7px;
}
.planner-theme-scroll::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 3px;
}
.planner-theme-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}
.planner-theme-card {
    min-width: 300px;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    cursor: pointer;
}
.planner-theme-card:hover {
    border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}
.planner-theme-card--selected {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.planner-theme-gradient {
    height: 80px;
    position: relative;
}
.planner-theme-body {
    padding: 1rem;
}
.planner-theme-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}
.planner-theme-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem;
}
.planner-color-swatches {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
}
.planner-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.planner-color-swatch:hover {
    transform: scale(1.15);
}

/* --- Focus-visible states for interactive elements (WCAG) --- */
.planner-theme-card:focus-visible,
.planner-color-swatch:focus-visible,
.planner-venue-card:focus-visible,
.planner-timeline-item:focus-visible,
.planner-food-card:focus-visible,
.planner-entertainment-card:focus-visible,
.planner-vendor-item:focus-visible,
.planner-suggestion:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Timeline --- */
.planner-timeline {
    position: relative;
    padding-left: 2rem;
}
.planner-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 30%, var(--border)));
    border-radius: 1px;
}
.planner-timeline-item {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    cursor: grab;
    animation: planner-slide-right 0.3s ease both;
}
.planner-timeline-item:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.planner-timeline-dot {
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translate(-50%, -50%) translateX(12px);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary);
    z-index: 1;
}
.planner-timeline-time {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    min-width: 4rem;
}
.planner-timeline-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

/* --- Food Grid --- */
.planner-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.planner-food-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.25s ease;
}
.planner-food-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}
.planner-food-card h5 {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
}
.planner-food-card ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.6;
}

/* --- Entertainment Cards --- */
.planner-entertainment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.planner-entertainment-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.25s ease;
}
.planner-entertainment-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.planner-entertainment-card h5 {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 700;
}

/* --- Logistics --- */
.planner-logistics-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
    transition: background 0.15s;
}
.planner-logistics-item:hover {
    background: color-mix(in srgb, var(--primary) 3%, transparent);
    border-radius: 6px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.planner-logistics-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.planner-logistics-icon--ai {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
}
.planner-logistics-icon--manual {
    background: color-mix(in srgb, var(--border) 50%, var(--bg-card));
    color: var(--text-muted);
}

/* --- Vendor Cards --- */
.planner-vendor-category {
    margin-bottom: 1.25rem;
}
.planner-vendor-category-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    margin-bottom: 0.5rem;
}
.planner-vendor-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
    transition: all 0.2s ease;
}
.planner-vendor-item:hover {
    background: color-mix(in srgb, var(--primary) 3%, transparent);
    border-radius: 6px;
    padding-left: 0.5rem;
    margin: 0 -0.5rem;
    padding-right: 0.5rem;
}
.planner-vendor-score {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid;
}

/* --- Wizard Stepper --- */
.planner-wizard {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    animation: planner-scale-in 0.3s ease both;
}
.planner-wizard-steps {
    display: flex;
    background: linear-gradient(135deg, #1a365d 0%, #226DB4 100%);
    padding: 0;
    position: relative;
}
.planner-wizard-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.15rem 0.75rem 0.85rem;
    position: relative;
    color: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    cursor: default;
}
.planner-wizard-step--active {
    color: #fff;
}
.planner-wizard-step--done {
    color: rgba(255,255,255,0.85);
}
.planner-wizard-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}
.planner-wizard-step--active .planner-wizard-step-num {
    background: #fff;
    color: #226DB4;
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}
.planner-wizard-step--done .planner-wizard-step-num {
    background: rgba(46,164,79,0.9);
    border-color: rgba(46,164,79,0.9);
}
.planner-wizard-step-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.planner-wizard-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #fff;
    transition: width 0.5s ease;
    border-radius: 0 2px 0 0;
}
.planner-wizard-body {
    padding: 2rem;
}
.planner-wizard-nav {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem 2rem;
}

/* --- Loading / Generating State --- */
.planner-loading {
    text-align: center;
    padding: 4rem 2rem;
    animation: planner-fade-in 0.3s ease both;
}
.planner-loading-orb {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #226DB4, #7c3aed, #ec4899);
    background-size: 200% 200%;
    animation: planner-gradient-shift 3s ease infinite, planner-float 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 30px rgba(34,109,180,0.3);
}
.planner-loading h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
}
.planner-loading-msg {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
    transition: opacity 0.3s;
}
.planner-loading-progress {
    width: 280px;
    height: 4px;
    background: color-mix(in srgb, var(--primary) 15%, var(--bg-card));
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}
.planner-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    border-radius: 2px;
    transition: width 2s ease;
}
.planner-loading-steps {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.planner-loading-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.planner-loading-step--active {
    color: var(--primary);
    font-weight: 600;
}
.planner-loading-step--done {
    color: var(--success);
}
.planner-loading-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}
.planner-loading-step--active .planner-loading-step-dot {
    background: var(--primary);
    animation: planner-pulse-ring 1.5s infinite;
}
.planner-loading-step--done .planner-loading-step-dot {
    background: var(--success);
}

/* --- History Cards --- */
.planner-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.planner-history-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.planner-history-card:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}
.planner-history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.planner-history-card--corporate::before  { background: linear-gradient(90deg, #4f46e5, #7c3aed); }
.planner-history-card--wedding::before    { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.planner-history-card--concert::before    { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.planner-history-card--conference::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.planner-history-card--social::before     { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.planner-history-card--exhibition::before { background: linear-gradient(90deg, #059669, #10b981); }
.planner-history-card--sports::before     { background: linear-gradient(90deg, #ea580c, #f97316); }
.planner-history-card--custom::before     { background: linear-gradient(90deg, #64748b, #94a3b8); }
.planner-history-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text);
}
.planner-history-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.planner-history-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.planner-history-stats {
    display: flex;
    gap: 0.75rem;
}
.planner-history-stat {
    background: color-mix(in srgb, var(--primary) 5%, var(--bg-card));
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}
.planner-history-stat-label {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.planner-history-stat-value {
    font-weight: 700;
    color: var(--text);
}

/* --- Empty State --- */
.planner-empty {
    text-align: center;
    padding: 4rem 2rem;
    animation: planner-fade-up 0.4s ease both;
}
.planner-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--bg-card)), color-mix(in srgb, var(--primary) 5%, var(--bg-card)));
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    animation: planner-float 3s ease-in-out infinite;
}
.planner-empty h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.planner-empty p {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* --- Action Bar (sticky floating) --- */
.planner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 64px;
    z-index: 20;
    animation: planner-fade-up 0.4s ease both;
}

/* --- Dashboard Grid --- */
.planner-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.planner-grid-1 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.planner-grid-1 > *,
.planner-grid-2 > * {
    min-width: 0;
}

/* --- Workspace Layout --- */
.planner-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 64px);
}

.planner-sidebar-col {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg-card);
    padding: 1rem;
    z-index: 10;
}

.planner-content-col {
    padding: 1.5rem;
    min-width: 0;
    overflow-x: hidden;
}

/* Sidebar internals */
.sidebar-budget-widget {
    padding: 0.75rem;
    background: color-mix(in srgb, var(--primary) 5%, var(--bg-card));
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.sidebar-budget-widget h4 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.budget-bar-container {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.budget-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

.budget-numbers {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.budget-numbers > div {
    display: flex;
    justify-content: space-between;
}

.budget-numbers .label { color: var(--text-muted); }
.budget-numbers .value { font-weight: 600; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 1rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.15s;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
}

.sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.sidebar-actions .btn {
    flex: 1;
    min-width: 70px;
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
}

.sidebar-undo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 2px;
}

.sidebar-save-status {
    text-align: center;
    padding: 0.25rem;
}

/* Section anchors */
[id^="section-"] {
    scroll-margin-top: 80px;
}

/* --- Responsive: Tablet (641px–1024px) --- */
@media (max-width: 1024px) {
    .planner-workspace {
        grid-template-columns: 1fr;
    }
    .planner-sidebar-col {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: auto;
        z-index: 100;
        border-right: none;
        border-top: 1px solid var(--border);
        padding: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .sidebar-nav,
    .sidebar-save-status { display: none; }
    .sidebar-budget-widget {
        flex: 1;
        margin-bottom: 0;
        padding: 0.4rem 0.6rem;
    }
    .sidebar-budget-widget h4 { display: none; }
    .budget-numbers { flex-direction: row; gap: 1rem; }
    .sidebar-actions { flex-wrap: nowrap; gap: 0.25rem; }
    .planner-content-col {
        padding: 1rem;
        padding-bottom: 80px; /* Space for bottom bar */
    }
    .planner-grid-2 {
        grid-template-columns: 1fr;
    }
    .planner-hero {
        padding: 1.5rem 1.75rem;
    }
    .planner-hero h2 {
        font-size: 1.35rem;
    }
    .planner-hero-stats {
        flex-wrap: wrap;
    }
    .planner-hero-stat {
        min-width: 110px;
        padding: 0.6rem 1rem;
    }
    .planner-wizard-body {
        padding: 1.5rem;
    }
    .planner-wizard-nav {
        padding: 0 1.5rem 1.5rem;
    }
    .planner-theme-card {
        min-width: 260px;
    }
    .planner-history-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .planner-donut-wrap {
        gap: 1.25rem;
    }
    .planner-donut {
        width: 130px;
        height: 130px;
    }
    .planner-donut-center {
        inset: 20px;
    }
}

/* --- Responsive: Small Tablet (641px–768px) --- */
@media (max-width: 768px) {
    .planner-hero {
        padding: 1.25rem 1.5rem;
        border-radius: 10px;
    }
    .planner-hero h2 {
        font-size: 1.25rem;
    }
    .planner-hero-sub {
        font-size: 0.85rem;
    }
    .planner-hero-stat {
        min-width: 100px;
        padding: 0.55rem 0.85rem;
    }
    .planner-section-body {
        padding: 1rem;
    }
    .planner-content-col {
        padding: 1.25rem;
    }
    .planner-food-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .planner-entertainment-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .planner-theme-card {
        min-width: 240px;
    }
    .planner-history-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    .planner-wizard-body {
        padding: 1.25rem;
    }
    .planner-wizard-nav {
        padding: 0 1.25rem 1.25rem;
    }
    .planner-donut-wrap {
        gap: 1rem;
    }
    .planner-donut {
        width: 120px;
        height: 120px;
    }
}

/* --- Responsive: Small Tablet / Large Phone (481px–640px) --- */
@media (max-width: 640px) {
    .planner-hero {
        padding: 1.25rem 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    .planner-hero h2 {
        font-size: 1.15rem;
    }
    .planner-hero-sub {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    .planner-hero-badge {
        font-size: 0.6rem;
        padding: 3px 10px;
    }
    .planner-hero-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    .planner-hero-stat {
        min-width: unset;
        padding: 0.5rem 0.75rem;
    }
    .planner-hero-stat-value {
        font-size: 0.95rem;
    }
    .planner-hero-status {
        position: static;
        margin-bottom: 0.75rem;
    }
    .planner-section-header {
        padding: 0.75rem 1rem;
    }
    .planner-section-body {
        padding: 0.75rem;
    }
    .planner-summary {
        padding: 1rem;
    }
    .summary-highlights {
        gap: 0.35rem;
    }
    .summary-highlight-chip {
        font-size: 0.72rem;
        padding: 0.25rem 0.55rem;
    }
    .summary-textarea {
        min-height: 90px;
        font-size: 0.82rem;
    }
    .planner-wizard-steps {
        flex-wrap: wrap;
    }
    .planner-wizard-step {
        padding: 0.75rem 0.5rem 0.6rem;
        min-width: 0;
    }
    .planner-wizard-step-num {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    .planner-wizard-step-label {
        font-size: 0.6rem;
        text-align: center;
    }
    .planner-wizard-body {
        padding: 1rem;
    }
    .planner-wizard-nav {
        padding: 0 1rem 1rem;
        gap: 0.5rem;
    }
    .planner-donut-wrap {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .planner-donut {
        width: 110px;
        height: 110px;
    }
    .planner-donut-center {
        inset: 20px;
    }
    .planner-donut-value {
        font-size: 0.85rem;
    }
    .planner-budget-row {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .planner-budget-name {
        min-width: 80px;
        font-size: 0.75rem;
    }
    .planner-budget-slider {
        min-width: 80px;
    }
    .planner-budget-pct {
        min-width: 2.5rem;
        font-size: 0.72rem;
    }
    .planner-budget-amt {
        min-width: 4rem;
        font-size: 0.68rem;
    }
    .planner-food-grid {
        grid-template-columns: 1fr;
    }
    .planner-entertainment-grid {
        grid-template-columns: 1fr 1fr;
    }
    .planner-theme-card {
        min-width: 230px;
    }
    .planner-history-grid {
        grid-template-columns: 1fr;
    }
    .planner-history-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .planner-actions {
        padding: 1rem;
        gap: 0.5rem;
    }
    .planner-suggestion {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .planner-suggestion-actions {
        align-self: flex-end;
    }
    .planner-loading-progress {
        width: 200px;
    }
    .planner-loading h3 {
        font-size: 1.1rem;
    }
    .planner-vendor-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* --- Responsive: Phone (320px–480px) --- */
@media (max-width: 480px) {
    .planner-hero {
        padding: 1rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    .planner-hero h2 {
        font-size: 1rem;
    }
    .planner-hero-sub {
        font-size: 0.75rem;
    }
    .planner-hero-stat-label {
        font-size: 0.7rem;
    }
    .planner-hero-stat-value {
        font-size: 0.85rem;
    }
    .planner-section {
        border-radius: 8px;
    }
    .planner-section-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
    .planner-section-title {
        font-size: 0.85rem;
    }
    .planner-section-subtitle {
        font-size: 0.7rem;
    }
    .planner-section-body {
        padding: 0.65rem;
    }
    .planner-wizard-steps {
        gap: 0;
    }
    .planner-wizard-step {
        padding: 0.6rem 0.25rem 0.5rem;
    }
    .planner-wizard-step-num {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    .planner-wizard-step-label {
        font-size: 0.7rem;
    }
    .planner-wizard-body {
        padding: 0.75rem;
    }
    .planner-wizard-nav {
        padding: 0 0.75rem 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    .planner-wizard-nav .btn {
        width: 100%;
        justify-content: center;
    }
    .planner-donut {
        width: 100px;
        height: 100px;
    }
    .planner-donut-center {
        inset: 18px;
    }
    .planner-donut-value {
        font-size: 0.75rem;
    }
    .planner-donut-label {
        font-size: 0.7rem;
    }
    .planner-entertainment-grid {
        grid-template-columns: 1fr;
    }
    .planner-theme-card {
        min-width: 200px;
    }
    .planner-theme-gradient {
        height: 60px;
    }
    .planner-timeline {
        padding-left: 1.5rem;
    }
    .planner-timeline-dot {
        left: -1.5rem;
    }
    .planner-timeline-item {
        padding: 0.5rem 0.75rem;
    }
    .planner-timeline-time {
        font-size: 0.78rem;
    }
    .planner-timeline-title {
        font-size: 0.8rem;
    }
    .planner-venue-score {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }
    .planner-loading {
        padding: 2.5rem 1rem;
    }
    .planner-loading-orb {
        width: 60px;
        height: 60px;
    }
    .planner-loading h3 {
        font-size: 1rem;
    }
    .planner-loading-msg {
        font-size: 0.8rem;
    }
    .planner-loading-progress {
        width: 160px;
    }
    .planner-loading-steps {
        gap: 0.5rem;
    }
    .planner-loading-step {
        font-size: 0.7rem;
    }
    .planner-empty {
        padding: 2rem 1rem;
    }
    .planner-empty-icon {
        width: 60px;
        height: 60px;
    }
    .planner-empty h3 {
        font-size: 1rem;
    }
    .planner-empty p {
        font-size: 0.85rem;
    }
    .planner-actions {
        padding: 0.75rem;
        flex-direction: column;
    }
    .planner-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .planner-history-name {
        font-size: 0.88rem;
    }
    .planner-history-meta {
        font-size: 0.7rem;
    }
    .planner-history-stat {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    /* Issue 3: Prevent history grid overflow on narrow screens */
    .planner-history-grid {
        grid-template-columns: 1fr;
    }
}

.planner-venue-group-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 0.5rem;
}

/* --- UX Polish: Loading skeletons --- */
.section-loading {
    padding: 1rem;
}
.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, var(--gray-200, #e2e8f0) 25%, var(--gray-100, #f1f5f9) 50%, var(--gray-200, #e2e8f0) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- UX Polish: Prefill badges --- */
.prefill-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    margin-left: 0.5rem;
}

/* --- UX Polish: Inspiration chips --- */
.chip-suggestion {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--bg-card);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.chip-suggestion:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- UX Polish: Preference tabs --- */
.pref-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.pref-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.8rem;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.pref-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- UX Polish: Vendor gap warning --- */
.vendor-gap-warning .card {
    background: color-mix(in srgb, var(--warning) 5%, var(--bg-card));
}

/* --- UX Polish: Sidebar scroll-spy active --- */
.sidebar-nav-item.active {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-left: 2px solid var(--primary);
}

/* --- UX Polish: Section collapse/expand toggle --- */
.section-header-toggle {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    border-radius: var(--radius, 8px) var(--radius, 8px) 0 0;
}
.section-header-toggle:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .planner-hero-stat,
    .planner-section,
    .planner-summary,
    .planner-suggestion,
    .planner-timeline-item,
    .planner-history-card,
    .planner-empty,
    .planner-empty-icon,
    .planner-actions,
    .planner-wizard,
    .planner-loading,
    .planner-loading-orb,
    .planner-loading-step--active .planner-loading-step-dot,
    .planner-loading-progress-bar,
    .skeleton-line,
    .planner-donut,
    .planner-theme-card,
    .planner-food-card,
    .planner-entertainment-card,
    .planner-venue-card,
    .planner-vendor-item,
    .planner-logistics-item,
    .planner-color-swatch,
    .planner-budget-slider,
    .planner-budget-slider::-webkit-slider-thumb,
    .planner-wizard-step,
    .planner-wizard-step-num,
    .planner-wizard-progress {
        animation: none !important;
        transition: none !important;
    }
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {
    :root:not(.theme-light) {
        --planner-color-budget:       #818cf8;
        --planner-color-venue:        #34d399;
        --planner-color-vendor:       #fbbf24;
        --planner-color-theme:        #f472b6;
        --planner-color-food:         #fb923c;
        --planner-color-entertainment:#a78bfa;
        --planner-color-timeline:     #38bdf8;
        --planner-color-logistics:    #94a3b8;
    }

    :root:not(.theme-light) .planner-hero {
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
    }

    :root:not(.theme-light) .planner-hero h2 {
        color: #fcd34d;
    }

    :root:not(.theme-light) .planner-section {
        background: var(--bg-card);
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-section-header {
        background: var(--bg-card);
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-section-title {
        color: var(--text);
    }

    :root:not(.theme-light) .planner-section-subtitle {
        color: var(--text-muted);
    }

    :root:not(.theme-light) .summary-highlight-chip {
        background: color-mix(in srgb, var(--bg-secondary) 80%, transparent);
        border-color: var(--border);
    }
    :root:not(.theme-light) .summary-textarea {
        background: var(--bg-secondary);
        border-color: var(--border);
        color: var(--text);
    }

    :root:not(.theme-light) .planner-suggestion {
        background: linear-gradient(135deg, #3d2800 0%, #2d1f00 100%);
        border-color: #78600a;
    }

    :root:not(.theme-light) .planner-suggestion-text {
        color: #fcd34d;
    }

    :root:not(.theme-light) .planner-tips-box {
        background: linear-gradient(135deg, #0d3117 0%, #052e16 100%);
        border-color: #166534;
        color: #86efac;
    }

    :root:not(.theme-light) .planner-venue-card {
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-venue-card--top {
        background: color-mix(in srgb, var(--primary) 8%, var(--bg-card));
    }

    :root:not(.theme-light) .planner-venue-card--top::after {
        background: var(--primary);
    }

    :root:not(.theme-light) .planner-theme-card {
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-theme-name {
        color: var(--text);
    }

    :root:not(.theme-light) .planner-theme-desc {
        color: var(--text-muted);
    }

    :root:not(.theme-light) .planner-timeline-item {
        background: var(--bg-card);
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-food-card {
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-food-card ul {
        color: var(--text);
    }

    :root:not(.theme-light) .planner-entertainment-card {
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-vendor-item {
        border-color: color-mix(in srgb, var(--border) 50%, transparent);
    }

    :root:not(.theme-light) .planner-history-card {
        background: var(--bg-card);
        border-color: var(--border);
    }

    :root:not(.theme-light) .planner-wizard-steps {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    :root:not(.theme-light) .planner-loading-orb {
        box-shadow: 0 8px 30px rgba(99,102,241,0.3);
    }

    :root:not(.theme-light) .planner-budget-name {
        color: var(--text);
    }

    :root:not(.theme-light) .planner-budget-amt {
        color: var(--text-muted);
    }

    :root:not(.theme-light) .planner-donut-center {
        background: var(--bg-card);
    }

    :root:not(.theme-light) .planner-donut-value {
        color: var(--text);
    }

    :root:not(.theme-light) .planner-budget-slider::-moz-range-track {
        background: color-mix(in srgb, var(--primary) 15%, var(--bg-card));
    }

    :root:not(.theme-light) .planner-sidebar-col {
        background: var(--bg-card);
        border-color: var(--border);
    }
}
