* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize for touch devices */
* {
    -webkit-tap-highlight-color: transparent;
}

.navbar {
    background-color: #8b0000;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.container {
    max-width: 100%;
    margin: 0.75rem auto;
    padding: 0 1rem;
}

/* Dashboard optimizations for larger screens */
.dashboard {
    max-width: 100%;
    margin: 0;
    width: 100%;
    padding: 0 1rem;
}

.flash-messages {
    margin-bottom: 1rem;
}

.alert {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login Page */
.login-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* Gate Page Styles */
.gate-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.gate-box {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 450px;
    max-width: 100%;
    border-top: 4px solid #8b0000;
    margin: 0 auto;
}

.gate-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gate-logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.gate-header h1 {
    font-size: 2.5rem;
    color: #8b0000;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.gate-header p {
    font-size: 1.2rem;
    color: #808080;
    font-weight: 300;
}

.gate-form {
    width: 100%;
}

.gate-form .form-group {
    margin-bottom: 1.5rem;
}

.gate-form .form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #696969;
    font-size: 1.1rem;
    white-space: nowrap;
}

.gate-form .form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    min-height: 48px;
    box-sizing: border-box;
}

.gate-form .form-group input:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.gate-form .alert {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.gate-form .alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.gate-form .alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.login-header h1 {
    font-size: 2rem;
    color: #8b0000;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-header p {
    font-size: 1rem;
    color: #808080;
    font-weight: 300;
}

.login-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 1000px;
}

.login-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.login-box:hover {
    box-shadow: 0 6px 30px rgba(0,0,0,0.15);
}

.mechanic-box {
    border-top: 4px solid #8b0000;
}

.admin-box {
    border-top: 4px solid #808080;
}

.login-box-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.75rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box h2 {
    text-align: center;
    color: #8b0000;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    min-height: auto;
}

.login-form {
    width: 100%;
}

.login-form .form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #696969;
    font-size: 0.9rem;
    min-height: auto;
}

.login-form .form-group input,
.login-form .form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    min-height: 38px;
    box-sizing: border-box;
}

.login-form .form-group input:focus,
.login-form .form-group select:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 48px;
    border-radius: 6px;
}

.login-info {
    margin-top: 1rem;
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #666;
}

.login-info code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #495057;
}

.login-links {
    margin-top: 0.75rem;
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
}

