﻿/* ==========================================================================
   DRC AI Image Studio — 100% Clean Light Luxury Theme
   ========================================================================== */
:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-border-focus: #0284c7;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --accent-blue: #0284c7;
    --accent-indigo: #4f46e5;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #ef4444;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   1. AUTH & PRICING PORTAL (LIGHT THEME)
   ========================================================================== */
#auth-portal {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 40%, #e2e8f0 100%);
    color: var(--text-primary);
    padding: 2rem 1.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.2rem;
}

.auth-logo {
    height: 56px;
    width: auto;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.auth-subtitle {
    font-size: 0.92rem;
    color: #475569;
    margin-top: 0.35rem;
    font-weight: 500;
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

/* PRICING PLANS */
.pricing-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.plans-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.plan-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: #0284c7;
    box-shadow: 0 12px 20px -5px rgba(2, 132, 199, 0.15);
}

.plan-card.popular {
    background: #ffffff;
    border: 2px solid #0284c7;
    box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.2);
}

.plan-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: #0284c7;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.plan-price {
    margin: 0.6rem 0 0.8rem;
}

.plan-price .amount {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0284c7;
    font-family: 'JetBrains Mono', monospace;
}

.plan-price .period {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.plan-quota-pill {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.95rem;
    display: inline-block;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: #334155;
    margin-bottom: 1.35rem;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-whatsapp-order {
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-order:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

/* LOGIN BOX */
.login-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.login-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: #0f172a;
}

.login-card p {
    font-size: 0.76rem;
    color: #64748b;
    margin-bottom: 1.35rem;
}

.auth-form-group {
    margin-bottom: 0.95rem;
}

.auth-form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.3rem;
}

.auth-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: #0f172a;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.15s ease;
}

.auth-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-login-submit {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.btn-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.btn-request-signup {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: var(--radius-sm);
    padding: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.65rem;
    width: 100%;
    transition: all 0.15s ease;
}

.btn-request-signup:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* ==========================================================================
   2. APP HEADER & STUDIO COCKPIT (LIGHT THEME)
   ========================================================================== */
#studio-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8fafc;
}

.top-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.45rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo {
    height: 34px;
    width: auto;
    max-width: 42px;
    object-fit: contain;
    border-radius: 6px;
}

.brand-text h1 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.sub-brand {
    font-size: 0.68rem;
    color: var(--text-muted);
}

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

.user-badge-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #0f172a;
}

