/* SamsDesk calm layout: light lists instead of tiles. Presentation only. */

/* Area tabs (Kassieren, Kunden, Geld) */
.sam-app-shell .sam-section-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 14px 24px 0;
  border-bottom: 1px solid var(--sam-line);
  scrollbar-width: none;
}
.sam-app-shell .sam-section-tabs::-webkit-scrollbar { display: none; }
.sam-app-shell .sam-section-tab {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--sam-muted);
  font-weight: 600;
  white-space: nowrap;
  touch-action: manipulation;
}
.sam-app-shell .sam-section-tab:hover { color: var(--sam-ink); }
.sam-app-shell .sam-section-tab-active { color: var(--sam-accent); border-bottom-color: var(--sam-accent); }

/* Heute */
.sam-app-shell .sam-today { max-width: 760px !important; }
.sam-today-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sam-today-kicker { margin: 0; color: var(--sam-accent); font-size: 13px; font-weight: 600; }
.sam-today-add {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px;
  background: var(--sam-accent); color: #fff; font-weight: 600;
}
.sam-today-todo { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid #ecdcb8; border-radius: 10px; background: #fffaf0; }
.sam-today-todo li + li { border-top: 1px solid #f1e5c8; }
.sam-today-todo button {
  display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between;
  padding: 0 14px; border: 0; background: none; color: #7a5410; font-weight: 600; text-align: left;
}
.sam-today-error { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: #fdecef; color: #9d2943; }
.sam-today-section { margin-bottom: 28px; }
.sam-today-section h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px !important; }
.sam-today-section h2 small { color: var(--sam-muted); font-weight: 500; font-size: 14px; }
.sam-today-day h3 { margin: 14px 0 4px; color: var(--sam-muted); font-size: 13px; font-weight: 600; text-transform: none; }
.sam-today-empty { margin: 0; padding: 12px 0; color: var(--sam-muted); }
.sam-today-link { min-height: 44px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--sam-accent); font-weight: 600; }
.sam-today-list { border-top: 1px solid var(--sam-line); }
.sam-today-money { border-top: 1px solid var(--sam-line); padding-top: 4px; }
.sam-today-money > summary {
  display: flex; align-items: center; min-height: 48px; cursor: pointer;
  color: var(--sam-muted); font-weight: 600; list-style: none;
}
.sam-today-money > summary::-webkit-details-marker { display: none; }
.sam-today-money > summary::before { content: '›'; display: inline-block; width: 18px; transition: transform .15s; }
.sam-today-money[open] > summary::before { transform: rotate(90deg); }

/* Appointment row: one line per appointment, no card shadow */
.sam-appt-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--sam-line); }
.sam-appt-main {
  display: flex; flex: 1; min-width: 0; min-height: 56px; align-items: center; gap: 14px;
  padding: 8px 4px; border: 0; background: none; color: inherit; text-align: left;
}
.sam-appt-row-compact .sam-appt-main { min-height: 48px; }
.sam-appt-main:hover .sam-appt-text strong { color: var(--sam-accent); }
.sam-appt-time { display: flex; flex-direction: column; width: 48px; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.sam-appt-time small { color: var(--sam-muted); font-weight: 400; font-size: 12px; }
.sam-appt-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sam-appt-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sam-appt-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sam-muted); font-size: 13px; }
.sam-appt-tag { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sam-appt-tag-online { background: #e8f0fb; color: #285b9a; }
.sam-appt-tag-request { background: #fff2d9; color: #87590b; }
.sam-appt-tag-paid { background: #e5f4ea; color: #24703d; }
.sam-appt-tag-wecasa { background: #f0eaf7; color: #5d3f80; }
.sam-appt-action {
  flex: none; min-height: 40px; padding: 0 12px; border: 1px solid var(--sam-line); border-radius: 8px;
  background: #fff; color: var(--sam-accent); font-weight: 600;
}
.sam-appt-action:hover { background: var(--sam-soft); }
.sam-appt-cancel { flex: none; width: 40px; min-height: 40px; border: 0; background: none; color: var(--sam-muted); }
.sam-appt-cancel:hover { color: #b4233f; }

/* Card charge inside the appointment dialog */
.sam-charge { border: 1px solid var(--sam-line); border-radius: 10px; padding: 14px; }
.sam-charge:has(> .sam-charge-open:only-child) { border: 0; padding: 0; }
.sam-charge-open, .sam-charge-secondary {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--sam-line, #e7e2ed); border-radius: 8px;
  background: #fff; color: var(--sam-accent, #725493); font-weight: 600;
}
.sam-charge-open { width: 100%; }
.sam-charge-primary {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px;
  background: var(--sam-accent, #725493); color: #fff; font-weight: 600;
}
.sam-charge :is(button):disabled { opacity: .5; cursor: not-allowed; }
.sam-charge-title { margin-bottom: 10px; font-weight: 700; }
.sam-charge-note { margin: 0 0 10px; color: var(--sam-muted, #716679); font-size: 13px; }
.sam-charge-warn { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fff2d9; color: #7a5410; font-size: 13px; }
.sam-charge-ok { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #e5f4ea; color: #24703d; font-weight: 600; }
.sam-charge-link { color: var(--sam-accent, #725493); font-weight: 600; }
.sam-charge-review { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--sam-line, #e7e2ed); }
.sam-charge-sum { margin: 0 0 2px; font-size: 20px; font-weight: 700; }
.sam-charge-consent { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 8px; font-weight: 600; }
.sam-charge-consent input { width: 20px; height: 20px; }

@media (max-width: 767px) {
  .sam-app-shell .sam-section-tabs { padding: 8px 12px 0; }
  .sam-app-shell .mobile-bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .sam-today-header h1 { font-size: 22px !important; }
  .sam-appt-main { gap: 10px; }
  .sam-appt-main { flex-wrap: wrap; row-gap: 2px; }
  .sam-appt-text { flex-basis: calc(100% - 60px); }
  .sam-appt-text strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .sam-appt-tag { margin-left: 58px; }
  .sam-appt-cancel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sam-today-money > summary::before { transition: none; }
}

/* Settle form */
.sam-charge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.sam-charge-grid label > span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.sam-charge-stepper { display: flex; gap: 6px; }
.sam-charge-stepper input { min-width: 0; text-align: center; }
.sam-charge-stepper button {
  flex: none; width: 44px; min-height: 44px; border: 1px solid var(--sam-line, #e7e2ed); border-radius: 8px;
  background: #fff; color: var(--sam-accent, #725493); font-size: 18px; font-weight: 700;
}
.sam-charge-pay { margin: 8px 0 12px; padding: 0; border: 0; }
.sam-charge-pay legend { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.sam-charge-pay label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sam-charge-pay input { width: 18px; height: 18px; }
@media (max-width: 480px) { .sam-charge-grid { grid-template-columns: 1fr; } }

/* Offer editor: one-tap services from the catalog */
.sam-offers-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.sam-offers-quick button {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 48px; padding: 6px 12px;
  border: 1px solid var(--sam-line, #e7e2ed); border-radius: 8px; background: #fff; color: var(--sam-ink, #302939); text-align: left;
}
.sam-offers-quick button span { font-weight: 600; color: var(--sam-accent, #725493); }
.sam-offers-quick button small { color: var(--sam-muted, #716679); font-size: 12px; }
.sam-offers-quick button:hover { background: var(--sam-soft, #f0eaf7); }
.sam-offers-quick button:disabled { opacity: .5; }

/* Settle: several lines (actual hours, further services, articles) */
.sam-settle-line { padding: 10px 0; border-bottom: 1px solid var(--sam-line, #e7e2ed); }
.sam-settle-line-head { display: flex; gap: 6px; margin-bottom: 6px; }
.sam-settle-line-head input { flex: 1; min-width: 0; font-weight: 600; }
.sam-settle-remove { flex: none; width: 44px; min-height: 44px; border: 0; background: none; color: var(--sam-muted, #716679); }
.sam-settle-line-nums { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(80px, .8fr) minmax(110px, 1fr); gap: 6px; }
.sam-settle-price { position: relative; display: block; }
.sam-settle-price input { width: 100%; padding-right: 52px; }
.sam-settle-price span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--sam-muted, #716679); font-size: 12px; pointer-events: none; }
.sam-settle-sum { display: block; margin-top: 4px; text-align: right; color: var(--sam-muted, #716679); }
.sam-settle-total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 4px; font-size: 18px; }
.sam-settle-review { list-style: none; margin: 6px 0; padding: 0; }
.sam-settle-review li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--sam-line, #e7e2ed); font-size: 14px; }
.sam-charge .sam-offers-quick { margin: 12px 0 8px; }
@media (max-width: 480px) {
  .sam-settle-line-nums { grid-template-columns: 1fr 1fr; }
  .sam-settle-line-nums .sam-charge-stepper { grid-column: 1 / -1; }
}

/* Customer sheet: agreed hourly rate */
.sam-rate { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--sam-line, #e7e2ed); border-radius: 10px; background: #fff; }
.sam-rate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sam-rate-head > div { display: flex; flex-direction: column; }
.sam-rate-kicker { color: var(--sam-muted, #716679); font-size: 13px; font-weight: 600; }
.sam-rate-value { font-size: 20px; font-weight: 700; }
.sam-rate-head small { color: var(--sam-muted, #716679); font-size: 13px; }
.sam-rate-edit { min-height: 44px; padding: 0 14px; border: 1px solid var(--sam-line, #e7e2ed); border-radius: 8px; background: #fff; color: var(--sam-accent, #725493); font-weight: 600; }
.sam-rate-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--sam-line, #e7e2ed); }
.sam-rate-note { margin: 0 0 6px; font-size: 13px; color: var(--sam-muted, #716679); }
.sam-rate-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sam-rate-row input { flex: 1 1 140px; }
.sam-rate-reset { margin-top: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--sam-muted, #716679); text-decoration: underline; }

/* Kassa: quiet inner tabs (Neuer Bon | Belege & Tagesumsatz) */
.sam-app-shell .sam-inner-tabs { display: flex; gap: 6px; padding: 12px 24px 4px; }
.sam-app-shell .sam-inner-tab {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--sam-line); border-radius: 999px;
  background: #fff; color: var(--sam-muted); font-weight: 600; font-size: 14px;
}
.sam-app-shell .sam-inner-tab-active { border-color: var(--sam-accent); background: var(--sam-soft); color: var(--sam-accent); }
.sam-app-shell .kassa-workspace .grid.grid-cols-2 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.sam-app-shell .kassa-workspace button .text-sm.font-semibold { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 767px) { .sam-app-shell .sam-inner-tabs { padding: 8px 12px 4px; } }

/* Rechnungen: status filter and status colours */
.sam-app-shell .sam-invoice-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 10px; }
.sam-invoice-tag-open { background: #fff2d9; color: #87590b; }
.sam-invoice-tag-late { background: #fdecef; color: #9d2943; }
.sam-invoice-tag-paid { background: #e5f4ea; color: #24703d; }
.sam-invoice-tag-muted { background: #f1eff3; color: #6b6472; }

/* Kundenliste: Stundensatz rechts */
.sam-list-rate { flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--sam-ink, #302939); }
.sam-list-rate small { display: block; color: var(--sam-muted, #716679); font-weight: 400; font-size: 11px; }
.sam-list-rate-missing { color: #87590b; font-size: 12px; font-weight: 600; }
