


.cabinet-body :where(input[type="date"]:not([data-date-layout="compact"])) {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

.cabinet-body :where(input[type="date"]:not([data-date-layout="compact"]))::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    text-align: center;
}


.cabinet-body #cabinet-section-weight .body-metrics-date-field,
.cabinet-body .habit-edit-reminder-row,
.cabinet-body .habit-edit-reminder-row :is(input[type="time"], input[data-time-input-24h]),
.cabinet-body .sleep-confirmation-form .sleep-observation-fields > label,
.cabinet-body .sleep-confirmation-form .sleep-observation-fields :is(input[type="time"], input[data-time-input-24h]) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.cabinet-body .habit-edit-reminder-row :is(input[type="time"], input[data-time-input-24h]),
.cabinet-body .sleep-confirmation-form .sleep-observation-fields :is(input[type="time"], input[data-time-input-24h]) {
    display: block;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.cabinet-body .habit-edit-reminder-row :is(input[type="time"], input[data-time-input-24h])::-webkit-date-and-time-value,
.cabinet-body .sleep-confirmation-form .sleep-observation-fields :is(input[type="time"], input[data-time-input-24h])::-webkit-date-and-time-value {
    width: 100%;
    min-width: 0;
    text-align: center;
}

.cabinet-body input[data-time-input-24h] {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.cabinet-body .app-history-table {
    max-height: 360px;
    overflow: auto;
    border: 1px solid #000;
    background: #fff;
}

.cabinet-body .app-history-table table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    text-align: right;
}

.cabinet-body .app-history-table caption {
    padding: 10px 8px;
    background: #000;
    color: #fff;
    text-align: left;
    text-transform: uppercase;
}

.cabinet-body .app-history-table thead th {
    position: sticky;
    z-index: 1;
    top: 0;
    background: #ffe76a;
    text-transform: uppercase;
}

.cabinet-body .app-history-table :is(th, td) {
    overflow: hidden;
    border-bottom: 1px solid #000;
    padding: 8px 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
}

.cabinet-body .app-history-table tbody tr:last-child > * {
    border-bottom: 0;
}

.cabinet-body .app-history-table tbody th {
    padding-left: 7px;
    text-align: left;
}

.cabinet-body .app-history-table thead th:first-child {
    padding-left: 7px;
    text-align: left;
}

.cabinet-body .app-history-table tbody th small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #655b57;
    text-overflow: ellipsis;
    text-transform: uppercase;
}


.cabinet-body .app-pill-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0 7px;
    min-width: 0;
    margin: var(--app-pill-choice-margin, 0);
    border: 0;
    padding: 0;
}

.cabinet-body .app-pill-choice-group legend {
    width: 100%;
    margin: 0 0 3px;
    padding: 0;
}

.cabinet-body .app-pill-choice-group > label {
    position: relative;
    display: grid;
    min-height: max(44px, calc(44px / var(--app-scale, 1)));
    place-items: center;
}

.cabinet-body .app-pill-choice-group input {
    position: absolute;
    width: 1px;
    min-width: 1px;
    height: 1px;
    min-height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cabinet-body .app-pill-choice-control {
    box-sizing: border-box;
    display: grid;
    height: 30px;
    min-height: 30px;
    place-items: center;
    border: 1px solid var(--assessment-ink, #000);
    border-radius: var(--app-radius-pill);
    padding: 4px 11px;
    background: var(--assessment-paper, #fff);
    color: var(--assessment-ink, #000);
    cursor: pointer;
}

.cabinet-body .app-pill-choice-group input:focus-visible + span.app-pill-choice-control {
    outline: 3px solid var(--app-focus-ring, #000);
    outline-offset: 3px;
}

.cabinet-body .app-pill-choice-group input:checked + .app-pill-choice-control {
    background: var(--assessment-highlight, #f4d35e);
}

.cabinet-body .app-pill-choice-group input:disabled + .app-pill-choice-control {
    opacity: 0.55;
    cursor: default;
}


.cabinet-body .app-dialog-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cabinet-body .app-dialog-header h2 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.cabinet-body .app-dialog-close {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: var(--app-radius-circle);
    padding: 0;
    background: transparent;
    color: #000;
    cursor: pointer;
}

.cabinet-body .app-dialog-close:hover {
    background: #f4d35e;
}

.cabinet-body .app-dialog-close svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}


.nutrition-day-button {
    border: 1px solid #000;
    background: #fff;
    color: #000;
}

.nutrition-day-button:hover {
    background: #f4d35e;
}

.nutrition-day-picker {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: stretch;
    width: min(100%, 360px);
    min-height: 48px;
    overflow: hidden;
    border: 1px solid #000;
    background: #fff;
}

.nutrition-day-picker strong {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 8px 10px;
    text-align: center;
}

.nutrition-day-button {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 48px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #fff;
    color: #000;
    cursor: pointer;
    touch-action: manipulation;
}

.nutrition-day-button:first-of-type {
    border-right: 1px solid #000;
}

.nutrition-day-button:last-of-type {
    border-left: 1px solid #000;
}

.nutrition-day-button:disabled {
    cursor: default;
    opacity: 0.3;
}

.cabinet-body .nutrition-composer-date-picker {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    border-color: var(--app-line-subtle);
}

.cabinet-body .nutrition-composer-date-picker .nutrition-day-button {
    min-height: 44px;
}

.cabinet-body .nutrition-composer-meals {
    display: grid;
    background: #fff;
}

.cabinet-body .nutrition-composer-day-total {
    display: grid;
    gap: 4px;
    padding: 10px 0;
}

.cabinet-body .nutrition-composer-day-total :is(h3, p) { margin: 0; }

.cabinet-body .cabinet-dialog .nutrition-composer-day-total p { line-height: 1.35; }

.cabinet-body .nutrition-composer-meals-state {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 0;
    border-top: 1px solid var(--app-line-subtle);
    color: #555;
}

.cabinet-body .nutrition-composer-meals-state[hidden] { display: none; }

.cabinet-body .nutrition-composer-meals-retry {
    min-height: 44px; border: 0; padding: 0;
    background: transparent; color: inherit; text-decoration: underline;
    cursor: pointer;
}

.cabinet-body .app-notice.connection-quality-toast .app-callout {
    color: #8a5a00;
}

.cabinet-body .connection-quality-toast p {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.cabinet-body .connection-quality-countdown {
    display: grid;
    place-items: center;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.cabinet-body .connection-quality-countdown > :is(svg, span) {
    grid-area: 1 / 1;
}

.cabinet-body .connection-quality-countdown svg {
    width: 16px;
    height: 16px;
    transform: rotate(-90deg) scale(1.125);
    transform-origin: center;
}

.cabinet-body .connection-quality-countdown circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.cabinet-body .connection-quality-countdown-track {opacity: .18;}

.cabinet-body .connection-quality-countdown-progress {
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 * (1 - var(--connection-quality-progress, 1)));
    transition: stroke-dashoffset .1s linear;
}

@media (prefers-reduced-motion: reduce) {
    .cabinet-body .connection-quality-countdown-progress {transition: none;}
}
