:root {
    --bg: #f5f4f0;
    --bg-spot-1: rgba(31, 122, 140, 0.2);
    --bg-spot-2: rgba(243, 186, 102, 0.22);
    --card: #ffffff;
    --border: rgba(15, 23, 42, 0.12);
    --text: #1b2430;
    --text-muted: #6b7280;
    --primary: #1f7a8c;
    --primary-strong: #155d69;
    --accent: #f3ba66;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    --font-body: "Avenir Next", "Futura", "Gill Sans", "Trebuchet MS", sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 450px at 10% -10%, var(--bg-spot-1), transparent 60%),
        radial-gradient(700px 420px at 92% 0%, var(--bg-spot-2), transparent 65%),
        linear-gradient(180deg, #f7f3ea 0%, #f4f6f8 45%, #eef3f7 100%);
    min-height: 100vh;
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px 60px;
    gap: 16px;
    color: var(--text);
}

.login-container {
    max-width: 860px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    animation: slideUp 0.45s ease;
}

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

.login-left {
    display: none;
    background: linear-gradient(135deg, #1f7a8c 0%, #1b4965 45%, #f3ba66 100%);
    color: #ffffff;
    padding: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.login-left h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.2;
}

.login-left p {
    font-size: 15px;
    opacity: 0.92;
    line-height: 1.6;
    margin-bottom: 24px;
}

.features-grid {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.feature-card i {
    font-size: 22px;
    margin-bottom: 6px;
    display: block;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.login-right {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(31, 122, 140, 0.1) 0%, rgba(243, 186, 102, 0.14) 100%);
    border: 1px solid rgba(31, 122, 140, 0.15);
}

.login-mobile-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.login-mobile-name {
    display: block;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 14px;
}

.login-mobile-tagline {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.login-form-header {
    text-align: center;
    margin-bottom: 18px;
    margin-top: 25px;
}

.login-header-logo {
    width: 72px;
    height: auto;
    margin-bottom: 16px;
}

.login-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-form-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.login-quickstart {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.03);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.login-quickstart-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
}

.login-quickstart-title i {
    color: var(--primary);
}

.login-quickstart-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.login-quickstart-list li + li {
    margin-top: 4px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    min-height: 44px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f8fafb;
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: rgba(31, 122, 140, 0.5);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31, 122, 140, 0.12);
}

.btn-login {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #1f7a8c 0%, #2c8b9f 55%, #f3ba66 120%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(31, 122, 140, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.online-counter {
    background: linear-gradient(135deg, #2dd4bf 0%, #f3ba66 100%);
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
    margin-top: 14px;
    color: #1b2430;
    font-weight: 600;
    font-size: 12px;
}

.terms-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.terms-text a {
    color: var(--primary);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    border: 1px solid transparent;
}

.alert-danger {
    background: #fdf1f2;
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.25);
}

.alert-success {
    background: #f0fbf3;
    color: #14532d;
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe0a3;
}

.g-recaptcha {
    margin: 12px 0;
    display: flex;
    justify-content: center;
    transform: scale(0.94);
    transform-origin: center;
}

.login-info {
    width: 100%;
    max-width: 860px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-top: 16px;
    color: var(--text);
}

.login-info h2 {
    font-size: 20px;
    margin: 0 0 10px;
}

.login-info p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.login-info-list h3 {
    margin: 12px 0 6px;
    font-size: 14px;
    color: var(--text);
}

.login-info-list ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.login-info-list li + li {
    margin-top: 4px;
}

footer {
    position: static;
    margin-top: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    width: 100%;
    max-width: 860px;
    padding: 0 8px;
    margin-left: auto;
    margin-right: auto;
}

footer a {
    color: var(--text);
    text-decoration: underline;
}

.footer-language {
    margin-bottom: 10px;
}

.footer-language a {
    padding: 6px 8px;
    display: inline-block;
}

.footer-social {
    margin-bottom: 10px;
}

.footer-social-title {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    text-decoration: none;
    font-size: 12px;
}

.social-links i {
    font-size: 14px;
}

.footer-credit {
    margin-top: 6px;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 34px;
}

.lang-switcher-active {
    background: #1f7a8c;
    color: white;
}

.lang-switcher-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.font-weight-bold {
    font-weight: bold;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.14);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.stat-box .number {
    font-size: 22px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.stat-box .label {
    font-size: 11px;
    opacity: 0.85;
}

.btn-back {
    width: 100%;
    padding: 10px;
    background: #ffffff;
    color: var(--primary);
    border: 1px solid rgba(31, 122, 140, 0.4);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-back:hover {
    background: var(--primary);
    color: #ffffff;
}

@media (min-width: 900px) {
    body {
        align-items: center;
    }

    .login-container {
        display: flex;
    }

    .login-left {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1.05;
    }

    .login-right {
        flex: 0.95;
        padding: 32px 28px;
    }

    .login-mobile-brand {
        display: none;
    }

    footer {
        position: static;
    }
}

@media (max-width: 899px) {
    body {
        padding: 18px 10px 60px;
    }

    .login-container {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 8px;
    }

    .login-right {
        background: #ffffff;
        border-radius: 18px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        position: relative;
        overflow: hidden;
    }

    .login-right::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 150px;
        background:
            radial-gradient(260px 140px at 12% 0%, rgba(31, 122, 140, 0.28), transparent 70%),
            radial-gradient(260px 160px at 88% 5%, rgba(243, 186, 102, 0.32), transparent 65%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
    }

    .login-right > * {
        position: relative;
        z-index: 1;
    }

    .login-mobile-brand {
        background: rgba(255, 255, 255, 0.85);
        border: 1px solid rgba(31, 122, 140, 0.25);
        box-shadow: 0 14px 26px rgba(31, 122, 140, 0.15);
    }

    .login-quickstart {
        border-left: 3px solid rgba(31, 122, 140, 0.7);
    }
}

@media (max-width: 520px) {
    .form-control {
        font-size: 16px;
    }

    .btn-login {
        font-size: 15px;
    }

    .login-info {
        padding: 16px;
    }

    .login-info h2 {
        font-size: 18px;
    }

    .login-info p {
        font-size: 14px;
    }

    .login-info-list ul {
        font-size: 13px;
    }

    .social-links a {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 420px) {
    body {
        padding: 16px 8px 50px;
    }

    .login-container {
        border-radius: 14px;
    }

    .login-right {
        padding: 18px 14px;
    }

    .login-mobile-brand {
        padding: 8px 10px;
    }

    .login-mobile-logo {
        width: 40px;
        height: 40px;
    }

    .login-form-header h2 {
        font-size: 20px;
    }

    .login-header-logo {
        width: 60px;
        margin-bottom: 12px;
    }

    .form-control {
        padding: 9px 10px;
        font-size: 16px;
    }

    .btn-login {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .form-control {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
