/**
 * POS Authentication Components
 * Professional Component-Based CSS Architecture
 * Author: Senior Frontend Developer
 * Version: 1.0.0
 */

/* ===================================
   BODY & WRAPPER RESET
   =================================== */

.pos-auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.pos-auth-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ===================================
   BASE LAYOUT SYSTEM
   =================================== */

.pos-auth-container {
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pos-space-4);
    position: relative;
    overflow-x: hidden;

    /* White background with subtle patterns */
    background: #ffffff;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f5 100%);

    /* Subtle pattern overlays */
    background-image:
        radial-gradient(circle at 20% 20%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(52, 152, 219, 0.02) 0%, transparent 30%),
        linear-gradient(45deg, rgba(52, 152, 219, 0.01) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(52, 152, 219, 0.01) 25%, transparent 25%),
        radial-gradient(circle, rgba(52, 152, 219, 0.02) 1px, transparent 1px),
        linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f5 100%);
    background-size:
        300px 300px,
        300px 300px,
        200px 200px,
        40px 40px,
        40px 40px,
        20px 20px,
        100% 100%;
    background-position:
        0 0,
        100% 100%,
        50% 50%,
        0 0,
        20px 20px,
        0 0,
        0 0;
}

/* Fallback for older browsers */
.pos-auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='pos-pattern' x='0' y='0' width='20' height='20' patternUnits='userSpaceOnUse'%3E%3Crect width='20' height='20' fill='none'/%3E%3Ccircle cx='10' cy='10' r='1' fill='rgba(52,152,219,0.05)'/%3E%3C/pattern%3E%3Cpattern id='pos-squares' x='0' y='0' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Crect width='40' height='40' fill='none'/%3E%3Crect x='15' y='15' width='10' height='10' fill='rgba(52,152,219,0.03)' rx='2'/%3E%3C/pattern%3E%3Cpattern id='pos-cash' x='0' y='0' width='80' height='80' patternUnits='userSpaceOnUse'%3E%3Crect width='80' height='80' fill='none'/%3E%3Crect x='30' y='30' width='20' height='15' fill='rgba(52,152,219,0.02)' rx='3'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23pos-pattern)'/%3E%3Crect width='100' height='100' fill='url(%23pos-squares)'/%3E%3Crect width='100' height='100' fill='url(%23pos-cash)'/%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

.pos-auth-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===================================
   RESPONSIVE GRID SYSTEM
   =================================== */

.pos-auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--pos-space-6);
    align-items: center;
    width: 100%;
}

/* Single column layout when no branding section */
.pos-auth-grid--single {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 991px) {

    .pos-auth-grid,
    .pos-auth-grid--single {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 600px;
        margin: 0 auto;
    }

    /* HIDE entire branding section on tablet */
    .pos-auth-branding {
        display: none !important;
    }

    .pos-auth-form-section {
        order: 1;
    }
}

/* Desktop Layout */
@media (min-width: 992px) {
    .pos-auth-grid {
        grid-template-columns: 400px 550px;
        gap: 80px;
        min-height: calc(100vh - 64px);
        min-height: calc(100dvh - 64px);
        align-items: center;
        justify-content: center;
        max-width: none;
        margin: 0 auto;
    }

    /* Override single column layout on desktop - always show 2 columns */
    .pos-auth-grid--single {
        grid-template-columns: 400px 550px;
        gap: 80px;
        max-width: none;
        margin: 0 auto;
        align-items: center;
        justify-content: center;
    }

    /* SHOW branding section on desktop - cards on left */
    .pos-auth-branding {
        display: flex !important;
        order: 1;
        justify-self: end;
        padding-right: 0;
    }

    /* Login card on right */
    .pos-auth-form-section {
        order: 2;
        justify-self: start;
        padding-left: 0;
        max-width: 550px;
    }

    /* SHOW features on desktop */
    .pos-auth-features,
    .pos-auth-features--single {
        display: grid !important;
    }
}

/* Large Desktop Layout */
@media (min-width: 1400px) {

    .pos-auth-grid,
    .pos-auth-grid--single {
        gap: 100px;
    }
}

/* ===================================
   BRANDING SECTION COMPONENT
   =================================== */

.pos-auth-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #2c3e50;
    padding: 0;
    width: 100%;
    max-width: 400px;
}

.pos-auth-branding--compact {
    padding: var(--pos-space-6);
}

