@import url("css/app.css");

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    margin: 0;
}

.page-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.flash {
    margin: 0;
    padding: 0.85rem 1.2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.55);
}

.flash.success {
    background: rgba(22, 101, 52, 0.45);
    border-color: rgba(34, 197, 94, 0.45);
    color: #d1fae5;
}

.flash.error {
    background: rgba(185, 28, 28, 0.4);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fee2e2;
}

.flash + .flash {
    margin-top: 0.75rem;
}

.card.surface-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard {
    gap: 1.25rem;
}

.dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.dashboard__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.4);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-card:hover,
.dashboard-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.55);
}

.dashboard-card--stat {
    min-height: 100%;
}

.dashboard-card--disabled {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.dashboard-card__primary {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.dashboard-card__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.dashboard-card__stats div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dashboard-card__stats dt {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.75);
}

.dashboard-card__stats dd {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #f8fafc;
}

.dashboard-card__hint {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.78);
}

.dashboard-card--list {
    min-height: 100%;
}

.dashboard-card__empty {
    margin: 0;
    font-style: italic;
    color: rgba(226, 232, 240, 0.7);
}

.dashboard-due-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dashboard-due-list__item {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.55);
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.dashboard-due-list__item a {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
}

.dashboard-due-list__item:hover,
.dashboard-due-list__item:focus-within {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.55);
}

.dashboard-due-list__item.is-overdue {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(127, 29, 29, 0.25);
}

.dashboard-due-list__name {
    font-weight: 600;
    font-size: 1.05rem;
}

.dashboard-due-list__meta {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.75);
}

.card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1rem;
}

.card-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.card-header form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(220px, 1fr);
    gap: 0.75rem 1.5rem;
    align-items: center;
}

.form-grid > label {
    grid-column: 1;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.78);
}

.form-grid > label + input,
.form-grid > label + textarea,
.form-grid > label + select,
.form-grid > label + .checkbox-grid,
.form-grid > label + .hint,
.form-grid > label + .form-actions {
    grid-column: 2;
    width: 100%;
}

.form-grid > input,
.form-grid > textarea,
.form-grid > select {
    width: 100%;
}

.form-grid textarea {
    min-height: 80px;
    resize: vertical;
}

.incoming-area {
    gap: 1.5rem;
}

.incoming-summary {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
}

.incoming-filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1.25rem;
    align-items: center;
}

.incoming-filters .form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.incoming-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.6rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.25);
    width: fit-content;
}

.incoming-checkbox input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #60a5fa;
}

.incoming-hint {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
}

.incoming-hint--warning {
    color: #fcd34d;
}

.incoming-selection {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.incoming-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: space-between;
    align-items: center;
}

.incoming-actions__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.incoming-actions__group--format {
    gap: 0.6rem;
}

.incoming-actions__label {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.78);
}

.incoming-export-mode-select {
    min-width: 14rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
    color: rgba(226, 232, 240, 0.9);
}

.incoming-export-mode-select:focus {
    outline: 2px solid rgba(59, 130, 246, 0.8);
    outline-offset: 2px;
}

.incoming-actions__group--secondary {
    gap: 0.5rem;
}

.incoming-export-button {
    padding: 0.6rem 1.4rem;
    border-radius: 0.6rem;
    border: none;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #f8fafc;
    font-weight: 600;
    box-shadow: 0 16px 30px rgba(30, 64, 175, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.incoming-export-button:disabled {
    cursor: default;
    opacity: 0.5;
    box-shadow: none;
    transform: none;
}

.incoming-export-button:not(:disabled):hover,
.incoming-export-button:not(:disabled):focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(30, 64, 175, 0.45);
}

.incoming-selection-count {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.78);
}

.incoming-table-wrapper {
    overflow-x: auto;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.55);
}

.incoming-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.incoming-table th,
.incoming-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.incoming-table thead th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.65);
    background: rgba(15, 23, 42, 0.65);
}

.incoming-table tbody tr:hover {
    background: rgba(30, 64, 175, 0.12);
}

.incoming-table__select {
    width: 48px;
    text-align: center;
}

.incoming-table__findings,
.incoming-table__actions {
    text-align: center;
    white-space: nowrap;
}

.incoming-table__actions .button-secondary {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.incoming-empty {
    margin: 0;
    padding: 1rem 1.2rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: rgba(226, 232, 240, 0.85);
}

.incoming-detail-placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.6);
    color: rgba(226, 232, 240, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.badge--warning {
    background: rgba(234, 179, 8, 0.18);
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.35);
}

.form-grid > .form-actions {
    grid-column: 2;
    margin-top: 0.5rem;
    justify-content: flex-start;
}

.form-grid > .form-actions button {
    margin-top: 0;
}

.form-grid > button {
    grid-column: 2;
    margin-top: 0.5rem;
    justify-self: flex-start;
}

.permission-options {
    grid-column: 1 / -1;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    gap: 0.6rem;
}

.permission-options legend {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.92);
}

