/* =============================================
   FOCUS MODE — Two-panel layout
   ============================================= */

/* The overlay becomes a flex container centering the inner layout */
.focus-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Side-by-side: [template sidebar] [focus modal] */
.focus-inner-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
}

/* The focus modal wrapper takes remaining space */
.focus-modal-wrap {
    flex: 1;
    min-width: 0;
    max-height: 90vh;
    overflow-y: auto;
}

/* =============================================
   TEMPLATES SIDEBAR (inside Focus Mode)
   ============================================= */

.focus-templates-sidebar {
    width: 270px;
    min-width: 270px;
    background: #0f1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    flex-shrink: 0;
}

.fst-header {
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    cursor: default;
    user-select: none;
}

.fst-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.fst-empty {
    color: #94a3b8;
    font-size: 0.8rem;
    text-align: center;
    padding: 20px 8px;
    cursor: default;
}

/* Category group */
.fst-category {
    margin-bottom: 6px;
}

.fst-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: background 0.2s;
    user-select: none;
}

.fst-cat-header:hover {
    background: rgba(59, 130, 246, 0.22);
}

.fst-cat-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.fst-cat-left strong {
    color: #f8fafc;
    font-size: 0.8rem;
}

.fst-cat-count {
    background: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.fst-cat-chevron {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.fst-cat-chevron.open {
    transform: rotate(180deg);
}

.fst-cat-items {
    margin-top: 5px;
    padding-left: 6px;
    display: none;
}

.fst-cat-items.open {
    display: block;
}

/* Template item */
.fst-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.18s, border-color 0.18s;
}

.fst-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
}

.fst-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    user-select: none;
}

.fst-item-header strong {
    color: #f8fafc;
    font-size: 0.78rem;
}

.fst-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.fst-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.fst-edit-btn { color: #3b82f6; }
.fst-del-btn  { color: #94a3b8; }

.fst-item-actions button:hover { opacity: 1; }

.fst-item-preview {
    color: #94a3b8;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    user-select: none;
}

/* Add button at bottom of sidebar */
.fst-add-btn {
    margin: 8px;
    padding: 9px;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    width: calc(100% - 16px);
    text-align: center;
    transition: background 0.2s;
    flex-shrink: 0;
    user-select: none;
}

.fst-add-btn:hover {
    background: rgba(59, 130, 246, 0.25);
}

/* =============================================
   TEMPLATE MINI-MODAL (inside focus overlay)
   ============================================= */

.fst-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fst-modal-inner {
    background: var(--bg-secondary);
    border-radius: 12px;
    width: 480px;
    max-width: 92vw;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.2s ease;
}

.fst-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.fst-modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.15s;
}

.fst-modal-close-btn:hover { opacity: 1; }

.fst-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

/* Hide the dashboard sidebar column when no extra content */
.dashboard-sidebar:empty { display: none; }

/* =============================================
   DASHBOARD LAYOUT (main + sidebar)
   ============================================= */


.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--spacing-lg);
    align-items: start;
    padding: var(--spacing-lg) 0;
}

@media (max-width: 1100px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 600px) {
    .dashboard-sidebar {
        grid-template-columns: 1fr;
    }
}

.dashboard-main {
    min-width: 0;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* =============================================
   CALENDAR HISTORY
   ============================================= */

.calendar-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.calendar-month-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
}

