/* =====================================================
   LOGIN — Configurator
   Soft botanical aesthetic matching the app palette
   ===================================================== */

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

:root {
    --pink:      #C978A4;
    --pink-soft: #F3E3EA;
    --sage:      #A8C7A0;
    --sage-soft: #EAF3DE;
    --warm:      #F6F6F4;
    --border:    #E8E5E0;
    --text:      #2B2B2B;
    --muted:     #9B9B94;
    --error-bg:  #FCEBEB;
    --error:     #A32D2D;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Onest', sans-serif;
    background: #F2F0ED;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ===================== BACKGROUND BLOBS ===================== */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
    animation: drift 14s ease-in-out infinite alternate;
}

.blob-1 {
    width: 480px;
    height: 480px;
    background: #E7C9D8;
    top: -100px;
    left: -120px;
    animation-duration: 16s;
}

.blob-2 {
    width: 380px;
    height: 380px;
    background: #C9DEC4;
    bottom: -80px;
    right: -60px;
    animation-duration: 19s;
    animation-delay: -6s;
}

.blob-3 {
    width: 260px;
    height: 260px;
    background: #E2CDBF;
    bottom: 20%;
    left: 10%;
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.06); }
}

/* ===================== WRAP ===================== */
.login-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fade-up 0.5s ease both;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== CARD ===================== */
.login-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 24px;
    padding: 40px 40px 36px;
    width: 400px;
    max-width: calc(100vw - 32px);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.06),
        0 1px 0 rgba(255,255,255,0.8) inset;
}

/* ===================== BRAND ===================== */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    background: var(--pink-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E8D4DF;
}

.brand-circle {
    width: 14px;
    height: 14px;
    background: var(--pink);
    border-radius: 50%;
}

.brand-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.1em;
}

/* ===================== HEADING ===================== */
.login-heading {
    margin-bottom: 28px;
}

.login-heading h1 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: -0.02em;
}

.login-heading p {
    font-size: 14px;
    color: var(--muted);
}

/* ===================== FORM FIELDS ===================== */
.field-group {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6D6D65;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.field-wrap {
    position: relative;
}

.field-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'Onest', sans-serif;
    color: var(--text);
    background: #FAFAF8;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.field-input::placeholder {
    color: #BFBFB8;
}

.field-input:hover {
    border-color: #D0CCC6;
}

.field-input:focus {
    border-color: var(--pink);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(201, 120, 164, 0.12);
}

/* password toggle */
.field-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

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

/* ===================== ERROR ===================== */
.login-error {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--error-bg);
    border: 1px solid #F7C1C1;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--error);
    animation: shake 0.3s ease;
}

.login-error.visible {
    display: flex;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

/* ===================== SUBMIT BUTTON ===================== */
.submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: var(--text);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Onest', sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    min-height: 46px;
}

.submit-btn:hover  { background: #3D3D3D; }
.submit-btn:active { transform: scale(0.99); }
.submit-btn:disabled {
    background: #AEAEA8;
    cursor: default;
    transform: none;
}

/* spinner */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

.submit-btn.loading .btn-label  { opacity: 0.5; }
.submit-btn.loading .btn-spinner { display: block; }

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

/* ===================== FOOTER ===================== */
.login-footer {
    font-size: 11px;
    color: #B0AFA8;
    text-align: center;
}
