.storage-settings,
.storage-days-panel {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #081421;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

.settings-heading,
.storage-days-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-heading h2,
.storage-days-heading h2 { margin: 0; }
.active-storage-model { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: #0c1b2d; }
.active-storage-model span { color: var(--muted); }
.active-storage-model strong { color: var(--green); }

#storage-settings-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    align-items: end;
    gap: 13px;
}

#storage-settings-form label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
#storage-settings-form input {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: #071421;
    font: inherit;
}

.unit-input { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.unit-input > span { color: var(--muted); }
.storage-primary-button { min-height: 44px; padding: 9px 14px; border: 1px solid #398765; border-radius: 9px; color: #effff6; background: #176342; font: inherit; font-weight: 750; cursor: pointer; }
.storage-primary-button:disabled { opacity: .55; cursor: wait; }
.storage-explanation { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.storage-month-navigation { margin-bottom: 14px; }
.storage-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.storage-summary .capacity-card strong { font-size: clamp(23px, 3.6vw, 36px); }
.storage-chart-wrap { position: relative; height: min(58vh, 500px); min-height: 330px; }
.storage-chart-wrap canvas { display: block; width: 100%; height: 100%; }

.storage-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 14px 12px; }
.storage-legend span { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #0c1b2d; }
.storage-legend i { width: 12px; height: 15px; border-radius: 3px; background: var(--green); }
.storage-legend .partial i { background: #f4c84a; }
.storage-legend .target i { width: 22px; height: 0; border-top: 2px dashed #fff; border-radius: 0; background: none; }

.storage-table-wrap { overflow-x: auto; }
.storage-days-panel table { width: 100%; border-collapse: collapse; }
.storage-days-panel th,
.storage-days-panel td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.storage-days-panel th:first-child,
.storage-days-panel td:first-child { text-align: left; }
.storage-days-panel th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.storage-full { color: var(--green); font-weight: 750; }
.storage-partial { color: #f4c84a; font-weight: 750; }
.storage-none { color: var(--muted); }

@media (max-width: 950px) {
    #storage-settings-form { grid-template-columns: repeat(2, 1fr); }
    .storage-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .settings-heading,
    .storage-days-heading { align-items: flex-start; flex-direction: column; }
    #storage-settings-form { grid-template-columns: 1fr; }
    .storage-summary { grid-template-columns: 1fr; }
    .storage-chart-wrap { height: 390px; }
}
