/* ================================
   BUSINESS AREA - OFISENSE
   Premium Artistic Login + Clean Form
   ================================ */

:root {
    --orange: #FF6B4A;
    --coral: #FF5E6D;
    --pink: #E94560;
    --purple: #9B5DE5;
    --violet: #7B2CBF;
    
    --gradient: linear-gradient(135deg, #FF6B4A 0%, #E94560 50%, #9B5DE5 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(255,107,74,0.1) 0%, rgba(233,69,96,0.1) 50%, rgba(155,93,229,0.1) 100%);
    
    --dark: #0a0a0f;
    --darker: #050508;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dim: rgba(255, 255, 255, 0.4);
    
    --font: 'Ofisense Match', 'Heebo', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--pink);
    color: white;
}

.hidden { display: none !important; }

/* ================================
   ARTISTIC BACKGROUND - LOGIN
   ================================ */

.artistic-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#geometricCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gradient-orbs {
    position: absolute;
    inset: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--pink) 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--orange) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.02); }
}

.geometric-shapes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.shape {
    animation: shapeFloat 15s ease-in-out infinite;
}

.shape-circle-1 { animation-delay: 0s; }
.shape-circle-2 { animation-delay: -5s; }
.shape-triangle-1 { animation-delay: -3s; animation-duration: 18s; }
.shape-triangle-2 { animation-delay: -8s; animation-duration: 20s; }
.shape-line-1 { animation-delay: -2s; animation-duration: 12s; }
.shape-line-2 { animation-delay: -6s; animation-duration: 14s; }
.shape-line-3 { animation-delay: -10s; animation-duration: 16s; }

@keyframes shapeFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 15px) rotate(-3deg); }
    75% { transform: translate(20px, 10px) rotate(8deg); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .orb, .shape {
        animation: none;
    }
}

/* ================================
   LOGIN PAGE
   ================================ */

.login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.back-home {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease);
    z-index: 10;
}

.back-home:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
    border-color: var(--border-hover);
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
}

.login-brand {
    margin-bottom: 40px;
}

.brand-logo img {
    height: 50px;
    filter: drop-shadow(0 10px 30px rgba(233, 69, 96, 0.3));
    animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 10px 30px rgba(233, 69, 96, 0.3)); }
    50% { filter: drop-shadow(0 15px 40px rgba(233, 69, 96, 0.5)); }
}

.login-card {
    position: relative;
    width: 100%;
    padding: 48px 40px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid var(--border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
}

.card-glow {
    position: absolute;
    inset: -1px;
    background: var(--gradient);
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -1;
    filter: blur(20px);
}

.login-card:hover .card-glow {
    opacity: 0.15;
}

.card-content h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: all 0.2s var(--ease);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--pink);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-dim);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.error-message {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(233, 69, 96, 0.4);
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.login-help {
    margin-top: 24px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.login-help a {
    color: var(--pink);
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

/* ================================
   FORM PAGE - CLEAN PREMIUM
   ================================ */

.form-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--darker) 0%, var(--dark) 100%);
}

