/**********************************
 * FORMS.CSS - KASI ENTERPRISES
 * Centralized styling for all form pages
 * Includes: Login, Register, Forgot Password, Reset Password
 * Last Updated: 2024
 **********************************/

/* ====================================
   TABLE OF CONTENTS
   ====================================
   1. CSS Variables & Root Settings
   2. Base Form Container Styles
   3. Form Card & Layout
   4. Floating Label System
   5. Input Fields & Icons
   6. Password Visibility Toggle
   7. Validation & Error States
   8. Message Notifications
   9. Password Strength Meter
   10. Buttons & Loading States
   11. Security Badge & Links
   12. Honeypot Field
   13. Utility Classes
   14. Animations
   15. Responsive Breakpoints
       15.1 Mobile (320px - 575px)
       15.2 Small Devices (576px - 767px)
       15.3 Medium Devices (768px - 991px)
       15.4 Large Devices (992px - 1199px)
       15.5 Extra Large Devices (1200px+)
   ==================================== */

/* ------------------------------------
   1. CSS VARIABLES & ROOT SETTINGS
   ------------------------------------ */
:root {
    /* Color Palette */
    --color-primary: #667eea;
    --color-primary-dark: #5a67d8;
    --color-secondary: #764ba2;
    --color-success: #48bb78;
    --color-success-light: #c6f6d5;
    --color-success-dark: #276749;
    --color-error: #fc8181;
    --color-error-light: #fed7d7;
    --color-error-dark: #c53030;
    --color-warning: #f6ad55;
    --color-text-primary: #2d3748;
    --color-text-secondary: #718096;
    --color-text-muted: #a0aec0;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --color-gray-light: #f7fafc;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-success: linear-gradient(135deg, #38a169 0%, #276749 100%);
    --gradient-error: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 2.5rem;
    
    /* Typography */
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-md: 0.9rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.2rem;
    
    /* Border Radius */
    --radius-sm: 0.2rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 50px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-error: 0 0 0 3px rgba(252, 129, 129, 0.2);
    
    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-normal: all 0.3s ease-in-out;
    --transition-slow: all 0.5s ease-in-out;
    
    /* Z-index layers */
    --z-index-honeypot: -1;
    --z-index-icons: 2;
    --z-index-toggle: 2;
    --z-index-overlay: 9999;
}

/* ------------------------------------
   2. BASE FORM CONTAINER STYLES
   ------------------------------------ */
.login.form {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.form.g-fullheight--xs {
    height: 100vh;
}

/* ------------------------------------
   3. FORM CARD & LAYOUT
   ------------------------------------ */
.form .g-box-shadow__dark-lightest-v3 {
    max-width: 65%;
    border-radius: var(--radius-lg);
    padding-bottom: var(--spacing-xl);
}

/* Logo */
.form .g-box-shadow__dark-lightest-v3 .g-width-100--xs {
    padding-bottom: var(--spacing-xl);
}

.form .g-padding-y-50--xs {
    padding-bottom: 1.125rem;
}

/* Text Elements */
.form p {
    font-weight: bold;
    padding: 0.3rem 0.1rem;
}

.form .g-font-size-60--md {
    font-size: 3rem !important;
    padding-top: 3.2rem;
}

.form .g-margin-b-50--md {
    margin-bottom: var(--spacing-md);
}

.form .g-font-size-22--sm {
    font-weight: 500;
    font-size: 1.3rem !important;
}

/* ------------------------------------
   4. FLOATING LABEL SYSTEM
   ------------------------------------ */
.floating-label-container {
    position: relative;  /* CRITICAL: This makes absolute positioning work */
    margin-bottom: 2rem; /* Increased to make room for error messages */
}

/* Container for input and icon - needs to be relative for icon positioning */
.floating-label-container > div {
    position: relative;
}

.floating-label-container label {
    font-weight: 500;
    position: absolute;
    top: 50%;
    left: 2.5rem; /* Match input padding */
    transform: translateY(-50%);
    transition: var(--transition-fast);
    pointer-events: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-md);
    z-index: 1;
}

.floating-label-container input {
    width: 100%;
    padding: 0.75rem 0.5rem 0.75rem 2.5rem; /* Left padding for icon */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: var(--font-size-md);
    transition: var(--transition-fast);
    height: 2.7rem;
}

.floating-label-container input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.floating-label-container input:focus + label,
.floating-label-container input:not(:placeholder-shown) + label {
    top: -0.6rem;
    left: 2.5rem;
    transform: translateY(0);
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    background-color: var(--color-white);
    padding: 0 0.25rem;
    z-index: 2;
}

