:root {
    --page-width: 1060px;
}

.site-header {
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-inline-start: auto;
}

.header-actions form {
    margin: 0;
}

.header-actions .header-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.welcome.form-card,
.form-card {
    width: min(880px, calc(100% - 32px));
}

.form-card > * {
    max-width: 580px;
}

.form-card .company-form {
    width: 100%;
    max-width: 580px;
}

.form-card > .description {
    text-align: center;
}

.form-card:has(> .form-delete-actions) {
    padding-bottom: clamp(24px, 4vw, 40px);
}

.form-card > .form-delete-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    max-width: none;
    width: 100%;
    margin-top: 40px;
}

.company-overview {
    max-width: 1600px;
}

.picker-list {
    max-width: 1020px;
}

.company-address {
    margin: 0 0 6px;
    color: var(--muted-color);
    overflow-wrap: anywhere;
}

.company-back {
    padding: 10px 16px;
}

.team-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.team-actions .button {
    min-width: 84px;
    white-space: nowrap;
}

.team-page .data-table :is(th, td) {
    vertical-align: middle;
}

.team-page .data-table td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 16px;
    width: calc(100% - 32px);
    max-width: 1060px;
}

.status-message > span {
    flex: 1;
    overflow-wrap: anywhere;
}

.message-close {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 26px;
    cursor: pointer;
}

.message-close[hidden] {
    display: none;
}

.message-close:hover {
    background: rgb(22 101 52 / 8%);
}

.message-close:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.dashboard-stat {
    border-radius: 16px;
    border-top: 3px solid var(--stat-color, #276cf5);
    background: linear-gradient(145deg, #fff 55%, #f0f6ff);
    box-shadow: 0 4px 14px rgb(23 43 77 / 5%);
}

.dashboard-stat strong {
    color: var(--stat-color, #276cf5);
}

.stat-ok {
    --stat-color: #166534;
}

.stat-missing {
    --stat-color: #92400e;
}

.stat-issue {
    --stat-color: #991b1b;
}

@media (max-width: 600px) {
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions .header-logout {
        padding-inline: 10px;
    }

    .form-card > .form-delete-actions {
        margin-top: 28px;
    }
}

/* Follow-up: device choices, delete icons, summaries and fridge list. */
.device-field { padding: 0; border: 0; min-width: 0; }
.device-field legend { font-weight: 600; margin-bottom: 10px; }
.device-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-field .device-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.form-field .device-choice input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.device-choice span { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px; border: 1px solid #8ab5ff; border-radius: 12px; background: #f3f8ff; color: #184f9e; font-weight: 600; }
.device-choice input:checked + span { border-color: #276cf5; background: linear-gradient(120deg, #d6e5ff, #d7f3fb); color: #123b7a; box-shadow: inset 0 0 0 1px #276cf5; }
.device-choice input:checked + span::before { content: "✓"; margin-right: 8px; }
.device-choice input:focus-visible + span { outline: 3px solid #276cf5; outline-offset: 3px; }
.device-choice:hover span { border-color: #276cf5; }
.form-actions { flex-wrap: wrap; align-items: center; }
.button.icon-delete, .form-actions .button.icon-delete { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 10px; }
.icon-delete svg { display: block; flex-shrink: 0; }
.fridge-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.summary-fridge-heading a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; text-decoration: none; color: var(--text-color); border-bottom: 2px solid #b9d5ff; padding-block: 8px; }
.summary-fridge-heading a:hover { color: #1857be; border-color: #276cf5; }
.summary-fridge-hint { color: #1857be; font-size: 14px; font-weight: 600; }
.summary-table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 16px 0 36px; }
.summary-table-footer p { margin: 0; }
.summary-table-footer > a { margin-left: auto; }
.fridge-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 28px 0; }
.fridge-list-card { padding: clamp(24px, 4vw, 40px); border: 1px solid #80aaff; border-radius: 24px; background: linear-gradient(180deg, #fff 50%, #f1f7ff 82%, #d8e5ff); box-shadow: 0 8px 24px rgb(39 108 245 / 5%); }
.fridge-list-card h2 { margin: 0 0 16px; overflow-wrap: anywhere; }
.fridge-list-card .device-badge { display: table; margin: 0 0 28px; padding: 6px 12px; border-radius: 8px; background: #e7f1ff; color: #184f9e; font-size: 14px; }
@media (max-width: 640px) { .fridge-list-grid { grid-template-columns: 1fr; } .summary-table-footer { align-items: flex-start; } }
