/* ============================================================
   Belegabrechner — Global Stylesheet
   Design tokens derived from Schuhschachtel (Teal/Cyan theme)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  --primary:        #0891B2;
  --primary-light:  #22D3EE;
  --primary-dark:   #155E75;
  --accent:         #10B981;
  --accent-dark:    #065F46;
  --bg:             #F8FAFC;
  --bg-card:        #FFFFFF;
  --bg-hover:       #F1F5F9;
  --text:           #1E293B;
  --text-muted:     #64748B;
  --border:         #CBD5E1;
  --border-light:   #E2E8F0;
  --danger:         #DC2626;
  --danger-light:   #FEE2E2;
  --warning:        #D97706;
  --warning-light:  #FEF3C7;
  --success:        #059669;
  --success-light:  #D1FAE5;
  --info:           #0891B2;
  --info-light:     #E0F2FE;
  --radius:         10px;
  --radius-sm:      6px;
  --shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,.08);
  --transition:     200ms ease;
  --header-h:       56px;
  --footer-h:       44px;
}

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

/* --- Base --- */
html { font-size: 16px; }

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

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* --- Typography --- */
h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--primary-dark); }
h2 { font-size: 1.1rem; font-weight: 600; color: var(--primary-dark); margin-bottom: 0.75rem; }
h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }

/* ============================================================
   Layout: Header / Main / Footer
   ============================================================ */

/* --- Site Header --- */
.site-header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  padding-inline: max(1.25rem, calc((100% - 1600px) / 2 + 1.25rem));
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.site-header .brand img {
  height: 32px;
  width: auto;
  display: block;
}

.site-header .brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* --- Projekttitel (film-title) — mittig im Header --- */
.site-header .project-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.site-header .project-title.is-editable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.site-header .project-title.is-editable:hover,
.site-header .project-title.is-editable:focus-visible {
  background: var(--bg-hover);
  color: var(--primary-dark);
  outline: none;
}
@media (max-width: 900px) {
  /* Drop the title onto its own line below the brand+nav so it isn't ellipsed */
  .site-header {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    row-gap: 0.25rem;
  }
  .site-header .project-title {
    order: 3;
    flex-basis: 100%;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    padding: 0.1rem 0;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.15;
  }
}

/* --- Site Nav --- */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav button:hover {
  background: var(--bg-hover);
  color: var(--primary);
  text-decoration: none;
}

.site-nav a.active {
  background: var(--info-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.site-nav .nav-logout {
  color: var(--danger);
  border: 1px solid var(--border);
  margin-left: 0.25rem;
}
.site-nav .nav-logout:hover {
  border-color: var(--danger);
  background: var(--danger-light);
  color: var(--danger);
}

.site-nav .nav-iconbtn {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 0.25rem;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.site-nav .nav-iconbtn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--info-light);
}

/* --- Greeting in header --- */
.nav-greeting {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}

/* --- Settings Menu (⚙ dropdown, Master role) --- */
.site-nav .settings-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
}
.site-nav .settings-trigger {
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 0.25rem;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.site-nav .settings-trigger:hover,
.site-nav .settings-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--info-light);
}
.settings-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.settings-dropdown[hidden] { display: none; }
.settings-dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.settings-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
  text-decoration: none;
}
.settings-dropdown-item.active {
  background: var(--info-light);
  color: var(--primary-dark);
  font-weight: 600;
}

/* --- Main Content --- */
.site-main {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}

/* --- Site Footer --- */
.site-footer {
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 0 1rem;
}

.site-footer span { opacity: 0.7; }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

/* Grid helper for dashboard cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: #B91C1C;
  border-color: #B91C1C;
  text-decoration: none;
  color: #fff;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
}

/* Row action buttons (table action cells) — mockup version-a style */
.row-actions {
  display: inline-flex;
  gap: 0.25rem;
}
.row-actions button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.row-actions button:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--primary);
}
.row-actions .ok:hover:not(:disabled) {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-light);
}
.row-actions .no:hover:not(:disabled) {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-light);
}
.row-actions .edit:hover:not(:disabled) {
  background: var(--info-light);
  color: var(--primary);
  border-color: var(--info-light);
}
.row-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  margin-bottom: 1rem;
}

.form-group label,
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8,145,178,.1);
}

.select,
select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.select:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8,145,178,.1);
}

.textarea,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.textarea:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8,145,178,.1);
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-error {
  display: block;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
}

