  /* -- Contracts page -- */
  .contracts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
  }

  /* Contract tabs */
  .contract-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #e3ecfa;
    padding-bottom: 0;
  }
  .contract-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
  }
  .contract-tab:hover { color: #1565c0; }
  .contract-tab.active {
    color: #1565c0;
    border-bottom-color: #1565c0;
  }

  /* Page-specific badges */
  .badge-gepland   { background: #fff8e1; color: #f57f17; }
  .badge-expiring  { background: #fff3e0; color: #e65100; }
  .badge-software      { background: #e3f2fd; color: #1565c0; }
  .badge-hosting       { background: #ede7f6; color: #5e35b1; }
  .badge-insurance     { background: #fce4ec; color: #c62828; }
  .badge-telecom       { background: #e0f7fa; color: #00838f; }
  .badge-rent          { background: #fff8e1; color: #f57f17; }
  .badge-subscriptions { background: #f3e5f5; color: #8e24aa; }
  .badge-other         { background: #eceff1; color: #546e6f; }

  /* Action buttons */
  .action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.15s;
    color: #555;
  }
  .action-btn:hover { background: #e3ecfa; color: #0d47a1; }
  .action-btn.delete:hover { background: #fdecea; color: #c62828; }
  .action-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

  .actions-cell { display: flex; gap: 0.25rem; }

  /* Sortable header */
  th.sortable {
    cursor: pointer;
    user-select: none;
  }
  th.sortable:hover { background: #e3ecfa; }
  th.sortable .sort-arrow { font-size: 0.7rem; margin-left: 0.3rem; opacity: 0.5; }
  th.sortable.asc .sort-arrow::after { content: " \25B2"; }
  th.sortable.desc .sort-arrow::after { content: " \25BC"; }

  /* Amount cell right-aligned */
  .text-right { text-align: right; }

  /* ---- Modal ---- */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 300;
    align-items: center;
    justify-content: center;
  }
  .modal-overlay.open { display: flex; }

  .modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #e3ecfa;
  }
  .modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d47a1;
    margin: 0;
    border: none;
    padding: 0;
  }
  .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
    padding: 0 0.25rem;
  }
  .modal-close:hover { color: #c62828; }

  .modal-body { padding: 1.5rem; }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .form-row.full { grid-template-columns: 1fr; }

  .form-group { display: flex; flex-direction: column; }
  .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.5rem 0.65rem;
    border: 1.5px solid #d0d7e2;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s;
    background: #fff;
  }
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21,101,192,0.12);
  }
  .form-group textarea { resize: vertical; min-height: 60px; }

  .checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #1565c0; }
  .checkbox-row label { font-size: 0.9rem; font-weight: 500; margin: 0; }

  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e8edf5;
  }
  .btn-cancel {
    padding: 0.55rem 1.25rem;
    background: #f0f2f5;
    color: #333;
    border: 1.5px solid #d0d7e2;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
  }
  .btn-cancel:hover { background: #e3ecfa; }
  .btn-save {
    padding: 0.55rem 1.5rem;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
  }
  .btn-save:hover { background: #0d47a1; }
  .btn-save:disabled { background: #90b4e8; cursor: not-allowed; }

  /* AI suggest button */
  .btn-ai-suggest {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid #d4b96a;
    border-radius: 6px;
    background: linear-gradient(135deg, #fdf6e3, #fff9ed);
    color: #8b6914;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
  }
  .btn-ai-suggest:hover { background: linear-gradient(135deg, #f9edc7, #fdf6e3); border-color: #b8933a; }
  .btn-ai-suggest:disabled { opacity: 0.5; cursor: wait; }

  @media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .contracts-toolbar { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  }
