/* Roboto Fonts */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../uploads/fonts/Roboto-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../../uploads/fonts/Roboto-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../uploads/fonts/Roboto-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../../uploads/fonts/Roboto-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../../uploads/fonts/Roboto-ExtraBold.woff2') format('woff2');
}

:root {
  --bg-page: #dbefe1;
  --bg-card: #cce7f1;
  --text: #0b0b0b;
  --muted: #2c2c2c;
  --ring: #5aa8c2;
  --border: #9ec7d6;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --warn: #c62828;
  --ok: #2e7d32;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrapper {
  max-width: 1200px;
  margin: clamp(16px, 4vw, 48px) auto;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 32px);
  align-items: center;
}

header {
  text-align: center;
}
header img {
  width: clamp(72px, 12vw, 120px);
  height: auto;
  display: block;
  margin: 8px auto 6px;
  user-select: none;
}
h1 {
  margin: .25rem 0 0;
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .2px;
}
.subtitle {
  margin-top: 4px;
  font-weight: 500;
  color: var(--muted);
}

/* Card / Fieldset */
fieldset.card {
  width: 100%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 28px);
  box-shadow: var(--shadow);
  box-sizing: border-box;
  margin: 0;
}
legend {
  padding: 0 .4rem;
  margin-left: .25rem;
}
legend h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 700;
  color: #0f3c4c;
}

/* Inputs / Formularelemente */
input, textarea, button, select {
  font: inherit;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--border);
  box-sizing: border-box;
  background: #fff;
}
input::placeholder { color: #7e8a90; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 4px rgba(90,168,194,.15);
}

/* Buttons */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: fit-content;
  min-height: 48px;
  padding: 10px 22px;
  margin-top: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
  border: 0;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
button:active { transform: translateY(0); box-shadow: var(--shadow); }
button:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

.hidden { display: none !important; }

/* Logout-Button */
.btn-logout {
  margin-left: auto;
  background: #fefefe;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.btn-logout:hover {
  background: #ffeaea;
  border-color: #ffbcbc;
  color: var(--warn);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.pill.warn { background: #ffebee; border-color: #ffcdd2; color: var(--warn); font-weight: 600; }
.pill.ok   { background: #e8f5e9; border-color: #c8e6c9; color: var(--ok); font-weight: 600; }

/* Tabs + Panels */
.tab-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.desktop-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  padding: 0 4px;
  margin-bottom: -2px;
  scrollbar-width: none;
}
.desktop-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 10px 18px;
  cursor: pointer;
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: #f5f5f5;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.tab:hover { background: #fff; color: var(--text); }
.tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  border-color: var(--border);
  position: relative;
  top: 2px;
}

.tab-panel-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 40px;
  box-sizing: border-box;
}

.panel { display: none; }
.panel.active { display: block; }

/* Tabelle */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.table th, .table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.table th {
  background: #f5fbfe;
  text-align: left;
  font-weight: 600;
}
.row-missing { background: #fff8f8; }

/* Footer */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}
footer small {
  display: block;
  margin-top: .25rem;
  font-size: .95rem;
}
footer a { color: inherit; text-underline-offset: 3px; }

/* Mobile Hamburger-Menü */
.mobile-tabs {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
}

.hamburger {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s ease;
}

.hamburger:hover {
  background: #f2f2f2;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-top: 8px;
  padding: 8px 0;
  width: 220px;
  z-index: 999;
}

.mobile-menu.show {
  display: block;
}

.mobile-menu .tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.mobile-menu .tab:hover {
  background: var(--bg-card);
}

/* Responsive Breakpoint */
@media (min-width: 768px) {
  .mobile-tabs {
    display: none;
  }
  .desktop-tabs {
    display: flex;
  }
  .mobile-menu {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}