/* ============================================================
   Badges
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 99px;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-pending {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-confirmed {
  background: var(--success-light);
  color: var(--success);
}

.badge-rejected {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-info {
  background: var(--info-light);
  color: var(--primary-dark);
}

.badge-neutral {
  background: var(--bg-hover);
  color: var(--text-muted);
}

/* ============================================================
   Table
   ============================================================ */

.table-wrapper {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0 -1.75rem 0 -1.75rem;
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
}

/* Sticky header when table scrolls vertically */
.master-container .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border-light);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.82rem;
  table-layout: auto;
}

.table th {
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  overflow-wrap: break-word;
  word-break: normal;
}

/* First/last cell padding aligns content with container heading ("Belege") on left
   and kpi-right totals on the right */
.table th:first-child,
.table td:first-child {
  padding-left: 1.75rem;
}
.table th:last-child,
.table td:last-child {
  padding-right: 1.75rem;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: var(--bg-hover); }

.table-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   Tab Bar
   ============================================================ */

.tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.tab:hover { color: var(--primary); }

.tab.active {
  color: var(--primary-dark);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ============================================================
   Toast Notifications
   ============================================================ */

#toast-container {
  position: fixed;
  top: calc(var(--header-h) + 1rem);
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  max-width: 340px;
  pointer-events: auto;
  animation: toast-in 200ms ease forwards;
}

.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-warning { border-left-color: var(--warning); }

.toast.toast-out {
  animation: toast-out 200ms ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ============================================================
   Utility
   ============================================================ */

.hidden { display: none !important; }

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .site-main { padding: 1.25rem 1rem; }

  .site-header { padding: 0 1rem; }

  .brand-name { font-size: 0.9rem; }

  .site-nav a,
  .site-nav button { font-size: 0.78rem; padding: 0.25rem 0.5rem; }

  .card-grid { grid-template-columns: 1fr 1fr; }

  .table { font-size: 0.82rem; }

  .table th,
  .table td { padding: 0.55rem 0.75rem; }

  #toast-container { right: 0.75rem; left: 0.75rem; }
  .toast { max-width: 100%; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }

  .site-nav { gap: 0.15rem; }

  .nav-greeting { display: none; }

  .settings-dropdown { right: -1rem; min-width: 180px; }
}

@media (max-width: 768px) {
  .nav-greeting { font-size: 0.78rem; padding: 0.25rem 0.4rem; }
  .site-nav .settings-trigger { font-size: 1.05rem; padding: 0.3rem 0.5rem; }
}

