/* SCARAL MASTER ENGINE INTEGRATION */
@import url('system/scaral-master.css');

/**
 * SCARAL AI Smart Finance - Platinum Design System (EDP v3.0)
 * 🏛️ Extreme Premium Aesthetic Architecture
 * Standard Compliance: Zero !important usage.
 */

:root {
    --accent-teal: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.4);
    --card-glass-bg: rgba(15, 23, 42, 0.65);
    --card-glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background: #020617;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(112, 0, 255, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: white;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.finance-container {
    padding: 140px 20px 100px;
    max-width: 960px;
    margin: 0 auto;
}

.finance-card {
    background: var(--card-glass-bg);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid var(--card-glass-border);
    border-radius: 40px;
    padding: 70px;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.finance-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle at top right, rgba(0, 242, 255, 0.1), transparent 70%);
    pointer-events: none;
}

.finance-title {
    font-size: clamp(2.4rem, 8vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.finance-subtitle {
    color: #94a3b8;
    margin-bottom: 50px;
    font-size: 1.25rem;
    line-height: 1.7;
    font-weight: 400;
    max-width: 700px;
}

/* 🏔️ SMART BRIDGE: Consent Card Evolution */
.sc-finance-consent {
    margin-bottom: 50px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.08) 0%, rgba(0, 242, 255, 0.02) 100%);
    border-radius: 32px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sc-finance-consent:hover {
    border-color: rgba(0, 242, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 242, 255, 0.15);
}

.sc-finance-consent__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.sc-finance-consent__info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.sc-finance-consent__icon-box {
    width: 64px;
    height: 64px;
    background: rgba(0, 242, 255, 0.12);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-teal);
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.1);
}

.sc-finance-consent__title {
    font-weight: 800;
    color: white;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.sc-finance-consent__desc {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 5px;
    line-height: 1.5;
}

/* 📊 FORM ARCHITECTURE (High-Contrast Intelligence) */
.finance-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
    margin: 50px 0;
}

.finance-card .input-group label {
    font-weight: 800;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.finance-card .input-group label i { color: var(--accent-teal); font-size: 1rem; }

/* Increased Specificity to override master components without using !important */
.finance-card .input-group input,
.finance-card .input-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 22px;
    border-radius: 18px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    outline: none;
}

.finance-card .input-group select option {
    background-color: #0f172a;
    color: white;
    font-size: 0.95rem;
    padding: 10px;
}

.finance-card .input-group input:focus,
.finance-card .input-group select:focus {
    border-color: var(--accent-teal);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.2);
    transform: translateY(-2px);
}

/* 🚀 MASTER CTA */
.search-btn {
    width: 100%;
    padding: 28px;
    margin-top: 40px;
    background: linear-gradient(135deg, #7000ff, #00f2ff);
    color: white;
    border: none;
    font-weight: 900;
    border-radius: 30px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 25px 50px rgba(112, 0, 255, 0.35);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-btn:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 35px 70px rgba(0, 242, 255, 0.45);
    filter: brightness(1.1);
}

/* 📊 Result Architecture */
.result-box {
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 60px;
    text-align: center;
}

.limit-val {
    font-size: clamp(3.5rem, 12vw, 5.5rem);
    font-weight: 950;
    line-height: 1.1;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
    filter: drop-shadow(0 0 40px rgba(0, 242, 255, 0.2));
}

.installment-card {
    max-width: 500px;
    margin: 0 auto 60px;
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 32px;
    border: 1px solid var(--card-glass-border);
}

/* 📱 MOBILE ELEGANCE (Zero-Compromise) */
@media (max-width: 768px) {
    .finance-card {
        padding: 50px 25px;
        border-radius: 32px;
        margin-top: 10px;
    }

    .finance-form-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sc-finance-consent {
        padding: 30px 20px;
        border-radius: 28px;
    }

    .sc-finance-consent__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .sc-finance-consent__info {
        gap: 15px;
        align-items: flex-start;
    }

    .sc-finance-consent__icon-box {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        flex-shrink: 0;
    }

    .sc-switch-wrapper {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
    }

    .sc-switch-wrapper::before {
        content: 'เปิดระบบวิเคราะห์ AI';
        font-size: 0.8rem;
        font-weight: 800;
        color: var(--accent-teal);
        text-transform: uppercase;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .finance-title { font-size: 2.2rem; }
    .finance-subtitle { font-size: 1.05rem; }
    
    .sc-finance-consent {
        padding: 25px 15px;
    }

    .sc-finance-consent__info { gap: 12px; }
}

/* 🟢 Switch Components Standard */
.sc-switch-component {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.sc-switch-component input { opacity: 0; width: 0; height: 0; }
.sc-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .4s;
    border-radius: 34px;
}

.sc-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .sc-slider {
    background: linear-gradient(135deg, var(--accent-teal), #00d2ff);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

input:checked + .sc-slider:before {
    transform: translateX(28px);
}