.calendar-legend {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot--ok    { background: var(--color-success); }
.legend-dot--mid   { background: var(--color-warning); }
.legend-dot--low   { background: var(--color-gray); }
.legend-dot--abono { background: #10b981; }

.calendar-grid {
    margin-bottom: var(--spacing-lg);
}

/* =============================================
   CALENDAR HISTORY — Grid
   ============================================= */

.cal-grid-inner {
    margin-bottom: var(--spacing-lg);
}

.cal-header-row,
.cal-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.cal-header-cell {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 2px 0;
    letter-spacing: 0.04em;
}

.cal-header-row {
    margin-bottom: 8px;
}

.cal-body .cal-row:last-child {
    margin-bottom: 0;
}

.cal-cell {
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    position: relative;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.cal-cell--day {
    cursor: pointer;
}

.cal-cell--day:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
    z-index: 1;
}

.cal-cell--today {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 1px var(--color-primary);
}

.cal-cell--empty {
    background: transparent;
    border: none;
}

.cal-cell--weekend {
    background: var(--bg-secondary);
    opacity: 0.55;
}

.cal-cell--ok    { background: rgba(56, 161, 105, 0.25); }
.cal-cell--mid   { background: rgba(214, 158, 46, 0.25); }
.cal-cell--low   { background: rgba(113, 128, 150, 0.18); }
.cal-cell--abono { background: rgba(16, 185, 129, 0.18); }

.cal-day-num {
    font-size: 0.6rem;
    color: var(--text-secondary);
    position: absolute;
    top: 4px;
    left: 5px;
    line-height: 1;
}

.cal-day-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cal-abono-tag {
    font-size: 0.52rem;
    background: rgba(16, 185, 129, 0.35);
    color: #065f46;
    border-radius: 2px;
    padding: 1px 3px;
    position: absolute;
    bottom: 3px;
    right: 3px;
    line-height: 1.2;
    font-weight: 700;
}

.calendar-stats {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.calendar-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    text-align: center;
}

.cal-stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.cal-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Abonos list below stats */
.abonos-summary {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.abonos-summary-title {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--spacing-sm);
}

.abono-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.abono-list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xs);
    padding: 5px 10px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid rgba(16, 185, 129, 0.5);
}

.abono-list-date {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 36px;
}

.abono-list-tipo {
    color: var(--color-success);
    font-weight: 600;
}

.abono-list-motivo {
    color: var(--text-secondary);
}

/* =============================================
   TEMPLATES PANEL
   ============================================= */

.template-category {
    margin-bottom: var(--spacing-md);
}

.template-category-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
}

.template-category-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.template-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.template-item:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-xs);
}

.template-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: var(--spacing-sm);
}

.template-item-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.template-item-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
}

