/* ── Reset & Variables ─────────────────────────────────────────────────── */
:root {
    --primary:       hsl(240, 10%, 4%);   /* Pitch Black */
    --primary-hover: hsl(240, 10%, 18%);
    --accent:        hsl(22, 55%, 52%);   /* Brushed Copper */
    --accent-hover:  hsl(22, 55%, 42%);
    --bg-color:      hsl(210, 15%, 98%);  /* Ice White */
    --surface:       #ffffff;
    --text-main:     hsl(240, 10%, 4%);
    --text-muted:    hsl(240, 5%, 45%);
    --border-color:  hsl(240, 8%, 90%);
    --radius:        12px;               /* Sleek modern rounded corners */
    --shadow-sm:     0 2px 4px rgba(8, 8, 10, 0.04);
    --shadow:        0 4px 12px rgba(8, 8, 10, 0.05);
    --shadow-lg:     0 12px 30px rgba(8, 8, 10, 0.07);
    --nav-height:    60px;               /* Slightly taller for premium feel */
    --font-heading:  'Montserrat', sans-serif;
}

.dark-theme {
    --primary:       hsl(22, 60%, 65%);   /* Brushed Copper Glow */
    --primary-hover: hsl(22, 60%, 75%);
    --accent:        hsl(210, 15%, 90%);  /* Ice Accent */
    --accent-hover:  hsl(210, 15%, 100%);
    --bg-color:      hsl(240, 12%, 5%);   /* Deep Pitch Black */
    --surface:       hsl(240, 10%, 11%);  /* Dark Slate Panel */
    --text-main:     hsl(210, 15%, 95%);  /* Warm Lily Text */
    --text-muted:    hsl(240, 8%, 70%);
    --border-color:  hsl(240, 8%, 18%);
    --shadow-sm:     0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow:        0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg:     0 12px 30px rgba(0, 0, 0, 0.5);
}


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

