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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    font-size: 12px;
    display: flex;
    flex-direction: column;
}

/* Main Navigation Bar */
.main-nav {
    background: #1a252f;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-title {
    color: #1abc9c;
    font-size: 1.2em;
    font-weight: bold;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user {
    color: #95a5a6;
    font-size: 0.9em;
}

.nav-link {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #1a5f5a;
    color: #fff;
}

.nav-logout {
    color: #e74c3c;
}

.nav-logout:hover {
    background: #e74c3c;
    color: #fff;
}

/* Editor Panel Styles - Always stacked, dynamic width */
.editor-panel {
    background: #2c3e50;
    color: white;
    padding: 15px;
    width: 100%;
    min-height: auto;
    overflow-y: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.editor-panel h2 {
    color: #1abc9c;
    margin-bottom: 12px;
    font-size: 1.3em;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 8px;
}

.editor-panel h3 {
    color: #ecf0f1;
    margin: 12px 0 6px;
    font-size: 0.9em;
}

/* Saved Quotes Section */
.saved-quotes-section {
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.saved-quotes-section select {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    background: #34495e;
    color: white;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Document Type + Rate Row */
.doc-rate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #34495e;
    transition: .4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #1abc9c;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-label {
    font-size: 0.9em;
}

/* Rate Panel (inline) */
.rate-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a5f5a;
    padding: 8px 12px;
    border-radius: 6px;
}

.rate-panel .currency {
    font-weight: bold;
    color: #1abc9c;
}

.rate-panel input {
    width: 70px;
    padding: 6px;
    border: none;
    border-radius: 4px;
    background: #2c3e50;
    color: #1abc9c;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
}

.rate-panel .per-hour {
    color: #bdc3c7;
    font-size: 0.9em;
}

.save-rate-btn {
    background: #2c3e50;
    color: #1abc9c;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.save-rate-btn:hover {
    background: #1abc9c;
    color: white;
}

/* Overtime Settings Row */
.overtime-settings-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #34495e;
    border-radius: 6px;
}

.overtime-settings-row .setting-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.overtime-settings-row .setting-group label {
    font-size: 0.85em;
    color: #bdc3c7;
    white-space: nowrap;
}

.overtime-settings-row .setting-group select {
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    background: #2c3e50;
    color: #1abc9c;
    font-size: 0.9em;
    cursor: pointer;
}

.overtime-settings-row .checkbox-group {
    margin-left: auto;
}

.overtime-settings-row .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.overtime-settings-row .checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1abc9c;
}

/* Two Column Layout */
.two-columns {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
}

.two-columns .column {
    flex: 1;
}

/* Form Styles */
.form-group {
    margin-bottom: 8px;
}

.form-group.full-width {
    margin-top: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.85em;
    color: #bdc3c7;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    background: #34495e;
    color: white;
    font-size: 1em;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #1abc9c;
}

/* Generate Days Button */
.generate-btn {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    font-weight: bold;
    font-size: 0.95em;
}

.generate-btn:hover {
    background: #16a085;
}

/* Line Items Section - Compact Grid Layout */
.line-items-section {
    background: #34495e;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.line-items-section .hint {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    font-size: 0.95em;
    grid-column: 1 / -1;
}

.day-item {
    background: #2c3e50;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-item .day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-item .day-date {
    color: #1abc9c;
    font-weight: 600;
    font-size: 0.85em;
}

.day-item .day-total {
    color: #1abc9c;
    font-weight: bold;
    font-size: 0.85em;
}

.day-item .time-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.day-item .time-inputs label {
    font-size: 0.75em;
    color: #95a5a6;
}

.day-item .time-inputs input[type="time"] {
    width: 70px;
    padding: 3px 4px;
    border: none;
    border-radius: 3px;
    background: #34495e;
    color: white;
    font-size: 0.8em;
}

.day-item .day-hours {
    color: #95a5a6;
    font-size: 0.75em;
    text-align: right;
}

/* Day Toggle (for holidays) */
.day-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.day-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1abc9c;
}

.day-item.day-disabled {
    opacity: 0.5;
    background: #3d566e;
}

.day-item.day-disabled .day-date {
    text-decoration: line-through;
    color: #95a5a6;
}