.template-item-preview {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-icon--danger:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

/* =============================================
   TIMER WIDGET
   ============================================= */

.timer-widget {
    text-align: center;
}

.timer-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.timer-display {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    width: 100%;
    text-align: center;
}

.timer-display:hover {
    background: var(--bg-tertiary);
}

.timer-controls {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.timer-hint {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

/* =============================================
   MODAL (Generic, used by Calendar + Templates)
   ============================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    gap: var(--spacing-md);
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* =============================================
   FORM HINT
   ============================================= */

.form-hint {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==============================================
   CNPJ LOOKUP PAGE
   ============================================== */

.cnpj-lookup-page {
    padding: 1.5rem 0;
}

.cnpj-lookup-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cnpj-lookup-layout { grid-template-columns: 1fr; }
}

/* --- Search Panel --- */
.cnpj-search-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 1rem;
}

.cnpj-search-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.cnpj-search-header i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.cnpj-search-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cnpj-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cnpj-search-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.04em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cnpj-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.cnpj-search-btn {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cnpj-search-btn:hover:not(:disabled) { background: var(--accent-primary-hover); }
.cnpj-search-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cnpj-search-btn:active:not(:disabled) { transform: scale(0.97); }

/* --- History --- */
.cnpj-history-section {
    margin-top: 0.5rem;
}

.cnpj-history-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.cnpj-history-title i { color: var(--accent-primary); }

.cnpj-clear-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.78rem;
    padding: 2px 5px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.cnpj-clear-btn:hover { color: var(--color-danger); background: rgba(229,62,62,0.08); }

.cnpj-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 320px;
    overflow-y: auto;
}

.cnpj-hist-item {
    padding: 0.6rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.cnpj-hist-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    transform: translateX(2px);
}

.hist-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.hist-razao {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.hist-cnpj {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-family: monospace;
    flex-shrink: 0;
}

.hist-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.hist-city {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.hist-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hist-status-good { background: rgba(56,161,105,0.15); color: #38a169; }
.hist-status-bad  { background: rgba(229,62,62,0.12);  color: #e53e3e; }
.hist-status-warn { background: rgba(214,158,46,0.12); color: #d69e2e; }

.hist-date {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    margin-left: auto;
}

/* --- Result area --- */
.cnpj-result-area { min-height: 300px; }

.cnpj-placeholder,
.cnpj-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    text-align: center;
    min-height: 260px;
}

.cnpj-placeholder i, .cnpj-loading i { font-size: 2.5rem; opacity: 0.3; }
.cnpj-placeholder p { font-size: 0.9rem; max-width: 28rem; }

.cnpj-loading { flex-direction: row; gap: 0.65rem; padding: 2rem; min-height: auto; }
.cnpj-spinner {
    width: 22px; height: 22px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Dashboard grid --- */
.cnpj-dashboard {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1280px) {
    .cnpj-dashboard { grid-template-columns: 1fr 1fr; }
    .cnpj-zone-ident { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .cnpj-dashboard { grid-template-columns: 1fr; }
    .cnpj-zone-ident { grid-column: 1; }
}

.cnpj-zone {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.1rem 1rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cnpj-zone-good { border-color: rgba(56,161,105,0.35); }
.cnpj-zone-bad  { border-color: rgba(229,62,62,0.35); }
.cnpj-zone-warn { border-color: rgba(214,158,46,0.35); }

.cnpj-zone-good-text .cz-kv-v { color: #38a169 !important; font-weight: 700; }
.cnpj-zone-bad-text  .cz-kv-v { color: #e53e3e !important; font-weight: 700; }
.cnpj-zone-warn-text .cz-kv-v { color: #d69e2e !important; font-weight: 700; }

.cz-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
}

.cz-hero {
    padding: 0.7rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.cz-click { cursor: pointer; }
.cz-click:hover { border-color: var(--accent-primary); background: var(--bg-hover); }

.cz-k {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-tertiary);
    margin-bottom: 0.2rem;
}

.cz-v {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
}

.cz-mono { font-family: 'Courier New', monospace; letter-spacing: 0.04em; }

.cz-cnpj-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.cz-copy-clean {
    background: var(--color-success);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 0.8rem;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.cz-copy-clean:hover { filter: brightness(1.15); transform: scale(1.05); }

.cz-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.cz-kv {
    padding: 0.55rem 0.7rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.cz-kv:hover { border-color: var(--border-color-hover); background: var(--bg-hover); }

.cz-kv-k {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 0.15rem;
}
.cz-kv-v {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}
.cz-kv-has-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}
.cz-kv-clean {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 6px;
    font-size: 0.72rem;
    flex-shrink: 0;
    transition: all 0.2s;
}
.cz-kv-clean:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }

.cz-muted { color: var(--text-tertiary); font-size: 0.82rem; }

.cz-gov-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.cz-gov-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--accent-primary);
    background: rgba(67,97,238,0.08);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.cz-gov-btn:hover { background: rgba(67,97,238,0.18); }
.cz-gov-btn-purple { color: var(--accent-secondary); background: rgba(114,9,183,0.08); }
.cz-gov-btn-purple:hover { background: rgba(114,9,183,0.18); }

.cz-full-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cz-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.2rem 0;
}

.cz-copy-addr {
    margin-top: 0.25rem;
    width: 100%;
    padding: 0.6rem;
    background: rgba(67,97,238,0.08);
    border: 1px solid rgba(67,97,238,0.25);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.cz-copy-addr:hover { background: rgba(67,97,238,0.16); }

.cz-filial-box {
    margin-top: 0.25rem;
    padding: 0.75rem;
    background: rgba(214,158,46,0.07);
    border: 1px solid rgba(214,158,46,0.3);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
}

.cz-filial-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--color-warning);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.cz-filial-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.cz-filial-sigla {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: monospace;
}

.cz-filial-city {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.cz-filial-contact {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 2px 0;
}
.cz-filial-contact i { opacity: 0.6; font-size: 0.7rem; }

.cz-act-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 240px;
    overflow-y: auto;
}

.cz-act {
    padding: 0.55rem 0.7rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}
.cz-act:hover { border-color: var(--accent-primary); background: var(--bg-hover); }
.cz-act.main { border-color: rgba(67,97,238,0.35); }

.cz-act-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    background: rgba(67,97,238,0.1);
    padding: 1px 5px;
    border-radius: 3px;
    width: fit-content;
}
.cz-act-tag.sec { color: var(--text-secondary); background: var(--bg-hover); }

.cz-socios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

@media (max-width: 500px) { .cz-socios-grid { grid-template-columns: 1fr; } }

.cz-socio {
    padding: 0.6rem 0.7rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.cz-socio:hover { border-color: var(--border-color-hover); background: var(--bg-hover); }

.cz-socio-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.cz-socio-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.cz-socio-meta span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.cz-socio-meta span::before {
    content: '·';
    color: var(--accent-primary);
    opacity: 0.7;
}

/* ==============================================
   CEP LOOKUP PAGE
   ============================================== */

.cep-lookup-page {
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.cep-lookup-layout {
    width: 100%;
    max-width: 640px;
}

.cep-search-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.cep-search-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cep-search-header i {
    font-size: 2rem;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.85;
}

.cep-search-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}

.cep-search-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.cep-input-row {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.cep-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.08em;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cep-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.cep-search-btn {
    flex-shrink: 0;
    width: 2.8rem;
    height: 2.8rem;
    padding: 0;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cep-search-btn:hover:not(:disabled) { background: var(--accent-primary-hover); }
.cep-search-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cep-search-btn:active:not(:disabled) { transform: scale(0.97); }

.cep-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cep-spinner {
    width: 22px; height: 22px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.cep-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-tertiary);
}

.cep-placeholder i { font-size: 2rem; opacity: 0.25; }
.cep-placeholder p { font-size: 0.85rem; line-height: 1.6; max-width: 400px; }

/* --- Result card --- */
.cep-result-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.25s ease;
}

.cep-result-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cep-result-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cep-result-sigla {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    font-family: monospace;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.cep-result-city {
    padding: 0.9rem 1.2rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cep-result-city i { color: var(--accent-primary); font-size: 0.95rem; }

.cep-queried {
    padding: 0 1.2rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}
.cep-queried-label { color: var(--text-tertiary); }
.cep-queried-val { font-family: monospace; font-weight: 700; color: var(--text-secondary); }

.cep-info-list {
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.cep-info-row {
    display: grid;
    grid-template-columns: 1.5rem 7rem 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}
.cep-info-row:last-child { border-bottom: none; }
.cep-info-row:hover { background: var(--bg-hover); }

.cep-info-icon { color: var(--accent-primary); font-size: 0.82rem; text-align: center; }
.cep-info-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.cep-info-value { font-size: 0.88rem; color: var(--text-primary); word-break: break-word; }

.cep-copy-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 3px 7px;
    font-size: 0.78rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.cep-copy-btn:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }

.cep-copy-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(67,97,238,0.08);
    border: none;
    border-top: 1px solid rgba(67,97,238,0.2);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.cep-copy-all:hover { background: rgba(67,97,238,0.16); }

.cep-copy-all-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    background: rgba(67,97,238,0.14);
    border: 1px solid rgba(67,97,238,0.3);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    margin: 0.6rem 1.2rem 0;
    align-self: stretch;
}
.cep-copy-all-top:hover {
    background: rgba(67,97,238,0.24);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

/* Not found / Error states */
.cep-not-found {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
}
.cep-not-found i { font-size: 1.5rem; color: var(--color-warning); margin-top: 0.1rem; flex-shrink: 0; }
.cep-not-found.cep-error i { color: var(--color-danger); }
.cep-not-found strong { display: block; color: var(--text-primary); margin-bottom: 0.25rem; }
.cep-not-found p { font-size: 0.88rem; line-height: 1.5; margin: 0; }

@keyframes slideUp {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ==============================================
   ACOMPANHAMENTOS PANEL
   ============================================== */

.acomp-panel {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Header ── */
.acomp-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.acomp-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.acomp-title-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.acomp-title-left i {
    font-size: 1.3rem;
    color: var(--accent-primary);
}

.acomp-title-left h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.acomp-add-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.acomp-add-btn:hover { background: var(--accent-primary-hover); }
.acomp-add-btn:active { transform: scale(0.97); }

/* ── Stats bar ── */
.acomp-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.acomp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 72px;
    text-align: center;
}

.acomp-stat-num {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.acomp-stat-lbl {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.acomp-stat--pending  { color: #f59e0b; }
.acomp-stat--progress { color: #3b82f6; }
.acomp-stat--ok       { color: #10b981; }
.acomp-stat--over     { color: #ef4444; }

/* ── Filter tabs ── */
.acomp-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.acomp-tab {
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.acomp-tab:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.acomp-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* ── List ── */
.acomp-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Empty state ── */
.acomp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
    text-align: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-xl);
}
.acomp-empty i { font-size: 2rem; opacity: 0.3; }
.acomp-empty p { font-size: 0.9rem; color: var(--text-secondary); }

.acomp-empty-add {
    margin-top: 0.25rem;
    padding: 0.5rem 1.2rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
}
.acomp-empty-add:hover { background: var(--accent-primary-hover); }

/* ── Card ── */
.acomp-card {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--pm-border, var(--border-color));
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    animation: slideUp 0.2s ease;
}

.acomp-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.acomp-card--done {
    opacity: 0.55;
    border-color: var(--border-color);
}
.acomp-card--done:hover { opacity: 0.8; }

.acomp-card--overdue {
    border-color: rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.04);
}

/* Priority stripe */
.acomp-priority-stripe {
    width: 4px;
    flex-shrink: 0;
    background: var(--pm-color, var(--accent-primary));
    border-radius: 0;
}

.acomp-card-body {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Top row: status badge + due */
.acomp-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Status badge */
.acomp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.acomp-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.acomp-badge--pending  { background: rgba(245,158,11,0.12); color: #d97706; }
.acomp-badge--progress { background: rgba(59,130,246,0.12);  color: #3b82f6; }
.acomp-badge--completed { background: rgba(16,185,129,0.12); color: #10b981; }

/* Due date chip */
.acomp-due {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}
.acomp-due--today { color: #f59e0b; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08); }
.acomp-due--over  { color: #ef4444; border-color: rgba(239,68,68,0.4);  background: rgba(239,68,68,0.08);  }

.acomp-overdue-pill {
    font-size: 0.68rem;
    font-weight: 700;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

/* Title + description */
.acomp-card-main { display: flex; flex-direction: column; gap: 0.3rem; }

.acomp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    word-break: break-word;
}

.acomp-title--done {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.acomp-card-desc {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Meta row */
.acomp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.acomp-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}
.acomp-meta-item i { font-size: 0.68rem; opacity: 0.8; }
.acomp-meta--ok { color: #10b981; }

/* ── Action bar ── */
.acomp-card-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.1rem;
}

.acomp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    line-height: 1;
}

/* Finalizar — em destaque verde */
.acomp-btn--finish {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.4);
    color: #10b981;
    flex-grow: 1;
    justify-content: center;
}
.acomp-btn--finish:hover {
    background: #10b981;
    border-color: #10b981;
    color: white;
    box-shadow: 0 2px 10px rgba(16,185,129,0.35);
}

/* Iniciar */
.acomp-btn--start {
    background: rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.35);
    color: #3b82f6;
}
.acomp-btn--start:hover { background: #3b82f6; border-color: #3b82f6; color: white; }

/* Edit */
.acomp-btn--edit {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.acomp-btn--edit:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-color-hover); }

/* Reabrir */
.acomp-btn--reopen {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.3);
    color: #d97706;
}
.acomp-btn--reopen:hover { background: #f59e0b; border-color: #f59e0b; color: white; }

/* Excluir */
.acomp-btn--del {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.2);
    color: #ef4444;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}
.acomp-btn--del:hover { background: #ef4444; border-color: #ef4444; color: white; }

@media (max-width: 600px) {
    .acomp-stats { gap: 0.5rem; }
    .acomp-stat  { padding: 0.4rem 0.7rem; min-width: 60px; }
    .acomp-btn--finish { flex-grow: unset; }
}

/* =============================================
   NEGOCIAÇÕES PANEL
   ============================================= */

.negociacoes-panel { padding: 1.5rem 0; }

.negs-tabs {
    display: flex;
    gap: .5rem;
}

.negs-tab-btn {
    padding: .45rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.negs-tab-btn.active,
.negs-tab-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.negs-tab-content { margin-top: 1.25rem; }

.negs-action-bar {
    margin-bottom: 1rem;
}

.negs-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.negs-empty {
    color: var(--text-secondary);
    font-size: .9rem;
    padding: 1rem 0;
}

/* Tipo cards */
.negs-tipo-card { padding: 1rem; }

.negs-tipo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.negs-tipo-info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.negs-tipo-desc {
    font-size: .82rem;
    color: var(--text-secondary);
}

.negs-meta-badge {
    font-size: .75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1px 8px;
    width: fit-content;
}

.negs-tipo-actions {
    display: flex;
    gap: .35rem;
    flex-shrink: 0;
}

.negs-req-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .75rem;
}

.negs-req-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.negs-req-tag.local  { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.negs-req-tag.sistema { background: #ede9fe; border-color: #8b5cf6; color: #4c1d95; }
.negs-req-tag.obrig  { background: #fee2e2; border-color: #ef4444; color: #991b1b; }

[data-theme="dark"] .negs-req-tag.local    { background: #451a03; border-color: #f59e0b; color: #fbbf24; }
[data-theme="dark"] .negs-req-tag.sistema  { background: #2e1065; border-color: #8b5cf6; color: #c4b5fd; }
[data-theme="dark"] .negs-req-tag.obrig    { background: #450a0a; border-color: #ef4444; color: #fca5a5; }

/* Tipo form */
.negs-tipo-form,
.negs-vinc-form { padding: 1.25rem; margin-bottom: 1rem; }

.negs-req-builder {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .5rem;
    min-height: 4px;
}

.negs-req-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-size: .85rem;
}

.negs-req-row-nome { flex: 1; }

.negs-req-row-badges { display: flex; gap: .25rem; }

.negs-req-add-row {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.negs-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Vinculada cards */
.negs-vinc-card { padding: 1rem; }

.negs-vinc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

.negs-vinc-info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.negs-cnpj {
    font-size: .78rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.negs-tipo-badge {
    font-size: .75rem;
    background: #ede9fe;
    border: 1px solid #8b5cf6;
    color: #4c1d95;
    border-radius: 10px;
    padding: 1px 8px;
    width: fit-content;
}
[data-theme="dark"] .negs-tipo-badge { background: #2e1065; color: #c4b5fd; }

.negs-vinc-progress {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}

.negs-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.negs-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width .3s;
}
.negs-progress-fill.complete { background: #22c55e; }

.negs-progress-label {
    font-size: .75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.negs-faltando {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin-bottom: .5rem;
    font-size: .8rem;
}

.negs-faltando-label {
    color: #ef4444;
    font-size: .78rem;
    font-weight: 500;
}

.negs-retorno-link {
    font-size: .82rem;
    color: var(--text-secondary);
    padding: .4rem .6rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: .4rem;
}

.badge-status {
    display: inline-block;
    font-size: .7rem;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: .25rem;
}
.badge-status.pending { background: #fef3c7; color: #92400e; }
.badge-status.done    { background: #dcfce7; color: #14532d; }
[data-theme="dark"] .badge-status.pending { background: #451a03; color: #fbbf24; }
[data-theme="dark"] .badge-status.done    { background: #052e16; color: #86efac; }

.negs-vinc-obs {
    font-size: .82rem;
    color: var(--text-secondary);
    margin: .4rem 0 0;
    font-style: italic;
}

/* Checklist */
.negs-checklist { margin-top: .75rem; }

.negs-req-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0;
    cursor: pointer;
    font-size: .88rem;
    border-bottom: 1px solid var(--border-color);
}
.negs-req-check:last-child { border-bottom: none; }
.negs-req-check input[type="checkbox"] { width: 1rem; height: 1rem; flex-shrink: 0; cursor: pointer; }

/* Extra small button */
.btn-xs {
    padding: .1rem .35rem;
    font-size: .7rem;
}

/* panel-page shared layout */
.panel-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.panel-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* =============================================
   CONTATOS DE FILIAIS (CSV) — Suporte Panel
   ============================================= */

/* Search bar */
.sc-search-wrap { margin-bottom: 0.75rem; }

.sc-search-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.sc-search-row:focus-within { border-color: var(--primary); }

.sc-search-icon { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }

.sc-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
}

.sc-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.sc-search-clear:hover { color: var(--error); }

/* Container */
.sc-filiais-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sc-filiais-placeholder {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.sc-error { color: var(--error); }

/* Filial accordion item */
.sc-filial-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: border-color 0.18s;
}
.sc-filial-item:hover { border-color: var(--primary); }

.sc-filial-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
}

.sc-filial-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.sc-filial-sigla-badge {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    padding: 2px 10px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.sc-filial-total {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sc-filial-setor-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sc-setor-pill {
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--bg-primary, rgba(255,255,255,0.06));
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.sc-filial-chevron {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.sc-filial-item--open .sc-filial-chevron { transform: rotate(180deg); }

/* Filial body — hidden until open */
.sc-filial-body {
    display: none;
    border-top: 1px solid var(--border);
    padding: 0;
}
.sc-filial-item--open .sc-filial-body { display: block; }

/* Sector group */
.sc-setor-group { border-bottom: 1px solid var(--border); }
.sc-setor-group:last-child { border-bottom: none; }

.sc-setor-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(67, 97, 238, 0.04);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sc-setor-header i { color: var(--primary); width: 14px; text-align: center; }

.sc-setor-count {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 1px 7px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* Contact rows */
.sc-setor-contacts { padding: 4px 0; }

.sc-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 6px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.82rem;
    transition: background 0.15s;
}
.sc-contact-row:last-child { border-bottom: none; }
.sc-contact-row:hover { background: rgba(67, 97, 238, 0.04); }

.sc-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sc-contact-nome {
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-contact-cargo {
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-contact-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sc-contact-email {
    font-size: 0.78rem;
    color: var(--primary);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-contact-tel {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sc-copy-btn {
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-muted);
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 0.75rem;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.sc-copy-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.06);
}

/* =============================================
   CONTACT TABLE — /tabela page
   ============================================= */

.ct-page {
    padding: 1.5rem;
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Header */
.ct-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ct-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ct-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.ct-count {
    font-size: 0.78rem;
    background: rgba(67, 97, 238, 0.12);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}
.ct-count--ok {
    background: rgba(56, 161, 105, 0.12);
    color: var(--success);
}

.ct-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Progress bar */
.ct-progress-bar-wrap {
    background: var(--border);
    border-radius: 20px;
    height: 6px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.ct-progress-bar {
    height: 100%;
    background: var(--success);
    border-radius: 20px;
    transition: width 0.3s;
    min-width: 2px;
}
.ct-progress-label {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Empty state */
.ct-table-wrap { overflow-x: auto; }

.ct-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    border-radius: 10px;
}
.ct-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.35;
}

/* Table */
.ct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ct-table th {
    text-align: left;
    padding: 9px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.ct-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.ct-row--lancado td { opacity: 0.5; }
.ct-row--lancado .ct-razao--done { text-decoration: line-through; }
.ct-table tr:hover td { background: var(--bg-secondary); }

.ct-th-check, .ct-td-check { width: 36px; text-align: center; padding: 9px 6px; }
.ct-check { cursor: pointer; width: 16px; height: 16px; accent-color: var(--success); }
.ct-th-num, .ct-num { width: 32px; color: var(--text-muted); font-size: 0.78rem; }

.ct-cnpj-val {
    font-family: monospace;
    font-size: 0.83rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 2px 5px;
    border-radius: 4px;
    transition: background 0.15s;
    white-space: nowrap;
}
.ct-cnpj-val:hover { background: rgba(67, 97, 238, 0.1); }

.ct-razao { font-weight: 500; color: var(--text-primary); }

/* HG button */
.ct-hg-cell { white-space: nowrap; }

.ct-hg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
}
.ct-hg-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(67,97,238,0.06); }
.ct-hg-btn--filled {
    border-color: rgba(56, 161, 105, 0.4);
    color: var(--success);
    background: rgba(56, 161, 105, 0.07);
}
.ct-hg-btn--filled:hover { background: rgba(56, 161, 105, 0.14); }

.ct-row-actions { text-align: right; white-space: nowrap; }

.ct-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.ct-del-btn:hover { background: rgba(229, 62, 62, 0.1); color: var(--error); }

/* ── Modais (import + HG) ── */
.ct-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ct-modal {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.ct-modal--hg { max-width: 680px; }

.ct-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}
.ct-modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ct-modal-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
}
.ct-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.ct-modal-close:hover { color: var(--error); }

.ct-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ct-modal-info {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Column mapping */
.ct-col-map {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}
.ct-col-map-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.ct-col-map-row label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 160px;
}

/* CSV preview */
.ct-preview-wrap { display: flex; flex-direction: column; gap: 6px; }
.ct-preview-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.ct-preview-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.ct-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.ct-preview-table th {
    background: var(--bg-secondary);
    padding: 6px 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.ct-preview-table td {
    padding: 5px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.ct-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.ct-modal-feedback {
    flex: 1;
    font-size: 0.82rem;
    color: var(--error);
    min-width: 0;
}

/* HG textarea */
.ct-hg-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: -6px;
}
.ct-hg-textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: border-color 0.2s;
    box-sizing: border-box;
    line-height: 1.6;
}
.ct-hg-textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.ct-hg-hint {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ct-field-group — shared between edit modals */
.ct-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ct-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* =============================================
   MANUTENCAO PANEL — embedded in dashboard
   ============================================= */

.manut-panel {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

/* Header */
.manut-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    cursor: default;
    user-select: none;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.manut-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
}
.manut-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.manut-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.manut-icon { color: var(--primary); font-size: 1rem; flex-shrink: 0; }
.manut-title-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.manut-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
    flex-shrink: 0;
}
.manut-mini-bar {
    width: 80px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.manut-mini-fill {
    height: 100%;
    background: var(--success, #22c55e);
    border-radius: 3px;
    transition: width 0.4s;
}
.manut-pct {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.manut-empty-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}
.manut-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Body */
.manut-body {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 2000px;
}
.manut-body--collapsed {
    max-height: 0;
}
.manut-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
}
.manut-empty i { font-size: 2rem; opacity: 0.35; }

/* Progress bar */
.manut-progress-wrap {
    position: relative;
    height: 26px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.manut-progress-bar {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: rgba(34, 197, 94, 0.18);
    transition: width 0.4s;
}
.manut-progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Table */
.manut-table-scroll {
    overflow-x: auto;
}
.manut-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.manut-table thead th {
    background: var(--bg-secondary);
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.manut-th-chk { width: 36px; text-align: center !important; }
.manut-th-num { width: 32px; text-align: center !important; }
.manut-table tbody tr { border-bottom: 1px solid var(--border); }
.manut-table tbody tr:last-child { border-bottom: none; }

/* Rows */
.manut-row { transition: background 0.12s; }
.manut-row:hover { background: var(--bg-hover); }
.manut-row--done { opacity: 0.55; }
.manut-td-chk { width: 36px; text-align: center; padding: 6px 4px; }
.manut-chk {
    width: 16px; height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}
.manut-num {
    width: 32px;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.manut-cnpj { padding: 8px 10px; white-space: nowrap; }
.manut-cnpj-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.83rem;
    color: var(--primary);
    padding: 2px 6px;
    transition: background 0.12s, border-color 0.12s;
}
.manut-cnpj-btn:hover { background: var(--bg-hover); border-color: var(--border); }
.manut-razao {
    padding: 8px 10px;
    color: var(--text-primary);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.manut-razao--done {
    text-decoration: line-through;
    color: var(--text-muted);
}
.manut-actions-cell {
    padding: 6px 10px;
    white-space: nowrap;
    text-align: right;
}
.manut-action-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 28px; height: 28px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    margin-left: 3px;
}
.manut-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.manut-action-btn--hg { color: var(--primary); border-color: var(--primary); }
.manut-action-btn--hg:hover { background: rgba(var(--primary-rgb, 59,130,246), 0.08); }
.manut-action-btn--del { color: var(--error, #ef4444); }
.manut-action-btn--del:hover { background: rgba(239,68,68,0.08); border-color: var(--error, #ef4444); }

/* Details modal table */
.manut-details-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.manut-details-table tr { border-bottom: 1px solid var(--border); }
.manut-details-table tr:last-child { border-bottom: none; }
.manut-details-label {
    padding: 7px 10px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    width: 1%;
    font-size: 0.78rem;
}
.manut-details-value {
    padding: 7px 10px;
    color: var(--text-primary);
    word-break: break-word;
}
.manut-details-copy { padding: 4px 8px; text-align: right; }

/* =============================================
   SUPORTE — WhatsApp & Edit buttons
   ============================================= */

.sc-wa-btn, .sc-edit-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 26px; height: 26px;
    cursor: pointer;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    flex-shrink: 0;
    margin-left: 2px;
    color: var(--text-muted);
}
.sc-wa-btn { color: #25D366; border-color: rgba(37,211,102,0.35); }
.sc-wa-btn:hover { background: rgba(37,211,102,0.1); border-color: #25D366; }
.sc-wa-btn--saved { border-color: #25D366; }

.sc-edit-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.sc-edit-btn--saved { color: var(--primary); border-color: var(--primary); }

.sc-contact-obs {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}