/* Error message positioning - NOW INSIDE the relative container */
.floating-label-container .field-errors {
    position: absolute;
    bottom: -1.3rem;
    left: 1rem;
    font-size: var(--font-size-xs);
    color: var(--color-error-dark);
    background: transparent;
    padding: 0;
    border: none;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 2rem);
}

/* Special handling for terms checkbox (not in floating-label-container) */
#error-terms {
    display: block;
    margin-top: 0.25rem;
    font-size: var(--font-size-xs);
    color: var(--color-error-dark);
    background: transparent;
    padding: 0;
    border: none;
}

/* Password strength meter spacing */
.floating-label-container .password-strength {
    margin-top: 0.5rem;
    width: 100%;
}

.floating-label-container .password-requirements {
    margin-top: 0.25rem;
    width: 100%;
    flex-wrap: wrap;
}

/* Ensure password container has enough space */
.col-sm-6 .floating-label-container {
    min-height: 130px; /* Space for input, error, and strength meter */
}

/* Input Icons */
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    z-index: 3;
    pointer-events: none;
    font-size: var(--font-size-md);
}

/* Password toggle button */
.togglePassword {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 3;
    transition: var(--transition-fast);
    font-size: var(--font-size-lg);
}

.togglePassword:hover {
    color: var(--color-primary);
}

/* ------------------------------------
   5. INPUT FIELDS & ICONS
   ------------------------------------ */
.form .s-form-v4__input {
    position: relative;
    padding-left: 2.5rem !important;
    border: solid #8C8C8C 0.1rem;
    border-radius: var(--radius-sm);
    letter-spacing: normal;
    height: 2.7rem;
    text-transform: none;
    transition: var(--transition-fast);
}

.form .s-form-v4__input:focus {
    border-color: var(--color-primary);
}

.form .s-form-v4__input::placeholder {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.s-form-v4__input + label {
    left: 2.5rem !important;
}

/* Input Icons */
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    z-index: var(--z-index-icons);
    pointer-events: none;
    font-size: var(--font-size-md);
}

/* ------------------------------------
   6. PASSWORD VISIBILITY TOGGLE
   ------------------------------------ */
.togglePassword {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: var(--z-index-toggle);
    transition: var(--transition-fast);
    font-size: var(--font-size-lg);
}

.togglePassword:hover {
    color: var(--color-primary);
}

.togglePassword:focus {
    outline: none;
}

/* ------------------------------------
   7. VALIDATION & ERROR STATES
   ------------------------------------ */
.field-errors {
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: block;
    color: var(--color-error-dark);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-error-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-error);
    animation: fadeIn 0.3s ease-out;
}

/* Input error state */
input.error-state {
    border-color: var(--color-error) !important;
    background-color: var(--color-error-light) !important;
    animation: shake 0.5s ease-in-out;
}

input.error-state:focus {
    box-shadow: var(--shadow-error);
}

/* ------------------------------------
   8. MESSAGE NOTIFICATIONS
   ------------------------------------ */
.ajax-message {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    display: none;
    font-weight: 500;
    position: relative;
}

.ajax-message.error {
    background: var(--color-error-light);
    color: var(--color-error-dark);
    border: 2px solid var(--color-error);
    display: block;
    animation: slideIn 0.3s ease-out;
}

.ajax-message.success {
    background: var(--color-success-light);
    color: var(--color-success-dark);
    border: 2px solid var(--color-success);
    display: block;
    animation: slideIn 0.3s ease-out;
}

.ajax-message .message-content {
    display: flex;
    align-items: center;
    padding-right: 30px;
}

.message-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: inherit;
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: var(--transition-fast);
}

.message-close:hover {
    opacity: 0.7;
}

/* ------------------------------------
   9. PASSWORD STRENGTH METER
   ------------------------------------ */
