:root {
    /* Brand Colors */
    --primary-color: #6366f1; /* Purple/Indigo similar to LinkFox */
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    
    /* Backgrounds */
    --bg-body: #ffffff;
    --bg-light: #f9fafb;
    --bg-sidebar: #ffffff;
    --bg-surface: #ffffff;
    
    /* Text */
    --text-main: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    /* Borders & Shadows */
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Layout */
    --sidebar-width: 240px;
    --header-height: 70px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

body[data-page="landing"] {
    scroll-behavior: smooth;
}

body[data-page="landing"] {
    --lp-surface: rgba(255, 255, 255, 0.70);
    --lp-surface-strong: rgba(255, 255, 255, 0.84);
    --lp-border: rgba(148, 163, 184, 0.26);
    --lp-border-strong: rgba(148, 163, 184, 0.34);
    --lp-shadow: 0 18px 60px rgba(2, 6, 23, 0.08);
    --lp-shadow-hover: 0 22px 70px rgba(2, 6, 23, 0.10);
    --lp-accent: linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.8), rgba(236, 72, 153, 0.75));
    background:
        radial-gradient(1100px 560px at 18% 6%, rgba(99, 102, 241, 0.10), transparent 60%),
        radial-gradient(980px 520px at 92% 10%, rgba(14, 165, 233, 0.08), transparent 60%),
        radial-gradient(980px 560px at 70% 92%, rgba(236, 72, 153, 0.07), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
}

body[data-page="landing"] section[id] {
    scroll-margin-top: calc(var(--header-height) + 18px);
}

/* Utilities */
.hidden { display: none !important; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-size: 1rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.28), 0 8px 18px rgba(236, 72, 153, 0.16);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(99, 102, 241, 0.30), 0 12px 22px rgba(236, 72, 153, 0.18);
}
.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-outline:hover {
    background: rgba(99, 102, 241, 0.06);
}

body[data-page="landing"] .btn-outline {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--lp-border, var(--border-color));
    color: rgba(30, 41, 59, 0.92);
    backdrop-filter: blur(12px);
}

body[data-page="landing"] .btn-outline:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--lp-border-strong, rgba(148, 163, 184, 0.34));
}

body[data-page="landing"] .lp-landing-cta .btn-outline {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.22);
}

body[data-page="landing"] .lp-landing-cta .btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.32);
}
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* ================= Landing Page Styles ================= */
#landing-view {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.landing-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.landing-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.55), rgba(14, 165, 233, 0.35), rgba(236, 72, 153, 0.45), transparent);
    opacity: 0.8;
    pointer-events: none;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}
.logo-badge {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    vertical-align: middle;
}
.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}
.nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-menu a:hover { color: var(--primary-color); }
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.gift-btn {
    background: rgba(255, 255, 255, 0.62);
    color: rgba(30, 41, 59, 0.88);
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid var(--lp-border, var(--border-color));
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.08);
    backdrop-filter: blur(12px);
}

/* Hero Section */
.hero-section {
    margin-top: var(--header-height);
    padding: 80px 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.98));
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section .hero-container::before {
    content: '';
    position: absolute;
    inset: -80px;
    background:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(closest-side at 30% 18%, rgba(0, 0, 0, 0.9), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero-section::before {
    content: '';
    position: absolute;
    width: 900px;
    height: 900px;
    border-radius: 999px;
    top: -520px;
    right: -420px;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.24), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(236, 72, 153, 0.16), transparent 55%);
    filter: blur(2px);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    width: 740px;
    height: 740px;
    border-radius: 999px;
    bottom: -520px;
    left: -420px;
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.18), transparent 58%),
        radial-gradient(circle at 70% 70%, rgba(14, 165, 233, 0.12), transparent 60%);
    pointer-events: none;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-wrap: balance;
}
.hero-text .highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 52ch;
    position: relative;
    padding-left: 16px;
    line-height: 1.65;
}

.hero-desc::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.75), rgba(236, 72, 153, 0.6));
    opacity: 0.9;
}

.lp-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    color: rgba(30, 41, 59, 0.88);
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.lp-hero-kicker::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: conic-gradient(from 180deg, rgba(14, 165, 233, 1), rgba(99, 102, 241, 1), rgba(236, 72, 153, 1), rgba(14, 165, 233, 1));
    box-shadow: 0 14px 28px rgba(99, 102, 241, 0.22);
}
.stats-row {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lp-hero-secondary-cta {
    margin-left: 12px;
}

.lp-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
    color: #64748b;
}

.lp-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stat-icon { font-size: 1.5rem; }

.hero-visual {
    position: relative;
}
.visual-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 20px;
    position: relative;
    z-index: 10;
}
.visual-card img {
    width: 100%;
    border-radius: 12px;
    display: block;
}
.float-card {
    position: absolute;
    bottom: 40px;
    left: -40px;
    background: white;
    padding: 15px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 20;
    max-width: 200px;
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

body[data-page="landing"] a:focus-visible,
body[data-page="landing"] button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.35);
    outline-offset: 3px;
}

.lp-landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.lp-landing-section {
    padding: 72px 0;
    position: relative;
}

.lp-landing-section--white {
    background: rgba(255, 255, 255, 0.22);
}

.lp-landing-section--soft {
    background: rgba(255, 255, 255, 0.14);
}

.lp-landing-section::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.22), transparent);
    pointer-events: none;
}

.lp-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    text-align: center;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.lp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: rgba(30, 41, 59, 0.92);
    font-weight: 900;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.lp-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: conic-gradient(from 180deg, rgba(14, 165, 233, 1), rgba(99, 102, 241, 1), rgba(236, 72, 153, 1), rgba(14, 165, 233, 1));
}

.lp-section-title {
    font-size: 2.1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 10px;
    font-weight: 900;
    text-wrap: balance;
}

.lp-section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 120px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.8), rgba(236, 72, 153, 0.75));
    opacity: 0.55;
}

.lp-section-subtitle {
    color: var(--text-secondary);
    max-width: 64ch;
    font-size: 1.02rem;
    line-height: 1.7;
}

.lp-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 28px;
}

.lp-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    color: #1f2937;
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-size: 0.9rem;
    font-weight: 600;
}

.lp-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.lp-feature-card {
    border: 1px solid var(--lp-border, var(--border-color));
    border-radius: 16px;
    background: var(--lp-surface, #fff);
    padding: 18px;
    box-shadow: var(--lp-shadow, var(--shadow-sm));
    transition: box-shadow 160ms ease, border-color 160ms ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.lp-feature-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.85), rgba(14, 165, 233, 0.65), rgba(236, 72, 153, 0.75));
    opacity: 0.25;
    transition: opacity 160ms ease;
}

.lp-feature-card:hover {
    border-color: var(--lp-border-strong, rgba(148, 163, 184, 0.34));
    box-shadow: var(--lp-shadow-hover, var(--shadow-md));
}

.lp-feature-card:hover::before {
    opacity: 0.55;
}

.lp-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12));
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 18px;
}

.lp-feature-title {
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.lp-feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    margin-top: 6px;
    grid-auto-rows: 170px;
}

.lp-gallery-split {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
    gap: 44px;
    align-items: center;
    margin-top: 8px;
}

.lp-mosaic-panel {
    border-radius: 24px;
    padding: 18px;
    background:
        radial-gradient(820px 380px at 18% 8%, rgba(99, 102, 241, 0.20), transparent 58%),
        radial-gradient(760px 360px at 92% 14%, rgba(14, 165, 233, 0.16), transparent 58%),
        radial-gradient(780px 360px at 70% 92%, rgba(236, 72, 153, 0.12), transparent 58%),
        rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(14px);
}

