body { font-family: Arial, sans-serif; margin: 40px; background: #f9f9f9; font-size: 18px; }
h2, h3, h4 { color: #333; }
table { background: #fff; border-collapse: collapse; margin-bottom: 20px; width: 100%; max-width: 100%; }
td, th { padding: 12px 14px; border: 1px solid #ccc; font-size: 1em; }
input, button, select { padding: 12px 10px; margin: 6px 0; font-size: 1.1em; border-radius: 6px; border: 1px solid #bbb; }
button { cursor: pointer; background: #1976d2; color: #fff; border: none; transition: background 0.2s; }
button:hover { background: #125ea2; }
form { max-width: 100%; }
iframe { width: 100%; max-width: 100%; min-width: 0; border-radius: 8px; border: 1px solid #ccc; }
label { display: block; margin-bottom: 8px; }
a { color: #1976d2; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Dashboard sections */
.dashboard-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1976d2;
    font-size: 1.4em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

/* Table container for horizontal scrolling */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.table-container table {
    min-width: 600px;
    margin-bottom: 0;
}

/* Delete button styling */
.delete-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.delete-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Saved PDFs section specific styling */
.saved-pdfs-section {
    margin-bottom: 30px;
}

.saved-pdfs-section h3 {
    margin-bottom: 16px;
    color: #1976d2;
    font-size: 1.4em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.dashboard-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-links a {
    background: #f5f5f5;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    font-weight: 500;
    text-align: center;
    display: block;
}

.dashboard-links a:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

.dashboard-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.dashboard-footer button {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.dashboard-footer button:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Responsive styles */
@media (max-width: 600px) {
  body { 
    margin: 16px; 
    font-size: 16px; 
    line-height: 1.5;
  }
  
  h2 { 
    font-size: 1.8em; 
    margin-bottom: 24px;
    text-align: center;
  }
  
  h3 {
    font-size: 1.4em;
    margin-bottom: 16px;
  }
  
  /* Mobile table improvements - horizontal scroll instead of stacking */
  .quotes-table-section,
  .clients-list-section,
  .mailing-history-section,
  .saved-pdfs-section,
  .payment-history,
  .wizard-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .quotes-table-section table,
  .clients-list-section table,
  .mailing-history-section table,
  .saved-pdfs-section table,
  .payment-history table,
  .wizard-table-container table {
    min-width: 600px; /* Ensure minimum width for readability */
    font-size: 0.9em;
  }
  
  .quotes-table-section th,
  .quotes-table-section td,
  .clients-list-section th,
  .clients-list-section td,
  .mailing-history-section th,
  .mailing-history-section td,
  .saved-pdfs-section th,
  .saved-pdfs-section td,
  .payment-history th,
  .payment-history td,
  .wizard-table-container th,
  .wizard-table-container td {
    padding: 10px 8px;
    white-space: nowrap;
    text-align: left;
  }
  
  /* Line items table - allow side by side on mobile */
  #items {
    min-width: auto !important;
    font-size: 1em;
  }
  
  #items th,
  #items td {
    padding: 8px 6px;
    white-space: normal;
    text-align: left;
  }
  
  #items input,
  #items select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  
  /* Keep other tables stacked for simpler data */
  table:not(.quotes-table-section table):not(.clients-list-section table):not(.mailing-history-section table):not(#items):not(.metrics-table-container table):not(.payment-history table):not(.wizard-table-container table),
  thead:not(.quotes-table-section thead):not(.clients-list-section thead):not(.mailing-history-section thead):not(#items thead):not(.metrics-table-container thead):not(.payment-history thead):not(.wizard-table-container thead),
  tbody:not(.quotes-table-section tbody):not(.clients-list-section tbody):not(.mailing-history-section tbody):not(#items tbody):not(.metrics-table-container tbody):not(.payment-history tbody):not(.wizard-table-container tbody),
  th:not(.quotes-table-section th):not(.clients-list-section th):not(.mailing-history-section th):not(#items th):not(.metrics-table-container th):not(.payment-history th):not(.wizard-table-container th),
  td:not(.quotes-table-section td):not(.clients-list-section td):not(.mailing-history-section td):not(#items td):not(.metrics-table-container td):not(.payment-history td):not(.wizard-table-container td),
  tr:not(.quotes-table-section tr):not(.clients-list-section tr):not(.mailing-history-section tr):not(#items tr):not(.metrics-table-container tr):not(.payment-history tr):not(.wizard-table-container tr) {
    display: block;
    width: 100%;
  }
  
  th:not(.quotes-table-section th):not(.clients-list-section th):not(.mailing-history-section th):not(#items th):not(.metrics-table-container th):not(.payment-history th):not(.wizard-table-container th),
  td:not(.quotes-table-section td):not(.clients-list-section td):not(.mailing-history-section td):not(#items td):not(.metrics-table-container td):not(.payment-history td):not(.wizard-table-container td) {
    box-sizing: border-box;
    width: 100%;
    display: block;
    text-align: left;
    font-size: 1em;
  }
  
  tr:not(.quotes-table-section tr):not(.clients-list-section tr):not(.mailing-history-section tr):not(#items tr):not(.metrics-table-container tr):not(.payment-history tr):not(.wizard-table-container tr) {
    margin-bottom: 1em;
  }
  
  input, button, select { width: 100%; box-sizing: border-box; font-size: 1.1em; }
  iframe { height: 60vw; min-height: 300px; }
  
  .dashboard-section {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 16px;
  }
  
  .dashboard-section h3 {
    font-size: 1.6em;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }
  
  .dashboard-links {
    gap: 16px;
  }
  
  .dashboard-links a {
    text-align: center;
    padding: 18px 20px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .dashboard-footer {
    margin-top: 40px;
    padding-top: 24px;
  }
  
  .dashboard-footer button {
    padding: 16px 32px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    min-height: 56px;
    min-width: 120px;
  }
  
  /* Form mobile styles */
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    font-size: 1.1em;
    margin-bottom: 10px;
  }
  
  .form-group select,
  .form-group input {
    padding: 16px 18px;
    font-size: 1.1em;
    border-radius: 12px;
    min-height: 56px;
  }
  
  .line-items-section {
    margin-bottom: 24px;
  }
  
  .line-items-section h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  
  .add-item-btn {
    padding: 16px 24px;
    font-size: 1.1em;
    border-radius: 12px;
    min-height: 56px;
    width: 100%;
    margin-top: 20px;
  }
  
  .form-actions {
    margin-top: 40px;
  }
  
  .save-btn {
    padding: 18px 32px;
    font-size: 1.2em;
    border-radius: 12px;
    min-height: 60px;
    width: 100%;
    max-width: 300px;
  }
  
  .back-link {
    margin-top: 40px;
  }
  
  .back-link a {
    padding: 16px 24px;
    font-size: 1.1em;
    border-radius: 12px;
    min-height: 56px;
    display: inline-block;
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

/* App-like subtle color */
body { background: linear-gradient(135deg, #f9f9f9 0%, #e3e9f6 100%); }
table { box-shadow: 0 2px 8px rgba(0,0,0,0.04); border-radius: 8px; overflow: hidden; }

/* Form styling */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.add-client-link {
    display: inline-block;
    margin-top: 8px;
    color: #1976d2;
    font-size: 0.9em;
    text-decoration: underline;
}

.line-items-section {
    margin-bottom: 32px;
}

.line-items-section h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.3em;
}

.add-item-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s;
}

.add-item-btn:hover {
    background: #218838;
}

.form-actions {
    margin-top: 32px;
    text-align: center;
}

.save-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.save-btn:hover {
    background: #125ea2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

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

.back-link a {
    color: #666;
    text-decoration: none;
    font-size: 1em;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.back-link a:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.quote-info {
    background: #e3f2fd;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid #1976d2;
    font-size: 1.1em;
}

.quote-info strong {
    color: #1976d2;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid #28a745;
    font-weight: 600;
}

.add-client-section,
.clients-list-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    position: relative;
}

.add-client-section h3,
.clients-list-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1976d2;
    font-size: 1.3em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid #dc3545;
    font-weight: 600;
}

.quotes-table-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    overflow-x: auto;
    position: relative;
}

.quotes-table-section::after {
    content: "← Scroll →";
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 0.8em;
    color: #666;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.7;
}

@media (min-width: 601px) {
    .quotes-table-section::after {
        display: none;
    }
}

.signed-yes {
    color: #28a745;
    font-weight: 600;
}

.signed-no {
    color: #dc3545;
    font-weight: 600;
}

.delete-link {
    color: #dc3545 !important;
    font-weight: 600;
}

.delete-link:hover {
    color: #c82333 !important;
}

.quote-select-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.mailing-form-section,
.mailing-history-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    position: relative;
}

.mailing-form-section h3,
.mailing-history-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1976d2;
    font-size: 1.3em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    font-weight: normal !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    transform: scale(1.2);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    font-weight: normal !important;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.radio-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.radio-label input[type="radio"] {
    width: auto !important;
    margin: 0;
    transform: scale(1.2);
}

.pdf-section {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
}

.pdf-upload-section,
.saved-pdfs-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.pdf-upload-section h3,
.saved-pdfs-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1976d2;
    font-size: 1.3em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.cost-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.cost-calculation h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #495057;
    font-size: 1.1em;
}

.cost-calculation div {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.cost-calculation strong {
    color: #495057;
}

.optional {
    color: #666;
    font-size: 0.85em;
    font-weight: normal;
    font-style: italic;
}

/* Signature page styling */
.fb-warning {
    display: none;
    color: #ff8c00;
    font-weight: bold;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.pdf-mobile-section {
    display: none;
    margin-bottom: 20px;
}

.view-pdf-btn {
    width: 100%;
    font-size: 1.2em;
    padding: 16px 24px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 56px;
}

.view-pdf-btn:hover {
    background: #125ea2;
}

.pdf-mobile-note {
    color: #666;
    font-size: 0.95em;
    margin-top: 12px;
    text-align: center;
}

.iframe-container {
    margin-bottom: 24px;
}

.signature-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.existing-signature {
    margin-bottom: 24px;
}

.warning-text {
    color: #ff8c00;
    font-weight: 600;
    margin-bottom: 16px;
}

.current-signature {
    margin-bottom: 16px;
}

.current-signature img {
    width: 300px;
    max-width: 100%;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
    margin: 8px 0;
}

.signature-date {
    font-size: 0.9em;
    color: #666;
}

.signature-pad-container {
    margin-bottom: 20px;
    text-align: center;
}

#signature-pad {
    border: 2px solid #ccc;
    border-radius: 8px;
    background: #fff;
    max-width: 100%;
    height: auto;
}

.signature-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.clear-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1em;
}

.clear-btn:hover {
    background: #5a6268;
}

.save-signature-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1em;
}

.save-signature-btn:hover {
    background: #218838;
}

.signature-message {
    text-align: center;
    font-weight: 600;
    margin-top: 16px;
}

.clients-list-section::after {
    content: "← Scroll →";
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 0.8em;
    color: #666;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.7;
}

.mailing-history-section::after {
    content: "← Scroll →";
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 0.8em;
    color: #666;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.7;
}

@media (min-width: 601px) {
    .clients-list-section::after,
    .mailing-history-section::after {
        display: none;
    }
}

/* Travel section styling */
.travel-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.travel-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1976d2;
    font-size: 1.3em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.travel-calculation {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.travel-calculation p {
    margin: 8px 0;
}

.calculation-breakdown {
    color: #6c757d;
    font-style: italic;
}

.settings-note {
    color: #495057;
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
    margin-top: 12px;
}

.settings-note a {
    color: #1976d2;
    text-decoration: none;
}

.settings-note a:hover {
    text-decoration: underline;
}

/* Settings page styling */
.settings-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1976d2;
    font-size: 1.4em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.calculation-example {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.calculation-example h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1976d2;
    font-size: 1.3em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.calculation-example ul {
    margin: 16px 0;
    padding-left: 20px;
}

.calculation-example li {
    margin-bottom: 8px;
}

.calculation-example strong {
    color: #1976d2;
}

/* Line items table styling */
#items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#items th,
#items td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

#items th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#items th[colspan="6"] {
    text-align: center;
    background-color: #e9ecef;
    font-weight: bold;
}

#items input,
#items select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#items select {
    background-color: white;
    cursor: pointer;
}

.line-total {
    font-weight: 600;
    color: #333;
}

/* Description row styling */
#items tr:nth-child(3n+2) td {
    background-color: #f8f9fa;
    padding: 8px 12px;
}

#items tr:nth-child(3n+2) input {
    border: none;
    background-color: transparent;
    font-weight: 500;
}

.tax-note {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #856404;
    font-size: 0.9em;
}

.quote-total-section {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
    text-align: center;
}

.quote-total-section h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.2em;
}

.quote-total-section p {
    margin: 0;
    font-size: 1.1em;
}

#quote-total {
    color: #28a745;
    font-size: 1.3em;
    font-weight: bold;
}

/* Filter section styling */
.filter-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1em;
    background-color: white;
}

.filter-group select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-btn {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-btn:hover {
    background-color: #1565c0;
}

.clear-filters-btn {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1em;
    transition: background-color 0.2s;
}

.clear-filters-btn:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}

/* Mobile responsive for filters */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        gap: 16px;
    }
    
    .filter-group {
        min-width: auto;
        width: 100%;
    }
    
    .filter-actions {
        justify-content: center;
    }
}

/* Status badges styling */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-in-progress {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

/* Payment status styling */
.payment-link {
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.payment-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.payment-unpaid {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.payment-unpaid:hover {
    background-color: #f1b0b7;
    color: #721c24;
}

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

.payment-paid:hover {
    background-color: #c3e6cb;
    color: #0f5132;
}

.payment-na {
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Stripe balance page styling */
.quote-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.quote-summary h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.summary-item {
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.summary-item.balance-owed {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    font-weight: bold;
}

.payment-actions {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.payment-actions h3 {
    margin: 0 0 16px 0;
    color: #1976d2;
}

.payment-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.payment-history {
    margin-bottom: 24px;
}

.payment-history h3 {
    margin-bottom: 16px;
    color: #333;
}

.no-payments {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.payment-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.payment-status.pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.payment-status.completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mark-paid-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mark-paid-btn:hover {
    background-color: #218838;
}

.back-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.back-links a {
    padding: 12px 20px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.back-links a:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}

.back-links a:last-child {
    background-color: #17a2b8;
}

.back-links a:last-child:hover {
    background-color: #138496;
}

/* Metrics page styles */
.metrics-header {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.summary-card h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .amount {
    font-size: 1.8em;
    font-weight: bold;
    color: #1976d2;
}

.metrics-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    position: relative;
    background: #fff;
}

.metrics-table-container::after {
    content: "← Scroll →";
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 0.8em;
    color: #666;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.7;
    z-index: 10;
}

.metrics-table-container table {
    min-width: 800px;
    font-size: 0.9em;
    display: table !important;
    table-layout: auto !important;
}

.metrics-table-container th,
.metrics-table-container td {
    padding: 12px 14px;
    border: 1px solid #ccc;
    font-size: 1em;
    white-space: nowrap;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove the fixed column widths and let content determine sizing */
.metrics-table-container th:nth-child(1),
.metrics-table-container td:nth-child(1) {
    min-width: 80px; /* Quote # */
}

.metrics-table-container th:nth-child(2),
.metrics-table-container td:nth-child(2) {
    min-width: 120px; /* Client */
}

.metrics-table-container th:nth-child(3),
.metrics-table-container td:nth-child(3) {
    min-width: 90px; /* Date */
}

.metrics-table-container th:nth-child(4),
.metrics-table-container td:nth-child(4) {
    min-width: 100px; /* Status */
}

.metrics-table-container th:nth-child(5),
.metrics-table-container td:nth-child(5) {
    min-width: 70px; /* Mileage */
}

.metrics-table-container th:nth-child(6),
.metrics-table-container td:nth-child(6) {
    min-width: 80px; /* Labor */
}

.metrics-table-container th:nth-child(7),
.metrics-table-container td:nth-child(7) {
    min-width: 80px; /* Materials */
}

.metrics-table-container th:nth-child(8),
.metrics-table-container td:nth-child(8) {
    min-width: 70px; /* Travel */
}

.metrics-table-container th:nth-child(9),
.metrics-table-container td:nth-child(9) {
    min-width: 80px; /* Total */
}

.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-completed {
    color: #007bff;
    font-weight: 600;
}

.status-no-interest {
    color: #dc3545;
    font-weight: 600;
}

@media (max-width: 600px) {
    .metrics-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px 20px -16px;
        border-radius: 0;
        position: relative;
    }
    
    .metrics-table-container::after {
        display: block;
    }
    
    .metrics-table-container table {
        min-width: 800px;
        font-size: 0.9em;
        display: table !important;
        table-layout: auto !important;
    }
    
    .metrics-table-container thead,
    .metrics-table-container tbody,
    .metrics-table-container tr {
        display: table-row-group !important;
        display: table-row !important;
    }
    
    .metrics-table-container th,
    .metrics-table-container td {
        display: table-cell !important;
        padding: 8px 6px;
        white-space: nowrap;
        min-width: auto;
        width: auto;
    }
    
    .summary-card {
        padding: 12px;
    }
    
    .summary-card .amount {
        font-size: 1.5em;
    }
    
    .metrics-summary {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
}

@media (min-width: 601px) {
    .metrics-table-container::after {
        display: none;
    }
}

/* Client management styles */
.edit-btn {
    background: #17a2b8;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
    margin-right: 8px;
}

.edit-btn:hover {
    background: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.edit-client-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.edit-client-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #17a2b8;
    font-size: 1.4em;
    border-bottom: 2px solid #b3e5fc;
    padding-bottom: 8px;
}

.cancel-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-left: 12px;
}

.cancel-btn:hover {
    background: #5a6268;
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

@media (max-width: 600px) {
    .edit-btn,
    .delete-btn {
        padding: 8px 12px;
        font-size: 0.85em;
        margin-bottom: 4px;
        width: 100%;
        margin-right: 0;
    }
    
    .edit-client-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .edit-client-section h3 {
        font-size: 1.3em;
        margin-bottom: 16px;
    }
    
    .cancel-btn {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
        text-align: center;
    }
}

/* Set specific column widths for consistent alignment */
.metrics-table-container th:nth-child(1),
.metrics-table-container td:nth-child(1) {
    width: 12%; /* Quote # */
}

.metrics-table-container th:nth-child(2),
.metrics-table-container td:nth-child(2) {
    width: 20%; /* Client */
}

.metrics-table-container th:nth-child(3),
.metrics-table-container td:nth-child(3) {
    width: 12%; /* Date */
}

.metrics-table-container th:nth-child(4),
.metrics-table-container td:nth-child(4) {
    width: 12%; /* Status */
}

.metrics-table-container th:nth-child(5),
.metrics-table-container td:nth-child(5) {
    width: 10%; /* Mileage */
}

.metrics-table-container th:nth-child(6),
.metrics-table-container td:nth-child(6) {
    width: 11%; /* Labor */
}

.metrics-table-container th:nth-child(7),
.metrics-table-container td:nth-child(7) {
    width: 11%; /* Materials */
}

.metrics-table-container th:nth-child(8),
.metrics-table-container td:nth-child(8) {
    width: 10%; /* Travel */
}

.metrics-table-container th:nth-child(9),
.metrics-table-container td:nth-child(9) {
    width: 12%; /* Total */
}

.metrics-table-container th {
    background: #f5f5f5;
    font-weight: bold;
    text-align: center;
    color: #333;
}

.metrics-table-container td {
    text-align: right;
    background: #fff;
}

.metrics-table-container td:first-child,
.metrics-table-container td:nth-child(2),
.metrics-table-container td:nth-child(3) {
    text-align: left;
}

.metrics-table-container .totals-row {
    background: #e3f2fd !important;
    font-weight: bold;
}

.metrics-table-container .totals-row td {
    background: #e3f2fd !important;
} 