:root {
    --brand-primary: #2563eb;
    --brand-secondary: #1d4ed8;
    --brand-accent: #facc15;
    --bg-start: #0f172a;
    --bg-end: #312e81;
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-border: rgba(255, 255, 255, 0.25);
    --text-heading: #0f172a;
    --text-body: #4b5563;
    --text-muted: #6b7280;
    --input-border: #d1d5db;
    --input-focus: rgba(37, 99, 235, 0.25);
    --error-color: #ef4444;
    --success-color: #22c55e;
    --surface-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    color: var(--text-body);
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.22), transparent 55%),
                radial-gradient(circle at 80% 0%, rgba(147, 197, 253, 0.15), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.75rem;
    align-items: stretch;
}

.login-sidebar {
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.98), rgba(29, 78, 216, 0.92));
    border-radius: 28px;
    padding: 3rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--surface-shadow);
}

.login-sidebar::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -140px;
    right: -120px;
}

.login-sidebar::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -180px;
    left: -90px;
}

.sidebar-content {
    position: relative;
    z-index: 2;
}

.sidebar-content h1 {
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.sidebar-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.92;
    max-width: 320px;
}

.features-list {
    list-style: none;
    margin-top: 2.5rem;
    display: grid;
    gap: 1rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.5;
    opacity: 0.95;
}

.features-list li i {
    font-size: 1.15rem;
    margin-top: 0.1rem;
    color: var(--brand-accent);
}

.login-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    border-radius: 26px;
    padding: 3.25rem 3rem;
    border: 1px solid var(--card-border);
    box-shadow: var(--surface-shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header img {
    height: 64px;
    margin-bottom: 1.35rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.6rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-heading);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.input-group {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.95rem 1.05rem;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    background: rgba(255, 255, 255, 0.85);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 12px 25px var(--input-focus);
    transform: translateY(-1px);
}

.input-group i {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.input-group i:hover {
    color: var(--brand-primary);
}

.error-message {
    display: none;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.32);
    color: var(--error-color);
    text-align: center;
    font-weight: 500;
}

.error-message.is-visible {
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 1rem 1.2rem;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.4), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

.btn:hover::after {
    opacity: 1;
}

.btn:disabled {
    cursor: not-allowed;
    filter: grayscale(0.2) brightness(0.92);
    box-shadow: none;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.btn-label {
    transition: opacity 0.2s ease;
}

.btn-spinner {
    display: none;
    align-items: center;
    justify-content: center;
}

.btn-spinner i {
    font-size: 1.15rem;
}

.btn.loading .btn-label {
    opacity: 0;
}

.btn.loading .btn-icon {
    opacity: 0;
}

.btn.loading .btn-spinner {
    display: inline-flex;
    color: #fff;
}

.additional-links {
    margin-top: 2rem;
    text-align: center;
}

.additional-links a {
    color: var(--brand-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.additional-links a:hover {
    color: var(--brand-secondary);
}

@media (max-width: 1024px) {
    .login-main {
        padding-top: 2.5rem;
    }

    .login-wrapper {
        gap: 2rem;
    }

    .login-sidebar {
        padding: 2.5rem;
    }

    .login-card {
        padding: 2.75rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .login-main {
        padding: 2.5rem 1.25rem 3rem;
    }

    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-sidebar {
        order: 2;
        text-align: center;
    }

    .sidebar-content p {
        max-width: none;
    }

    .features-list {
        text-align: left;
    }

    .login-card {
        order: 1;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .login-sidebar {
        padding: 2.2rem;
    }

    .login-card {
        padding: 2.25rem 1.75rem;
    }

    .btn {
        font-size: 1rem;
    }
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    margin: 0 auto 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(29, 78, 216, 0.2));
    color: var(--brand-primary);
    font-size: 2.2rem;
}

.sidebar-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
}
