/* Galactic Radio Weather — Space Theme */

:root {
    /* Background */
    --bg-deep: #050a15;
    --bg-surface: #0a1628;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.07);

    /* Accents */
    --cyan: #00d4ff;
    --cyan-dim: rgba(0, 212, 255, 0.15);
    --cyan-glow: rgba(0, 212, 255, 0.3);
    --purple: #7c3aed;
    --purple-dim: rgba(124, 58, 237, 0.15);

    /* Text */
    --text-bright: #f0f4ff;
    --text-primary: #c8d6e5;
    --text-muted: #8a9dbf;

    /* Status */
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.15);
    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.15);
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.15);

    /* Sizing */
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 640px;
    --app-width: 1220px;
    --nav-height: 56px;
}

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

/* Global focus ring for keyboard users (WCAG 2.4.7) */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

/* Reduced motion for vestibular disorders (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    .stars { animation: none !important; }
    .generate-btn-glow { animation: none !important; }
    .step-indicator { animation: none !important; }
    .dj-skeleton { animation: none !important; }
    .toast { animation: none !important; }
    .step.active::before { animation: none !important; }
    .step.completed { animation: none !important; }
    .step-line::after { transition: none !important; }
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ======================== STAR FIELD ======================== */
.stars-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #050a15 0%, #0a1628 40%, #0d1b30 100%);
}

.stars {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
}

.stars-sm {
    background-image:
        radial-gradient(1px 1px at 50px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 180px 150px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 320px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 450px 200px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 90px 270px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 600px 100px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 250px 320px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 700px 260px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 400px 350px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 550px 50px, rgba(255,255,255,0.6), transparent);
    background-size: 800px 400px;
    animation: drift 120s linear infinite;
}

.stars-md {
    background-image:
        radial-gradient(1.5px 1.5px at 100px 200px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 350px 100px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 520px 300px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 200px 50px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 680px 180px, rgba(255,255,255,0.5), transparent);
    background-size: 900px 400px;
    animation: drift 180s linear infinite;
}

.stars-lg {
    background-image:
        radial-gradient(2px 2px at 150px 130px, rgba(0, 212, 255, 0.5), transparent),
        radial-gradient(2px 2px at 500px 250px, rgba(124, 58, 237, 0.4), transparent),
        radial-gradient(2px 2px at 300px 350px, rgba(255, 255, 255, 0.8), transparent);
    background-size: 700px 500px;
    animation: drift 240s linear infinite reverse;
}

@keyframes drift {
    from { transform: translateY(0); }
    to { transform: translateY(-400px); }
}

/* ======================== TOAST ======================== */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    animation: toast-in 0.3s ease-out;
    max-width: 380px;
}

.toast.success { background: var(--green-dim); color: var(--green); border-color: rgba(16,185,129,0.25); }
.toast.error { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.25); }
.toast.info { background: var(--cyan-dim); color: var(--cyan); border-color: rgba(0,212,255,0.2); }

.toast.fade-out { animation: toast-out 0.3s ease-in forwards; }

.toast-with-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-action-btn {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.toast-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ======================== LANDING ======================== */
.landing {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 2rem;
}

.landing-content {
    max-width: var(--max-width);
    width: 100%;
    text-align: center;
}

.logo-mark {
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    color: var(--cyan);
    filter: drop-shadow(0 0 12px var(--cyan-glow));
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.title-accent {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Google Sign-In Button */
.google-signin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 2rem;
    background: white;
    color: #3c4043;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    font-family: inherit;
    margin-bottom: 3rem;
}

.google-signin-btn:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 40px var(--cyan-glow);
    transform: translateY(-1px);
}

.google-signin-btn:active:not(:disabled) { transform: scale(0.98); }
.google-signin-btn:disabled { opacity: 0.5; cursor: wait; }

.landing-signout-btn {
    display: block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}
.landing-signout-btn:hover {
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.35);
}

/* Features Row */
.features-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.2s, background 0.2s;
}

.feature-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    background: var(--glass-hover);
}

.feature-icon-wrap {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    color: var(--cyan);
}

.feature-svg { width: 100%; height: 100%; }

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Pricing */
.pricing-section { margin-bottom: 2rem; }

.pricing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.price-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    transition: border-color 0.2s;
}

.price-card:hover { border-color: rgba(255,255,255,0.15); }

.price-card.featured {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.featured-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.price-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}

.price-amount span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.price-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Landing Footer — see shared footer styles below modal section */

