/* Leka-Invest Portal — eigenständige Oberfläche auf Basis des Website-Designs. */

body.portal { background: var(--dark); color: #fff; }

.portal-shell { max-width: 1240px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

/* ---------- Kopfzeile ---------------------------------------------------- */
.p-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.p-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.p-brand .brand-mark { border-color: rgba(255, 255, 255, .4); color: #fff; width: 40px; height: 40px; }
.p-brand .brand-name { color: #fff; font-family: 'Playfair Display', serif; font-size: 21px; }
.p-brand .brand-sub { color: var(--accent); font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; }
.p-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-tools a, .p-tools button {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600;
  color: rgba(255, 255, 255, .78); background: transparent; border: 1px solid rgba(255, 255, 255, .2);
  padding: 9px 14px; border-radius: 2px; text-decoration: none; cursor: pointer; font-family: inherit;
  transition: border-color .25s, color .25s, background .25s;
}
.p-tools a:hover, .p-tools button:hover { color: #fff; border-color: var(--accent); }

.portal-lang { display: flex; gap: 2px; }
.portal-lang a {
  border: none; padding: 6px 7px; font-size: 11px; letter-spacing: 1.6px;
  color: rgba(255, 255, 255, .55);
}
.portal-lang a[aria-current="true"] { color: var(--accent); font-weight: 700; }

/* ---------- Anmeldung / Registrierung ------------------------------------ */
.auth-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: calc(100vh - 92px); }
.auth-visual {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(30px, 5vw, 64px); overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, .1);
}
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.auth-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 27, 42, .55) 0%, rgba(13, 27, 42, .95) 75%);
}
.auth-visual > * { position: relative; z-index: 2; }
.auth-visual h1 { font-size: clamp(30px, 4vw, 52px); line-height: 1.06; margin-bottom: 18px; }
.auth-visual h1 em { font-style: italic; color: var(--accent); }
.auth-visual p { color: rgba(255, 255, 255, .82); font-weight: 300; max-width: 46ch; }
.auth-list { margin-top: 26px; display: grid; gap: 10px; }
.auth-list li { list-style: none; color: rgba(255, 255, 255, .8); font-size: 14.5px; padding-left: 24px; position: relative; }
.auth-list li::before {
  content: ''; position: absolute; left: 0; top: 8px; width: 11px; height: 6px;
  border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg);
}

.auth-card { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px); }
.auth-card-inner { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 30px; margin-bottom: 8px; }
.auth-card .sub { color: rgba(255, 255, 255, .66); font-size: 14.5px; font-weight: 300; margin-bottom: 26px; }

.p-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.p-field label { font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: rgba(255, 255, 255, .6); font-weight: 600; }
.p-field input, .p-field select, .p-field textarea {
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; padding: 12px 14px; border-radius: 2px; font-family: inherit; font-size: 15px;
  transition: border-color .2s, background .2s;
}
.p-field input:focus, .p-field select:focus, .p-field textarea:focus {
  outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .07);
}
.p-field .hint { font-size: 12px; color: rgba(255, 255, 255, .45); }
.p-field .err { font-size: 12px; color: #ffb4a8; }

.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #16202b; border: 1px solid var(--accent);
  padding: 13px 22px; font-size: 11.5px; letter-spacing: 1.8px; text-transform: uppercase;
  font-weight: 700; cursor: pointer; border-radius: 2px; font-family: inherit;
  transition: background .25s, color .25s, border-color .25s;
}
.p-btn:hover { background: #fff; border-color: #fff; color: var(--dark); }
.p-btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.p-btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.p-btn.block { width: 100%; }
.p-btn[disabled] { opacity: .55; cursor: not-allowed; }

.p-switch { margin-top: 22px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.p-switch a { color: var(--accent); text-decoration: none; }
.p-note { margin-top: 22px; font-size: 12.5px; color: rgba(255, 255, 255, .45); line-height: 1.6; }

/* ---------- Konto -------------------------------------------------------- */
.p-main { display: grid; grid-template-columns: 232px 1fr; gap: clamp(24px, 4vw, 48px); padding: clamp(26px, 4vw, 48px) 0 64px; }
.p-nav { display: flex; flex-direction: column; gap: 4px; }
.p-nav button {
  text-align: left; background: transparent; border: none; border-left: 2px solid transparent;
  color: rgba(255, 255, 255, .66); font-family: inherit; font-size: 13.5px; letter-spacing: .4px;
  padding: 11px 14px; cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.p-nav button:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.p-nav button[aria-selected="true"] { color: #fff; border-left-color: var(--accent); background: rgba(255, 255, 255, .06); }
.p-nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 12px 0; }

.p-panel { min-width: 0; }
.p-panel h1 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 6px; }
.p-panel .lead { color: rgba(255, 255, 255, .64); font-weight: 300; margin-bottom: 28px; font-size: 15.5px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .12); margin-bottom: 28px; }
.kpi-box { background: var(--dark); padding: 22px 22px 24px; }
.kpi-box .l { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.kpi-box .v { font-family: 'Playfair Display', serif; font-size: clamp(24px, 2.6vw, 32px); margin-top: 8px; color: #fff; }
.kpi-box .s { font-size: 12px; color: rgba(255, 255, 255, .45); margin-top: 4px; }
.kpi-box.accent .v { color: var(--accent); }

.p-card { background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .1); padding: clamp(20px, 3vw, 28px); border-radius: 2px; margin-bottom: 22px; }
.p-card h2, .p-card h3 { font-size: 19px; margin-bottom: 6px; }
.p-card .sub { font-size: 13.5px; color: rgba(255, 255, 255, .55); margin-bottom: 18px; }
.p-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.limit-bar { height: 6px; background: rgba(255, 255, 255, .1); border-radius: 3px; overflow: hidden; margin: 10px 0 6px; }
.limit-bar span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .6s ease; }
.limit-meta { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .5); }

