/*
 * Zentrales Gestaltungssystem des Mandantenportals.
 *
 * Grundlage für alle künftigen Portal-Ansichten: schlicht, modern, an Apple
 * angelehnt – viel Weißraum, klare Typografie, dezente Schatten, runde Ecken,
 * ruhige helle Grundfläche. Das Kanzlei-Magenta (#C4297B) ist ein gezielter
 * Akzent (Buttons, aktive Elemente, Hervorhebungen), nie flächig.
 * Seriös/aufgeräumt im Sinne von „MyDATEV".
 *
 * Verwendung: über templates/basis.html eingebunden; Bausteine sind als
 * .portal-* Klassen wiederverwendbar.
 */

:root {
  /* Marke / Akzent */
  --portal-akzent: #C4297B;          /* Kanzlei-Magenta */
  --portal-akzent-dunkel: #a01f64;
  --portal-akzent-zart: #fbe9f2;     /* sehr helle Magenta-Fläche */
  --portal-mandant: #4E8A12;         /* Grün (Herkunft Mandant / Erfolg) */

  /* Grundflächen / Text */
  --portal-bg: #f5f5f7;              /* ruhige helle Grundfläche */
  --portal-flaeche: #ffffff;
  --portal-flaeche-2: #fafafa;
  --portal-text: #1d1d1f;
  --portal-text-leise: #6e6e73;
  --portal-linie: #e5e5ea;

  /* Status */
  --portal-warn: #b00020;
  --portal-warn-zart: #fdecee;
  --portal-erfolg: #2d5a0f;
  --portal-erfolg-zart: #e7f4e4;

  /* Form */
  --portal-radius: 10px;
  --portal-radius-gross: 16px;
  --portal-radius-pille: 980px;
  --portal-schatten: 0 1px 2px rgba(0, 0, 0, .04);
  --portal-schatten-hover: 0 4px 16px rgba(0, 0, 0, .08);

  --portal-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body.portal {
  font-family: var(--portal-font);
  background: var(--portal-bg);
  color: var(--portal-text);
  margin: 0;
  padding: 0;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* --- Kopfzeile ----------------------------------------------------------- */
.portal-topbar {
  background: var(--portal-flaeche);
  border-bottom: 1px solid var(--portal-linie);
  padding: .9rem 1.25rem;
}
.portal-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.portal-marke {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  color: var(--portal-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.portal-marke .punkt {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--portal-akzent);
  display: inline-block;
}
.portal-topnav { display: flex; gap: .35rem; flex-wrap: wrap; }

/* --- Seitenrahmen -------------------------------------------------------- */
.portal-seite { max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.portal-schmal { max-width: 680px; }

.portal-zurueck {
  color: var(--portal-akzent);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
}
.portal-zurueck:hover { text-decoration: underline; }

h1.portal-titel { font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; margin: .5rem 0 .4rem; }
.portal-unterzeile { color: var(--portal-text-leise); margin: 0 0 1.75rem; }

/* --- Karten -------------------------------------------------------------- */
.portal-karte {
  background: var(--portal-flaeche);
  border-radius: var(--portal-radius-gross);
  padding: 1.5rem;
  box-shadow: var(--portal-schatten);
  margin-bottom: 1.5rem;
}
.portal-karte > h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
}
.portal-karte > h2:first-child { margin-top: 0; }

/* --- Buttons ------------------------------------------------------------- */
.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1;
  padding: .6rem 1.15rem;
  border-radius: var(--portal-radius-pille);
  border: 1px solid var(--portal-linie);
  background: var(--portal-flaeche);
  color: var(--portal-text);
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .04s ease;
  white-space: nowrap;
}
.portal-btn:hover { background: var(--portal-flaeche-2); }
.portal-btn:active { transform: translateY(1px); }

.portal-btn--primaer {
  background: var(--portal-akzent);
  border-color: var(--portal-akzent);
  color: #fff;
}
.portal-btn--primaer:hover { background: var(--portal-akzent-dunkel); border-color: var(--portal-akzent-dunkel); }

.portal-btn--gefahr { color: var(--portal-warn); border-color: var(--portal-linie); }
.portal-btn--gefahr:hover { background: var(--portal-warn-zart); border-color: var(--portal-warn); }

.portal-btn--klein { padding: .4rem .8rem; font-size: .82rem; }

/* --- Tabellen / Listen --------------------------------------------------- */
.portal-tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--portal-flaeche);
  border-radius: var(--portal-radius-gross);
  overflow: hidden;
  box-shadow: var(--portal-schatten);
}
.portal-tabelle th, .portal-tabelle td {
  text-align: left;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--portal-linie);
  font-size: .95rem;
  vertical-align: middle;
}
.portal-tabelle th {
  background: var(--portal-flaeche-2);
  font-weight: 600;
  color: var(--portal-text-leise);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.portal-tabelle tr:last-child td { border-bottom: none; }
.portal-tabelle tr.inaktiv td { opacity: .55; }
.portal-tabelle .rechts { text-align: right; white-space: nowrap; }

/* --- Pillen / Badges ----------------------------------------------------- */
.portal-pille {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: var(--portal-radius-pille);
  font-size: .76rem;
  font-weight: 600;
  border: 1px solid var(--portal-linie);
  color: var(--portal-text-leise);
  background: var(--portal-flaeche);
  white-space: nowrap;
}
.portal-pille--akzent { background: var(--portal-akzent); border-color: var(--portal-akzent); color: #fff; }
.portal-pille--erfolg { background: var(--portal-erfolg-zart); border-color: var(--portal-mandant); color: var(--portal-erfolg); }
.portal-pille--offen  { background: #fff6e6; border-color: #e0b15a; color: #8a5a00; }
.portal-pille--warn   { background: var(--portal-warn-zart); border-color: var(--portal-warn); color: var(--portal-warn); }
.portal-pille--leise  { color: var(--portal-text-leise); }

/* --- Formularfelder ------------------------------------------------------ */
.portal-feld { margin-bottom: 1.1rem; }
.portal-feld > label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--portal-text-leise);
  margin-bottom: .35rem;
}
.portal-input,
.portal-feld input[type=text],
.portal-feld input[type=email],
.portal-feld input[type=password],
.portal-feld input[type=number],
.portal-feld input[type=file],
.portal-feld select,
.portal-feld textarea {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--portal-linie);
  border-radius: var(--portal-radius);
  font-size: .95rem;
  font-family: inherit;
  background: var(--portal-flaeche);
  color: var(--portal-text);
}
.portal-feld textarea { resize: vertical; }
.portal-feld input:focus,
.portal-feld select:focus,
.portal-feld textarea:focus {
  outline: none;
  border-color: var(--portal-akzent);
  box-shadow: 0 0 0 3px rgba(196, 41, 123, .12);
}
.portal-feld .hinweis-text { font-size: .8rem; color: var(--portal-text-leise); margin-top: .3rem; }
.portal-fehler { color: var(--portal-warn); font-size: .85rem; margin-top: .3rem; }

