﻿/* Login Page Styles - Dark default */
:root {
    --auth-bg-start: #0b1120;
    --auth-bg-mid: #111c44;
    --auth-bg-end: #050816;
    --auth-card-bg: rgba(15, 23, 42, 0.92);
    --auth-card-border: #1f2c45;
    --auth-accent-start: #1d4ed8;
    --auth-accent-end: #7c3aed;
    --auth-text-primary: #e2e8f0;
    --auth-text-muted: #94a3b8;
    --auth-input-bg: #0f172a;
    --auth-input-border: #24314f;
    --auth-highlight: #38bdf8;
}

body {
    background: radial-gradient(circle at 20% 20%, var(--auth-bg-mid), var(--auth-bg-start) 45%, var(--auth-bg-end) 90%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    color: var(--auth-text-primary);
}

.login-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.login-card {
    background: var(--auth-card-bg);
    border-radius: 22px;
    border: 1px solid var(--auth-card-border);
    box-shadow: 0 35px 80px rgba(2, 6, 23, 0.65);
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.login-header {
    background: linear-gradient(130deg, var(--auth-accent-start), var(--auth-accent-end));
    padding: 42px;
    text-align: center;
    color: #eff4ff;
}

.login-header i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.95;
}

.login-header h2 {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 2rem;
}

.login-header p {
    margin: 0;
    opacity: 0.9;
}

.login-body {
    padding: 40px;
}

.form-label {
    font-weight: 600;
    color: var(--auth-text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    border: 1px solid var(--auth-input-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    background: var(--auth-input-bg);
    color: var(--auth-text-primary);
    transition: all 0.25s ease;
    width: 100%;
}

.form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.15rem rgba(96, 165, 250, 0.35);
    outline: none;
    background: #0b1629;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
}

.form-control,
.form-control:focus,
.form-control:active {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    border: 1px solid var(--auth-input-border);
    box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.form-control:-webkit-autofill:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1000px #0b1629 inset, 0 0 0 0.15rem rgba(96, 165, 250, 0.35);
}

.form-control::placeholder {
    color: var(--auth-text-muted);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-highlight);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    z-index: 10;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #a855f7;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

.btn-login {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 35px rgba(99, 102, 241, 0.35);
}

.form-check-input {
    background-color: #0f172a;
    border-color: var(--auth-input-border);
}

.form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.register-link {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin-top: 30px;
}

.register-link a {
    color: var(--auth-highlight);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}

.register-link a:hover {
    color: #a855f7;
}

.demo-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    padding: 25px;
    margin-top: 24px;
    color: var(--auth-text-primary);
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.5);
}

.demo-card h6 {
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
}

.demo-credential {
    background: rgba(6, 11, 25, 0.85);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.demo-credential strong {
    color: var(--auth-text-muted);
}

.demo-credential code {
    background: rgba(37, 99, 235, 0.15);
    padding: 4px 12px;
    border-radius: 6px;
    color: #93c5fd;
    font-weight: 600;
}

.feature-highlights {
    text-align: center;
    margin-top: 24px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--auth-text-muted);
}

.feature-highlights i {
    color: var(--auth-highlight);
}

.alert-danger {
    border-radius: 12px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background-color: rgba(127, 29, 29, 0.45);
    color: #fecaca;
}

.alert-warning {
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background-color: rgba(120, 53, 15, 0.5);
    color: #fde68a;
}

.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    border-radius: 0.3rem;
}

.bg-danger {
    background-color: #ef4444 !important;
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .login-header {
        padding: 32px 20px;
    }

    .login-body {
        padding: 30px 20px;
    }

    .demo-credential {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* External login buttons */
.external-login-list .btn-external {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.85);
    color: var(--auth-text-primary);
    box-shadow: 0 12px 25px rgba(2, 6, 23, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.external-login-list .btn-external:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.25);
}

.external-icon {
    font-size: 1.15rem;
    line-height: 1;
}

/* Google */
.btn-google {
    border-color: rgba(66, 133, 244, 0.35);
    background: rgba(15, 23, 42, 0.9);
}

.btn-google .external-icon {
    color: #4285f4;
}

/* Microsoft */
.btn-microsoft {
    border-color: rgba(0, 164, 239, 0.35);
    background: rgba(15, 23, 42, 0.9);
}

.btn-microsoft .external-icon {
    color: #00a4ef;
}

/* Facebook */
.btn-facebook {
    border-color: rgba(24, 119, 242, 0.35);
    background: rgba(15, 23, 42, 0.9);
}

.btn-facebook .external-icon {
    color: #1877f2;
}

/* Generic fallback */
.btn-generic {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--auth-text-primary);
}