.login-links a {
    color: #8b0000;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-links a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

/* Time Grid */
.time-grid-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.time-grid-header .form-group {
    max-width: 300px;
}

/* Excel-style Table */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.excel-table thead {
    background: #8b0000;
    color: white;
}

.excel-table thead th {
    padding: 0.25rem 0.4rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.excel-table thead th:last-child {
    border-right: none;
}

.excel-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.excel-table tbody tr:hover {
    background-color: #f8f9fa;
}

.excel-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.excel-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

.excel-table tbody tr.has-entry {
    background-color: #f9f9f9;
}

.excel-table tbody tr.has-entry:nth-child(even) {
    background-color: #f9f9f9;
}

.excel-table tbody tr.saved {
    background-color: #f0f0f0 !important;
    animation: savedRowPulse 0.3s;
}

@keyframes savedRowPulse {
    0%, 100% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
}

.excel-table tbody td {
    padding: 0.25rem 0.5rem;
    border-right: 1px solid #e8e8e8;
    vertical-align: middle;
    border-bottom: 1px solid #e8e8e8;
}

.excel-table tbody td:last-child {
    border-right: none;
}

.excel-table .hour-cell {
    font-weight: 600;
    color: #8b0000;
    text-align: center;
    font-size: 0.8rem;
}

.excel-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.excel-vin-input,
.excel-project-input {
    width: 100%;
    padding: 0.3rem 0.4rem;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 0.8rem;
    background: white;
    transition: border-color 0.2s;
    min-height: 28px;
    box-sizing: border-box;
}

.excel-vin-input:focus,
.excel-project-input:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.excel-vin-input {
    max-width: 150px;
    text-align: center;
}

.excel-project-input {
    min-width: 250px;
}

.status-cell {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 3px;
    font-weight: 500;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
}

.status-badge.saved-badge {
    border-color: #4caf50;
    color: #2e7d32;
}

.status-badge.vacation-badge {
    border-color: #ffc107;
    color: #856404;
}

.status-badge.off-badge {
    border-color: #9e9e9e;
    color: #616161;
}

.status-badge.downtime-badge {
    border-color: #ff9800;
    color: #e65100;
}

.status-badge.lunch-badge {
    border-color: #2196f3;
    color: #1565c0;
}

.status-badge.empty-badge {
    color: #ccc;
    border-color: transparent;
}

.after-hours-row {
    background-color: #f5f5f5 !important;
    border-top: 2px solid #ddd;
}

.after-hours-row:hover {
    background-color: #eeeeee !important;
}

.after-hours-row.has-entry {
    background-color: #fff3e0 !important;
}

.quick-actions-cell {
    padding: 0.15rem 0.3rem !important;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
}

.quick-actions-cell > div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
}

.quick-action-btn {
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: auto;
    min-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.quick-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.quick-action-btn:active {
    transform: translateY(0);
}

.quick-action-btn.lunch-btn {
    background-color: #64b5f6;
    color: white;
}

.quick-action-btn.lunch-btn:hover {
    background-color: #42a5f5;
}

.quick-action-btn.downtime-btn {
    background-color: #ffb74d;
    color: white;
}

.quick-action-btn.downtime-btn:hover {
    background-color: #ffa726;
}

.quick-action-btn.off-btn {
    background-color: #bdbdbd;
    color: white;
}

.quick-action-btn.off-btn:hover {
    background-color: #9e9e9e;
}

.quick-action-btn.mount-dismount-btn {
    background-color: #ba68c8;
    color: white;
}

.quick-action-btn.mount-dismount-btn:hover {
    background-color: #ab47bc;
}

.fill-down-btn {
    background: #4caf50 !important;
    color: white !important;
    border: none !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 3px !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    min-width: 50px !important;
    transition: all 0.2s !important;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
}

.fill-down-btn:hover {
    background: #43a047 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(76, 175, 80, 0.4) !important;
}

.fill-down-btn:active {
    transform: translateY(0) !important;
}

.quick-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.time-grid-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.time-grid-item:hover {
    border-color: #8b0000;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.1);
}

.time-grid-item.saved {
    border-color: #8b0000;
    background: #ffe0e0;
    animation: savedPulse 0.5s;
}

@keyframes savedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.time-grid-hour {
    font-size: 1.1rem;
    color: #8b0000;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8b0000;
    text-align: center;
}

.time-grid-hour-checkbox {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.time-grid-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.time-grid-inputs .form-group {
    margin-bottom: 0;
}

.time-grid-inputs .form-group:last-child {
    margin-bottom: 0;
}

.time-grid-inputs label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.35rem;
    display: block;
}

.time-grid-inputs input,
.time-grid-inputs select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    min-height: 38px;
}

.time-grid-inputs input:focus,
.time-grid-inputs select:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.project-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    min-height: 44px;
}

.time-grid-truck-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.truck-display {
    font-size: 0.9rem;
    color: #495057;
}

.truck-display strong {
    color: #8b0000;
    display: block;
    margin-bottom: 0.25rem;
}

.truck-display small {
    display: block;
    color: #6c757d;
    font-style: italic;
}

.vacation-display {
    background-color: #fff3cd;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.date-selector-form {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 0;
}

.date-selector-form .form-group {
    margin-bottom: 0;
}

.date-info {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    font-size: 1rem;
}

.past-date-badge {
    display: inline-block;
    background-color: #808080;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.today-badge {
    display: inline-block;
    background-color: #8b0000;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.optional-label {
    color: #808080;
    font-weight: normal;
    font-size: 0.85rem;
}

.work-history {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ddd;
}

.work-history h5 {
    color: #8b0000;
    margin-bottom: 1rem;
}

.total-row {
    background-color: #f8f9fa;
    font-weight: 600;
}

