:root {
  color-scheme: dark;
  --bg: #020a14;
  --panel: rgba(8, 25, 43, 0.93);
  --panel-soft: rgba(13, 39, 65, 0.7);
  --line: rgba(101, 163, 255, 0.2);
  --line-strong: rgba(90, 187, 255, 0.42);
  --text: #f4f8ff;
  --muted: #91a8c0;
  --blue: #15a8ff;
  --red: #ef2635;
  --green: #18d28b;
  --amber: #ffb24a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI Variable Text", "Segoe UI", "Aptos", Arial, sans-serif;
}

.component-admin-heading h1 span { color: var(--blue); }
.component-editor-dialog {
  width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  color: var(--text); border: 1px solid var(--line-strong); border-radius: 22px;
  background: #06192a; box-shadow: 0 28px 90px rgba(0, 0, 0, .55); overflow: hidden;
}
.component-editor-dialog::backdrop { background: rgba(0, 8, 18, .78); backdrop-filter: blur(5px); }
.component-editor-dialog form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 34px); }
.component-editor-dialog header,
.component-editor-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.component-editor-dialog footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.component-editor-dialog header h2 { margin: 3px 0 4px; font-size: 1.55rem; }
.component-editor-dialog header p:last-child { margin: 0; color: var(--muted); }
.component-editor-dialog header > button { border: 0; background: transparent; color: var(--muted); font-size: 2rem; cursor: pointer; }
.component-editor-body { padding: 24px 26px 30px; overflow: auto; }
.component-editor-specs { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.component-editor-specs h3 { margin: 0 0 15px; font-size: 1rem; }
.component-editor-check { display: flex; align-items: center; gap: 10px; color: var(--text); }
.component-editor-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.component-editor-dialog .form-message[hidden] { display: none; }
.component-image-upload { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(2, 13, 25, .38); }
.component-image-upload-preview { display: grid; place-items: center; width: 150px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); background: #fff; font-size: 11px; text-align: center; }
.component-image-upload-preview img { width: 100%; height: 100%; object-fit: contain; }
.component-image-upload-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.component-image-upload-controls strong, .component-image-upload-controls p, .component-image-upload-controls small { width: 100%; }
.component-image-upload-controls p { margin: 0; color: var(--muted); font-size: 12px; }
.component-image-upload-controls small { min-height: 18px; color: #77b9ec; }
.component-image-upload-button { position: relative; overflow: hidden; }
.component-image-upload-button input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.component-library-status.is-deleted { color: #ffb2b8; border-color: rgba(239, 38, 53, .38); background: rgba(239, 38, 53, .12); }
.component-library-action.is-danger { color: #ff9fa7; border-color: rgba(239, 38, 53, .42); background: rgba(239, 38, 53, .1); }
.component-delete-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; color: var(--text); border: 1px solid rgba(239, 38, 53, .42); border-radius: 20px; background: #06192a; box-shadow: 0 28px 90px rgba(0, 0, 0, .6); }
.component-delete-dialog::backdrop { background: rgba(0, 8, 18, .8); backdrop-filter: blur(5px); }
.component-delete-dialog-body { padding: 26px; }
.component-delete-dialog h2 { margin: 4px 0 12px; }
.component-delete-dialog p { color: var(--muted); line-height: 1.55; }
.component-delete-dialog p strong { color: var(--text); }
.component-delete-dialog .component-delete-warning { color: #ff9fa7; font-weight: 700; }
.component-delete-dialog-body > div:last-child { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

@media (max-width: 720px) {
  .component-editor-dialog header, .component-editor-dialog footer, .component-editor-body { padding-left: 18px; padding-right: 18px; }
  .component-image-upload { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background:
  radial-gradient(circle at 88% 4%, rgba(15, 127, 207, 0.2), transparent 35%),
  radial-gradient(circle at 15% 80%, rgba(239, 38, 53, 0.08), transparent 30%), var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr); min-height: 100vh; }
.auth-visual { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(32px, 5vw, 80px); border-right: 1px solid var(--line); }
.brand img { display: block; width: min(270px, 70vw); height: auto; }
.auth-intro { max-width: 680px; padding: 80px 0; }
.eyebrow { margin: 0 0 14px; color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: 0.15em; text-transform: uppercase; }
.auth-intro h1, .admin-heading h1 { margin: 0; font-size: clamp(38px, 5vw, 74px); font-weight: 620; line-height: 1.02; letter-spacing: -0.045em; }
.auth-intro h1 span, .admin-heading h1 span { color: var(--blue); }
.auth-intro > p:last-of-type { max-width: 590px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.security-notes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.security-notes span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: #b8c9db; background: rgba(8, 30, 52, 0.55); font-size: 11px; }
.auth-footer { color: #698198; font-size: 11px; }
.auth-panel { display: grid; place-items: center; min-height: 100vh; padding: 28px; }
.auth-card { width: min(470px, 100%); padding: clamp(27px, 4vw, 46px); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(11, 35, 59, 0.96), rgba(4, 17, 31, 0.97)); box-shadow: var(--shadow); }
.auth-card h2 { margin: 0; font-size: 28px; font-weight: 590; letter-spacing: -0.025em; }
.auth-card header p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.form-stack { display: grid; gap: 17px; margin-top: 28px; }
.field { display: grid; gap: 7px; color: #c8d6e5; font-size: 12px; font-weight: 580; }
.field input, .field select, .field textarea, .filter-field input, .filter-field select {
  width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid rgba(104, 164, 215, 0.25); border-radius: 11px;
  outline: none; color: var(--text); background: rgba(2, 15, 28, 0.76); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 92px; padding-top: 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-field input:focus, .filter-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 168, 255, 0.1); }
.field small { color: #6f879e; font-weight: 400; line-height: 1.45; }
.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 700; transition: transform .15s, border-color .15s, opacity .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { cursor: wait; opacity: .58; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #ff2534, #d90918); box-shadow: 0 9px 28px rgba(239, 38, 53, 0.2); }
.btn-secondary { border-color: var(--line-strong); color: #eaf4ff; background: rgba(4, 19, 34, 0.72); }
.btn-quiet { border-color: var(--line); color: #9fc1df; background: transparent; }
.btn-danger { border-color: rgba(239, 38, 53, .35); color: #ff9da5; background: rgba(239, 38, 53, .08); }
.form-message { min-height: 20px; margin: 0; color: #ffadb3; font-size: 12px; line-height: 1.5; }
.form-message.is-success { color: #80e8b5; }
.auth-alternative { margin-top: 18px; color: #7088a0; font-size: 11px; text-align: center; }
.auth-text-link { color: #7bcaff; font-size: 11px; text-align: center; text-decoration: none; }
.auth-text-link:hover { color: #b9e4ff; text-decoration: underline; }
.mfa-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: mfa-step; }
.mfa-steps li { position: relative; display: grid; gap: 3px; min-height: 38px; padding-left: 48px; counter-increment: mfa-step; }
.mfa-steps li::before { position: absolute; top: 0; left: 0; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; color: #8ed2ff; background: rgba(21,168,255,.1); content: counter(mfa-step, decimal-leading-zero); font-size: 10px; font-weight: 750; }
.mfa-steps strong { color: #ecf6ff; font-size: 12px; font-weight: 620; }
.mfa-steps span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.mfa-qr { width: min(240px, 100%); margin: 0 auto; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.24); }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.copy-field .btn { min-height: 46px; padding: 0 12px; }
.copy-field input { font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: .08em; }
.mfa-recovery { margin-top: 28px; }
.mfa-recovery-warning { padding: 14px; border: 1px solid rgba(255,178,74,.32); border-radius: 12px; background: rgba(255,178,74,.07); }
.mfa-recovery-warning strong { color: #ffd18c; font-size: 13px; }
.mfa-recovery-warning p { margin: 7px 0 0; color: #b6a98f; font-size: 10px; line-height: 1.55; }
.mfa-recovery pre { overflow: auto; margin: 13px 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; color: #e7f4ff; background: rgba(2,15,28,.76); font: 600 12px/1.65 Consolas, "SFMono-Regular", monospace; letter-spacing: .08em; }
.mfa-recovery-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 24px 18px; border-right: 1px solid var(--line); background: rgba(3, 15, 28, .9); }
.admin-sidebar .brand { padding: 7px 8px 28px; }
.admin-sidebar .brand img { width: 190px; }
.identity-card { display: grid; grid-template-columns: 43px minmax(0, 1fr); gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(11, 36, 61, .64); }
.identity-mark { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(21, 168, 255, .48); border-radius: 13px; color: #fff; background: linear-gradient(145deg, rgba(21,168,255,.25), rgba(12,60,99,.55)); font-size: 12px; font-weight: 760; }
.identity-copy { min-width: 0; }
.identity-copy strong, .identity-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-copy strong { font-size: 12px; }
.identity-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-nav { display: grid; gap: 7px; margin-top: 30px; }
.admin-nav-label { margin: 0 9px 4px; color: #647c94; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.admin-nav button { display: flex; min-height: 45px; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; color: #91a9c1; background: transparent; cursor: pointer; text-align: left; font-size: 12px; }
.admin-nav button::before { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 3px; content: ""; }
.admin-nav button.is-active { border-color: var(--line); color: #fff; background: linear-gradient(90deg, rgba(21,168,255,.15), rgba(21,168,255,.035)); }
.sidebar-footer { display: grid; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.license-mini { color: #7890a8; font-size: 10px; line-height: 1.5; }
.license-mini strong { color: #b7cbde; font-weight: 560; }
.admin-main { min-width: 0; padding: clamp(22px, 3vw, 46px); }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.admin-heading h1 { font-size: clamp(32px, 4vw, 50px); }
.admin-heading > div > p:last-child { margin: 11px 0 0; color: var(--muted); line-height: 1.5; }
.admin-heading-actions { display: flex; gap: 10px; }
.admin-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.admin-kpis article { display: grid; grid-template-columns: 39px minmax(0, 1fr); gap: 11px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.kpi-symbol { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; color: #6fc6ff; background: rgba(21,168,255,.12); font-size: 14px; }
.admin-kpis strong, .admin-kpis span, .admin-kpis small { display: block; }
.admin-kpis strong { font-size: 23px; font-weight: 620; }
.admin-kpis span { color: #d5e2ef; font-size: 10px; }
.admin-kpis small { margin-top: 2px; color: #6f879f; font-size: 9px; }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 230px)) auto; gap: 10px; margin-bottom: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(7, 26, 45, .76); }
.filter-field { display: grid; gap: 5px; }
.filter-field span { color: #7e96ae; font-size: 9px; }
.filter-field input, .filter-field select { min-height: 40px; font-size: 11px; }
.table-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 21, 37, .88); box-shadow: var(--shadow); }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 13px 14px; border-bottom: 1px solid var(--line); color: #718ba5; font-size: 9px; font-weight: 650; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid rgba(101,163,255,.1); color: #c4d3e2; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(21,168,255,.035); }
.cell-main { display: grid; gap: 3px; min-width: 150px; }
.cell-main strong { color: #fff; font-size: 12px; font-weight: 570; }
.cell-main small { color: #748ba2; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: #9eb0c2; background: rgba(126,150,174,.12); font-size: 9px; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status.is-active { color: #69e8aa; background: rgba(24,210,139,.1); }
.status.is-inactive { color: #ff969f; background: rgba(239,38,53,.1); }
.status.is-pending, .status.is-scheduled { color: #ffc56f; background: rgba(255,178,74,.1); }
.status.is-expired { color: #ff969f; background: rgba(239,38,53,.1); }
.row-actions { display: flex; gap: 6px; }
.row-actions .btn { min-height: 32px; padding: 0 10px; font-size: 9px; }
.table-empty { padding: 50px 20px !important; color: var(--muted) !important; text-align: center; }
.panel-message { margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(239,38,53,.3); border-radius: 11px; color: #ffafb6; background: rgba(239,38,53,.07); font-size: 11px; }
.panel-message.is-success { border-color: rgba(24,210,139,.3); color: #8ee9bd; background: rgba(24,210,139,.07); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0, 7, 14, .68); backdrop-filter: blur(4px); }
.drawer { position: fixed; z-index: 21; top: 0; right: 0; display: flex; width: min(570px, 100%); height: 100vh; flex-direction: column; border-left: 1px solid var(--line-strong); background: #061626; box-shadow: -24px 0 80px rgba(0,0,0,.45); }
.drawer header { display: flex; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 24px; font-weight: 590; }
.drawer header p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.drawer-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: #b8c9da; background: transparent; cursor: pointer; font-size: 22px; }
.drawer-body { display: grid; gap: 18px; overflow-y: auto; padding: 24px; }
.drawer-footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: auto; padding: 18px 24px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .field.is-wide { grid-column: 1 / -1; }
.section-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(3, 18, 32, .58); }
.section-card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 580; }
.license-history { display: grid; gap: 8px; }
.license-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px; border: 1px solid rgba(101,163,255,.14); border-radius: 10px; }
.license-item strong, .license-item small { display: block; }
.license-item strong { font-size: 11px; font-weight: 570; }
.license-item small { margin-top: 4px; color: #758da5; font-size: 9px; }
.invitation-box { display: grid; gap: 10px; padding: 14px; border: 1px solid rgba(24,210,139,.3); border-radius: 12px; background: rgba(24,210,139,.07); }
.invitation-box strong { color: #93ebbf; font-size: 12px; }
.invitation-box p { margin: 0; color: #92a9bd; font-size: 10px; line-height: 1.5; }
.mfa-reset-card { border-color: rgba(239,38,53,.3); background: rgba(239,38,53,.045); }
.mfa-reset-card > p { margin: 0 0 14px; color: #aebfd0; font-size: 10px; line-height: 1.55; }
.mfa-reset-card .btn-danger { width: 100%; margin-top: 10px; }
.mfa-reset-confirm { display: flex; align-items: flex-start; gap: 9px; color: #c7d5e2; font-size: 10px; line-height: 1.45; }
.mfa-reset-confirm input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--red); }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.copy-row input { min-width: 0; }
.loading-cover { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; color: #b9ccde; background: rgba(2,10,20,.9); font-size: 12px; }
.project-area { display: grid; gap: 12px; }
.project-area-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.project-area-heading h3 { margin: 0; font-size: 15px; font-weight: 590; }
.project-area-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.project-list { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.project-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 18, 32, .58); }
.project-row-copy { min-width: 0; }
.project-row-copy strong, .project-row-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-row-copy strong { font-size: 12px; font-weight: 580; }
.project-row-copy span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.project-row .btn { min-height: 34px; padding: 0 11px; font-size: 9px; }
.project-empty { margin: 0; padding: 25px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 940px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar .brand, .sidebar-footer { display: none; }
  .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
  .admin-nav-label { grid-column: 1 / -1; }
  .toolbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .auth-panel, .admin-main { padding: 14px; }
  .auth-card { padding: 24px 19px; border-radius: 18px; }
  .admin-heading { align-items: stretch; flex-direction: column; }
  .admin-heading-actions .btn { flex: 1; }
  .admin-kpis { grid-template-columns: 1fr; }
  .toolbar, .form-grid { grid-template-columns: 1fr; }
  .form-grid .field.is-wide { grid-column: auto; }
  .drawer { width: 100%; }
}

/* Geschütztes Mandanten-Dashboard */
.tenant-body { min-height: 100vh; background: #020b16; }
.tenant-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.tenant-sidebar { position: sticky; top: 0; z-index: 5; display: flex; height: 100vh; min-width: 0; flex-direction: column; padding: 20px 16px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(4,18,32,.98), rgba(3,15,28,.96)); }
.tenant-brand { display: block; padding: 4px 10px 24px; }
.tenant-brand img { display: block; width: 185px; max-width: 100%; height: auto; }
.tenant-identity { display: grid; grid-template-columns: 45px minmax(0,1fr) 32px; gap: 11px; align-items: center; padding: 13px 11px; border: 1px solid var(--line); border-radius: 14px; background: rgba(11,36,61,.64); }
.tenant-avatar { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(21,168,255,.48); border-radius: 13px; color: #fff; background: linear-gradient(145deg, rgba(21,168,255,.26), rgba(12,60,99,.56)); font-size: 11px; font-weight: 730; }
.tenant-identity-copy { min-width: 0; }
.tenant-identity-copy strong, .tenant-identity-copy > span, .tenant-identity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-identity-copy strong { font-size: 11px; font-weight: 620; }
.tenant-identity-copy > span { margin-top: 3px; color: #83a0bc; font-size: 8px; }
.tenant-identity-copy small { margin-top: 5px; color: #7f9ab4; font-size: 8px; }
.tenant-identity-copy small i { display: inline-block; width: 6px; height: 6px; margin: 0 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(24,210,139,.5); }
.tenant-icon-button { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 9px; color: #7898b4; background: transparent; cursor: pointer; }
.tenant-icon-button:hover { color: #fff; background: rgba(21,168,255,.1); }
.tenant-icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.tenant-nav { display: grid; gap: 6px; margin-top: 28px; }
.tenant-nav p { margin: 10px 11px 4px; color: #617a92; font-size: 8px; letter-spacing: .15em; text-transform: uppercase; }
.tenant-nav > div { display: grid; gap: 6px; }
.tenant-nav a { display: grid; grid-template-columns: 23px minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: #8ca6bf; text-decoration: none; font-size: 11px; transition: color .15s, background .15s, border-color .15s; }
.tenant-nav a:hover, .tenant-nav a.is-active { border-color: var(--line); color: #fff; background: linear-gradient(90deg, rgba(21,168,255,.14), rgba(21,168,255,.025)); }
.tenant-nav a.is-active { box-shadow: inset 3px 0 0 var(--red); }
.tenant-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.tenant-nav a > small { min-width: 23px; padding: 3px 6px; border-radius: 999px; color: #79bde8; background: rgba(21,168,255,.1); font-size: 8px; text-align: center; }
.tenant-license { display: grid; gap: 11px; margin-top: auto; padding: 16px 12px 3px; border-top: 1px solid var(--line); }
.tenant-license-brand { display: flex; align-items: center; gap: 9px; color: #d4e4f2; font-size: 10px; }
.tenant-license-brand svg { width: 24px; height: 24px; color: var(--blue); fill: none; stroke: currentColor; stroke-width: 2; }
.tenant-license-main { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 8px; align-items: center; color: #7f97ae; font-size: 9px; }
.tenant-license-main svg { width: 20px; height: 20px; color: #83bce5; fill: none; stroke: currentColor; stroke-width: 2; }
.tenant-license-main strong { color: #bed0df; font-weight: 590; }
.tenant-license-status { display: grid; grid-template-columns: 7px minmax(0,1fr); gap: 5px 8px; align-items: center; color: #6fdba4; font-size: 8px; }
.tenant-license-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.tenant-license-status time { grid-column: 2; color: #647e96; }
.tenant-license-status.is-inactive { color: #ff8e97; }

.tenant-main { min-width: 0; padding: clamp(18px,2.2vw,34px); }
.tenant-content { width: min(1480px,100%); margin: 0 auto; }
.tenant-alert { margin-bottom: 16px; padding: 13px 15px; border: 1px solid rgba(239,38,53,.32); border-radius: 12px; color: #ffc0c5; background: rgba(239,38,53,.08); font-size: 10px; line-height: 1.55; }
.tenant-hero { display: grid; grid-template-columns: minmax(360px,.8fr) minmax(500px,1.2fr); min-height: 245px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(125deg, rgba(10,35,58,.98), rgba(4,19,34,.95)); box-shadow: 0 20px 55px rgba(0,0,0,.23); }
.tenant-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px,3vw,42px); }
.tenant-hero-copy h1 { margin: 0; font-size: clamp(31px,3vw,46px); font-weight: 620; line-height: 1; letter-spacing: -.04em; }
.tenant-hero-copy h1 span { color: var(--blue); }
.tenant-hero-copy > p:last-of-type { max-width: 510px; margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.tenant-hero-actions { display: flex; gap: 9px; margin-top: 20px; }
.tenant-btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; color: #eaf5ff; background: rgba(4,19,34,.75); text-decoration: none; font-size: 10px; font-weight: 700; transition: transform .15s, border-color .15s; }
.tenant-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.tenant-btn svg, .tenant-section-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.tenant-btn-primary { border-color: rgba(255,55,67,.3); color: #fff; background: linear-gradient(135deg,#ff2f3d,#dc101f); box-shadow: 0 9px 28px rgba(239,38,53,.2); }
.tenant-featured { position: relative; min-height: 245px; overflow: hidden; background: #071a2c; }
.tenant-featured img { width: 100%; height: 100%; min-height: 245px; object-fit: cover; }
.tenant-featured::after { position: absolute; inset: 0; background: linear-gradient(90deg,rgba(5,22,38,.3),rgba(4,18,31,.07) 45%,rgba(4,18,31,.45)),linear-gradient(0deg,rgba(3,14,25,.88),transparent 62%); content: ""; pointer-events: none; }
.tenant-featured-copy { position: absolute; z-index: 1; right: 20px; bottom: 18px; left: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.tenant-featured-copy > div { min-width: 0; }
.tenant-featured-copy span, .tenant-featured-copy strong, .tenant-featured-copy small { display: block; }
.tenant-featured-copy span { color: #8ea9c1; font-size: 8px; }
.tenant-featured-copy strong { overflow: hidden; margin-top: 5px; color: #fff; font-size: 16px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.tenant-featured-copy small { margin-top: 5px; color: #b3c3d2; font-size: 8px; }
.tenant-featured-copy .tenant-btn { flex: 0 0 auto; min-height: 34px; }
.tenant-featured-empty { position: absolute; z-index: 1; inset: 0; display: grid; place-content: center; gap: 8px; padding: 30px; color: #758da5; text-align: center; }
.tenant-featured-empty strong { color: #cfdfec; font-size: 13px; }
.tenant-featured-empty span { font-size: 9px; }

.tenant-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 14px 0 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(6,26,44,.86); }
.tenant-kpis article { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; align-items: center; min-height: 76px; padding: 13px 16px; border-right: 1px solid rgba(101,163,255,.12); }
.tenant-kpis article:last-child { border-right: 0; }
.tenant-kpi-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #65c5ff; background: rgba(21,168,255,.1); }
.tenant-kpi-icon.green { color: #48dfa1; background: rgba(24,210,139,.09); }
.tenant-kpi-icon.violet { color: #b484ff; background: rgba(154,96,255,.1); }
.tenant-kpi-icon.emerald { color: #2fe0b0; background: rgba(22,190,150,.1); }
.tenant-kpi-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.tenant-kpis strong, .tenant-kpis span { display: block; }
.tenant-kpis strong { color: #fff; font-size: 20px; font-weight: 620; }
.tenant-kpis strong small { color: #a9bed0; font-size: 10px; }
.tenant-kpis article div > span { margin-top: 2px; color: #748da5; font-size: 8px; }

.tenant-project-section { min-width: 0; }
.tenant-section-heading, .tenant-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.tenant-section-heading .eyebrow { margin-bottom: 5px; }
.tenant-section-heading h2 { margin: 0; font-size: 19px; font-weight: 610; }
.tenant-section-actions { display: flex; align-items: center; gap: 8px; }
.tenant-section-actions a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 8px; color: #65bfff; text-decoration: none; font-size: 9px; }
.tenant-section-actions a:hover { background: rgba(21,168,255,.08); }
.tenant-inline-message { min-height: 15px; margin: 0 0 8px; color: #ffadb3; font-size: 9px; }
.tenant-project-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.tenant-project-grid-wide { grid-template-columns: repeat(4,minmax(0,1fr)); }
.tenant-project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(6,26,44,.86); transition: transform .15s,border-color .15s; }
.tenant-project-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.tenant-project-image { position: relative; height: 125px; overflow: hidden; background: linear-gradient(135deg,#0c2c47,#061725); }
.tenant-project-image img { width: 100%; height: 100%; object-fit: cover; }
.tenant-project-placeholder { display: grid; height: 100%; place-items: center; color: #466983; }
.tenant-project-placeholder svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tenant-project-status { position: absolute; top: 9px; right: 9px; padding: 5px 8px; border-radius: 999px; color: #9bd9ff; background: rgba(20,108,160,.85); font-size: 7px; backdrop-filter: blur(8px); }
.tenant-project-status.is-completed { color: #a7f5cd; background: rgba(13,126,82,.87); }
.tenant-project-body { padding: 13px 13px 10px; }
.tenant-project-body h3 { overflow: hidden; margin: 0; color: #fff; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.tenant-project-body p { overflow: hidden; min-height: 14px; margin: 5px 0 0; color: #7992aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tenant-project-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tenant-project-metrics span { padding: 4px 6px; border: 1px solid rgba(101,163,255,.14); border-radius: 999px; color: #aec2d3; font-size: 7px; }
.tenant-project-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 13px 12px; }
.tenant-project-footer time { color: #647f98; font-size: 7px; }
.tenant-project-footer a { display: inline-flex; min-height: 29px; align-items: center; padding: 0 9px; border: 1px solid rgba(21,168,255,.45); border-radius: 8px; color: #86cff9; text-decoration: none; font-size: 7px; font-weight: 700; }
.tenant-project-empty { grid-column: 1/-1; padding: 45px 24px; border: 1px dashed var(--line); border-radius: 14px; color: #7891aa; text-align: center; font-size: 10px; }

.tenant-page { min-width: 0; }
.tenant-page-header { align-items: center; margin: 4px 0 24px; padding: 21px 23px; border: 1px solid var(--line); border-radius: 17px; background: rgba(7,27,46,.84); }
.tenant-page-header h1 { margin: 0; font-size: clamp(30px,3vw,44px); font-weight: 620; letter-spacing: -.035em; }
.tenant-page-header > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.tenant-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) minmax(170px,240px) auto; gap: 10px; align-items: end; margin-bottom: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6,24,41,.82); }
.tenant-toolbar label { display: grid; gap: 5px; }
.tenant-toolbar label span { color: #758fa7; font-size: 8px; }
.tenant-toolbar input, .tenant-toolbar select { width: 100%; min-height: 39px; padding: 0 11px; border: 1px solid rgba(104,164,215,.24); border-radius: 9px; outline: none; color: #eaf5ff; background: rgba(2,15,28,.78); font-size: 9px; }
.tenant-toolbar input:focus, .tenant-toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,168,255,.09); }
.tenant-toolbar > strong { align-self: center; color: #8fa7bd; font-size: 9px; font-weight: 550; white-space: nowrap; }
.tenant-component-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.tenant-component-card { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; align-items: center; min-height: 92px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(6,26,44,.86); }
.tenant-component-symbol { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: #65c5ff; background: rgba(21,168,255,.1); }
.tenant-component-symbol svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tenant-component-symbol img { width: 42px; height: 42px; border-radius: 9px; object-fit: contain; }
.tenant-component-card strong, .tenant-component-card span, .tenant-component-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-component-card strong { color: #fff; font-size: 11px; }
.tenant-component-card span { margin-top: 4px; color: #a3b8cb; font-size: 9px; }
.tenant-component-card small { margin-top: 6px; color: #68839c; font-size: 7px; }
.tenant-loading { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; color: #b9ccde; background: rgba(2,10,20,.96); font-size: 11px; }
.tenant-body.is-ready .tenant-loading { display: none; }

/* Bestehende Dashboard-Oberfläche – nur die Datenquelle ist neu */
.tenant-shell { grid-template-columns: 290px minmax(0,1fr); }
.tenant-sidebar { gap: 28px; padding: 30px 18px 22px; }
.tenant-brand { padding: 2px 12px 4px; }
.tenant-brand img { width: 220px; filter: drop-shadow(0 9px 20px rgba(0,145,255,.2)); }
.tenant-identity { position: relative; grid-template-columns: 48px minmax(0,1fr) 36px; gap: 13px; padding: 6px 10px; border: 0; background: transparent; }
.tenant-avatar { width: 48px; height: 48px; border-color: rgba(21,168,255,.48); border-radius: 15px 15px 15px 6px; font-size: 14px; }
.tenant-identity-copy strong { padding-right: 4px; font-size: 15px; font-weight: 520; }
.tenant-identity-copy > span { margin-top: 3px; color: #70bfea; font-size: 11px; }
.tenant-identity-copy small { margin-top: 3px; font-size: 11px; }
.tenant-icon-button { width: 36px; height: 36px; }
.tenant-nav { gap: 26px; margin-top: 0; }
.tenant-nav > div { gap: 6px; }
.tenant-nav p { display: flex; align-items: center; gap: 12px; margin: 0 10px 7px; font-size: 10px; font-weight: 520; }
.tenant-nav p::after { height: 1px; flex: 1; content: ""; background: linear-gradient(90deg,rgba(92,142,187,.2),transparent); }
.tenant-nav a { position: relative; grid-template-columns: 24px minmax(0,1fr) auto; gap: 15px; min-height: 54px; padding: 11px 16px; border-radius: 9px; font-size: 15px; font-weight: 420; }
.tenant-nav a.is-active { box-shadow: none; }
.tenant-nav a.is-active::before { position: absolute; width: 3px; inset: 7px auto 7px -18px; border-radius: 0 3px 3px 0; content: ""; background: linear-gradient(180deg,#ff5361,#ef1f2d); }
.tenant-nav svg { width: 22px; height: 22px; color: #67b9f4; }
.tenant-nav a > small { min-width: 27px; padding: 4px 7px; font-size: 10px; }
.tenant-license { gap: 12px; padding: 17px 10px 2px; }
.tenant-license-brand { font-size: 13px; }
.tenant-license-main { font-size: 10px; }
.tenant-license-status { grid-template-columns: 8px auto minmax(0,1fr); font-size: 10px; }
.tenant-license-status time { grid-column: auto; justify-self: end; }
.tenant-main { width: 100%; padding: 26px; }
.tenant-content { width: 100%; margin: 0; }
.tenant-alert { padding: 14px 16px; font-size: 12px; }
.tenant-body .eyebrow { margin-bottom: 8px; font-size: 12px; font-weight: 900; }
.tenant-hero { min-height: 0; grid-template-columns: minmax(300px,.85fr) minmax(430px,1.45fr); gap: 22px; padding: 22px; border-radius: 22px; }
.tenant-hero-copy { align-self: center; padding: 8px 6px; }
.tenant-hero-copy h1 { font-size: clamp(30px,3.4vw,48px); line-height: 1.04; }
.tenant-hero-copy > p:last-of-type { max-width: 620px; margin-top: 15px; color: #cbd8e7; font-size: 16px; line-height: 1.52; }
.tenant-hero-actions { margin-top: 22px; }
.tenant-btn { min-height: 46px; padding: 0 20px; border-radius: 12px; font-size: 14px; font-weight: 850; }
.tenant-featured { min-height: 250px; border: 1px solid var(--line); border-radius: 18px; }
.tenant-featured img { position: absolute; inset: 0; min-height: 0; opacity: .82; }
.tenant-featured::after { inset: 35% 0 0; background: linear-gradient(180deg,transparent,rgba(2,10,20,.94)); }
.tenant-featured-copy { right: 18px; bottom: 18px; left: 18px; }
.tenant-featured-copy > div { max-width: 66%; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(3,15,29,.76); backdrop-filter: blur(10px); }
.tenant-featured-copy span { font-size: 14px; }
.tenant-featured-copy strong { font-size: 21px; }
.tenant-featured-copy small { font-size: 12px; }
.tenant-featured-copy .tenant-btn { min-height: 46px; }
.tenant-featured-empty strong { font-size: 21px; }
.tenant-featured-empty span { font-size: 13px; }
.tenant-kpis { margin: 14px 0 0; border-radius: 18px; }
.tenant-kpis article { grid-template-columns: 38px minmax(0,1fr); gap: 10px; min-height: 78px; padding: 11px 14px; }
.tenant-kpi-icon { width: 38px; height: 38px; }
.tenant-kpi-icon { display: grid; place-items: center; }
.tenant-kpi-icon svg { display: block; width: 22px; height: 22px; margin: auto; }
.tenant-kpis strong { display: flex; align-items: baseline; gap: 4px; font-size: clamp(21px,1.8vw,27px); }
.tenant-kpis strong small { font-size: 13px; }
.tenant-kpis article div > span { margin-top: 3px; font-size: 13px; }
.tenant-project-section { margin-top: 28px; }
.tenant-section-heading { align-items: center; margin-bottom: 16px; }
.tenant-section-heading h2 { font-size: 24px; }
.tenant-section-actions a { padding: 7px 0; font-size: 14px; font-weight: 800; }
.tenant-inline-message { min-height: 0; margin-bottom: 8px; font-size: 12px; }
.tenant-project-grid, .tenant-project-grid-wide { grid-template-columns: repeat(auto-fill,minmax(240px,310px)); justify-content: start; gap: 16px; }
.tenant-project-card { position: relative; min-height: 300px; display: flex; flex-direction: column; border-radius: 17px; cursor: pointer; }
.tenant-project-card.is-trash { cursor: default; }
.tenant-project-card.is-selected { border-color: rgba(21,168,255,.62); }
.tenant-project-card.is-selected::before { position: absolute; z-index: 4; top: 12px; left: 12px; padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(21,168,255,.9); content: "Ausgewählt"; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tenant-project-image { height: auto; min-height: 132px; }
.tenant-project-image img { position: absolute; inset: 0; }
.tenant-project-status { z-index: 3; top: 10px; right: 10px; padding: 7px 10px; font-size: 11px; font-weight: 900; }
.tenant-project-body { flex: 1; padding: 14px; }
.tenant-project-body h3 { margin-bottom: 6px; font-size: 17px; }
.tenant-project-body p { min-height: 19px; margin: 0 0 11px; font-size: 13px; }
.tenant-project-metrics { gap: 6px; margin-top: 0; margin-bottom: 12px; }
.tenant-project-metrics span { padding: 4px 7px; font-size: 11px; }
.tenant-project-footer { margin-top: auto; padding: 0 14px 14px; }
.tenant-project-footer time { font-size: 11px; }
.tenant-project-footer a { min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#15a8ff,#0b75ff); font-size: 10px; font-weight: 900; }
.tenant-project-empty { font-size: 13px; }
.tenant-page { gap: 22px; }
.tenant-page-header { margin: 0; padding: 22px; border-radius: 22px; }
.tenant-page-header h1 { font-size: clamp(30px,3.4vw,48px); }
.tenant-page-header > div > p:last-child { font-size: 16px; }
.tenant-page-actions, .tenant-project-actions { display: flex; align-items: center; gap: 8px; }
.tenant-project-actions { margin-left: auto; }
.tenant-card-action { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid rgba(101,163,255,.28); border-radius: 999px; color: #7dcaff; background: rgba(21,168,255,.07); cursor: pointer; }
.tenant-card-action:hover { color: #fff; border-color: rgba(21,168,255,.6); background: rgba(21,168,255,.16); }
.tenant-card-action.is-danger { color: #ff8f98; border-color: rgba(239,38,53,.3); background: rgba(239,38,53,.07); }
.tenant-card-action.is-danger:hover { color: #fff; border-color: rgba(239,38,53,.65); background: rgba(239,38,53,.2); }
.tenant-card-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tenant-card-action span { display: none; }
.tenant-confirm-dialog { width: min(470px,calc(100vw - 30px)); padding: 0; border: 1px solid rgba(101,163,255,.3); border-radius: 20px; color: var(--text); background: linear-gradient(145deg,#0b233b,#04111f); box-shadow: 0 30px 90px rgba(0,0,0,.58); }
.tenant-confirm-dialog::backdrop { background: rgba(0,7,15,.72); backdrop-filter: blur(5px); }
.tenant-confirm-dialog form { padding: 28px; }
.tenant-dialog-icon { display: grid; width: 48px; height: 48px; margin-bottom: 18px; place-items: center; border-radius: 14px; color: #ff8f98; background: rgba(239,38,53,.12); }
.tenant-dialog-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tenant-confirm-dialog h2 { margin: 0; font-size: 24px; font-weight: 620; }
.tenant-confirm-dialog form > p:not(.eyebrow) { margin: 12px 0 0; color: #9eb2c8; font-size: 14px; line-height: 1.55; }
.tenant-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.tenant-btn-danger { border-color: rgba(239,38,53,.38); color: #fff; background: linear-gradient(135deg,#ef3542,#b80817); }
.tenant-alert.is-success { border-color: rgba(24,210,139,.32); color: #9af0c5; background: rgba(24,210,139,.08); }

/* Zentrale Komponentenbibliothek */
.component-library { display: grid; gap: 18px; min-width: 0; }
.component-library-hero { display: grid; grid-template-columns: minmax(300px,1fr) minmax(520px,1.25fr); gap: 28px; align-items: center; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(140deg,rgba(10,37,62,.96),rgba(3,17,31,.98)); }
.component-library-hero h1 { margin: 5px 0 8px; font-size: clamp(31px,3vw,48px); font-weight: 620; }
.component-library-hero > div:first-child > p:last-child { max-width: 690px; margin: 0; color: #9eb2c8; line-height: 1.5; }
.component-library-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.component-library-kpis article { min-height: 104px; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; align-items: center; padding: 14px; border: 1px solid rgba(101,163,255,.22); border-radius: 15px; background: rgba(3,20,35,.58); }
.component-library-kpis article > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #67c7ff; background: rgba(21,168,255,.13); font-weight: 760; }
.component-library-kpis article > span svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.component-library-kpis article > span.violet { color: #c797ff; background: rgba(163,90,255,.14); }
.component-library-kpis article > span.green { color: #58e6b2; background: rgba(20,196,135,.13); }
.component-library-kpis small,.component-library-kpis em { display: block; color: #83a2bf; font-size: 10px; font-style: normal; }
.component-library-kpis strong { display: block; margin: 2px 0; font-size: 25px; font-weight: 680; }
.component-manufacturer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(245px,1fr)); gap: 12px; }
.component-manufacturer-card { min-height: 112px; display: grid; grid-template-columns: 82px minmax(0,1fr) 20px; gap: 15px; align-items: center; padding: 16px; border: 1px solid rgba(101,163,255,.24); border-radius: 17px; color: var(--text); text-align: left; background: linear-gradient(135deg,rgba(10,39,66,.96),rgba(4,22,39,.96)); cursor: pointer; }
.component-manufacturer-card:hover { transform: translateY(-1px); border-color: rgba(21,168,255,.55); }
.component-manufacturer-mark { width: 82px; height: 70px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: rgba(255,255,255,.96); color: #07192b; font-weight: 850; }
.component-manufacturer-mark img { max-width: 74px; max-height: 58px; object-fit: contain; }
.component-manufacturer-copy strong,.component-manufacturer-copy small,.component-manufacturer-copy em { display: block; }
.component-manufacturer-copy strong { font-size: 17px; font-weight: 620; }
.component-manufacturer-copy small { margin-top: 5px; color: #9db1c8; font-size: 11px; line-height: 1.35; }
.component-manufacturer-copy em { margin-top: 7px; color: #6f94b5; font-size: 11px; font-style: normal; }
.component-manufacturer-arrow { color: #75bdf0; font-size: 30px; font-weight: 200; }
.component-library-filters { display: grid; grid-template-columns: minmax(250px,1.4fr) minmax(160px,.7fr) minmax(180px,.8fr) auto; gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(5,25,43,.8); }
.component-library-filters-admin { grid-template-columns: minmax(230px,1.35fr) minmax(150px,.7fr) minmax(170px,.8fr) minmax(130px,.55fr) auto; }
.component-library-filters label { display: grid; gap: 6px; color: #82a2c0; font-size: 10px; }
.component-library-filters input,.component-library-filters select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid rgba(101,163,255,.25); border-radius: 10px; color: var(--text); background: #031626; }
.component-library-table-shell { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(4,22,38,.9); }
.component-library-table-scroll { overflow-x: auto; }
.component-library-table { width: 100%; min-width: 1380px; border-collapse: collapse; }
.component-library-table th { padding: 13px 11px; color: #87a7c4; border-bottom: 1px solid rgba(101,163,255,.2); font-size: 10px; font-weight: 650; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.component-library-table td { padding: 11px; color: #bfd0df; border-bottom: 1px solid rgba(101,163,255,.11); font-size: 11px; line-height: 1.4; vertical-align: middle; }
.component-library-table tbody tr:hover { background: rgba(21,168,255,.035); }
.component-library-table td > strong { color: #f3f8ff; font-size: 12px; }
.component-library-brand { display: flex; align-items: center; gap: 8px; min-width: 125px; }
.component-library-brand img { width: 42px; height: 26px; object-fit: contain; padding: 2px; border-radius: 5px; background: #fff; }
.component-library-thumbnail { width: 64px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; color: #708ba5; background: rgba(255,255,255,.06); font-size: 9px; text-align: center; }
.component-library-thumbnail img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.component-library-details { min-width: 170px; max-width: 260px; }
.component-library-price { min-width: 120px; color: #f2f7fd !important; }
.component-library-status { display: inline-flex; padding: 5px 8px; border: 1px solid rgba(255,142,150,.25); border-radius: 999px; color: #ff9aa1; background: rgba(239,38,53,.07); }
.component-library-status.is-active { color: #5fe2b0; border-color: rgba(20,196,135,.32); background: rgba(20,196,135,.08); }
.component-library-actions { display: flex; gap: 5px; }
.component-library-action { min-height: 29px; padding: 0 8px; border: 1px solid rgba(21,168,255,.35); border-radius: 8px; color: #83d0ff; background: rgba(21,168,255,.07); cursor: pointer; font-size: 9px; }
.component-library-action:hover { color: #fff; background: rgba(21,168,255,.17); }
.component-library-action.is-muted { color: #ff9aa1; border-color: rgba(239,38,53,.28); background: rgba(239,38,53,.06); }
.component-library-empty { padding: 30px !important; text-align: center; }
.component-library-table-shell > footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; color: #88a5bf; font-size: 11px; }
.component-library-table-shell > footer div { display: flex; align-items: center; gap: 8px; }
.component-library-table-shell > footer button { width: 31px; height: 31px; border: 1px solid rgba(101,163,255,.24); border-radius: 8px; color: #83cfff; background: rgba(21,168,255,.06); cursor: pointer; }
.component-library-table-shell > footer button:disabled { opacity: .35; cursor: default; }
.component-detail-dialog { width: min(760px,calc(100vw - 30px)); padding: 0; border: 1px solid rgba(101,163,255,.3); border-radius: 20px; color: var(--text); background: linear-gradient(145deg,#0b233b,#04111f); box-shadow: 0 30px 90px rgba(0,0,0,.58); }
.component-detail-dialog::backdrop { background: rgba(0,7,15,.74); backdrop-filter: blur(5px); }
.component-detail-dialog > header,.component-detail-dialog > footer { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.component-detail-dialog > footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.component-detail-dialog h2 { margin: 3px 0 0; font-size: 24px; }
.component-detail-dialog > header > button { border: 0; color: #9cb3c9; background: transparent; cursor: pointer; font-size: 28px; }
.component-detail-body { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 24px; }
.component-detail-image { min-height: 170px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; color: #7894ad; background: #fff; }
.component-detail-image img { width: 100%; height: 100%; max-height: 220px; object-fit: contain; }
.component-detail-list { display: grid; gap: 8px; margin: 0; }
.component-detail-list div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(101,163,255,.12); }
.component-detail-list dt { color: #829fba; font-size: 11px; }
.component-detail-list dd { margin: 0; color: #edf5ff; font-size: 12px; }
.component-detail-description { grid-column: 1/-1; margin: 0; color: #a8bacb; line-height: 1.55; }

@media (max-width: 1180px) {
  .tenant-hero { grid-template-columns: 1fr 1fr; }
  .tenant-project-grid, .tenant-project-grid-wide { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tenant-component-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .component-library-hero { grid-template-columns: 1fr; }
  .component-library-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .tenant-shell { grid-template-columns: 1fr; }
  .tenant-sidebar { position: static; height: auto; padding: 13px; }
  .tenant-brand, .tenant-license { display: none; }
  .tenant-identity { grid-template-columns: 40px minmax(0,1fr) 34px; }
  .tenant-avatar { width: 40px; height: 40px; }
  .tenant-nav { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 10px; }
  .tenant-nav p, .tenant-nav > div p { display: none; }
  .tenant-nav > div { display: contents; }
  .tenant-nav a { grid-template-columns: 20px minmax(0,1fr); }
  .tenant-nav a > small { display: none; }
  .tenant-main { padding: 14px; }
  .tenant-hero { grid-template-columns: 1fr; }
  .tenant-featured { min-height: 220px; }
  .tenant-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tenant-kpis article:nth-child(2) { border-right: 0; }
  .tenant-kpis article:nth-child(-n+2) { border-bottom: 1px solid rgba(101,163,255,.12); }
  .tenant-project-grid, .tenant-project-grid-wide { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .tenant-nav { grid-template-columns: 1fr; }
  .tenant-nav a { min-height: 40px; }
  .tenant-hero-copy { padding: 24px 20px; }
  .tenant-hero-copy h1 { font-size: 31px; }
  .tenant-kpis { grid-template-columns: 1fr; }
  .tenant-kpis article { border-right: 0; border-bottom: 1px solid rgba(101,163,255,.12); }
  .tenant-kpis article:last-child { border-bottom: 0; }
  .tenant-section-heading, .tenant-page-header { align-items: stretch; flex-direction: column; }
  .tenant-section-actions { justify-content: space-between; }
  .tenant-project-grid, .tenant-project-grid-wide, .tenant-component-grid { grid-template-columns: 1fr; }
  .tenant-toolbar { grid-template-columns: 1fr; }
  .tenant-featured-copy { align-items: stretch; flex-direction: column; }
  .tenant-featured-copy .tenant-btn { align-self: flex-start; }
  .tenant-page-actions { align-items: stretch; flex-direction: column; }
  .tenant-dialog-actions { flex-direction: column-reverse; }
  .tenant-dialog-actions .tenant-btn { width: 100%; }
  .component-library-kpis,.component-library-filters { grid-template-columns: 1fr; }
  .component-manufacturer-grid { grid-template-columns: 1fr; }
  .component-detail-body { grid-template-columns: 1fr; }
  .component-detail-list div { grid-template-columns: 1fr; gap: 3px; }
}
