/* Shared entry-screen contrast; printed documents use their own styles. */
@media screen {
  :root {
    --entry-border: #6b7c91;
    --entry-label: #243449;
    --entry-surface: #f0f3f7;
    --entry-heading: #dfe7f0;
    --entry-focus: #195b9b;
  }

  .panel, .auth-card, #documentForm, .editor-topline {
    border-color: #a1adbc;
  }
  .form-section, .auth-card, .email-content {
    background: var(--entry-surface);
  }
  .form-section {
    border-bottom-color: #a1adbc;
  }
  .form-section > .section-heading {
    padding: 12px 15px;
    background: var(--entry-heading);
    border: 1px solid #a1adbc;
    border-left: 4px solid #354c69;
    border-radius: 5px;
  }
  .section-heading h2, .field, .field > span,
  .line-table td[data-label]::before, .document-picker > span {
    color: var(--entry-label);
    font-weight: 600;
  }
  .section-heading h2 { font-size: 1.125rem; }
  .section-heading p, .help, .catalog-badge, .editor-caption {
    color: #4e5d70;
  }
  .step-number {
    background: #354c69;
    color: #fff;
    border-radius: 4px;
  }

  .field input, .field select, .field textarea,
  .search input, .filter select, .lines td input,
  .line-table .cell-input, .document-picker select {
    color: #182536;
    background: #fff;
    border: 1.5px solid var(--entry-border);
    border-radius: 5px;
    box-shadow: inset 0 1px 2px #1825360a;
  }
  .document-picker select { padding-left: 10px; }
  input::placeholder, textarea::placeholder {
    color: #58677a;
    opacity: 1;
  }
  .field input:hover, .field select:hover, .field textarea:hover,
  .search input:hover, .filter select:hover, .lines td input:hover,
  .line-table .cell-input:hover, .document-picker select:hover {
    border-color: #354c69;
  }
  .field input:focus, .field select:focus, .field textarea:focus,
  .search input:focus, .filter select:focus, .lines td input:focus,
  .line-table .cell-input:focus, .document-picker select:focus {
    border-color: var(--entry-focus);
    outline: 3px solid var(--entry-focus);
    outline-offset: 2px;
    background: #fff;
    box-shadow: none;
  }
  .field input[readonly], .field textarea[readonly],
  .field input:disabled, .field select:disabled, .field textarea:disabled,
  .lines td input:disabled, .line-table .cell-input:disabled {
    color: #4e5d70;
    background: #e1e6ed;
    border-color: #8996a7;
    border-style: dashed;
    box-shadow: none;
    cursor: default;
    opacity: 1;
  }
  .editor fieldset:disabled { opacity: 1; }
  input[type="checkbox"], input[type="radio"] { accent-color: #195b9b; }
  input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
    outline: 3px solid var(--entry-focus);
    outline-offset: 3px;
  }

  .lines th, .line-table thead th, .document-columns {
    background: var(--entry-heading);
    color: var(--entry-label);
    border-bottom: 1px solid #8798ad;
    font-weight: 600;
  }
  .lines tbody tr:nth-child(odd), .line-table tbody tr:nth-child(odd) {
    background: #fff;
  }
  .lines tbody tr:nth-child(even), .line-table tbody tr:nth-child(even) {
    background: #e4ebf3;
  }
  .lines td, .line-table tr { border-bottom-color: #a1adbc; }
  .line-amount, .line-table .amount-cell { color: #243449; font-weight: 600; }
  .totals, .editor-totals {
    margin-top: 16px;
    padding: 18px 20px;
    background: #dfe7f0;
    border: 1px solid #a1adbc;
    border-radius: 5px;
  }
  .totals span, .editor-totals span, .editor-totals small, #saveStatus, .save-state {
    color: #41536a;
  }
  .editor-footer, .form-actions, .list-toolbar, .editor-topline {
    background: #e8edf4;
  }
  .editor-footer button:not(.primary), .actions button:not(.primary),
  .section-heading button:not(.primary), .secondary-button {
    border-color: var(--entry-border);
  }
  .document-switcher { background: #dce4ee; }
  .document-switcher .switch-button.active {
    background: #243449;
    color: #fff;
  }
}