/* ============================================================
   Modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 1rem;
  z-index: 500;
  overflow-y: auto;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.modal-header h2 { margin-bottom: 0; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 480px) {
  .modal-overlay { padding: 1rem 0.5rem; }
  .modal-box { max-height: calc(100vh - 2rem); }
}

/* Generic .modal / .modal-content overlay (edit + zoom modals) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 1rem;
  z-index: 600;
  overflow-y: auto;
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1.5rem;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Zoom modal (+/- image preview) */
.zoom-modal-content {
  background: #0f172a;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 1200px;
  height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.zoom-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.85rem;
  border-bottom: 1px solid #334155;
}
.zoom-controls { display: flex; align-items: center; gap: 0.3rem; }
.zoom-controls button {
  background: #334155; color: #e2e8f0; border: none;
  padding: 0.25rem 0.7rem; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.85rem; line-height: 1;
}
.zoom-controls button:hover { background: #475569; }
#mh-zoom-level { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.zoom-stage {
  flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: #0f172a; cursor: grab;
}
.zoom-stage img { max-width: none; max-height: none; transform-origin: center; transition: transform 0.08s linear; user-select: none; pointer-events: none; }
.zoom-stage iframe { width: 100%; height: 100%; border: none; background: #fff; }

/* Auto-Mode toggle (drop-zone) */
.auto-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 0.35rem 0.75rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.auto-mode-toggle:hover { border-color: var(--primary-light); }
.auto-mode-toggle:has(input:checked) {
  background: rgba(8,145,178,0.08);
  border-color: var(--primary);
}
.auto-mode-toggle input { display: none; }
.auto-mode-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: #ccc;
  border-radius: 18px;
  transition: 0.2s;
  flex-shrink: 0;
}
.auto-mode-slider::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.auto-mode-toggle input:checked + .auto-mode-slider { background: var(--primary); }
.auto-mode-toggle input:checked + .auto-mode-slider::before { transform: translateX(14px); }
.auto-mode-label { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.auto-mode-toggle:has(input:checked) .auto-mode-label { color: var(--primary); font-weight: 600; }

/* Upload progress card (Schuhschachtel style) */
#mh-processing {
  margin-bottom: 1rem;
  background: var(--bg-card);
  padding: 1rem 1.25rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
}
.processing-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.processing-spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: processing-spin 0.65s linear infinite;
  flex-shrink: 0;
}
.processing-spinner.done { border-color: var(--primary); border-top-color: var(--primary); animation: none; }
@keyframes processing-spin { to { transform: rotate(360deg); } }
.processing-content { flex: 1; min-width: 0; }
#mh-progress-text { font-size: 0.88rem; font-weight: 600; color: var(--text); margin: 0; line-height: 1.3; }
.progress-detail { font-size: 0.75rem; color: var(--text-muted); margin: 0.15rem 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-count { font-size: 0.78rem; font-weight: 600; color: var(--primary); white-space: nowrap; flex-shrink: 0; }
#mh-progress-bar { height: 7px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
#mh-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
  position: relative;
  overflow: hidden;
}
#mh-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35) 50%, transparent);
  animation: progress-shimmer 1.4s ease-in-out infinite;
}
#mh-progress-fill.done { background: var(--primary); }
#mh-progress-fill.done::after { animation: none; }
@keyframes progress-shimmer { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* "Erkannte Belege" section */
#mh-bulk-vorschau { margin-bottom: 1.25rem; }
#mh-bulk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#mh-bulk-header h2 { margin: 0; font-size: 1.05rem; color: var(--primary-dark); }
#mh-bulk-actions { display: flex; gap: 0.5rem; }
#mh-btn-confirm-all {
  padding: 0.45rem 1rem;
  background: var(--primary);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.8rem; font-weight: 500;
}
#mh-btn-confirm-all:hover { background: var(--primary-dark); }
#mh-btn-cancel-all {
  padding: 0.45rem 1rem;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.8rem; font-weight: 500;
}
#mh-btn-cancel-all:hover { border-color: var(--danger); color: var(--danger); }

#mh-bulk-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
#mh-bulk-meta .form-group { margin: 0; }
@media (max-width: 700px) { #mh-bulk-meta { grid-template-columns: 1fr; } }

#mh-bulk-cards { display: flex; flex-direction: column; gap: 0.6rem; }

.beleg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  position: relative;
  isolation: isolate;
}
.beleg-card.saved { border-color: var(--primary); background: var(--info-light); }
.beleg-card.beleg-shimmer { overflow: hidden; animation: belegShimmerGlow 3000ms ease-out forwards; }
.beleg-card.beleg-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(34,211,238,0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: belegShimmerSweep 1600ms ease-out forwards;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 3;
}
.beleg-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.beleg-card-header .filename {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
.beleg-card-header .filename:hover { color: var(--primary-dark); text-decoration: underline; }
.ki-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
}
.ki-badge.success { background: var(--success-light); color: var(--success); }
.ki-badge.manual { background: var(--warning-light); color: var(--warning); }
.ki-badge.saved-badge { background: var(--info-light); color: var(--primary); }

.beleg-card-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.4rem;
}
.beleg-card-fields .field { margin: 0; }
.beleg-card-fields label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 0.1rem;
}
.beleg-card-fields input,
.beleg-card-fields select {
  width: 100%;
  padding: 0.3rem 0.45rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}
.beleg-card-fields input:focus,
.beleg-card-fields select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8,145,178,0.1);
}
.beleg-card-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; align-items: center; }
.btn-card-confirm {
  padding: 0.35rem 0.9rem;
  background: var(--primary);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.78rem; font-weight: 500;
}
.btn-card-confirm:hover { background: var(--primary-dark); }
.btn-card-remove {
  padding: 0.35rem 0.9rem;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.78rem; font-weight: 500;
}
.btn-card-remove:hover { border-color: var(--danger); color: var(--danger); }

/* Warning banners */
.multi-doc-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}
.duplikat-warnung {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.3rem;
  margin-bottom: 0.5rem;
}

