/* static/style.css */
:root {
    --page-bg: #fff8eb;
    --title-color: #c8994b;
    --body-text: #10312a;
    --label-color: #575757;
    --card-bg: #faf0ce;
    --card-border: #e5d46c;
    --input-bg: #f6fffd;
    --input-border: #9ecac0;
    --input-placeholder: #787878;
    --input-text: #444444;
    --button-bg: #45b7ae;
    --button-bg-hover: #35a49b;
    --button-text: #f1fff9;
    --error: #d93025;
    --success: #2f6f5e;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: var(--page-bg);
    color: var(--body-text);
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 32px;
    position: relative;
}

.container {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
    gap: 72px;
    position: relative;
    z-index: 2;
}

.brand-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 36px;
}

.logo {
    width: min(280px, 100%);
    height: auto;
    margin-bottom: 26px;
}

.brand-panel h1 {
    margin: 0;
    color: var(--title-color);
    text-transform: uppercase;
    line-height: 1.2;
    font-size: clamp(24px, 2.6vw, 38px);
    letter-spacing: 0.02em;
}

.brand-panel p {
    margin: 24px 0 0;
    color: var(--body-text);
    font-size: clamp(14px, 1.2vw, 20px);
    line-height: 1.45;
}

.form-panel {
    width: 100%;
}

.form-card {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 24px;
    padding: 36px 34px 28px;
}

.form-card h2 {
    margin: 0 0 28px;
    color: var(--title-color);
    text-transform: uppercase;
    font-size: clamp(20px, 1.5vw, 30px);
    letter-spacing: 0.01em;
    text-align: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.input-group label {
    margin-bottom: 10px;
    color: var(--label-color);
    font-size: 14px;
    font-weight: 400;
}

.input-group input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--input-text);
    font-family: 'Inter', sans-serif;
}

.input-group input::placeholder {
    color: var(--input-placeholder);
}

.input-group input:focus {
    outline: none;
    border-color: #79a69a;
    box-shadow: 0 0 0 4px rgba(121, 166, 154, 0.15);
}

.input-group .input-help {
    margin-top: 6px;
    color: #7c7c7c;
    font-size: 12px;
}

.input-group .iti {
    width: 100%;
}

.input-group .iti__tel-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    min-height: 48px;
    padding: 10px 14px 10px 100px;
    font-size: 14px;
    color: var(--input-text);
    font-family: 'Inter', sans-serif;
}

.input-group .iti__tel-input:focus {
    outline: none;
    border-color: #79a69a;
    box-shadow: 0 0 0 4px rgba(121, 166, 154, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cta-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--button-bg);
    color: var(--button-text);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.cta-button:hover {
    background: var(--button-bg-hover);
}

.cta-button:active {
    transform: scale(0.99);
}

.cta-button:disabled {
    background: #9fcfc7;
    cursor: not-allowed;
}

.spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
    animation: spin 1s linear infinite;
}

.cta-button.loading .button-text {
    opacity: 0;
}

.cta-button.loading .spinner {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.error-message,
.success-message {
    display: none;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
}

.error-message {
    color: var(--error);
}

.success-message {
    color: var(--success);
}

.deco {
    position: fixed;
    pointer-events: none;
    z-index: 1;
}

.deco-top {
    top: 0;
    left: 0;
    width: min(760px, 52vw);
}

.deco-bottom {
    right: 0;
    bottom: 0;
    width: min(760px, 52vw);
}

.mobile-only {
    display: none;
}

#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.loading-box {
    text-align: center;
    color: #ffffff;
}

.loading-box .spinner {
    position: static;
    width: 52px;
    height: 52px;
    opacity: 1;
    transform: none;
    margin: 0 auto 18px;
    border-width: 4px;
}

#loading-status {
    margin: 0;
    font-size: 24px;
    color: #f8f8f8;
}

.styled-alert-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.styled-alert-backdrop.show {
    display: flex;
}

.styled-alert-box {
    width: min(420px, 100%);
    background: #faf0ce;
    border: 1.5px solid #e5d46c;
    border-radius: 18px;
    padding: 22px 20px 18px;
    text-align: center;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
    color: #6C4C17;
}

.styled-alert-box h3 {
    margin: 0 0 8px;
    color: #007A5A;
    font-size: 22px;
}

.styled-alert-box p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.45;
}

.styled-alert-button {
    border: 0;
    border-radius: 10px;
    min-height: 42px;
    min-width: 120px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #f1fff9;
    background: #45b7ae;
}

.styled-alert-button:hover {
    background: #35a49b;
}

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

@media (max-width: 1100px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 740px;
        gap: 24px;
    }

    .brand-panel {
        margin-top: 0;
    }

    .deco-top {
        width: min(780px, 88vw);
    }

    .deco-bottom {
        width: min(760px, 86vw);
    }
}

@media (max-width: 640px) {
    body {
        padding: 12px;
        align-items: flex-start;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .container {
        gap: 14px;
        margin-top: 98px;
    }

    .brand-panel {
        text-align: center;
    }

    .logo {
        width: min(170px, 50vw);
        margin-bottom: 12px;
    }

    .brand-panel h1 {
        font-size: clamp(22px, 8vw, 30px);
    }

    .brand-panel p {
        margin-top: 12px;
        font-size: clamp(13px, 4.6vw, 18px);
    }

    .form-card {
        border-radius: 16px;
        padding: 18px 16px;
    }

    .form-card h2 {
        font-size: 20px;
        margin-bottom: 18px;
    }

    .input-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .input-group input {
        min-height: 46px;
        font-size: 14px;
        border-radius: 8px;
    }

    .form-row {
        gap: 10px;
    }

    .cta-button {
        min-height: 48px;
        font-size: 15px;
        border-radius: 8px;
    }

    .error-message,
    .success-message {
        font-size: 13px;
    }

    .deco-top-mobile {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
    }
}