/* Decora AI — shared design system (public site + dashboard) */

:root {
    --bg-void: #06060a;
    --bg-base: #0a0b12;
    --bg-raised: #10121c;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-strong: rgba(255, 255, 255, 0.07);
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text-primary: #f5f6fb;
    --text-secondary: #a7acc4;
    --text-muted: #6b7094;

    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    --gradient-glow:
        radial-gradient(
            circle at 30% 20%,
            rgba(139, 92, 246, 0.25),
            transparent 55%
        ),
        radial-gradient(
            circle at 80% 0%,
            rgba(59, 130, 246, 0.18),
            transparent 45%
        );

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-glow: 0 8px 40px rgba(124, 58, 237, 0.18);
    --font-sans:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    --font-display: "Sora", var(--font-sans);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    font-family: var(--font-sans);
    background: var(--bg-void);
    background-image: var(--gradient-glow);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
button {
    font-family: inherit;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
p {
    margin: 0 0 1em;
    color: var(--text-secondary);
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 17px;
}
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.text-muted {
    color: var(--text-muted);
}
.text-center {
    text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
    white-space: nowrap;
}
.btn:active {
    transform: translateY(1px);
}
.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.btn-primary:hover::before {
    transform: translateX(100%);
}
.btn-primary:hover {
    box-shadow: 0 14px 50px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px) scale(1.015);
}
/* Idle "breathing glow" for a page's single primary CTA (hero only —
   applying this everywhere would be visual noise, not premium polish). */
.btn-cta-pulse {
    animation: cta-pulse 2.8s ease-in-out infinite;
}
@keyframes cta-pulse {
    0%,
    100% {
        box-shadow: var(--shadow-glow);
    }
    50% {
        box-shadow: 0 8px 46px rgba(124, 58, 237, 0.55);
    }
}
@media (prefers-reduced-motion: reduce) {
    .btn-cta-pulse {
        animation: none;
    }
}
.btn-ghost {
    background: var(--bg-glass);
    color: var(--text-primary);
    border-color: var(--border-soft);
}
.btn-ghost:hover {
    border-color: var(--border-strong);
    background: var(--bg-glass-strong);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn-outline:hover {
    background: var(--bg-glass);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}
.btn-block {
    width: 100%;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- Glass cards ---------- */
.card {
    background: var(--bg-glass);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 32px;
}
.card-hover {
    transition:
        transform 0.3s var(--ease-out),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: var(--bg-glass-strong);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.card-sm {
    padding: 20px;
    border-radius: var(--radius-md);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered reveal within a grid — each successive card/tile reveals
   slightly after the last, without any JS changes (pure CSS nth-child delay). */
.grid > [data-reveal]:nth-child(1) {
    transition-delay: 0ms;
}
.grid > [data-reveal]:nth-child(2) {
    transition-delay: 80ms;
}
.grid > [data-reveal]:nth-child(3) {
    transition-delay: 160ms;
}
.grid > [data-reveal]:nth-child(4) {
    transition-delay: 240ms;
}
.grid > [data-reveal]:nth-child(5) {
    transition-delay: 320ms;
}
.grid > [data-reveal]:nth-child(6) {
    transition-delay: 400ms;
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero::before,
    .hero::after {
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-soft);
    transition: box-shadow 0.2s ease;
}
/* Kept as a sibling layer (not a property on .navbar itself) because
   backdrop-filter establishes a new containing block for position:fixed
   descendants — with it on .navbar, the mobile menu's fixed panel/overlay
   would be pinned to .navbar's own small box instead of the viewport. */
.navbar-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(6, 6, 10, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.navbar--scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.navbar-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
    max-width: 1180px;
    margin: 0 auto;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    font-family: var(--font-display);
    flex-shrink: 0;
}
.navbar-brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.8);
}
.brand-logo {
    height: 34px;
    width: auto;
    display: block;
}
.site-footer .brand-logo {
    height: 30px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}
.navbar-links a {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.15s;
}
.navbar-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}
.navbar-links a:hover,
.navbar-links a.active {
    color: var(--text-primary);
}
.navbar-links a:hover::after,
.navbar-links a.active::after {
    transform: scaleX(1);
}
.navbar-close {
    display: none;
}

.navbar-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.navbar-cta--mobile {
    display: none;
}
.navbar-overlay {
    display: none;
}

.navbar-toggle {
    display: none;
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 210;
}
.navbar-toggle-bar {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
}
.navbar-toggle[aria-expanded="true"] .navbar-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.navbar-toggle[aria-expanded="true"] .navbar-toggle-bar:nth-child(2) {
    opacity: 0;
}
.navbar-toggle[aria-expanded="true"] .navbar-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 992px) {
    .navbar-links {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(320px, 86vw);
        height: 100vh;
        background: var(--bg-base);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 90px 28px 32px;
        gap: 2px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border-soft);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
        z-index: 205;
    }
    .navbar-links.open {
        transform: translateX(0);
    }
    .navbar-links a {
        padding: 13px 4px;
        font-size: 1.02rem;
        border-bottom: 1px solid var(--border-soft);
    }
    .navbar-links a::after {
        display: none;
    }
    .navbar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 20px;
        right: 24px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--bg-glass);
        border: 1px solid var(--border-soft);
        color: var(--text-primary);
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
    }
    .navbar-cta--mobile {
        display: flex;
        flex-direction: column;
        margin-top: 20px;
    }
    .navbar-cta--mobile .btn {
        width: 100%;
    }
    .navbar-cta--desktop {
        display: none;
    }
    .navbar-toggle {
        display: flex;
    }
    .navbar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(4, 4, 8, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 204;
    }
    .navbar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
}

