/* KMUNGO-Dialog Portal — Palette aus kmungo.com (km-main.css, 01. BASE & DESIGN TOKENS) */
:root {
  --kd-bg: #050d1a;
  --kd-surface: #091528;
  --kd-surface-2: #0e1f3d;
  --kd-border: #1a3557;
  --kd-text: #f8faff;
  --kd-text-muted: #c5d1e6;
  --kd-accent: #fc8b00;
  --kd-font: 'Inter', system-ui, sans-serif;
}

/* Eigenständige Seite (siehe KD_Portal::maybe_render_standalone): ganze
   Seite läuft im KMUNGO-Markendesign, nicht im Theme-Layout. */
html, body.kd-standalone-body {
  background: var(--kd-bg);
  margin: 0;
}

.kd-site-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  font-family: var(--kd-font);
  border-bottom: 1px solid var(--kd-border);
}

.kd-site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.kd-site-logo img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.kd-site-wordmark {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kd-text);
}

.kd-site-subtitle {
  color: var(--kd-accent);
  font-weight: 300;
}

.kd-platform-intro {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
  color: var(--kd-text-muted);
  font-family: var(--kd-font);
  font-size: 0.95rem;
}

.kd-login-gate,
.kd-admin-portal,
.kd-grid-single {
  font-family: var(--kd-font);
  color: var(--kd-text);
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.kd-login-gate h2 {
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.kd-login-gate > p {
  color: var(--kd-text-muted);
  margin-bottom: 1.75rem;
}

.kd-hinweis {
  color: var(--kd-text-muted);
}

.kd-login-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.kd-login-col {
  flex: 1 1 420px;
}

.kd-login-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.9;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .kd-login-layout {
    flex-direction: column-reverse;
  }
  .kd-login-logo {
    width: 96px;
    height: 96px;
  }
}

.kd-login-form {
  display: grid;
  gap: 1.25rem;
  max-width: 420px;
}

.kd-field {
  display: grid;
  gap: 0.4rem;
}

.kd-field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kd-text-muted);
}

.kd-login-gate input[type="text"],
.kd-login-gate input[type="password"],
.kd-search input[type="search"] {
  background: var(--kd-surface);
  border: 1px solid var(--kd-border);
  color: var(--kd-text);
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  font-family: var(--kd-font);
  font-size: 1rem;
  width: 100%;
}

.kd-login-gate input[type="text"]:focus,
.kd-login-gate input[type="password"]:focus {
  outline: none;
  border-color: var(--kd-accent);
}

.kd-password-wrap {
  position: relative;
  display: flex;
}

.kd-password-wrap input {
  padding-right: 2.75rem;
}

.kd-password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.4rem;
  opacity: 0.7;
}

.kd-password-toggle:hover {
  opacity: 1;
}

.kd-login-submit {
  justify-self: start;
  background: var(--kd-accent);
  color: #050d1a;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.kd-forgot-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--kd-text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.kd-forgot-link:hover {
  color: var(--kd-accent);
}

.kd-search button {
  background: var(--kd-accent);
  color: #050d1a;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.kd-logout-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.kd-logout-link {
  color: var(--kd-text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--kd-border);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
}

.kd-logout-link:hover {
  color: var(--kd-text);
  border-color: var(--kd-accent);
}

.kd-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.kd-search input[type="search"] {
  flex: 1;
}

.kd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.kd-kachel {
  background: var(--kd-surface);
  border: 1px solid var(--kd-border);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kd-firma {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.kd-kundennummer {
  color: var(--kd-text-muted);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

.kd-projekt {
  color: var(--kd-text-muted);
}

.kd-kontakt {
  color: var(--kd-text-muted);
  font-size: 0.9rem;
}

.kd-datei-link {
  margin-top: 0.5rem;
  color: var(--kd-accent);
  text-decoration: none;
  font-weight: 600;
}

.kd-datei-link:hover {
  text-decoration: underline;
}