.permission-options__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.permission-options__grid label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.6rem;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.form-grid--compact > label + input,
.form-grid--compact > label + textarea,
.form-grid--compact > label + select {
    max-width: 420px;
}

.form-grid--compact > label + input[type="password"],
.form-grid--compact > input[type="password"] {
    max-width: 320px;
}

.form-grid--compact > label + .checkbox-grid,
.form-grid--compact > .checkbox-grid {
    max-width: 560px;
}

.form-grid--compact .checkbox-grid {
    gap: 0.4rem 0.75rem;
}

.form-grid--compact .checkbox-grid label {
    font-size: 0.9rem;
    padding: 0.3rem 0.5rem;
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid > label,
    .form-grid > label + input,
    .form-grid > label + textarea,
    .form-grid > label + select,
    .form-grid > label + .checkbox-grid,
    .form-grid > label + .hint,
    .form-grid > label + .form-actions,
    .form-grid > .form-actions,
    .form-grid > button {
        grid-column: 1;
    }

    .form-grid > .form-actions {
        margin-top: 0.5rem;
    }

    .incoming-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .incoming-actions__group--format {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .incoming-export-mode-select {
        min-width: 0;
        width: 100%;
    }
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem 1rem;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.signature-block {
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signature-block h3 {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(226, 232, 240, 0.92);
}

.signature-block__preview {
    max-width: 320px;
}

.signature-block__preview img {
    width: 100%;
    height: auto;
    display: block;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4);
    padding: 0.5rem;
}

.signature-preview {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 560px;
}

.signature-preview__stage {
    position: relative;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.65rem;
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.signature-preview__canvas {
    display: block;
    max-width: 100%;
    height: auto;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
    touch-action: none;
}

.signature-preview__info {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
}

.signature-preview__controls {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    align-items: center;
}

.signature-preview__reset {
    margin-right: auto;
}

.signature-preview__autotrim {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.82);
}

.signature-block__hint {
    grid-column: 2;
    margin: 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
}

.signature-block__autotrim {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signature-block__autotrim label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.82);
}

.signature-block__transparency {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    align-items: flex-start;
}

.signature-transparency__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.82);
    min-width: 220px;
}

.signature-transparency__options {
    flex: 1 1 240px;
    display: grid;
    gap: 0.35rem;
}

.signature-transparency__options label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.82);
    font-weight: 500;
}

.signature-transparency__options span {
    font-variant-numeric: tabular-nums;
}

.signature-transparency__options input[type="range"] {
    width: 100%;
    accent-color: #38bdf8;
}

.signature-remove-form {
    margin-top: 0.75rem;
}

.checkbox-grid input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sub-section {
    margin-top: 2.25rem;
}

.sub-section h3 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.customers-area .customers-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 2rem;
}

.customer-sidebar {
    padding: 0.5rem 0.25rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
}

.customer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-list__item {
    display: block;
    background: rgba(12, 24, 48, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.6);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.customer-list__item.is-active {
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.45);
}

.customer-list__item.is-active .customer-list__entry {
    background: rgba(37, 99, 235, 0.16);
}

.customer-list__entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: #e2e8f0;
    text-decoration: none;
    background: transparent;
    position: relative;
    transition: background 0.2s ease;
}

.customer-list__entry::after {
    content: '\203A';
    font-size: 1.4rem;
    color: rgba(148, 163, 184, 0.75);
    transition: color 0.2s ease, transform 0.2s ease;
}

.customer-list__item.is-active .customer-list__entry::after {
    color: rgba(191, 219, 254, 0.95);
    transform: translateX(2px);
}

.customer-list__entry:hover,
.customer-list__entry:focus-visible {
    background: rgba(37, 99, 235, 0.2);
}

