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

:root {
    --primary: #024c96;
    --primary-dark: #013a73;
    --primary-light: #0a5db0;
    --accent: #2550ea;
    --accent-hover: #1a3fcf;
    --error: #dc3545;
    --error-light: rgba(220, 53, 69, 0.1);
    --success: #00d26a;
    --text-white: #ffffff;
    --text-muted: #a0aec0;
    --text-light: #cbd5e0;
    --border-color: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(8, 20, 50, 0.78);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-focus-bg: rgba(255, 255, 255, 0.1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Open Sans", sans-serif;
}

body {
    background: #000d1f;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === Background === */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/hero-img.jpg") center / cover no-repeat;
    opacity: 0.18;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(2, 76, 150, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 70%, rgba(37, 80, 234, 0.2) 0%, transparent 60%),
        linear-gradient(160deg, #000d1f 0%, #001535 50%, #000d1f 100%);
    z-index: 0;
}

/* === Nav === */
nav {
    position: relative;
    padding: 24px 48px;
    z-index: 10;
    display: flex;
    align-items: center;
}

nav a img {
    width: 110px;
    filter: brightness(1.1);
    transition: var(--transition);
}

nav a img:hover {
    filter: brightness(1.3);
}

/* === Page Layout === */
.page-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 88px);
    padding: 24px 16px 48px;
}

/* === Form Wrapper === */
.form-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    margin-top: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 44px 48px 40px;
    box-shadow: var(--shadow-card);
    top: auto;
    left: auto;
    transform: none;
}

/* === Brand Header === */
.form-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.form-brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
}

.form-brand-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.form-wrapper h2 {
    color: var(--text-white);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* === Divider === */
.form-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 20px 0 28px;
}

/* === Form Controls === */
.form-wrapper form {
    margin: 0;
}

form .form-control {
    position: relative;
    margin-bottom: 6px;
    height: 56px;
}

.form-control input {
    height: 100%;
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 400;
    padding: 0 16px;
    transition: var(--transition);
    -webkit-autofill: none;
}

.form-control input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 30, 70, 0.9) inset;
    -webkit-text-fill-color: #fff;
}

.form-control input:focus {
    background: var(--input-focus-bg);
    border-color: rgba(37, 80, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(37, 80, 234, 0.12);
}

.form-control input:is(:focus, :valid) {
    padding: 20px 16px 6px;
}

.form-control label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 400;
    pointer-events: none;
    color: var(--text-muted);
    transition: var(--transition);
}

.form-control input:is(:focus, :valid) ~ label {
    font-size: 0.68rem;
    font-weight: 500;
    transform: translateY(-155%);
    color: var(--accent);
    letter-spacing: 0.03em;
}

/* === Error States === */
.text-danger {
    color: var(--error) !important;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
    padding-left: 2px;
    letter-spacing: 0.01em;
}

.input-error {
    border-color: var(--error) !important;
    background: rgba(220, 53, 69, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* === Submit Button === */
form button {
    width: 100%;
    padding: 15px 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    border: none;
    outline: none;
    margin: 20px 0 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

form button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: var(--transition);
}

form button:hover::before {
    opacity: 1;
}

form button span,
form button:not(:has(span)) {
    position: relative;
    z-index: 1;
}

form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(37, 80, 234, 0.35);
}

form button:active {
    transform: translateY(0);
}

/* === Links & Helpers === */
.form-wrapper a {
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}

.form-wrapper a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.form-wrapper :where(p, small) {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-wrapper p a {
    color: var(--accent);
    font-weight: 500;
}

.form-wrapper p a:hover {
    color: #6b8fff;
    text-decoration: none;
}

form .form-help {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

form .form-help a {
    font-size: 0.82rem;
    color: var(--text-muted);
}

form .form-help a:hover {
    color: var(--accent);
}

.form-wrapper p {
    margin-top: 20px;
    text-align: center;
}

.form-wrapper small {
    display: block;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-wrapper small a {
    color: var(--accent);
}

/* === Alert === */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}

.alert-success {
    background: rgba(0, 210, 106, 0.1);
    border-color: rgba(0, 210, 106, 0.2);
}

.alert .text-dark {
    color: var(--text-light) !important;
    flex: 1;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: var(--transition);
}

.btn-close:hover {
    opacity: 1;
}

/* === Loader === */
.loader {
    display: block;
    text-align: center;
    min-height: 0;
    margin: 0 auto 8px;
}

.loader img {
    display: block;
    margin: 0 auto;
}

/* === Language Switcher === */
.gtranslate_wrapper {
    margin-bottom: 16px;
}

/* === Google Translate overrides === */
.gt_switcher_wrapper {
    z-index: 100 !important;
}

/* === Decorative badge === */
.form-secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.form-secure-badge svg {
    opacity: 0.6;
}

/* === Responsive === */
@media (max-width: 600px) {
    nav {
        padding: 18px 20px;
    }

    nav a img {
        width: 90px;
    }

    .form-wrapper {
        padding: 32px 24px 28px;
        border-radius: var(--radius-md);
        margin-top: 100px;
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
    }

    .form-wrapper h2 {
        font-size: 1.5rem;
    }

    body::before {
        display: none;
    }
}
