/* ============================================================
   TT Zeiterfassung – Vorstand Übersicht
   Clean professional light theme matching Excel layout
   ============================================================ */

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

:root {
  --vst-bg:       #f4f6fa;
  --vst-surface:  #ffffff;
  --vst-border:   #dce1eb;
  --vst-ink:      #1a1f2e;
  --vst-muted:    #6b7280;
  --vst-accent:   #0f4c81;
  --vst-orange:   #e8521a;
  --vst-teal:     #009b7d;
  --vst-light:    #f0f3f8;
  --vst-radius:   10px;
}

.tt-vst-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

.tt-vst-wrap {
  font-family: 'DM Sans', -apple-system, sans-serif;
  color: var(--vst-ink);
  background: var(--vst-bg);
  border-radius: var(--vst-radius);
  padding: 24px;
  max-width: 1400px;
}

/* ---- Header ---- */
.tt-vst-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--vst-accent);
  flex-wrap: wrap;
  gap: 16px;
}
.tt-vst-header-left { display: flex; align-items: center; gap: 14px; }
.tt-vst-logo {
  font-size: 1.8rem;
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--vst-orange), #ff8c5a);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(232,82,26,.25);
}
.tt-vst-title    { font-size: 1.2rem; font-weight: 600; color: var(--vst-accent); }
.tt-vst-subtitle { font-size: .82rem; color: var(--vst-muted); margin-top: 2px; }

/* Nav */
.tt-vst-nav { display: flex; align-items: center; gap: 10px; }
.tt-vst-nav-btn {
  width: 36px; height: 36px;
  background: var(--vst-surface);
  border: 1px solid var(--vst-border);
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  color: var(--vst-ink);
}
.tt-vst-nav-btn:hover { background: var(--vst-accent); color: #fff; border-color: var(--vst-accent); }
.tt-vst-month-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--vst-accent);
  min-width: 160px;
  text-align: center;
}