.lp-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 140px;
    gap: 14px;
}

.lp-mosaic-item {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.lp-mosaic-item:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.32);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

.lp-mosaic-item--hero {
    grid-column: 1 / -1;
    grid-row: span 2;
}

.lp-mosaic-media {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.lp-mosaic-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 260ms ease;
}

.lp-mosaic-item:hover .lp-mosaic-media img {
    transform: scale(1.04);
}

.lp-mosaic-cap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98));
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.lp-mosaic-cap-badge {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    color: rgba(79, 70, 229, 0.98);
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.20);
}

.lp-mosaic-cap-text {
    min-width: 0;
    font-size: 0.9rem;
    color: rgba(30, 41, 59, 0.88);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-gallery-copy {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.70);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    padding: 22px 22px;
    backdrop-filter: blur(14px);
}

.lp-copy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: rgba(30, 41, 59, 0.92);
    font-weight: 900;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.lp-copy-title {
    margin: 14px 0 10px;
    font-size: 1.65rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 900;
    color: var(--text-main);
    text-wrap: balance;
}

.lp-copy-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-copy-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
}

.lp-copy-list li i {
    color: rgba(79, 70, 229, 0.95);
    margin-top: 4px;
}

.lp-copy-cta {
    width: 100%;
}

.lp-gallery-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #fff;
    box-shadow: var(--shadow-sm);
    grid-column: span 4;
    grid-row: span 1;
    isolation: isolate;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.lp-gallery-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
    background: radial-gradient(600px 260px at 20% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(520px 240px at 90% 20%, rgba(236, 72, 153, 0.12), transparent 60%);
    opacity: 0.0;
    transition: opacity 180ms ease;
    pointer-events: none;
    z-index: 1;
}

.lp-gallery-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.lp-gallery-card:hover::before {
    opacity: 1;
}

.lp-gallery-card--wide {
    grid-column: span 8;
    grid-row: span 2;
}

.lp-gallery-card--tall {
    grid-column: span 4;
    grid-row: span 2;
}

.lp-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 260ms ease;
}

.lp-gallery-card:hover img {
    transform: scale(1.04);
}

.lp-gallery-label {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.lp-gallery-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.06) 60%, rgba(0, 0, 0, 0.38));
    pointer-events: none;
    z-index: 2;
}

.lp-gallery-meta {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    z-index: 4;
}

.lp-gallery-meta-text {
    min-width: 0;
}

.lp-gallery-meta-title {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: 0.01em;
    font-size: 1rem;
    line-height: 1.2;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.lp-gallery-meta-desc {
    margin-top: 4px;
    font-size: 0.86rem;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.lp-gallery-meta-tag {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.lp-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.lp-step {
    border: 1px solid var(--lp-border, var(--border-color));
    border-radius: 16px;
    background: var(--lp-surface, #fff);
    padding: 18px;
    box-shadow: var(--lp-shadow, var(--shadow-sm));
    backdrop-filter: blur(12px);
    transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lp-step:hover {
    border-color: var(--lp-border-strong, rgba(148, 163, 184, 0.34));
    box-shadow: var(--lp-shadow-hover, var(--shadow-md));
    transform: translateY(-1px);
}

.lp-step-num {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.2);
    margin-bottom: 12px;
}

.lp-step-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.lp-step-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.lp-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.lp-showcase-card {
    border: 1px solid var(--lp-border, var(--border-color));
    border-radius: 18px;
    background: var(--lp-surface, #fff);
    padding: 18px;
    overflow: hidden;
    box-shadow: var(--lp-shadow, var(--shadow-sm));
    backdrop-filter: blur(12px);
    transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lp-showcase-card:hover {
    border-color: var(--lp-border-strong, rgba(148, 163, 184, 0.34));
    box-shadow: var(--lp-shadow-hover, var(--shadow-md));
    transform: translateY(-1px);
}

.lp-showcase-media {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #f8fafc;
    margin: 10px 0 14px;
}

.lp-showcase-media img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.lp-showcase-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(30, 41, 59, 0.88);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.26);
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
}

.lp-showcase-title {
    font-weight: 900;
    margin-bottom: 8px;
}

.lp-showcase-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.lp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.lp-price-card {
    position: relative;
    border: 1px solid var(--lp-border, var(--border-color));
    border-radius: 18px;
    background: var(--lp-surface, #fff);
    padding: 22px;
    box-shadow: var(--lp-shadow, var(--shadow-sm));
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lp-price-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 2px;
    background: var(--lp-accent, linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.8), rgba(236, 72, 153, 0.75)));
    opacity: 0.18;
    pointer-events: none;
}

.lp-price-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 260px at 20% 10%, rgba(99, 102, 241, 0.12), transparent 60%),
        radial-gradient(520px 240px at 90% 20%, rgba(14, 165, 233, 0.10), transparent 60%),
        radial-gradient(520px 240px at 70% 90%, rgba(236, 72, 153, 0.08), transparent 60%);
    opacity: 0.0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.lp-price-card:hover {
    border-color: var(--lp-border-strong, rgba(148, 163, 184, 0.34));
    box-shadow: var(--lp-shadow-hover, var(--shadow-md));
    transform: translateY(-2px);
}

.lp-price-card:hover::before {
    opacity: 1;
}

.lp-price-card--popular {
    border-color: rgba(99, 102, 241, 0.38);
    box-shadow: 0 22px 70px rgba(99, 102, 241, 0.14);
}

.lp-price-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(14, 165, 233, 0.85));
}

.lp-price-tier {
    font-weight: 900;
    color: var(--text-main);
}

.lp-price {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.lp-price-unit {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: -10px;
}

.lp-price-power {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: rgba(99, 102, 241, 0.08);
    color: rgba(30, 41, 59, 0.92);
    font-weight: 900;
    font-size: 0.92rem;
}

.lp-price-power i {
    color: rgba(99, 102, 241, 0.95);
}

.lp-price-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-secondary);
    padding: 8px 0 0;
}

.lp-price-features i {
    color: rgba(99, 102, 241, 0.95);
    margin-right: 8px;
}

.lp-price-cta {
    width: 100%;
    margin-top: auto;
}

.lp-faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-faq-item {
    border: 1px solid var(--lp-border, var(--border-color));
    border-radius: 16px;
    background: var(--lp-surface, #fff);
    padding: 14px 16px;
    box-shadow: var(--lp-shadow, var(--shadow-sm));
    backdrop-filter: blur(12px);
    transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lp-faq-item:hover {
    border-color: var(--lp-border-strong, rgba(148, 163, 184, 0.34));
    box-shadow: var(--lp-shadow-hover, var(--shadow-md));
    transform: translateY(-1px);
}

.lp-faq-q {
    cursor: pointer;
    list-style: none;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lp-faq-q::after {
    content: '';
    width: 28px;
    height: 28px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.06);
    position: relative;
}

.lp-faq-q::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: rgba(30, 41, 59, 0.88);
    right: 16px;
    border-radius: 999px;
    transform: translateY(0);
    pointer-events: none;
}

.lp-faq-item[open] .lp-faq-q::before {
    background: rgba(99, 102, 241, 0.95);
}

.lp-faq-item[open] .lp-faq-q::after {
    border-color: rgba(99, 102, 241, 0.28);
}

.lp-faq-q::-webkit-details-marker {
    display: none;
}

.lp-faq-a {
    margin-top: 10px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.lp-landing-cta {
    padding: 70px 0;
    background: radial-gradient(1200px 460px at 18% 30%, rgba(99, 102, 241, 0.26), transparent 60%),
        radial-gradient(980px 420px at 86% 42%, rgba(14, 165, 233, 0.20), transparent 60%),
        radial-gradient(980px 420px at 70% 90%, rgba(236, 72, 153, 0.18), transparent 62%),
        linear-gradient(180deg, #070A12, #070A12);
    color: #fff;
}

.lp-landing-cta-inner {
    border-radius: 22px;
    padding: 26px 22px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
}

.lp-landing-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.lp-landing-cta-title {
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.lp-landing-cta-subtitle {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.78);
    max-width: 70ch;
}

.lp-landing-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lp-landing-footer {
    padding: 44px 0;
    background: rgba(255, 255, 255, 0.22);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(12px);
}

.lp-landing-footer {
    position: relative;
}

.lp-landing-footer::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.40), rgba(14, 165, 233, 0.22), rgba(236, 72, 153, 0.30), transparent);
    opacity: 0.85;
    pointer-events: none;
}

