.load-form-panel,
.profile-list-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);
}

.load-form-panel h2,
.section-heading h2 { margin-bottom: 0; }

#load-profile-form {
    display: grid;
    grid-template-columns: 1.15fr .8fr .8fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

#load-profile-form label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

#load-profile-form input,
#load-profile-form select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: #071421;
    font: inherit;
}

.comment-field { grid-column: span 3; }
.power-input { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.power-input > span { color: var(--muted); }
.form-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }

.day-copy-panel {
    display: grid;
    grid-template-columns: minmax(250px, 1.6fr) minmax(145px, .7fr) minmax(145px, .7fr) auto;
    align-items: end;
    gap: 14px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.day-copy-panel h3 { margin: 0 0 4px; }
.day-copy-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.day-copy-panel label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.day-copy-panel select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: #071421;
    font: inherit;
}

.primary-button,
.secondary-button,
.row-button {
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #398765;
    border-radius: 9px;
    color: #effff6;
    background: #176342;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.secondary-button,
.row-button { border-color: var(--line); color: var(--text); background: #172a43; }
.row-button.delete { border-color: #713641; color: #ffd3d7; background: #421c25; }
.primary-button:disabled,
.row-button:disabled { opacity: .55; cursor: wait; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 28px 0 14px;
}

.section-heading .eyebrow { margin-bottom: 3px; }

.week-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.day-chart-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(20, 39, 65, .97), rgba(9, 23, 40, .97));
}

.day-chart-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.day-chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.day-chart-head h3 { margin: 0; font-size: 20px; }
.day-energy { color: var(--green); font-size: 18px; }
.day-capacities { display: flex; align-items: flex-end; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; text-align: right; }
.day-capacities strong { margin-left: 5px; }
.day-energy-under-800 { color: var(--solar); font-size: 16px; }
.load-chart-wrap { position: relative; height: 225px; margin-top: 10px; }
.load-chart-wrap canvas { display: block; width: 100%; height: 100%; }

.load-tooltip {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: rgba(5, 15, 27, .96);
    font-size: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.load-tooltip[hidden] { display: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.empty-state { padding: 22px 0 5px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
    #load-profile-form { grid-template-columns: repeat(2, 1fr); }
    .comment-field { grid-column: span 2; }
    .day-copy-panel { grid-template-columns: repeat(2, 1fr); }
    .day-copy-panel > div { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .week-charts { grid-template-columns: 1fr; }
    .day-chart-card:last-child:nth-child(odd) { grid-column: auto; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 520px) {
    #load-profile-form { grid-template-columns: 1fr; }
    .comment-field { grid-column: auto; }
    .form-actions { align-items: stretch; flex-direction: column; }
    .day-copy-panel { grid-template-columns: 1fr; }
    .day-copy-panel > div { grid-column: auto; }
    .load-chart-wrap { height: 205px; }
}
.profile-set-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);
}

.profile-set-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-set-heading h2 { margin: 0; }
.active-profile-badge { padding: 8px 11px; border: 1px solid #398765; border-radius: 999px; color: var(--green); background: #0c1b2d; font-weight: 750; }
.profile-set-controls { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr); gap: 14px; align-items: end; }
.profile-set-controls > label > span,
#new-profile-set-form label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.profile-set-controls select,
.profile-set-controls input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #071421; font: inherit; }
#new-profile-set-form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; gap: 10px; align-items: end; }
.profile-set-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
    .profile-set-heading { align-items: flex-start; flex-direction: column; }
    .profile-set-controls { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .profile-set-panel { padding: 15px; }
    #new-profile-set-form { grid-template-columns: 1fr; }
}
