/* =============================================================================
 * CEB Bankshop Partner-Plattform — Stile
 * =============================================================================
 * Unveraendert uebernommen aus partner-plattform.html (Uebergabestand
 * 26.08.2026, <style>-Block). Bewusst nicht neu geschrieben: das Design ist
 * fertig, abgestimmt und im Prototyp erprobt.
 *
 * Nicht mehr enthalten sind die Stile der Dev-Toolbar — die Demo-Hilfen des
 * Prototyps gehoeren nicht ins Livesystem.
 * ============================================================================= */

  :root {
    --bg: #fafaf7;
    --bg-soft: #f3f1ea;
    --ink: #0e1f3a;
    --ink-soft: #2a3854;
    --muted: #6b7588;
    --line: #e6e2d6;
    --line-soft: #f0ecdf;
    --accent: #f15a24;
    --accent-soft: #fde4d8;
    --white: #ffffff;
    --green: #22c55e;
    --green-soft: #dcfce7;
    --amber: #f59e0b;
    --amber-soft: #fef3c7;
    --blue: #3b82f6;
    --blue-soft: #dbeafe;
    --red: #ef4444;
    --red-soft: #fee2e2;
    --shadow: 0 1px 2px rgba(14,31,58,.04), 0 8px 24px rgba(14,31,58,.06);
    --shadow-lg: 0 4px 12px rgba(14,31,58,.06), 0 24px 48px rgba(14,31,58,.10);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Inter Tight', -apple-system, sans-serif;
    background: var(--bg-soft);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  .serif { font-family: 'Fraunces', Georgia, serif; }
  button, input, textarea, select { font-family: inherit; }


  /* ============ BUTTONS ============ */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
  }
  .btn-primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.2);
  }
  .btn-primary:hover { transform: translateY(-1px); }
  .btn-dark { background: var(--ink); color: var(--white); }
  .btn-secondary {
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--line);
  }
  .btn-secondary:hover { border-color: var(--ink); }
  .btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    padding: 8px 14px;
  }
  .btn-ghost:hover { color: var(--accent); }
  .btn-sm { padding: 7px 13px; font-size: 12px; }
  .btn-lg { padding: 14px 24px; font-size: 15px; }
  .btn-block { width: 100%; justify-content: center; }
  .btn-danger {
    background: var(--white);
    color: var(--red);
    border: 1px solid var(--red-soft);
  }
  .btn-danger:hover {
    background: var(--red-soft);
  }
  .bankshop-mark {
    width: 28px; height: 28px;
    background: var(--ink);
    border-radius: 6px;
    display: grid; place-items: center;
    color: var(--white);
    font-weight: 700;
    font-size: 13px;
  }
  .bankshop-mark::after { content: 'B'; }

  /* ============ AUTH SCREEN ============ */
  .auth-screen {
    margin-top: 36px;
    min-height: calc(100vh - 36px);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .auth-left {
    background: var(--ink);
    color: var(--white);
    padding: 60px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
  }
  .auth-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(241,90,36,0.2) 0%, transparent 70%);
    pointer-events: none;
  }
  .auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    position: relative;
  }
  .auth-pitch {
    position: relative;
  }
  .auth-pitch-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(241,90,36,0.2);
    color: var(--accent);
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 24px;
    font-weight: 600;
  }
  .auth-pitch-tag::before {
    content: '';
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
  }
  .auth-pitch-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    font-weight: 400;
  }
  .auth-pitch-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 300;
  }
  .auth-pitch-text {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.75;
    margin-bottom: 34px;
    max-width: 460px;
  }
  .auth-trust {
    display: grid;
    gap: 14px;
    max-width: 440px;
    margin-top: 4px;
  }
  .auth-trust-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: 13.5px;
    line-height: 1.4;
  }
  .auth-trust-num {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    color: var(--accent);
    opacity: 0.6;
    font-weight: 400;
    min-width: 14px;
    flex-shrink: 0;
  }
  .auth-trust-item strong { display: block; margin-bottom: 1px; font-weight: 500; }
  .auth-trust-item span { opacity: 0.5; font-size: 12.5px; }
  .auth-footer-meta {
    font-size: 12px;
    opacity: 0.5;
    position: relative;
  }
  .auth-right {
    background: var(--white);
    padding: 60px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .auth-form-wrap { max-width: 420px; width: 100%; }
  .auth-form-title {
    font-family: 'Fraunces', serif;
    font-size: 30px;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    font-weight: 500;
  }
  .auth-form-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 28px;
  }
  .auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-soft);
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
  }
  .auth-tab {
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-weight: 500;
    color: var(--ink-soft);
    transition: all .2s;
  }
  .auth-tab.active {
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow);
  }
  .auth-form { display: none; }
  .auth-form.active { display: block; }

  /* ============ FORMS ============ */
  .form-group { margin-bottom: 16px; }
  .form-group label {
    display: block;
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-bottom: 6px;
    font-weight: 500;
  }
  .form-group label .required { color: var(--accent); }
  .form-group label .optional { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 4px; }
  .form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink);
    background: var(--white);
    transition: border-color .2s;
  }
  .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
  }
  .form-group input.error {
    border-color: var(--red);
    background: var(--red-soft);
  }
  .form-group textarea { resize: vertical; min-height: 80px; }
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .form-row.three { grid-template-columns: 1fr 1fr 1fr; }
  .form-error-msg {
    font-size: 12px;
    color: var(--red);
    margin-top: 4px;
    display: none;
  }
  .form-error-msg.visible { display: block; }

  .role-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .role-option {
    padding: 14px;
    border: 2px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
  }
  .role-option:hover { border-color: var(--ink-soft); }
  .role-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
  .role-option-icon {
    margin-bottom: 8px;
    color: var(--ink-soft);
  }
  .role-option.selected .role-option-icon { color: var(--accent); }
  .role-option-title {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 2px;
  }
  .role-option-desc {
    font-size: 11px;
    color: var(--muted);
  }

  /* ============ APP LAYOUT (LOGGED IN) ============ */
  .app {
    margin-top: 36px;
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 36px);
    display: none;
  }
  .app.active { display: grid; }

  .sidebar {
    background: var(--white);
    border-right: 1px solid var(--line);
    padding: 28px 16px;
    position: sticky;
    top: 36px;
    height: calc(100vh - 36px);
    overflow-y: auto;
  }
  .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    font-weight: 600;
    font-size: 14px;
  }
  .nav { display: flex; flex-direction: column; gap: 3px; }
  .nav-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 14px 12px 8px;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: 9px;
    font-size: 13.5px;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
  }
  .nav-item:hover { background: var(--bg-soft); color: var(--ink); }
  .nav-item.active {
    background: var(--ink);
    color: var(--white);
  }
  .nav-item svg { flex-shrink: 0; opacity: 0.85; }
  .nav-external {
    color: var(--muted);
    font-family: inherit;
  }
  .nav-external:hover { color: var(--ink); }
  .nav-external svg { opacity: 0.7; }
  .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--white);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 500;
  }
  .nav-user {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nav-user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2a3854, #0e1f3a);
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    font-family: 'Fraunces', serif;
  }
  .nav-user-info { min-width: 0; flex: 1; }
  .nav-user-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-user-role { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .main {
    padding: 28px 36px 60px;
    background: var(--bg-soft);
  }
  .page { display: none; }
  .page.active { display: block; }

  /* App Topbar (mit Notification-Bell) */
  .app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 4px;
  }
  .app-topbar-title {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }
  .app-topbar-actions {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .topbar-icon-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--white);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    transition: all .15s;
  }
  .topbar-icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .topbar-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--accent);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    line-height: 15px;
    border: 2px solid var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: 90vw;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.08);
    z-index: 100;
    display: none;
    max-height: 500px;
    flex-direction: column;
  }
  .notif-dropdown.active { display: flex; }
  .notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 15px;
  }
  .notif-mark-read {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 11.5px;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
  }
  .notif-mark-read:hover { background: var(--accent-soft); }
  .notif-dropdown-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
  }
  .notif-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    align-items: flex-start;
  }
  .notif-item:hover { background: var(--bg-soft); }
  .notif-item.unread { background: var(--accent-soft); }
  .notif-item.unread:hover { background: #ffd8c4; }
  .notif-item-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--white);
  }
  .notif-item-body {
    flex: 1;
    min-width: 0;
  }
  .notif-item-title {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 2px;
    line-height: 1.3;
  }
  .notif-item-meta {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
  }
  .notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
  }
  .notif-dropdown-footer {
    padding: 10px;
    border-top: 1px solid var(--line);
  }

  /* Welcome */
  .welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 24px;
    flex-wrap: wrap;
  }
  .welcome-title {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 6px;
    font-weight: 500;
  }
  .welcome-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
  }
  .welcome-subtitle {
    font-size: 13.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .welcome-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    background: var(--green-soft);
    color: #166534;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
  }
  .welcome-status::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
  }
  .welcome-status.warn {
    background: var(--amber-soft);
    color: #92400e;
  }
  .welcome-status.warn::before { background: var(--amber); }

  /* ============ 4 BAUSTEINE ============ */
  .modules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
  }
  @media (max-width: 1600px) {
    .modules-grid { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 900px) {
    .modules-grid { grid-template-columns: 1fr; }
  }
  .module {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--line);
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: all .2s;
  }
  .module:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
  .module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
  }
  .module-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
  }
  .module-tag.tag-profile { background: var(--blue-soft); color: var(--blue); }
  .module-tag.tag-finanz { background: var(--accent-soft); color: var(--accent); }
  .module-tag.tag-bv { background: var(--ink); color: var(--white); }
  .module-tag.tag-marktplatz { background: var(--green-soft); color: #166534; }
  .module-icon-bg {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--white);
  }
  .module-icon-bg.profile { background: var(--blue); }
  .module-icon-bg.finanz { background: var(--accent); }
  .module-icon-bg.bv { background: var(--ink); }
  .module-icon-bg.marktplatz { background: var(--green); }
  .btn-mp { background: var(--green); color: var(--white); }
  .btn-mp:hover { background: #16a34a; }
  .mp-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    transition: all .2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mp-card:hover {
    border-color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
  }
  .mp-card.match {
    border-color: var(--green);
    background: linear-gradient(180deg, var(--green-soft) 0%, var(--white) 30%);
  }
  .mp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
  }
  .mp-kind-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .mp-kind-pill.angebot { background: var(--green-soft); color: #166534; }
  .mp-kind-pill.gesuch { background: var(--blue-soft); color: var(--blue); }
  .mp-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-weight: 600;
    background: var(--green);
    color: var(--white);
  }
  .mp-card-title {
    font-family: 'Fraunces', serif;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 500;
    color: var(--ink);
  }
  .mp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--muted);
  }
  .mp-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .mp-card-partner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }
  .mp-card-partner-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #3a5d7e);
    display: grid;
    place-items: center;
    color: white;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Fraunces', serif;
  }
  .mp-photos {
    display: flex;
    gap: 4px;
    margin: -18px -18px 0;
    height: 130px;
    overflow: hidden;
  }
  .mp-photos > div {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-soft);
  }
  .mp-photos > div:first-child {
    border-top-left-radius: 16px;
  }
  .mp-photos > div:last-child {
    border-top-right-radius: 16px;
  }
  .mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }
  .info-box {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
  }
  .info-box.green {
    background: var(--green-soft);
    color: #166534;
  }
  .info-box.green strong {
    display: block;
    margin-bottom: 3px;
    color: #14532d;
  }
  .info-box > svg {
    flex-shrink: 0;
    margin-top: 2px;
  }
  .module-title {
    font-family: 'Fraunces', serif;
    font-size: 19px;
    line-height: 1.2;
    margin-bottom: 6px;
    font-weight: 500;
  }
  .module-subtitle {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 18px;
    line-height: 1.4;
  }

  .profile-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 14px;
  }
  .profile-mini-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2a3854, #0e1f3a);
    border: 2px solid var(--white);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 18px;
  }
  .profile-mini-info { flex: 1; min-width: 0; }
  .profile-mini-name {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
  }
  .profile-mini-role {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .profile-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ink);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
  }
  .profile-mini-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--ink-soft);
  }
  .profile-mini-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .profile-mini-meta-row svg { color: var(--blue); flex-shrink: 0; }
  .profile-mini-url {
    margin-top: auto;
    padding: 8px 10px;
    background: var(--bg-soft);
    border-radius: 8px;
    font-size: 11px;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    word-break: break-all;
    margin-bottom: 12px;
  }
  .profile-mini-url svg { color: var(--green); flex-shrink: 0; }
  .module-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
  }
  .module-actions .btn { flex: 1; justify-content: center; }

  /* Finanz module */
  .calc-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
  }
  .calc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-soft);
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    color: var(--ink);
  }
  .calc-row:hover {
    background: var(--white);
    border-color: var(--accent);
  }
  .calc-row-icon {
    width: 36px; height: 36px;
    background: var(--white);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--accent);
    flex-shrink: 0;
  }
  .calc-row-text { flex: 1; min-width: 0; }
  .calc-row-title { font-weight: 500; font-size: 13px; margin-bottom: 2px; }
  .calc-row-desc { font-size: 11px; color: var(--muted); }

  /* BV module */
  .bv-mini-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
  }
  .bv-mini-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-soft);
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid transparent;
  }
  .bv-mini-row:hover {
    background: var(--white);
    border-color: var(--ink);
  }
  .bv-mini-img {
    width: 44px; height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #d4d8e0, #b8bfc9);
    display: grid;
    place-items: center;
    color: var(--ink-soft);
  }
  .bv-mini-text { flex: 1; min-width: 0; }
  .bv-mini-title {
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bv-mini-meta {
    font-size: 10.5px;
    color: var(--muted);
  }
  .bv-mini-bidders {
    font-family: 'Fraunces', serif;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
    flex-shrink: 0;
  }
  .bv-mini-bidders em {
    font-style: normal;
    font-size: 10px;
    color: var(--muted);
    font-weight: 400;
  }
  .bv-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .bv-stat {
    background: var(--bg-soft);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .bv-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .bv-stat-value {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 500;
  }
  .bv-stat-value em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
  }
  .bv-empty {
    text-align: center;
    padding: 30px 14px;
    color: var(--muted);
    font-size: 13px;
    background: var(--bg-soft);
    border-radius: 12px;
    margin-bottom: 14px;
    border: 2px dashed var(--line);
  }
  .bv-empty-icon { margin-bottom: 10px; opacity: 0.4; }

  /* ============ PAGE: PROFILE EDIT ============ */
  .page-title {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 6px;
    font-weight: 500;
  }
  .page-subtitle {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 24px;
  }
  .card {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--line);
    padding: 26px;
    margin-bottom: 18px;
  }
  .card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
  .card-title {
    font-family: 'Fraunces', serif;
    font-size: 19px;
    font-weight: 500;
    margin-bottom: 4px;
  }
  .card-desc {
    font-size: 13px;
    color: var(--muted);
  }
  .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
  .makler-only, .hausverk-only { display: none; }
  body.role-makler .makler-only { display: block; }
  body.role-hausverk .hausverk-only { display: block; }

  /* ============ PAGE: BIETVERFAHREN ============ */
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .bv-list {
    display: grid;
    gap: 14px;
  }
  .bv-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 70px 1.5fr 1fr 1fr 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all .15s;
  }
  .bv-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--line-soft);
  }
  .bv-card-img {
    width: 70px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4d8e0, #b8bfc9);
    overflow: hidden;
    display: grid;
    place-items: center;
  }
  .bv-card-img svg { color: var(--ink-soft); }
  .bv-card-info { min-width: 0; }
  .bv-card-title {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 2px;
  }
  .bv-card-meta {
    font-size: 12px;
    color: var(--muted);
  }
  .bv-card-stat {
    text-align: left;
  }
  .bv-card-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 2px;
  }
  .bv-card-stat-value {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 500;
  }
  .bv-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
  }
  .bv-card-status.aktiv {
    background: var(--green-soft);
    color: #166534;
  }
  .bv-card-status.aktiv::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
  }
  .bv-card-status.entwurf {
    background: var(--bg-soft);
    color: var(--muted);
  }
  .bv-card-status.beendet {
    background: var(--amber-soft);
    color: #92400e;
  }
  .bv-card-actions {
    display: flex;
    gap: 6px;
  }
  .bv-card-action-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-soft);
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    transition: all .15s;
  }
  .bv-card-action-btn:hover {
    background: var(--ink);
    color: var(--white);
  }

  .empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--white);
    border: 2px dashed var(--line);
    border-radius: 18px;
  }
  .empty-state-icon {
    margin-bottom: 14px;
    opacity: 0.4;
  }
  .empty-state-title {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 500;
  }
  .empty-state-text {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 22px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ============ MODAL ============ */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14,31,58,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .modal-overlay.active { display: flex; }
  .modal {
    background: var(--white);
    border-radius: 22px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .modal.wide { max-width: 880px; }
  .modal-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 2;
  }
  .modal-title {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-weight: 500;
  }
  .modal-close {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--ink);
  }
  .modal-body { padding: 24px 26px; }
  .modal-footer {
    padding: 16px 26px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: var(--white);
  }

  .section-divider {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    margin: 22px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
  }
  .section-divider:first-of-type { margin-top: 0; }

  .info-box {
    background: var(--blue-soft);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #1e3a8a;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .info-box.green {
    background: var(--green-soft);
    color: #166534;
  }
  .info-box.amber {
    background: var(--amber-soft);
    color: #92400e;
  }
  .info-box svg { flex-shrink: 0; margin-top: 1px; }
  .info-box strong { display: block; margin-bottom: 2px; }

  /* Visibility options */
  .visibility-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
  .visibility-option {
    padding: 14px 12px;
    border: 2px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
  }
  .visibility-option:hover { border-color: var(--ink-soft); }
  .visibility-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
  .visibility-option-icon { margin-bottom: 6px; color: var(--ink-soft); }
  .visibility-option.selected .visibility-option-icon { color: var(--accent); }
  .visibility-option-title { font-weight: 500; font-size: 12.5px; margin-bottom: 2px; }
  .visibility-option-desc { font-size: 10.5px; color: var(--muted); line-height: 1.4; }

  /* ============ TOAST ============ */
  .toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .toast {
    background: var(--ink);
    color: var(--white);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: slideIn .3s ease;
  }
  .toast.success { background: var(--green); }
  .toast.error { background: var(--red); }
  @keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }

  /* ============ BIETER-SEITE (öffentlich) ============ */
  .public-page {
    min-height: 100vh;
    background: var(--bg);
    padding: 36px 0 0;
    display: none;
  }
  .public-page.active { display: block; }
  .public-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .public-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
  }
  @media (max-width: 900px) {
    .public-content { grid-template-columns: 1fr; }
  }
  .public-image {
    aspect-ratio: 4/3;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #fde4d8, #f8d4c0);
    position: relative;
  }
  .public-image svg { width: 100%; height: 100%; }
  .public-live-tag {
    position: absolute;
    top: 18px; left: 18px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .public-live-tag::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  .public-info { margin-top: 24px; }
  .public-title {
    font-family: 'Fraunces', serif;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    font-weight: 500;
  }
  .public-location {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .public-keyfacts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 18px;
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--line);
    margin-bottom: 24px;
  }
  .public-keyfact-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
  }
  .public-keyfact-value {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 500;
  }
  .public-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
  }
  .public-description h3 {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    color: var(--ink);
    margin: 20px 0 10px;
    font-weight: 500;
  }
  .public-description h3:first-child { margin-top: 0; }

  .bid-panel {
    background: var(--white);
    border-radius: 20px;
    padding: 26px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    position: sticky;
    top: 60px;
    align-self: start;
  }
  .bid-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
  .bid-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
  }
  .bid-bidders-count {
    font-size: 12px;
    color: var(--muted);
  }
  .bid-bidders-count strong { color: var(--ink); }

  .bid-input-section { margin-bottom: 16px; }
  .bid-input-label {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 8px;
    display: block;
  }
  .bid-input-wrap { position: relative; }
  .bid-input {
    width: 100%;
    padding: 16px 60px 16px 18px;
    font-size: 22px;
    font-family: 'Fraunces', serif;
    border: 2px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    font-weight: 500;
  }
  .bid-input:focus { outline: none; border-color: var(--accent); }
  .bid-input-suffix {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Fraunces', serif;
    font-size: 20px;
    color: var(--muted);
  }
  .bid-eligibility-toggle {
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
  }
  .bid-eligibility-title {
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 10px;
    font-weight: 500;
  }
  .bid-eligibility-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .bid-eligibility-option {
    padding: 12px 10px;
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
  }
  .bid-eligibility-option:hover { border-color: var(--ink-soft); }
  .bid-eligibility-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
  .bid-eligibility-icon { color: var(--ink-soft); margin-bottom: 4px; }
  .bid-eligibility-option.selected .bid-eligibility-icon { color: var(--accent); }
  .bid-eligibility-option-title { font-size: 11.5px; font-weight: 500; margin-bottom: 1px; }
  .bid-eligibility-option-hint { font-size: 10px; color: var(--muted); }
  .bid-disclaimer {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .bid-disclaimer a { color: var(--accent); }

  /* Public page partner card */
  .public-partner {
    background: var(--white);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .public-partner-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a3854, #0e1f3a);
    display: grid;
    place-items: center;
    color: var(--white);
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
  }
  .public-partner-info { flex: 1; min-width: 0; font-size: 12.5px; }
  .public-partner-name { font-weight: 600; margin-bottom: 1px; }
  .public-partner-role { color: var(--muted); font-size: 11.5px; }

  /* ============ Bieter Liste Detail ============ */
  .bieter-list-row {
    display: grid;
    grid-template-columns: 36px 1fr auto auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
  }
  .bieter-list-row:last-child { border-bottom: none; }
  .bieter-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    font-family: 'Fraunces', serif;
    background: linear-gradient(135deg, #d4a880, #c08a5c);
  }
  .bieter-name { font-weight: 500; font-size: 13.5px; margin-bottom: 2px; }
  .bieter-mail { font-size: 11.5px; color: var(--muted); }
  .bieter-bid-val {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 500;
  }
  .bieter-finanz-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--green-soft);
    color: #166534;
  }
  .bieter-finanz-pill.eigen {
    background: var(--bg-soft);
    color: var(--ink-soft);
  }
  .bieter-time { font-size: 11px; color: var(--muted); }

  /* Responsive */
  @media (max-width: 900px) {
    .auth-screen { grid-template-columns: 1fr; }
    .auth-left { padding: 40px 24px; }
    .auth-right { padding: 40px 24px; }
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main { padding: 22px 18px 50px; }
    .form-row, .form-row.three { grid-template-columns: 1fr; }
    .visibility-options { grid-template-columns: 1fr; }
    .bv-card { grid-template-columns: 60px 1fr; gap: 12px; }
    .bv-card > *:nth-child(n+3) { display: none; }
    .public-keyfacts { grid-template-columns: 1fr 1fr; }
    .public-content { padding: 20px; }
    .role-switcher-hint { display: none; }
  }