html.nav-open,
body.nav-open {
    overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 60px 0 30px;
    margin-top: 90px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}
.footer-grid h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.footer-grid a {
    display: block;
    color: var(--text-secondary);
    padding: 6px 0;
    font-size: 0.92rem;
}
.footer-grid a:hover {
    color: var(--text-primary);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 12px;
}
@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 120px 0 96px;
    text-align: center;
    overflow: hidden;
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    animation: blob-float 16s ease-in-out infinite;
    pointer-events: none;
}
.hero::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(
        circle,
        rgba(139, 92, 246, 0.55),
        transparent 70%
    );
    top: -140px;
    left: -110px;
}
.hero::after {
    width: 380px;
    height: 380px;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.45),
        transparent 70%
    );
    bottom: -160px;
    right: -90px;
    animation-delay: -8s;
}
.hero > .container {
    position: relative;
    z-index: 1;
}
@keyframes blob-float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(26px, -18px) scale(1.08);
    }
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    max-width: 820px;
    margin: 18px auto 22px;
}
.hero p.lead {
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto 36px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.hero-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Sections & grids ---------- */
.section {
    padding: 80px 0;
}
.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 50px;
}
.grid {
    display: grid;
    gap: 24px;
}
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 620px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 18px;
    box-shadow: 0 6px 22px rgba(124, 58, 237, 0.35);
}

/* ---------- Premium highlight banner (homepage, below hero) ----------
   Reuses .card/.card-hover/.eyebrow as its base and just layers a richer
   gradient + icon treatment on top, rather than inventing a new card
   pattern from scratch. */
.premium-highlight {
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(135deg, #1F1737 0%, #080A13 100%);
}
.premium-highlight-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 6px 22px rgba(124, 58, 237, 0.35);
}
.premium-highlight-content .eyebrow {
    margin-bottom: 10px;
}
.premium-highlight-content h3 {
    margin: 0 0 8px;
}
.premium-highlight-content p {
    color: var(--text-secondary);
    margin: 0;
}
.premium-highlight-link {
    color: var(--accent-purple);
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 620px) {
    .premium-highlight {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* ---------- Showcase / transformation preview cards ----------
   Social-media-style preview cards for the homepage "showcase" section.
   No real transformation footage exists yet (the AI pipeline itself is
   still a placeholder) — these use an animated gradient shimmer "preview"
   surface instead of a broken image/video reference. Swapping in a real
   image/GIF/video later is a one-line change: replace .showcase-preview's
   background with the media element, no layout/markup changes needed. */
.showcase-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: var(--bg-raised);
    transition:
        transform 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out),
        border-color 0.25s;
}
.showcase-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.showcase-preview {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(139, 92, 246, 0.35),
            rgba(59, 130, 246, 0.25) 60%,
            rgba(236, 72, 153, 0.3)
        ),
        var(--bg-base);
    background-size: 220% 220%;
    animation: showcase-shimmer 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}