.day-item.day-disabled .day-total {
    color: #e74c3c;
    font-size: 0.75em;
}

.day-off-label {
    color: #95a5a6;
    font-size: 0.75em;
    font-style: italic;
    text-align: center;
    padding: 4px 0;
}

/* Day header right section (total + menu button) */
.day-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.day-menu-btn {
    background: transparent;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 1em;
    padding: 0 4px;
    line-height: 1;
}

.day-menu-btn:hover {
    color: #1abc9c;
}

/* Custom job description per day */
.day-custom-job {
    background: #1abc9c;
    color: #2c3e50;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 2px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #2c3e50;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #1abc9c;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.modal-content .modal-date {
    color: #95a5a6;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #34495e;
    color: white;
    font-size: 1em;
    margin-bottom: 20px;
}

.modal-content input[type="text"]:focus {
    outline: 2px solid #1abc9c;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
}

.modal-btn.cancel {
    background: #7f8c8d;
    color: white;
}

.modal-btn.cancel:hover {
    background: #95a5a6;
}

.modal-btn.save {
    background: #1abc9c;
    color: white;
}

.modal-btn.save:hover {
    background: #16a085;
}

/* Totals Editor */
.totals-editor {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.totals-editor .form-group {
    margin-bottom: 0;
    width: 120px;
}

.totals-display {
    margin-left: auto;
    text-align: right;
    color: #1abc9c;
    font-weight: bold;
}

.totals-display div {
    margin-bottom: 5px;
}

/* Collapsible Section */
.collapsible-section {
    margin-bottom: 12px;
}

.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #34495e;
    border-radius: 4px;
    margin: 0;
}

.collapsible-header:hover {
    background: #3d566e;
}

.collapsible-header span {
    font-size: 0.8em;
    color: #1abc9c;
}

/* Bank Details Editor */
.bank-details-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #34495e;
    padding: 10px;
    border-radius: 0 0 6px 6px;
    margin-top: -4px;
}

/* Palette Editor */
.palette-editor {
    background: #34495e;
    padding: 10px;
    border-radius: 0 0 6px 6px;
    margin-top: -4px;
}

.palette-presets {
    margin-bottom: 10px;
}

.palette-presets label {
    display: block;
    font-size: 0.85em;
    color: #bdc3c7;
    margin-bottom: 6px;
}

