/* 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;
}

.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"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #C9DEF0;
  border-radius: 8px;
  background: #fff;
  color: #16324A;
}

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; }

.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;
}
