/* Custom styles for MSB Mango v1 */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #e1e5e9;
    --shadow-light: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */

/* ============================================
   PROFESSIONAL LOGIN FORM DESIGN
   ============================================ */

.professional-auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%), 
                url('/static/images/banner2.webp') no-repeat center center;
    background-size: cover;
    background-position: center;
    padding: 2rem 1rem;
    position: relative;
}

.auth-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 90%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-height: 400px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Left Side - Branding */
.auth-branding {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%), 
                url('/static/images/banner2.webp') no-repeat center center;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
    position: relative;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.3;
}

.brand-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.brand-logo {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.brand-logo-img {
    height: 50px;
    width: auto;
    /* Remove the filter to show actual logo colors */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-logo-fallback {
    display: none;
}

.brand-logo-fallback.show {
    display: block;
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-title {
    font-size: 2.2rem; /* Slightly smaller */
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 280px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Tighter spacing */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    opacity: 0.9;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Right Side - Form */
.auth-form-container {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.auth-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.6s ease-out;
}

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

.auth-form-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #718096;
    font-size: 1rem;
    margin: 0;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.flash-message.flash-error {
    background: #fed7d7;
    color: #742a2a;
    border-color: #feb2b2;
}

.flash-message.flash-error::before {
    content: "⚠️";
}

.flash-message.flash-info,
.flash-message.flash-success {
    background: #bee3f8;
    color: #2a4365;
    border-color: #90cdf4;
}

/* Professional Form Styling */
.professional-form {
    width: 100%;
}

.input-group {
    margin-bottom: 1.375rem; /* Fine-tuned spacing */
}

.input-wrapper {
    position: relative;
}

.professional-input {
    width: 100%;
    padding: 1.2rem 1rem 1.2rem 3.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    line-height: 1.2;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.professional-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.professional-input:focus + .floating-label,
.professional-input:not(:placeholder-shown) + .floating-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8rem;
    color: #667eea;
    background: white;
    padding: 0 0.5rem;
}

/* Icon color change when input is focused - using sibling selector */
.input-wrapper:focus-within .input-icon {
    color: #667eea; /* Icon turns blue when input is focused */
}

.floating-label {
    position: absolute;
    top: 1.2rem;
    left: 3.5rem;
    color: #a0aec0;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    font-weight: 500;
}

.input-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 2;
    color: #a0aec0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.professional-input:focus ~ .input-border {
    width: 100%;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.375rem; /* Match other spacing */
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-input {
    display: none;
}

.checkbox-mark {
    width: 22px;
    height: 22px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkbox-input:checked + .checkbox-mark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-input:checked + .checkbox-mark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #4a5568;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

/* CAPTCHA Section */
.captcha-section {
    margin-bottom: 1.375rem; /* Match input group spacing */
}

.captcha-section .captcha-component {
    margin: 0;
    max-width: 100%;
}

.captcha-section .captcha-label {
    font-size: 0.85rem; /* Match form label sizing */
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem; /* Reduced margin for consistency */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.captcha-section .captcha-input {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.captcha-section .captcha-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.captcha-section .captcha-image-container {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.captcha-section .captcha-refresh {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.captcha-section .captcha-refresh:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Submit Button */
.professional-submit-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.professional-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

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

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.professional-submit-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.professional-submit-btn:active .btn-ripple {
    transform: scale(1);
}

/* Form Footer */
.form-footer {
    text-align: center;
    position: relative;
}

.footer-text {
    font-size: 0.95rem;
    color: #718096;
    margin: 0;
}

.signup-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.signup-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Security Badge Enhancement */
.security-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.security-icon::before {
    content: '🔒';
    font-size: 0.9rem;
}

/* Form Footer */
.form-footer {
    text-align: center;
}

.footer-text {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.signup-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link:hover {
    color: #764ba2;
}

/* Security Badge */
.security-badge {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4a5568;
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-content {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .auth-branding {
        padding: 2rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .auth-form-container {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .professional-auth-container {
        padding: 1rem;
    }
    
    .auth-content {
        border-radius: 12px;
        min-height: 500px; /* Fixed height for Firefox compatibility */
    }
    
    .auth-branding {
        padding: 1.5rem;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .auth-form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ============================================
   END PROFESSIONAL LOGIN FORM DESIGN
   ============================================ */

/* Professional Authentication Styles - Compressed Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1rem; /* Reduced from 2rem */
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    margin-bottom: 1rem; /* Reduced from 1.5rem */
}

.auth-header {
    text-align: center;
    padding: 1.5rem 2rem 1rem; /* Reduced from 2.5rem 2rem 1.5rem */
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.auth-logo {
    margin-bottom: 1rem; /* Reduced from 1.5rem */
}

.logo-img {
    height: 40px; /* Reduced from 48px */
    width: auto;
}

.auth-title {
    font-size: 1.5rem; /* Reduced from 1.75rem */
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--secondary-color);
    font-size: 0.85rem; /* Slightly smaller */
    margin: 0;
}

.auth-body {
    padding: 1rem 2rem 1.5rem; /* Reduced from 1.5rem 2rem 2rem */
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1rem; /* Reduced from 1.5rem */
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    opacity: 0.7;
}

.user-icon::before {
    content: "👤";
}

.lock-icon::before {
    content: "🔒";
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem; /* Reduced from 0.875rem */
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input::placeholder {
    color: #a0a6b1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem; /* Reduced from 2rem */
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-input:checked + .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    color: var(--secondary-color);
}

.forgot-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-text {
    margin-right: 0.5rem;
}

.arrow-icon::after {
    content: "→";
    font-size: 1.1em;
}

.auth-footer {
    text-align: center;
    padding: 1rem 2rem 1.5rem; /* Reduced from 1.5rem 2rem 2rem */
    background-color: #fafbfc;
    border-top: 1px solid var(--border-color);
}

.auth-footer-text {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin: 0;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

.email-icon::before {
    content: "✉️";
}

.send-icon::after {
    content: "📤";
    font-size: 1.1em;
}

.form-help {
    display: block;
    color: var(--secondary-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Information Card Styles */
.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    margin-top: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.info-header {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
}

.info-icon-header::before {
    content: "ℹ️";
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.info-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.info-steps {
    padding: 1.5rem 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step-content strong {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.step-content span {
    color: var(--secondary-color);
    font-size: 0.8rem;
    line-height: 1.4;
}

.info-note {
    display: flex;
    align-items: center;
    padding: 1rem 2rem 1.5rem;
    background-color: #fff3cd;
    border-top: 1px solid #ffeaa7;
}

.warning-icon::before {
    content: "⚠️";
    margin-right: 0.5rem;
}

.info-note span {
    font-size: 0.8rem;
    color: #856404;
}

.check-icon::after {
    content: "✓";
    font-size: 1.1em;
    font-weight: bold;
}

.shield-icon-header::before {
    content: "🛡️";
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

/* Security Tips Styles */
.security-tips {
    padding: 1.5rem 2rem;
}

.tip {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.tip:last-child {
    margin-bottom: 0;
}

.tip-icon::before {
    content: "✨";
    margin-right: 0.75rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.tip span {
    color: var(--dark-color);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Additional Icon Enhancements */
.security-icon::before {
    content: "🔒";
    margin-right: 0.5rem;
}

/* Form Input Validation Styles */
.form-input:valid {
    border-color: var(--success-color);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--danger-color);
}

/* Enhanced Button Hover Effects */
.auth-btn-primary:hover .btn-icon {
    transform: translateX(2px);
    transition: transform 0.2s ease;
}

/* Loading State for Forms */
.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-btn:disabled:hover {
    transform: none !important;
    box-shadow: var(--shadow-light) !important;
}

/* Enhanced Responsive Design for Auth Pages */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .auth-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .info-card {
        margin-top: 1rem;
    }
    
    .info-header {
        padding: 1rem 1.5rem 0.75rem;
    }
    
    .info-steps {
        padding: 1rem 1.5rem;
    }
    
    .info-note {
        padding: 0.75rem 1.5rem 1rem;
    }
    
    .step {
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .step-content strong {
        font-size: 0.8rem;
    }
    
    .step-content span {
        font-size: 0.75rem;
    }
    
    .security-tips {
        padding: 1rem 1.5rem;
    }
    
    .tip {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .tip span {
        font-size: 0.8rem;
    }
}

/* Enhanced Flash Message Styles for Auth */
.auth-body .flash-message {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
}

/* Responsive Design for Auth */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .auth-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Flash Messages */
.flash-message {
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.flash-message::before {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.flash-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.flash-success::before {
    content: "✅";
}

.flash-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.flash-info::before {
    content: "ℹ️";
}

.flash-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.flash-warning::before {
    content: "⚠️";
}

.flash-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.flash-danger::before {
    content: "❌";
}

/* Enhanced Flash Messages for Important API Operations */
.flash-api-important {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
    border: 2px solid !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    padding: 1.5rem 2rem !important;
    margin: 2rem 0 !important;
    position: relative;
    transform: scale(1.05);
    animation: flashPulse 1s ease-out;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95)) !important;
}

.flash-api-important.flash-success {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
    color: #155724 !important;
}

.flash-api-important.flash-danger {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb) !important;
    color: #721c24 !important;
}

.flash-api-important::before {
    font-size: 1.5rem !important;
    margin-right: 1rem !important;
}

@keyframes flashPulse {
    0% {
        transform: scale(1);
        opacity: 0;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    }
}

/* Custom Buttons */
.custom-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}

.custom-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.custom-btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.custom-btn-primary:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #004085;
}

.custom-btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.custom-btn-secondary:hover {
    color: #fff;
    background-color: #545b62;
    border-color: #4e555b;
}

.custom-btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.custom-btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
}

.custom-btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.custom-btn-danger:hover {
    color: #fff;
    background-color: #c82333;
    border-color: #bd2130;
}

.custom-btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.custom-btn-warning:hover {
    color: #212529;
    background-color: #e0a800;
    border-color: #d39e00;
}

.custom-btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.custom-btn-info:hover {
    color: #fff;
    background-color: #138496;
    border-color: #117a8b;
}

.custom-btn-light {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.custom-btn-light:hover {
    color: #212529;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.custom-btn-dark {
    color: #fff;
    background-color: #343a40;
    border-color: #343a40;
}

.custom-btn-dark:hover {
    color: #fff;
    background-color: #23272b;
    border-color: #1d2124;
}

.custom-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    border-radius: 4px;
}

.custom-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
}

/* Header & Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 10px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: var(--primary-color);
}

/* Flash Messages - Legacy Support */
.alert {
    border-radius: 6px;
    border: none;
}

/* Error Pages */
.error-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 2rem !important;
    }

    .hero-section h1 {
        font-size: 2.5rem !important;
    }

    .btn-lg {
        margin-bottom: 1rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Status Badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* API Documentation Styles */
.api-endpoint {
    background-color: var(--light-color);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
}

.http-method {
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.http-get {
    background-color: #d4edda;
    color: #155724;
}

.http-post {
    background-color: #d1ecf1;
    color: #0c5460;
}

.http-put {
    background-color: #fff3cd;
    color: #856404;
}

.http-delete {
    background-color: #f8d7da;
    color: #721c24;
}

/* Dashboard Styles */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card .card-body {
    padding: 2rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

/* Table Styles */
.table {
    border-radius: 6px;
    overflow: hidden;
}

.table thead th {
    border-top: none;
    background-color: var(--light-color);
    font-weight: 600;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

/* Menu divider for lists (avoids inline styles in templates) */
.menu-divider {
    border-top: 1px solid #ddd;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}