table.p-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.p-table th {
  text-align: left; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: rgba(255, 255, 255, .48); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
table.p-table td { padding: 13px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .86); }
table.p-table tr:last-child td { border-bottom: none; }
table.p-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .7); }
.badge.ok { border-color: rgba(120, 200, 140, .5); color: #9fe0b0; }
.badge.warn { border-color: rgba(230, 180, 90, .5); color: #f0c67a; }
.badge.bad { border-color: rgba(230, 120, 110, .5); color: #ffb0a6; }

.empty { padding: 42px 20px; text-align: center; color: rgba(255, 255, 255, .5); font-size: 14.5px; border: 1px dashed rgba(255, 255, 255, .16); }

/* ---------- Projektkarten ------------------------------------------------ */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.proj {
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1);
  padding: 24px; display: flex; flex-direction: column; gap: 12px; transition: border-color .25s, transform .25s;
}
.proj:hover { border-color: rgba(212, 168, 67, .6); transform: translateY(-2px); }
.proj .typ { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.proj h3 { font-size: 21px; }
.proj .ort { font-size: 13px; color: rgba(255, 255, 255, .55); }
.proj .stats { display: flex; gap: 18px; margin: 6px 0 2px; }
.proj .stats div { font-size: 12px; color: rgba(255, 255, 255, .5); }
.proj .stats b { display: block; font-family: 'Playfair Display', serif; font-size: 20px; color: #fff; font-weight: 500; }
.proj .bar { height: 4px; background: rgba(255, 255, 255, .1); }
.proj .bar span { display: block; height: 100%; background: var(--accent); }
.proj .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proj a.detail { color: var(--accent); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; text-decoration: none; font-weight: 700; }

/* ---------- Meldungen ---------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: #16202b; color: #fff; border: 1px solid var(--accent);
  padding: 13px 22px; font-size: 14px; border-radius: 2px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 90; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: #e07468; }

/* ---------- Fuss --------------------------------------------------------- */
.p-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0 40px; font-size: 12px; color: rgba(255, 255, 255, .42); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p-foot a { color: rgba(255, 255, 255, .55); text-decoration: none; }
.p-foot a:hover { color: var(--accent); }

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { min-height: 320px; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .p-main { grid-template-columns: 1fr; }
  .p-nav { flex-direction: row; overflow-x: auto; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .p-nav button { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .p-nav button[aria-selected="true"] { border-bottom-color: var(--accent); }
  .p-nav .sep { display: none; }
}
@media (max-width: 620px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .p-head { flex-wrap: wrap; }
  .p-tools { width: 100%; justify-content: space-between; }
  table.p-table { font-size: 13px; }
  table.p-table th:nth-child(3), table.p-table td:nth-child(3) { display: none; }
}

/* Nur für Screenreader sichtbar */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