.pos-auth-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: var(--pos-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    transition: transform var(--pos-transition-base);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

.pos-auth-logo-wrapper {
    width: 180px;
    height: 180px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: transform var(--pos-transition-base);
}

.pos-auth-logo-wrapper:hover {
    transform: translateY(-4px);
}

.pos-auth-logo-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.pos-auth-icon--compact {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.pos-auth-icon:hover {
    transform: translateY(-4px);
}

.pos-auth-icon i {
    font-size: 42px;
    color: var(--pos-color-white);
}

.pos-auth-icon--compact i {
    font-size: 32px;
}

.pos-auth-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: none;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #2c3e50;
}

.pos-auth-title--compact {
    font-size: 24px;
    margin-bottom: 8px;
}

.pos-auth-subtitle {
    font-size: 15px;
    opacity: 0.8;
    margin-bottom: 0;
    line-height: 1.5;
    max-width: 380px;
    font-weight: 400;
    color: #6c757d;
}

.pos-auth-subtitle--compact {
    font-size: 14px;
    margin-bottom: 16px;
    max-width: 300px;
}

/* ===================================
   FEATURES GRID COMPONENT
   =================================== */

.pos-auth-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
    width: 100%;
}

.pos-auth-feature {
    background: #ffffff;
    padding: 20px 16px;
    border-radius: 14px;
    border: 2px solid #e9ecef;
    text-align: center;
    transition: all var(--pos-transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pos-auth-feature:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.pos-auth-feature i {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
    color: #3498db;
}

.pos-auth-feature h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
}

.pos-auth-feature p {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
    line-height: 1.4;
    color: #6c757d;
}

/* Single Column Features for Specific Pages */
.pos-auth-features--single {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile: Stack to single column */
@media (max-width: 767px) {
    .pos-auth-features--single {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

/* ===================================
   FORM CARD COMPONENT
   =================================== */

.pos-auth-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    width: 100%;
    max-width: 550px;
    margin: 0;
    overflow: hidden;
}

.pos-auth-card-header {
    text-align: center;
    margin-bottom: 0;
    position: relative;
}

.pos-auth-card-header-icon-wrapper {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 32px 0 24px 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pos-auth-card-content {
    padding: 32px 40px 40px 40px;
}

.pos-auth-card-app-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--pos-space-3);
    margin-bottom: var(--pos-space-6);
    padding-bottom: var(--pos-space-4);
    border-bottom: 1px solid var(--pos-color-gray-200);
}

.pos-auth-card-app-logo {
    width: 50px;
    height: 50px;
    border-radius: var(--pos-radius-md);
    object-fit: contain;
}

.pos-auth-card-app-name {
    font-size: var(--pos-font-size-lg);
    font-weight: var(--pos-font-weight-semibold);
    color: var(--pos-color-primary);
    margin: 0;
}

.pos-auth-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform var(--pos-transition-base);
    background: rgba(255, 255, 255, 0.95);
}

.pos-auth-card-logo:hover {
    transform: scale(1.05);
}

.pos-auth-card-logo i {
    font-size: 36px;
    color: #2c3e50;
}

/* Logo Variants - All use white background with dark icon */
.pos-auth-card-logo--login {
    background: rgba(255, 255, 255, 0.95);
}

.pos-auth-card-logo--forgot {
    background: rgba(255, 255, 255, 0.95);
}

.pos-auth-card-logo--reset {
    background: rgba(255, 255, 255, 0.95);
}

/* Logo Image Variant */
.pos-auth-card-logo--image {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--pos-space-2);
}

.pos-auth-card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--pos-radius-md);
}

.pos-auth-card-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    margin-top: 24px;
    line-height: 1.2;
}

.pos-auth-card-subtitle {
    color: #95a5a6;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

/* ===================================
   FORM COMPONENTS
   =================================== */

.pos-form-group {
    margin-bottom: 18px;
    position: relative;
}

.pos-form-group:first-of-type {
    margin-top: 0;
}

.pos-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #5a6c7d;
    font-size: 13px;
}

.pos-form-label i {
    color: #7f8c8d;
    font-size: 13px;
}

.pos-input-wrapper {
    position: relative;
}

.pos-form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #3498db;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--pos-font-family-primary);
    transition: all var(--pos-transition-base);
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #2c3e50 !important;

    /* Mobile optimization */
    min-height: 50px;
}

/* Prevent iOS zoom */
@media screen and (max-width: 768px) {
    .pos-form-control {
        font-size: 16px;
        background-color: #ffffff !important;
        background: #ffffff !important;
    }
}

