

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 0 0 480px;
    position: relative;
    display: flex;
    overflow: hidden;
}

.left-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
}

.left-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 20%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
}

.left-bg::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.04);
}

.left-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    width: 100%;
}

.left-top {
    margin-bottom: auto;
}

.left-logo {
    height: 32px;
    opacity: 0.9;
}

.left-center {
    padding: 20px 0;
}

.left-heading {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.left-heading span {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.left-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 360px;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.25s;
}

.trust-badge:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: rgba(255, 255, 255, 0.85);
}

.trust-badge i {
    color: var(--accent);
    font-size: 0.7rem;
}

.left-footer {
    margin-top: auto;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
}

.login-right-inner {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.login-topbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 40px;
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
}

.topbar-link:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.mobile-logo {
    display: none;
    margin-bottom: 24px;
}

.login-card {
    animation: cardIn 0.5s ease-out;
}

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

.login-card-header {
    margin-bottom: 28px;
}

.login-card-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.login-card-header p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0;
}

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

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

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.label-row label {
    margin-bottom: 0;
}

.forgot-inline {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-inline:hover {
    color: var(--accent);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.25s;
    z-index: 1;
}

.form-input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px 13px 44px;
    font-size: 0.92rem;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--text);
    background: var(--card);
    transition: all 0.25s;
    outline: none;
}

.form-input::placeholder {
    color: #cbd5e1;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
    background: #fff;
}

.form-input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--accent);
}

.toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.toggle-password:hover {
    background: var(--border-light);
}

.toggle-password .eye-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.toggle-password:hover .eye-icon {
    color: var(--text-secondary);
}

.toggle-password.active .eye-icon {
    color: var(--accent);
}

.capslock-warning {
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-xs);
    animation: capsIn 0.2s ease-out;
}

@keyframes capsIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.capslock-warning i {
    font-size: 0.68rem;
    color: var(--accent-dark);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transition: left 0.6s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

.login-card-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.login-card-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-card-footer a:hover {
    color: var(--accent-dark);
}

.flash-alert {
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: none;
    margin-bottom: 20px;
    animation: flashIn 0.3s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-backdrop.show {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}

.modal .password-input-group .form-control {
    border-right: none;
}

.modal .toggle-password {
    border-radius: 0 0.375rem 0.375rem 0;
}

@media (max-width: 991px) {
    .login-left {
        display: none;
    }

    .login-right {
        background: var(--bg);
    }

    .mobile-logo {
        display: block;
    }

    .login-topbar {
        justify-content: center;
    }

    .login-card-header h2 {
        text-align: center;
    }

    .login-card-header p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-right-inner {
        padding: 1.25rem;
        max-width: 100%;
    }

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

@media (min-width: 1400px) {
    .login-left {
        flex: 0 0 520px;
    }
}

/* Hide native password reveal/clear buttons (Edge, Safari, etc.) to prevent overlapping eye icons */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