.lp-landing-footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: start;
}

.lp-footer-desc {
    margin-top: 10px;
    color: var(--text-secondary);
    max-width: 56ch;
}

.lp-footer-links {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lp-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
}

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

.lp-footer-links a {
    position: relative;
}

.lp-footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 999px;
    background: var(--lp-accent, linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.8), rgba(236, 72, 153, 0.75)));
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}

.lp-footer-links a:hover::after {
    opacity: 0.35;
    transform: translateY(0);
}

.lp-footer-meta {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* ================= History Item Styles ================= */
.history-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
    width: 100%;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.history-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.history-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: contain;
    border: 1px solid #eee;
    background-color: #f9fafb;
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-grid {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Increased gap between type rows */
}

.history-type-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.type-header {
    font-size: 0.9rem;
    font-weight: 600;
    background: #f0fdf4;
    color: #15803d;
    padding: 4px 12px;
    border-radius: 4px;
    width: fit-content;
}

.type-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    align-items: start; /* Prevent rows from stretching to same height */
}


.task-card {
    background: white;
    display: flex;
    flex-direction: column;
}

.card-visual {
    width: 100%;
    /* aspect-ratio: 1; Removed to allow natural height */
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-visual.loading {
    min-height: 200px;
}

.card-visual:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

#app-view {
    display: flex;
    height: 100vh;
    background-color: var(--bg-light);
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}
.app-logo {
    padding: 0 24px;
    margin-bottom: 30px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}
.sidebar-menu {
    list-style: none;
    flex: 1;
}
.menu-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.menu-item:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}
.menu-item.active {
    background-color: #eef2ff;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}
.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Main Content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.app-topbar {
    height: 60px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}
.topbar-title { font-weight: 600; font-size: 1.1rem; }
.topbar-actions { display: flex; gap: 15px; }

/* Workspace */
.workspace {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 350px 1fr; /* Input Panel | Output Panel */
    gap: 30px;
}

.workspace.full-width {
    grid-template-columns: 1fr;
}

.workspace.full-width .input-panel {
    display: none;
}

/* Input Panel */
.input-panel {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: fit-content;
}
.panel-section h3 {
    font-size: 0.95rem;
    margin: 0 0 12px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
}
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}
.upload-area:hover {
    border-color: var(--primary-color);
    background: #eef2ff;
}
.upload-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}
.file-preview-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}
.preview-item {
    position: relative;
    width: 60px;
    height: 60px;
}
.preview-thumb {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.preview-delete-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}
.input-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.text-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 120px;
}
.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.lp-product-info-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

body[data-page="generate"] .panel-section .section-header {
    margin-bottom: 12px !important;
}

.lp-product-info-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lp-product-info-tooltip {
    width: 460px;
}

