/* Universal Responsive Design System for Pump Pilot */

/* Base viewport and font settings */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-width: 320px;
    overflow-x: hidden;
}

/* Container responsiveness */
.container, .container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 100%;
}

/* Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    html {
        font-size: 18px;
    }
    
    .logo-responsive {
        height: 60px !important;
    }
    
    .card-header h1 {
        font-size: 2.5rem !important;
    }
    
    .card-body .lead {
        font-size: 1.25rem !important;
    }
    
    .chart-container {
        height: 600px !important;
        min-height: 600px !important;
    }
    
    canvas {
        height: 550px !important;
        min-height: 550px !important;
    }
}

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    html {
        font-size: 20px;
    }
    
    .logo-responsive {
        height: 70px !important;
    }
    
    .card-header h1 {
        font-size: 3rem !important;
    }
    
    .chart-container {
        height: 700px !important;
        min-height: 700px !important;
    }
    
    canvas {
        height: 650px !important;
        min-height: 650px !important;
    }
}

/* Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    html {
        font-size: 17px;
    }
    
    .logo-responsive {
        height: 55px !important;
    }
    
    .card-header h1 {
        font-size: 2.25rem !important;
    }
    
    .chart-container {
        height: 550px !important;
        min-height: 550px !important;
    }
    
    canvas {
        height: 500px !important;
        min-height: 500px !important;
    }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    html {
        font-size: 16px;
    }
    
    .logo-responsive {
        height: 120px !important;
    }
    
    .card-header h1 {
        font-size: 1.75rem !important;
    }
    
    .card-header h1 i {
        font-size: 1.5rem !important;
    }
    
    .card-body .lead {
        font-size: 1.1rem !important;
    }
    
    .chart-container {
        height: 450px !important;
        min-height: 450px !important;
        padding: 0.75rem !important;
        margin: 1rem 0 !important;
    }
    
    canvas {
        height: 400px !important;
        min-height: 400px !important;
    }
    
    /* Table responsiveness */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .table {
        font-size: 0.9rem !important;
        min-width: 600px !important;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem !important;
        white-space: nowrap !important;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1.25rem !important;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
}