/* Shimmer animation (Schuhschachtel-style) on queue items after save */
.mh-queue-item { position: relative; }
.mh-queue-item.beleg-shimmer {
  overflow: hidden;
  animation: belegShimmerGlow 3000ms ease-out forwards;
}
.mh-queue-item.beleg-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(34, 211, 238, 0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: belegShimmerSweep 1600ms ease-out forwards;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 3;
}
@keyframes belegShimmerSweep { to { transform: translateX(100%); } }
@keyframes belegShimmerGlow {
  0%   { box-shadow: 0 0 0 0 rgba(8,145,178,0), 0 0 0 0 rgba(8,145,178,0); }
  20%  { box-shadow: 0 0 0 2px rgba(8,145,178,0.85), 0 14px 36px -10px rgba(8,145,178,0.5); }
  100% { box-shadow: 0 0 0 0 rgba(8,145,178,0), 0 0 0 0 rgba(8,145,178,0); }
}

/* ========================================================
   Mitarbeiter-Home — Schuhschachtel-inspired layout
   ======================================================== */
.mh-greeting { display: none; }

.mh-nav-greeting {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-right: 0.75rem;
  align-self: center;
  white-space: nowrap;
}
@media (max-width: 500px) {
  .mh-nav-greeting { display: none; }
}

/* Drop zone — identical to Schuhschachtel */
#mh-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--bg-card);
  transition: all var(--transition);
  margin-bottom: 1.25rem;
  cursor: pointer;
}
#mh-drop:hover {
  border-color: var(--primary-light);
  background: var(--bg-hover);
}
#mh-drop.dragover {
  border-color: var(--primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}
#mh-drop p {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
#mh-drop small {
  color: var(--text-muted);
  opacity: 0.7;
  font-size: 0.8rem;
}
.drop-zone-security {
  display: inline-block;
  margin-top: 0.5rem;
  color: #00695C;
  font-size: 0.75rem;
  font-weight: 500;
}
.drop-zone-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.drop-zone-buttons .btn-upload,
.drop-zone-buttons .btn-camera {
  padding: 0.5rem 1.25rem;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition);
}
.drop-zone-buttons .btn-upload { background: var(--primary); }
.drop-zone-buttons .btn-upload:hover { background: var(--primary-dark); }
.drop-zone-buttons .btn-camera { background: var(--accent); }
.drop-zone-buttons .btn-camera:hover { background: var(--accent-dark); }
@media (pointer: fine) and (min-width: 601px) {
  .drop-zone-buttons .btn-camera { display: none; }
}

/* Upload queue card — shows per-file status + Vorschuss/Motiv inputs */
.mh-upload-queue {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.mh-upload-queue h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }
.mh-queue-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.mh-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.mh-queue-item .status { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.mh-queue-item .status.done { color: var(--success); }
.mh-queue-item .status.error { color: var(--danger); }
.mh-queue-item .status.warning { color: var(--warning); }

/* Thin summen-style stat strip */
.mh-summen {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.mh-summen .eingereicht,
.mh-summen .bestaetigt,
.mh-summen .abgelehnt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.mh-summen .eingereicht { background: var(--warning-light); color: var(--warning); }
.mh-summen .bestaetigt  { background: var(--success-light); color: var(--success); }
.mh-summen .abgelehnt   { background: var(--danger-light);  color: var(--danger); }
.mh-summen .saldo       { color: var(--primary-dark); font-weight: 700; margin-left: auto; }

/* Filter bar — Schuhschachtel-style */
.mh-filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}
.mh-filter-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--bg);
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  height: 36px;
  box-sizing: border-box;
}
.mh-filter-btn {
  padding: 0 0.75rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  height: 100%;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition);
}
.mh-filter-btn:hover { color: var(--primary); }
.mh-filter-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow);
}
input.mh-search {
  padding: 0 0.6rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  height: 36px;
  box-sizing: border-box;
  background: var(--bg-card);
  width: 260px;
  max-width: 100%;
  margin-left: auto;
  flex: 0 0 auto;
}
.mh-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.1);
}