.lp-product-info-tip {
    white-space: pre-wrap;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.lp-product-desc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.lp-toast-layer {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    pointer-events: none;
}

.lp-toast {
    pointer-events: auto;
    max-width: min(520px, calc(100vw - 24px));
    width: fit-content;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.lp-toast--error {
    border: 1px solid rgba(239, 68, 68, 0.55);
}

.lp-toast--success {
    border: 1px solid rgba(34, 197, 94, 0.45);
}

.lp-toast--info {
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.lp-toast-icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    opacity: 0.9;
    flex: 0 0 auto;
}

.lp-toast-content {
    white-space: pre-wrap;
}

.lp-toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 16px;
    margin-left: 6px;
}

.lp-toast-close:hover {
    color: rgba(255, 255, 255, 0.95);
}

.lp-guide-link {
    border: none;
    background: transparent;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.lp-guide-link:hover {
    color: var(--primary-color);
}

.lp-guide-link i {
    font-size: 0.9rem;
}

/* Settings Controls */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.counter-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 2px;
}

.counter-btn {
    border: none;
    background: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.counter-btn:hover { color: var(--primary-color); }

.count-val {
    font-size: 0.85rem;
    width: 15px;
    text-align: center;
    font-weight: 600;
}

.ratio-group, .model-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-btn, .model-btn {
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-btn:hover, .model-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.radio-btn.active, .model-btn.active {
    background: #eef2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.model-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}
.model-btn {
    justify-content: center;
    text-align: center;
}

.points-summary {
    text-align: center;
    margin: 10px 0 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.points-summary.is-insufficient {
    color: #ef4444;
    font-weight: 600;
}

/* Output Panel */
.output-panel {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.result-display {
    flex: 1;
    background: #f3f4f6;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column; /* Force column layout */
    align-items: stretch; /* Stretch items to full width */
    justify-content: flex-start; /* Start from top */
    min-height: 400px;
    position: relative;
    overflow-y: auto; /* Allow scrolling if needed, though parent usually scrolls */
    padding: 20px;
    gap: 20px; /* Gap between history items */
}

/* Dropdown Hover Styles */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 20;
    min-width: 140px;
    padding: 4px 0;
}

.dropdown-wrapper:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.dropdown-item.delete-item {
    color: #ef4444;
}
.dropdown-item.delete-item:hover {
    background: #fee2e2;
}
.placeholder-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    gap: 10px;
    color: var(--text-muted);
    width: 100%;
    padding-top: 70px;
    margin-top: 0;
}
.generated-image {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: var(--shadow-md);
}
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ================= Generated Image Actions ================= */
.action-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}
.card-visual:hover .action-overlay {
    opacity: 1;
}

.download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    color: #333;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    border: none;
}
.card-visual:hover .download-btn {
    opacity: 1;
}
.download-btn:hover {
    background: #f9fafb;
}

.lp-image-magnifier-btn {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 6;
    font-size: 36px;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.card-visual:hover .lp-image-magnifier-btn {
    background: rgba(0, 0, 0, 0.18);
}

.lp-image-magnifier-btn:hover {
    background: rgba(0, 0, 0, 0.18);
}

.view-btn {
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.view-btn:hover {
    text-decoration: underline;
}

.lp-video-thumb-wrap {
    position: relative;
    width: 100%;
    cursor: default;
}

.lp-video-thumb {
    width: 100%;
    height: auto;
    display: block;
    background: #f3f4f6;
}

.lp-video-play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95);
    font-size: 36px;
    text-shadow: 0 6px 18px rgba(0,0,0,0.45);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.lp-video-thumb-wrap:hover .lp-video-play-badge {
    background: rgba(0, 0, 0, 0.18);
}

/* ================= Tooltips ================= */
.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.tooltip-icon {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.tooltip-content {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #333 transparent transparent;
}

.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.tooltip-image-placeholder, .tooltip-grid-placeholder {
    margin-top: 10px;
    border: 1px dashed #555;
    padding: 4px;
    border-radius: 4px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#gallery-modal.modal-backdrop {
    z-index: 3000;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}
.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.lp-project-modal {
    width: min(92vw, 1080px);
    height: min(86vh, 720px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lp-project-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
}

.lp-project-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.lp-project-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-project-title-input {
    width: 220px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

.lp-project-title-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-project-modal-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
}

.lp-project-list {
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.lp-project-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.lp-project-list-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.lp-project-list-scroll {
    overflow: auto;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.lp-project-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.lp-project-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.lp-project-card.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-project-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

.lp-project-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.lp-project-card-del {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-project-card-del:hover {
    background: #f8fafc;
    border-color: #e5e7eb;
    color: #ef4444;
}

.lp-project-card-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    gap: 10px;
}

.lp-project-card-previews {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.lp-project-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    min-width: 0;
}

.lp-project-preview-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    flex-shrink: 0;
}

.lp-project-preview-img.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.lp-project-preview-name {
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-batch-item-add-row {
    background: transparent;
    border: 1px dashed #e5e7eb;
}

.lp-batch-item-add-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.lp-batch-item-add-cell.lp-batch-item-add-cell--full {
    grid-column: 1 / -1;
}

.lp-batch-add-item-btn {
    width: auto;
    min-width: 180px;
    padding: 0 24px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.lp-batch-add-item-btn:hover {
    background: #e0e7ff;
}

.lp-project-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.lp-project-badge {
    font-size: 11px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #334155;
    white-space: nowrap;
}

.lp-project-badge.is-type {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

.lp-project-badge.is-draft {
    border-color: #e5e7eb;
    background: #fff;
    color: #475569;
}

.lp-project-badge.is-running {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.lp-project-badge.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.lp-batch-complete-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.lp-batch-complete-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    gap: 10px;
}

.lp-batch-complete-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-batch-complete-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lp-batch-complete-tabs {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.lp-batch-tab {
    height: 32px;
    padding: 0 12px;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
}

.lp-batch-tab.is-active {
    background: #eef2ff;
    color: #4f46e5;
}

.lp-batch-complete-grid {
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.lp-batch-complete-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    padding: 2px 2px 0;
}

.lp-batch-complete-group-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.lp-batch-complete-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 18vw, 220px), 1fr));
    gap: 10px;
    align-items: start;
    grid-auto-rows: 8px;
    grid-auto-flow: dense;
}

.lp-batch-complete-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: default;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    grid-row-end: span var(--lp-complete-span, 1);
}

.lp-batch-complete-card.is-clickable {
    cursor: pointer;
}

.lp-batch-complete-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.lp-batch-complete-media {
    width: 100%;
    aspect-ratio: var(--lp-complete-ar, 3 / 4);
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 520px) {
    .lp-batch-complete-grid {
        padding: 12px;
        gap: 14px;
    }
    .lp-batch-complete-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

.lp-batch-complete-card:hover .lp-batch-complete-media .action-overlay {
    opacity: 1;
}

.lp-batch-complete-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
}

.lp-batch-complete-check {
    position: absolute;
    right: 10px;
    bottom: 44px;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
}

.lp-batch-complete-card.is-selected .lp-batch-complete-check {
    background: rgba(79, 70, 229, 0.95);
    border-color: rgba(79, 70, 229, 0.95);
    color: #fff;
}

.lp-batch-complete-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #64748b;
}

.lp-batch-complete-pill {
    font-size: 11px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    white-space: nowrap;
}

.lp-batch-complete-pill.is-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.lp-batch-complete-pill.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.lp-batch-complete-pill.is-failed {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.lp-batch-progress-visual {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #475569;
    font-size: 14px;
    text-align: center;
    padding: 12px;
}

.lp-batch-progress-stick {
    width: 10px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
    background-size: 100% 200%;
    background-position: 0% 0%;
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.25);
    animation: lp-batch-stick-move 1.1s ease-in-out infinite;
}

@keyframes lp-batch-stick-move {
    0% { background-position: 0% 0%; opacity: 0.75; }
    50% { background-position: 0% 100%; opacity: 1; }
    100% { background-position: 0% 0%; opacity: 0.75; }
}

.lp-batch-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.lp-batch-progress-val {
    color: #111827;
}

.lp-batch-progress-visual.is-failed {
    color: #b91c1c;
}

.lp-batch-progress-visual.is-failed .lp-batch-progress-stick {
    display: none;
}

.lp-batch-progress-visual.is-failed i {
    font-size: 28px;
    color: #ef4444;
}

.lp-project-detail {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.lp-project-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    gap: 10px;
}

.lp-project-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.lp-project-progress-bar {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.lp-project-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 999px;
    transition: width 200ms ease;
}

.lp-project-progress-text {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.lp-project-active-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.lp-project-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-project-items-scroll {
    overflow: auto;
    padding: 12px 14px;
    display: grid;
    gap: 12px;
    min-height: 0;
}

.lp-project-item-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: grid;
    gap: 10px;
}

.lp-project-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-project-item-name {
    flex: 1;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

.lp-project-item-name:focus,
.lp-project-item-selling:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-project-item-selling {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 84px;
    resize: vertical;
    font-size: 13px;
    outline: none;
}

.lp-project-item-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lp-project-item-thumb {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    object-fit: cover;
}

.lp-project-item-submeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
}

.lp-batch-view {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    min-width: 0;
    justify-self: stretch;
    align-self: stretch;
}

.lp-batch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    gap: 12px;
}

.lp-batch-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-batch-header-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.lp-batch-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-batch-title-input {
    width: 220px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.lp-batch-title-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-batch-body {
    display: grid;
    grid-template-columns: 170px 1fr;
    min-height: 0;
    flex: 1;
}

.lp-batch-sidebar {
    border-right: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 10px;
    gap: 10px;
}

.lp-batch-side-create {
    width: 100%;
    justify-content: center;
}

.lp-batch-side-item {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    cursor: pointer;
}

.lp-batch-side-item.is-active {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

.lp-batch-side-refresh {
    width: 100%;
}

.lp-batch-project-list {
    overflow: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
}

.lp-batch-projects-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.lp-batch-items-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.lp-batch-projects-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    gap: 10px;
}

.lp-batch-projects-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.lp-batch-projects-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lp-batch-project-filter,
.lp-batch-project-date {
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #111827;
}

.lp-batch-project-filter:focus,
.lp-batch-project-date:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-batch-project-search {
    width: 220px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.lp-batch-project-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-batch-items-view.hidden,
.lp-batch-projects-view.hidden {
    display: none;
}

.lp-batch-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.lp-batch-main-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    gap: 10px;
}

.lp-batch-project-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.lp-batch-items-head {
    display: grid;
    grid-template-columns: 240px 360px 1fr 160px;
    gap: 12px;
    padding: 10px 14px;
    font-size: 12px;
    color: #64748b;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.lp-batch-required {
    color: #ef4444;
    margin-left: 4px;
    font-weight: 700;
}

.lp-batch-ai-hint {
    margin-left: 10px;
    font-size: 11px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    user-select: none;
}

.lp-batch-ai-hint.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lp-batch-ai-hint.is-running {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #4f46e5;
}

.lp-batch-upload-tile.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.lp-batch-items-scroll {
    overflow: auto;
    padding: 12px 14px;
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 0;
    flex: 1;
}

.lp-batch-item-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 240px 360px 1fr 160px;
    gap: 12px;
    align-items: start;
}

.lp-batch-item-name {
    width: 100%;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

.lp-batch-item-name:focus,
.lp-batch-item-selling:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-batch-item-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.lp-batch-item-thumb {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    object-fit: cover;
}

.lp-batch-thumb-wrap {
    position: relative;
    width: 54px;
    height: 54px;
}

.lp-batch-thumb-delete {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
}

.lp-batch-thumb-delete:hover {
    background: rgba(220, 38, 38, 1);
}

.lp-batch-thumb-delete i {
    pointer-events: none;
}

.lp-batch-thumb-label {
    position: absolute;
    left: 4px;
    bottom: 4px;
    font-size: 11px;
    line-height: 1;
    color: #fff;
    background: rgba(17, 24, 39, 0.66);
    padding: 3px 6px;
    border-radius: 999px;
}

.lp-batch-upload-tile {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    border: 1px dashed #a5b4fc;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    user-select: none;
}

.lp-batch-upload-tile span {
    font-size: 11px;
    color: #6366f1;
}

.lp-batch-item-selling {
    width: 100%;
    min-height: 84px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    resize: vertical;
    font-size: 13px;
    outline: none;
}

.lp-batch-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.lp-batch-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    gap: 12px;
}

.lp-batch-footer .btn.btn-primary {
    min-width: 160px;
}

.lp-batch-footer-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.lp-batch-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lp-batch-brand-gene {
    padding: 12px 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-batch-brand-gene-title {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.lp-batch-settings {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.lp-batch-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lp-batch-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: #111827;
    cursor: pointer;
    user-select: none;
}

.lp-batch-pill input {
    width: 14px;
    height: 14px;
}

.lp-batch-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: #111827;
    cursor: pointer;
    user-select: none;
}

.lp-batch-chip input {
    width: 14px;
    height: 14px;
}

.lp-batch-chip-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 6px;
    border-left: 1px solid #e5e7eb;
    color: #111827;
}

.lp-batch-mini-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.lp-batch-mini-btn:hover {
    background: #f8fafc;
}

.lp-batch-setting {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lp-batch-setting-label {
    font-size: 12px;
    color: #64748b;
}

.lp-batch-select {
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 12px;
    background: #fff;
    outline: none;
}

.lp-batch-select:disabled {
    color: #94a3b8;
    background: #f8fafc;
}

.lp-batch-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
    color: #111827;
}

.lp-batch-points-hint {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

@media (max-width: 880px) {
    .lp-project-modal-body {
        grid-template-columns: 1fr;
    }
    .lp-project-list {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    .lp-project-title-input {
        width: 160px;
    }
}

.lp-product-wizard {
    width: min(92vw, 780px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    overflow: hidden;
}

.lp-product-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.lp-product-wizard-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.lp-product-wizard-body {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}

.lp-wizard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.lp-wizard-field label {
    display: block;
    font-size: 12px;
    color: #374151;
    margin-bottom: 6px;
}

.lp-wizard-field input,
.lp-wizard-field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.lp-wizard-field textarea {
    min-height: 110px;
    resize: vertical;
}

.lp-wizard-field input:focus,
.lp-wizard-field textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lp-product-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px 18px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

@media (max-width: 640px) {
    .lp-wizard-row {
        grid-template-columns: 1fr;
    }
    .lp-product-info-tooltip {
        width: 320px;
    }
}

.lp-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.lp-modal-close:hover {
    background: rgba(17,24,39,0.06);
}

.lp-modal-close.is-absolute {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.92);
}

.lp-modal-close.is-absolute:hover {
    background: rgba(255,255,255,0.98);
}

.lp-modal-close.is-dark {
    background: rgba(17,24,39,0.6);
    color: #fff;
}

.lp-modal-close.is-dark:hover {
    background: rgba(17,24,39,0.75);
}

.lp-modal-close.is-inline {
    position: static;
    background: transparent;
}

.lp-modal-close.is-inline:hover {
    background: rgba(17,24,39,0.06);
}

.lp-subscribe {
    width: min(980px, 94vw);
    height: min(720px, 92vh);
    background: #f7f7fb;
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0,0,0,0.45);
    padding: 26px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    overflow: auto;
}

.lp-subscribe-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.2px;
    margin-top: 10px;
}

.lp-subscribe-hint {
    text-align: center;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.35;
    margin-top: -6px;
}

.lp-subscribe-toggle {
    margin: 0 auto;
    position: relative;
    width: min(420px, 92%);
    background: rgba(99,102,241,0.12);
    border-radius: 14px;
    padding: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    align-items: center;
}

.lp-toggle-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 0;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
    color: #111827;
}

.lp-toggle-btn.is-active {
    background: #fff;
    box-shadow: 0 10px 30px rgba(17,24,39,0.08);
    border: 1px solid rgba(229,231,235,0.9);
}

.lp-toggle-badge {
    position: absolute;
    right: -10px;
    top: -10px;
    background: #fb7185;
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 999px;
    display: none;
}

.lp-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 6px 6px 14px;
}

.lp-plan-card {
    background: #fff;
    border: 1px solid rgba(229,231,235,0.95);
    border-radius: 16px;
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 16px 46px rgba(17,24,39,0.06);
}

.lp-plan-name {
    font-weight: 800;
    color: #111827;
    font-size: 1.05rem;
}

.lp-plan-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 6px;
}