/* ======================== APP VIEW ======================== */
.app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Top Nav */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: rgba(5, 10, 21, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-logo {
    width: 28px;
    height: 28px;
    color: var(--cyan);
}

.nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-primary);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credits-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
    background: var(--cyan-dim);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.btn-logout {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Admin Nav Link */
.admin-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(124, 58, 237, 0.25);
    color: var(--purple);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.admin-nav-link:hover {
    color: var(--text-bright);
    border-color: var(--purple);
    background: var(--purple-dim);
}

/* API Key Banner */
.api-key-banner {
    background: var(--green-dim);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem 1.5rem;
}

.api-key-banner-inner {
    max-width: var(--app-width);
    margin: 0 auto;
    text-align: center;
}

.api-key-banner p {
    font-size: 0.85rem;
    color: var(--green);
    margin-bottom: 0.5rem;
}

.api-key-banner code {
    display: block;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--green);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    word-break: break-all;
}

.api-key-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* App Layout (sidebar + main) */
.app-layout {
    display: flex;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--nav-height));
}

/* Left Sidebar */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-right: 1px solid var(--glass-border);
    background: rgba(5, 10, 21, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

.sidebar-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.35rem;
    opacity: 0.6;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.75rem;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.sidebar-btn:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.sidebar-btn:hover svg {
    opacity: 0.9;
}

.sidebar-btn.active {
    color: var(--cyan);
    background: var(--cyan-dim);
    border-color: rgba(0, 212, 255, 0.15);
}

.sidebar-btn.active svg {
    opacity: 1;
    color: var(--cyan);
}

.sidebar-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
}

.sidebar-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0.75rem;
}

/* Sidebar Groups (accordion) */
.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-group.collapsed {
    display: none;
}

/* Info toggle button — push chevron to the right */
.sidebar-toggle {
    justify-content: flex-start;
}

.sidebar-toggle-chevron {
    margin-left: auto;
    opacity: 0.4;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.sidebar-toggle:hover .sidebar-toggle-chevron {
    opacity: 0.8;
}

.sidebar-toggle[aria-expanded="true"] .sidebar-toggle-chevron {
    transform: rotate(90deg);
}

/* Back button in info group */
.sidebar-back-btn {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
}

.sidebar-back-btn:hover {
    color: var(--cyan);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 320px;
    gap: 1rem;
    align-items: start;
    padding: 0.15rem 0 0.15rem;
}

#tab-generate .tab-hero {
    grid-template-columns: minmax(0, 860px);
}

#tab-account .tab-hero {
    grid-template-columns: minmax(0, 920px);
    padding-bottom: 0.35rem;
}

.tab-hero-copy {
    max-width: 780px;
}

.tab-eyebrow,
.panel-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.tab-heading {
    font-size: clamp(1.65rem, 2.2vw, 2.35rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--text-bright);
    margin-top: 0.4rem;
    max-width: none;
    text-wrap: balance;
}

.tab-subcopy {
    margin-top: 0.85rem;
    max-width: 56ch;
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.tab-hero-note {
    justify-self: end;
    width: 100%;
    align-self: start;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(0, 212, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.08), transparent 55%),
        linear-gradient(160deg, rgba(15, 24, 42, 0.94), rgba(16, 25, 44, 0.74));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.tab-description {
    max-width: none;
    justify-self: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.hero-chip {
    padding: 0.32rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.95rem;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0;
    margin-top: 0.3rem;
}

.panel-summary {
    max-width: 24ch;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.compact-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.compact-row.compact-row-3col {
    grid-template-columns: 1fr auto;
}

.form-field label,
.section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.label-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    opacity: 0.6;
}

textarea,
input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 0.4rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%236b7fa3'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

textarea {
    resize: vertical;
    min-height: 3.5rem;
    line-height: 1.5;
}

.context-field {
    margin-bottom: 0;
}

.generate-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 0.9rem;
    align-items: end;
}

textarea::placeholder { color: var(--text-muted); opacity: 0.5; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan);
}

input::placeholder { color: var(--text-muted); opacity: 0.5; }

/* DJ Cards (grid layout with photos) */
.dj-section {
    margin-bottom: 0.75rem;
}

.dj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
    padding: 0.25rem 0 0.5rem;
}

.dj-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    overflow: hidden;
    padding: 0.5rem 0.65rem;
}

.dj-card:has(.dj-card-wallet-badge) {
    padding-right: 3.3rem;
}

.dj-card-wallet-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    padding: 0.1rem 0.35rem;
    border: 1px solid rgba(20, 184, 166, 0.55);
    border-radius: 4px;
    background: rgba(20, 184, 166, 0.16);
    color: #5eead4;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.dj-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: var(--glass-hover);
}

.dj-card.selected {
    border-color: var(--cyan);
    background: var(--cyan-dim);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.18);
}

.dj-card-visual {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
}

.dj-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dj-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cyan);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(124, 58, 237, 0.08));
}

.dj-card-demo-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: var(--cyan);
    font-size: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.dj-card-demo-btn:hover {
    background: rgba(0, 212, 255, 0.25);
}

