/* Federleicht – Design-Token
   Himmel  #3D8FD1   (Primär, Links, Buttons)
   Tinte   #16324A   (Text)
   Dunst   #EAF3FB   (Flächen, Zebra)
   Gold    #F2B04A   (einziger Akzent: die Link-Öse)
   Papier  #F5FAFE   (Seitenhintergrund)                                   */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #F5FAFE;
  color: #16324A;
  font-family: "Seravek", "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

/* Kopfzeile ------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #DCE9F5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.logo { width: 34px; height: 34px; }

.wordmark {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a { color: #3D8FD1; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.whoami { color: #5E7B94; }

/* Inhalt ---------------------------------------------------------------- */

main {
  flex: 1;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Dashboard: zwei Spalten, mehr Browser-Breite ---------------------------- */

main.wide { max-width: 90rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 62rem) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.dash-side .addon-card {
  flex-direction: column;
  align-items: stretch;
}

.dash-side .token-row input { min-width: 0; flex-basis: 100%; }

.card {
  background: #fff;
  border: 1px solid #DCE9F5;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 18px rgba(61, 143, 209, 0.07);
}

h1, h2 { margin: 0 0 0.5rem; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }

.hint { color: #5E7B94; margin: 0 0 1rem; }

/* Token ----------------------------------------------------------------- */

.token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.token-row input {
  flex: 1;
  min-width: 16rem;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  color: #16324A;
  background: #EAF3FB;
  border: 1px solid #C9DEF0;
  border-radius: 8px;
}

/* Formulare & Buttons ---------------------------------------------------- */

label { display: block; margin: 0.9rem 0 0.3rem; font-weight: 600; }

input[type="text"], input[type="password"], input[type="email"], input[type="file"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #C9DEF0;
  border-radius: 8px;
  background: #fff;
  color: #16324A;
}

.upload-submit { margin-top: 1.1rem; }

/* Drop-Fläche zum Hochladen ---------------------------------------------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.25rem;
  padding: 2rem 1.5rem;
  border: 2px dashed #C9DEF0;
  border-radius: 12px;
  background: #F5FAFE;
  color: #5E7B94;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #3D8FD1;
  background: #EAF3FB;
}

.dropzone.dragover { border-style: solid; }

.dropzone:focus-within {
  outline: 2px solid #3D8FD1;
  outline-offset: 1px;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.dz-icon {
  width: 42px;
  height: 42px;
  color: #3D8FD1;
}

.dropzone.dragover .dz-icon { transform: translateY(-3px); }
@media (prefers-reduced-motion: no-preference) {
  .dz-icon { transition: transform 0.15s ease; }
}

.dz-text strong { color: #16324A; }

.dz-file {
  margin-top: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #EAF3FB;
  color: #16324A;
  font-size: 0.9rem;
  word-break: break-all;
}

.dropzone.has-file { border-color: #3D8FD1; }

.resend { margin-top: 1rem; text-align: center; }

button:disabled, button:disabled:hover {
  background: #9AB0C2;
  cursor: default;
}

button.linklike:disabled, button.linklike:disabled:hover {
  background: none;
  color: #9AB0C2;
  text-decoration: none;
}

/* Code-Eingabe: ein Kästchen pro Ziffer ---------------------------------- */

.code-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.code-inputs .code-digit {
  width: 3rem;
  height: 3.6rem;
  padding: 0;
  text-align: center;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}

input:focus, button:focus-visible {
  outline: 2px solid #3D8FD1;
  outline-offset: 1px;
}

button {
  font: inherit;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: #3D8FD1;
  color: #fff;
  cursor: pointer;
}
button:hover { background: #2E64B0; }

button.secondary {
  background: #EAF3FB;
  color: #16324A;
  border: 1px solid #C9DEF0;
}
button.secondary:hover { background: #DCE9F5; }

button.danger { color: #A33B2E; }

button.linklike {
  background: none;
  border: none;
  padding: 0;
  color: #3D8FD1;
}
button.linklike:hover { background: none; text-decoration: underline; }

/* Add-on-Download --------------------------------------------------------- */

.addon-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.addon-card .hint { margin-bottom: 0; }

.button-link {
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  background: #3D8FD1;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.button-link:hover { background: #2E64B0; }

/* Tabelle ---------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #EAF3FB;
  white-space: nowrap;
}

td.filename { white-space: normal; word-break: break-all; }
td.filename a { color: #3D8FD1; text-decoration: none; }
td.filename a:hover { text-decoration: underline; }

th { color: #5E7B94; font-weight: 600; font-size: 0.85rem; }

tr.expired td { color: #9AB0C2; }

.row-actions { display: flex; gap: 0.4rem; }
.row-actions form { margin: 0; }
.row-actions button { font-size: 0.85rem; padding: 0.35rem 0.7rem; }

.row-actions .button-link.secondary {
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  background: #EAF3FB;
  color: #16324A;
  border: 1px solid #C9DEF0;
}
.row-actions .button-link.secondary:hover { background: #DCE9F5; }

.lock { margin-left: 0.3rem; cursor: help; }

.empty { color: #5E7B94; }

/* Meldungen -------------------------------------------------------------- */

.flash {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin: 0 0 1.25rem;
}
.flash-success { background: #E4F4E6; color: #21572A; }
.flash-error { background: #F9E5E1; color: #7C2D21; }

/* Anmeldeseite & Hinweisseiten ------------------------------------------- */

.login-card {
  max-width: 24rem;
  margin: 3rem auto 0;
  text-align: center;
}

.login-card form { text-align: left; margin-top: 1rem; }
.login-card button[type="submit"] { width: 100%; margin-top: 1.25rem; }

.login-logo .logo { width: 72px; height: 72px; }

@media (prefers-reduced-motion: no-preference) {
  .login-logo .logo {
    animation: float 5s ease-in-out infinite;
  }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
}

.wordmark-large {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

/* Fußzeile --------------------------------------------------------------- */

.site-footer {
  text-align: center;
  color: #9AB0C2;
  font-size: 0.85rem;
  padding: 1rem;
}

.site-footer .legal-links {
  margin-top: 0.35rem;
}

.site-footer .legal-links a {
  color: #9AB0C2;
  text-decoration: underline;
}

.site-footer .legal-links a + a {
  margin-left: 0.75rem;
}