.lp-plan-price {
    font-size: 2.3rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.5px;
    margin-top: 6px;
}

.lp-plan-power {
    color: #111827;
    font-weight: 800;
}

.lp-plan-meta {
    color: #6b7280;
    font-size: 0.88rem;
}

.lp-plan-btn {
    margin-top: auto;
    width: 100%;
    height: 44px;
    border-radius: 14px;
}

.lp-points {
    width: min(720px, 94vw);
    height: min(680px, 92vh);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0,0,0,0.45);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: auto;
}

.lp-points-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lp-points-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.lp-points-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #111827;
}

.lp-points-balance {
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(229,231,235,0.95);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-points-balance-num {
    font-size: 2.6rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.6px;
}

.lp-points-balance-sub {
    color: #6b7280;
    font-size: 0.9rem;
}

.lp-points-section-title {
    font-weight: 900;
    color: #111827;
    margin-top: 4px;
}

.lp-points-list {
    margin-top: 8px;
    border: 1px solid rgba(229,231,235,0.95);
    border-radius: 14px;
    overflow: hidden;
}

.lp-points-pagination {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lp-points-page-info {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
}

.lp-ledger-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid rgba(243,244,246,0.95);
}

.lp-ledger-row:last-child {
    border-bottom: 0;
}

.lp-ledger-kind {
    font-weight: 900;
    color: #111827;
}

.lp-ledger-time {
    margin-top: 4px;
    color: #6b7280;
    font-size: 0.85rem;
}

.lp-ledger-meta {
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.35;
}

.lp-ledger-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lp-ledger-delta {
    font-weight: 900;
    color: #111827;
}

.lp-ledger-delta.is-neg {
    color: #ef4444;
}

.lp-ledger-delta.is-pos {
    color: #22c55e;
}

.lp-ledger-after {
    color: #6b7280;
    font-size: 0.85rem;
}

.lp-points-empty {
    padding: 18px 14px;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 960px) {
    .lp-plan-grid {
        grid-template-columns: 1fr;
    }
}

.auth-modal-content {
    width: min(980px, 94vw);
    height: min(560px, 92vh);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 22px 70px rgba(0,0,0,0.55);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
}

.auth-modal-left {
    position: relative;
    background: radial-gradient(120% 120% at 10% 10%, #f6f0ff 0%, #f7fbff 45%, #fff 100%);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.auth-modal-left-card {
    flex: 1;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.72) 100%);
    border: 1px solid rgba(229,231,235,0.75);
    box-shadow: 0 20px 60px rgba(17,24,39,0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-modal-left-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-modal-left-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(229,231,235,0.9);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(260px, 86%);
    box-shadow: 0 18px 50px rgba(17,24,39,0.12);
}

.auth-modal-left-badge-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #111827;
}