/* Compact Belege list */
.mh-list-card { background: var(--bg-card); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.mh-list-card h2 { font-size: 1.05rem; margin-bottom: 0.25rem; color: var(--primary-dark); font-weight: 600; }
.mh-list-card th[data-sort] { cursor: pointer; user-select: none; }
.mh-list-card th[data-sort]:hover { color: var(--primary); }
.mh-list-card th.sort-asc::after { content: ' ▲'; font-size: 0.7em; }
.mh-list-card th.sort-desc::after { content: ' ▼'; font-size: 0.7em; }

@media (max-width: 900px) {
  .mh-summen { gap: 0.35rem; }
  .mh-summen .saldo { margin-left: 0; width: 100%; }
  #mh-drop { padding: 1.5rem 1rem; }
  .drop-zone-buttons { flex-direction: column; gap: 0.4rem; }
  .drop-zone-buttons .btn-upload, .drop-zone-buttons .btn-camera { width: 100%; }
  .mh-filter-bar { flex-direction: column; align-items: stretch; }
  .mh-search { min-width: 0; width: 100%; }

  /* Convert tables to card list on mobile */
  .mh-list-card .table-wrapper { overflow: visible; }
  .mh-list-card .table,
  .mh-list-card .table tbody,
  .mh-list-card .table tr,
  .mh-list-card .table td { display: block; width: 100%; }
  .mh-list-card .table thead { display: none; }
  .mh-list-card .table tr {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.6rem;
    background: var(--bg-card);
  }
  .mh-list-card .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border: none;
    text-align: right;
  }
  .mh-list-card .table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    text-align: left;
  }
  .mh-list-card .table td[data-label=""],
  .mh-list-card .table td.action-cell {
    justify-content: flex-end;
  }
  .mh-list-card .table td.action-cell::before { content: none; }
  .mh-list-card .table td.table-empty { justify-content: center; }
  .mh-list-card .table td.table-empty::before { content: none; }
  .mh-list-card .table .file-preview-link {
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ========================================================
   File-Preview (hover tooltip + click modal)
   ======================================================== */
.file-preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.file-preview-link:hover {
  background: var(--info-light);
  border-color: var(--primary-light);
  text-decoration: none;
}

.ust-sum {
  border-bottom: 1px dotted var(--border);
  cursor: help;
  font-variant-numeric: tabular-nums;
  white-space: pre-line;
}

.edit-region {
  display: flex;
  gap: 2px;
}
.edit-region .inline-input {
  width: 50%;
  text-transform: uppercase;
}
.edit-ust {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.edit-ust label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.edit-ust label span {
  flex-shrink: 0;
  width: 24px;
  text-align: right;
}
.edit-ust .inline-input {
  padding: 0.1rem 0.25rem;
  font-size: 0.72rem;
  height: 20px;
}

.file-preview-tooltip {
  position: absolute;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fpFade 150ms ease;
  pointer-events: none;
}
.file-preview-tooltip img { display: block; max-width: 500px; max-height: 400px; object-fit: contain; }
.file-preview-tooltip iframe { display: block; width: 500px; height: 650px; border: none; }
@keyframes fpFade { from { opacity: 0; } to { opacity: 1; } }

#file-preview-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; justify-content: center;
  padding: 2rem 1rem;
  z-index: 2500;
  overflow-y: auto;
  align-items: flex-start;
}
#file-preview-modal.hidden { display: none; }
.file-preview-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 90%; max-width: 960px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.file-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
  gap: 0.5rem;
}
.file-preview-name {
  font-size: 0.82rem; font-weight: 500; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; flex: 1;
}
.file-preview-controls { display: flex; gap: 0.3rem; align-items: center; }
.file-preview-zoom-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 28px; height: 28px;
  cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.file-preview-zoom-btn:hover { border-color: var(--primary); color: var(--primary); }
.file-preview-zoom-label { font-size: 0.78rem; color: var(--text-muted); min-width: 36px; text-align: center; }
.file-preview-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--text-muted); padding: 0 0.2rem;
}
.file-preview-close:hover { color: var(--danger); }
.file-preview-body {
  padding: 1rem; overflow: auto; flex: 1;
  display: flex; justify-content: center; align-items: flex-start;
  background: #e8e8e8; min-height: 400px;
}
.file-preview-body img { max-width: 100%; height: auto; transform-origin: top center; transition: transform 150ms ease; }
.file-preview-body iframe { width: 100%; height: 75vh; border: none; transform-origin: top center; transition: transform 150ms ease; }

/* ============================================================
   Phase 2 — Master Single-Page Styles
   ============================================================ */

/* --- Master containers (stacked) --- */
.master-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.master-container-placeholder {
  opacity: 0.7;
  border-style: dashed;
}

.master-container-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 0.25rem 0;
}

/* --- KPI strip (chips + right-side totals) --- */
.kpi-strip-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.kpi-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.kpi-label {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1rem;
  margin-right: 0.3rem;
}

