:root {
    --bg: #f5f6fa;
    --card: #ffffff;
    --border: #dcdde1;
    --text: #2f3640;
    --text-muted: #718093;
    --green: #27ae60;
    --green-bg: #e8f8f0;
    --red: #e74c3c;
    --red-bg: #fde8e8;
    --blue: #2980b9;
    --blue-bg: #e8f0f8;
    --yellow: #f39c12;
    --yellow-bg: #fef5e7;
    --purple: #8e44ad;
    --purple-bg: #f3e8f9;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Navigation */
.header-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: #f0f0f0;
}

.nav-link.active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

/* Task indicator in header */
.task-indicator {
    background: var(--purple);
    color: white;
    border-color: var(--purple);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.task-indicator.hidden {
    display: none;
}

.task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: pulse 1s ease-in-out infinite;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-picker label {
    font-weight: 500;
    color: var(--text-muted);
}

.date-picker input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

main {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Buttons */
.btn, button {
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.15s;
}

.btn:hover, button:hover {
    opacity: 0.85;
}

#btn-load {
    background: var(--blue);
    color: white;
}

#btn-prev, #btn-next {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    font-size: 1rem;
}

.btn-approve-all {
    background: var(--green);
    color: white;
}

.btn-review-all {
    background: var(--yellow);
    color: white;
}

.btn-reset-all {
    background: var(--card);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-unapprove-all {
    background: var(--red);
    color: white;
}

.bulk-actions {
    display: flex;
    gap: 8px;
}

/* Approval actions */
.approval-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
    display: inline-block;
}

