/* ===================================
   AysimaPOS - Auth Pages Styles
   Modern Professional 2-Column Design
   Landing Page Integrated
   =================================== */

/* Auth Section - Full Height with Landing Background */
.auth-section {
    min-height: calc(100vh - 200px);
    padding: 0.5rem 1rem;
    background: var(--white);
    position: relative;
}

/* Auth Card Wrapper - 2 Column Layout */
.auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    min-height: auto;
}

.auth-card .row {
    margin: 0;
    height: 100%;
}

/* Left Panel - Marketing Content */
.auth-left-panel {
    background: var(--gradient-primary);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

/* Brand Logo Section */
.auth-brand-logo {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.auth-brand-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.auth-brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-brand-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    font-weight: 400;
}

/* Features List */
.auth-features {
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.auth-feature-item:hover {
    transform: translateX(5px);
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.1rem;
    color: #ffffff;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-feature-item span {
    line-height: 1.5;
}

/* Right Panel - Form Container */
.auth-right-panel {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.auth-form-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Form Header */
.auth-form-header {
    text-align: left;
    margin-bottom: 36px;
}

.auth-form-header.text-center {
    text-align: center;
}

.auth-form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.auth-form-title.compact {
    font-size: 1.75rem;
}

.auth-form-subtitle {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
}

.auth-form-subtitle.compact {
    font-size: 0.95rem;
}

/* Icon in Header */
.auth-header-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

/* Form Groups */
.auth-form-group {
    margin-bottom: 22px;
}

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

.auth-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

/* Input Container with Icon */
.auth-input-wrapper {
    position: relative;
}

.auth-form-control {
    width: 100%;
    padding: 12px 16px;
    padding-right: 45px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
    font-family: var(--font-primary);
    color: var(--dark);
}

.auth-form-control:hover {
    border-color: var(--gray);
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.auth-form-control.is-invalid {
    border-color: var(--danger-500);
    background: var(--danger-50);
}

.auth-form-control::placeholder {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Input Icon */
.auth-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-input-icon:hover {
    color: var(--primary-color);
}

.auth-input-icon.left {
    right: auto;
    left: 16px;
}

.auth-form-control.has-icon-left {
    padding-left: 45px;
}

.auth-form-control.has-icon-right {
    padding-right: 45px;
}

/* Textarea */
.auth-form-control[type="textarea"],
textarea.auth-form-control {
    min-height: 100px;
    resize: vertical;
    padding: 12px 16px;
}

/* Checkbox */
.auth-form-check {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.auth-form-check-input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.auth-form-check-label {
    color: var(--gray-dark);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

/* Primary Button */
.auth-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

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

.auth-btn-primary:disabled {
    background: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.auth-btn-primary:disabled:hover {
    transform: none;
    opacity: 0.6;
}

.auth-btn-primary.compact {
    padding: 12px 20px;
    font-size: 0.95rem;
}

/* Links */
.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Alerts */
.auth-alert {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: none;
    font-size: 0.9rem;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
}

.auth-alert i {
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-alert-success {
    background: #dcfce7;
    color: var(--success-800);
    border-left: 4px solid var(--success-500);
}

.auth-alert-danger {
    background: var(--danger-50);
    color: var(--danger-800);
    border-left: 4px solid var(--danger-500);
}

.auth-alert-info {
    background: var(--primary-100);
    color: var(--primary-800);
    border-left: 4px solid var(--primary-500);
}

/* Validation Feedback */
.auth-invalid-feedback,
.invalid-feedback {
    display: block;
    color: var(--danger-600);
    font-size: 0.83rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--gray-light);
}

.auth-divider-text {
    background: #ffffff;
    padding: 0 16px;
    position: relative;
    color: var(--gray);
    font-size: 0.88rem;
}

/* Link Center Alignment */
.auth-link-center {
    display: block;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* Single Column Layout (for smaller screens or special cases) */
.auth-card-single {
    max-width: 500px;
}

.auth-card-single .auth-left-panel {
    display: none;
}

.auth-card-single .auth-right-panel {
    padding: 1.5rem 1.25rem;
}

/* Loading State */
.auth-btn-primary.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.auth-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: authButtonSpin 0.6s linear infinite;
}

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

/* Row Spacing for 2-Column Form Layouts */
.auth-form-row {
    margin-bottom: 0;
}

.auth-form-row .col-md-6 {
    padding-left: 8px;
    padding-right: 8px;
}

.auth-form-row .col-md-6:first-child {
    padding-left: 0;
}

.auth-form-row .col-md-6:last-child {
    padding-right: 0;
}

/* Compact Form Elements for Register */
.auth-register-compact .auth-form-group {
    margin-bottom: 16px;
}

.auth-register-compact .auth-form-control {
    padding: 11px 15px;
    padding-right: 45px;
    font-size: 0.92rem;
}

.auth-register-compact .auth-form-label {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

/* Responsive - Large Desktop */
@media (min-width: 1400px) {
    .auth-card {
        max-width: 1400px;
    }
    
    .auth-left-panel {
        padding: 2rem 1.75rem;
    }
    
    .auth-right-panel {
        padding: 2rem 1.75rem;
    }
}

/* Responsive - Tablet */
@media (max-width: 991px) {
    .auth-section {
        padding: 0.5rem 1rem;
        min-height: auto;
    }
    
    .auth-card {
        max-width: 700px;
        flex-direction: column;
        min-height: auto;
    }
    
    .auth-left-panel {
        padding: 1.25rem 1rem;
        order: 2;
    }
    
    .auth-right-panel {
        padding: 1.25rem 1rem;
        order: 1;
    }
    
    .auth-brand-title {
        font-size: 2rem;
    }
    
    .auth-form-title {
        font-size: 1.75rem;
    }
    
    .auth-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 30px;
    }
    
    .auth-feature-item {
        margin-bottom: 0;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .auth-section {
        padding: 0.5rem 0.75rem;
    }
    
    .auth-card {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .auth-left-panel {
        padding: 1rem 0.875rem;
    }
    
    .auth-right-panel {
        padding: 1rem 0.875rem;
    }
    
    .auth-form-container {
        max-width: 100%;
    }
    
    .auth-brand-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .auth-brand-title {
        font-size: 1.75rem;
    }
    
    .auth-brand-subtitle {
        font-size: 1rem;
    }
    
    .auth-form-title {
        font-size: 1.5rem;
    }
    
    .auth-form-title.compact {
        font-size: 1.4rem;
    }
    
    .auth-form-subtitle {
        font-size: 0.95rem;
    }
    
    .auth-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .auth-feature-item {
        margin-bottom: 0;
    }
    
    .auth-feature-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-right: 12px;
    }
    
    .auth-form-control {
        padding: 11px 14px;
        padding-right: 40px;
        font-size: 0.92rem;
    }
    
    .auth-btn-primary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .auth-form-row .col-md-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 18px;
    }
    
    .auth-form-row .col-md-6:last-child {
        margin-bottom: 0;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .auth-left-panel {
        padding: 0.875rem 0.75rem;
    }
    
    .auth-right-panel {
        padding: 0.875rem 0.75rem;
    }
    
    .auth-brand-title {
        font-size: 1.5rem;
    }
    
    .auth-form-title {
        font-size: 1.35rem;
    }
}
