/* Einsatztagebuch-Styles — nutzt ausschließlich kanonische Design-Token */

/* ── Page Layout ──────────────────────────────────────────── */
.et-page {
  color: var(--t1);
  min-height: calc(100vh - 160px);
  padding: clamp(20px, 4vw, 40px);
}

.et-container {
  max-width: 1100px;
  margin: 0 auto;
}

.et-container-narrow {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
}

/* ── Header ───────────────────────────────────────────────── */
.et-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.et-header h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.et-header p {
  margin: 4px 0 0;
  color: var(--t2);
  font-size: 14px;
}

.et-clock {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

/* ── Card ─────────────────────────────────────────────────── */
.et-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.et-card h3 {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 700;
}

/* ── Grid ──────────────────────────────────────────────────── */
.et-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

/* ── Form ─────────────────────────────────────────────────── */
.et-form-group {
  margin-bottom: 16px;
}

.et-form-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--t1);
}

.et-form-group .req {
  color: var(--danger);
}

.et-form-group input,
.et-form-group select,
.et-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--bg-app);
  color: var(--t1);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.et-form-group input:focus,
.et-form-group select:focus,
.et-form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.et-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 600px) {
  .et-form-row { grid-template-columns: 1fr; }
}

.et-form-row .et-form-group {
  margin-bottom: 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.et-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--t1);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
  white-space: nowrap;
}

.et-btn:hover {
  background: var(--bg-app);
}

.et-btn:active {
  transform: scale(0.99);
}

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

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

.et-btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.et-btn-danger:hover {
  background: var(--danger-text);
}

.et-btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  min-height: 32px;
}

.et-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.et-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Centered narrow card (Neu) ────────────────────────────── */
.et-card-centered {
  text-align: center;
}

.et-card-centered h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.et-card-centered .subtitle {
  color: var(--t2);
  margin-bottom: 28px;
  font-size: 14px;
}

.et-card-centered form {
  text-align: left;
}

/* ── Badges ───────────────────────────────────────────────── */
.et-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-xl);
  font-size: 12px;
  font-weight: 700;
}

.et-badge-active {
  background: var(--brand-light);
  color: var(--brand);
}

.et-badge-finalized {
  background: var(--success-bg);
  color: var(--success);
}

/* ── Alerts ───────────────────────────────────────────────── */
.et-alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  margin-bottom: 20px;
}

.et-alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

/* ── Vehicle Rows ─────────────────────────────────────────── */
.et-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-app);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  gap: 12px;
}

.et-row:last-child {
  margin-bottom: 0;
}

.et-row .et-status {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand);
}

.et-row .et-form-group {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.et-row .et-form-group select {
  min-width: 140px;
  width: auto;
}

.et-add-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.et-add-form input {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--bg-app);
  color: var(--t1);
  box-sizing: border-box;
}

.et-add-form button {
  flex: 0 0 auto;
}

/* ── Timeline ──────────────────────────────────────────────── */
.et-timeline-entry {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.et-timeline-entry:last-child {
  border-bottom: none;
}

.et-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand);
  min-width: 110px;
  font-size: 14px;
  flex-shrink: 0;
}

.et-timeline-content {
  flex: 1;
}

.et-hash {
  font-size: 11px;
  color: var(--t2);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.et-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--t2);
}

/* ── Data Table ───────────────────────────────────────────── */
.et-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.et-table th,
.et-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.et-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--t2);
  font-weight: 700;
}

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

.et-table tr:hover td {
  background: var(--brand-light);
}

.text-right {
  text-align: right;
}

/* ── Map ──────────────────────────────────────────────────── */
.et-map {
  height: 260px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-app);
}

.et-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.et-map-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--t2);
}

/* ── Modal ────────────────────────────────────────────────── */
.et-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.et-modal {
  max-width: 460px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.et-modal h3 {
  margin: 0 0 18px;
}

.et-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ── Entry form actions ───────────────────────────────────── */
.et-entry-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.et-record-status {
  font-size: 13px;
  color: var(--t2);
}
