/* ==========================================================================
   theme.css — Design System for ls.dremo.systems
   Apple-inspired Light Mode + Glassmorphism Dark Mode
   Font: Inter (loaded via Google Fonts CDN in HTML)
   ========================================================================== */

/* ==========================================================================
   1. Custom Properties — Light (default) + Dark
   ========================================================================== */

:root {
  --bg: #F5F5F7;
  --surface: #ffffff;
  --surface-hover: rgba(0,0,0,.02);
  --sheet-bg: #ffffff;
  --border: rgba(0,0,0,.06);
  --text: #1d1d1f;
  --text-secondary: rgba(0,0,0,.4);
  --text-tertiary: rgba(0,0,0,.25);
  --accent: #3a6fdb;
  --accent-glow: rgba(58,111,219,.12);
  --topbar-bg: rgba(255,255,255,.82);
  --topbar-border: rgba(0,0,0,.06);
  --card-shadow: 0 1px 3px rgba(0,0,0,.04);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,.06);
  --primary-btn: #0c1533;
  --primary-btn-hover: #1e2b5c;
  --overlay-bg: rgba(0,0,0,.55);
  --status-ja: #22c55e;
  --status-ja-bg: #dcfce7;
  --status-ja-text: #166534;
  --status-teils: #fbbf24;
  --status-teils-bg: #fef9c3;
  --status-teils-text: #92400e;
  --status-nein: #ef4444;
  --status-nein-bg: #fee2e2;
  --status-nein-text: #dc2626;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: rgba(255,255,255,.04);
    --surface-hover: rgba(255,255,255,.07);
    --sheet-bg: #16161a;
    --border: rgba(255,255,255,.06);
    --text: #ffffff;
    --text-secondary: rgba(255,255,255,.35);
    --text-tertiary: rgba(255,255,255,.15);
    --accent: #3a6fdb;
    --accent-glow: rgba(58,111,219,.15);
    --topbar-bg: rgba(12,21,51,.95);
    --topbar-border: rgba(255,255,255,.06);
    --card-shadow: none;
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,.3);
    --primary-btn: #3a6fdb;
    --primary-btn-hover: #2e5bbd;
    --overlay-bg: rgba(0,0,0,.6);
    --status-ja-bg: rgba(34,197,94,.12);
    --status-ja-text: #4ade80;
    --status-teils-bg: rgba(251,191,36,.10);
    --status-teils-text: #fbbf24;
    --status-nein-bg: rgba(239,68,68,.10);
    --status-nein-text: #f87171;
  }
}

/* ==========================================================================
   2. Reset + Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   3. Topbar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  height: 52px;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.topbar .tb-left,
.topbar .tb-right {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
}

.topbar .tb-right {
  justify-content: flex-end;
}

.topbar .tb-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.topbar .tb-logo {
  height: 22px;
  width: auto;
  display: block;
}

.topbar .tb-spacer {
  flex: 1;
}

.topbar .tb-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms;
}

.topbar .tb-icon:hover {
  background: var(--surface-hover);
}

.topbar .tb-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms;
}

.topbar .tb-back:hover {
  background: var(--surface-hover);
}

/* ==========================================================================
   4. Page Body
   ========================================================================== */

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 400ms ease-out;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Responsive form row: 2 columns on >=768px, 1 on mobile */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ==========================================================================
   5. Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 16px;
  transition: box-shadow 150ms, transform 150ms;
}

/* ==========================================================================
   6. Card Labels
   ========================================================================== */

.card-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ==========================================================================
   7. Inputs
   ========================================================================== */

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 200ms, box-shadow 200ms;
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 20px;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn:hover {
  background: var(--surface-hover);
}

.btn-primary {
  background: var(--primary-btn);
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--primary-btn-hover);
}

.btn:disabled,
.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:disabled:hover,
.btn-primary:disabled:hover {
  opacity: .5;
  background: var(--primary-btn);
}

.btn:disabled:not(.btn-primary):hover {
  background: var(--surface);
}

.btn-danger {
  color: var(--status-nein);
  border-color: var(--status-nein);
}

/* ==========================================================================
   9. Badges
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.badge-ja {
  background: var(--status-ja-bg);
  color: var(--status-ja-text);
}

.badge-teils {
  background: var(--status-teils-bg);
  color: var(--status-teils-text);
}

.badge-nein {
  background: var(--status-nein-bg);
  color: var(--status-nein-text);
}

/* ==========================================================================
   10. LF Buttons (Leistungserfuellung toggle buttons)
   ========================================================================== */