.total-row td {
    border-top: 2px solid #8b0000;
}

.no-work {
    color: #808080;
    font-style: italic;
    margin-top: 1rem;
}

.week-range {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 1.1rem;
}

.print-section {
    page-break-inside: avoid;
}

.print-card {
    page-break-inside: avoid;
    margin-bottom: 2rem;
}

.daily-entry {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.daily-entry h5 {
    color: #8b0000;
    margin-bottom: 0.75rem;
}

.daily-total {
    background-color: #f8f9fa;
    font-weight: 600;
}

.daily-total td {
    border-top: 2px solid #ddd;
}

.week-total {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #ffe0e0;
    border-left: 4px solid #8b0000;
    font-size: 1.1rem;
}

.report-period {
    font-size: 1.1rem;
    color: #808080;
    margin-bottom: 1.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 36px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #8b0000;
}

/* Hide print-only sections on screen */
.print-only {
    display: none !important;
}

@media print {
    .navbar, .btn, .form-inline, .date-selector-form, .rate-update-form, .no-print, .quick-fill-section, .time-grid, .time-grid-actions, .quick-action-buttons {
        display: none !important;
    }
    
    /* Show print-only sections when printing */
    .print-only {
        display: block !important;
    }
    
    .print-timesheet {
        display: block !important;
    }
    
    .print-section {
        page-break-after: always;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .print-card {
        page-break-inside: avoid;
        margin-bottom: 0.75rem !important;
        padding: 0.5rem !important;
    }
    
    body {
        background: white;
        color: black;
        font-size: 10pt !important;
    }
    
    .dashboard h2 {
        page-break-after: avoid;
        color: black;
        font-size: 14pt !important;
        margin-bottom: 0.5rem !important;
    }
    
    h3 {
        font-size: 12pt !important;
        margin-bottom: 0.5rem !important;
        page-break-after: avoid;
        color: black;
    }
    
    h4 {
        font-size: 11pt !important;
        margin-bottom: 0.35rem !important;
        margin-top: 0.5rem !important;
        page-break-after: avoid;
        color: black;
    }
    
    h5 {
        font-size: 10pt !important;
        margin-bottom: 0.25rem !important;
        margin-top: 0.35rem !important;
        page-break-after: avoid;
        color: black;
    }
    
    p {
        margin-bottom: 0.25rem !important;
        font-size: 9pt !important;
    }
    
    table {
        page-break-inside: avoid;
        font-size: 8pt !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.25rem 0.5rem !important;
        font-size: 8pt !important;
    }
    
    .data-table th {
        font-size: 9pt !important;
        font-weight: 600;
    }
    
    .report-card h4 {
        color: black;
        font-size: 10pt !important;
        margin-bottom: 0.35rem !important;
    }
    
    .report-card p {
        font-size: 8pt !important;
        margin-bottom: 0.25rem !important;
    }
    
    .daily-entry {
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .daily-entry h5 {
        color: black;
        font-size: 9pt !important;
        margin-bottom: 0.25rem !important;
    }
    
    .week-total {
        background-color: #f0f0f0 !important;
        border-left: 4px solid black !important;
        padding: 0.5rem !important;
        margin-top: 0.5rem !important;
        font-size: 9pt !important;
    }
    
    .week-total p {
        margin: 0 !important;
        font-size: 9pt !important;
    }
    
    .report-period {
        font-size: 9pt !important;
        margin-bottom: 0.5rem !important;
    }
    
    .print-timesheet {
        page-break-inside: avoid;
    }
    
.weekly-report {
    display: none !important; /* Hide on screen, show only when printing */
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media print {
    .weekly-report {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
        left: auto !important;
        width: auto !important;
        margin-top: 0.5rem !important;
    }
    
    #mechanics-timesheet {
        display: block !important;
    }
    
    #mechanics-timesheet table {
        page-break-inside: avoid;
    }
    
    #mechanics-timesheet tfoot {
        page-break-inside: avoid;
    }
}
    
    /* Compact clock times section */
    .card h4 {
        font-size: 10pt !important;
        margin-bottom: 0.35rem !important;
    }
    
    .card > div {
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

.time-grid-actions {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px solid #eee;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1.1rem;
    min-height: 44px;
}

.form-control:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

/* Dashboard */
.dashboard h2 {
    color: #8b0000;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 0.75rem;
}

.card h3 {
    color: #8b0000;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.1rem;
    font-family: inherit;
    min-height: 44px; /* Touch-friendly for iPad */
    touch-action: manipulation;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-inline {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.form-inline .form-group {
    margin-bottom: 0;
}

/* Buttons - Standardized sizing */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    min-height: 44px; /* Touch-friendly minimum size */
    touch-action: manipulation; /* Prevents double-tap zoom on iOS */
    box-sizing: border-box;
    text-align: center;
    vertical-align: middle;
    line-height: 1.4;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #8b0000;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #a00000;
}

.btn-secondary {
    background-color: #808080;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #696969;
}

.btn-success {
    background-color: #8b0000;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #a00000;
}

.btn-warning {
    background-color: #808080;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: #696969;
}

.btn-danger {
    background-color: #8b0000;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #a00000;
}

.btn-block {
    width: 100%;
}

/* Standardize buttons in common locations */
.form-actions .btn,
.ticket-actions .btn,

/* Buttons in admin dashboard action grid */
.dashboard-actions .btn {
    flex: 1;
    min-width: 180px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-height: 44px;
}

/* Search Box */
.search-box {
    margin-bottom: 2rem;
}

/* Results */
.results-container {
    margin-top: 1.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.truck-list {
    display: grid;
    gap: 1rem;
}

.truck-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #8b0000;
}

.truck-card h4 {
    color: #8b0000;
    margin-bottom: 0.75rem;
}

.truck-details p {
    margin-bottom: 0.5rem;
}

/* Clock Controls */
.clock-controls {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.clock-controls .btn {
    flex: 1;
    min-width: 150px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    min-height: 48px;
}

.clock-status {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.clock-status p {
    margin-bottom: 0.5rem;
}

/* Time Entry Form */
.time-entry-form {
    margin-top: 1rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 1.05rem;
    table-layout: auto;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Ensure tables use full width */
.card .data-table {
    width: 100%;
    display: table;
}

/* Make sure columns distribute evenly */
.data-table th:first-child,
.data-table td:first-child {
    width: auto;
    min-width: 150px;
}

.data-table th:not(:first-child):not(:last-child),
.data-table td:not(:first-child):not(:last-child) {
    width: auto;
}

.data-table th:last-child,
.data-table td:last-child {
    width: auto;
    min-width: 200px;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 1.1rem;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* Report Cards */
.trucks-report {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.report-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #8b0000;
}

.report-card h4 {
    color: #8b0000;
    margin-bottom: 1rem;
}

.report-details p {
    margin-bottom: 0.5rem;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Responsive - Optimized for iPad and Desktop */
@media (max-width: 1024px) {
    .login-boxes {
        gap: 2rem;
        max-width: 900px;
    }
    
    .login-box {
        padding: 2.5rem;
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-brand-container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-logo {
        height: 40px;
    }
    
    .login-logo {
        max-width: 250px;
        width: 100%;
    }
    
    .login-main {
        padding: 2rem 1rem;
    }
    
    .login-boxes {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 500px;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    
    .login-header {
        margin-bottom: 2.5rem;
    }
    
    .login-header h1 {
        font-size: 2.5rem;
    }
    
    .login-header p {
        font-size: 1.2rem;
    }
    
    .login-box-icon {
        font-size: 3rem;
    }
    
    .login-box h2 {
        font-size: 1.75rem;
    }
    
    .gate-container {
        padding: 1.5rem;
    }
    
    .gate-box {
        padding: 2rem 1.5rem;
    }
    
    .gate-logo {
        max-width: 200px;
        margin-bottom: 1rem;
    }
    
    .gate-header h1 {
        font-size: 2rem;
    }
    
    .gate-header p {
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clock-controls {
        flex-direction: column;
    }
    
    .clock-controls .btn {
        width: 100%;
    }
}