.dj-card-info {
    min-width: 0;
    flex: 1;
}

.dj-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dj-card-bio {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dj-card-traits {
    font-size: 0.66rem;
    color: var(--cyan);
    opacity: 0.7;
    margin-top: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DJ demo player bar */
.dj-demo-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: var(--radius-sm);
}

.dj-demo-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cyan);
}

.dj-demo-name {
    flex: 1;
    font-size: 0.78rem;
    color: var(--text-bright);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dj-demo-player audio {
    height: 28px;
    flex-shrink: 0;
    filter: hue-rotate(168deg) saturate(0.9) brightness(0.92);
}

.dj-demo-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.2rem;
}

.dj-demo-close:hover { color: var(--text-bright); }

.dj-skeleton {
    width: 100%;
    aspect-ratio: 0.85;
    background: linear-gradient(90deg, var(--glass-bg) 25%, rgba(255,255,255,0.06) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius);
    animation: skeleton-pulse 1.5s infinite;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Generate Button */
.generate-btn {
    width: 100%;
    min-height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 16px;
    font-size: 1.02rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    font-family: inherit;
    align-self: end;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(0, 212, 255, 0.3), 0 2px 12px rgba(124, 58, 237, 0.2);
}

.generate-btn:active:not(:disabled) { transform: scale(0.98); }

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.generate-btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    animation: btn-shimmer 3s infinite;
}

@keyframes btn-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ======================== PROGRESS ======================== */
.progress-panel {
    padding: 1.1rem 1.2rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
}

.progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 0.75rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    padding: 0.55rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    transition: color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.step.active {
    color: #9fe8ff;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.08));
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.08), 0 0 20px rgba(0, 212, 255, 0.14);
    background-clip: padding-box;
    position: relative;
}

.step.active::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 999px;
    background: linear-gradient(var(--step-border-angle, 0deg), var(--cyan), var(--purple), var(--cyan));
    z-index: -1;
    animation: step-border-rotate 2s linear infinite;
}

@keyframes step-border-rotate {
    to { --step-border-angle: 360deg; }
}

@property --step-border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.step.completed {
    color: #b6f7d6;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.08));
    border-color: rgba(16, 185, 129, 0.34);
    animation: step-burst 0.5s ease-out;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

@keyframes step-burst {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 18px 4px rgba(16, 185, 129, 0.3); }
    100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.15); }
}

.step.failed {
    color: #ffb1b1;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.08));
    border-color: rgba(239, 68, 68, 0.34);
}

.step-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}

.step.active .step-indicator {
    border-color: var(--cyan);
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan-glow);
    animation: pulse-dot 1.5s infinite;
}

.step.completed .step-indicator {
    border-color: var(--green);
    background: var(--green);
}

.step.failed .step-indicator {
    border-color: var(--red);
    background: var(--red);
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px var(--cyan-glow); }
    50% { box-shadow: 0 0 12px var(--cyan-glow); }
}

.step-line {
    flex: 1;
    height: 2px;
    margin: 0 0.5rem;
    position: relative;
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.14));
    overflow: hidden;
}

.step-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.4), rgba(16, 185, 129, 0.9));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-line.completed::after {
    transform: scaleX(1);
}

.progress-status {
    font-size: 0.84rem;
    color: #9fcfff;
    text-align: center;
    font-weight: 500;
}

/* ======================== AUDIO PLAYER ======================== */
.audio-player-card {
    padding: 1.15rem 1.25rem;
    min-height: 134px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.2s;
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 16px var(--cyan-glow);
}

.play-btn:active { transform: scale(0.95); }

.player-track {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.track-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: center;
}

.progress-bar-wrap {
    flex: 1;
    height: 6px;
    position: relative;
    cursor: pointer;
    padding: 8px 0;
}

.progress-bar-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    transform: translateY(-50%);
}

.progress-bar-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    transform: translateY(-50%);
    width: 0%;
    transition: width 0.1s linear;
}

.progress-bar-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    background: var(--cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--cyan-glow);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar-wrap:hover .progress-bar-thumb { opacity: 1; }

.player-extras {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
}

.volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--glass-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    border: none;
}

.download-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.download-btn:hover {
    color: var(--cyan);
    border-color: rgba(0, 212, 255, 0.3);
}

/* ======================== SCRIPT PANEL ======================== */
.script-panel { padding: 0; overflow: hidden; }

.script-toggle {
    width: 100%;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}

.script-toggle:hover { color: var(--text-primary); }

.chevron-icon { transition: transform 0.2s; }
.script-toggle.open .chevron-icon { transform: rotate(180deg); }

