/* Praktikums-Tagebuch — Grundlayer (Variablen, body-Gradient, Inter) kommt aus /mein/style.css,
   das vor dieser Datei eingebunden wird. Hier nur die Seiten-Spezifika. */

.tb-wrap { max-width: 900px; margin: 0 auto; padding: 18px 16px 60px; }

.tb-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 6px; }
.tb-lead { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); max-width: 68ch; }

/* ===== Graue Kaesten (Haus-Standard) ===== */
.tb-box {
  background: rgba(127,127,135,.11);
  border: 1px solid rgba(127,127,135,.45);
  border-radius: 12px;
  margin-top: 18px;
  overflow: hidden;
}
.tb-box-kopf {
  background: rgba(127,127,135,.09);
  border-bottom: 1px solid rgba(127,127,135,.3);
  padding: 9px 14px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-secondary);
}
.tb-box-body { padding: 14px; }

.tb-adminbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; }
.tb-adminbar .tb-input { max-width: 300px; }

/* ===== Zaehlwerk ===== */
.tb-kacheln { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.tb-kachel {
  background: rgba(127,127,135,.11);
  border: 1px solid rgba(127,127,135,.45);
  border-radius: 12px; padding: 12px 10px; text-align: center;
}
.tb-k-zahl { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: var(--text-primary); }
.tb-k-zahl.tb-gut { color: var(--accent); }
.tb-k-txt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-secondary); margin-top: 2px; }

.tb-fortschritt {
  height: 8px; border-radius: 20px; margin-top: 10px; overflow: hidden;
  background: rgba(127,127,135,.2); border: 1px solid rgba(127,127,135,.35);
}
.tb-balken { height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }

/* ===== Formular ===== */
.tb-feldreihe { display: flex; gap: 12px; flex-wrap: wrap; }
.tb-feld { flex: 1 1 220px; margin-bottom: 12px; display: flex; flex-direction: column; }
.tb-feld-s { flex: 0 1 150px; }
.tb-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-secondary); margin-bottom: 5px; }
.tb-input {
  font-family: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 9px; padding: 10px 12px; min-height: 42px; width: 100%;
}
.tb-input:focus { outline: none; border-color: var(--accent); }
.tb-area { min-height: 76px; resize: vertical; line-height: 1.5; }

.tb-aktionen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.tb-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: var(--input-bg); color: var(--text-primary);
  border: 1px solid rgba(127,127,135,.45); border-radius: 9px;
  padding: 10px 16px; min-height: 42px;
}
.tb-btn:hover { background: var(--card-hover-bg); }
.tb-btn-p { background: var(--accent); border-color: var(--accent); color: #fff; }
.tb-btn-p:hover { filter: brightness(1.08); background: var(--accent); }
.tb-btn:disabled { opacity: .5; cursor: default; }
.tb-btn-mini { font-size: 12px; padding: 6px 10px; min-height: 40px; }

.tb-status { font-size: 12.5px; color: var(--text-secondary); }
.tb-status.tb-ok { color: var(--accent); }
.tb-status.tb-fehler { color: #d64545; }
[data-theme="dark"] .tb-status.tb-fehler { color: #ff7a7a; }

.tb-hint { font-size: 12px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }

/* ===== Tabellen (Haus-Standard mi-table) ===== */
.mi-tab-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: rgba(127,127,135,.11); border: 1px solid rgba(127,127,135,.45); border-radius: 12px; }
.mi-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mi-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-secondary); padding: 6px 10px; border-bottom: 1px solid rgba(127,127,135,.28); white-space: nowrap; }
.mi-table td { padding: 6px 10px; border-bottom: 1px solid rgba(127,127,135,.28); vertical-align: top; }
.mi-table th:not(:last-child), .mi-table td:not(:last-child) { border-right: 1px solid rgba(127,127,135,.45); }
.mi-table tr:last-child td { border-bottom: none; }

.tb-leer { color: var(--text-tertiary); font-style: italic; }
.tb-datum { font-weight: 600; white-space: nowrap; }
.tb-zeit { white-space: nowrap; color: var(--text-secondary); }
.tb-taet { min-width: 200px; }

.tb-badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; display: inline-block; }
.tb-badge.anwesend { background: rgba(4,179,214,.14); color: #04b3d6; }
.tb-badge.urlaub, .tb-badge.frei, .tb-badge.feiertag { background: rgba(127,127,135,.18); color: var(--text-secondary); }
.tb-badge.krank { background: rgba(214,69,69,.14); color: #d64545; }
.tb-badge.hochschule { background: rgba(120,90,220,.16); color: #6f5bd0; }
[data-theme="dark"] .tb-badge.krank { color: #ff7a7a; }
[data-theme="dark"] .tb-badge.hochschule { color: #a08cf0; }

.tb-schloss { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.tb-frei-ja { color: var(--accent); font-weight: 600; }

.hidden { display: none !important; }

@media (max-width: 700px) {
  .tb-wrap { padding: 14px 12px 50px; }
  .tb-head h1 { font-size: 22px; }
  .tb-kacheln { grid-template-columns: repeat(2, 1fr); }
  .tb-feld, .tb-feld-s { flex: 1 1 100%; }
  .tb-adminbar .tb-input { max-width: 100%; }
}

/* Warnungen (Luecken, Soll nicht erreichbar) und Wochen-Vollstaendigkeit */
.tb-warn {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(214,69,69,.10); border: 1px solid rgba(214,69,69,.40);
  font-size: 12.5px; line-height: 1.55; color: var(--text-primary);
}
.tb-warn b { font-weight: 700; }
.tb-luecke { font-size: 11px; font-weight: 700; color: #d64545; white-space: nowrap; }
.tb-vollstaendig { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
[data-theme="dark"] .tb-luecke { color: #ff7a7a; }

/* Nachtragen fuer jemand anderen (Admin) */
.tb-fremd {
  margin-bottom: 12px; padding: 9px 12px; border-radius: 10px;
  background: rgba(4,179,214,.10); border: 1px solid rgba(4,179,214,.40);
  font-size: 12.5px; line-height: 1.5; color: var(--text-primary);
}
.tb-vermerk { font-size: 10.5px; color: var(--text-tertiary); font-style: italic; }