.lf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
}

.lf-btn.active-ja {
  border-color: var(--status-ja);
  background: var(--status-ja-bg);
  color: var(--status-ja-text);
}

.lf-btn.active-teils {
  border-color: var(--status-teils);
  background: var(--status-teils-bg);
  color: var(--status-teils-text);
}

.lf-btn.active-nein {
  border-color: var(--status-nein);
  background: var(--status-nein-bg);
  color: var(--status-nein-text);
}

/* ==========================================================================
   11. Order Cards
   ========================================================================== */

.order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: all 150ms;
  position: relative;
  overflow: hidden;
}

.order-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--card-shadow-hover);
}

.order-card .oc-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.order-card .oc-body {
  flex: 1;
  min-width: 0;
}

.order-card .oc-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card .oc-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.order-card .oc-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.order-card .oc-badge {
  flex-shrink: 0;
}

/* ==========================================================================
   12. Filter Chips
   ========================================================================== */

.filter-chips {
  display: flex;
  gap: 8px;
}

.filter-chip {
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms;
}

.filter-chip.active {
  background: var(--primary-btn);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   13. FAB (Floating Action Button)
   ========================================================================== */

.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-btn);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(58,111,219,.3);
  z-index: 50;
  transition: transform 150ms;
}

.fab:hover {
  transform: scale(1.05);
}

.fab:active {
  transform: scale(.95);
}

/* ==========================================================================
   14. (reserviert)
   ========================================================================== */

/* ==========================================================================
   15. Position Items
   ========================================================================== */

.pos-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 8px;
}

.pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pos-num {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.pos-actions {
  display: flex;
  gap: 6px;
}

.pos-actions button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.pos-actions button:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-tertiary);
}

.pos-actions .pos-reset-btn {
  font-size: 16px;
  font-weight: 600;
}

@media (hover: hover) {
  .pos-actions .pos-delete:hover {
    color: var(--status-nein);
    border-color: var(--status-nein);
    background: var(--status-nein-bg);
  }
}

.pos-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pos-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pos-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pos-tag {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-glow);
  color: var(--accent);
}

.pos-tag-neutral {
  background: var(--surface-hover);
  color: var(--text-secondary);
}

/* .pos-field — input styling inherited from global input rules */

/* ==========================================================================
   16. Save Indicator
   ========================================================================== */

.save-indicator {
  font-size: 12px;
  color: var(--status-ja);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms, transform 200ms;
}

.save-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   17. Error / Warning / Signed Banners
   ========================================================================== */

.error-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--status-nein-bg);
  color: var(--status-nein-text);
  border: 1px solid rgba(239,68,68,.15);
  font-size: 13px;
}

.warn-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--status-teils-bg);
  color: var(--status-teils-text);
  border: 1px solid rgba(251,191,36,.15);
  font-size: 13px;
}

.signed-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--status-ja-bg);
  color: var(--status-ja-text);
  border: 1px solid rgba(34,197,94,.15);
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   18. Search Bar
   ========================================================================== */

.search-wrap {
  position: relative;
}

.search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-wrap input {
  padding-left: 36px;
}

/* ==========================================================================
   19. (reserviert — customer-item/avatar entfernt, ersetzt durch cust-panel in app.php)
   ========================================================================== */

/* ==========================================================================
   20. Add Buttons (dashed)
   ========================================================================== */

.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms;
}

.btn-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ==========================================================================
   21. Price Lock
   ========================================================================== */

.price-locked {
  position: relative;
  pointer-events: none;
  opacity: .5;
}

.price-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  pointer-events: all;
}

/* .price-manual — removes the locked state (no special styling needed) */

/* ==========================================================================
   22. System Discount Badge
   ========================================================================== */

.wc-discount-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--status-ja-bg);
  color: var(--status-ja-text);
  font-size: 11px;
  font-weight: 500;
}

/* ==========================================================================
   23. Rahmenauftrag-Badge (v1.4.0) — KEIN .price-col, immer sichtbar
   ========================================================================== */

.blanket-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  margin: 4px 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--accent);
}

.blanket-badge-icon {
  flex-shrink: 0;
  opacity: 0.7;
  display: flex;
  align-items: center;
}

