/* ====================================
   LOGIN PAGE STYLES
   ==================================== */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #8FAAFF;
    --accent-light-1: #D6E7FD;
    --accent-light-2: #E9F7FE;
    --accent-white: #FFFFFF;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #D6E7FD 0%, #E9F7FE 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-in-out 2s forwards;
}

.preloader img {
    max-width: 100px;
    animation: spin 1s linear infinite;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Page Wrapper */
.page-wrapper {
    width: 100%;
}

.radial-gradient {
    background: linear-gradient(135deg, #D6E7FD 0%, #E9F7FE 100%);
}

/* Card Styling */
.card {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.card-body {
    padding: 3rem 2rem;
    background: #FFFFFF;
}

/* Logo and Title */
.app-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 1rem;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

a.text-center.d-block {
    text-decoration: none;
    transition: var(--transition);
}

a.text-center.d-block:hover img {
    transform: scale(1.05);
}

a.text-center.d-block img {
    transition: var(--transition);
}

/* Sign In Header */
.position-relative.text-center.my-4 {
    margin: 2rem 0 !important;
}

.position-relative.text-center.my-4 p {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.25rem;
    letter-spacing: 1px;
    background: #FFFFFF;
    padding: 0 1rem;
}

.border-top {
    border-color: #e0e0e0 !important;
}

/* Form Styling */
form {
    margin-top: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #D6E7FD;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #F8F9FA;
}

.form-control:focus {
    border-color: var(--secondary-color);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 0.2rem rgba(143, 170, 255, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #b0b0b0;
    font-weight: 500;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: none;
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.15);
}

/* Show/Hide Password */
.shbtn-group {
    position: relative;
    overflow: visible;
}

.shbtn {
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding: 8px;
    z-index: 99;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shbtn:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-50%) scale(1.15);
}

.shbtn:active {
    transform: translateY(-50%) scale(0.95);
}

.shbtn i {
    font-size: 18px;
    color: #999;
    transition: var(--transition);
    pointer-events: none;
}

.form-control.show-password {
    padding-right: 2.5rem;
}

/* Error Messages */
.text-danger {
    color: var(--danger-color) !important;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

/* Form Groups */
.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

/* Button Styling */
.btn {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem;
}

.btn-dark {
    background: linear-gradient(135deg, #8FAAFF 0%, #6B8DEE 100%);
    color: #FFFFFF;
}

.btn-dark:hover {
    background: linear-gradient(135deg, #6B8DEE 0%, #8FAAFF 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(143, 170, 255, 0.3);
}

.btn-dark:active {
    transform: translateY(-1px);
}

.btn-dark:focus {
    box-shadow: 0 0 0 0.2rem rgba(143, 170, 255, 0.5);
    outline: none;
}

.btn.w-100 {
    width: 100% !important;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
}

.btn.py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.rounded-2 {
    border-radius: 0.5rem !important;
}

/* Remember Me */
.form-check {
    margin: 1rem 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.form-check-label {
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 2rem 1.5rem;
    }

    .position-relative.text-center.my-4 p {
        font-size: 1.1rem;
    }

    .app-title {
        font-size: 1.1rem;
    }

    .btn.w-100 {
        padding: 0.75rem 1rem !important;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .shbtn {
        right: 8px;
    }

    .shbtn i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .card-body {
        padding: 1.5rem 1rem;
    }

    .position-relative.text-center.my-4 {
        margin: 1rem 0 !important;
    }

    .position-relative.text-center.my-4 p {
        font-size: 1rem;
    }

    .app-title {
        font-size: 1rem;
        margin-top: 0.5rem;
    }

    a.text-center.d-block img {
        max-height: 70px !important;
    }

    .mb-3 {
        margin-bottom: 1rem !important;
    }

    .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .btn.w-100 {
        padding: 0.65rem 1rem !important;
        font-size: 0.85rem;
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .card {
        background: #2c3e50;
    }

    .card-body {
        background: #34495e;
    }

    .form-label,
    .position-relative.text-center.my-4 p,
    .app-title {
        color: #ecf0f1;
    }

    .form-control {
        background-color: #2c3e50;
        border-color: #555;
        color: #ecf0f1;
    }

    .form-control:focus {
        background-color: #34495e;
        border-color: var(--secondary-color);
    }

    .form-control::placeholder {
        color: #999;
    }

    .text-danger {
        color: #ff6b6b !important;
    }
}