.pos-form-control:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.pos-form-control.is-invalid {
    border-color: var(--pos-color-danger);
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.pos-form-control::placeholder {
    color: var(--pos-color-gray-400);
}

.pos-form-control:read-only {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
    color: var(--pos-color-gray-600);
}

.pos-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #5a6c7d;
    font-size: 18px;
    z-index: 3;
    pointer-events: none;
}

.pos-password-toggle {
    position: absolute;
    right: var(--pos-space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--pos-color-gray-400);
    cursor: pointer;
    font-size: var(--pos-font-size-lg);
    z-index: 3;
    padding: var(--pos-space-2);
    border-radius: var(--pos-radius-base);
    transition: color var(--pos-transition-fast);

    /* Touch-friendly */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-password-toggle:hover {
    color: var(--pos-color-gray-600);
}

.pos-password-toggle:focus {
    outline: 2px solid var(--pos-color-secondary);
    outline-offset: 2px;
}

/* ===================================
   BUTTON COMPONENTS
   =================================== */

.pos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pos-space-2);
    padding: var(--pos-space-4) var(--pos-space-6);
    border: none;
    border-radius: var(--pos-radius-lg);
    font-size: var(--pos-font-size-base);
    font-weight: var(--pos-font-weight-semibold);
    font-family: var(--pos-font-family-primary);
    cursor: pointer;
    transition: all var(--pos-transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;

    /* Touch-friendly */
    min-height: 44px;
    min-width: 44px;
}

.pos-btn:focus {
    outline: 2px solid var(--pos-color-secondary);
    outline-offset: 2px;
}

.pos-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Variants */
.pos-btn--primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: var(--pos-color-white);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    font-size: 16px;
    font-weight: 600;
    padding: 15px 24px;
    border-radius: 12px;
}

.pos-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

.pos-btn--success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: var(--pos-color-white);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    font-size: 16px;
    font-weight: 600;
    padding: 15px 24px;
    border-radius: 12px;
}

.pos-btn--success:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.pos-btn--warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    font-size: 16px;
    font-weight: 600;
    padding: 15px 24px;
    border-radius: 12px;
}

.pos-btn--warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

.pos-btn--danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--pos-color-white);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    font-size: 16px;
    font-weight: 600;
    padding: 15px 24px;
    border-radius: 12px;
}

.pos-btn--danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
}

.pos-btn--full {
    width: 100%;
}

/* Loading State */
.pos-btn--loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.pos-btn--loading span {
    visibility: hidden;
}

.pos-btn--loading i {
    visibility: hidden;
}

.pos-btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: var(--pos-radius-full);
    animation: pos-spin 0.8s linear infinite;
}

@keyframes pos-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===================================
   FORM OPTIONS COMPONENT
   =================================== */

.pos-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
    gap: 16px;
}

.pos-remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #5a6c7d;
    font-size: 13px;
}

.pos-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
    cursor: pointer;
}

.pos-forgot-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color var(--pos-transition-fast);
    white-space: nowrap;
}

.pos-forgot-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ===================================
   ALERT COMPONENTS
   =================================== */

.pos-alert {
    padding: var(--pos-space-4);
    border-radius: var(--pos-radius-md);
    margin-bottom: var(--pos-space-6);
    border: none;
    font-size: var(--pos-font-size-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--pos-space-2);
    transition: all var(--pos-transition-base);
}

.pos-alert--success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--pos-color-success);
    border-left: 4px solid var(--pos-color-success);
}

.pos-alert--info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--pos-color-secondary);
    border-left: 4px solid var(--pos-color-secondary);
}

.pos-alert--danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.pos-alert--warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* ===================================
   VALIDATION FEEDBACK
   =================================== */

.pos-invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: var(--pos-font-size-xs);
    margin-top: var(--pos-space-1);
    font-weight: var(--pos-font-weight-medium);
}

.pos-form-control.is-invalid {
    border-color: #dc3545;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.pos-form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

/* ===================================
   BACK LINK COMPONENT
   =================================== */

.pos-back-link {
    text-align: center;
    margin-top: 24px;
}

.pos-back-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: color var(--pos-transition-fast);
}

.pos-back-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ===================================
   INFO BOX COMPONENT
   =================================== */

.pos-info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    margin-top: 24px;
    text-align: center;
}

.pos-info-box i {
    display: none;
}

.pos-info-box h4 {
    display: none;
}