.showcase-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        transparent 40%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: showcase-sweep 3.2s ease-in-out infinite;
}
.showcase-preview-icon {
    font-size: 2.4rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.35));
}
.showcase-caption {
    padding: 16px 18px 20px;
}
.showcase-caption h4 {
    margin: 0 0 4px;
    font-size: 1rem;
}
.showcase-caption p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
@keyframes showcase-shimmer {
    0%,
    100% {
        background-position: 0% 30%;
    }
    50% {
        background-position: 100% 70%;
    }
}
@keyframes showcase-sweep {
    0% {
        background-position: 150% 0;
    }
    100% {
        background-position: -50% 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .showcase-preview,
    .showcase-preview::after {
        animation: none;
    }
}

.step-card {
    position: relative;
}
.step-number {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-purple);
}

/* ---------- Pricing ---------- */
.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
}
.pricing-card.featured {
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow);
}
.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 16px 30px 10px 30px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}
.price-amount {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 6px 0;
}
.price-amount span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.pricing-card ul {
    margin: 22px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pricing-card li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.pricing-card li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-item {
    border-bottom: 1px solid var(--border-soft);
    padding: 22px 0;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.02rem;
}
.faq-question .icon {
    transition: transform 0.2s ease;
    color: var(--accent-purple);
}
.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.faq-item.open .faq-answer {
    max-height: 400px;
    margin-top: 12px;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.05);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Native <select> dropdown popups are opaque OS-rendered surfaces that don't
   composite over the page — without this, they fall back to the browser's
   light-mode default (white background) while inherited light text makes
   options unreadable. color-scheme hints the browser to render native
   controls (selects, scrollbars, etc.) using the dark palette; the explicit
   rule below reinforces it where color-scheme alone isn't fully honored. */
select {
    color-scheme: dark;
}
select,
option {
    background-color: var(--bg-raised);
    color: var(--text-primary);
}
.form-error {
    color: #fca5a5;
    font-size: 0.82rem;
    margin-top: 6px;
}
.form-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 6px;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---------- Password reveal toggle for plain .form-control fields (x-password-toggle-control) ---------- */
.password-control-wrap {
    position: relative;
}
.password-control-wrap .form-control {
    padding-right: 44px;
}
.password-control-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s;
}
.password-control-toggle:hover {
    color: var(--text-primary);
}
.password-control-toggle svg {
    width: 18px;
    height: 18px;
}
.password-control-toggle .icon-eye-off {
    display: none;
}
.password-control-toggle[aria-pressed="true"] .icon-eye {
    display: none;
}
.password-control-toggle[aria-pressed="true"] .icon-eye-off {
    display: block;
}

/* ---------- Floating-label fields (x-form-input / x-password-input) ---------- */
.form-row {
    display: flex;
    gap: 14px;
}
.form-row .form-field {
    flex: 1;
    min-width: 0;
}
@media (max-width: 560px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
.form-field {
    position: relative;
    margin-bottom: 20px;
}
.form-field-input {
    width: 100%;
    padding: 22px 16px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.form-field-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.05);
}
.form-field.has-icon .form-field-input {
    padding-left: 46px;
}
.form-field.has-toggle .form-field-input {
    padding-right: 46px;
}
.form-field-icon {
    position: absolute;
    left: 15px;
    top: 22px;
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.form-field-icon svg {
    width: 100%;
    height: 100%;
}
.form-field-label {
    position: absolute;
    left: 16px;
    top: 18px;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    transition:
        top 0.15s ease,
        font-size 0.15s ease,
        color 0.15s ease;
    background: transparent;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.form-field.has-icon .form-field-label {
    left: 46px;
}
.form-field-input:focus + .form-field-label,
.form-field-input:not(:placeholder-shown) + .form-field-label {
    top: 8px;
    font-size: 0.72rem;
    color: var(--accent-purple);
}
.form-field-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s;
}
.form-field-toggle:hover {
    color: var(--text-primary);
}
.form-field-toggle svg {
    width: 18px;
    height: 18px;
}
.form-field-toggle .icon-eye-off {
    display: none;
}
.form-field-toggle[aria-pressed="true"] .icon-eye {
    display: none;
}
.form-field-toggle[aria-pressed="true"] .icon-eye-off {
    display: block;
}

/* ---------- OTP input (x-otp-input) ---------- */
.otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.otp-box {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-family: inherit;
    transition:
        border-color 0.15s,
        background 0.15s,
        transform 0.1s;
}
.otp-box:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}
.otp-box.filled {
    border-color: var(--border-strong);
}
@media (max-width: 420px) {
    .otp-box {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }
    .otp-boxes {
        gap: 8px;
    }
}