/* Mobile (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    html {
        font-size: 15px;
    }
    
    .logo-responsive {
        height: 100px !important;
    }
    
    .card-header h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .card-header h1 i {
        font-size: 1.25rem !important;
    }
    
    .chart-container {
        height: 400px !important;
        min-height: 400px !important;
        padding: 0.5rem !important;
        margin: 0.75rem 0 !important;
    }
    
    canvas {
        height: 350px !important;
        min-height: 350px !important;
    }
    
    .table {
        font-size: 0.85rem !important;
        min-width: 500px !important;
    }
    
    .table th,
    .table td {
        padding: 0.6rem 0.4rem !important;
    }
}

/* Small Mobile (480px to 575px) */
@media (min-width: 480px) and (max-width: 575px) {
    .container {
        padding-right: 10px;
        padding-left: 10px;
    }
    
    html {
        font-size: 14px;
    }
    
    body {
        padding-bottom: 120px !important;
    }
    
    .logo-responsive {
        height: 80px !important;
    }
    
    .card-header h1 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    .card-header h1 i {
        font-size: 1rem !important;
    }
    
    /* Container adjustments */
    #pdf-content {
        padding: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Typography scaling */
    h1 {
        font-size: 1.4rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    h4 {
        font-size: 1rem !important;
    }
    
    /* Card optimization */
    .card {
        border-radius: 8px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .card-header {
        padding: 0.75rem !important;
        font-size: 0.95rem !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* Chart container mobile optimization */
    .chart-container {
        height: 350px !important;
        min-height: 350px !important;
        padding: 0.25rem !important;
        margin: 0.5rem 0 !important;
        background: white !important;
        border: 2px solid #007bff !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    }
    
    canvas {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    /* Table mobile optimization */
    .table-responsive {
        border: 1px solid #dee2e6 !important;
        border-radius: 6px !important;
    }
    
    .table {
        font-size: 0.75rem !important;
        margin-bottom: 0 !important;
        min-width: 450px !important;
    }
    
    .table th {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        background-color: #f8f9fa !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }
    
    .table td {
        font-size: 0.75rem !important;
        word-break: break-word !important;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.3rem !important;
        vertical-align: middle !important;
    }
    
    /* Grid system adjustments */
    .row {
        margin: 0 -5px !important;
    }
    
    .col, .col-12, .col-md-6, .col-lg-6 {
        padding: 0 5px !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Text and content scaling */
    p, div, span {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
}

/* Extra Small Mobile (320px to 479px) */
@media (max-width: 479px) {
    .container {
        padding-right: 5px;
        padding-left: 5px;
    }
    
    html {
        font-size: 13px;
    }
    
    .logo-responsive {
        height: 70px !important;
    }
    
    .card-header h1 {
        font-size: 1.1rem !important;
    }
    
    .chart-container {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    canvas {
        height: 250px !important;
        min-height: 250px !important;
    }
    
    .table {
        min-width: 400px !important;
        font-size: 0.7rem !important;
    }
    
    .table th,
    .table td {
        padding: 0.3rem 0.2rem !important;
    }
}

/* Form responsiveness */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
    
    .btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important; /* Touch-friendly */
    }
}

/* Navigation responsiveness */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 8px !important;
        margin-top: 0.5rem !important;
        padding: 1rem !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }
    
    .navbar-nav {
        text-align: center !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0 !important;
        border-radius: 6px !important;
    }
}

/* Print optimizations */
@media print {
    html {
        font-size: 12pt !important;
    }
    
    .chart-container {
        height: auto !important;
        min-height: 140mm !important;
        page-break-inside: avoid !important;
    }
    
    canvas {
        height: auto !important;
        min-height: 134mm !important;
    }
    
    .table {
        font-size: 11pt !important;
        page-break-inside: avoid !important;
    }
    
    .card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

/* Chart responsiveness for all screen sizes */
.chart-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

canvas {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Ensure proper scaling for all interactive elements */
button, .btn, a, input, select, textarea {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Dashboard Statistics Responsive Scaling */
.stats-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2B2B2B;
}

.stat-card {
    background: rgba(163, 213, 255, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    min-height: 100px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1) !important;
}

.stat-icon {
    color: #2B2B2B !important;
    font-size: 1.2rem !important;
}

.stat-number {
    color: #2B2B2B !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.stat-label {
    color: #4D4D4D !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
}

/* Desktop (1200px and up) */
@media (min-width: 1200px) {
    .stats-header {
        font-size: 1.8rem;
    }
    
    .stat-card {
        min-height: 120px;
        max-width: 160px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 1.5rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
}

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .stats-header {
        font-size: 2rem;
    }
    
    .stat-card {
        min-height: 140px;
        max-width: 180px;
    }
    
    .stat-icon {
        font-size: 1.8rem !important;
    }
    
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    .stat-label {
        font-size: 1rem !important;
    }
}

/* Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .stats-header {
        font-size: 1.6rem;
    }
    
    .stat-card {
        min-height: 110px;
        max-width: 140px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 1.3rem !important;
    }
    
    .stat-number {
        font-size: 1.8rem !important;
    }
    
    .stat-label {
        font-size: 0.85rem !important;
    }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .stats-header {
        font-size: 1.4rem;
    }
    
    .stat-card {
        min-height: 100px;
        max-width: 130px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 1.1rem !important;
    }
    
    .stat-number {
        font-size: 1.6rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
}

/* Mobile (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .stats-header {
        font-size: 1.3rem;
    }
    
    .stat-card {
        min-height: 90px;
        max-width: 120px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 1rem !important;
    }
    
    .stat-number {
        font-size: 1.4rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
}

/* Small Mobile (480px to 575px) */
@media (min-width: 480px) and (max-width: 575px) {
    .stats-header {
        font-size: 1.2rem;
    }
    
    .stats-container {
        gap: 0.5rem !important;
    }
    
    .stat-block {
        padding: 0 0.25rem !important;
    }
    
    .stat-card {
        min-height: 80px;
        max-width: 110px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .stat-number {
        font-size: 1.2rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
    
    .card-body {
        padding: 0.5rem 0.25rem !important;
    }
}

/* Extra Small Mobile (320px to 479px) */
@media (max-width: 479px) {
    .stats-header {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .stats-container {
        gap: 0.25rem !important;
        justify-content: center !important;
    }
    
    .stat-block {
        padding: 0 0.125rem !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 100px !important;
    }
    
    .stat-card {
        min-height: 70px;
        max-width: 90px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    .stat-number {
        font-size: 1rem !important;
        margin-bottom: 0.1rem !important;
    }
    
    .stat-label {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
        word-break: break-word !important;
    }
    
    .card-body {
        padding: 0.4rem 0.2rem !important;
    }
}

/* Universal Page Centering for All Screen Sizes */
body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.container, .container-fluid {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Main content centering */
.main-content {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

.main-content .container-fluid {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

/* Center form containers */
.card, .form-container {
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Center calculation forms */
.calculator-container {
    margin: 0 auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Center results pages */
.results-container {
    margin: 0 auto !important;
    max-width: 1400px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Center dashboard content */
.dashboard-container {
    margin: 0 auto !important;
    max-width: 1400px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Ultra-Wide Monitor (3200px and up) - Ultra-wide centered layout */
@media (min-width: 3200px) {
    body {
        max-width: 3200px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 2800px !important;
        padding-left: 4rem !important;
        padding-right: 4rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 2400px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 2600px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 2800px !important;
        margin: 0 auto !important;
    }
    
    .stats-header {
        font-size: 3rem;
    }
    
    .stat-card {
        min-height: 200px;
        max-width: 300px;
    }
    
    .stat-icon {
        font-size: 3rem !important;
    }
    
    .stat-number {
        font-size: 4rem !important;
    }
    
    .stat-label {
        font-size: 1.5rem !important;
    }
}

/* WQHD Monitor (2500px to 3199px) - 2K display centered layout */
@media (min-width: 2500px) and (max-width: 3199px) {
    body {
        max-width: 2560px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 2200px !important;
        padding-left: 3rem !important;
        padding-right: 3rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 2000px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 2100px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 2200px !important;
        margin: 0 auto !important;
    }
    
    .stats-header {
        font-size: 2.5rem;
    }
    
    .stat-card {
        min-height: 180px;
        max-width: 250px;
    }
    
    .stat-icon {
        font-size: 2.5rem !important;
    }
    
    .stat-number {
        font-size: 3.5rem !important;
    }
    
    .stat-label {
        font-size: 1.3rem !important;
    }
}

/* Standard HD Monitor (1900px to 2499px) - Full HD display centered layout */
@media (min-width: 1900px) and (max-width: 2499px) {
    body {
        max-width: 1920px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 1700px !important;
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 1600px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 1650px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 1700px !important;
        margin: 0 auto !important;
    }
    
    .stats-header {
        font-size: 2.2rem;
    }
    
    .stat-card {
        min-height: 160px;
        max-width: 220px;
    }
    
    .stat-icon {
        font-size: 2.2rem !important;
    }
    
    .stat-number {
        font-size: 3rem !important;
    }
    
    .stat-label {
        font-size: 1.2rem !important;
    }
}

/* Retina MacBook & Mid-size Laptop (1440px to 1899px) - Laptop display centered layout */
@media (min-width: 1440px) and (max-width: 1899px) {
    body {
        max-width: 1440px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 1400px !important;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 1300px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 1350px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 1400px !important;
        margin: 0 auto !important;
    }
    
    .stats-header {
        font-size: 2rem;
    }
    
    .stat-card {
        min-height: 150px;
        max-width: 200px;
    }
    
    .stat-icon {
        font-size: 2rem !important;
    }
    
    .stat-number {
        font-size: 2.8rem !important;
    }
    
    .stat-label {
        font-size: 1.1rem !important;
    }
}

/* Large Desktop (1400px to 1439px) - Standard large desktop layout */
@media (min-width: 1400px) and (max-width: 1439px) {
    body {
        max-width: 1400px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 1320px !important;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 1300px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 1320px !important;
        margin: 0 auto !important;
    }
}

/* Older Laptops & Standard Desktop (1280px to 1399px) - Older laptop display layout */
@media (min-width: 1280px) and (max-width: 1399px) {
    body {
        max-width: 1366px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 1200px !important;
        padding-left: 1.75rem !important;
        padding-right: 1.75rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 1150px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 1180px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
}

/* Desktop (1200px to 1279px) - Standard desktop centered */
@media (min-width: 1200px) and (max-width: 1279px) {
    body {
        max-width: 1280px !important;
        margin: 0 auto !important;
    }
    
    .main-content .container-fluid {
        max-width: 1140px !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        margin: 0 auto !important;
    }
    
    .calculator-container {
        max-width: 1100px !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 1140px !important;
        margin: 0 auto !important;
    }
    
    .dashboard-container {
        max-width: 1140px !important;
        margin: 0 auto !important;
    }
}

/* Desktop (992px to 1199px) - Medium desktop centered */
@media (min-width: 992px) and (max-width: 1199px) {
    .main-content .container-fluid {
        max-width: 960px !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    
    .calculator-container {
        max-width: 920px !important;
    }
    
    .results-container {
        max-width: 960px !important;
    }
}

/* Tablet (768px to 991px) - Tablet centered */
@media (min-width: 768px) and (max-width: 991px) {
    .main-content .container-fluid {
        max-width: 720px !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .calculator-container {
        max-width: 700px !important;
    }
    
    .results-container {
        max-width: 720px !important;
    }
}

/* Mobile (576px to 767px) - Mobile centered */
@media (min-width: 576px) and (max-width: 767px) {
    .main-content .container-fluid {
        max-width: 540px !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .calculator-container {
        max-width: 520px !important;
    }
    
    .results-container {
        max-width: 540px !important;
    }
}

/* Small Mobile (480px to 575px) - Small mobile centered */
@media (min-width: 480px) and (max-width: 575px) {
    .main-content .container-fluid {
        max-width: 460px !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .calculator-container {
        max-width: 440px !important;
    }
    
    .results-container {
        max-width: 460px !important;
    }
}

/* Extra Small Mobile (320px to 479px) - Tiny mobile centered */
@media (max-width: 479px) {
    .main-content .container-fluid {
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .calculator-container {
        max-width: 100% !important;
        margin: 0 auto !important;
    }
    
    .results-container {
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

/* Center login and registration forms */
.auth-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    padding: 1rem !important;
}

.auth-card {
    margin: 0 auto !important;
    width: 100% !important;
}

/* Authentication form centering for large screens */
@media (min-width: 1900px) {
    .auth-card {
        max-width: 800px !important;
    }
}

@media (min-width: 1440px) and (max-width: 1899px) {
    .auth-card {
        max-width: 700px !important;
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    .auth-card {
        max-width: 600px !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .auth-card {
        max-width: 500px !important;
    }
}

@media (max-width: 767px) {
    .auth-card {
        max-width: 100% !important;
        margin: 0 0.5rem !important;
    }
}

/* Center admin and user management pages */
.admin-container {
    margin: 0 auto !important;
    max-width: 1400px !important;
}

/* Admin container responsive sizing */
@media (min-width: 2500px) {
    .admin-container {
        max-width: 2200px !important;
    }
}

@media (min-width: 1900px) and (max-width: 2499px) {
    .admin-container {
        max-width: 1700px !important;
    }
}

@media (min-width: 1440px) and (max-width: 1899px) {
    .admin-container {
        max-width: 1400px !important;
    }
}

/* Center table containers */
.table-responsive {
    margin: 0 auto !important;
}

/* Prevent horizontal scroll on all devices */
* {
    box-sizing: border-box;
}

body, html {
    overflow-x: hidden;
    width: 100%;
}