.form-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-small img {
    height: 32px;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.business-badge {
    padding: 6px 14px;
    background: var(--gradient-subtle);
    border: 1px solid rgba(233,69,96,0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pink);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border-color: var(--border-hover);
}

.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.form-intro {
    text-align: center;
    margin-bottom: 40px;
}

.form-intro h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-intro p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Progress */
.form-progress {
    margin-bottom: 32px;
}

.progress-track {
    height: 4px;
    background: var(--surface);
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    width: 16.67%;
    transition: width 0.4s var(--ease);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.step {
    flex: 1;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 4px;
}

.step:first-child { margin-right: 0; }
.step:last-child { margin-left: 0; }

.step:hover {
    background: var(--surface-hover);
    color: var(--text-muted);
}

.step.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.step.completed {
    background: rgba(155, 93, 229, 0.15);
    border-color: var(--purple);
    color: var(--purple);
}

/* Form Status */
.form-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.form-status.draft {
    background: rgba(255, 107, 74, 0.1);
    border: 1px solid rgba(255, 107, 74, 0.3);
    color: var(--orange);
}

.form-status.submitted {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    color: #2ed573;
}

.form-status.saving {
    background: rgba(155, 93, 229, 0.1);
    border: 1px solid rgba(155, 93, 229, 0.3);
    color: var(--purple);
}

/* Form Sections */
.form-section {
    display: none;
    animation: fadeUp 0.4s var(--ease);
}

.form-section.active {
    display: block;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.business-form .form-field {
    margin-bottom: 24px;
}

.form-field .req {
    color: var(--pink);
}

.other-input {
    margin-top: 12px;
}

/* Chips - Radio & Checkbox */
.radio-row, .checkbox-row, .checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-grid {
    gap: 8px;
}

.radio-chip, .check-chip {
    position: relative;
    cursor: pointer;
}

.radio-chip input, .check-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-chip span, .check-chip span {
    display: inline-block;
    padding: 10px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.radio-chip:hover span, .check-chip:hover span {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    color: var(--text);
}

.radio-chip input:checked + span,
.check-chip input:checked + span {
    background: rgba(233, 69, 96, 0.15);
    border-color: var(--pink);
    color: var(--pink);
}

/* Tone Cards */
.tone-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tone-card {
    position: relative;
    cursor: pointer;
}

.tone-card input {
    position: absolute;
    opacity: 0;
}

.tone-card .tone-icon,
.tone-card .tone-label {
    display: block;
    text-align: center;
}

.tone-card .tone-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.tone-card .tone-label {
    font-weight: 500;
    color: var(--text);
}

.tone-card input + .tone-icon {
    padding: 28px 16px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    transition: all 0.2s;
}

.tone-card:hover input + .tone-icon {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.tone-card input:checked + .tone-icon {
    border-color: var(--pink);
    background: rgba(233, 69, 96, 0.1);
}

/* Process Cards */
.process-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
}

.process-card.conditional {
    border-style: dashed;
}

.process-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.add-more {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

/* Form Navigation */
.form-nav {
    display: flex;
    gap: 16px;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--border);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-prev {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-prev:hover:not(:disabled) {
    background: var(--surface);
    border-color: var(--border-hover);
}

.btn-prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-next, .btn-submit {
    flex: 1;
    background: var(--gradient);
    border: none;
    color: white;
}

.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.35);
}

/* ================================
   THANK YOU PAGE
   ================================ */

.thankyou-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, var(--darker) 0%, var(--dark) 100%);
}

.thankyou-content {
    text-align: center;
    max-width: 500px;
    padding: 60px 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.thankyou-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 24px;
}

.thankyou-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.thankyou-content p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.thankyou-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--border-hover);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px 16px;
}

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

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .back-home {
        top: 20px;
        right: 20px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .card-content h1 {
        font-size: 1.6rem;
    }
    
    .form-header {
        padding: 14px 16px;
    }
    
    .business-badge {
        display: none;
    }
    
    .form-wrapper {
        padding: 32px 16px 60px;
    }
    
    .form-intro h1 {
        font-size: 1.4rem;
    }
    
    .progress-steps {
        gap: 4px;
    }
    
    .step {
        padding: 8px 4px;
        font-size: 0.8rem;
        margin: 0 2px;
    }
    
    .tone-cards {
        grid-template-columns: 1fr;
    }
    
    .form-nav {
        flex-wrap: wrap;
    }
    
    .btn-prev {
        width: 100%;
        order: 2;
    }
    
    .btn-next, .btn-submit {
        width: 100%;
        order: 1;
    }
    
    .process-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0 8px;
    }
    
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .radio-row, .checkbox-row {
        flex-direction: column;
    }
    
    .radio-chip span, .check-chip span {
        width: 100%;
        text-align: center;
    }
}

/* ================================
   ADMIN STYLES (if needed)
   ================================ */
.admin-layout {
    padding: 40px;
}