.badge-approved { background: var(--green-bg); color: var(--green); }
.badge-reviewed { background: var(--yellow-bg); color: var(--yellow); }
.badge-pending { background: #fdf3ea; color: #d5995d; }
.badge-pending.clickable { cursor: pointer; }
.badge-pending.clickable:hover { filter: brightness(0.95); text-decoration: underline; }
.badge-no-data { background: #eee; color: #999; }

.btn-sm {
    padding: 3px 10px;
    font-size: 0.75rem;
}

.btn-approve {
    background: var(--green);
    color: white;
}

.btn-review {
    background: var(--yellow);
    color: white;
}

.btn-demote {
    background: var(--card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 3px 8px;
    font-size: 0.7rem;
}

.btn-unapprove {
    background: var(--card);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Send All Ready button */
.btn-send-all {
    background: var(--green);
    color: white;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-send-all:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Summary */
.summary {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.summary-chip {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.chip-approved { background: var(--green-bg); color: var(--green); }
.chip-reviewed { background: var(--yellow-bg); color: var(--yellow); }
.chip-pending { background: #fdf3ea; color: #d5995d; }
.chip-no-data { background: #eee; color: #999; }
.chip-issues { background: var(--red-bg); color: var(--red); }

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

thead th {
    text-align: left;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 2px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

tbody tr:hover {
    background: #f8f9fa;
}

.empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* Approval button */
.approve-btn {
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 100px;
}

.approve-btn.approved {
    background: var(--green);
    color: white;
}

.approve-btn.not-approved {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red);
}

/* Issues button */
.issues-btn {
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid transparent;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.issues-btn.has-issues {
    background: var(--yellow-bg);
    color: var(--yellow);
    font-weight: 600;
}

/* Report tags */
.report-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.report-tag {
    background: #eee;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
}

.tab {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 14px;
    font-size: 0.8rem;
}

.tab.active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

/* Reports container */
#reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.report-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.report-card.ready {
    border-left: 4px solid var(--green);
}

.report-card.pending {
    border-left: 4px solid var(--yellow);
}

.report-card.sent {
    border-left: 4px solid var(--blue);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.report-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.report-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.report-flags {
    display: flex;
    gap: 4px;
}

.flag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.flag-preview { background: var(--purple-bg); color: var(--purple); }
.flag-debug { background: var(--yellow-bg); color: var(--yellow); }

.report-plants {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.plant-chip {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.plant-chip.approved { background: var(--green-bg); color: var(--green); }
.plant-chip.reviewed { background: var(--yellow-bg); color: var(--yellow); }
.plant-chip.not-approved { background: var(--red-bg); color: var(--red); }

.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.report-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.status-ready { color: var(--green); }
.status-pending { color: #d5995d; }
.status-reviewed { color: var(--yellow); }
.status-approved { color: var(--green); }
.status-sent { color: var(--blue); }
.status-no_data { color: #999; }
.status-sending { color: var(--purple); font-weight: 700; }
.status-queued { color: var(--yellow); font-weight: 700; }

/* Report state badges */
.report-state-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.state-no-data  { background: #eee;              color: #999; }
.state-pending  { background: #fdf3ea;           color: #d5995d; }
.state-reviewed { background: var(--yellow-bg);   color: var(--yellow); }
.state-approved { background: var(--green-bg);    color: var(--green); }
.state-sent     { background: var(--blue-bg);     color: var(--blue); }

.btn-send {
    background: var(--green);
    color: white;
    padding: 6px 18px;
}

.btn-send:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-send:disabled:hover {
    opacity: 0.6;
}

.btn-resend {
    background: var(--blue);
    color: white;
    padding: 6px 18px;
}

.sent-info {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1rem;
}

.modal-close {
    background: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    padding: 0 4px;
}

.modal-body {
    padding: 18px;
}

.add-issue {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.add-issue input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.btn-add {
    background: var(--blue);
    color: white;
}

#issue-list {
    list-style: none;
}

#issue-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

#issue-list li:last-child {
    border-bottom: none;
}

.issue-text {
    flex: 1;
    font-size: 0.9rem;
}

.issue-text.solved {
    text-decoration: line-through;
    color: var(--text-muted);
}

.issue-actions {
    display: flex;
    gap: 4px;
}

.issue-actions button {
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-solve {
    background: var(--green-bg);
    color: var(--green);
}

.btn-unresolve {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.btn-delete {
    background: var(--red-bg);
    color: var(--red);
}

/* Sending spinner */
.sending {
    opacity: 0.6;
    pointer-events: none;
}

/* Report card sending/queued states */
.report-card.sending {
    border-color: var(--purple);
    border-width: 2px;
    background: linear-gradient(135deg, #fff, var(--purple-bg));
    animation: sendingPulse 1.5s ease-in-out infinite;
    opacity: 1;
    pointer-events: auto;
}

.report-card.queued {
    border-color: var(--yellow);
    border-width: 2px;
    background: linear-gradient(135deg, #fff, var(--yellow-bg));
}

@keyframes sendingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(142, 68, 173, 0); }
}

.btn-sending {
    background: var(--purple);
    color: white;
    padding: 6px 18px;
    cursor: not-allowed;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.toast-success { background: var(--green); color: white; }
.toast-error { background: var(--red); color: white; }
.toast-info { background: var(--blue); color: white; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
    }
    #reports-container {
        grid-template-columns: 1fr;
    }
}

/* Live Log Modal */
.modal-log-content {
    width: 720px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.log-modal-body {
    flex: 1;
    padding: 0;
    min-height: 0;
}

.log-output {
    background: #1e1e2e;
    color: #cdd6f4;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 14px;
    height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-line {
    padding: 1px 0;
}

.log-success { color: #a6e3a1; }
.log-error { color: #f38ba8; }
.log-info { color: #89b4fa; }
.log-dim { color: #6c7086; }

.log-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
}

.log-status {
    font-size: 0.85rem;
    font-weight: 500;
}

.log-status-success { color: var(--green); }
.log-status-error { color: var(--red); }
.log-status-info { color: var(--blue); }

.btn-close-log {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 18px;
}

.report-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-view-log {
    background: var(--card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* Active Task Banner */
.active-task-banner {
    background: linear-gradient(135deg, var(--blue-bg), var(--purple-bg));
    border-bottom: 2px solid var(--blue);
    padding: 8px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.active-task-banner.hidden {
    display: none;
}

.task-queue-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    position: relative;
}

.task-queue-item + .task-queue-item {
    border-top: 1px solid rgba(0,0,0,0.08);
}

.task-queue-item.pending {
    opacity: 0.7;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--yellow);
    animation: pulse 1.5s ease-in-out infinite;
}

.task-status-indicator.running {
    background: var(--blue);
}

.task-status-indicator.pending {
    background: var(--yellow);
}

.task-status-indicator.completed {
    background: var(--green);
    animation: none;
}

.task-status-indicator.failed {
    background: var(--red);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.current-report {
    background: var(--blue);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.current-report.waiting {
    background: var(--yellow);
    color: var(--text);
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-text {
    font-weight: 600;
    color: var(--blue);
}

.task-actions {
    display: flex;
    gap: 8px;
}

.btn-cancel-task {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cancel-task:hover {
    background: var(--red);
    color: white;
}

.task-status-indicator.stale {
    background: var(--yellow);
    animation: none;
}

.task-status-indicator.cancelled {
    background: var(--text-muted);
    animation: none;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: var(--blue);
    transition: width 0.3s ease;
}

/* Frozen data status */
.badge-frozen { background: var(--blue-bg); color: var(--blue); }
.badge-no-frozen { background: var(--yellow-bg); color: var(--yellow); }

.frozen-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chip-frozen { background: var(--blue-bg); color: var(--blue); }

.plant-chip.has-frozen { 
    border: 1px solid var(--blue);
}

.plant-chip.no-frozen {
    opacity: 0.7;
}

.report-card.no-frozen {
    border-left: 4px solid var(--yellow);
    background: linear-gradient(to right, var(--yellow-bg) 0%, var(--card) 30%);
}

.flag-no-frozen { 
    background: var(--red-bg); 
    color: var(--red); 
}

.missing-frozen-warning {
    background: var(--yellow-bg);
    color: var(--yellow);
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.plant-actions {
    display: flex;
    gap: 4px;
}

.btn-preview {
    background: var(--blue);
    color: white;
}

.btn-preview:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-recalc {
    background: var(--green);
    color: white;
    font-size: 0.7rem;
}

.btn-recalc:hover {
    background: #27ae60;
}

.btn-calculate {
    background: var(--purple);
    color: white;
    padding: 4px 10px;
    font-size: 0.9rem;
}

.btn-calculate:disabled {
    background: #bdc3c7;
}

.btn-calculate-all {
    background: var(--purple);
    color: white;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-calculate-all:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.section-actions {
    display: flex;
    gap: 8px;
}

/* Preview Modal */
.modal-preview-content {
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.preview-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.preview-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
    justify-content: flex-end;
}

.preview-modal-footer .btn-approve {
    background: #2e7d32;
    color: white;
}

.preview-modal-footer .btn-approve:hover {
    background: #1b5e20;
}

.preview-modal-footer .btn-approved {
    background: #81c784;
    color: white;
    cursor: default;
}

.preview-modal-footer .btn-secondary {
    background: #757575;
    color: white;
}

.preview-modal-footer .btn-secondary:hover {
    background: #616161;
}

#preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Stoppages Sub-table (Collapsible) --- */
.plant-row td:first-child {
    white-space: nowrap;
}

.plant-row td:first-child > * {
    vertical-align: middle;
}

.btn-expand {
    background: transparent;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s;
    vertical-align: middle;
    margin-right: 6px;
}

.btn-expand:hover {
    background: var(--border);
}

.expand-chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    display: inline-block;
}

.btn-expand.expanded .expand-chevron {
    transform: rotate(90deg);
}

.expand-placeholder {
    width: 24px;
    display: inline-block;
    margin-right: 6px;
}

.stoppages-row {
    background: #f8f9fa;
}

.stoppages-row.hidden {
    display: none;
}

.stoppages-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--border);
}

.stoppages-container {
    padding: 12px 16px 16px 40px;
    background: #fafbfc;
    border-top: 1px solid var(--border);
}

.stoppages-loading,
.stoppages-error,
.stoppages-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stoppages-error {
    color: var(--red);
}

.stoppages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    box-shadow: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stoppages-table thead th {
    background: #ff671d;
    color: white;
    padding: 8px 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: none;
}

.stoppages-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    line-height: 1.4;
}

.stoppages-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.stoppages-table tbody tr:hover {
    background: #eef1f4;
}

/* Debug links in stoppages table */
.debug-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.debug-link:hover {
    text-decoration: underline;
    color: #1a5276;
}

.inverter-link {
    color: #2980b9;
}

.loss-link {
    color: #8e44ad;
}

/* Inverter preview collapsible row */
.expand-cell {
    width: 30px;
    padding: 4px !important;
    text-align: center;
}

.row-number-cell {
    width: 30px;
    padding: 4px !important;
    text-align: center;
    color: #6c757d;
    font-size: 0.85em;
}

.btn-expand-inv {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #6c757d;
    transition: all 0.2s;
}

.btn-expand-inv:hover {
    background: #e9ecef;
    color: #495057;
}

.btn-expand-inv .expand-chevron {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 10px;
}

.btn-expand-inv.expanded .expand-chevron {
    transform: rotate(90deg);
}

.inverter-preview-row {
    background: #f1f3f5;
}

.inverter-preview-row.hidden {
    display: none;
}

.inverter-preview-row td {
    padding: 0 !important;
}

.inverter-preview-container {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 8px;
}

.inverter-preview-loading {
    color: #6c757d;
    font-style: italic;
    padding: 12px;
    text-align: center;
}

.inverter-preview-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 4px;
}
