/* Compatibilidade: markup do painel edge + panel.css host001 */

.panel-head {
    margin-bottom: 1rem;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink, #0b1f3b);
}

.panel-head h2 svg,
.panel-section h2 svg,
.empty-state svg,
.btn svg,
.preview-toolbar svg {
    width: 1.125rem;
    height: 1.125rem;
    max-width: 1.125rem;
    max-height: 1.125rem;
    flex-shrink: 0;
}

.empty-state svg {
    width: 2.5rem;
    height: 2.5rem;
    max-width: 2.5rem;
    max-height: 2.5rem;
    opacity: 0.45;
}

.panel-head p,
.panel-section .muted {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--muted, #5c6f86);
    max-width: 60ch;
}

.panel-body {
    padding-top: 0.25rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(217, 228, 240, 0.82);
    border-radius: 12px;
    background: var(--panel, #fff);
    box-shadow: 0 8px 24px rgba(11, 31, 59, 0.06);
}

.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted, #5c6f86);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink, #0b1f3b);
}

.stat-value.accent {
    color: var(--brand-700, #1980e7);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.form-grid .span-full {
    grid-column: 1 / -1;
}

.field label,
.form-grid label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted, #5c6f86);
    margin-bottom: 0.35rem;
}

.field input,
.form-grid input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(217, 228, 240, 0.95);
    border-radius: 8px;
    font: inherit;
}

.check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
}

.check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.check-label input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    max-width: 1.05rem;
    max-height: 1.05rem;
    flex-shrink: 0;
    accent-color: var(--brand-700, #1980e7);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

.routes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.routes-table th,
.routes-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(217, 228, 240, 0.8);
    text-align: left;
}

.apply-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: var(--brand-100, #e8f4fd);
    border: 1px solid rgba(25, 128, 231, 0.2);
}

.preview-box {
    max-height: 420px;
    overflow: auto;
    font-size: 0.78rem;
    padding: 1rem;
    border-radius: 8px;
    background: #0b1f3b;
    color: #e8f0fa;
}

.flash.success {
    background: #e8f8ef;
    color: #0d5c2e;
    border: 1px solid #b8e6c8;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.flash.error {
    background: #fdeeed;
    color: #8b1a12;
    border: 1px solid #f5c4c0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sidebar .brand img {
    width: 42px;
    height: 42px;
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.content .page {
    padding: 0 0 2rem;
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