.script-body {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.script-body.open {
    max-height: 400px;
    overflow-y: auto;
}

/* ======================== SMALL BUTTONS ======================== */
.btn-sm {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-bright);
}

.btn-glass:hover { background: var(--glass-hover); }

.btn-ghost {
    background: none;
    color: var(--text-muted);
}

.btn-ghost:hover { color: var(--text-primary); }


.tab-content { display: flex; flex-direction: column; gap: 1rem; }
.tab-content:not(.active) { display: none; }

.tab-section-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

#tab-generate,
#tab-profile,
#tab-apikeys,
#tab-files,
#tab-org {
    width: 100%;
}

.generate-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 860px;
}

.generate-main-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generation-panel {
    padding: 1.15rem 1.15rem 1.2rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(0, 212, 255, 0.05), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
}

/* ======================== ACCOUNT PANEL ======================== */
.account-section {
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
}

.account-section > .panel-title {
    margin-bottom: 0.85rem;
}

.account-card-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr);
    gap: 1rem;
}

.account-card-row-top {
    grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.8fr);
}

.account-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 72%);
    pointer-events: none;
}

.account-section-featured {
    padding: 1.1rem 1.15rem 1.2rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.12), transparent 36%),
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.account-section-compact {
    min-height: 136px;
}

.account-section-tall {
    min-height: 238px;
}

.account-section-sidebar {
    padding: 1.1rem 1.05rem;
}

.account-profile-card {
    background:
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.08), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
}

/* account-api-card: see consolidated rule below in "API Keys" section */

.account-org-card {
    background:
        radial-gradient(circle at top left, rgba(0, 212, 255, 0.06), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
}

/* Profile */
.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.profile-name {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text-bright);
}

.profile-email {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Subscription Stats */
.sub-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.05rem;
}

.stat-item {
    text-align: center;
    padding: 0.85rem 0.75rem;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-bright);
}

/* Plan Selector */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
}

.plan-card {
    padding: 0.95rem 0.75rem;
    background: rgba(255, 255, 255, 0.024);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: var(--glass-hover);
    transform: translateY(-1px);
}

.plan-card.current {
    border-color: var(--cyan);
    background:
        linear-gradient(180deg, rgba(0, 212, 255, 0.16), rgba(99, 102, 241, 0.12)),
        rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(122, 224, 255, 0.22), 0 12px 28px rgba(0, 0, 0, 0.14);
    cursor: default;
}

.plan-card-tier {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.plan-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.15rem;
}

