/* 9.1: Detailansichten nutzen die volle Breite */
.record-grid { max-width: none !important; }

/* Kopfzeile: Name des Tools, linksbündig neben der Seitenleiste */
#navbar .navbar-right::before {
    content: 'ATTI Organisation Management';
    position: fixed; top: calc(var(--top-bar-height, 32px) / 2);
    left: calc(var(--navbar-width, 14.5rem) + 24px);
    transform: translateY(-50%);
    font-size: 22px; font-weight: 600; letter-spacing: .3px;
    color: var(--text-color, #333); white-space: nowrap; pointer-events: none; z-index: 1;
}
body.minimized #navbar .navbar-right::before { left: calc(var(--navbar-minimized-width, 3.125rem) + 24px); }
@media (max-width: 991px) { #navbar .navbar-right::before { font-size: 18px; } }
@media (max-width: 767px) { #navbar .navbar-right::before { display: none; } }

/* ===== Design 02.11.2026: Farbschema (abgeleitet aus dem ATTI-Logo: Petrol #034859, Gold #edbd2e) ===== */
:root {
    --brand-primary: #034859;
    --brand-primary-5: #033f4e;
    --brand-primary-10: #023642;
    --brand-primary-lighten-10: #0a6178;
    --brand-primary-lighten-30: #c4dbe1;
    --link-color: #034859;
    --panel-primary-bg: #e3eef1;
    --state-primary-text: #034859;
    --panel-primary-text: #034859;
    --btn-primary-bg: #034859;
    --btn-primary-border: #034859;
    --btn-primary-hover-bg: #023642;
    --btn-primary-hover-border: #023642;
    --btn-primary-active-bg: #022b35;
    --btn-primary-active-border: #02252e;
    --select-item-active-bg: #034859;
    --atti-card-bg: #fff;
    --atti-attention: #b45309;
    --atti-attention-bg: #fff7ed;
}

/* ===== Portal-Startseite ===== */
.panel:has(.atti-portal-start) > .panel-heading { display: none; }
.panel:has(.atti-portal-start) { background: transparent; border: 0; box-shadow: none; }
.panel:has(.atti-portal-start) > .panel-body { padding: 0; }
.atti-portal-start { padding: 4px 0; }
.atti-welcome { font-size: 20px; font-weight: 600; margin: 0 0 16px; }

.atti-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.atti-tile {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
    text-align: left; background: var(--atti-card-bg); border: 1px solid var(--default-border-color, #ddd); border-left: 4px solid var(--brand-primary);
    border-radius: 8px; padding: 12px 16px; cursor: pointer; color: inherit; font: inherit;
}
.atti-tile:hover, .atti-tile:focus-visible { box-shadow: 0 2px 8px rgba(0,0,0,.08); outline: none; }
.atti-tile .fas { grid-row: 1 / 3; font-size: 20px; color: var(--brand-primary); width: 24px; text-align: center; }
.atti-tile-label { font-size: 13px; color: var(--text-muted-color, #6b7280); }
.atti-tile-value { font-size: 22px; font-weight: 600; line-height: 1.2; }
.atti-tile.is-attention { border-left-color: var(--atti-attention); background: var(--atti-attention-bg); }
.atti-tile.is-attention .fas, .atti-tile.is-attention .atti-tile-value { color: var(--atti-attention); }

.atti-onb:empty { display: none; }

.atti-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); grid-auto-flow: dense; gap: 16px; align-items: start; }
.atti-grid > .atti-tickets { grid-column: 1 / -1; }
.atti-grid > .atti-tickets:empty { display: none; }
.atti-card {
    background: var(--atti-card-bg); border: 1px solid var(--default-border-color, #ddd); border-radius: 8px;
    padding: 16px 18px; margin-bottom: 12px; scroll-margin-top: 80px;
}
.atti-grid .atti-card { margin-bottom: 0; }
.atti-card-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.atti-card-title .fas { color: var(--brand-primary); margin-right: 8px; }
.atti-card-text { max-width: 75ch; margin: 0 0 12px; }
.atti-card .table { margin-bottom: 12px; }
.atti-card .btn { margin-bottom: 4px; }
@media (max-width: 767px) {
    .atti-grid { grid-template-columns: 1fr; }
    .atti-tiles { grid-template-columns: 1fr; }
}

/* ===== Fußzeile: ATTI vor dem (lizenzrechtlich zu erhaltenden) EspoCRM-Hinweis ===== */
#footer::before { content: 'ATTI Organisation Management · UIC'; display: block; font-size: 12px; color: var(--text-muted-color, #6b7280); margin-bottom: 2px; }
#footer .credit { opacity: .7; }

/* Startseite ohne weißen Dashlet-Hintergrund; Bestätigungsdatum in eigener Zeile */
.panel:has(.atti-portal-start) { background-image: none; }
.grid-stack-item-content:has(.atti-portal-start) { box-shadow: none; }
.atti-card .atti-data-info { display: block; margin: 6px 0 0 !important; }

/* Info-Farbe (z. B. Status „Zugewiesen“) passend zum Petrol statt Espo-Lila */
:root {
    --brand-info: #2f8aa8; --brand-info-10: #26718a;
    --state-info-text: #24687f; --state-info-bg: #e2f1f6; --state-info-border: #c9e4ee;
    --state-info-text-10: #1c5265; --state-info-bg-5: #c9e4ee; --state-info-bg-10: #b3d9e6;
    --btn-info-bg: #2f8aa8; --btn-info-border: #2f8aa8; --btn-info-hover-bg: #26718a; --btn-info-hover-border: #26718a;
    --btn-info-active-bg: #1f5f75; --btn-info-active-border: #1c586c;
    --panel-info-bg: #e2f1f6; --panel-info-text: #24687f; --panel-info-border: #e2f1f6;
}
#dashlet-atti-portal-start.panel { background: transparent !important; border: 0 !important; box-shadow: none !important; }
@media (max-width: 600px) { .atti-card .table td:last-child { display: none; } .atti-card .table td:first-child { width: 36px !important; } .atti-card .table td:nth-child(3) { width: auto !important; } }

/* To-do: Bereiche ohne offene Punkte als aufklappbare Liste */
.atti-todo-done { margin-top: 8px; }
.atti-todo-done summary { cursor: pointer; }
.atti-todo-done-list { columns: 2; column-gap: 24px; margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.atti-todo-done-list a { color: var(--text-muted-color, #6b7280); }

/* Onboarding-Checkliste (Startseite und Unternehmensseite im Portal) */
.atti-onb-list { list-style: none; padding: 0; margin: 0 0 10px; }
.atti-onb-list li { margin: 3px 0; }
.atti-onb-list .fas { margin-right: 8px; }
.atti-onb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.atti-onb-actions .btn { margin: 0; }
.atti-onb-actions .atti-onb-reported { flex-basis: 100%; }
.atti-onb-box { margin-bottom: 16px; border-left: 4px solid var(--brand-primary); }

/* Hilfe-Knopf auf dem Handy neben der Glocke */
@media (max-width: 767px) { #navbar .atti-help-item { position: absolute; top: 0; right: 48px; z-index: 2; } }