.auth-shell {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.auth-card {
    width: 100%;
    max-width: 520px;
}
.auth-card h1 {
    font-size: 1.6rem;
    text-align: center;
}
.auth-card > p {
    text-align: center;
}
.auth-footer-link {
    text-align: center;
    margin-top: 22px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #fff;
    color: #1f1f1f;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border-soft);
    transition:
        box-shadow 0.15s,
        transform 0.15s;
}
.btn-google:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}
.btn-google svg {
    width: 18px;
    height: 18px;
}

/* ---------- Alerts / toasts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

#toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    font-size: 0.88rem;
    animation: toast-in 0.2s ease;
    white-space: pre-line;
}
.toast-success {
    border-left: 3px solid var(--success);
}
.toast-error {
    border-left: 3px solid var(--danger);
}
.toast-info {
    border-left: 3px solid var(--info);
}
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}
.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}
.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}
.badge-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}
.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th {
    text-align: left;
    padding: 14px 18px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.02);
}
.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-secondary);
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .feature-icon {
    margin: 0 auto 18px;
    opacity: 0.6;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 37%,
        rgba(255, 255, 255, 0.04) 63%
    );
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* ---------- Utilities ---------- */
.flex {
    display: flex;
}
.items-center {
    align-items: center;
}
.justify-between {
    justify-content: space-between;
}
.gap-8 {
    gap: 8px;
}
.gap-12 {
    gap: 12px;
}
.gap-16 {
    gap: 16px;
}
.gap-24 {
    gap: 24px;
}
.mt-8 {
    margin-top: 8px;
}
.mt-16 {
    margin-top: 16px;
}
.mt-24 {
    margin-top: 24px;
}
.mt-40 {
    margin-top: 40px;
}
.mb-8 {
    margin-bottom: 8px;
}
.mb-16 {
    margin-bottom: 16px;
}
.mb-24 {
    margin-bottom: 24px;
}
.w-full {
    width: 100%;
}
.hidden {
    display: none !important;
}

/* =========================================================
   Dashboard / Admin shell (sidebar + topbar layout)
   ========================================================= */
.dash-shell {
    display: flex;
    min-height: 100vh;
}
.dash-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-base);
    border-right: 1px solid var(--border-soft);
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.dash-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 6px 10px 26px;
}
.dash-brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.8);
}
.dash-brand .brand-logo {
    height: 28px;
}
.dash-brand-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.auth-logo {
    display: block;
    height: 40px;
    width: auto;
    margin: 0 auto 18px;
}
.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.dash-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition:
        background 0.15s,
        color 0.15s;
}
.dash-nav a .ic {
    width: 18px;
    text-align: center;
}
.dash-nav a:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}
.dash-nav a.active {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}
.dash-nav-group-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 18px 14px 6px;
}
.dash-sidebar-footer {
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
    margin-top: 14px;
}

.dash-main {
    flex: 1;
    min-width: 0;
}
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    background: rgba(6, 6, 10, 0.85);
    backdrop-filter: blur(14px);
    z-index: 20;
}
.dash-topbar h1 {
    font-size: 1.15rem;
    margin: 0;
}
.dash-content {
    padding: 32px;
    max-width: 1200px;
}
.dash-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}
.dash-sidebar-toggle svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 980px) {
    .dash-sidebar {
        position: fixed;
        left: 0;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    }
    .dash-sidebar.open {
        transform: translateX(0);
    }
    .dash-sidebar-toggle {
        display: inline-flex;
    }
    .dash-content {
        padding: 20px;
    }
    .dash-topbar {
        padding: 16px 20px;
    }
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-card .stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 800;
}
.stat-card .stat-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ---------- Realtime Studio ---------- */
.studio-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Session bar — full-width professional control strip, spans the entire
   content area edge-to-edge (it's a direct child of .studio-shell, which
   itself is unconstrained inside .dash-content). */