.preset-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.preset-btn {
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.preset-btn:hover {
    opacity: 0.8;
}

.palette-custom {
    display: flex;
    gap: 15px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-input label {
    font-size: 0.85em;
    color: #bdc3c7;
}

.color-input input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.save-btn {
    flex: 1;
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
}

.save-btn:hover {
    background: #219a52;
}

.print-btn {
    flex: 1;
    background: #3498db;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
}

.print-btn:hover {
    background: #2980b9;
}

/* Invoice Preview - Always below editor */
.invoice-container {
    margin-left: 0;
    padding: 20px;
    flex: 1;
    background: #e8e8e8;
}

.invoice {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Invoice Header */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-color, #1a5f5a);
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color, #1a5f5a);
}

.invoice-header h1 {
    font-size: 1.6em;
    color: var(--primary-color, #1a5f5a);
    font-weight: bold;
    letter-spacing: 1px;
}

.invoice-label {
    font-size: 1.8em;
    color: #1a5f5a;
    font-weight: bold;
}

/* Contact Bar */
.contact-bar {
    font-size: 0.75em;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-bar span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.contact-bar .icon {
    color: #1a5f5a;
}

/* Details Section */
.details-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.details-left {
    flex: 1;
}

.details-right {
    text-align: right;
    max-width: 250px;
}

.detail-row {
    margin-bottom: 8px;
}

.detail-label {
    font-weight: bold;
    color: #333;
    font-size: 0.85em;
}

.detail-value {
    color: #555;
    font-size: 0.85em;
}

/* POC Section */
.poc-section {
    display: flex;
    margin-bottom: 0;
}

.poc-section.values {
    margin-bottom: 15px;
}

.poc-item {
    flex: 1;
    text-align: center;
    padding: 8px;
}

.poc-item.header {
    background: #1a5f5a;
    color: white;
    font-weight: bold;
    font-size: 0.85em;
}

.poc-item.value {
    background: #e8f5f3;
    color: #1a5f5a;
    font-weight: 500;
    font-size: 0.85em;
    border: 1px solid #1a5f5a;
    border-top: none;
}

/* Job Description Display */
.job-description-display {
    background: #f5f5f5;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-left: 4px solid #1a5f5a;
    font-size: 0.9em;
}

/* Items Table */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.items-table th {
    background: #f5f5f5;
    border-bottom: 2px solid #1a5f5a;
    padding: 10px 8px;
    text-align: left;
    font-size: 0.8em;
    color: #333;
}

.items-table th:nth-child(n+4) {
    text-align: right;
}

.items-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.85em;
}

.items-table td:nth-child(n+4) {
    text-align: right;
}

/* Per Diem Row */
.per-diem-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 10px 8px;
    background: #f5f5f5;
    margin-bottom: 15px;
    border-radius: 4px;
}

.per-diem-label {
    font-size: 0.85em;
    color: #666;
}

.per-diem-value {
    font-weight: bold;
    color: #1a5f5a;
    font-size: 0.9em;
}

/* Totals Section */
.totals-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.totals-box {
    width: 250px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.total-row.final {
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 2px solid #1a5f5a;
    color: #1a5f5a;
}

.total-label {
    color: #666;
}

.total-value {
    color: #1a5f5a;
    font-weight: 600;
}

/* Footer */
.invoice-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.payable-note {
    color: #1a5f5a;
    font-size: 0.85em;
    margin-bottom: 15px;
}

.bank-details h4 {
    font-size: 0.85em;
    color: #333;
    margin-bottom: 8px;
}

.bank-details p {
    font-size: 0.8em;
    color: #555;
    margin-bottom: 3px;
}

/* Terms of Service Section */
.tos-section {
    margin-top: 25px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tos-section h4 {
    color: #1a5f5a;
    margin-bottom: 10px;
    font-size: 0.85em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

.tos-section ol {
    padding-left: 20px;
    margin: 0;
}

.tos-section li {
    font-size: 0.75em;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.4;
}

.tos-section li strong {
    color: #333;
}

.tos-section li span {
    color: #1a5f5a;
    font-weight: 600;
}

/* Print Styles */
@media print {
    .main-nav {
        display: none !important;
    }

    .editor-panel {
        display: none !important;
    }

    .invoice-container {
        margin-left: 0;
        padding: 0;
    }

    .invoice {
        box-shadow: none;
        padding: 20px;
        max-width: 100%;
    }

    body {
        background: white;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Force background colors to print */
    .poc-section {
        display: table !important;
        width: 100% !important;
        table-layout: fixed !important;
    }

    .poc-item {
        display: table-cell !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .poc-item.header {
        background: #1a5f5a !important;
        color: white !important;
    }

    .poc-item.value {
        background: #e8f5f3 !important;
        color: #1a5f5a !important;
        border: 1px solid #1a5f5a !important;
    }

    /* Ensure table headers print with backgrounds */
    .items-table th {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Job description bar */
    .job-description-display {
        background: #f5f5f5 !important;
        border-left: 4px solid #1a5f5a !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Per Diem Row print */
    .per-diem-row {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* TOS Section print */
    .tos-section {
        background: #f9f9f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-inside: avoid;
    }

    @page {
        margin: 0.5in;
    }
}

/* Scrollbar styling */
.editor-panel::-webkit-scrollbar,
.line-items-section::-webkit-scrollbar {
    width: 8px;
}

.editor-panel::-webkit-scrollbar-track,
.line-items-section::-webkit-scrollbar-track {
    background: #1a252f;
}

.editor-panel::-webkit-scrollbar-thumb,
.line-items-section::-webkit-scrollbar-thumb {
    background: #1abc9c;
    border-radius: 4px;
}

.editor-panel::-webkit-scrollbar-thumb:hover,
.line-items-section::-webkit-scrollbar-thumb:hover {
    background: #16a085;
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */

/* Medium screens - tablets and smaller desktops */
@media (max-width: 1200px) {
    .two-columns {
        flex-direction: column;
        gap: 10px;
    }

    .overtime-settings-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .overtime-settings-row .checkbox-group {
        margin-left: 0;
        width: 100%;
        margin-top: 5px;
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    body {
        font-size: 14px; /* Larger base font for readability */
    }

    .editor-panel {
        padding: 12px;
    }

    .editor-panel h2 {
        font-size: 1.2em;
        text-align: center;
    }

    /* Stack doc type and rate */
    .doc-rate-row {
        flex-direction: column;
        gap: 10px;
    }

    .toggle-container {
        justify-content: center;
    }

    .rate-panel {
        width: 100%;
        justify-content: center;
    }

    /* Overtime settings - vertical stack */
    .overtime-settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .overtime-settings-row .setting-group {
        justify-content: space-between;
    }

    .overtime-settings-row .setting-group select {
        flex: 1;
        max-width: 120px;
    }

    .overtime-settings-row .checkbox-group {
        margin-left: 0;
    }

    /* Form inputs - larger touch targets */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Day items - vertical layout */
    .day-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
    }

    .day-item .day-date {
        width: 100%;
        font-size: 1em;
    }

    .day-item .time-inputs {
        flex: 1;
    }

    .day-item .time-inputs input[type="time"] {
        width: 100px;
        padding: 8px;
        font-size: 16px;
    }

    .day-item .day-hours {
        min-width: auto;
    }

    .day-item .day-total {
        width: 100%;
        text-align: right;
        font-size: 1em;
    }

    /* Buttons - larger touch targets */
    .generate-btn,
    .save-btn,
    .print-btn,
    .delete-btn {
        padding: 12px 16px;
        font-size: 1em;
    }

    /* Totals editor */
    .totals-editor {
        flex-direction: column;
        gap: 12px;
    }

    .totals-editor .form-group {
        width: 100%;
    }

    .totals-display {
        margin-left: 0;
        text-align: center;
        display: flex;
        justify-content: space-around;
    }

    /* Invoice preview */
    .invoice-container {
        padding: 10px;
    }

    .invoice {
        padding: 15px;
    }

    .invoice-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .header-left {
        justify-content: center;
    }

    .invoice-header h1 {
        font-size: 1.2em;
    }

    .invoice-label {
        font-size: 1.4em;
    }

    .contact-bar {
        justify-content: center;
        text-align: center;
        font-size: 0.7em;
    }

    .details-section {
        flex-direction: column;
        gap: 15px;
    }

    .details-right {
        text-align: left;
        max-width: 100%;
    }

    /* POC section - stack on mobile */
    .poc-section {
        flex-direction: column;
    }

    .poc-section.values {
        flex-direction: column;
    }

    .poc-item {
        border: 1px solid #1a5f5a;
    }

    .poc-item.header {
        font-size: 0.8em;
    }

    /* Items table - horizontal scroll */
    .items-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .items-table th,
    .items-table td {
        white-space: nowrap;
        padding: 8px 6px;
        font-size: 0.75em;
    }

    /* TOS section */
    .tos-section {
        padding: 10px;
    }

    .tos-section li {
        font-size: 0.7em;
    }
}

/* Small phones */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .editor-panel {
        padding: 10px;
    }

    .rate-panel {
        flex-wrap: wrap;
        gap: 6px;
    }

    .rate-panel input {
        width: 60px;
    }

    /* Simplify day item for small screens */
    .day-item .time-inputs {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .day-item .time-inputs label {
        display: inline;
    }

    .line-items-section {
        max-height: 250px;
    }

    /* Action buttons - full width stacked */
    .action-buttons {
        flex-direction: column;
    }

    /* Saved quotes section */
    .saved-quotes-section {
        flex-direction: column;
    }

    .saved-quotes-section select {
        width: 100%;
    }

    .delete-btn {
        width: 100%;
    }

    /* Invoice adjustments */
    .invoice-header h1 {
        font-size: 1em;
    }

    .header-logo {
        width: 50px;
        height: 50px;
    }

    .contact-bar {
        flex-direction: column;
        gap: 5px;
    }

    .contact-bar span:contains("|") {
        display: none;
    }

    .totals-box {
        width: 100%;
    }
}