.kpi-right {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}
.kpi-right strong { color: var(--text); font-size: 0.95rem; }

/* --- Generic chip (pill badge) --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.chip-warn  { background: var(--warning-light); color: var(--warning); }
.chip-ok    { background: var(--success-light); color: var(--success); }
.chip-err   { background: var(--danger-light);  color: var(--danger); }
.chip-info  { background: var(--info-light);    color: var(--primary-dark); }
.chip-muted { background: var(--bg-hover);      color: var(--text-muted); }
.chip-neutral { background: var(--bg-hover);    color: var(--text-muted); border: 1px dashed var(--border); }
.chip-freigegeben {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary-dark);
  font-weight: 700;
}

/* Connected Freigabe-Chip + Abrechnen-Button (Team table Belege column) */
.freigabe-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--primary-dark);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  height: 1.9rem;
  line-height: 1;
  white-space: nowrap;
}
.freigabe-chip {
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.freigabe-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  background: #fff;
  color: var(--primary-dark);
  border: none;
  border-left: 1px solid var(--primary-dark);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.freigabe-btn:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* Detail-Button at start of Team rows — expand Vorschüsse. Text label + caret, subtle. */
/* Belege pagination — single minimal row, flush with table */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pagination-bar:empty { display: none; }
.pagination-info    { font-weight: 500; }
.pagination-spacer  { flex: 1; }
.pagination-label   { padding: 0 0.45rem; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pag-btn {
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.pag-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--primary);
}
.pag-btn:disabled { opacity: 0.3; cursor: default; }

/* Detail button: big caret, no border, no background */
.detail-btn {
  font-family: inherit;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
}
.detail-btn:hover { color: var(--primary); }
.team-user-row.is-expanded .detail-btn { color: var(--primary); }

/* Uniform size for all Freigabe-Groups (chip + button) regardless of count */
.freigabe-group { min-width: 18rem; }
.freigabe-chip  { flex: 1; justify-content: center; }
.freigabe-btn   { min-width: 6.5rem; justify-content: center; }

/* Badge on buttons (e.g. abrechenbar count on "Abrechnung erstellen") */
.btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.4rem;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  line-height: 1;
}
.chip-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: filter var(--transition), transform var(--transition);
}
.chip-btn:hover { filter: brightness(0.96); }
.chip-btn:active { transform: translateY(1px); }

.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Status segment: connected pill [Eingereicht | ✓ | ✕] — Variant A */
.status-segment {
  display: inline-flex;
  align-items: stretch;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--warning-light);
  background: var(--bg-card);
  font-size: 0.78rem;
  line-height: 1;
}
.status-segment-label {
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  background: var(--warning-light);
  color: var(--warning);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.status-segment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 0 0.5rem;
  border: 0;
  border-right: 1px solid var(--warning-light);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1;
  transition: background 0.12s ease, color 0.12s ease;
}
.status-segment-btn.ok {
  color: var(--success);
}
.status-segment-btn.ok:hover {
  background: var(--success-light);
}
.status-segment-btn.no {
  color: var(--danger);
}
.status-segment-btn.no:hover {
  background: var(--danger-light);
}
.status-segment-btn:active {
  transform: translateY(1px);
}
.status-segment-pending .status-segment-btn:last-child {
  border-right: 0;
}

/* Same-size status bubbles inside table Status column, centered horizontally */
.table td[data-label="Status"] {
  text-align: center;
}
.table td[data-label="Status"] .badge,
.table td[data-label="Status"] .status-segment {
  height: 26px;
  min-width: 96px;
  justify-content: center;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  font-size: 0.78rem;
}
.table td[data-label="Status"] .status-segment {
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 768px) {
  .table td[data-label="Status"] .badge,
  .table td[data-label="Status"] .status-segment {
    height: 36px;
    min-width: 110px;
    font-size: 0.88rem;
  }
}

.oefi-num {
  cursor: help;
  border-bottom: 1px dotted var(--border);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.oefi-num::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: normal;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: min(320px, 90vw);
  white-space: normal;
  text-align: left;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  width: max-content;
}
.oefi-num:hover::after,
.oefi-num:focus-visible::after {
  opacity: 1;
  transition-delay: 60ms;
}

/* --- Master toolbar (tabs + person-chips + search) — mockup version-a filter-bar --- */
.master-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 1.75rem;
  margin: 0 -1.75rem 0 -1.75rem;
}