body {
    font-family: 'Spectral', serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

a { text-decoration: none; color: var(--text-main); }
a:hover { color: var(--text-muted); }

/* ── Focus visible ────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* ── Top Nav ──────────────────────────────────────────────────────────── */
/* ── Top Nav ──────────────────────────────────────────────────────────── */
.app-nav {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 200;
}

.app-nav-brand {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.app-nav-tabs {
    display: flex;
    gap: 0;
    background: color-mix(in srgb, var(--text-main) 4%, transparent);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3px;
    height: 38px;
    flex-shrink: 0;
    align-items: center;
}

.nav-tab {
    padding: 0 1.25rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: calc(var(--radius) - 3px);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    outline: none;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-tab:hover { color: var(--text-main); }

.nav-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

/* ── Lang Dropdown ────────────────────────────────────────────────────── */
.lang-dropdown {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.lang-dropdown-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    color: var(--text-main);
}

.lang-dropdown-btn::after { content: '▼'; font-size: 0.55rem; color: var(--text-muted); margin-left: 0.1rem; }
.lang-dropdown-btn:hover  { background: #f8f9fa; border-color: var(--text-muted); }

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    display: none;
    min-width: 130px;
}

.lang-dropdown-menu.open { display: block; }

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-main);
}

.lang-option:hover  { background: color-mix(in srgb, var(--text-main) 8%, transparent); }
.lang-option.active { background: color-mix(in srgb, var(--text-main) 12%, transparent); font-weight: 600; }

/* ── Nav Action Buttons ──────────────────────────────────────────────── */
.nav-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.nav-action-btn {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: transparent;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.nav-action-btn:hover { background: color-mix(in srgb, var(--text-main) 8%, transparent); border-color: var(--text-muted); }
.nav-action-btn.danger-btn { color: #dc3545; }
.nav-action-btn.danger-btn:hover { background: #dc3545; color: white; border-color: #dc3545; }

/* ── App Views ────────────────────────────────────────────────────────── */
.app-views {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.app-view {
    display: none;
    height: 100%;
}

.app-view--active { display: flex; flex-direction: column; }

/* Views that hold a sidebar+preview layout */
.app-view > main {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    padding: 1.5rem;
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.sidebar {
    width: 400px;
    max-width: 100%;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
}

@media (max-width: 1024px) { .sidebar { width: 340px; } }

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-header {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Control Groups ───────────────────────────────────────────────────── */
details.control-group summary {
    list-style: none;
    cursor: pointer;
}
details.control-group summary::-webkit-details-marker { display: none; }

.control-group h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.control-group h2::before {
    content: '▼';
    font-size: 0.7em;
    transition: transform 0.2s;
    color: var(--text-muted);
    width: 1em;
    text-align: center;
    transform: rotate(-90deg);
}

details.control-group[open] summary h2::before { transform: rotate(0deg); }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.75rem;
    background: color-mix(in srgb, var(--text-main) 4%, transparent);
    padding: 3px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    height: 34px;
}

.tab-btn {
    flex: 1;
    padding: 0;
    padding-top: 4px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.18s ease;
    outline: none;
}

.tab-btn:hover { color: var(--text-main); }
.tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

/* ── Inputs ───────────────────────────────────────────────────────────── */
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    resize: vertical;
    font-family: 'Spectral', serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    background: color-mix(in srgb, var(--text-main) 3%, var(--surface));
    user-select: text;
    -webkit-user-select: text;
}

textarea:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.input-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.input-row:last-child { margin-bottom: 0; }

.input-col {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

select,
input[type="number"],
input[type="text"],
input[type="search"] {
    width: 100%;
    padding: 0 0.5rem;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    background: var(--surface);
    transition: all 0.2s;
    color: var(--text-main);
    user-select: text;
    -webkit-user-select: text;
}

select { padding-left: 0.25rem; }

select:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="search"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.color-input-wrapper {
    position: relative;
    width: 100%;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

input[type="color"] {
    position: absolute;
    top: -10px; left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    cursor: pointer;
    border: none;
    padding: 0;
}

/* ── Custom Font Select ───────────────────────────────────────────────── */
.custom-select-wrapper { position: relative; width: 100%; }

.custom-select-display {
    width: 100%;
    padding: 0 0.5rem;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    user-select: none;
}

.custom-select-display:hover { border-color: var(--text-muted); }
.custom-select-display::after { content: '▼'; font-size: 0.7em; color: var(--text-muted); margin-left: auto; }

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 4px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.custom-select-options.open { display: block; }

.custom-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-option:hover    { background: color-mix(in srgb, var(--text-main) 8%, transparent); }
.custom-option.selected { background: color-mix(in srgb, var(--text-main) 12%, transparent); color: var(--primary); }

/* ── Style Toggle ─────────────────────────────────────────────────────── */
.style-toggle {
    display: flex;
    gap: 0;
    background: color-mix(in srgb, var(--text-main) 4%, transparent);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3px;
    height: 34px;
}

.style-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.18s ease;
    outline: none;
}

.style-btn:last-child { font-style: italic; }
.style-btn:hover:not(:disabled) { color: var(--text-main); }
.style-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); border-color: var(--border-color); }
.style-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Weight Slider ────────────────────────────────────────────────────── */
.weight-slider-wrapper {
    display: flex;
    align-items: center;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0 0.5rem;
    background: var(--surface);
}

.weight-slider-wrapper input[type="range"] {
    flex: 1;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    accent-color: var(--primary);
    cursor: pointer;
    min-width: 0;
}

.weight-slider-wrapper input[type="range"]:focus { outline: none; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.primary-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Spectral', serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover  { background: var(--primary-hover); }
.primary-btn:active { transform: translateY(1px); }

.secondary-btn {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Spectral', serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.secondary-btn:hover { background: color-mix(in srgb, var(--text-main) 8%, transparent); border-color: var(--text-muted); }

.secondary-btn.danger-btn { color: #dc3545; }
.secondary-btn.danger-btn:hover { background: #dc3545; color: white; border-color: #dc3545; }

.secondary-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.full-width-btn { width: 100%; flex: none; text-align: center; }

.image-upload-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.image-upload-controls .secondary-btn {
    padding: 0.25rem 0.5rem;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ── Utilities ────────────────────────────────────────────────────────── */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.data-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── Preview Area (shared) ────────────────────────────────────────────── */
.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    min-width: 0;
    min-height: 0;
}

.preview-header {
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
    flex-shrink: 0;
}

.preview-header h2 { font-size: 1.25rem; font-weight: 600; }

.preview-stats {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    background: color-mix(in srgb, var(--text-main) 8%, transparent);
    padding: 0.4rem 1rem;
    border-radius: 99px;
}

.rsvp-count-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ── RSVP Filter ──────────────────────────────────────────────────────── */
.rsvp-filter-row,
.filter-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.15rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.55rem;
    border-radius: 99px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    line-height: 1.4;
}

.filter-pill:hover {
    border-color: #aaa;
    color: var(--text-main);
}

.filter-pill--on {
    border-color: var(--pill-color, var(--primary));
    background: color-mix(in srgb, var(--pill-color, var(--primary)) 12%, transparent);
    color: var(--text-main);
}

.filter-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.rsvp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .app-view > main {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .sidebar {
        width: 100% !important;
        max-height: 50vh;
    }

    .sidebar-content {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .preview-area {
        min-height: 40vh;
    }

    .preview-header {
        padding: 0.75rem 1rem;
    }

    .preview-header h2 {
        font-size: 1rem;
    }

    .preview-stats {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .app-nav {
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    .app-nav-tabs {
        gap: 0;
        height: 30px;
    }

    .nav-tab {
        padding: 0 0.5rem;
        font-size: 0.7rem;
    }

    .app-nav-brand {
        font-size: 0.85rem;
    }

    .gm-list-body {
        padding: 0.75rem 1rem;
    }

    .preview-container {
        padding: 1rem;
    }

    .control-group h2 {
        font-size: 0.9rem;
    }
}

/* ── Print ────────────────────────────────────────────────────────────── */
.print-only { display: none; }

@media print {
    body {
        background: none;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }
    .no-print { display: none !important; }

    .print-only[data-active-print="1"] {
        display: block !important;
        position: absolute;
        left: 0; top: 0;
        width: 100%;
        background: white;
    }

    /* Ensure app-views don't interfere in print */
    .app-views { display: none !important; }
}

/* ── Custom Scrollbars ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Theme Toggle Button ──────────────────────────────────────────────── */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: color-mix(in srgb, var(--text-main) 4%, transparent);
    border-color: var(--text-muted);
}

.dark-theme .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .sun-icon { display: none !important; }
.dark-theme .moon-icon { display: block !important; }

/* ── Support & Sponsor Links ─────────────────────────────────────────── */
.support-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.support-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sponsor-btn {
    background: rgba(224, 49, 114, 0.1);
    color: #e03172;
    border: 1px solid rgba(224, 49, 114, 0.2);
}

.sponsor-btn:hover {
    background: #e03172;
    color: white !important;
    border-color: #e03172;
    box-shadow: 0 4px 12px rgba(224, 49, 114, 0.35);
    transform: translateY(-1.5px);
}

.coffee-btn {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.coffee-btn:hover {
    background: #d97706;
    color: white !important;
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
    transform: translateY(-1.5px);
}

/* ── Custom Toasts ────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
    max-width: 340px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.toast-item {
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: auto;
    animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0s, 4.2s;
    border-left: 5px solid var(--primary);
}

.toast-item.success {
    border-left-color: #10b981;
}

.toast-item.info {
    border-left-color: var(--primary);
}

.toast-item.warning {
    border-left-color: var(--accent);
}

.toast-item.error {
    border-left-color: #ef4444;
}

.toast-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--text-muted);
    padding: 0;
    margin-left: auto;
}

.toast-close-btn:hover {
    color: var(--text-main);
}

@keyframes slideIn {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        transform: translateY(-10px) scale(0.95);
        opacity: 0;
    }
}

/* ── Custom Confirmation Modal ─────────────────────────────────────────── */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 25, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.confirm-modal {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal h3 {
    font-family: var(--font-heading), 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.confirm-modal p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Hide labels on small screens to keep top nav clean */
@media (max-width: 900px) {
    .support-btn .support-text {
        display: none;
    }
    .support-btn {
        padding: 0.3rem;
        width: 32px;
        height: 32px;
        justify-content: center;
    }
}

/* Visually hidden for screen readers (SEO) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Premium Legal Footer ─────────────────────────────────────────────── */
.app-footer {
    height: 40px;
    border-top: 1px solid var(--border-color);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.app-footer-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-footer-links a {
    color: var(--text-muted);
    transition: color 0.15s;
    font-weight: 600;
}

.app-footer-links a:hover {
    color: var(--primary);
}

.footer-separator {
    color: var(--border-color);
    user-select: none;
}

@media (max-width: 768px) {
    .app-footer {
        height: auto;
        padding: 0.75rem 1rem;
    }
    .app-footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .app-footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
