/* =====================================================
   MODERN AUTH PAGES - EchoSMS
   Enhanced Login & Registration Design
   Full Background with Centered Card
   ===================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
    --auth-primary: #0052FF;
    --auth-primary-dark: #0041cc;
    --auth-secondary: #6366f1;
    --auth-gradient: linear-gradient(135deg, #0052FF 0%, #00c6ff 50%, #0072ff 100%);
    --auth-card-bg: #ffffff;
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-input-bg: #f8fafc;
    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --auth-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   BASE STYLES
   ===================================================== */
.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--auth-gradient);
    position: relative;
}

.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/auth-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}


/*
.auth-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  background: linear-gradient(135deg, rgba(0, 82, 255, 0.85) 0%, rgba(0, 198, 255, 0.75) 100%);
  z-index: 1;
}*/

.auth-page * {
    box-sizing: border-box;
}

/* =====================================================
   MAIN CONTAINER
   ===================================================== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* =====================================================
   FORM SECTION - CENTERED CARD
   ===================================================== */
.auth-form-section {
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo img {
    max-height: 60px;
    width: auto;
}

/* Welcome Text */
.auth-welcome {
    text-align: center;
    margin-bottom: 32px;
}

.auth-welcome h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 8px 0;
}

.auth-welcome p {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* =====================================================
   HIDE RIGHT SIDE (no longer needed)
   ===================================================== */
.auth-bg-section {
    display: none !important;
}

/* =====================================================
   FORM STYLES
   ===================================================== */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--auth-danger);
}

/* Input Fields */
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
    font-weight: 400;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.1);
}

.auth-input:hover:not(:focus) {
    border-color: #cbd5e1;
}

.auth-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 18px;
    pointer-events: none;
}

/* Select Fields */
.auth-select {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.auth-select:focus {
    border-color: var(--auth-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.1);
}

/* File Input */
.auth-file-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    color: var(--auth-text-muted);
    background: var(--auth-input-bg);
    border: 2px dashed var(--auth-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.auth-file-input:hover {
    border-color: var(--auth-primary);
    background: rgba(0, 82, 255, 0.02);
}

.auth-file-input::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    background: var(--auth-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-file-input::file-selector-button:hover {
    background: var(--auth-primary-dark);
}

/* Checkbox */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-checkbox label {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin: 0;
    cursor: pointer;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: var(--auth-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 82, 255, 0.3);
}

.auth-btn:hover::before {
    opacity: 1;
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn i {
    font-size: 18px;
}

.auth-btn-secondary {
    background: var(--auth-input-bg);
    color: var(--auth-text);
    border: 2px solid var(--auth-border);
}

.auth-btn-secondary:hover {
    background: #ffffff;
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   LINKS & FOOTER
   ===================================================== */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
}

.auth-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: var(--auth-text-muted);
    font-weight: 500;
}

/* Terms Text */
.auth-terms {
    font-size: 13px;
    color: var(--auth-text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.auth-terms a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* =====================================================
   FORM SECTIONS (Registration)
   ===================================================== */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--auth-border);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    font-size: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* =====================================================
   DEMO BUTTON 
   ===================================================== */
.demo-credentials {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.demo-credentials span {
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

.demo-credentials button {
    padding: 6px 14px;
    background: #f59e0b;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-credentials button:hover {
    background: #d97706;
}

/* =====================================================
   ERROR STATES
   ===================================================== */
.auth-input.is-invalid {
    border-color: var(--auth-danger);
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    display: block;
    font-size: 12px;
    color: var(--auth-danger);
    margin-top: 6px;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 576px) {
    .auth-container {
        padding: 20px 16px;
    }
    
    .auth-form-wrapper {
        padding: 30px 24px;
        border-radius: 20px;
    }
    
    .auth-welcome h1 {
        font-size: 22px;
    }
    
    .auth-welcome p {
        font-size: 13px;
    }
    
    .auth-input,
    .auth-select {
        height: 48px;
        font-size: 14px;
    }
    
    .auth-btn {
        height: 48px;
        font-size: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .auth-logo img {
        max-height: 50px;
    }
}

/* =====================================================
   LOADING STATE
   ===================================================== */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
.auth-form-wrapper {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-bg-content {
    animation: fadeIn 0.8s ease 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