.studio-session-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 16px 24px;
}
.studio-session-bar-status {
    display: flex;
    align-items: center;
    gap: 12px;
}
.studio-session-bar-label {
    font-weight: 700;
    font-size: 0.95rem;
}
.studio-session-bar-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.studio-session-bar .studio-timer {
    font-size: 1.6rem;
    margin-left: auto;
}
.studio-session-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.studio-obs-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-soft);
}
.studio-obs-status-text {
    font-size: 0.82rem;
}
.studio-time-result-bar {
    width: 100%;
    margin: 0;
}
@media (max-width: 900px) {
    .studio-session-bar .studio-timer {
        margin-left: 0;
    }
}

/* Workspace — dominant main column (★★★★★ preview, ★★★★ prompt, ★ advanced)
   + a secondary setup panel (★★), using fractional columns so the preview
   stays ~65-70% of the workspace at every viewport, not just one fixed
   breakpoint the way a hardcoded pixel sidebar would. */
.studio-workspace {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1180px) {
    .studio-workspace {
        grid-template-columns: 1fr;
    }
}
.studio-main-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.studio-setup-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Live Preview — the single dominant visual element on the page */
.studio-preview-card h3 {
    margin-bottom: 16px;
}
.studio-video-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 720px) {
    .studio-video-wrap {
        grid-template-columns: 1fr;
    }
}
.studio-video-box {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 180px;
    background: linear-gradient(160deg, #0c0a14 0%, #000 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
/* The placeholder's icon+title+description can be taller than a narrow
   16:9 box at laptop widths where the workspace column shrinks — keep it
   compact so it never gets clipped by overflow:hidden above. */
.studio-video-placeholder .empty-state-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
}
.studio-video-placeholder .empty-state-icon svg {
    width: 18px;
    height: 18px;
}
.studio-video-placeholder .empty-state-title {
    font-size: 0.85rem;
}
.studio-video-placeholder .empty-state-sub {
    font-size: 0.76rem;
}
.studio-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Belt-and-suspenders: Safari/WebKit sometimes overlays its own media
   controls on a video inside a fullscreened element even without the
   `controls` attribute — explicitly suppress them. */
.studio-video-box video::-webkit-media-controls,
.studio-video-box video::-webkit-media-controls-enclosure,
.studio-video-box video::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none;
}
.studio-video-label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.55);
    padding: 5px 10px;
    border-radius: 999px;
    z-index: 2;
}
.studio-live-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.55);
    padding: 5px 10px;
    border-radius: 999px;
    z-index: 2;
    color: var(--success);
}
.studio-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
.studio-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}
.studio-fullscreen-btn svg {
    width: 16px;
    height: 16px;
}
.studio-fullscreen-btn .icon-minimize {
    display: none;
}
.studio-fullscreen-btn[aria-pressed="true"] .icon-maximize {
    display: none;
}
.studio-fullscreen-btn[aria-pressed="true"] .icon-minimize {
    display: block;
}
/* Absolutely positioned so it overlays the video element instead of
   competing with it as a flex sibling — the <video> tag reports its own
   intrinsic box (width:100%/height:100% of the parent) even with no
   source attached, which previously crowded the placeholder out of the
   row entirely in a flex layout. */
.studio-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

/* Prompt area — ★★★★, directly beneath the preview */
.studio-prompt-textarea {
    min-height: 160px;
    font-size: 1rem;
}