.blanket-badge-text {
  flex: 1;
  font-weight: 500;
}

.blanket-badge-status {
  flex-shrink: 0;
  font-size: 0.73rem;
  padding: 2px 9px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  white-space: nowrap;
}

/* ==========================================================================
   24. Duplicate Overlay Checkbox Items
   ========================================================================== */

.dup-pos-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  cursor: pointer;
}

.dup-pos-item input[type="checkbox"] {
  accent-color: var(--accent);
}

/* ==========================================================================
   24. Write-Through Status
   ========================================================================== */

#wt-status {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 4px;
}

/* ==========================================================================
   25. Animations
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   26. Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   27. Responsive
   ========================================================================== */

@media (min-width: 768px) {
  .page-body {
    padding: 24px 32px;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .page-body {
    padding: 32px 40px;
    max-width: 960px;
  }
}

/* Auftragsliste (app.php) darf auf sehr großen Screens etwas breiter werden */
@media (min-width: 1440px) {
  body.page-app .page-body {
    max-width: 1100px;
  }
}

/* Action-Bar: auf Desktop Buttons kompakt rechts, Mobile full-width */
@media (min-width: 768px) {
  .action-bar {
    justify-content: space-between;
    gap: 12px;
  }
  .action-bar .btn {
    flex: 0 1 auto;
    min-width: 180px;
    max-width: 320px;
  }
  .action-bar .btn-primary {
    flex: 0 1 auto;
    min-width: 260px;
  }
}

/* Leistungserfüllung Ja/Teils/Nein: auf Desktop Container begrenzen,
   Buttons füllen diesen gleichmäßig — keine Whitespace-Wüste rechts. */
@media (min-width: 768px) {
  .lf-buttons {
    max-width: 560px;
  }
  .lf-buttons .lf-btn {
    flex: 1 1 0;
    max-width: none;
  }
}

/* ==========================================================================
   27b. Date Input — iOS Safari & Cross-Browser Fix
   iOS rendert <input type="date"> ohne sichtbares Picker-Symbol und center-aligned.
   Wir setzen links-bündig + eigenes Kalender-Icon (visuelle Affordanz).
   ========================================================================== */

input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
  font-family: inherit;
  min-height: 44px;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  padding-right: 40px;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 100%;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

/* ==========================================================================
   28. Hidden Utility
   ========================================================================== */

.hidden {
  display: none;
}

.prices-hidden .price-col {
  display: none;
}

/* ==========================================================================
   29. Article Search (Fullscreen Overlay — siehe order.php für .article-search.open)
   ========================================================================== */

#search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  z-index: 10;
}

@media (prefers-color-scheme: dark) {
  #search-results {
    background: #1e1e30;
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.4);
  }
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  transition: background 120ms;
}

@media (prefers-color-scheme: dark) {
  .search-result-item {
    border-bottom-color: rgba(255,255,255,.08);
  }
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.hover {
  background: rgba(58,111,219,.08);
}

@media (prefers-color-scheme: dark) {
  .search-result-item:hover,
  .search-result-item.hover {
    background: rgba(58,111,219,.18);
  }
}

.art-name {
  font-weight: 600;
  color: #1d1d1f;
  font-size: 13px;
  line-height: 1.3;
}

.art-num {
  font-size: 11px;
  color: rgba(0,0,0,.45);
  margin-top: 2px;
}

@media (prefers-color-scheme: dark) {
  .art-name { color: #ffffff; }
  .art-num  { color: rgba(255,255,255,.45); }
}

/* ==========================================================================
   30. Document Preview (preview.php / sign.php)
   ========================================================================== */

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.doc-title-bar {
  background: #0c1533;
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin: 16px 0 12px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.doc-table th,
.doc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.doc-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 10px;
  text-transform: uppercase;
}

.doc-legal {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 16px;
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.sig-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.sig-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sig-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  font-weight: 600;
}

.sig-canvas-wrap {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  position: relative;
}

.sig-canvas-wrap canvas {
  display: block;
  width: 100%;
  touch-action: none;
}

.sig-date {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: var(--text-tertiary);
}

/* ==========================================================================
   31. Action Bars
   ========================================================================== */

.action-bar {
  display: flex;
  gap: 8px;
  padding: 16px 0;
}

.action-bar .btn {
  flex: 1;
}