.password-strength {
    margin-top: var(--spacing-xs);
    height: 5px;
    border-radius: var(--radius-sm);
    background: var(--color-border);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.password-strength-bar.weak {
    background: var(--color-error);
    width: 25%;
}

.password-strength-bar.medium {
    background: var(--color-warning);
    width: 50%;
}

.password-strength-bar.strong {
    background: #68d391;
    width: 75%;
}

.password-strength-bar.very-strong {
    background: var(--color-success);
    width: 100%;
}

.password-requirements {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: var(--spacing-xs);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.password-requirements span {
    display: flex;
    align-items: center;
    gap: 3px;
    transition: var(--transition-fast);
}

.password-requirements i {
    font-size: 10px;
}

.password-requirements .valid {
    color: var(--color-success);
}

.password-requirements .valid i {
    color: var(--color-success);
}

.password-requirements .invalid {
    color: var(--color-error);
}

.password-requirements .invalid i {
    color: var(--color-error);
}

/* ------------------------------------
   10. BUTTONS & LOADING STATES
   ------------------------------------ */
.form button[type="submit"] {
    background: var(--gradient-primary);
    color: var(--color-white);
    border: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.form button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

.form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#submitSpinner {
    vertical-align: middle;
    margin-left: var(--spacing-xs);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-overlay);
    display: none;
}

.delay-indicator {
    display: none;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: var(--spacing-sm);
    animation: fadeIn 0.5s ease-out;
}

/* ------------------------------------
   11. SECURITY BADGE & LINKS
   ------------------------------------ */
.security-badge {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.form a {
    color: #515151;
    font-size: var(--font-size-xs);
    letter-spacing: normal;
    text-decoration: none;
    transition: var(--transition-fast);
}

.form a:hover {
    color: #9ACD32;
    text-decoration: underline;
}

.form a.g-color--primary {
    color: var(--color-primary);
}

.form a.g-color--primary:hover {
    color: var(--color-primary-dark);
}

/* ------------------------------------
   12. HONEYPOT FIELD
   ------------------------------------ */
.ohnohoney {
    opacity: 0;
    position: absolute;
    top: 0;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: var(--z-index-honeypot);
}

/* ------------------------------------
   13. UTILITY CLASSES
   ------------------------------------ */
.g-text-right--xs {
    text-align: right;
}

.g-display--inline-block {
    display: inline-block;
}

/* ------------------------------------
   14. ANIMATIONS
   ------------------------------------ */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}


/* Skeleton Loader */
.skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.skeleton-header {
    text-align: center;
    margin-bottom: 2rem;
}

.skeleton-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
    width: 200px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-subtitle {
    width: 150px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-content {
    width: 100%;
    max-width: 300px;
    margin: 2rem 0;
}

.skeleton-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line-short {
    width: 60%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

.skeleton-footer {
    margin-top: 2rem;
}

.skeleton-button {
    width: 150px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 0 auto;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.4s;
}

.skeleton-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 1rem auto;
    overflow: hidden;
}

.skeleton-progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.skeleton-text {
    color: white;
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}


/* ------------------------------------
   15. RESPONSIVE BREAKPOINTS
   ------------------------------------ */

/* 15.1 Mobile (320px - 575px) */
@media screen and (max-width: 364.98px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 100%;
    }
    
    .form .g-padding-x-40--xs {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
    
    .form .g-box-shadow__dark-lightest-v3 .g-width-100--xs {
        padding-bottom: var(--spacing-lg);
    }
    
    .form .g-width-100--xs {
        width: 4.25rem;
    }
    
    .form .s-form-v4__input {
        padding-left: 0.8rem;
        height: 2.5rem;
    }
    
    .form .g-font-size-28--xs {
        font-size: 2.2rem !important;
    }
    
    .form .g-margin-b-30--xs {
        margin-bottom: 1.2rem;
    }
    
    .form .g-margin-b-30--xs.g-margin-b-50--md {
        margin-bottom: 0.8rem;
    }
    
    .form p {
        font-size: var(--font-size-md);
    }
}

/* 15.2 Small Devices (365px - 575px) */
@media screen and (min-width: 365px) and (max-width: 575.98px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 100%;
    }
    
    .form .g-box-shadow__dark-lightest-v3 .g-width-100--xs {
        padding-bottom: var(--spacing-xl);
    }
    
    .form .g-padding-x-40--xs {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
    
    .form .g-width-100--xs {
        width: 5.25rem;
    }
    
    .form .g-margin-b-50--md {
        margin-bottom: 0.2rem;
    }
    
    .form .g-font-size-28--xs {
        font-size: 3rem !important;
    }
    
    .form .s-form-v4__input {
        height: 3rem;
    }
    
    .form p {
        font-size: var(--font-size-md);
    }
}

/* 15.3 Small Devices (576px - 767px) */
@media screen and (min-width: 576px) and (max-width: 767.98px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 90%;
    }
}

/* 15.4 Medium Devices (768px - 991px) */
@media screen and (min-width: 768px) and (max-width: 991.98px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 90%;
    }
    
    .form .g-font-size-50--md {
        font-size: 5rem !important;
    }
    
    .form .g-font-size-20--md {
        font-size: 1.7rem !important;
    }
    
    .form .s-form-v4__input {
        font-size: var(--font-size-xl);
    }
    
    .form .s-form-v4__icon {
        font-size: var(--font-size-xl);
    }
    
    /* Floating label adjustments for tablet */
    .floating-label-container {
        margin-bottom: var(--spacing-md);
    }
    
    .floating-label-container .text-danger.field-errors {
        bottom: -1.2rem;
    }
}

