/* Custom theme styles. Bootstrap is loaded from CDN in Blade layouts. */

:root {
    --wine: #7a1f32;
    --wine-dark: #4a1020;
    --gold: #c9a24a;
    --gold-soft: #e8d5a3;
    --cream: #fbf7f0;
    --ink: #2c1810;
    --muted: #7a6a60;
    --sidebar: #2b1218;
    --card-radius: 1.25rem;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--ink);
    background: var(--cream);
}

.font-serif, h1, h2, h3, .brand-script {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

a { color: var(--wine); }
a:hover { color: var(--wine-dark); }

.btn-wine {
    background: var(--wine);
    border-color: var(--wine);
    color: #fff;
}
.btn-wine:hover { background: var(--wine-dark); color: #fff; }

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--wine-dark);
    font-weight: 600;
}
.btn-gold:hover { background: #b48d35; color: var(--wine-dark); }

.btn-outline-wine {
    border-color: var(--wine);
    color: var(--wine);
}
.btn-outline-wine:hover { background: var(--wine); color: #fff; }

.text-wine { color: var(--wine) !important; }
.text-gold { color: var(--gold) !important; }
.bg-wine { background: var(--wine) !important; }
.bg-cream { background: var(--cream) !important; }

.section-kicker {
    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: .72rem;
    color: var(--gold);
    font-weight: 600;
}

/* Marketing */
.marketing-nav {
    background: rgba(251, 247, 240, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 162, 74, .25);
}
.brand-mark {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gold);
    display: grid;
    place-items: center;
    color: var(--wine);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

.hero {
    min-height: 92vh;
    background:
        linear-gradient(120deg, rgba(74, 16, 32, .82), rgba(122, 31, 50, .45)),
        url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1800&q=80') center/cover;
    color: #fff;
    position: relative;
}
.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--cream));
}
.hero-frame {
    border: 1px solid rgba(232, 213, 163, .45);
    padding: 2.5rem;
    background: rgba(43, 18, 24, .28);
    backdrop-filter: blur(6px);
}
.hero h1 { font-size: clamp(3rem, 8vw, 6.2rem); line-height: .9; font-weight: 500; }

.ornament {
    width: 72px;
    height: 1px;
    background: var(--gold);
    position: relative;
    display: inline-block;
}
.ornament::before, .ornament::after {
    content: '◆';
    color: var(--gold);
    font-size: 8px;
    position: absolute;
    top: -7px;
}
.ornament::before { left: -14px; }
.ornament::after { right: -14px; }

.feature-card, .plan-card, .soft-card {
    background: #fff;
    border: 1px solid rgba(201, 162, 74, .18);
    border-radius: var(--card-radius);
    box-shadow: 0 18px 40px rgba(74, 16, 32, .06);
}

.plan-card.featured {
    border-color: var(--gold);
    transform: translateY(-8px);
}
.plan-card .price { font-size: 2.1rem; }

.step-num {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--wine);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
}

.marketing-footer {
    background: var(--wine-dark);
    color: #f4e7d8;
}

/* App shell */
.app-shell { min-height: 100vh; }
.app-sidebar {
    width: 260px;
    background: var(--sidebar);
    color: #f6ebe3;
    min-height: 100vh;
    z-index: 1030;
}
@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .app-main {
        margin-left: 260px;
        width: calc(100% - 260px);
        min-height: 100vh;
    }
}
.app-sidebar a {
    color: rgba(246, 235, 227, .78);
    text-decoration: none;
    border-radius: .7rem;
    padding: .65rem .9rem;
    display: flex;
    gap: .7rem;
    align-items: center;
}
.app-sidebar a:hover, .app-sidebar a.active {
    background: rgba(201, 162, 74, .16);
    color: #fff;
}
.app-sidebar .nav-section {
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(232, 213, 163, .72);
    padding: .9rem .9rem .2rem;
}
.app-sidebar .sidebar-group summary.nav-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    cursor: pointer;
    list-style: none;
    padding: .75rem .9rem;
    border-radius: .7rem;
    user-select: none;
}
.app-sidebar .sidebar-group summary.nav-section::-webkit-details-marker {
    display: none;
}
.app-sidebar .sidebar-group summary.nav-section::marker {
    content: '';
}
.app-sidebar .sidebar-group summary.nav-section:hover {
    background: rgba(201, 162, 74, .1);
    color: #e8d5a3;
}
.app-sidebar .sidebar-group summary .bi-chevron-down {
    font-size: .85rem;
    transition: transform .2s ease;
}
.app-sidebar .sidebar-group[open] summary .bi-chevron-down {
    transform: rotate(180deg);
}
.app-sidebar .sidebar-group-items {
    display: grid;
    gap: .15rem;
}
.app-main { background: #f6efe6; min-height: 100vh; }
.app-topbar {
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 162, 74, .15);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.app-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(201, 162, 74, .35);
    border-radius: .65rem;
    background: #fff;
    color: var(--wine-dark, #2b1218);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    z-index: 1025;
}
.app-menu-toggle:hover {
    background: rgba(201, 162, 74, .12);
    color: var(--wine-dark, #2b1218);
}
.app-menu-toggle .bi {
    font-size: 1.35rem;
    pointer-events: none;
}
.app-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: .5rem;
    background: transparent;
    color: rgba(246, 235, 227, .85);
    flex-shrink: 0;
    cursor: pointer;
}
.app-sidebar-close:hover {
    background: rgba(201, 162, 74, .16);
    color: #fff;
}
.app-sidebar-header a {
    text-decoration: none;
}
.app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 14, .5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}
.app-sidebar-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.app-sidebar-backdrop[hidden] {
    display: none !important;
}
body.sidebar-open {
    overflow: hidden;
}