.master-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.status-tabs {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.status-tab {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.32rem 0.8rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}
.status-tab:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--primary);
}
.status-tab.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.master-search {
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  padding: 0.3rem 0.65rem;
  height: 32px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  width: 260px;
  max-width: 100%;
  flex: 0 1 260px;
  margin-left: auto;
  transition: border-color var(--transition);
}
.master-search:focus {
  outline: none;
  border-color: var(--primary);
}

/* --- Person chips --- */
.person-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.person-chips-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 0.1rem;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.person-chip:hover {
  background: var(--info-light);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}
.person-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
  font-weight: 600;
}

.person-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--warning);
  color: #fff;
  border-radius: 999px;
}
.person-chip.active .person-chip-badge {
  background: rgba(255,255,255,0.3);
}
.person-chip-badge.chip-count-zero {
  background: var(--border);
  color: var(--text-muted);
}

.person-initials {
  font-weight: 700;
  color: var(--primary-dark);
}

/* Sortable table headers */
.table th.sortable-th {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background var(--transition), color var(--transition);
}
.table th.sortable-th:hover {
  background: var(--bg-hover);
  color: var(--primary-dark);
}
.table th.sortable-th::after {
  content: '↕';
  opacity: 0.25;
  font-size: 0.75em;
  margin-left: 0.3em;
  display: inline-block;
}
.table th.sortable-th.is-sorted { color: var(--primary-dark); }
.table th.sortable-th.is-sorted::after { opacity: 1; color: var(--primary); }
.table th.sortable-th.sort-asc::after  { content: '▲'; }
.table th.sortable-th.sort-desc::after { content: '▼'; }

/* Credentials-Dialog rows */
.cred-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.cred-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 5.5rem;
}
.cred-value {
  flex: 1;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  user-select: all;
}

/* Round coloured Kürzel pill — same colour everywhere for the same user */
.kuerzel-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 1.55rem;
  padding: 0 0.55rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}

/* --- Bulk action bar --- */
.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--info-light);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  position: sticky;
  top: calc(var(--header-h) + 0.5rem);
  z-index: 50;
}

.bulk-action-bar.hidden { display: none; }

.bulk-count {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
}

.bulk-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Upload toggle --- */
.upload-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

.upload-toggle-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: none;
  border: none;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.upload-toggle-trigger:hover { background: var(--bg-hover); }

.upload-toggle-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.upload-toggle-body {
  border-top: 1px solid var(--border-light);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.upload-toggle-body.hidden { display: none; }

.upload-person-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.upload-person-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.upload-person-sel {
  min-width: 220px;
  flex: 1;
}

/* Drop zone (reused from mitarbeiter-home) */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--bg);
}
.drop-zone:hover,
.drop-zone:focus,
.drop-zone.dragover {
  border-color: var(--primary);
  background: var(--info-light);
  outline: none;
}
.drop-zone p { margin-bottom: 0.75rem; }
.drop-zone-buttons { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }

/* --- Inline row edit (cells stay in place) --- */
.editing-row td {
  background: var(--info-light) !important;
  padding: 0.3rem 0.35rem !important;
}
.editing-row { }

.inline-input {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.3rem 0.35rem;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
}
.inline-input-right { text-align: right; }
.inline-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.12);
}
/* Hide native date/select icons for compact inline edit to prevent column expansion */
.editing-row input[type="date"].inline-input::-webkit-calendar-picker-indicator {
  padding: 0;
  margin: 0;
  opacity: 0.5;
}
.editing-row select.inline-input {
  /* Force select to fit parent cell width even with long options */
  appearance: none;
  -webkit-appearance: none;
  padding-right: 0.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 8px) center, calc(100% - 4px) center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

/* --- Undo toast --- */
.undo-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-md);
  min-width: 260px;
  overflow: hidden;
}

.undo-toast-msg {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
}

.undo-toast-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-light);
  background: none;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.undo-toast-btn:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.undo-toast-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary-light);
  width: 100%;
  transition: width 100ms linear;
}

/* ============================================================
   Phase 3 — Team & Vorschüsse
   ============================================================ */

.team-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
}

