/* ic-auth / IvaltiCare-Portal — gemeinsamer interner Look: dunkel, warm, Gold-Akzent
   (identische Tokens wie VideoToText; Brücke zwischen IvaltiCare #c8a24c und MilesClub #c9a45c) */

:root {
  --bg: #12100c;
  --bg-raise: #1b1811;
  --bg-panel: #201c14;
  --ink: #f0ead9;
  --ink-dim: #a89e88;
  --faint: #6f6650;
  --gold: #c9a45c;
  --gold-2: #e6cf94;
  --border: rgba(201, 164, 92, .22);
  --error: #e07a5f;
  --ok: #8fbf7f;
  --warn: #e0b45f;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #262013 0%, var(--bg) 60%);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

h1, h2 { font-weight: 600; letter-spacing: .01em; }
code { color: var(--gold-2); }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(400px, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.brand { text-align: center; margin-bottom: 24px; }
.brand-mark { font-size: 40px; display: block; }
.brand h1 { margin: 8px 0 2px; font-size: 26px; }
.tagline { color: var(--ink-dim); font-size: 14px; margin: 0; }
.login-card label { display: block; margin: 14px 0 6px; color: var(--ink-dim); font-size: 14px; }
.login-card input {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-raise); color: var(--ink);
  font-size: 16px;
}
.login-card input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.error { color: var(--error); font-size: 14px; margin: 10px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-raise); color: var(--ink);
  padding: 9px 16px; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #a9843f);
  border-color: transparent; color: #171205; font-weight: 600;
}
.btn-ghost { background: transparent; }
.btn-block { width: 100%; margin-top: 18px; padding: 12px; font-size: 16px; }
form.inline { display: inline; margin: 0; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: rgba(18, 16, 12, .8); position: sticky; top: 0; backdrop-filter: blur(8px);
}
.brand-line { display: flex; align-items: baseline; gap: 10px; }
.brand-line .brand-mark { font-size: 22px; }
.brand-name { font-size: 19px; font-weight: 700; color: var(--gold-2); }
.topbar .tagline { font-size: 13px; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.user-name { font-weight: 600; }
.user-role { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Portal / Kacheln ---------- */
.portal { max-width: 1200px; margin: 0 auto; padding: 24px; }
.section-title { font-size: 13px; color: var(--ink-dim); margin: 26px 0 10px; text-transform: uppercase; letter-spacing: .1em; }
.category:first-child .section-title { margin-top: 6px; }
.tiles {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tile {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; color: inherit; text-decoration: none; min-height: 132px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.tile-head { display: flex; justify-content: space-between; align-items: center; }
.tile-icon { font-size: 28px; line-height: 1; }
.tile-name { font-size: 17px; font-weight: 600; }
.tile-desc { color: var(--ink-dim); font-size: 13.5px; flex: 1; }
.tile-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--faint); margin-top: 4px; }
.tile-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.badge {
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
  color: var(--gold-2); font-size: 10.5px; letter-spacing: .08em;
}

.dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--faint); box-shadow: 0 0 0 3px rgba(255,255,255,.04);
  vertical-align: middle;
}
.dot-green  { background: var(--ok);    box-shadow: 0 0 0 3px rgba(143,191,127,.18); }
.dot-yellow { background: var(--warn);  box-shadow: 0 0 0 3px rgba(224,180,95,.18); }
.dot-red    { background: var(--error); box-shadow: 0 0 0 3px rgba(224,122,95,.22); }
.dot-unknown { background: var(--faint); animation: pulse 1.4s ease-in-out infinite; }
.dot-none   { background: transparent; border: 1px dashed var(--faint); box-shadow: none; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.footnote { color: var(--faint); font-size: 12.5px; margin-top: 30px; }
.empty-hint { color: var(--faint); font-size: 14px; }

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .topbar .tagline { display: none; }
  .portal { padding: 16px; }
}

/* ---------- Hinweise, Formulare, Verwaltung ---------- */
.hint { text-align: center; margin: 18px 0 0; font-size: 14px; }
.hint a, .footnote a { color: var(--gold); text-decoration: none; }
.hint a:hover { text-decoration: underline; }
.muted { color: var(--ink-dim); font-size: 14px; margin: 8px 0 0; }
.notice { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; border: 1px solid var(--border); background: var(--bg-raise); }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin: 0; }
.notice-ok { border-color: rgba(143, 191, 127, .45); }
.notice-error { border-color: rgba(224, 122, 95, .5); color: #f2c6b8; }
.linkbox { border: 1px solid var(--gold); border-radius: 12px; padding: 14px 16px; margin: 0 0 22px; background: rgba(201, 164, 92, .08); }
.linkbox-head { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.linkbox-input { width: 100%; font: 13px/1.4 ui-monospace, Consolas, monospace; color: var(--gold-2); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.admin { max-width: 1040px; margin: 0 auto; padding: 24px 24px 48px; }
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid rgba(201, 164, 92, .1); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.actions { white-space: nowrap; }
.actions form { margin-right: 6px; }
.btn-small { padding: 5px 10px; font-size: 13px; }
.btn-danger:hover { border-color: var(--error); color: var(--error); }
.form-grid { display: grid; gap: 6px; }
.form-grid label { margin-top: 8px; }
.form-grid .btn { margin-top: 14px; justify-self: start; }
select { background: var(--bg); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; }
.admin input[type="text"], .admin input[type="password"] { width: 100%; }
.input-inline { width: 220px; max-width: 100%; font: 14px/1.4 inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.email-form { display: inline-flex; gap: 6px; align-items: center; }