﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #12256f;
    --navy-dark: #0c1a52;
    --navy-mid: #1a3490;
    --cyan: #009bdb;
    --teal: #5cb8b2;
    --white: #ffffff;
    --off-white: #f0f4f8;
    --text-dark: #1a2540;
    --text-muted: #6b7a99;
    --border: #dce3ef;
    --danger: #e74c3c;
    --input-h: 52px;
}

html, body {
    height: 100%;
    font-family: 'Outfit', sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
}

/* ─── LAYOUT ──────────────────────────────────── */
.layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ─── LEFT BRAND PANEL ────────────────────────── */
.brand-panel {
    position: relative;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    overflow: hidden;
}

    /* Geometric SVG background pattern */
    .brand-panel::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='40' cy='40' r='1.5' fill='%23ffffff' opacity='0.06'/%3E%3Cline x1='40' y1='40' x2='80' y2='0' stroke='%23ffffff' stroke-width='0.4' opacity='0.04'/%3E%3Cline x1='40' y1='40' x2='0' y2='80' stroke='%23ffffff' stroke-width='0.4' opacity='0.04'/%3E%3Cline x1='40' y1='40' x2='80' y2='80' stroke='%23ffffff' stroke-width='0.4' opacity='0.04'/%3E%3Cline x1='40' y1='40' x2='0' y2='0' stroke='%23ffffff' stroke-width='0.4' opacity='0.04'/%3E%3C/svg%3E");
        pointer-events: none;
    }

/* Gradient orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0,155,219,0.28) 0%, transparent 70%);
    top: -100px;
    right: -80px;
    animation: drift 12s ease-in-out infinite alternate;
}

.orb-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(92,184,178,0.20) 0%, transparent 70%);
    bottom: 60px;
    left: -60px;
    animation: drift 16s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 40px);
    }
}

/* Animated hexagon grid overlay */
.hex-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.07;
}

.brand-top {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 3.5rem;
}

    .brand-logo img {
        height: 52px;
        filter: brightness(0) invert(1);
    }

.brand-logo-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    letter-spacing: 0.06em;
    color: #ffffff;
    line-height: 1;
}

    .brand-logo-text span {
        display: block;
        font-size: 0.65rem;
        font-weight: 400;
        letter-spacing: 0.18em;
        color: rgba(255,255,255,0.55);
        text-transform: uppercase;
        margin-top: 4px;
    }

.brand-headline {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 3.5vw, 3.4rem);
    line-height: 1.05;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

    .brand-headline em {
        font-style: normal;
        color: var(--cyan);
    }

.brand-desc {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255,255,255,0.58);
    max-width: 360px;
    margin-bottom: 2.5rem;
}

/* Certifications */
.certs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cert-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.80);
    letter-spacing: 0.04em;
}

    .cert-badge .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--teal);
        flex-shrink: 0;
    }

/* Sectors strip */
.sectors {
    position: relative;
    z-index: 2;
    /*margin-top: 2rem;*/
    margin-top: auto;
}

.sectors-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1rem;
}

.sectors-list {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.sector-item {
    flex: 1;
    padding: 1rem 0.5rem;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.10);
}

    .sector-item:last-child {
        border-right: none;
    }

.sector-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    opacity: 0.55;
}

.sector-name {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255,255,255,0.50);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Brand bottom */
.brand-bottom {
    position: relative;
    z-index: 2;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.brand-footer-text {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.30);
}

    .brand-footer-text a {
        color: rgba(255,255,255,0.45);
        text-decoration: none;
    }

/* ─── RIGHT FORM PANEL ────────────────────────── */

#logoM {
    display: none;
}

.form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: var(--white);
    position: relative;
}

    .form-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--navy) 0%, var(--cyan) 60%, var(--teal) 100%);
    }

.form-inner {
    width: 100%;
    max-width: 400px;
    animation: formSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-bottom: 2.5rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s;
}

    .lang-btn:hover {
        border-color: var(--cyan);
        color: var(--navy);
    }

    .lang-btn.active {
        border-color: var(--navy);
        background: var(--navy);
        color: #fff;
    }

    .lang-btn img {
        width: 18px;
        height: 13px;
        border-radius: 2px;
        object-fit: cover;
    }

/* Form header */
.form-header {
    margin-bottom: 2rem;
}

.form-welcome {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.form-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-dark);
    line-height: 1.1;
}

.form-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Fields */
.field-group {
    margin-bottom: 1.1rem;
}

.field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.18s;
}

.form-input {
    width: 100%;
    height: var(--input-h);
    padding: 0 14px 0 44px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.93rem;
    color: var(--text-dark);
    background: var(--off-white);
    transition: all 0.2s;
    outline: none;
}

    .form-input::placeholder {
        color: #b0bcd4;
    }

    .form-input:focus {
        background: #fff;
        border-color: var(--navy);
        box-shadow: 0 0 0 3px rgba(18,37,111,0.08);
    }

        .form-input:focus + .input-icon,
        .input-wrap:focus-within .input-icon {
            color: var(--navy);
        }

/* Eye toggle */
.eye-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-muted);
    transition: color 0.18s;
    line-height: 0;
}

    .eye-toggle:hover {
        color: var(--navy);
    }

    .eye-toggle svg {
        width: 18px;
        height: 18px;
    }

/* Forgot password */
.form-extras {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.link-subtle {
    font-size: 0.82rem;
    color: var(--cyan);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s;
}

    .link-subtle:hover {
        color: var(--navy);
        text-decoration: underline;
    }

/* Error message */
.error-msg {
    display: none;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.83rem;
    color: var(--danger);
    margin-bottom: 1rem;
    align-items: center;
    gap: 8px;
}

    .error-msg.visible {
        display: flex;
    }

/* Submit button */
.btn-login {
    width: 100%;
    height: 52px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.22s;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.1rem;
}

    .btn-login::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(0,155,219,0.15), transparent);
        opacity: 0;
        transition: opacity 0.22s;
    }

    .btn-login:hover {
        background: var(--navy-mid);
        transform: translateY(-1px);
        box-shadow: 0 8px 24px rgba(18,37,111,0.28);
    }

        .btn-login:hover::after {
            opacity: 1;
        }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
    }

.btn-spinner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sign up row */
.signup-row {
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-muted);
}

    .signup-row a {
        color: var(--navy);
        font-weight: 600;
        text-decoration: none;
        margin-left: 4px;
    }

        .signup-row a:hover {
            text-decoration: underline;
        }

/* Form bottom note */
.form-bottom {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.72rem;
    color: #c0cadc;
}

    .form-bottom a {
        color: #a0adc4;
        text-decoration: none;
    }

/* ─── MODAL ───────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,20,60,0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

    .modal-overlay.open {
        display: flex;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    margin: 1rem;
    animation: slideUp 0.25s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-dark);
}

.modal-subtitle {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn-primary {
    flex: 1;
    height: 48px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-primary:hover {
        background: var(--navy-mid);
    }

.btn-cancel {
    height: 48px;
    padding: 0 1.25rem;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-cancel:hover {
        border-color: var(--text-muted);
        color: var(--text-dark);
    }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    #logoM {
        display: block;
    }
}

@media (max-width: 480px) {
    .brand-panel {
        padding: 1.5rem 1.5rem 2rem;
    }

    .brand-logo-text {
        font-size: 1.5rem;
    }

    .brand-headline {
        font-size: 1.6rem;
    }
}