/* Advanced settings — deliberately the least visually prominent card */
.studio-advanced-card h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.studio-engine-description {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.studio-timer {
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.studio-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.studio-status-dot.live {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 1.4s ease infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* ---------- Modal (OBS Studio connect, etc.) ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 10, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-box {
    width: 100%;
    max-width: 440px;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal-box h3 {
    margin: 0 0 4px;
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
}
.modal-box {
    position: relative;
}
.obs-setup-steps {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    padding-left: 18px;
    margin: 12px 0 20px;
}

.engine-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.engine-option:hover {
    border-color: var(--border-strong);
}
.engine-option.selected {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.08);
}
.engine-option input {
    accent-color: var(--accent-purple);
}

/* ---------- Agreement checkbox (register terms + abuse-consent modal) ---------- */
.form-check--agreement {
    align-items: flex-start;
    gap: 10px;
    line-height: 1.55;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.form-check--agreement input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-purple);
    cursor: pointer;
}
.form-check--agreement a {
    color: var(--accent-purple);
    text-decoration: underline;
    text-decoration-color: rgba(139, 92, 246, 0.4);
    text-underline-offset: 2px;
}
.form-check--agreement a:hover {
    text-decoration-color: var(--accent-purple);
}
@media (max-width: 560px) {
    .form-check--agreement {
        font-size: 0.84rem;
    }
}

/* ---------- Password hint (fades in on focus, out on blur if empty) ---------- */
.form-hint[data-password-hint-for] {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition:
        opacity 0.25s ease,
        max-height 0.25s ease;
    margin-top: 0;
}
.form-hint[data-password-hint-for].is-visible {
    opacity: 1;
    max-height: 40px;
    margin-top: 6px;
}

/* ---------- Password strength meter ---------- */
.password-strength {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition:
        opacity 0.25s ease,
        max-height 0.25s ease;
}
.password-strength.is-visible {
    opacity: 1;
    max-height: 70px;
    /* Bottom margin intentionally exceeds the page's standard 20px
       field-to-field rhythm (.form-field's margin-bottom) — this block
       sits between the password field and Confirm Password, and needed
       clearer separation than the default rhythm gave it. */
    margin: 10px 0 24px;
}
.password-strength-track {
    height: 5px;
    border-radius: 999px;
    background: var(--border-soft);
    overflow: hidden;
}
.password-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: #f87171;
    transition:
        width 0.2s ease,
        background-color 0.2s ease;
}
.password-strength-fill.is-medium {
    background: #fbbf24;
}
.password-strength-fill.is-strong {
    background: #4ade80;
}
.password-strength-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.password-strength-label .strength-word.is-weak {
    color: #f87171;
}
.password-strength-label .strength-word.is-medium {
    color: #fbbf24;
}
.password-strength-label .strength-word.is-strong {
    color: #4ade80;
}
@media (prefers-reduced-motion: reduce) {
    .form-hint[data-password-hint-for],
    .password-strength,
    .password-strength-fill {
        transition: none;
    }
}

/* ---------- Captcha field ---------- */
.captcha-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.captcha-field-label strong {
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition:
        border-color 0.15s,
        color 0.15s,
        transform 0.2s;
}
.captcha-refresh:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}
.captcha-refresh.is-spinning svg {
    animation: captcha-spin 0.5s linear;
}
@keyframes captcha-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .captcha-refresh.is-spinning svg {
        animation: none;
    }
}

/* ---------- Cloudflare Turnstile field ---------- */
/* Best-effort override of Cloudflare's own "flexible" size-mode default
   (300px min-width, undocumented as a configurable option — only
   data-theme/data-size are exposed). This only takes effect if Cloudflare
   applies that minimum to the same-origin wrapper element they render
   into .cf-turnstile; if it's enforced inside their own cross-origin
   iframe instead, no CSS here can reach it — that's a browser security
   boundary, not a specificity problem. Needs !important to beat whatever
   inline style Cloudflare's script may set on the same element. */
.turnstile-field .cf-turnstile {
    min-width: 150px !important;
}

/* ---------- Admin impersonation banner ---------- */
.impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: rgba(251, 191, 36, 0.12);
    border-bottom: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    font-size: 0.88rem;
}
.impersonation-banner strong {
    color: #fde68a;
}
.impersonation-banner-actions {
    display: flex;
    gap: 8px;
}
@media (max-width: 560px) {
    .impersonation-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* =========================================================
   User Dashboard — Premium Redesign
   Scoped entirely to .dash-shell--premium (added only on
   layouts/dashboard.blade.php's root element) — layouts/admin.blade.php
   shares the same .dash-shell/.dash-* structural classes but never gets
   this modifier class, so the admin panel is completely unaffected.
   ========================================================= */
.dash-shell--premium .dash-sidebar {
    background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-void) 100%);
}
.dash-shell--premium .dash-brand {
    padding-bottom: 32px;
}
.dash-shell--premium .dash-nav a.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}
.dash-shell--premium .dash-nav a:hover:not(.active) {
    transform: translateX(3px);
}
.dash-shell--premium .dash-topbar {
    background: rgba(6, 6, 10, 0.7);
}

/* The shared .dash-content rule (app.css ~1598) caps at 1200px with no
   auto margins — admin already works around this per-page with its own
   inline max-width. This scoped override widens only the user dashboard,
   which never gets the .dash-shell--premium class on admin's layout. */
