:root {
    --navy-950: #071b2d;
    --navy-900: #0b2942;
    --navy-800: #123c5b;
    --teal-600: #0a8fa5;
    --teal-500: #14a3ba;
    --teal-300: #7edbdc;
    --ink: #102f4c;
    --muted: #667e90;
    --line: #dfe7ed;
    --surface: #ffffff;
    --canvas: #f3f6fa;
    --success: #2aa77f;
    --danger: #ce4556;
    --shadow-sm: 0 4px 18px rgba(14, 38, 60, .06);
    --shadow-md: 0 16px 45px rgba(14, 38, 60, .10);
}
html, body {
    font-family: Inter, Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    text-rendering: optimizeLegibility;
}

body { margin: 0; }
a { color: var(--teal-600); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 740; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 3vw, 3rem); }
h1:focus { outline: none; }
p { color: var(--muted); }

.eyebrow {
    display: block;
    margin-bottom: .7rem;
    color: var(--teal-600);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.6rem;
}

.page-heading h1 { margin: 0 0 .55rem; }
.page-heading p { margin: 0; font-size: 1rem; }
.heading-badge {
    padding: .6rem .9rem;
    border: 1px solid #cde4e7;
    border-radius: 999px;
    color: #08798b;
    background: #edfafa;
    font-size: .72rem;
    font-weight: 760;
    letter-spacing: .04em;
}