.customer-list__name {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.customer-detail {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.customer-section {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.customer-section__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.customer-objects {
    display: grid;
    gap: 1.75rem;
}

.object-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.object-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.object-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Scrollbare Objektliste in Kartenform mit sichtbaren ~5 Zeilen */
.object-list-card {
    background: rgba(12, 24, 48, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    padding: 0.6rem;
    display: grid;
    grid-template-rows: auto 1fr; /* Filter oben, Liste darunter */
    gap: 0.5rem;
    overflow: hidden; /* Scrollen findet in der Liste statt */
    max-height: 300px; /* obere Schranke, verhindert endlose Höhe */
}

.object-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.5rem 0;
}

.object-filter input[type="text"],
.object-filter input[type="search"] {
    width: 100%;
}

.object-list--scroll {
    height: 240px; /* ~5 Zeilen sichtbar, Rest scrollbar */
    overflow-y: auto;
    padding-right: 0.25rem; /* Platz für Scrollbar */
}

/* Fallback: Falls die spezielle Klasse nicht greift, beschränke Listen in den Objektsektionen generell */
#customer-gates .object-list,
#customer-ladders .object-list {
    max-height: 240px;
    overflow-y: auto;
}

/* Sicherstellen, dass die Liste im Grid schrumpfen darf */
.object-list-card .object-list {
    min-height: 0;
}

.object-list__link {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    text-decoration: none;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.object-list__link:hover,
.object-list__link:focus-visible {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(96, 165, 250, 0.55);
}

.object-list__link.is-active {
    background: rgba(59, 130, 246, 0.5);
    border-color: rgba(37, 99, 235, 0.85);
    font-weight: 600;
}

.object-detail {
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(12, 24, 48, 0.7);
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.object-detail h4 {
    margin: 0;
    font-size: 1.1rem;
}

.inspection-history {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.inspection-history h5 {
    margin: 0;
    font-size: 1rem;
    color: rgba(226, 232, 240, 0.92);
}

.inspection-history__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.inspection-history__entry {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(10, 20, 40, 0.65);
    overflow: hidden;
}

.inspection-history__entry[open] {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(15, 32, 58, 0.78);
}

.inspection-history__summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    font-weight: 600;
    color: #e2e8f0;
}

.inspection-history__summary::-webkit-details-marker,
.inspection-history__summary::marker {
    display: none;
}

.inspection-history__summary:focus {
    outline: 2px solid rgba(96, 165, 250, 0.65);
    outline-offset: 2px;
}

.inspection-history__body {
    display: grid;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.inspection-history__title {
    font-weight: 600;
    color: #e2e8f0;
}

.inspection-history__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(59, 130, 246, 0.25);
    font-size: 0.85rem;
    color: rgba(191, 219, 254, 0.95);
    white-space: nowrap;
}

.inspection-history__status.is-final {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(22, 163, 74, 0.25);
    color: rgba(220, 252, 231, 0.95);
}

.inspection-history__meta {
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.inspection-history__meta div {
    display: grid;
    gap: 0.2rem;
}

.inspection-history__meta dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.75);
}

.inspection-history__meta dd {
    margin: 0;
    color: #e2e8f0;
}

.inspection-history__text {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.9);
}

.inspection-history__actions {
    display: flex;
    justify-content: flex-end;
}

.inspection-history__actions form {
    margin: 0;
}

.object-export {
    display: flex;
    justify-content: flex-end;
}

.object-export form {
    margin: 0;
}

.form-hint {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.82);
}

.profile-card .profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, 320px);
    gap: 2rem;
    align-items: start;
}

.profile-form .form-actions {
    margin-top: 0.5rem;
}

.profile-form .form-actions button {
    margin-top: 0;
}

.profile-meta {
    background: rgba(12, 24, 48, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    padding: 1.2rem 1.4rem;
    display: grid;
    gap: 1rem;
}

.profile-meta h3,
.profile-meta h4 {
    margin: 0;
}

.profile-meta__list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.profile-meta__list div {
    display: grid;
    gap: 0.25rem;
}

.profile-meta__list dt {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.85);
}

.profile-meta__list dd {
    margin: 0;
    color: #e2e8f0;
}

.profile-meta__hint {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.82);
}

.profile-meta__customers {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.35rem;
    color: #e2e8f0;
}

.profile-meta__customers li::marker {
    color: rgba(148, 163, 184, 0.9);
}

@media (max-width: 960px) {
    .customers-area .customers-layout {
        grid-template-columns: 1fr;
    }

    .customer-sidebar {
        padding: 0.5rem;
    }

    .customer-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.75rem;
        padding-bottom: 0.25rem;
    }

    .customer-list__item {
        min-width: 180px;
        flex: 0 0 auto;
    }

    .customer-list__entry {
        justify-content: center;
    }

    .profile-card .profile-layout {
        grid-template-columns: 1fr;
    }
}

details.sub-card {
    background: rgba(12, 24, 48, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.6);
}

details.sub-card + details.sub-card {
    margin-top: 1rem;
}

details.sub-card summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #f8fafc;
    list-style: none;
}

details.sub-card summary::-webkit-details-marker {
    display: none;
}

details.sub-card[open] > summary {
    margin-bottom: 0.75rem;
}

details.sub-card form {
    margin-top: 0.5rem;
}

.inline-delete {
    margin-top: 0.85rem;
}

.inline-delete button {
    width: 100%;
}

.hint {
    color: rgba(148, 163, 184, 0.85);
    text-align: center;
    font-style: italic;
}

.stack {
    gap: 0.85rem 1.5rem;
}

.user-status-form {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f8fafc;
    border-radius: 0.55rem;
    padding: 0.55rem 1.1rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.page-branding span {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.8);
}

.login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(14, 116, 144, 0.25), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.35), transparent 60%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1d4ed8 100%);
    padding: 2rem;
}

.login-card {
    background: rgba(12, 24, 48, 0.85);
    border-radius: 1rem;
    padding: 2.5rem 2.75rem;
    width: min(420px, 92vw);
    box-shadow: 0 32px 60px rgba(2, 6, 23, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.3);
    display: grid;
    gap: 1.5rem;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 1.8rem;
}

.login-card .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.login-card button {
    width: 100%;
    margin-top: 0.5rem;
}

.login-hint {
    text-align: center;
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .page-header {
        gap: 1.25rem;
    }

    .page-main {
        gap: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .button-secondary {
        width: 100%;
    }
}