.plan-card-credits {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* API Keys */
.account-api-card {
    overflow: visible;
    background:
        radial-gradient(circle at top right, rgba(124, 92, 255, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
}

.api-key-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.api-key-header .panel-title {
    margin-bottom: 0;
    flex-shrink: 0;
}

.api-key-header .api-key-generate-form {
    margin-bottom: 0;
}

.api-key-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 240px; /* ~4 items */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.api-key-list::-webkit-scrollbar { width: 4px; }
.api-key-list::-webkit-scrollbar-track { background: transparent; }
.api-key-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.api-key-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    transition: border-color 0.2s;
    font-size: 0.78rem;
}

.api-key-item:hover {
    border-color: rgba(0, 212, 255, 0.25);
}

.api-key-item.key-expired {
    opacity: 0.5;
}

.api-key-item-main {
    min-width: 0;
}

.api-key-item-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.api-key-item-prefix {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.api-key-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.key-expired-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--red, #ef4444);
    background: rgba(239, 68, 68, 0.15);
    padding: 0.08rem 0.35rem;
    border-radius: 4px;
    margin-left: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.api-key-item.key-revoked {
    opacity: 0.55;
}

.key-revoked-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--amber, #f59e0b);
    background: rgba(245, 158, 11, 0.15);
    padding: 0.08rem 0.35rem;
    border-radius: 4px;
    margin-left: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.key-revoked-days {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 0.2rem;
    vertical-align: middle;
}

.api-key-revoke-btn {
    padding: 0.2rem 0.55rem !important;
    font-size: 0.72rem !important;
    color: var(--red, #ef4444) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

.api-key-revoke-btn:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

.api-key-restore-btn {
    padding: 0.2rem 0.55rem !important;
    font-size: 0.72rem !important;
    color: var(--amber, #f59e0b) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

.api-key-restore-btn:hover {
    background: rgba(245, 158, 11, 0.12) !important;
}

.api-key-generate-form {
    margin-bottom: 0;
}

.api-key-form-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.api-key-name-input,
.api-key-expires-input {
    flex: 1;
    min-width: 0;
    padding: 0.38rem 0.55rem;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
}

.api-key-expires-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.api-key-expires-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.api-key-expires-input {
    max-width: 140px;
}

.acct-new-key-display {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.new-key-warning {
    width: 100%;
    font-size: 0.74rem;
    color: var(--yellow, #facc15);
    margin: 0 0 0.2rem;
    font-weight: 600;
}

.acct-new-key-display code {
    flex: 1;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78rem;
    color: var(--green);
    background: var(--green-dim);
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    word-break: break-all;
}

/* Usage List */
.usage-list {
    min-height: 168px;
    max-height: 240px;
    overflow-y: auto;
}

.usage-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 2.25rem 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.018);
}

.usage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.82rem;
}

.usage-item:last-child { border-bottom: none; }

.usage-item-location { color: var(--text-bright); font-weight: 500; }
.usage-item-date { color: var(--text-muted); font-size: 0.75rem; }

.usage-item-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.usage-status-completed { color: var(--green); background: var(--green-dim); }
.usage-status-failed { color: var(--red); background: var(--red-dim); }
.usage-status-pending,
.usage-status-processing { color: var(--amber); background: var(--amber-dim); }

/* ======================== ORGANIZATION ======================== */
.org-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.org-create-form {
    display: flex;
    gap: 0.5rem;
}

.org-create-form input {
    flex: 1;
}

.org-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.org-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
}

.org-role-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    color: var(--cyan);
    background: var(--cyan-dim);
}

.org-credits-row {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.org-credits-row strong { color: var(--text-bright); }

.org-members-section { margin-bottom: 1rem; }

.org-members-list, .org-pending-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.org-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.org-member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.org-member-name { color: var(--text-bright); font-weight: 500; }
.org-member-email { color: var(--text-muted); font-size: 0.78rem; }

.org-member-role {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.org-member-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.78rem;
    transition: color 0.2s;
}

.org-member-remove:hover { color: var(--red); }

.org-pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    background: var(--amber-dim);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--amber);
}

.org-admin-controls { margin-bottom: 0.75rem; }

.org-add-member {
    display: flex;
    gap: 0.5rem;
}

.org-add-member input { flex: 1; }

.org-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.org-danger { color: var(--red); }
.org-danger:hover { color: var(--red); opacity: 0.8; }

/* ======================== FORECAST INFO CARD ======================== */
.forecast-info-card { padding: 1.25rem 1.5rem; }

.forecast-info-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.info-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-value {
    font-size: 0.85rem;
    color: var(--text-bright);
}

.info-value a {
    color: var(--cyan);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.payment-error {
    color: var(--red);
}

.payment-muted {
    color: var(--text-muted);
}

/* ======================== WEATHER VISUAL ======================== */
.weather-visual-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(87, 193, 255, 0.14), transparent 38%),
        linear-gradient(155deg, rgba(18, 30, 52, 0.98), rgba(14, 24, 42, 0.92));
}

.weather-visual-scene {
    position: relative;
    height: 210px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(82, 140, 255, 0.2), rgba(12, 18, 32, 0.12)),
        radial-gradient(circle at 30% 25%, rgba(255, 233, 128, 0.26), transparent 30%);
}

.weather-visual-scene::after {
    content: '';
    position: absolute;
    inset: auto -10% -18% -10%;
    height: 42%;
    background:
        radial-gradient(circle at 20% 50%, rgba(28, 47, 76, 0.9), transparent 32%),
        radial-gradient(circle at 50% 35%, rgba(26, 44, 72, 0.95), transparent 38%),
        radial-gradient(circle at 78% 52%, rgba(21, 37, 61, 0.96), transparent 30%);
}

.weather-orb {
    position: absolute;
    top: 24px;
    left: 26px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff6b3, #ffc44d 58%, #ff9e2c 100%);
    box-shadow: 0 0 30px rgba(255, 197, 79, 0.35);
}

.weather-cloud {
    position: absolute;
    background: rgba(227, 236, 255, 0.95);
    border-radius: 999px;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.16));
}

.weather-cloud::before,
.weather-cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.weather-cloud-a {
    width: 92px;
    height: 28px;
    top: 74px;
    left: 84px;
}

.weather-cloud-a::before {
    width: 32px;
    height: 32px;
    left: 12px;
    top: -16px;
}

.weather-cloud-a::after {
    width: 38px;
    height: 38px;
    right: 16px;
    top: -18px;
}

.weather-cloud-b {
    width: 74px;
    height: 22px;
    top: 52px;
    left: 118px;
    opacity: 0.86;
}

.weather-cloud-b::before {
    width: 24px;
    height: 24px;
    left: 8px;
    top: -12px;
}

.weather-cloud-b::after {
    width: 28px;
    height: 28px;
    right: 10px;
    top: -14px;
}

.weather-rain,
.weather-spark {
    position: absolute;
    opacity: 0;
}