/* ---- Summary Cards ---- */
.tt-vst-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.tt-vst-card {
  background: var(--vst-surface);
  border: 1px solid var(--vst-border);
  border-radius: var(--vst-radius);
  padding: 16px 20px;
  min-width: 160px;
  flex: 1;
  border-top: 3px solid var(--vst-accent);
  transition: box-shadow .2s;
}
.tt-vst-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.tt-vst-card-name {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--vst-muted);
  margin-bottom: 8px;
}
.tt-vst-card-role {
  font-size: .72rem;
  color: var(--vst-teal);
  font-weight: 500;
  margin-bottom: 8px;
}
.tt-vst-card-stunden {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--vst-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tt-vst-card-stunden span { font-size: .85rem; font-weight: 400; color: var(--vst-muted); }
.tt-vst-card-betrag {
  font-size: 1rem;
  font-weight: 600;
  color: var(--vst-accent);
  margin-top: 6px;
  font-family: 'DM Mono', monospace;
}
.tt-vst-card-satz {
  font-size: .75rem;
  color: var(--vst-muted);
  margin-top: 3px;
}

/* Total card */
.tt-vst-card--total {
  border-top-color: var(--vst-orange);
  background: linear-gradient(135deg, #fff8f6, #fff);
}
.tt-vst-card--total .tt-vst-card-stunden { color: var(--vst-orange); }
.tt-vst-card--total .tt-vst-card-betrag  { color: var(--vst-orange); }

/* ---- Table ---- */
.tt-vst-table-wrap {
  background: var(--vst-surface);
  border-radius: var(--vst-radius);
  border: 1px solid var(--vst-border);
  overflow-x: auto;
  margin-bottom: 20px;
}
.tt-vst-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 600px;
}
.tt-vst-table thead tr:first-child th {
  background: #dbeafe;
  color: #1e3a5f;
  padding: 12px 14px;
  text-align: center;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .3px;
  border-right: 1px solid #bfdbfe;
}
.tt-vst-table thead tr:first-child th:first-child,
.tt-vst-table thead tr:first-child th:nth-child(2) {
  text-align: left;
  background: #bfdbfe;
}
.tt-vst-table thead tr.tt-vst-subheader th {
  background: var(--vst-light);
  color: var(--vst-muted);
  padding: 8px 14px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 2px solid var(--vst-border);
  border-right: 1px solid var(--vst-border);
  text-align: center;
}
.tt-vst-table thead tr.tt-vst-subheader th:first-child,
.tt-vst-table thead tr.tt-vst-subheader th:nth-child(2) {
  text-align: left;
}

/* Rate row */
.tt-vst-rate-row td {
  background: #eef4fb;
  color: var(--vst-accent);
  font-size: .78rem;
  font-weight: 500;
  padding: 5px 14px;
  text-align: center;
  border-bottom: 1px solid var(--vst-border);
  border-right: 1px solid var(--vst-border);
}
.tt-vst-rate-row td:first-child { text-align: left; color: var(--vst-muted); }
.tt-vst-rate-row td:nth-child(2) { text-align: left; }

/* Body */
.tt-vst-table tbody tr { border-bottom: 1px solid var(--vst-border); transition: background .15s; }
.tt-vst-table tbody tr:hover { background: #f7f9fc; }
.tt-vst-table tbody tr.tt-vst-date-first td { border-top: 2px solid var(--vst-border); }
.tt-vst-table tbody td {
  padding: 9px 14px;
  border-right: 1px solid #eef0f4;
  font-variant-numeric: tabular-nums;
}
.tt-vst-table tbody td:last-child { border-right: none; }
.tt-vst-td-datum { font-weight: 600; font-size: .82rem; white-space: nowrap; }
.tt-vst-td-wt    { font-size: .75rem; color: var(--vst-muted); }
.tt-vst-td-einheit { color: var(--vst-ink); }
.tt-vst-td-num   { text-align: right; font-family: 'DM Mono', monospace; font-size: .8rem; }
.tt-vst-td-betrag { color: var(--vst-accent); font-weight: 500; }
.tt-vst-td-zero  { color: #ccc; text-align: right; font-size: .75rem; }
.tt-vst-td-total { font-weight: 700; text-align: right; font-family: 'DM Mono', monospace; color: var(--vst-orange); }

/* Typ badge — compact (T)/(M) */
.tt-vst-typ {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 4px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0;
}
.tt-vst-typ--t   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.tt-vst-typ--m   { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* Summary row */
.tt-vst-table tfoot tr td {
  background: var(--vst-accent);
  color: #fff;
  font-weight: 600;
  padding: 12px 14px;
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: .875rem;
  border-right: 1px solid rgba(255,255,255,.15);
}
.tt-vst-table tfoot tr td:first-child { text-align: left; font-family: 'DM Sans', sans-serif; }
.tt-vst-table tfoot tr td:nth-child(2) { text-align: left; font-family: 'DM Sans', sans-serif; }
.tt-vst-table tfoot td.tt-vst-foot-total { background: var(--vst-orange); color: #fff; }

/* Empty state */
.tt-vst-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--vst-muted);
  font-size: .95rem;
}

/* ---- Loading ---- */
.tt-vst-loading {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  padding: 32px;
  color: var(--vst-muted);
}
.tt-vst-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--vst-border);
  border-top-color: var(--vst-accent);
  border-radius: 50%;
  animation: vst-spin .7s linear infinite;
}
@keyframes vst-spin { to { transform: rotate(360deg); } }

/* ---- Footer ---- */
.tt-vst-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.tt-vst-print-btn, .tt-vst-excel-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  cursor: pointer;
  transition: background .2s;
}
.tt-vst-print-btn {
  background: var(--vst-accent);
  color: #fff;
}
.tt-vst-print-btn:hover { background: #0d3d6b; }
.tt-vst-excel-btn {
  background: #16a34a;
  color: #fff;
}
.tt-vst-excel-btn:hover { background: #15803d; }

/* ---- Trainer column colors ---- */
.tt-vst-col-0 { border-left: 3px solid #0f4c81 !important; }
.tt-vst-col-1 { border-left: 3px solid #009b7d !important; }
.tt-vst-col-2 { border-left: 3px solid #e8521a !important; }
.tt-vst-col-3 { border-left: 3px solid #7c3aed !important; }
.tt-vst-col-4 { border-left: 3px solid #d97706 !important; }
.tt-vst-card:nth-child(1) { border-top-color: #0f4c81; }
.tt-vst-card:nth-child(2) { border-top-color: #009b7d; }
.tt-vst-card:nth-child(3) { border-top-color: #e8521a; }
.tt-vst-card:nth-child(4) { border-top-color: #7c3aed; }
.tt-vst-card:nth-child(5) { border-top-color: #d97706; }

/* ---- Print ---- */
@media print {
  .tt-vst-footer,
  .tt-vst-nav { display: none !important; }
  .tt-vst-wrap { padding: 0; background: #fff; }
  .tt-vst-table { font-size: .75rem; }
  .tt-vst-table thead tr:first-child th {
    background: #dbeafe !important;
    color: #1e3a5f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .tt-vst-table tfoot tr td {
    background: #0f4c81 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .tt-vst-wrap { padding: 14px; }
  .tt-vst-header { flex-direction: column; align-items: stretch; }
  .tt-vst-nav { justify-content: space-between; }
  .tt-vst-cards { flex-direction: column; }
  .tt-vst-card { min-width: 0; }
}