.dash-shell--premium .dash-content {
    max-width: 1800px;
}

/* Upgrades every existing .card across all 8 dashboard views for free —
   no per-view markup changes needed. */
.dash-shell--premium .card {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.dash-shell--premium .card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 92, 246, 0.5),
        transparent
    );
}

/* Stat tiles (.stat-card already exists, shared with the admin dashboard —
   this only adds polish inside the premium scope). */
.dash-shell--premium .stat-card {
    padding-top: 4px;
}
.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.dash-shell--premium .stat-card .stat-value {
    font-variant-numeric: tabular-nums;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Activity feed rows — replaces the ad-hoc inline-styled rows previously
   duplicated across home.blade.php and support.blade.php. */
.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
    transition: padding-left 0.15s ease;
}
.dash-activity-item:last-child {
    border-bottom: none;
}
.dash-activity-item:hover {
    padding-left: 4px;
}
.dash-activity-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-glass-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.dash-activity-item-body {
    flex: 1;
    min-width: 0;
}
.dash-activity-item-title {
    font-weight: 600;
    font-size: 0.92rem;
}
.dash-activity-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile sidebar overlay + close button — mirrors the public navbar's
   existing .navbar-overlay/.navbar-close pattern exactly. Used by both
   layouts/dashboard.blade.php and layouts/admin.blade.php. */
.dash-sidebar-close {
    display: none;
}
.dash-sidebar-overlay {
    display: none;
}
@media (max-width: 980px) {
    .dash-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 18px;
        right: 18px;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--bg-glass);
        border: 1px solid var(--border-soft);
        color: var(--text-primary);
        font-size: 1.3rem;
        line-height: 1;
        cursor: pointer;
        z-index: 1;
    }
    .dash-sidebar-close svg {
        width: 16px;
        height: 16px;
    }
    .dash-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(4, 4, 8, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 190;
    }
    .dash-sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-shell--premium .dash-nav a:hover:not(.active),
    .dash-activity-item {
        transition: none;
    }
}

/* =========================================================
   Dashboard rebuild — icon system, header (search/notifications/
   avatar), hero + stat hierarchy, premium form controls.
   Continues the .dash-shell--premium scoping discipline above:
   layouts/admin.blade.php never receives this class, so none of this
   reaches the admin panel.
   ========================================================= */

/* ---------- Inline SVG icon sizing (replaces emoji throughout) ---------- */
.dash-nav a .ic svg {
    width: 18px;
    height: 18px;
    display: block;
}
.dash-logout-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 2px;
}
.dash-brand svg {
    width: 22px;
    height: 22px;
}

/* ---------- Topbar layout ---------- */
.dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dash-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.dash-breadcrumb a {
    color: var(--text-muted);
}
.dash-breadcrumb a:hover {
    color: var(--text-primary);
}
.dash-breadcrumb-sep {
    opacity: 0.6;
}
.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Generic circular header icon button ---------- */
.dash-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s,
        transform 0.15s;
}
.dash-icon-btn:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.dash-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* ---------- Search ---------- */
.dash-search {
    position: relative;
}
.dash-search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    padding: 12px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
    z-index: 60;
}
.dash-search.open .dash-search-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dash-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-soft);
}
.dash-search-box svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.dash-search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}
.dash-search-box input:focus {
    outline: none;
}
.dash-search-results {
    margin-top: 8px;
    max-height: 240px;
    overflow-y: auto;
}
.dash-search-result-item {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
}
.dash-search-result-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}
.dash-search-empty {
    padding: 9px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Notifications ---------- */
.dash-notif {
    position: relative;
}
.dash-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-base);
}
.dash-notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 380px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
    z-index: 60;
    display: flex;
    flex-direction: column;
}
.dash-notif.open .dash-notif-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dash-notif-panel-header {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-soft);
}
.dash-notif-panel-body {
    overflow-y: auto;
    padding: 6px;
}
.dash-notif-item {
    padding: 10px 10px;
    border-radius: var(--radius-sm);
}
.dash-notif-item:hover {
    background: var(--bg-glass);
}
.dash-notif-item-title {
    font-size: 0.85rem;
    color: var(--text-primary);
}
.dash-notif-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.dash-notif-empty {
    padding: 20px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Avatar menu ---------- */
.dash-avatar-menu {
    position: relative;
}
.dash-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 5px 12px 5px 5px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}
.dash-avatar-btn:hover {
    background: var(--bg-glass-strong);
}
.dash-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-avatar-name {
    font-size: 0.86rem;
    font-weight: 600;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-avatar-btn svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.dash-avatar-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
    z-index: 60;
}
.dash-avatar-menu.open .dash-avatar-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dash-avatar-panel a,
.dash-avatar-panel button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.87rem;
    font-family: inherit;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}