.portal-check { display: flex; gap: .6rem; align-items: flex-start; }
.portal-check label { font-size: .95rem; }

.portal-aktionsleiste { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }

/* --- Meldungen / Hinweise ----------------------------------------------- */
.portal-meldungen { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.portal-meldung { padding: .75rem 1rem; border-radius: var(--portal-radius); font-size: .9rem; }
.portal-meldung.success { background: var(--portal-erfolg-zart); color: var(--portal-erfolg); }
.portal-meldung.error { background: var(--portal-warn-zart); color: var(--portal-warn); }

.portal-hinweis {
  background: var(--portal-akzent-zart);
  border: 1px solid #f0c8dd;
  border-radius: var(--portal-radius);
  padding: .8rem 1rem;
  font-size: .85rem;
  color: #6b2348;
}
.portal-erfolgsbox {
  background: var(--portal-erfolg-zart);
  border: 1px solid var(--portal-mandant);
  border-radius: var(--portal-radius);
  padding: .85rem 1rem;
  font-size: .9rem;
  color: var(--portal-erfolg);
}
.portal-warnbox {
  background: var(--portal-warn-zart);
  border: 1px solid var(--portal-warn);
  border-radius: var(--portal-radius);
  padding: .85rem 1rem;
  font-size: .9rem;
  color: var(--portal-warn);
}

.portal-leer { color: var(--portal-text-leise); text-align: center; padding: 3rem 1rem; }

/* --- Kleine Helfer ------------------------------------------------------- */
.portal-leise { color: var(--portal-text-leise); }
.portal-mono { font-variant-numeric: tabular-nums; }
.portal-trenner { height: 1px; background: var(--portal-linie); border: 0; margin: 1.25rem 0; }
form.portal-inline { display: inline; }
