@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --teal:       #5B93DB;
    --teal-soft:  rgba(91, 147, 219, 0.5);
    --teal-glow:  rgba(91, 147, 219, 0.12);
    --plum:       #6B3A6D;
    --cream:      #F7F5F2;
    --warm-white: #FEFCF9;
    --border:     #D8D8D8;
    --ph:         #B0B0B0;
    --text:       #2C2C2C;
    --sans:       'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    min-height: 100%;
    background: var(--cream);
}

body {
    min-height: 100%;
    background: transparent;
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    color: var(--text);
    overflow-x: hidden;
}

.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 5% 10%, rgba(91, 147, 219, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 60% 70% at 95% 20%, rgba(107, 58, 109, 0.20) 0%, transparent 65%),
        radial-gradient(ellipse 65% 55% at 50% 90%, rgba(85, 170, 220, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 85% 75%, rgba(91, 147, 219, 0.14) 0%, transparent 65%),
        radial-gradient(ellipse 55% 60% at 15% 70%, rgba(107, 58, 109, 0.14) 0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(85, 170, 220, 0.08) 0%, transparent 60%);
}

.corner-flower {
    position: fixed;
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}
.corner-flower.tl { top: -30px;    left: -30px;  }
.corner-flower.tr { top: -30px;    right: -30px; transform: scaleX(-1); }
.corner-flower.bl { bottom: -30px; left: -30px;  transform: scaleY(-1); }
.corner-flower.br { bottom: -30px; right: -30px; transform: scale(-1,-1); }

.auth-screen {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 28px;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: rgba(255, 252, 249, 0.42);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    padding: 36px 28px 32px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07), 0 2px 10px rgba(0, 0, 0, 0.03);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.brand-logo {
    width: 400px;
    max-width: 90vw;
    height: auto;
    display: block;
    margin: 0 auto -6px;
}

.brand-subtitle {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 500;
    font-style: italic;
    color: var(--teal);
    text-align: center;
    margin-top: 0;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.brand-acronym {
    font-size: 9.5px;
    font-weight: 700;
    color: rgba(91, 147, 219, 0.65);
    letter-spacing: 0.14em;
    text-align: center;
    margin-top: 0;
    text-transform: uppercase;
    line-height: 1.7;
    font-family: var(--sans);
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 15px 18px;
    font-size: 15px;
    font-family: var(--sans);
    color: var(--text);
    background: rgba(255, 252, 249, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.field input::placeholder {
    color: var(--ph);
    font-size: 14.5px;
}

.field input:focus {
    border-color: var(--teal-soft);
    box-shadow: 0 0 0 3px var(--teal-glow);
}

.btn-enter {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(80, 120, 210, 0.9), rgba(85, 170, 220, 0.88));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--sans);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.15s;
    -webkit-appearance: none;
    box-shadow: 0 4px 16px rgba(91, 147, 219, 0.28);
}

.btn-enter:hover  { opacity: 0.92; }
.btn-enter:active { opacity: 0.80; }

.footer-links {
    margin-top: 28px;
    text-align: center;
}

.link-register {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--teal);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: opacity 0.15s;
}

.link-register:hover { opacity: 0.7; }

.field-error-banner {
    width: 100%;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-left: 2px solid #e74c3c;
    background: rgba(231, 76, 60, 0.05);
    font-family: var(--sans);
    font-size: 13px;
    color: #c0392b;
    border-radius: 0 8px 8px 0;
}
.field-success-banner {
    width: 100%;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-left: 2px solid var(--teal);
    background: rgba(91, 147, 219, 0.06);
    font-family: var(--sans);
    font-size: 13px;
    color: var(--teal);
    border-radius: 0 8px 8px 0;
}

.lang-selector {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.lang-pill {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 252, 249, 0.5);
    color: var(--ph);
    cursor: pointer;
    transition: all 0.18s;
}
.lang-pill:hover {
    border-color: var(--teal-soft);
    color: var(--teal);
}
.lang-pill--active {
    border-color: var(--teal-soft);
    background: var(--teal-glow);
    color: var(--teal);
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 6px;
    cursor: pointer;
}
.consent-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    accent-color: var(--teal);
    cursor: pointer;
}
.consent-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.85;
}
.consent-link {
    color: var(--teal) !important;
    text-decoration: underline;
    font-weight: 600;
}

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

.field-password {
    position: relative;
}
.field-password input {
    padding-right: 48px;
}
.btn-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--ph);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}
.btn-toggle-pw:hover { color: var(--teal); }
.btn-toggle-pw .hidden { display: none; }

.link-forgot {
    font-family: var(--sans);
    font-size: 14px;
    color: #888;
    text-decoration: none;
    transition: opacity 0.15s;
}
.link-forgot:hover { opacity: 0.7; }
.link-separator {
    margin: 0 8px;
    color: var(--ph);
    font-size: 14px;
}

.forgot-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn 0.25s ease;
}
.forgot-form.hidden { display: none; }
.forgot-title {
    font-family: var(--sans);
    font-size: 20px;
    font-weight: 700;
    color: var(--teal);
    text-align: center;
    margin: 0;
}
.forgot-subtitle {
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}
.btn-forgot-cancel {
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--teal);
    cursor: pointer;
    padding: 8px;
    text-align: center;
}
.btn-forgot-cancel:hover { opacity: 0.7; }
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.policy-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.policy-modal-backdrop.hidden {
    display: none !important;
}
.policy-modal {
    background: rgba(255, 252, 249, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.policy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.policy-modal-header h3 {
    font-family: var(--sans);
    font-size: 18px;
    color: var(--teal);
    margin: 0;
}
.policy-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--text);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.6;
}
.policy-modal-close:hover { opacity: 1; }
.policy-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}
.policy-modal-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--teal);
    margin: 16px 0 6px;
}
.policy-modal-body h4:first-child { margin-top: 0; }
.policy-modal-body p {
    margin: 0 0 10px;
}
