/**
 * AMP Systems PSA - Login Page Styles
 * File: login.css
 * Path: /assets/css/login.css
 *
 * Standalone CSS for the login page (index.php).
 * Matches app chrome: black header, red accent, dark grey body.
 */

:root {
    --amp-login-red: #dc3545;
    --amp-login-red-dark: #c82333;
}

body {
    background: #f3f4f6;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 4px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    animation: slideUp 0.6s ease-out;
}

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

/* Header — black with red bottom border (matches app topbar) */
.login-header {
    background: #000000;
    color: #ffffff;
    padding: 35px 30px 30px;
    text-align: center;
    position: relative;
    border-bottom: 3px solid var(--amp-login-red);
}

.logo {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.logo-image {
    height: 55px;
    width: auto;
    margin-right: 12px;
    object-fit: contain;
}

.tagline {
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.3px;
}

/* Body — app page background grey */
.login-body {
    background: #e5e7eb;
    padding: 35px 30px;
    color: #333;
}

.form-floating {
    margin-bottom: 18px;
}

.form-floating input {
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333;
    font-size: 0.85rem;
}

.form-floating input:focus {
    border-color: var(--amp-login-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    background: #ffffff;
    color: #333;
}

.form-floating input::placeholder {
    color: #999;
}

.form-floating label {
    color: #6c757d;
    font-size: 0.8rem;
}

.btn-login {
    background: linear-gradient(135deg, var(--amp-login-red) 0%, var(--amp-login-red-dark) 100%);
    border: none;
    border-radius: 6px;
    padding: 10px 30px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    color: white;
}

.btn-login:active {
    transform: translateY(0);
}

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

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

.alert {
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.8rem;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.otp-container {
    display: none;
}

.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
}

.back-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--amp-login-red);
}

.loading-spinner {
    display: none;
}

.loading .loading-spinner {
    display: inline-block;
}

.loading .btn-text {
    display: none;
}

.footer-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #ced4da;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--amp-login-red);
}

.text-muted {
    color: #6c757d !important;
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .login-card {
        border-radius: 8px;
    }

    .login-header {
        padding: 25px 20px 20px;
    }

    .login-body {
        padding: 25px 20px;
    }

    .logo {
        font-size: 1.8rem;
    }

    .logo-image {
        height: 45px;
        margin-right: 10px;
    }
}
