.tkp-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
}
.tkp-app * { box-sizing: border-box; }
.tkp-msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; font-size: 0.92rem; }
.tkp-msg-success { background: #e7f7ec; border: 1px solid #b6e6c4; color: #1f7a3d; }
.tkp-msg-error { background: #f4e6e6; border: 1px solid #e0b3b3; color: #a3272c; }

.tkp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .tkp-grid { grid-template-columns: 1fr; } }

.tkp-card { background: #fff; border: 1px solid #e2e6eb; border-radius: 8px; padding: 20px 22px; }
.tkp-card h2 { margin-top: 0; font-size: 1.05rem; }
.tkp-card label { display: block; font-size: 0.82rem; font-weight: 600; margin: 10px 0 4px; }
.tkp-card input[type="text"], .tkp-card input[type="email"], .tkp-card input[type="password"] {
  width: 100%; padding: 9px 11px; border: 1px solid #d8d2c2; border-radius: 6px; font-size: 0.92rem;
}
.tkp-btn {
  margin-top: 14px; background: #0f6e5e; color: #fff; border: none; border-radius: 6px;
  padding: 10px 18px; font-size: 0.9rem; cursor: pointer;
}
.tkp-hint { font-size: 0.82rem; color: #5b6156; margin-top: 12px; }

table.tkp-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.9rem; }
table.tkp-table th, table.tkp-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #e2e6eb; }
.tkp-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.tkp-badge-paid { background: #e7f7ec; color: #1f7a3d; }
.tkp-badge-open { background: #fff4e0; color: #a3691f; }
.tkp-badge-overdue { background: #f4e6e6; color: #a3272c; }
.tkp-badge-partial { background: #e6eef7; color: #234a8a; }
.tkp-badge-other { background: #eee; color: #666; }
.tkp-pdf-btn {
  background: #fff; border: 1px solid #d8d2c2; border-radius: 5px;
  padding: 4px 10px; font-size: 0.8rem; cursor: pointer; color: #0f6e5e;
}
.tkp-pdf-btn:hover { background: #f4f8f6; }

/* Meine Abos */
.tkp-abo { border: 1px solid #e2e6eb; border-radius: 10px; padding: 16px 18px; margin: 12px 0; background: #fff; }
.tkp-abo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tkp-abo-head small { color: #5b6156; }
.tkp-abo-products { margin: 8px 0 0 18px; padding: 0; font-size: 0.9rem; color: #333; }
.tkp-abo-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; font-size: 0.92rem; }
.tkp-abo-facts span { display: block; font-size: 0.75rem; color: #5b6156; }
.tkp-abo-facts small { color: #5b6156; }
.tkp-abo-actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.tkp-link-btn { background: none; border: none; color: #a3272c; text-decoration: underline; cursor: pointer; font-size: 0.85rem; padding: 0; }
.tkp-cancel { margin-top: 14px; padding: 14px 16px; background: #fbf6f6; border: 1px solid #f0d6d6; border-radius: 8px; }
.tkp-cancel textarea { width: 100%; padding: 8px 10px; border: 1px solid #d8d2c2; border-radius: 6px; font: inherit; }
.tkp-cancel label { display: block; font-size: 0.82rem; font-weight: 600; margin: 10px 0 4px; }
.tkp-check { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; }
.tkp-btn-danger { background: #b3000c; }
@media (max-width: 640px) { .tkp-abo-facts { grid-template-columns: 1fr; } }

/* Reiter wie im Offerten-Tool */
.tkp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.tkp-welcome { margin: 0; }
.tkp-logout { font-size: 0.9rem; }
.tkp-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; background: #f0ebe3; border-radius: 10px 10px 0 0; border-bottom: 1px solid #e2ddd3; }
.tkp-app .tkp-tabs button { background: #e3000f; color: #fff; border: 0; border-radius: 8px; padding: 12px 22px; font-weight: 700; font-size: 0.95rem; cursor: pointer; line-height: 1.2; }
.tkp-app .tkp-tabs button:hover { background: #b8000c; color: #fff; }
.tkp-app .tkp-tabs button.active { background: #2b2a29; color: #fff; }
.tkp-app .tkp-tabs button:focus-visible { outline: 3px solid #2b2a29; outline-offset: 2px; }
.tkp-panel { background: #f0ebe3; padding: 4px 14px 18px; border-radius: 0 0 10px 10px; }
.tkp-panel > h2 { margin: 14px 0 4px; font-size: 1.25rem; }
.tkp-panel .tkp-table { background: #fff; border-radius: 8px; }
@media (max-width: 640px) { .tkp-app .tkp-tabs button { flex: 1 1 auto; padding: 10px 12px; } }

/* Rechnungskategorien */
.tkp-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.tkp-app .tkp-cats button { background: #fff; color: #2b2a29; border: 1px solid #d8d2c2; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.tkp-app .tkp-cats button span { font-weight: 400; color: #5b6156; }
.tkp-app .tkp-cats button.active { background: #2b2a29; color: #fff; border-color: #2b2a29; }
.tkp-app .tkp-cats button.active span { color: #ddd; }
.tkp-app .tkp-cats button[data-cat="overdue"]:not(.active) { border-color: #e0b3b3; color: #a3272c; }
.tkp-cat-sum { font-size: 0.9rem; margin: 6px 0 0; }
.tkp-cat-sum.is-warn { color: #a3272c; font-weight: 700; }
.tkp-products { margin: 4px 0 6px 24px; padding: 8px 12px; background: #fff; border: 1px solid #eadada; border-radius: 6px; }

/* Unterschrift */
.tkp-sub { font-weight: 700; margin: 12px 0 2px; font-size: 0.9rem; }
.tkp-table .num { text-align: right; white-space: nowrap; }
.tkp-table .tkp-total td { font-weight: 700; border-top: 1px solid #2b2a29; }
.tkp-sign-box { background: #f7faf8; border-color: #d6e6dd; }
.tkp-input { width: 100%; padding: 9px 11px; border: 1px solid #d8d2c2; border-radius: 6px; font-size: 0.95rem; }
.tkp-pad { display: block; width: 100%; max-width: 520px; height: 170px; background: #fff; border: 1px dashed #9aa5a0; border-radius: 8px; touch-action: none; cursor: crosshair; }
.tkp-link-neutral { color: #0f6e5e !important; }
.tkp-dot { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #fff; color: #e3000f; font-size: 0.75rem; margin-left: 4px; }
.tkp-check { align-items: flex-start !important; } .tkp-check input { margin-top: 3px; flex: none; }