.team-user-row {
  transition: background var(--transition);
}
.team-user-row:hover {
  background: var(--bg-hover, #f0fdfa);
}

/* Inline sub-rows for Verrechnungsgeld detail — share main table columns */
/* Parent user-row: when expanded, bottom border is removed so it flows into sub-rows */
.team-user-row.is-expanded > td {
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

.team-vs-row > td {
  background: rgba(8, 145, 178, 0.04) !important;
  border-top: 0;
  border-bottom: 0;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 0.82rem;
}
.team-vs-row > td:first-child {
  border-left: 3px solid var(--primary);
}
.team-user-row.is-expanded + .team-vs-row > td {
  padding-top: 0.5rem;
}
.team-vs-row:hover > td { background: rgba(8, 145, 178, 0.08) !important; }

/* Close the expanded block below the last sub-row */
.team-vs-row.is-group-last > td {
  border-bottom: 1px solid var(--border-light) !important;
  padding-bottom: 0.55rem;
}

/* Plus prefix on each line item */
.vs-plus {
  color: var(--text-muted);
  margin-right: 0.25rem;
  opacity: 0.6;
  font-weight: 500;
}

.vs-info-cell {
  color: var(--text);
  white-space: normal;
  padding-left: 0.3rem;
}
.vs-info-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.vs-date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.vs-sep { color: var(--border); }
.vs-zweck { color: var(--text); }
.vs-notiz {
  color: var(--text-muted);
  font-style: italic;
}
.vs-notiz-label {
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-dark, #0e7490);
  opacity: 0.75;
}
.vs-betrag-cell {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.vs-pay {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
}
.vs-msg-cell {
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Saldo color coding */
.saldo-positive {
  color: var(--danger, #dc2626);
  font-weight: 600;
}
.saldo-negative {
  color: var(--success, #16a34a);
  font-weight: 600;
}
.saldo-zero {
  color: var(--text-muted, #6b7280);
}

/* Charts row */
.master-charts-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.master-chart-box {
  flex: 1 1 280px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

/* Abrechnung Wizard */
.abrechnung-wizard {
  max-width: 640px;
  width: 100%;
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.wizard-step {
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.wizard-step-active {
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-bg, #ecfeff);
}

.wizard-step-done {
  color: var(--success, #16a34a);
}

.wizard-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* --- Phase 4: Abrechnungen Table --- */
.abrechnungen-table th,
.abrechnungen-table td {
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  vertical-align: middle;
}

/* Status badges for Abrechnungen */
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge-erstellt {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-badge-festgeschrieben {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-badge-aufgeloest {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Small inline action buttons */
.btn-xs {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

/* Allow .btn + .btn-xs to compose */
.btn.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .master-container { padding: 1rem; }
  .master-toolbar { padding: 0.6rem 1rem; margin: 0 -1rem 0 -1rem; }
  .master-toolbar-row { flex-direction: column; align-items: stretch; }
  .master-search { width: 100%; }
  .bulk-action-bar { position: static; }
  .upload-toggle-body { padding: 0.75rem; }
  .master-charts-row { flex-direction: column; }
  .master-chart-box { flex: 1 1 auto; }

  /* Stack master-container tables as cards (like Schuhschachtel mobile pattern) */
  .master-container .table-wrapper {
    margin: 0;
    padding: 0.75rem 0;
    overflow-x: visible;
    max-height: none;
    overflow-y: visible;
  }
  .master-container .table thead th { position: static; }
  .master-container .table,
  .master-container .table thead,
  .master-container .table tbody,
  .master-container .table tr,
  .master-container .table td {
    display: block;
    width: 100%;
  }
  .master-container .table thead {
    display: none;
  }
  .master-container .table tr {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.6rem;
    background: var(--bg-card);
  }
  .master-container .table tr:hover {
    background: var(--bg-card);
  }
  .master-container .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border: 0;
    text-align: right;
  }
  .master-container .table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    text-align: left;
  }
  .master-container .table td[data-label=""] {
    justify-content: flex-end;
  }
  .master-container .table td[data-label=""]::before {
    content: none;
  }
  .master-container .table td.action-cell {
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-light);
    margin-top: 0.2rem;
  }
  .master-container .table td.action-cell::before {
    content: none;
  }
  .master-container .table td.table-empty {
    justify-content: center;
    text-align: center;
  }
  .master-container .table td.table-empty::before {
    content: none;
  }
  .master-container .table .row-actions {
    flex-wrap: wrap;
  }
  .master-container .table .row-actions button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .status-segment {
    height: 36px;
    font-size: 0.88rem;
  }
  .status-segment-btn {
    min-width: 40px;
    font-size: 1rem;
  }
}
