:root {
    --font-heading: 'Poppins', sans-serif;
    --primary: #2376ff;
    --primary-dark: #1e5ed6;
    --primary-light: #eaf2ff;
    --secondary: #ff3d12;
    --secondary-dark: #df2e07;
    --success: #2ed16c;
    --warning: #ffb84a;
    --danger: #ff4a6b;
    --dark: #17233d;
    --dark-light: #26324d;
    --light: #f7f9fd;
    --gray: #7a869d;
    --gray-light: #dde4ef;
    --gradient-primary: linear-gradient(135deg, #ff3d12 0%, #ff5a1f 100%);
    --shadow: 0 8px 20px rgba(23, 35, 61, 0.08);
    --shadow-card: 0 12px 30px rgba(23, 35, 61, 0.08);
    --shadow-card-hover: 0 24px 70px rgba(23, 35, 61, 0.16);
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0;
}

header {
    padding: 15px 0;
}

.login-container {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #fff;
}

.login-wrapper {
    --auth-edge-gutter: max(clamp(24px, 3.4vw, 52px), calc((100vw - 1200px) / 2 + 20px));
    --auth-hero-gutter: max(clamp(24px, 3.6vw, 44px), calc((100vw - 1200px) / 2 + 20px));
    display: flex;
    width: 100%;
    min-height: clamp(500px, calc(100vh - 290px), 620px);
    box-shadow: none;
}

.login-side {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(18px, 2vw, 28px);
    overflow: hidden;
    padding: clamp(24px, 3.6vw, 44px) clamp(28px, 4vw, 58px) clamp(28px, 3.6vw, 48px) var(--auth-hero-gutter);
    color: var(--dark);
    background: url('/img/auth/identity-marketplace-bg-light.png') left bottom / cover no-repeat;
}

.login-side::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(52px, 5vw, 84px);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.14) 52%, rgba(255, 255, 255, 0.54) 88%, #fff 100%);
    pointer-events: none;
    z-index: 1;
}

.login-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(28deg, rgba(5, 10, 18, 0.36) 0%, rgba(8, 14, 24, 0.2) 24%, rgba(8, 14, 24, 0.06) 42%, rgba(8, 14, 24, 0) 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.56) 30%, rgba(255, 255, 255, 0.16) 54%, rgba(255, 255, 255, 0) 72%);
    pointer-events: none;
    z-index: 0;
}

.auth-hero-panel>* {
    position: relative;
    z-index: 2;
}

.login-side-content {
    position: relative;
    z-index: 2;
    max-width: 660px;
}

.login-side-content h2 {
    margin: 0 0 12px;
    color: var(--dark);
    font-size: clamp(1.8rem, 2.6vw, 2.45rem);
    line-height: 1.12;
}

.login-side-content>p {
    max-width: 560px;
    color: rgba(23, 35, 61, 0.78);
    font-size: clamp(0.98rem, 1.12vw, 1.12rem);
    font-weight: 500;
    line-height: 1.5;
}

.features-list {
    list-style: none;
    margin-top: 22px;
    padding-left: 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.account-form-wrapper .features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 430px;
}

.account-form-wrapper .features-list li {
    min-height: 96px;
    margin-bottom: 0;
    padding: 16px;
    border: 1px solid rgba(221, 228, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 32px rgba(3, 10, 22, 0.12);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--primary);
    box-shadow: 0 8px 18px rgba(23, 35, 61, 0.08);
}

.features-list strong {
    display: block;
    color: var(--dark);
    font-weight: 800;
}

.features-list p {
    color: rgba(23, 35, 61, 0.72);
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-hero-copy {
    max-width: 660px;
}

.auth-hero-copy h1 {
    margin: 0 0 12px;
    color: var(--dark);
    font-size: clamp(1.85rem, 2.15vw, 2.35rem);
    line-height: 1.06;
}

.auth-hero-copy h1 span {
    color: var(--secondary);
}

.auth-hero-text {
    max-width: 520px;
    color: rgba(23, 35, 61, 0.8);
    font-size: clamp(0.98rem, 1.12vw, 1.12rem);
    font-weight: 500;
    line-height: 1.5;
}

.auth-discovery {
    max-width: 560px;
}

.auth-discovery h2 {
    margin: 0 0 12px;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.auth-discovery-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 168px));
    gap: 10px;
    justify-content: start;
}

.auth-discovery-chip {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f3f7a;
    box-shadow: 0 14px 32px rgba(3, 10, 22, 0.24);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.auth-discovery-chip i {
    color: var(--primary);
    font-size: 22px;
    transition: color 0.2s;
}

.auth-discovery-chip span {
    min-width: 0;
}

.auth-discovery-chip:hover,
.auth-discovery-chip:focus-visible {
    background: #fff;
    border-color: rgba(35, 118, 255, 0.55);
    color: var(--primary-dark);
    box-shadow: 0 16px 34px rgba(35, 118, 255, 0.24);
    outline: none;
    transform: translateY(-2px);
}

.auth-discovery-chip:hover i,
.auth-discovery-chip:focus-visible i {
    color: var(--secondary);
}

.login-form-side {
    flex: 0 0 min(43vw, 520px);
    align-self: center;
    order: 2;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 520px;
    margin: clamp(24px, 3.6vw, 44px) var(--auth-edge-gutter) clamp(24px, 3.6vw, 44px) 0;
    padding: clamp(24px, 2.8vw, 34px);
    border: 1px solid rgba(221, 228, 239, 0.9);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-card-hover);
}

.login-header {
    margin-bottom: 20px;
}

.login-header h2 {
    margin-bottom: 8px;
    color: var(--dark);
    font-size: clamp(1.35rem, 1.75vw, 1.7rem);
    line-height: 1.2;
}