.auth-modal-left-badge-sub {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.2;
}

.auth-modal-right {
    position: relative;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #111827;
}

.auth-modal-close:hover {
    background: rgba(17,24,39,0.06);
}

.auth-modal-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 12px;
}

.auth-tab {
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #111827;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: default;
}

.auth-tab.active {
    background: transparent;
    color: #111827;
    box-shadow: none;
}

.auth-modal-form {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 0.85rem;
    color: #374151;
    font-weight: 600;
}

.auth-input {
    width: 100%;
    height: 42px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 12px;
    outline: none;
    font-size: 14px;
    color: #111827;
    background: #fff;
}

.auth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.auth-code-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-code-row .auth-input {
    flex: 1;
}

.auth-login-btn {
    height: 46px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    margin-top: 12px;
}

.auth-login-helper {
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.2;
}

.auth-bottom {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-agree-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 0.92rem;
}

.auth-agree-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.auth-agree-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

.auth-agree-links a:hover {
    text-decoration: underline;
}

.auth-agree-warn {
    min-height: 18px;
    font-size: 0.92rem;
    color: #ef4444;
    font-weight: 700;
}

.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(14, 165, 233, 0.82), rgba(236, 72, 153, 0.68));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(99, 102, 241, 0.18);
    transition: filter 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.user-avatar-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 18px 52px rgba(99, 102, 241, 0.22);
    transform: translateY(-1px);
}

.user-avatar-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.26), 0 18px 52px rgba(99, 102, 241, 0.22);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-menu-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 22px));
    background: var(--lp-surface, rgba(255, 255, 255, 0.92));
    border: 1px solid var(--lp-border, rgba(148, 163, 184, 0.28));
    border-radius: 16px;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.18);
    overflow: hidden;
    z-index: 220;
    backdrop-filter: blur(14px);
}

.user-menu-popover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 220px at 18% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(520px 220px at 82% 20%, rgba(14, 165, 233, 0.14), transparent 62%),
        radial-gradient(520px 220px at 60% 92%, rgba(236, 72, 153, 0.10), transparent 62%);
    opacity: 0.95;
    pointer-events: none;
}

.user-menu-popover > * {
    position: relative;
    z-index: 1;
}

.user-menu-head {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.20);
}

.user-menu-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(14, 165, 233, 0.82), rgba(236, 72, 153, 0.70));
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 44px rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.user-menu-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.user-menu-phone {
    color: rgba(15, 23, 42, 0.92);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-name {
    color: rgba(71, 85, 105, 0.92);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-meta .user-menu-name:last-child {
    color: rgba(99, 102, 241, 0.92);
    font-weight: 800;
}

.user-menu-actions {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-menu-item {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.70);
    color: rgba(15, 23, 42, 0.92);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(99, 102, 241, 0.26);
    box-shadow: 0 14px 34px rgba(99, 102, 241, 0.10);
    transform: translateY(-1px);
}

.user-menu-item:focus-visible {
    outline: none;
    border-color: rgba(99, 102, 241, 0.34);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18), 0 14px 34px rgba(99, 102, 241, 0.10);
}

.user-menu-item-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.user-menu-item-left i {
    width: 18px;
    text-align: center;
    color: rgba(71, 85, 105, 0.92);
}

.user-menu-item-right {
    color: rgba(100, 116, 139, 0.82);
    font-size: 0.85rem;
}

.user-menu-item.is-danger .user-menu-item-left i {
    color: #ef4444;
}

.user-menu-item.is-danger:hover {
    border-color: rgba(239, 68, 68, 0.30);
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.10);
}

.auth-tip {
    min-height: 18px;
    font-size: 0.85rem;
    color: #6b7280;
}

.auth-tip[data-type="error"] {
    color: #ef4444;
    font-weight: 600;
}

.auth-tip[data-type="ok"] {
    color: #10b981;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.8;
}
.modal-close:hover { opacity: 1; }

.image-detail-modal-content {
    width: min(1400px, 94vw);
    height: min(820px, 92vh);
    background: #f3f4f6;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.image-detail-header {
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.image-detail-title {
    font-weight: 700;
    color: #111827;
}

.image-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-detail-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
}

.image-detail-close:hover {
    background: rgba(17,24,39,0.06);
}

.image-detail-body {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.35fr) 340px;
    gap: 12px;
    padding: 12px;
    overflow: hidden;
}

.image-detail-left,
.image-detail-center,
.image-detail-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.image-detail-panel-title {
    padding: 12px 14px;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.image-detail-image-wrap {
    flex: 1;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    gap: 12px;
}

.lp-aspect-android {
    width: min(100%, 420px);
    max-height: 100%;
    aspect-ratio: 3 / 4; /* 安卓常见拍照比例 */
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-detail-image-wrap img,
.image-detail-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

.image-detail-image-wrap video,
.image-detail-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f3f4f6;
}

.image-detail-thumb-video {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
}

.image-detail-thumb-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-detail-characters {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-detail-empty {
    color: #6b7280;
    font-size: 0.9rem;
    padding: 8px 0;
}

.video-detail-character {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.video-detail-character-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-detail-character-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-detail-character-placeholder {
    font-size: 0.8rem;
    color: #6b7280;
}

.video-detail-character-id {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    word-break: break-all;
}

.video-detail-character-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
    word-break: break-word;
}

.video-detail-add {
    padding: 0 12px 12px;
}

.video-detail-add-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.video-detail-input {
    flex: 1;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0 10px;
    font-size: 0.9rem;
    outline: none;
}

.video-detail-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}

.image-detail-main {
    flex: 1;
    padding: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    gap: 12px;
}

.image-detail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
}

.image-detail-nav:hover {
    background: #fff;
}

.image-detail-prev { left: 14px; }
.image-detail-next { right: 14px; }

.image-detail-thumbs {
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    border-top: 1px solid #f3f4f6;
    background: #fff;
}

.image-detail-thumb {
    width: 78px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    border: 2px solid transparent;
    padding: 0;
    background: transparent;
    cursor: pointer;
    flex: 0 0 auto;
    overflow: hidden;
}

.image-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-detail-thumb.active {
    border-color: #6366f1;
}

.image-detail-sidebar-title {
    padding: 12px 14px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.image-detail-tools {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(180deg, rgba(99,102,241,0.12), rgba(99,102,241,0.04));
}

.image-detail-tools-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 10px;
}

.image-detail-tool-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
}

.image-detail-tool-btn:hover {
    background: #f9fafb;
}

.image-detail-tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: rgba(99,102,241,0.12);
}

.image-detail-tool-label {
    font-weight: 700;
    color: #111827;
}

.image-detail-kv {
    padding: 12px 14px;
    overflow: auto;
}

.lp-character-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.lp-character-modal {
    width: min(920px, 94vw);
    max-height: min(820px, 92vh);
    overflow: auto;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    padding: 18px 18px 16px;
    color: #111827;
}

.lp-character-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lp-character-close:hover {
    background: #f3f4f6;
}

.lp-character-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 54px;
}

.lp-character-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.22);
}

.lp-character-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.lp-character-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 14px;
}

.lp-character-body {
    margin-top: 16px;
}

.lp-character-section-title {
    font-size: 14px;
    color: #6b7280;
    margin: 14px 0 10px;
    font-weight: 700;
}