.weather-rain {
    width: 3px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(115, 220, 255, 0), rgba(115, 220, 255, 0.95));
}

.weather-rain-a {
    top: 108px;
    left: 118px;
}

.weather-rain-b {
    top: 114px;
    left: 152px;
}

.weather-spark {
    width: 14px;
    height: 28px;
    background: linear-gradient(180deg, rgba(255, 246, 176, 0.98), rgba(255, 170, 46, 0.96));
    clip-path: polygon(45% 0, 100% 0, 60% 44%, 86% 44%, 28% 100%, 42% 58%, 16% 58%);
}

.weather-spark-a {
    top: 94px;
    left: 130px;
}

.weather-spark-b {
    top: 82px;
    left: 156px;
}

.weather-visual-scene.theme-clear .weather-orb {
    box-shadow: 0 0 34px rgba(255, 197, 79, 0.48);
}

.weather-visual-scene.theme-cloudy .weather-orb {
    transform: scale(0.82);
    opacity: 0.85;
}

.weather-visual-scene.theme-rain .weather-rain,
.weather-visual-scene.theme-snow .weather-rain {
    opacity: 1;
}

.weather-visual-scene.theme-storm .weather-rain,
.weather-visual-scene.theme-storm .weather-spark {
    opacity: 1;
}

.weather-visual-scene.theme-fog {
    background:
        linear-gradient(180deg, rgba(99, 121, 155, 0.24), rgba(24, 34, 52, 0.36)),
        radial-gradient(circle at 30% 25%, rgba(220, 231, 255, 0.16), transparent 35%);
}

.weather-visual-copy {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.weather-visual-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.weather-visual-title {
    font-size: 1.3rem;
    line-height: 1;
    color: var(--text-bright);
    margin-top: 0.35rem;
}

.weather-visual-location {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.weather-temp-pill {
    flex-shrink: 0;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
    font-size: 1.2rem;
    font-weight: 700;
}

.weather-visual-summary {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.weather-stat-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.weather-stat {
    padding: 0.7rem 0.75rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.weather-stat-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.22rem;
}

.weather-stat-value {
    display: block;
    color: var(--text-bright);
    font-size: 0.92rem;
    font-weight: 600;
}

/* ======================== PLAYER META ======================== */
.player-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.6rem;
    flex-wrap: wrap;
}

.player-meta:empty { display: none; }

.player-meta-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.player-meta-tag:not(:last-child)::after {
    content: '\00b7';
    margin-left: 0.5rem;
    color: var(--glass-border);
}

/* ======================== ACCOUNT DASHBOARD GRID ======================== */
.acct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 0.9rem;
    align-items: start;
}

.acct-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.acct-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* ======================== FILES SECTION ======================== */
.files-stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.files-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.files-player {
    margin-bottom: 0.85rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.14);
}

.files-player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.55rem;
}

.files-player-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    font-weight: 700;
}

