* { box-sizing: border-box; }

:root {
  --bg: #f2f5f8;
  --card: #ffffff;
  --text: #14202e;
  --muted: #667085;
  --primary: #172554;
  --primary-2: #1e3a8a;
  --soft: #eef2ff;
  --border: #d0d5dd;
  --danger: #b42318;
  --warning-bg: #fff7ed;
  --warning-border: #fed7aa;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #dbeafe 0, transparent 36%), var(--bg);
  color: var(--text);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #0f766e);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.logo-mark.big {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 1.35rem;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; letter-spacing: -0.03em; }
h2 { letter-spacing: -0.02em; }
header p, .muted { color: var(--muted); margin-bottom: 0; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.clock {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(208,213,221,0.8);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 750;
  color: var(--primary);
  white-space: nowrap;
}

.card, .stat-card, .warning {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(20, 30, 50, 0.08);
  margin-bottom: 18px;
}

.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.auth-card {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.grid, .analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 650;
  color: #344054;
  margin-bottom: 14px;
}

input, select, textarea {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 12px;
  background: white;
  min-width: 0;
}

textarea { resize: vertical; }

button {
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  background: var(--primary);
  color: white;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

button:hover { opacity: 0.94; }
button:active { transform: scale(0.98); }
button.secondary { background: #e5e7eb; color: #111827; }
button.danger { background: var(--danger); }

.actions, .list-header, .header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.list-header { justify-content: space-between; }

.user-email {
  color: #475467;
  font-size: 0.95rem;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  background: rgba(255,255,255,0.8);
  color: var(--primary);
  border: 1px solid rgba(208,213,221,0.8);
  white-space: nowrap;
}

.tab.active {
  background: var(--primary);
  color: white;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.stat-card { margin-bottom: 18px; }
.stat-card span { color: var(--muted); display: block; margin-bottom: 8px; font-size: 0.94rem; }
.stat-card strong { font-size: 2rem; letter-spacing: -0.04em; }

ul { padding-left: 18px; margin-bottom: 0; }
li { margin-bottom: 6px; }
.empty { color: var(--muted); padding: 12px 0; }

.einsatz {
  border: 1px solid #eaecf0;
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
  display: grid;
  gap: 8px;
  background: white;
}

.einsatz-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  background: var(--soft);
  color: var(--primary-2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.9rem;
  font-weight: 650;
}

.small { color: var(--muted); font-size: 0.95rem; }
.message { margin-top: 12px; color: #344054; }
.hidden { display: none !important; }

code {
  background: #f2f4f7;
  padding: 2px 5px;
  border-radius: 6px;
}

@media (max-width: 1050px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid, .analysis-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .app { padding: 14px; }
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
  .brand { align-items: flex-start; }
  .topbar-right {
    align-items: stretch;
    justify-content: flex-start;
  }
  .grid, .analysis-grid, .stats { grid-template-columns: 1fr; }
  .list-header, .stack-mobile {
    align-items: stretch;
    flex-direction: column;
  }
  .einsatz-top {
    flex-direction: column;
  }
  button, input, select, textarea {
    width: 100%;
  }
  .clock { text-align: center; }
}