.lp-character-video-wrap {
    position: relative;
    border-radius: 18px;
    background: #000;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    padding: 16px;
}

.lp-character-video-wrap video {
    width: 100%;
    max-height: 360px;
    border-radius: 16px;
    display: block;
    background: #000;
}

.lp-character-video-time {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
}

.lp-character-hint {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.lp-character-form {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.lp-character-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lp-character-label {
    font-size: 13px;
    color: #374151;
    font-weight: 700;
}

.lp-character-required {
    color: #fb7185;
}

.lp-character-input {
    height: 44px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    padding: 0 14px;
    outline: none;
    font-size: 14px;
}

.lp-character-input::placeholder {
    color: #9ca3af;
}

.lp-character-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.lp-character-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.lp-character-warn {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #b45309;
}

.lp-character-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: rgba(254, 202, 202, 0.95);
    font-size: 13px;
}

.lp-character-submit {
    margin-top: 14px;
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

.lp-character-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.lp-character-submit:hover:not(:disabled) {
    filter: brightness(1.03);
}

@media (max-width: 640px) {
    .lp-character-grid {
        grid-template-columns: 1fr;
    }
    .lp-character-modal {
        padding: 18px 16px 14px;
        border-radius: 20px;
    }
}

.image-detail-row {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.image-detail-row:last-child {
    border-bottom: none;
}

.image-detail-row .k {
    color: #6b7280;
    font-size: 0.85rem;
}

.image-detail-row .v {
    color: #111827;
    font-size: 0.9rem;
    word-break: break-word;
}

.image-detail-mini {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    object-fit: cover;
    vertical-align: middle;
}

.te-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
}

.te-header {
    height: 56px;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.te-header-left,
.te-header-center,
.te-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.te-header-center {
    justify-content: center;
}

.te-header-right {
    justify-content: flex-end;
}

.te-header-title {
    font-weight: 800;
    color: #111827;
}

.te-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}

.te-icon-btn:hover {
    background: rgba(17,24,39,0.06);
    color: #6b7280;
}

.te-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.te-body {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 12px;
    padding: 12px;
    overflow: hidden;
}

.te-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.te-panel-title {
    padding: 12px 14px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.te-panel-body {
    padding: 12px 14px;
    overflow: auto;
}

.te-stage-wrap {
    flex: 1;
    padding: 12px;
    overflow: auto;
    background: #f9fafb;
}

.te-stage {
    position: relative;
    width: fit-content;
    margin: 0 auto;
    padding: 96px;
}

.te-zoom {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 80;
    pointer-events: none;
}

.te-zoom-inner {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(229,231,235,0.9);
    box-shadow: 0 10px 26px rgba(17,24,39,0.16);
    backdrop-filter: blur(10px);
}

.te-zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(229,231,235,0.95);
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.te-zoom-btn:hover {
    background: #f9fafb;
}

.te-zoom-val {
    min-width: 54px;
    text-align: center;
    font-weight: 700;
    color: #111827;
    user-select: none;
    cursor: pointer;
}

.te-artboard {
    position: relative;
    width: fit-content;
}

.te-base-img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    background: #fff;
}

.te-base-img.is-loading {
    opacity: 0;
    box-shadow: none;
    background: transparent;
}

.te-overlay {
    position: absolute;
    inset: 0;
    overflow: visible;
}

.te-text {
    position: absolute;
    padding: 2px 4px;
    border-radius: 8px;
    background: rgba(255,255,255,0.55);
    outline: 2px solid rgba(99,102,241,0.25);
    color: #111827;
    cursor: move;
    user-select: none;
    line-height: 1.15;
    white-space: pre-wrap;
    word-break: break-word;
}

.te-text:focus {
    background: rgba(255,255,255,0.9);
    outline-color: rgba(99,102,241,0.85);
    user-select: text;
}

.te-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(99,102,241,0.95);
    border: 2px solid rgba(255,255,255,0.95);
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    pointer-events: auto;
}

.te-text .te-handle { display: none; }
.te-text[data-selected="1"] .te-handle { display: block; }

.te-handle[data-dir="tl"] { left: -6px; top: -6px; cursor: nwse-resize; }
.te-handle[data-dir="tr"] { right: -6px; top: -6px; cursor: nesw-resize; }
.te-handle[data-dir="bl"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.te-handle[data-dir="br"] { right: -6px; bottom: -6px; cursor: nwse-resize; }

.te-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.te-row:last-child {
    border-bottom: none;
}

.te-row .k {
    color: #6b7280;
    font-size: 0.85rem;
}

.te-row .v input,
.te-row .v select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    outline: none;
}

.te-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.te-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.te-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.te-item-top strong {
    font-size: 0.9rem;
    color: #111827;
}

.te-item-actions {
    display: flex;
    gap: 8px;
}

.te-item-actions button {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
}

.te-item-actions button:hover {
    background: #f9fafb;
}

.te-status {
    font-size: 0.9rem;
    color: #6b7280;
}

@media (max-width: 1200px) {
    .te-body {
        grid-template-columns: 1fr;
        overflow: auto;
    }
}

@media (max-width: 1200px) {
    .image-detail-body {
        grid-template-columns: 1fr;
        overflow: auto;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .workspace { grid-template-columns: 1fr; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-desc { padding-left: 0; margin-left: auto; margin-right: auto; }
    .hero-desc::before { display: none; }
    .hero-visual { display: none; } /* Simplify for mobile */
    .app-sidebar { position: absolute; left: -100%; height: 100%; z-index: 50; transition: left 0.3s; }
    .app-sidebar.active { left: 0; }

    .nav-menu { gap: 16px; }
    .header-actions { gap: 10px; }

    .lp-landing-section { padding: 56px 0; }
    .lp-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-gallery-split { grid-template-columns: 1fr; gap: 18px; }
    .lp-gallery-copy { max-width: 640px; margin-left: auto; margin-right: auto; }
    .lp-gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 150px; }
    .lp-gallery-card { grid-column: span 3; grid-row: span 1; }
    .lp-gallery-card--wide { grid-column: span 6; grid-row: span 2; }
    .lp-gallery-card--tall { grid-column: span 3; grid-row: span 2; }
    .lp-steps { grid-template-columns: 1fr; }
    .lp-showcase { grid-template-columns: 1fr; }
    .lp-pricing-grid { grid-template-columns: 1fr; }
    .lp-landing-cta-inner { flex-direction: column; align-items: flex-start; }
    .lp-landing-footer-inner { grid-template-columns: 1fr; }
    .lp-footer-links { justify-content: flex-start; }

    .lp-showcase-media img { height: 180px; }
}

@media (max-width: 640px) {
    .header-inner { padding: 0 14px; }
    .nav-menu { display: none; }
    .gift-btn { display: none; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-desc { font-size: 1.05rem; }
    .stats-row { justify-content: center; gap: 18px; }
    .lp-hero-secondary-cta { display: none; }
    .hero-desc { padding-left: 0; }
    .hero-desc::before { display: none; }
    .lp-mosaic-panel { padding: 12px; border-radius: 18px; }
    .lp-mosaic-grid { grid-auto-rows: 122px; gap: 12px; }
    .lp-mosaic-item { border-radius: 16px; }
    .lp-gallery-copy { padding: 18px 16px; }
    .lp-copy-title { font-size: 1.45rem; }
    .lp-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 190px; }
    .lp-gallery-card,
    .lp-gallery-card--wide,
    .lp-gallery-card--tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .lp-feature-grid { grid-template-columns: 1fr; }
    .lp-section-title { font-size: 1.75rem; }
    .lp-landing-cta-title { font-size: 1.7rem; }
}
.type-images-grid.grid-aplus {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
}

.type-images-grid.grid-aplus .card-visual {
    /* Allow A+ images to be wider */
    min-height: 150px; /* Reduced min-height since they are wide */
}

/* Global styling for failed cards to ensure consistent square layout */
.card-visual.status-failed {
    min-height: 200px;
    background: #fff1f2; /* Light error background */
    border-color: #fecaca;
}

/* Specific styling for A+ grid to constrain width */
.type-images-grid.grid-aplus .card-visual.status-failed {
    width: 100%;
    min-height: 150px;
}

/* Ensure generated images in A+ grid fill the width */
.type-images-grid.grid-aplus .generated-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}
/* ================= Upload Actions ================= */
.upload-actions-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    z-index: 2; /* Ensure clickable above dropzone if needed */
    position: relative;
}

