:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #0f766e;
    --primary-strong: #0b5d56;
    --accent: #0ea5e9;
    --danger: #b91c1c;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

.panel-body {
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

.sideload-msg,
.panel {
    margin: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.06);
}

.sideload-msg {
    padding: 12px;
}

.sideload-msg h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.panel {
    padding: 12px;
    width: calc(100% - 16px);
    box-sizing: border-box;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.panel-header h1 {
    margin: 0;
    font-size: 23px;
    letter-spacing: 0;
    line-height: 1.15;
}

.panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.info-list {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.info-item {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafcff;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
}

.info-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    line-height: 1.35;
    word-break: break-word;
}

.status-section {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.status-section label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
}

#status-select,
#motivo-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    background: #ffffff;
}

#status-select:focus,
#motivo-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.motivo-section {
    margin-top: 10px;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 700;
    width: 100%;
    white-space: normal;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #ffffff;
    box-shadow: 0 8px 14px rgba(15, 118, 110, 0.25);
}

.btn-secondary {
    background: #e8f7ff;
    color: #075985;
}

.status-msg {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
}

.status-msg.error {
    color: var(--danger);
}

.status-msg.success {
    color: var(--primary-strong);
}

.historial-section {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.historial-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
}

.historial-list {
    display: grid;
    gap: 8px;
}

.historial-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
}

.historial-top {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.historial-status {
    font-weight: 800;
    color: #0f172a;
}

.historial-date {
    color: var(--muted);
    font-weight: 600;
}

.historial-meta {
    color: #334155;
}

@media (max-width: 340px) {
    .panel-header h1 {
        font-size: 20px;
    }

    .button-row {
        grid-template-columns: 1fr;
    }
}