/* Struktur- und Komponentenregeln ohne veränderbare Admin-/Kunden-Designwerte. */

* { box-sizing: border-box; }
html { min-height: 100%; background: #f7f7f9; }
body { margin: 0; min-height: 100vh; color: var(--rt-color-text); background: var(--rt-color-bg); font-family: var(--rt-font-body); line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-family: var(--rt-font-heading); line-height: 1.2; color: var(--rt-color-text); }
a { color: var(--rt-color-primary-dark); }
code { color: #7a1f52; background: #f3eef2; padding: .1rem .3rem; border-radius: 4px; }

.rt-app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.rt-sidebar { min-height: 100vh; background: #ffffff; border-right: 1px solid var(--rt-color-border); padding: 24px 16px; position: sticky; top: 0; align-self: start; }
.rt-brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; border-bottom: 1px solid var(--rt-color-border); }
.rt-brand strong, .rt-brand small { display: block; }
.rt-brand small { color: var(--rt-color-muted); margin-top: 2px; }
.rt-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--rt-color-primary); color: #fff; font-weight: 800; }
.rt-nav { display: grid; gap: 6px; padding-top: 20px; }
.rt-nav-link { display: block; padding: 10px 12px; border-radius: 9px; color: #26333d; text-decoration: none; font-weight: 650; }
.rt-nav-link:hover, .rt-nav-link:focus-visible { color: #fff; background: var(--rt-color-primary); outline: none; }
.rt-main { min-width: 0; }
.rt-toolbar { min-height: 68px; padding: 12px 28px; display: flex; align-items: center; gap: 16px; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--rt-color-border); position: sticky; top: 0; z-index: 20; }
.rt-toolbar-actions { display: flex; gap: 12px; align-items: center; }
.rt-user-label { color: var(--rt-color-muted); font-size: .92rem; }
.rt-content { width: 100%; padding: 28px; }
.rt-sidebar-toggle { display: none; border: 1px solid var(--rt-color-border); background: #fff; border-radius: 8px; min-width: 42px; min-height: 42px; }

.rt-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.rt-page-heading h1 { margin: 2px 0 8px; font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 750; }
.rt-page-heading p { margin: 0; color: var(--rt-color-muted); max-width: 760px; }
.rt-eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; font-weight: 800; color: var(--rt-color-primary-dark) !important; }

.rt-grid { display: grid; gap: 16px; }
.rt-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rt-card { background: var(--rt-color-surface); border: 1px solid var(--rt-color-border); border-radius: var(--rt-radius); padding: 20px; box-shadow: var(--rt-shadow); }
.rt-card h2, .rt-card h3 { margin-top: 0; }
.rt-metric { display: grid; gap: 4px; }
.rt-metric-label { color: var(--rt-color-muted); font-size: .86rem; }
.rt-metric strong { font-family: var(--rt-font-heading); font-size: 1.05rem; }
.rt-section { margin-top: 32px; }
.rt-section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }
.rt-section-heading h2 { margin: 2px 0 0; }
.rt-module-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rt-module-card p { margin-bottom: 0; color: var(--rt-color-muted); }

.rt-status { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: #e9eef2; color: #33414c; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.rt-status-alpha { background: #e3f2fd; color: #0d5c91; }
.rt-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 7px 12px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 700; }
.rt-button-secondary { border-color: var(--rt-color-border); background: #fff; color: #26333d; }
.rt-button-secondary:hover, .rt-button-secondary:focus-visible { border-color: var(--rt-color-primary); color: var(--rt-color-primary-dark); }
.rt-notice { margin-top: 16px; border-radius: var(--rt-radius); padding: 14px 16px; border: 1px solid; }
.rt-notice-warning { background: #fff7e3; border-color: #f0cf76; color: #644a00; }
.rt-notice-info { background: #eaf5fc; border-color: #9dcced; color: #134764; }
.rt-definition-list { display: grid; gap: 0; margin: 0; }
.rt-definition-list > div { display: grid; grid-template-columns: minmax(160px, 30%) 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rt-color-border); }
.rt-definition-list > div:last-child { border-bottom: 0; }
.rt-definition-list dt { font-weight: 800; }
.rt-definition-list dd { margin: 0; color: var(--rt-color-muted); }

@media (max-width: 1100px) {
    .rt-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rt-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .rt-app-shell { display: block; }
    .rt-sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: min(320px, 88vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--rt-shadow); }
    .rt-sidebar.is-open { transform: translateX(0); }
    .rt-sidebar-toggle { display: inline-grid; place-items: center; }
    .rt-toolbar { padding: 12px 16px; }
    .rt-content { padding: 20px 16px; }
    .rt-user-label { display: none; }
}

@media (max-width: 620px) {
    .rt-grid-4, .rt-grid-3 { grid-template-columns: 1fr; }
    .rt-page-heading { display: grid; }
    .rt-definition-list > div { grid-template-columns: 1fr; gap: 3px; }
}


/* CRUD-Komponenten ab 6.0.0-alpha.5 */
.rt-button-primary { background: var(--rt-color-primary); color: #fff; border-color: var(--rt-color-primary); }
.rt-button-primary:hover, .rt-button-primary:focus-visible { background: var(--rt-color-primary-dark); color: #fff; }
.rt-button-danger { background: var(--rt-color-danger); color: #fff; border-color: var(--rt-color-danger); }
.rt-button-danger:hover, .rt-button-danger:focus-visible { filter: brightness(.92); color: #fff; }
.rt-notice-success { background: #eaf7ed; border-color: #9bcda6; color: #174f23; margin: 0 0 18px; }
.rt-notice-danger { background: #fff0ee; border-color: #e6a39a; color: #6d1d13; margin: 0 0 18px; }
.rt-notice-danger ul { margin: 8px 0 0; }
.rt-heading-actions, .rt-form-actions, .rt-filter-actions { display: flex; align-items: center; gap: 10px; }
.rt-form-card { max-width: 980px; }
.rt-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rt-field { display: grid; gap: 7px; }
.rt-field-wide { grid-column: 1 / -1; }
.rt-field label { font-weight: 750; color: #26333d; }
.rt-field input, .rt-field select, .rt-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--rt-color-border); border-radius: 8px; background: #fff; color: var(--rt-color-text); font: inherit; }
.rt-field textarea { min-height: 130px; resize: vertical; }
.rt-field input:focus, .rt-field select:focus, .rt-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--rt-color-primary) 32%, transparent); border-color: var(--rt-color-primary); }
.rt-field-check { align-content: end; }
.rt-field-check label { display: inline-flex; align-items: center; gap: 8px; }
.rt-field-check input { width: 18px; min-height: 18px; height: 18px; }
.rt-form-actions { justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rt-color-border); }
.rt-filterbar { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr) auto; gap: 14px; align-items: end; }
.rt-table-wrap { width: 100%; overflow-x: auto; }
.rt-table { width: 100%; border-collapse: collapse; }
.rt-table th, .rt-table td { padding: 12px 10px; border-bottom: 1px solid var(--rt-color-border); text-align: left; vertical-align: top; }
.rt-table th { font-size: .82rem; color: var(--rt-color-muted); text-transform: uppercase; letter-spacing: .035em; }
.rt-table tbody tr:last-child td { border-bottom: 0; }
.rt-table-actions { text-align: right !important; white-space: nowrap; }
.rt-muted { color: var(--rt-color-muted); font-size: .88rem; }
.rt-danger-zone { border-color: #efb5ae; }
.rt-inline-danger { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rt-color-border); }
.rt-role-form { display: grid; gap: 10px; min-width: 260px; }
.rt-role-options { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.rt-role-options label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rt-role-options input { width: 16px; height: 16px; }
@media (max-width: 720px) { .rt-form-grid, .rt-filterbar { grid-template-columns: 1fr; } .rt-field-wide { grid-column: auto; } .rt-form-actions { justify-content: stretch; flex-wrap: wrap; } }

/* Projektkern ab 6.0.0-alpha.6 */
.rt-span-2 { grid-column: span 2; }
.rt-filterbar-4 { grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(190px, 1fr) auto; }
.rt-readonly-value { min-height: 42px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid var(--rt-color-border); border-radius: 8px; background: #f4f6f8; font-weight: 750; }
.rt-team-form, .rt-stack-form { display: grid; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rt-color-border); }
.rt-simple-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.rt-simple-list li { display: grid; gap: 2px; }
.rt-simple-list span { color: var(--rt-color-muted); font-size: .88rem; }
.rt-progress-native { width: min(180px, 100%); height: 12px; margin-right: 8px; vertical-align: middle; accent-color: var(--rt-color-primary); }
.rt-project-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rt-project-card { display: grid; gap: 18px; align-content: start; }
.rt-traffic { display: inline-flex; align-items: center; gap: 8px; }
.rt-traffic-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.16); }
.rt-traffic-green { background: #009416; }
.rt-traffic-yellow { background: #eda509; }
.rt-traffic-red { background: #c22515; }
.rt-traffic-gray { background: #a8b0b7; }
.rt-dashboard-link { color: inherit; text-decoration: none; }
.rt-dashboard-link:hover, .rt-dashboard-link:focus-visible { border-color: var(--rt-color-primary); outline: 2px solid color-mix(in srgb, var(--rt-color-primary) 25%, transparent); }
.rt-customer-nav { display: flex; align-items: center; gap: 6px; }
.rt-customer-nav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; font-weight: 700; color: var(--rt-color-text); }
.rt-customer-nav a:hover, .rt-customer-nav a:focus-visible { background: #eef4f8; color: var(--rt-color-primary-dark); }
.rt-pagination { margin-top: 16px; }
@media (max-width: 900px) { .rt-filterbar-4 { grid-template-columns: 1fr 1fr; } .rt-project-card-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .rt-span-2 { grid-column: auto; } .rt-filterbar-4 { grid-template-columns: 1fr; } .rt-customer-nav { order: 3; width: 100%; } }