.btn-upload-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    z-index: 10; /* Make sure it captures click */
}

.btn-upload-action:not(.outline) {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.btn-upload-action:not(.outline):hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-upload-action.outline {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-upload-action.outline:hover {
    background-color: #f3f4f6;
    transform: translateY(-1px);
}

/* ================= Gallery Modal ================= */
.gallery-modal-content {
    width: 900px !important; /* Wider than standard modal */
    max-width: 95vw;
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important; /* Reset padding for flex layout */
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.gallery-filter-bar {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.gallery-filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-filter-input {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    font-size: 0.9rem;
}

.gallery-filter-sep {
    color: var(--text-muted);
}

.gallery-filter-right {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    background: transparent;
}

.modal-close:hover {
    color: var(--text-main);
    background: rgba(17,24,39,0.06);
}

.gallery-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: var(--bg-light);
}

.gallery-date-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gallery-date-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    margin: 0;
}

.gallery-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #e5e7eb;

    /* Performance: large lists in a scroll container */
    content-visibility: auto;
    contain-intrinsic-size: 160px 160px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item.selected {
    border-color: var(--primary-color);
}

.gallery-item.selected::after {
    content: '\f00c'; /* FontAwesome Check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.brand-gene-entry {
    width: 100%;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s ease;
}

.brand-gene-entry:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.brand-gene-entry-left {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.brand-gene-entry-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.brand-gene-entry-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-gene-entry-clear {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.brand-gene-entry-clear:hover {
    background: #f3f4f6;
    color: var(--text-secondary);
    border-color: #d1d5db;
}

.font-icon-auto,
.font-icon-geometric,
.font-icon-bold,
.font-icon-serif {
    background: #111827;
    color: #fff;
}

.font-icon-serif {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: 800;
}

.font-icon-bold {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
}

.font-icon-geometric {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-gene-entry-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.brand-gene-entry-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.brand-gene-entry-arrow {
    color: var(--text-muted);
}

.brand-gene-modal-content {
    width: 520px;
    max-width: 95vw;
    height: 82vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
}

.brand-gene-modal-header {
    background: #fff;
}

.brand-gene-edit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.brand-gene-edit-back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.brand-gene-edit-back:hover {
    background: rgba(17,24,39,0.06);
    color: var(--text-main);
}

.brand-gene-edit-title {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.05rem;
}

.brand-gene-edit-name {
    padding: 6px 0 10px;
}

.brand-gene-edit-label {
    font-weight: 700;
    color: var(--text-secondary);
    margin: 8px 0 8px;
}

.brand-gene-edit-required {
    color: #ef4444;
}

.brand-gene-edit-input {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0 12px;
    font-size: 1rem;
    outline: none;
}

.brand-gene-edit-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.brand-gene-modal-tabs {
    display: flex;
    gap: 18px;
    align-items: center;
}

.brand-gene-tab {
    background: transparent;
    border: none;
    padding: 10px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.brand-gene-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.brand-gene-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 10px;
    background: #fff;
}

.brand-gene-apply-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 14px;
}

.brand-gene-apply-title {
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 2px;
}

.brand-gene-apply-all {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

.brand-gene-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
}

.brand-gene-chip input {
    margin: 0;
}

.brand-gene-section-title {
    font-weight: 600;
    color: var(--text-secondary);
    margin: 14px 0 8px;
}

.brand-gene-card {
    width: 100%;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.15s ease;
}

.brand-gene-card:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.brand-gene-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-gene-color-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: conic-gradient(from 180deg at 50% 50%, #8b5cf6, #06b6d4, #22c55e, #f59e0b, #ef4444, #8b5cf6);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.brand-gene-font-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.brand-gene-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.brand-gene-card-title {
    font-weight: 700;
    color: var(--text-main);
}

.brand-gene-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.brand-gene-card-arrow {
    color: var(--text-muted);
}

.brand-gene-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-gene-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.brand-gene-icon-btn:hover {
    background: #f3f4f6;
    color: var(--text-secondary);
    border-color: #d1d5db;
}

.brand-gene-font-dropdown {
    margin-top: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.brand-gene-font-option {
    width: 100%;
    border: none;
    background: #fff;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.brand-gene-font-option:hover {
    background: #f9fafb;
}

.brand-gene-font-option.active {
    background: #f3f0ff;
}

.brand-gene-font-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-gene-font-option-title {
    font-weight: 700;
    color: var(--text-main);
}

.brand-gene-font-option-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.brand-color-modal-content {
    width: 520px !important;
    max-width: 95vw;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
}

.brand-color-picker {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-library-name-modal-content {
    width: 640px !important;
    max-width: 95vw;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
}

.brand-library-name-body {
    padding: 18px 22px 6px;
}

.brand-library-name-input {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0 14px;
    font-size: 1rem;
    outline: none;
}

.brand-library-name-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.brand-library-name-hint {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.brand-color-sv {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    cursor: crosshair;
}

.brand-color-sv canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.brand-color-sv-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transform: translate(-8px, -8px);
    pointer-events: none;
}

.brand-color-controls {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 12px;
    align-items: center;
}

.brand-color-eyedropper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-color-eyedropper:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.brand-color-hue {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    appearance: none;
    background: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    outline: none;
}

.brand-color-hue::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(0,0,0,0.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}

.brand-color-preview-swatch {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #000;
}

.brand-color-hex-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px;
    align-items: center;
}

.brand-color-format {
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 12px;
    background: #fff;
    font-weight: 700;
    color: var(--text-main);
}

.brand-color-hex-input {
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand-color-hex-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.brand-gene-select-row {
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
}

.brand-gene-custom-language-row {
    margin-top: 8px;
}

.brand-gene-select {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-main);
}

.brand-gene-textarea {
    width: 100%;
    min-height: 110px;
    resize: none;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fff;
}

.brand-gene-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.brand-gene-textarea-meta {
    display: flex;
    justify-content: flex-end;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
}

.brand-gene-library-empty {
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.brand-gene-library-empty-title {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.brand-gene-library-empty-subtitle {
    font-size: 0.9rem;
}

.brand-gene-library-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand-gene-library-item {
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #f3f0ff;
    transition: all 0.15s ease;
}

.brand-gene-library-item:hover {
    border-color: rgba(99, 102, 241, 0.6);
}

.brand-gene-library-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-gene-library-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.brand-gene-library-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-gene-library-name {
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-gene-library-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-gene-library-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-gene-library-flag {
    font-size: 1.05rem;
    line-height: 1;
}

.brand-gene-library-action {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: #f3f0ff;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.brand-gene-library-action:hover {
    background: #fff;
    border-color: rgba(99, 102, 241, 0.6);
    color: var(--text-main);
}

.brand-gene-modal-footer {
    justify-content: space-between;
}