/* 15.5 Large Devices (992px - 1199px) */
@media screen and (min-width: 992px) and (max-width: 1199.98px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 80%;
    }
    
    .form .g-font-size-50--md {
        font-size: 5rem !important;
    }
    
    .form .g-font-size-20--md {
        font-size: 1.7rem !important;
    }
    
    .form .s-form-v4__input {
        font-size: var(--font-size-xl);
    }
    
    .form .s-form-v4__icon {
        font-size: 1.4rem;
    }
}

/* 15.6 Extra Large Devices (1200px - 1399px) */
@media screen and (min-width: 1200px) and (max-width: 1399.98px) {
    /* Maintain default styles */
}

/* 15.7 Extra Extra Large Devices (1400px and up) */
@media screen and (min-width: 1400px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 60%;
    }
}

/* 15.8 Special responsive overrides */
@media (max-width: 768px) {
    .row.g-margin-b-30--xs > [class*="col-"] {
        margin-bottom: 20px;
    }
    
    .g-padding-x-40--xs {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .s-form-v4__input {
        padding-left: 2.5rem !important;
    }
}

/* ------------------------------------
   16. LOGIN PAGE SPECIFIC STYLES (Shared)
   ------------------------------------ */

/* Form Options Layout */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Logo Section */
.form .login-logo {
    max-width: 100px;
    height: auto;
    margin-bottom: var(--spacing-lg);
}

.form .login-title {
    font-size: var(--font-size-xl);
    color: var(--color-text-primary);
    margin-top: var(--spacing-lg);
}

.form .login-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Password Toggle - ensure it doesn't interfere with layout */
.togglePassword {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 3;
    transition: var(--transition-fast);
    font-size: var(--font-size-lg);
    line-height: 1;
}

.togglePassword:hover {
    color: var(--color-primary);
}

.togglePassword:focus {
    outline: none;
    color: var(--color-primary);
}

/* Input Icons */
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    z-index: 3;
    pointer-events: none;
    font-size: var(--font-size-md);
    line-height: 1;
}

/* Form Card */
.form .g-box-shadow__dark-lightest-v3 {
    max-width: 65%;
    border-radius: var(--radius-lg);
    padding-bottom: var(--spacing-xl);
    margin: 0 auto;
    background: var(--color-white);
    box-shadow: var(--shadow-lg) !important;
}

/* Background */
.login.form {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Container Padding */
.form .g-padding-x-40--xs {
    padding-left: var(--spacing-xl) !important;
    padding-right: var(--spacing-xl) !important;
}

.form .g-padding-y-50--xs {
    padding-top: var(--spacing-xl) !important;
    padding-bottom: var(--spacing-xl) !important;
}

/* Security Badge */
.security-badge {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.security-badge i {
    color: var(--color-primary);
}

/* Footer Links */
.form .footer-links {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.form .footer-links a {
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: var(--transition-fast);
    margin: 0 var(--spacing-xs);
}

.form .footer-links a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.form .footer-links i {
    margin-right: 5px;
}

.form .footer-links .divider {
    color: var(--color-text-muted);
    margin: 0 var(--spacing-xs);
}

/* Shake Animation - ensure it's available */
.shake {
    animation: shake 0.5s ease-in-out;
}

/* Ensure animations are defined */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loader */
.skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    z-index: var(--z-index-overlay);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.skeleton-header {
    text-align: center;
    margin-bottom: 2rem;
}

.skeleton-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
    width: 200px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-subtitle {
    width: 150px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-content {
    width: 100%;
    max-width: 300px;
    margin: 2rem 0;
}

.skeleton-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line-short {
    width: 60%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

.skeleton-footer {
    margin-top: 2rem;
}

.skeleton-button {
    width: 150px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 0 auto;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.4s;
}

.skeleton-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 1rem auto;
    overflow: hidden;
}

.skeleton-progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.skeleton-text {
    color: white;
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

/* Responsive adjustments for login page */
@media (max-width: 480px) {
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .g-text-right--xs {
        text-align: left;
    }
    
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 95%;
    }
    
    .form .g-padding-x-40--xs {
        padding-left: var(--spacing-md) !important;
        padding-right: var(--spacing-md) !important;
    }
    
    .form .login-logo {
        max-width: 80px;
    }
    
    .form .login-title {
        font-size: var(--font-size-lg);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .form .g-box-shadow__dark-lightest-v3 {
        max-width: 85%;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .form .g-box-shadow__dark-lightest-v3 {
        background: var(--color-gray-light);
    }
}