/* SASCMO Authentication Styles */
:root {
    --primary-color: #0f5c38;
    --primary-dark: #0a3d26;
    --primary-light: #d8efe3;
    --text-dark: #1c2b24;
    --text-light: #5c6b64;
    --white: #ffffff;
    --black: #000000;
    --light-gray: #f4faf6;
    --border-color: #d7e6de;
    --shadow: none;
    --shadow-hover: none;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.auth-pattern {
    display: none;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    background: var(--white);
    border-radius: 4px;
    padding: 40px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

.auth-card:hover {
    box-shadow: none;
    transform: none;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 0.04em;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Auth Form */
.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-label i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 92, 56, 0.12);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    margin-right: 10px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--primary-dark);
    transform: none;
    box-shadow: none;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary i {
    margin-right: 8px;
}

/* Auth Links */
.auth-links {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 8px 0;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    background: rgba(15, 92, 56, 0.12);
    text-decoration: none;
}

.auth-link i {
    margin-right: 6px;
    width: 14px;
    text-align: center;
}

/* Auth Content */
.auth-content {
    margin-bottom: 30px;
}

.success-message,
.warning-message {
    text-align: center;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-message {
    background: rgba(15, 92, 56, 0.12);
    border: 1px solid rgba(15, 92, 56, 0.2);
    color: var(--primary-dark);
}

.warning-message {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #856404;
}

.success-message i,
.warning-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.success-message p,
.warning-message p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.success-message p:last-child,
.warning-message p:last-child {
    margin-bottom: 0;
}

/* Validation */
.text-danger {
    color: #dc3545 !important;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.validation-summary-errors {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    color: #dc3545;
    font-size: 0.9rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 20px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
        border-radius: 4px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 10px 14px;
    }
    
    .btn-primary {
        padding: 12px 20px;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States for Accessibility */
.auth-link:focus,
.btn-primary:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--black);
    }
    
    .form-control {
        border: 2px solid var(--black);
    }
    
    .btn-primary {
        border: 2px solid var(--black);
    }
}