.dash-avatar-panel a:hover,
.dash-avatar-panel button:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}
.dash-avatar-panel svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.dash-avatar-panel form {
    margin: 0;
}

@media (max-width: 560px) {
    .dash-avatar-name {
        display: none;
    }
    .dash-avatar-btn {
        padding: 5px;
    }
    .dash-search-panel,
    .dash-notif-panel {
        position: fixed;
        top: 66px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* ---------- Hero welcome card ---------- */
.dash-hero {
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.18) 0%,
        rgba(31, 23, 55, 0.4) 45%,
        var(--bg-raised) 100%
    );
    border: 1px solid rgba(139, 92, 246, 0.25);
    position: relative;
}
.dash-hero::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(139, 92, 246, 0.35),
        transparent 70%
    );
    pointer-events: none;
}
.dash-hero h2 {
    font-size: 1.5rem;
}

/* ---------- Primary hero stat with radial progress ---------- */
.stat-card--primary {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}
.stat-ring {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    transform: rotate(-90deg);
}
.stat-ring-track {
    fill: none;
    stroke: var(--bg-glass-strong);
    stroke-width: 6;
}
.stat-ring-fill {
    fill: none;
    stroke: url(#statRingGradient);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}
.stat-card--primary .stat-card-icon {
    display: none;
}
.stat-card--primary > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.stat-card--primary .stat-value {
    overflow-wrap: break-word;
}
@media (max-width: 1100px) {
    .stat-card--primary {
        flex-wrap: wrap;
    }
}
.stat-card-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}
.dash-activity-item-icon svg {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
}
.feature-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

/* ---------- Quick actions ---------- */
.dash-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 900px) {
    .dash-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .dash-quick-actions {
        grid-template-columns: 1fr;
    }
}
.dash-quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    transition:
        background 0.15s,
        transform 0.15s,
        border-color 0.15s;
}
.dash-quick-action:hover {
    background: var(--bg-glass-strong);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}
.dash-quick-action-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-quick-action-icon svg {
    width: 18px;
    height: 18px;
    color: #fff;
}
.dash-quick-action-label {
    font-size: 0.88rem;
    font-weight: 600;
}

/* ---------- Refined empty states (.empty-state base rule already exists,
   unscoped, shared with the admin panel — only adding the new sub-elements
   here, not redeclaring the base) ---------- */
.empty-state-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--bg-glass-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}
.empty-state-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.empty-state-sub {
    font-size: 0.85rem;
}

/* ---------- Premium native control styling (Studio: engine radio cards,
   file input, selects) ---------- */

.engine-option {
    position: relative;
    cursor: pointer;
}
.engine-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.engine-option span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
}
.engine-option span::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.6px solid var(--border-soft);
    flex-shrink: 0;
    margin-left: 12px;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.engine-option.selected span,
.engine-option input[type="radio"]:checked + span {
    background: var(--bg-glass-strong);
    border-color: rgba(139, 92, 246, 0.5);
    color: var(--text-primary);
}
.engine-option.selected span::after,
.engine-option input[type="radio"]:checked + span::after {
    border-color: var(--accent-purple);
    background: var(--gradient-primary);
    box-shadow: inset 0 0 0 3px var(--bg-raised);
}

.dash-file-input {
    position: relative;
}
.dash-file-input input[type="file"] {
    width: 100%;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
}
.dash-file-input input[type="file"]::file-selector-button {
    padding: 9px 16px;
    margin-right: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.dash-file-input input[type="file"]::file-selector-button:hover {
    background: var(--bg-glass);
}

.dash-shell--premium .data-table tr:hover td {
    background: var(--bg-glass);
}
.dash-shell--premium .data-table {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-shell--premium select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239d95b8' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}
