/* =================== IMPORT FONT =================== */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700&display=swap');

/* =================== GLOBAL STYLING =================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f8f9fa;
}

* {
    box-sizing: border-box;
}

/* =================== CARD STYLING =================== */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 2rem 2.5rem;
}

/* =================== LOGO CONTAINER =================== */
.logo-container {
    margin-bottom: 40px;
    margin-top: 0;
    padding-top: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}

.logo-container img {
    max-width: 100px;
    height: auto;
    object-fit: contain;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================== FORM STYLING =================== */
.form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
    background-color: #f0f4ff;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: block;
}

/* =================== PASSWORD TOGGLE =================== */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper .form-control {
    padding-right: 38px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.95rem;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.toggle-password:hover {
    color: #0066cc;
}

.toggle-password:focus {
    outline: none;
}

/* =================== BUTTON STYLING =================== */
.btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-outline-secondary {
    border: 1px solid #ddd;
    color: #000;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: white;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #0066cc;
    color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

/* =================== TEXT STYLING =================== */
.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    font-weight: 700;
}

.text-muted {
    font-size: 0.95rem;
    color: #6b7280;
}

p.text-center {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

p.text-center:last-of-type {
    margin-bottom: 0;
}

p.text-center a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

p.text-center a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* =================== ALERT STYLING =================== */
.alert {
    border-radius: 0.5rem;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    border: none;
    animation: slideDown 0.3s ease-out;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* =================== SPACING UTILITIES =================== */
.mb-3 {
    margin-bottom: 1.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.d-grid.mt-4 {
    margin-top: 2rem !important;
}

.w-100 {
    width: 100%;
}

/* =================== CONTAINER STYLING =================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================== LOGIN BODY STYLING =================== */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* =================== RESPONSIVE DESIGN =================== */
@media (max-width: 992px) {
    .card-body {
        padding: 1.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }

    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .btn-primary,
    .btn-outline-secondary {
        padding: 0.65rem;
        font-size: 0.95rem;
    }

    .logo-container img {
        max-width: 50px;
    }

    .card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .card {
        border-radius: 0.75rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    p.text-center {
        font-size: 0.85rem;
    }
}