.pos-info-box p {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Mobile Optimizations */
@media (max-width: 767px) {
    .pos-auth-container {
        padding: 16px;
        align-items: center;
        padding-top: 24px;
    }

    .pos-auth-grid {
        gap: 16px;
    }

    /* HIDE entire branding section on mobile */
    .pos-auth-branding {
        display: none !important;
    }

    .pos-auth-form-section {
        order: 1;
        width: 100%;
    }

    .pos-auth-card {
        padding: 0;
        margin: 0 auto;
        max-width: 100%;
    }

    .pos-auth-card-content {
        padding: 24px 20px 28px 20px;
    }

    .pos-auth-card-header-icon-wrapper {
        padding: 24px 0 20px 0;
    }

    .pos-auth-card-logo {
        width: 70px;
        height: 70px;
    }

    .pos-auth-card-logo i {
        font-size: 32px;
    }

    .pos-auth-card-title {
        font-size: 22px;
        margin-top: 20px;
    }

    .pos-auth-card-subtitle {
        font-size: 13px;
    }

    .pos-form-options {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        font-size: 12px;
    }

    .pos-form-control {
        font-size: 16px;
        padding: 12px 16px 12px 44px;
        min-height: 48px;
    }

    .pos-input-icon {
        left: 14px;
        font-size: 16px;
    }

    .pos-btn--primary {
        font-size: 15px;
        padding: 13px 20px;
    }
}

/* Small Mobile */
@media (max-width: 479px) {
    .pos-auth-container {
        padding: 12px;
        padding-top: 20px;
    }

    .pos-auth-card {
        border-radius: 20px;
    }

    .pos-auth-card-content {
        padding: 20px 16px 24px 16px;
    }

    .pos-auth-card-title {
        font-size: 20px;
        margin-top: 16px;
    }

    .pos-auth-card-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .pos-form-group {
        margin-bottom: 16px;
    }

    .pos-form-control {
        padding: 11px 14px 11px 42px;
        min-height: 46px;
        font-size: 16px;
    }

    .pos-btn--primary {
        font-size: 14px;
        padding: 12px 18px;
    }

    .pos-info-box {
        padding: 12px;
        font-size: 12px;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 991px) {
    .pos-auth-grid {
        gap: 32px;
    }

    .pos-auth-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .pos-auth-card-content {
        padding: 28px 32px 36px 32px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .pos-auth-card {
        max-width: 550px;
    }

    .pos-auth-card-content {
        padding: 36px 44px 44px 44px;
    }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* Force white background on all form inputs */
input.pos-form-control,
input.pos-form-control:focus,
input.pos-form-control:active,
input.pos-form-control:hover {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #333333 !important;
}

input.pos-form-control:read-only {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
    color: #666666 !important;
}

/* Focus Management */
.pos-form-control:focus,
.pos-btn:focus,
.pos-password-toggle:focus {
    outline: 2px solid var(--pos-color-secondary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .pos-auth-card {
        border: 2px solid var(--pos-color-gray-900);
    }

    .pos-form-control {
        border-width: 2px;
    }

    .pos-btn {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .pos-auth-container {
        background: white !important;
        color: black !important;
    }

    .pos-auth-branding {
        display: none;
    }

    .pos-auth-card {
        box-shadow: none;
        border: 1px solid black;
    }
}

/* ===================================
   OVERRIDE ANY CONFLICTING STYLES
   =================================== */

/* Force input backgrounds - Override Bootstrap and other frameworks */
.pos-auth-container input[type="text"],
.pos-auth-container input[type="email"],
.pos-auth-container input[type="password"],
.pos-auth-container input.pos-form-control,
.pos-auth-container .pos-form-control {
    background-color: #ffffff !important;
    background-image: none !important;
    background: #ffffff !important;
    color: #333333 !important;
}

.pos-auth-container input[readonly],
.pos-auth-container input.pos-form-control[readonly],
.pos-auth-container .pos-form-control[readonly] {
    background-color: #f8f9fa !important;
    background-image: none !important;
    background: #f8f9fa !important;
    color: #666666 !important;
}

/* Ensure focus states work */
.pos-auth-container input:focus,
.pos-auth-container .pos-form-control:focus {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #333333 !important;
}

/* Dark mode override */
@media (prefers-color-scheme: dark) {

    .pos-auth-container input[type="text"],
    .pos-auth-container input[type="email"],
    .pos-auth-container input[type="password"],
    .pos-auth-container input.pos-form-control,
    .pos-auth-container .pos-form-control {
        background-color: #ffffff !important;
        background: #ffffff !important;
        color: #333333 !important;
    }
}