.login-header p {
    color: var(--gray);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--dark);
    font-weight: 700;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    top: 50%;
    left: 20px;
    color: #91a0b8;
    transform: translateY(-50%);
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px 12px 48px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: rgba(35, 118, 255, 0.65);
    outline: none;
    box-shadow: 0 0 0 4px rgba(35, 118, 255, 0.1);
}

.form-control::placeholder {
    color: var(--gray);
}

.form-text {
    display: block;
    margin-top: 6px;
    color: var(--gray);
    font-size: 13px;
    line-height: 1.45;
}

.legal-consent {
    margin: 18px 0 16px;
    color: var(--gray);
    font-size: 13px;
    line-height: 1.5;
}

.legal-consent a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 800;
}

.legal-consent a:hover {
    color: var(--secondary-dark);
    text-decoration: underline;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-password,
.register-link a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 800;
    transition: color 0.2s;
}

.forgot-password:hover,
.register-link a:hover {
    color: var(--secondary-dark);
    text-decoration: underline;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 13px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 6px 14px rgba(255, 61, 18, 0.14);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 61, 18, 0.18);
    transform: translateY(-2px);
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 18px 0;
    color: var(--gray);
    font-size: 13px;
    font-weight: 700;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-light);
}

.divider span {
    background: #fff;
    white-space: nowrap;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.social-btn:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow);
    text-decoration: none;
    transform: translateY(-2px);
}

.social-btn.facebook {
    color: #1877f2;
}

.social-btn.google {
    color: #db4437;
}

.register-link {
    margin-top: 14px;
    color: var(--gray);
    font-size: 13px;
    text-align: center;
}

.register-link a {
    margin-left: 5px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 600;
}

.alert-warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.alert-link {
    color: inherit;
    font-weight: 800;
}

.text-danger {
    display: block;
    margin-top: 5px;
    color: var(--danger) !important;
    font-size: 0.875rem;
}

.field-validation-error {
    color: var(--danger) !important;
}

.validation-summary-errors {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 74, 107, 0.1);
    color: var(--danger) !important;
}

.validation-summary-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.w-100 {
    width: 100% !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-3 {
    gap: 1rem !important;
}

.text-center {
    text-align: center !important;
}

.text-muted {
    color: var(--gray) !important;
}

.small {
    font-size: 0.875rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

/* Футър - същият като основната страница */
footer {
    --primary: #3498DB;
    --secondary-dark: #1F618D;
    --dark: #2A2D43;
    --gray: #A0A7C2;
    margin-top: auto;
    background: var(--dark);
    color: white;
    padding: 30px 0 20px;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-minimal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-identity {
    flex: 1;
    max-width: 480px;
}

.footer-description {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 15px;
}

.footer-reach {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.footer-contact-minimal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-minimal a {
    color: var(--gray);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.footer-contact-minimal a:hover {
    color: white;
}

.footer-contact-minimal i {
    color: var(--primary);
    font-size: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: white;
    font-style: italic;
    letter-spacing: 0;
}

.footer-logo-text .logo-accent {
    color: #ff5a1f;
}

/* Logo Styles */
.logo-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.logo-container {
    --dark: #2A2D43;
    --gray: #A0A7C2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 900;
    font-size: 24px;
    color: var(--dark);
    letter-spacing: 0;
}

.logo-accent {
    color: #ff4a16;
}

.logo-tagline {
    font-size: 10px;
    color: var(--gray);
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 54px;
    flex: 0 0 auto;
}

.logo-mark {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-minimal {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-reach {
        align-items: center;
    }

    .footer-contact-minimal a {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .logo-container {
        gap: 4px;
    }

    .logo {
        width: 64px;
        height: 46px;
    }

    .logo-main {
        font-size: 21px;
    }

    .logo-tagline {
        font-size: 9px;
    }

    .footer-logo-text {
        font-size: 24px;
    }
}

@media (max-width: 576px) and (orientation: portrait) {
    .footer-logo {
        justify-content: center;
    }
}

/* Navigation Link (Back to Home) */
.nav-link {
    --primary: #3498DB;
    text-decoration: none;
    color: #1e3a8a;
    /* Match Home nav color */
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    /* Needed for ::after absolute positioning */
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

@media (max-width: 1100px) {
    .login-form-side {
        flex-basis: min(48vw, 540px);
        margin-right: 28px;
    }
}

@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 640px;
        min-height: 0;
        margin: 0 auto;
    }

    .login-side {
        order: 1;
        min-height: 430px;
        padding: 40px 28px;
    }

    .login-side::before {
        display: none;
    }

    .login-form-side {
        order: 2;
        flex: none;
        align-self: stretch;
        max-width: none;
        margin: 0 18px 32px;
        padding: 36px 28px;
    }

    .social-login {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .account-form-wrapper .login-side {
        display: none;
    }

    .account-form-wrapper {
        max-width: 520px;
    }
}

@media (max-width: 576px) {
    .auth-hero-copy h1 {
        font-size: 2.1rem;
    }

    .auth-hero-text {
        font-size: 1rem;
    }

    .auth-discovery-chips {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-discovery-chip {
        grid-template-columns: 28px minmax(0, 1fr);
        min-height: 64px;
        padding: 12px;
        gap: 10px;
        font-size: 12.5px;
    }

    .auth-discovery-chip i {
        font-size: 21px;
    }

    .login-header h2 {
        font-size: 1.7rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-form-side {
        margin: 0 12px 28px;
        padding: 30px 22px;
    }
}

@media (max-width: 380px) {
    .auth-discovery-chips {
        grid-template-columns: 1fr;
    }
}