/* Landing page */
.home-hero {
    min-height: 540px;
    padding: clamp(2.5rem, 5vw, 5rem);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    align-items: center;
    gap: 3rem;
    overflow: hidden;
    position: relative;
    border-radius: 32px;
    background:
        radial-gradient(circle at 85% 15%, rgba(36, 184, 190, .16), transparent 24%),
        linear-gradient(140deg, #ffffff 0%, #f2f9fa 65%, #e7f5f6 100%);
    box-shadow: var(--shadow-md);
}

.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { margin: 0 0 1.5rem; font-size: clamp(2.7rem, 4vw, 4.3rem); line-height: 1.03; letter-spacing: -.055em; }
.hero-copy h1 span { color: var(--teal-600); }
.hero-copy p { max-width: 650px; margin-bottom: 2rem; font-size: 1.12rem; line-height: 1.75; }

.hero-visual { min-height: 400px; position: relative; display: grid; place-items: center; }
.security-core {
    width: 220px;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 38%;
    color: white;
    background: linear-gradient(145deg, #123e5c, #0a263d);
    box-shadow: 0 28px 65px rgba(8, 42, 66, .26), inset 0 1px rgba(255,255,255,.15);
    transform: rotate(-5deg);
}
.security-core > * { transform: rotate(5deg); }
.core-check { width: 52px; height: 52px; margin-bottom: .9rem; display: grid; place-items: center; border-radius: 16px; color: #07334b; background: #83dfdc; font-size: 1.5rem; font-weight: 900; }
.security-core strong { font-size: 1.8rem; letter-spacing: .08em; }
.security-core small { margin-top: .35rem; color: #8fb5c6; }
.orbit { position: absolute; border: 1px solid rgba(10,143,165,.18); border-radius: 50%; }
.orbit-one { width: 345px; height: 345px; }
.orbit-two { width: 430px; height: 250px; transform: rotate(35deg); }
.floating-card { min-width: 150px; padding: 1rem; position: absolute; z-index: 4; border: 1px solid rgba(255,255,255,.85); border-radius: 17px; background: rgba(255,255,255,.86); box-shadow: var(--shadow-md); backdrop-filter: blur(12px); }
.floating-card span { float: left; width: 34px; height: 34px; margin-right: .7rem; display: grid; place-items: center; border-radius: 10px; color: var(--teal-600); background: #e7f7f7; }
.floating-card small, .floating-card strong { display: block; }
.floating-card small { color: #7b909e; font-size: .67rem; }
.floating-card strong { margin-top: .18rem; color: var(--ink); font-size: .82rem; }
.card-doc { left: 0; top: 2.3rem; }
.card-shield { right: 0; bottom: 2.4rem; }

.feature-strip { margin: 1.5rem 0; padding: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow-sm); }
.feature-strip > div { padding: .55rem 1rem; display: flex; align-items: center; gap: .9rem; border-right: 1px solid var(--line); }
.feature-strip > div:last-child { border-right: 0; }
.feature-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: var(--teal-600); background: #eaf8f8; font-weight: 800; }
.feature-strip strong, .feature-strip small { display: block; }
.feature-strip strong { font-size: .85rem; }
.feature-strip small { margin-top: .25rem; color: #8092a0; font-size: .72rem; }
.welcome-note { padding: 4.5rem 2rem 2rem; text-align: center; }
.welcome-note h2 { margin: 0 0 .7rem; font-size: 2rem; }

/* Admin hub */
.admin-section { margin-top: 3rem; }
.section-heading { margin-bottom: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; }
.section-number { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--teal-600); background: #e7f6f7; font-size: .68rem; font-weight: 850; }
.section-heading h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.section-heading p { margin: 0; font-size: .84rem; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-card { min-height: 118px; padding: 1.35rem; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: white; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.portal-card:hover { color: var(--ink); border-color: #b8dadd; box-shadow: var(--shadow-md); transform: translateY(-3px); }
.portal-card.featured { background: linear-gradient(130deg, #0d3652, #0b2942); border-color: transparent; color: white; }
.portal-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: var(--teal-600); background: #e9f7f8; font-size: 1.2rem; font-weight: 750; }
.featured .portal-icon { color: #9ae2df; background: rgba(255,255,255,.1); }
.portal-content { min-width: 0; flex: 1; }
.portal-content strong, .portal-content small { display: block; }
.portal-content strong { font-size: .93rem; }
.portal-content small { margin-top: .35rem; color: #788d9b; font-size: .75rem; line-height: 1.4; }
.featured .portal-content small { color: #99b6c5; }
.portal-arrow { color: #86a0ae; font-size: 1.25rem; transition: transform .18s ease; }
.portal-card:hover .portal-arrow, .import-card:hover .portal-arrow { transform: translateX(4px); }
.import-card { max-width: 720px; padding: 1.25rem 1.4rem; display: flex; align-items: center; gap: 1rem; border-radius: 18px; color: white; background: linear-gradient(115deg, #0a8fa5, #08758c); box-shadow: 0 14px 30px rgba(10, 143, 165, .18); text-decoration: none; }
.import-card:hover { color: white; }
.import-card > span:nth-child(2) { flex: 1; }
.import-card strong, .import-card small { display: block; }
.import-card small { margin-top: .3rem; color: #c7edf0; font-size: .76rem; }
.import-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.14); font-size: 1.25rem; }
.import-card .portal-arrow { color: white; }

/* Assignment administration */
.assignment-picker { max-width: 760px; padding: 1.3rem; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow-sm); }
.assignment-picker label, .assignment-toolbar label { display: block; margin-bottom: .45rem; }
.assignment-summary { margin: 1.4rem 0; padding: 1.4rem; display: flex; align-items: center; gap: 1rem; border-radius: 20px; color: white; background: linear-gradient(125deg, #0d3652, #0a2941); box-shadow: var(--shadow-md); }
.assignment-avatar { width: 56px; height: 56px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 17px; color: #07334b; background: #8ce1df; font-size: 1.2rem; font-weight: 850; }
.assignment-type { color: #8ddadd; font-size: .67rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.assignment-summary h2 { margin: .15rem 0; color: white; font-size: 1.2rem; }
.assignment-summary p { margin: 0; color: #9eb8c6; font-size: .78rem; }
.assignment-toolbar { margin: 1.4rem 0 1rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.assignment-toolbar > div { width: min(520px, 100%); }
.tenant-assignment-list { display: grid; gap: .75rem; }
.tenant-assignment-card { padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease; }
.tenant-assignment-card.selected { border-color: #9ed7da; box-shadow: 0 8px 24px rgba(10,143,165,.09); }
.tenant-select { display: flex; align-items: center; gap: .8rem; }
.tenant-select label { margin: 0; cursor: pointer; }
.tenant-select strong, .tenant-select small { display: block; }
.tenant-select strong { color: var(--ink); font-size: .9rem; }
.tenant-select small { min-height: 1em; margin-top: .2rem; color: #7b8f9d; font-size: .7rem; }
.tenant-assignment-options { margin: 1rem 0 0 1.8rem; padding-top: 1rem; display: flex; align-items: flex-end; gap: 1.5rem; border-top: 1px solid #edf1f4; }
.tenant-assignment-options > div { width: 180px; }
.primary-choice { margin-bottom: .55rem; display: flex; align-items: center; gap: .45rem; }
.location-choices { margin: .9rem 0 0 1.8rem; padding: .85rem; display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; border-radius: 12px; background: #f6f9fa; }
.location-choices > span { width: 100%; color: #6e8391; font-size: .68rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.location-choices label { display: flex; align-items: center; gap: .4rem; font-size: .76rem; cursor: pointer; }

/* Modern data tables */
.table-toolbar { min-height: 52px; margin-bottom: .85rem; display: flex; align-items: center; gap: .8rem; }
.table-search { width: min(420px, 100%); height: 44px; display: flex; align-items: center; gap: .6rem; padding: 0 .85rem; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow-sm); }
.table-search span { color: var(--teal-600); font-size: 1.15rem; }
.table-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .82rem; }
.record-count { margin-left: auto; color: #758b9a; font-size: .76rem; font-weight: 680; }
.table-filter-group { display: flex; gap: .35rem; }
.filter-chip { padding: .48rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: #647c8c; background: white; font-size: .7rem; font-weight: 700; }
.filter-chip.active { color: #08798d; border-color: #a9dadd; background: #eaf8f8; }
.data-table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow-sm); }
.modern-table { min-width: 880px; }
.table:not(.modern-table) { margin-top: .85rem; overflow: hidden; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; border-radius: 18px; background: white; box-shadow: var(--shadow-sm); }
.table:not(.modern-table) tbody tr:last-child td { border-bottom: 0; }
.table:not(.modern-table) a { color: #187f91; font-weight: 680; text-decoration: none; }
.table:not(.modern-table) a:hover { color: #075f72; }
.auto-paginated-table { width: 100%; }
.auto-paginated-table tr[hidden] { display: none; }
.auto-table-toolbar { min-height: 32px; margin-top: .85rem; margin-bottom: .45rem; }
.auto-table-toolbar .record-count { margin-left: auto; }
.auto-table-pagination { margin-bottom: 1.25rem; }
.modern-table > :not(caption) > * > * { padding: 1rem 1.2rem; }
.modern-table tbody tr:last-child td { border-bottom: 0; }
.entity-cell { display: flex; align-items: center; gap: .8rem; }
.entity-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: #08788b; background: linear-gradient(145deg, #e5f7f7, #d5efef); font-size: .72rem; font-weight: 850; letter-spacing: .03em; }
.entity-avatar.user { color: #fff; background: linear-gradient(145deg, #0f90a7, #0c6584); }
.entity-cell strong, .entity-cell small { display: block; }
.entity-cell strong { color: var(--ink); font-size: .82rem; }
.entity-cell small { max-width: 300px; margin-top: .22rem; overflow: hidden; color: #7b909e; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.soft-badge { display: inline-flex; padding: .4rem .6rem; border-radius: 8px; color: #4f7184; background: #f0f5f7; font-size: .68rem; font-weight: 700; }
.cell-primary, .cell-secondary { display: block; }
.cell-primary { color: #36566c; font-size: .76rem; }
.cell-secondary { margin-top: .22rem; color: #8b9ca7; font-size: .65rem; }
.status-pill { display: inline-flex; align-items: center; gap: .42rem; padding: .42rem .65rem; border-radius: 999px; font-size: .68rem; font-weight: 750; }
.status-pill i { width: .42rem; height: .42rem; border-radius: 50%; }
.status-pill.active { color: #217b61; background: #e9f7f1; }
.status-pill.active i { background: #33ad83; }
.status-pill.inactive { color: #9b5260; background: #fbeef0; }
.status-pill.inactive i { background: #cf6173; }
.action-column { width: 1%; text-align: right; white-space: nowrap; }
.btn-table-action { padding: .48rem .7rem; border: 1px solid #d8e5ea; color: #315b71; background: white; }
.btn-table-action:hover { color: #08798d; border-color: #9ed6da; background: #f1fafa; }
.btn-table-action span { margin-left: .3rem; color: var(--teal-600); }
.user-type-pill { display: inline-flex; padding: .42rem .62rem; border-radius: 8px; font-size: .66rem; font-weight: 750; }
.user-type-pill.agency { color: #08788d; background: #e5f6f7; }
.user-type-pill.tenant { color: #526b7c; background: #eef2f5; }
.tenant-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tenant-tags span, .tenant-tags b { padding: .28rem .45rem; border-radius: 6px; color: #557181; background: #f1f5f7; font-size: .62rem; font-weight: 680; }
.tenant-tags b { color: #08798d; background: #e6f7f7; }
.loading-state { padding: 3rem; display: flex; justify-content: center; align-items: center; gap: .7rem; color: #748a99; font-size: .8rem; }
.loading-state span { width: 18px; height: 18px; border: 2px solid #cde3e5; border-top-color: var(--teal-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-create-panel { margin-bottom: 1.5rem; padding: 1.4rem; border: 1px solid #cce3e5; border-radius: 18px; background: #f7fbfb; }
.heading-actions { display: flex; align-items: center; gap: .55rem; }
.table-pagination { margin-top: .85rem; padding: .75rem .9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.table-pagination > label { margin: 0; display: flex; align-items: center; gap: .6rem; color: #6c8291; font-size: .7rem; }
.table-pagination select { width: 72px; min-height: 34px; }
.pagination-controls { display: flex; align-items: center; gap: .75rem; }
.pagination-controls > span { color: #728795; font-size: .7rem; }
.pagination-controls strong { color: var(--ink); }
.btn-pagination { border: 1px solid var(--line); color: #3c6074; background: white; }
.btn-pagination:hover:not(:disabled) { color: #08798d; border-color: #a2d6da; background: #eff9f9; }
.btn-pagination:disabled { color: #aab7bf; background: #f5f7f8; }

/* Tenant detail hub */
.tenant-detail-heading { margin-bottom: 1.5rem; }
.tenant-detail-logo { max-width: 220px; max-height: 90px; object-fit: contain; padding: .6rem .8rem; border: 1px solid #d8e5ea; border-radius: 14px; background: #fff; }
.tenant-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.tenant-hub-card { min-height: 100px; padding: 1rem; display: flex; align-items: center; gap: .8rem; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.tenant-hub-card:hover { color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tenant-hub-card.primary { color: white; border-color: transparent; background: linear-gradient(125deg, #0d3652, #0a2941); }
.tenant-hub-card > span:nth-child(2) { min-width: 0; flex: 1; }
.tenant-hub-card strong, .tenant-hub-card small { display: block; }
.tenant-hub-card strong { font-size: .8rem; }
.tenant-hub-card small { margin-top: .25rem; color: #7a8f9c; font-size: .66rem; line-height: 1.35; }
.tenant-hub-card.primary strong { color: white; }
.tenant-hub-card.primary small { color: #9bb7c5; }
.tenant-hub-card b { color: #77a1b3; font-weight: 500; }
.more-modules { margin: .8rem 0 2rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
.more-modules summary { padding: .85rem 1rem; color: #557185; font-size: .72rem; font-weight: 720; cursor: pointer; }
.more-modules > div { padding: 0 1rem 1rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.more-modules a { padding: .4rem .6rem; border-radius: 8px; color: #477084; background: #f1f6f7; font-size: .68rem; text-decoration: none; }
.detail-form { padding: 1.6rem; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow-sm); }
.agency-toggle { padding: 1rem 1rem 1rem 2.7rem; border: 1px solid #cce4e6; border-radius: 14px; background: #f1fafa; }
.agency-toggle label strong, .agency-toggle label small { display: block; }
.agency-toggle label small { margin-top: .2rem; color: #78909e; font-size: .68rem; font-weight: 500; }
.system-email-form { margin-bottom: 1rem; }.system-email-test { max-width: 850px; }.form-actions { display: flex; gap: .55rem; }
.table-actions { display: flex; justify-content: flex-end; gap: .35rem; }.invitation-toggle { border-color: #b9dedc; background: #edf9f8; }

/* Persönliches Benutzerportal */
.portal-welcome { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; min-height: 210px; margin-bottom: 2rem; padding: 2.6rem 3rem; border-radius: 26px; color: white; background: radial-gradient(circle at 86% 15%, rgba(31,184,181,.28), transparent 31%), linear-gradient(125deg, #0a2941, #103e5c); box-shadow: var(--shadow-md); }
.portal-welcome::after { content: ""; position: absolute; right: -80px; bottom: -130px; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.portal-welcome h1 { margin: .35rem 0 .55rem; color: white; font-size: clamp(2rem, 4vw, 3.3rem); }.portal-welcome p { margin: 0; color: #b7ceda; }.portal-welcome .eyebrow { color: #62d7d1; }
.portal-welcome-mark { z-index: 1; display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 9px rgba(255,255,255,.035); }.portal-welcome-mark span { color: #62d7d1; font-size: 2rem; line-height: 1; }.portal-welcome-mark small { color: white; font-size: .62rem; font-weight: 800; letter-spacing: .16em; }
.tenant-selection-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 1rem; }.tenant-selection-heading h2 { margin: .18rem 0 0; font-size: 1.45rem; }.tenant-count { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 .6rem; border-radius: 12px; color: #087f88; background: #e2f6f5; font-size: .75rem; font-weight: 800; }
.tenant-selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tenant-selection-card { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 138px; padding: 1.3rem; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: white; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }.tenant-selection-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#19aaa7, #087f88); }.tenant-selection-card:hover { color: var(--ink); border-color: #afd9d8; box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tenant-monogram { flex: 0 0 auto; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 17px; color: white; background: linear-gradient(145deg, #0e4864, #082b43); font-size: .9rem; font-weight: 800; letter-spacing: .05em; }.tenant-selection-copy { min-width: 0; flex: 1; }.tenant-selection-copy > strong,.tenant-selection-copy > small { display: block; }.tenant-selection-copy > strong { overflow: hidden; margin-bottom: .3rem; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }.tenant-selection-copy > small { color: #708794; font-size: .69rem; }
.tenant-card-meta { display: flex; align-items: center; gap: .55rem; margin-top: .75rem; }.tenant-card-meta b { padding: .27rem .48rem; border-radius: 7px; color: #087f88; background: #e9f7f6; font-size: .55rem; }.tenant-card-meta em { color: #69808e; font-size: .6rem; font-style: normal; font-weight: 700; }.tenant-selection-arrow { color: #159d9b; font-size: 1.45rem; transition: transform .2s ease; }.tenant-selection-card:hover .tenant-selection-arrow { transform: translateX(4px); }
.portal-loading { padding: 3rem; color: #708794; text-align: center; }.portal-empty { max-width: 650px; margin: 3rem auto; padding: 3rem; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow-sm); text-align: center; }.portal-empty-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 17px; color: #0a8f93; background: #e4f6f5; font-size: 1.6rem; font-weight: 800; }.portal-empty p { color: #708794; }
.tenant-portal-header { display: flex; align-items: center; justify-content: space-between; min-height: 235px; padding: 2.5rem 3rem; overflow: hidden; border-radius: 26px 26px 0 0; color: white; background: radial-gradient(circle at 85% 20%, rgba(44,196,188,.3), transparent 27%), linear-gradient(120deg, #082a43, #10506b); }.tenant-portal-header h1 { margin: .35rem 0 .55rem; color: white; font-size: clamp(2rem, 4vw, 3rem); }.tenant-portal-header p { margin: 0; color: #b7ceda; }.tenant-portal-header .eyebrow { display: block; color: #5cd4cf; }.portal-back-link { display: inline-block; margin-bottom: 1.2rem; color: #c0d6df; font-size: .65rem; font-weight: 700; text-decoration: none; }.portal-back-link:hover { color: white; }
.tenant-portal-badge { display: grid; place-items: center; width: 130px; height: 130px; border: 1px solid rgba(255,255,255,.2); border-radius: 30px; background: rgba(255,255,255,.09); transform: rotate(3deg); }.tenant-portal-badge span { color: white; font-size: 1.7rem; font-weight: 800; }.tenant-portal-badge small { color: #5cd4cf; font-size: .56rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tenant-portal-badge.has-logo { grid-template-rows: 1fr auto; padding: .8rem; background: rgba(255,255,255,.96); transform: none; }.tenant-portal-badge img { width: 100%; height: 82px; object-fit: contain; }.tenant-portal-badge.has-logo small { color: #0b6574; }
.tenant-portal-tabs { display: flex; gap: .4rem; margin-bottom: 1.5rem; padding: .65rem; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px; background: white; box-shadow: var(--shadow-sm); }.tenant-portal-tabs span { padding: .62rem 1.05rem; border-radius: 10px; color: #708794; font-size: .65rem; font-weight: 700; }.tenant-portal-tabs .active { color: white; background: #0d405c; }
.module-selection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }.module-selection-card { position: relative; display: flex; align-items: center; gap: .85rem; min-height: 130px; padding: 1.2rem; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); background: white; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }.module-selection-card::after { content: ""; position: absolute; right: -30px; bottom: -45px; width: 105px; height: 105px; border-radius: 50%; background: var(--module-soft,#edf5f6); }.module-selection-card:hover { color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.module-selection-card .module-icon { z-index: 1; flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: white; background: var(--module,#159d9b); font-size: 1.25rem; font-weight: 700; }.module-selection-card > span:nth-child(2) { z-index: 1; min-width: 0; flex: 1; }.module-selection-card strong,.module-selection-card small { display: block; }.module-selection-card strong { font-size: .75rem; }.module-selection-card small { margin-top: .3rem; color: #768b97; font-size: .6rem; line-height: 1.4; }.module-selection-card b { z-index: 1; color: var(--module,#159d9b); font-weight: 500; }
.module-selection-card.blue { --module:#3980b9;--module-soft:#e8f2fa }.module-selection-card.navy { --module:#284b75;--module-soft:#e9eef5 }.module-selection-card.orange { --module:#dc8435;--module-soft:#fff0df }.module-selection-card.violet { --module:#735d9c;--module-soft:#f0ebf8 }.module-selection-card.green { --module:#4a9275;--module-soft:#e7f4ed }.module-selection-card.cyan { --module:#188ca2;--module-soft:#e5f5f7 }.module-selection-card.slate { --module:#5e7181;--module-soft:#ecf0f2 }.module-selection-card.mint { --module:#49a997;--module-soft:#e3f5f1 }
.portal-permission-note { display: flex; align-items: center; gap: .7rem; margin-top: 1.2rem; padding: .9rem 1rem; border-radius: 13px; color: #55707e; background: #edf6f7; font-size: .65rem; }.portal-permission-note span { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; color: white; background: #138e94; font-weight: 800; }

/* Bootstrap component modernization */
.btn { border-radius: 11px; font-weight: 680; letter-spacing: -.01em; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--teal-600), #08778f); border-color: transparent; box-shadow: 0 8px 20px rgba(10,143,165,.18); }
.btn-primary:hover, .btn-primary:focus { color: white; background: linear-gradient(135deg, #087f93, #06677d); border-color: transparent; }
.btn-lg { padding: .85rem 1.35rem; font-size: .9rem; }
.btn-secondary { color: var(--ink); background: white; border-color: var(--line); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(20,163,186,.16); }
.form-control, .form-select { min-height: 44px; border-color: #d8e2e8; border-radius: 10px; color: var(--ink); background-color: white; }
.form-control:focus, .form-select:focus { border-color: #60c2c8; }
.form-label, label { color: #36556b; font-size: .82rem; font-weight: 650; }
.form-check-input:checked { background-color: var(--teal-600); border-color: var(--teal-600); }
.card { border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.card-header { padding: 1rem 1.25rem; border-color: var(--line); background: #f8fafb; font-weight: 700; }
.table-responsive { border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow-sm); }
.table { margin-bottom: 0; color: #294a61; }
.table > :not(caption) > * > * { padding: .9rem 1rem; border-bottom-color: #e7edf1; vertical-align: middle; }
.table thead th { color: #6c8291; background: #f7f9fb; font-size: .68rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #f3fafa; }
.badge { padding: .45em .7em; border-radius: 8px; font-weight: 700; }
.alert { border: 0; border-radius: 14px; }
.modal-content { border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(8,31,48,.22); }
.pagination { gap: .3rem; }
.page-link { border: 0; border-radius: 9px !important; color: var(--teal-600); }
.page-item.active .page-link { background: var(--teal-600); }

.valid.modified:not([type=checkbox]) { outline: 1px solid var(--success); }
.invalid { outline: 1px solid var(--danger); }
.validation-message { color: var(--danger); font-size: .78rem; }
.blazor-error-boundary { padding: 1rem; border-radius: 14px; color: white; background: var(--danger); }
.blazor-error-boundary::after { content: "Es ist ein Fehler aufgetreten."; }
.login-logo { max-width: 270px; width: 100%; height: auto; margin-bottom: 1.5rem; }
.darker-border-checkbox.form-check-input { border-color: #8295a3; }

@media (max-width: 1100px) {
    .home-hero { grid-template-columns: 1fr; }
    .hero-visual { min-height: 340px; }
    .admin-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tenant-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-selection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .home-hero { padding: 2.2rem 1.4rem; border-radius: 22px; grid-template-columns: minmax(0,1fr); }
    .hero-copy h1 { font-size: 2.6rem; }
    .hero-visual { min-height: 300px; transform: scale(.82); margin: -1rem; }
    .feature-strip, .admin-grid, .admin-grid.compact { grid-template-columns: 1fr; }
    .feature-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .feature-strip > div:last-child { border-bottom: 0; }
    .page-heading { display: block; }
    .heading-badge { display: inline-block; margin-top: 1rem; }
    .assignment-toolbar { align-items: stretch; flex-direction: column; }
    .tenant-assignment-options { align-items: stretch; flex-direction: column; }
    .table-toolbar { align-items: stretch; flex-direction: column; }
    .record-count { margin-left: 0; }
    .tenant-hub { grid-template-columns: 1fr; }
    .portal-welcome, .tenant-portal-header { min-height: auto; padding: 2rem 1.35rem; }
    .portal-welcome-mark, .tenant-portal-badge { display: none; }
    .tenant-selection-grid, .module-selection-grid { grid-template-columns: 1fr; }
    .tenant-portal-tabs { overflow-x: auto; }
    .heading-actions { margin-top: 1rem; }
    .table-pagination { align-items: stretch; flex-direction: column; }
    .pagination-controls { justify-content: space-between; }
}
