/*
 * Login page (app/Views/auth/login.php)
 */

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #e85d04 0%, #ef6f21 50%, #e85d04 100%);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 48px 40px 36px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand img {
    max-width: 197px;
    height: auto;
}

.login-brand .divider {
    width: 40px;
    height: 3px;
    background: #f36f21;
    border-radius: 2px;
    margin: 20px auto;
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
}

.login-brand p {
    font-size: 14px;
    color: #818285;
    margin: 0;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-field {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-size: 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #1f2937;
    transition: all 0.2s;
    outline: none;
    min-height: auto;
}

.input-wrapper .input-field:focus {
    border-color: #f36f21;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(243, 111, 33, 0.1);
}

.input-wrapper .input-field.is-invalid {
    border-color: #d93025;
}

.input-wrapper .input-field::placeholder {
    color: #9ca3af;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    pointer-events: none;
}

.input-wrapper .input-field:focus ~ .input-icon {
    color: #f36f21;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
    font-size: 18px;
    display: flex;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.password-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.invalid-feedback-custom {
    font-size: 12px;
    color: #d93025;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.alert-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
}

.alert-custom-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-custom-danger i {
    font-size: 18px;
    color: #ef4444;
    flex-shrink: 0;
}

.alert-custom-denied {
    background: #fef2f2;
    border: 2px solid #ef4444;
    color: #991b1b;
    font-size: 15px;
    padding: 16px 18px;
}

.alert-custom-denied i {
    font-size: 30px;
    color: #ef4444;
    flex-shrink: 0;
}

.alert-custom-denied strong {
    display: block;
    font-size: 17px;
    margin-bottom: 2px;
}

.btn-login {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #f36f21;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}

.btn-login:hover {
    background: #e05e0e;
    box-shadow: 0 4px 16px rgba(243, 111, 33, 0.3);
    transform: translateY(-1px);
}

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

.btn-login:disabled {
    background: #f5a472;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin: 4px 0 18px;
}

.login-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 0;
}

.login-links a {
    font-size: 13px;
    font-weight: 500;
    color: #818285;
    text-decoration: none;
    transition: color 0.15s;
}

.login-links a:hover {
    color: #f36f21;
}

.login-links .link-primary {
    color: #f36f21;
    font-weight: 600;
}

.login-links .link-primary:hover {
    color: #e05e0e;
}

.brand-footer {
    text-align: center;
    margin-top: 24px;
}

.brand-footer span {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 480px) {
    .login-card { padding: 36px 24px 28px; }
    .login-brand img { height: 48px; }
    .login-brand h1 { font-size: 20px; }
}