.files-player-name {
    color: var(--text-bright);
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.files-audio-el {
    width: 100%;
    height: 36px;
    filter: hue-rotate(168deg) saturate(0.9) brightness(0.92);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.file-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.file-item-name {
    color: var(--text-bright);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.file-item-actions a,
.file-item-actions button {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
    font-size: 0.75rem;
}

.file-play-btn:hover { color: var(--cyan); border-color: rgba(0,212,255,0.3); }
.file-item-actions a:hover { color: var(--cyan); border-color: rgba(0,212,255,0.3); }
.file-item-actions button:hover { color: var(--red); border-color: rgba(239,68,68,0.3); }

/* ======================== CREDITS INFO CARD ======================== */
.credits-info-card {
    border-color: rgba(0, 212, 255, 0.12);
}

.credits-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.credits-info-list li {
    font-size: 0.82rem;
    color: var(--text-primary);
    padding-left: 1.2rem;
    position: relative;
}

.credits-info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
}

/* ======================== WEATHER DETAILS PANEL ======================== */
.weather-details-panel {
    border-radius: 20px;
    overflow: hidden;
}

.weather-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Day Cards Row (Today / Tomorrow side-by-side) --- */
.wx-day-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.wx-day-card {
    border-radius: 18px;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.wx-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.wx-day-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wx-condition-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.wx-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.wx-hero-emoji {
    font-size: 2.6rem;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.wx-hero-temps {
    display: flex;
    flex-direction: column;
}

.wx-hero-high {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1;
}

.wx-hero-low {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.wx-current-temp {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.1rem;
}

/* --- Stat Grid (2-col tiles) --- */
.wx-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.wx-stat-tile {
    padding: 0.55rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.wx-stat-tile-icon {
    font-size: 0.82rem;
    margin-bottom: 0.15rem;
}

.wx-stat-tile-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wx-stat-tile-value {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-top: 0.08rem;
}

/* --- Day Card Gradient Themes --- */
.weather-grad-clear {
    background: linear-gradient(145deg, rgba(255, 183, 50, 0.18), rgba(255, 120, 20, 0.08), rgba(15, 22, 40, 0.95));
}

.weather-grad-cloudy {
    background: linear-gradient(145deg, rgba(120, 150, 200, 0.2), rgba(80, 100, 140, 0.1), rgba(15, 22, 40, 0.95));
}

.weather-grad-rain {
    background: linear-gradient(145deg, rgba(40, 80, 180, 0.22), rgba(30, 60, 140, 0.1), rgba(10, 18, 38, 0.95));
}

.weather-grad-snow {
    background: linear-gradient(145deg, rgba(180, 210, 240, 0.2), rgba(140, 180, 220, 0.1), rgba(15, 22, 40, 0.95));
}

.weather-grad-storm {
    background: linear-gradient(145deg, rgba(120, 50, 200, 0.2), rgba(80, 30, 160, 0.1), rgba(12, 16, 35, 0.95));
}

.weather-grad-fog {
    background: linear-gradient(145deg, rgba(140, 150, 170, 0.18), rgba(100, 110, 130, 0.08), rgba(15, 22, 40, 0.95));
}

/* --- Hourly Forecast Strip --- */
.wx-hourly-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.wx-hourly-strip::-webkit-scrollbar {
    height: 4px;
}

.wx-hourly-strip::-webkit-scrollbar-track {
    background: transparent;
}

.wx-hourly-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.wx-hour-card {
    flex: 0 0 72px;
    padding: 0.6rem 0.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
}

.wx-hour-card:first-child {
    border-color: rgba(0, 212, 255, 0.2);
    background: rgba(0, 212, 255, 0.06);
}

.wx-hour-time {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.wx-hour-emoji {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.wx-hour-temp {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.2rem;
}

.wx-hour-detail {
    font-size: 0.6rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.wx-hourly-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

/* ======================== FOOTER ======================== */
.landing-footer,
.app-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.landing-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.app-footer {
    margin: 2rem 0 0;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-sep {
    color: var(--glass-border);
    font-size: 0.75rem;
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ======================== CONFIRMATION MODAL ======================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Style modal uses visibility+opacity fade instead of display toggle */
.style-modal-overlay {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.style-modal-overlay.open {
    visibility: visible;
    opacity: 1;
}

.style-modal-overlay .style-modal-card {
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
}

.style-modal-overlay.open .style-modal-card {
    transform: translateY(0) scale(1);
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    max-width: 440px;
    width: 100%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.modal-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.75rem;
}

.modal-card p {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.modal-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-primary);
}

/* iOS-style toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--glass-border);
    border-radius: 24px;
    transition: background 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-bright);
    border-radius: 50%;
    transition: transform 0.25s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--red);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-danger {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.25);
    transition: background 0.15s, opacity 0.15s;
}

.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.25); }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

/* ======================== STYLE BUTTON & MODAL ======================== */
.style-field {
    display: flex;
    flex-direction: column;
}

.style-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    height: 100%;
    min-height: 32px;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.style-btn:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: var(--glass-hover);
}

.style-btn.has-custom::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan-glow);
}

/* Style Modal Card */
.style-modal-card {
    max-width: 620px;
}

.style-modal-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.style-field-group {
    margin-bottom: 0.85rem;
}

.style-field-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.style-textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.82rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.style-textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan);
}

/* External URL section */
.style-external-section {
    margin-bottom: 1.25rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.style-external-section summary {
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.style-external-section summary:hover {
    color: var(--text-primary);
}

.style-external-section[open] summary {
    border-bottom: 1px solid var(--glass-border);
}

.style-external-body {
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.style-ext-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.style-ext-chip {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--cyan);
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}

.style-ext-chip:hover {
    background: rgba(0, 255, 255, 0.12);
    border-color: var(--cyan);
}

.style-ext-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.style-ext-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    opacity: 0.8;
}

.style-ext-row {
    display: flex;
    gap: 0.5rem;
}

.style-ext-input {
    flex: 1;
    padding: 0.4rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.82rem;
    font-family: inherit;
}

.style-ext-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan);
}

.style-ext-controls {
    align-items: center;
}

.style-ext-controls select {
    flex: 0 0 auto;
    width: auto;
    min-width: 140px;
}

.style-ext-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-height: 1.2em;
}

.style-ext-status.success { color: var(--green); }
.style-ext-status.error { color: var(--red); }

/* Modal footer */
.style-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
}

.style-modal-right-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-save {
    padding: 0.4rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: white;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

/* Touch devices: restore comfortable padding for tap targets */
@media (hover: none) {
    textarea, input[type="text"], input[type="date"], select {
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
    }
    .btn-sm { padding: 0.5rem 1rem; }
    .sidebar-btn { padding: 0.7rem 0.75rem; min-height: 44px; }
}

/* ======================== RESPONSIVE ======================== */
@media (min-width: 1024px) {
    .acct-sidebar {
        position: sticky;
        top: 5.5rem;
    }
}

@media (max-width: 1180px) {
    #tab-generate .tab-hero {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .tab-hero {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tab-description {
        max-width: 60ch;
    }

    .acct-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-card-row,
    .account-card-row-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .acct-sidebar {
        position: static;
    }
}

@media (max-width: 820px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 0.5rem 0.75rem;
    }

    .sidebar-group {
        flex-direction: row;
        gap: 0.25rem;
    }

    .sidebar-label {
        display: none;
    }

    .sidebar-divider {
        display: none;
    }

    .sidebar-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .sidebar-toggle-chevron {
        display: none;
    }
}

@media (max-width: 640px) {
    .sub-stats { grid-template-columns: 1fr; }
    .plan-selector { grid-template-columns: repeat(2, 1fr); }
    .org-create-form { flex-direction: column; }
    .org-add-member { flex-direction: column; }

    .landing { padding: 2rem 1rem 1.5rem; }

    .hero-title { font-size: 1.8rem; }
    .hero-tagline { font-size: 0.95rem; }

    .features-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .feature-card { padding: 1rem; }

    .pricing-grid { grid-template-columns: repeat(2, 1fr); }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .compact-row {
        grid-template-columns: 1fr 1fr;
    }

    .compact-row.compact-row-3col {
        grid-template-columns: 1fr 1fr;
    }

    .compact-row.compact-row-3col .style-field {
        grid-column: 1 / -1;
    }

    .compact-row.compact-row-3col .style-btn {
        width: 100%;
    }

    .style-modal-card {
        max-width: 100%;
    }

    .style-modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .style-modal-right-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .top-nav {
        padding: 0.6rem 1rem;
    }

    .nav-title { display: none; }

    .user-email { max-width: 100px; }

    .main-content { padding: 1rem; }

    .tab-heading {
        font-size: 1.6rem;
        max-width: none;
    }

    .tab-hero-note {
        padding: 0.9rem;
    }

    .panel-header {
        flex-direction: column;
    }

    .panel-summary {
        max-width: none;
    }

    .generate-layout {
        max-width: 100%;
    }

    .generate-action-row {
        grid-template-columns: 1fr;
    }

    .generation-panel,
    .glass-card {
        padding: 1rem;
    }

    .player-controls { flex-wrap: wrap; }

    .player-extras {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.5rem;
    }

    .volume-control { display: none; }

    .progress-steps {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .step-line { display: none; }

    .step {
        flex: 0 0 auto;
        padding: 0.25rem 0.5rem;
        background: var(--glass-bg);
        border-radius: 20px;
        border: 1px solid var(--glass-border);
    }

    .step.active { border-color: var(--cyan); }
    .step.completed { border-color: var(--green); }

    .info-grid { grid-template-columns: 1fr; }

    .weather-visual-card {
        grid-template-columns: 1fr;
    }

    .weather-visual-scene {
        height: 140px;
    }

    .modal-card { padding: 1.25rem; }

    .dj-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .wx-day-cards-row {
        grid-template-columns: 1fr;
    }

    .wx-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .file-item { flex-wrap: wrap; }
    .file-item-actions { margin-left: 0; margin-top: 0.25rem; }

    .api-key-form-row,
    .acct-new-key-display,
    .org-credits-row,
    .org-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .api-key-header {
        flex-direction: column;
        align-items: stretch;
    }

    .api-key-item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .api-key-item-meta {
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }

    .api-key-expires-input {
        max-width: none;
    }

    .org-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .files-player-head,
    .weather-visual-topline {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ======================== ORGANIZATION FEED & WEBHOOK ======================== */

.feed-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.feed-card-header .panel-title {
    margin: 0;
}

.feed-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.feed-hint code {
    background: rgba(255, 255, 255, 0.03);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.feed-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.feed-url {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--cyan);
    word-break: break-all;
    cursor: pointer;
}

.feed-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.feed-json-container {
    max-height: 400px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px;
}

.feed-json-content {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.webhook-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.webhook-url-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.webhook-url-input:focus {
    border-color: var(--cyan);
}

.webhook-url-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.webhook-events {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.webhook-events-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.webhook-event-check {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
}

.webhook-event-check input[type="checkbox"] {
    accent-color: var(--cyan);
}

.webhook-status {
    font-size: 0.78rem;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 6px;
}

.webhook-status.active {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--green);
}

.webhook-status.inactive {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--amber);
}