.btn-change-pass {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 0.2rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-change-pass:hover {
    background: #dbeafe;
}

.btn-logout {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 14px;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-logout:hover {
    background: #fecaca;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

/* TAB BAR */
.tab-bar {
    display: flex;
    gap: 0.35rem;
    padding: 0.35rem 1.25rem 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.tab-btn:hover { color: var(--accent-blue); }
.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    font-weight: 700;
}

.main-layout {
    flex: 1;
    padding: 0.6rem 1rem;
    max-width: 100%;
}

.tab-content {
    display: none;
    height: 100%;
}

.tab-content.active { display: block; }

/* 3-COLUMN STUDIO COCKPIT GRID */
.studio-cockpit-grid {
    display: grid;
    grid-template-columns: 28% 34% 38%;
    gap: 0.75rem;
    height: calc(100vh - 105px);
    min-height: 580px;
}

.cockpit-col {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.5rem;
}

.col-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* COLUMN 1: THEMES & UPLOAD */
.form-group-compact { margin-bottom: 0.45rem; }
.form-group-compact label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.2rem;
    display: block;
}

.form-control-compact {
    width: 100%;
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
}

.form-control-compact:focus {
    border-color: #0284c7;
}

.quota-pill-compact {
    font-size: 0.68rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
    font-weight: 600;
}

.category-mini-bar {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-bottom: 0.35rem;
    scrollbar-width: thin;
}

.category-mini-bar::-webkit-scrollbar { height: 4px; }
.category-mini-bar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cat-mini-btn {
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cat-mini-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.subtheme-scroll-box {
    flex: 1;
    overflow-y: auto;
    max-height: 240px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 0.35rem;
    scrollbar-width: thin;
}

.subtheme-scroll-box::-webkit-scrollbar { width: 4px; }
.subtheme-scroll-box::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.subtheme-grid {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
}

.subtheme-grid.active { display: grid; }

.theme-card-compact {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-card-compact:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.theme-card-compact.active {
    border-color: #0284c7;
    background: #e0f2fe;
    box-shadow: 0 0 0 1.5px #0284c7;
}

.theme-card-compact input[type="radio"] { display: none; }

.theme-thumb-compact {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.theme-meta-compact {
    overflow: hidden;
    line-height: 1.15;
}

.theme-name-compact {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.theme-desc-compact {
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.drop-zone-compact {
    border: 1.5px dashed #94a3b8;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    text-align: center;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 0.35rem;
}

.drop-zone-compact:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.drop-text-compact {
    font-size: 0.72rem;
    color: #334155;
}

.file-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #e0f2fe;
    color: #0284c7;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* COLUMN 2: CONTROLS & 3D ROTATION */
.col-tabs-header {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.col-tab-btn {
    flex: 1;
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    text-align: center;
}

.col-tab-btn.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.controls-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
}

.controls-pane.active { display: flex; }

.sliders-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.slider-unit {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.slider-unit-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
}

.slider-val-compact {
    font-family: 'JetBrains Mono', monospace;
    color: #0284c7;
    font-weight: 700;
}

.slider-compact {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: #cbd5e1;
    outline: none;
}

.slider-compact::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.preset-mini-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.4rem 0;
    flex-wrap: wrap;
}

.preset-mini-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-mini-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.action-buttons-stack {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.4rem;
}

.btn-render-main {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
    transition: all 0.15s ease;
}

.btn-render-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4);
}

.btn-apply-3d-main {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
    transition: all 0.15s ease;
}

.btn-apply-3d-main:hover { transform: translateY(-1px); }

/* ==========================================================================
   3. COLUMN 3: CLEAN LIGHT STUDIO VIEWPORT (1:1 Aspect Ratio)
   ========================================================================== */
.output-viewport-square {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    position: relative;
    overflow: hidden;
    align-items: center;
}

.output-cell-square {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.output-cell-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    padding: 0.25rem 0.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    z-index: 2;
}

.output-cell-media-square {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    perspective: 800px;
    width: 100%;
    height: 100%;
    background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50%/12px 12px;
}

.output-cell-media-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.05s linear;
}

.empty-cell-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.quick-theme-ribbon {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

.quick-theme-ribbon::-webkit-scrollbar { height: 3px; }
.quick-theme-ribbon::-webkit-scrollbar-thumb { background: #cbd5e1; }

.chip-btn-mini {
    white-space: nowrap;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
}

.chip-btn-mini.active {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0284c7;
    font-weight: 700;
}

.output-actions-row {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.btn-act-compact {
    flex: 1;
    padding: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-act-compact:hover { background: #f1f5f9; }
.btn-act-compact.primary {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.loading-compact-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.spinner-mini {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulsing-btn { animation: pulse-primary 1.5s infinite; }
@keyframes pulse-primary {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* ==========================================================================
   4. DATA TABLES & MODALS (LIGHT THEME)
   ========================================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.data-table th {
    background: #f8fafc;
    padding: 0.45rem 0.6rem;
    font-weight: 700;
    color: #475569;
    border-bottom: 1.5px solid #cbd5e1;
    text-align: left;
}

.data-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
}

.pill {
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-block;
}
.pill-green { background: #ecfdf5; color: #059669; }
.pill-red { background: #fef2f2; color: #dc2626; }
.pill-blue { background: #eff6ff; color: #1d4ed8; }
.pill-amber { background: #fffbeb; color: #b45309; }

.btn-table-action {
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-table-action:hover { background: #f1f5f9; }
.btn-table-action.success { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.btn-table-action.danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

/* MODALS */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 480px;
    padding: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15);
}

.modal-preview-card {
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-preview-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 1rem;
    overflow: hidden;
}

.modal-preview-viewer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-preview-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #64748b;
}

.btn-close:hover { color: #0f172a; }

/* ==========================================================================
   GLOBAL ENTERPRISE BRANDS SHOWCASE (TOP SECTION)
   ========================================================================== */
.trusted-brands-container {
    width: 100%;
    max-width: 1200px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.trusted-brands-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #64748b;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
}

.brands-marquee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.2rem 0;
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    opacity: 0.72;
    transition: all 0.25s ease;
    cursor: default;
    padding: 0.25rem 0.5rem;
}

.brand-item:hover {
    opacity: 1;
    color: #0f172a;
    transform: translateY(-2px);
}

.brand-logo-svg {
    height: 24px;
    width: auto;
    max-width: 130px;
}



.brand-img {
    height: 38px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%) contrast(120%);
    opacity: 0.75;
    transition: all 0.25s ease;
}

.brand-item:hover .brand-img {
    filter: grayscale(0%) contrast(100%);
    opacity: 1;
    transform: scale(1.06);
}



/* ==========================================================================
   ULTRA-PROFESSIONAL LIGHT LUXURY PORTAL STYLING
   ========================================================================== */
#auth-portal {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #f0fdf4 0%, #f8fafc 45%, #f1f5f9 100%);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 3.5rem;
}

/* TOP PORTAL NAV */
.portal-nav {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}

.portal-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portal-logo {
    height: 40px;
    width: auto;
    max-width: 48px;
    object-fit: contain;
    border-radius: 6px;
}

.portal-brand-meta {
    display: flex;
    flex-direction: column;
}

.portal-brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.1;
}

.portal-brand-edition {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portal-nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 20px;
    padding: 0.25rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.nav-help-link {
    text-decoration: none;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    transition: all 0.2s ease;
}

.nav-help-link:hover {
    border-color: #25d366;
    color: #065f46;
    background: #f0fdf4;
}

/* HERO CONTAINER */
.portal-hero-container {
    max-width: 1280px;
    width: 100%;
    padding: 2.2rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-header-block {
    text-align: center;
    max-width: 900px;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.hero-main-title {
    font-size: 2.35rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.18;
    color: #0f172a;
    margin-bottom: 0.8rem;
}

.hero-lead-text {
    font-size: 0.96rem;
    color: #475569;
    line-height: 1.55;
    font-weight: 500;
}

/* PORTAL 2-COLUMN GRID */
.portal-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.8rem;
    width: 100%;
    align-items: start;
}

/* PRICING CARD CONTAINER */
.pricing-container-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
}

.pricing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.4rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.pricing-pretitle {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0284c7;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.2rem;
}

.pricing-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.pricing-tag-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* PLANS ROW */
.plans-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.plan-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
}

.plan-card:hover {
    border-color: #0284c7;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.12);
}

.plan-card.popular {
    border: 2px solid #0284c7;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 40%);
    box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.18);
}

.plan-card.enterprise {
    border-color: #6366f1;
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 40%);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

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

.plan-type-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
}

.plan-type-badge.pro {
    background: #e0f2fe;
    color: #0369a1;
}

.plan-type-badge.enterprise {
    background: #ede9fe;
    color: #6d28d9;
}

.plan-price {
    margin: 0.4rem 0 0.6rem;
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.plan-price .currency {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0284c7;
}

.plan-price .amount {
    font-size: 1.55rem;
    font-weight: 900;
    color: #0f172a;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.03em;
}

.plan-price .period {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.plan-quota-pill {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    display: inline-block;
}

.popular-pill {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.enterprise-pill {
    background: #ede9fe;
    color: #6d28d9;
    border-color: #ddd6fe;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #334155;
    margin-bottom: 1.25rem;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-check {
    color: #10b981;
    font-weight: 800;
    font-size: 0.82rem;
}

.icon-cross {
    color: #94a3b8;
    font-weight: 800;
    font-size: 0.82rem;
}

.feature-disabled {
    color: #94a3b8;
    text-decoration: line-through;
}

.btn-whatsapp-order {
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp-order:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

.popular-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.popular-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

/* METRICS FOOTER ROW */
.pricing-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'JetBrains Mono', monospace;
}

.metric-lbl {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.15rem;
}

.metric-divider {
    width: 1px;
    height: 24px;
    background: #cbd5e1;
}

/* RIGHT COLUMN: LOGIN BOX */
.login-card-container {
    width: 100%;
}

.login-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.login-header-group {
    margin-bottom: 1.35rem;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.4;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 0.9rem;
    color: #64748b;
    pointer-events: none;
}

.input-with-icon .auth-input {
    padding-left: 2.25rem;
}

.quick-credentials-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    margin: 1rem 0;
}

.quick-cred-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    display: block;
    margin-bottom: 0.35rem;
}

.quick-cred-chips {
    display: flex;
    gap: 0.4rem;
}

.quick-chip {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.25rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-chip:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
}

.login-footer-action {
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.9rem;
    margin-top: 0.5rem;
}

.no-account-text {
    font-size: 0.72rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.4rem;
}



/* PROJECT NODE LOCKED PILL */
.node-pill-locked {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    font-size: 0.74rem;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.node-pill-locked .node-icon {
    font-size: 0.8rem;
}

.node-pill-locked .node-label {
    color: #64748b;
    font-weight: 600;
}

.node-pill-locked .node-name {
    color: #0284c7;
    font-weight: 800;
    letter-spacing: -0.01em;
}