.stat-tile {
    background: #fff;
    border-radius: 1.1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(201, 162, 74, .14);
}
.stat-tile .label { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.stat-tile .value { font-size: 1.8rem; font-family: 'Cormorant Garamond', serif; }

.impersonate-banner {
    background: var(--gold);
    color: var(--wine-dark);
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: .8rem;
    border-color: #eadfcf;
    padding: .7rem .9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(201, 162, 74, .18);
}

.password-field {
    position: relative;
}
.password-field .form-control {
    padding-right: 2.8rem;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: .55rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    padding: 0;
}
.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--wine);
    background: rgba(122, 31, 50, .06);
}

.table thead th { color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.badge-soft { background: #f4e7d8; color: var(--wine); }

.template-option {
    border: 2px solid #eadfcf;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    height: 100%;
}
.template-option.selected { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201, 162, 74, .18); }
.template-option.is-locked { opacity: .55; cursor: not-allowed; }
.template-preview {
    height: 168px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}
.template-preview-inner {
    position: relative;
    z-index: 2;
    width: 100%;
}
.template-preview-floral {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    background-repeat: no-repeat;
    background-size: contain;
}
.template-preview-floral--top {
    top: -4%;
    right: -6%;
    width: 55%;
    height: 55%;
    background-position: top right;
}
.template-preview-floral--bottom {
    bottom: -6%;
    left: -8%;
    width: 50%;
    height: 50%;
    background-position: bottom left;
}
.template-preview.classic .template-preview-floral--top {
    background-image: url('/images/cards/floral-rose-top-right.svg');
}
.template-preview.classic .template-preview-floral--bottom {
    background-image: url('/images/cards/floral-rose-bottom-left.svg');
}
.template-preview.garden .template-preview-floral--top {
    background-image: url('/images/cards/floral-garden-top.svg');
    width: 92%;
    height: 42%;
    top: 0;
    right: 4%;
    left: 4%;
    background-position: top center;
    background-size: 100% auto;
}
.template-preview.garden .template-preview-floral--bottom {
    background-image: url('/images/cards/floral-rose-bottom-left.svg');
}
.template-preview.royal .template-preview-floral--top {
    background-image: url('/images/cards/floral-boho-top-right.svg');
}
.template-preview.royal .template-preview-floral--bottom {
    background-image: url('/images/cards/floral-boho-bottom-left.svg');
}
.template-preview.modern .template-preview-floral--top {
    background-image: url('/images/cards/floral-rose-top-right.svg');
    opacity: 0.35;
}
.template-preview.modern .template-preview-floral--bottom {
    background-image: url('/images/cards/floral-rose-bottom-left.svg');
    opacity: 0.3;
}
.template-preview .mini-kicker {
    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: .58rem;
    margin-bottom: .35rem;
}
.template-preview .mini-names {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: .35rem;
}
.template-preview .mini-meta { font-size: .72rem; opacity: .75; }
.template-preview.classic {
    background: linear-gradient(145deg, #fffdf8, #f3e8d4);
    color: #3a2718;
    font-family: 'Cormorant Garamond', serif;
    border: 2px solid #d4af37;
    box-shadow: inset 0 0 0 2px #fffdf8, inset 0 0 0 3px #d4af37;
}
.template-preview.classic::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(212, 175, 55, 0.4) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.12;
    pointer-events: none;
}
.template-preview.classic .mini-names {
    font-family: 'Great Vibes', cursive;
    font-size: 1.45rem;
    border: none;
    padding: 0;
}
.template-preview.classic .mini-kicker { color: #8b7355; }
.template-preview.garden {
    background: linear-gradient(180deg, #fffaf5, #f0e6da);
    color: #4a3c35;
    border: 2px solid #d4af37;
    box-shadow: inset 0 0 0 2px #fffaf5, inset 0 0 0 3px rgba(212, 175, 55, 0.45);
}
.template-preview.garden .mini-names {
    font-family: 'Great Vibes', cursive;
    font-size: 1.55rem;
}
.template-preview.garden .mini-names span { color: #c9a24a; }
.template-preview.royal {
    background: #f5f2e8;
    color: #633928;
    border-radius: 40px 40px 8px 8px;
    border: 2px solid #c9a24a;
    box-shadow: inset 0 0 0 2px #f5f2e8, inset 0 0 0 3px rgba(201, 162, 74, 0.35);
}
.template-preview.royal .mini-names {
    font-family: 'Great Vibes', cursive;
    font-size: 1.5rem;
}
.template-preview.royal .mini-kicker { color: #8b6b4f; letter-spacing: .1em; }
.template-preview.modern {
    background: #fff;
    color: #222;
    border: 2px solid #d4af37;
    font-family: 'Playfair Display', serif;
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(212, 175, 55, 0.4);
}
.template-preview.modern .mini-kicker { letter-spacing: .28em; color: #888; }
.template-preview.modern .mini-names { letter-spacing: -.02em; }
.template-preview.custom {
    background:
        linear-gradient(160deg, rgba(75,44,32,.55), rgba(201,162,74,.25)),
        repeating-linear-gradient(45deg, #f5efe6 0 8px, #efe6d8 8px 16px);
    color: #fff;
    border: 2px dashed #c9a24a;
}
.template-preview.custom .mini-kicker { color: #f0d9a0; letter-spacing: .16em; }
.template-preview.custom .mini-names {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.auth-hero {
    min-height: 100vh;
    background:
        linear-gradient(160deg, rgba(74,16,32,.78), rgba(201,162,74,.35)),
        url('https://images.unsplash.com/photo-1465495976277-4387d4b0b4c6?auto=format&fit=crop&w=1600&q=80') center/cover;
}

.scanner-window-wrap {
    position: relative;
    margin-bottom: 1rem;
}
.scanner-window {
    min-height: 280px;
    background: #1a0b10;
    border-radius: 1rem;
    overflow: hidden;
}
.scanner-flash {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}
.scanner-flash.is-show {
    opacity: 1;
}
.scanner-flash.is-ok {
    background: rgba(22, 163, 74, .82);
}
.scanner-flash.is-used,
.scanner-flash.is-bad {
    background: rgba(220, 38, 38, .82);
}
.scanner-flash i {
    font-size: 5rem;
    color: #fff;
    line-height: 1;
}
.scanner-result {
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    font-size: 1.05rem;
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}
.scanner-result-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.scanner-result-body {
    flex: 1;
    min-width: 0;
}
.scanner-result.is-ok { background: #e7f6ea; color: #14532d; }
.scanner-result.is-ok .scanner-result-icon { color: #16a34a; }
.scanner-result.is-used { background: #fde8e8; color: #7a1f32; }
.scanner-result.is-used .scanner-result-icon { color: #dc2626; }
.scanner-result.is-bad { background: #fde8e8; color: #7a1f32; }
.scanner-result.is-bad .scanner-result-icon { color: #dc2626; }

.send-channel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}
.send-channel-option {
    display: block;
    margin: 0;
}
.send-channel-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.send-channel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    min-height: 92px;
    padding: .75rem .5rem;
    border: 2px solid #eadfcf;
    border-radius: .9rem;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.send-channel-card i {
    font-size: 1.35rem;
    color: var(--wine);
}
.send-channel-card strong {
    font-size: .92rem;
}
.send-channel-card small {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.3;
}
.send-channel-option input:checked + .send-channel-card {
    border-color: var(--gold);
    background: #fffaf0;
    box-shadow: 0 0 0 .15rem rgba(201, 162, 74, .18);
}
.send-channel-option input:focus-visible + .send-channel-card {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.app-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    pointer-events: none;
    background: rgba(201, 162, 74, .15);
}
.app-progress[hidden] {
    display: none !important;
}
.app-progress-bar {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, var(--wine), var(--gold), var(--wine));
    animation: app-progress-slide 1.1s ease-in-out infinite;
}
@keyframes app-progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}
.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: .85;
}
.btn.is-loading .btn-label {
    visibility: hidden;
}
.btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: app-btn-spin .65s linear infinite;
}
@keyframes app-btn-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .app-menu-toggle,
    .app-sidebar-close {
        display: flex !important;
    }
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(260px, 85vw);
        min-height: 100vh;
        height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-105%);
        transition: transform .25s ease;
        z-index: 1050;
        -webkit-overflow-scrolling: touch;
    }
    .app-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 28px rgba(0, 0, 0, .28);
    }
    .app-main {
        margin-left: 0;
        width: 100%;
    }
    .send-channel-grid {
        grid-template-columns: 1fr;
    }
}
