/* ============================================================
   WEBION CRM — Main CSS
   Cores: #534AB7 (roxo), #1D9E75 (verde), #D85A30 (laranja)
   ============================================================ */

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6338f0;
    --primary-dark: #4a2abd;
    --primary-light: #8b6cf5;
    --secondary: #2ed39b;
    --secondary-dark: #1ea376;
    --accent: #ff6b6b;
    --accent-dark: #de5353;
    --info: #3b9fe0;
    --warning: #f0a500;
    --danger: #e03b3b;
    --success: #2ed39b;

    --bg: #0c0b13;
    --bg-surface: #111018;
    --bg-card: #171620;
    --bg-card-hover: #1d1b2a;
    --bg-input: #13121b;
    --bg-modal: #15141e;

    --border: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(99, 56, 240, 0.6);

    --text: #f3f2f8;
    --text-muted: #a29fba;
    --text-dim: #716e88;

    --sidebar-w: 240px;
    --header-h: 64px;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(99, 56, 240, 0.3);

    --transition: 0.25s ease;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    min-height: var(--header-h);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(83, 74, 183, 0.3), rgba(83, 74, 183, 0.1));
    color: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.nav-item .fa-solid {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.nav-label {
    flex: 1;
}

.nav-badge {
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border);
}

.nav-logout {
    color: var(--danger);
}

.nav-logout:hover {
    background: rgba(224, 59, 59, 0.15);
    color: var(--danger);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    backdrop-filter: blur(2px);
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TOP HEADER ===== */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    padding: 6px;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(83, 74, 183, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .fa-solid {
    color: var(--primary-light);
}

/* ===== STAT CARDS (Dashboard) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

/* ===== FINANCEIRO GRID ===== */
.fin-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up {
    color: var(--secondary);
}

.stat-change.down {
    color: var(--danger);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--stat-color, var(--primary));
    opacity: 0.8;
}

.stat-card:hover {
    border-color: rgba(83, 74, 183, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--stat-bg, rgba(99, 56, 240, 0.15));
    color: var(--stat-color, var(--primary-light));
    margin-bottom: 20px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-change {
    font-size: 0.8rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up {
    color: var(--secondary);
}

.stat-change.down {
    color: var(--danger);
}

.stat-progress {
    margin-top: 10px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.stat-progress-bar {
    height: 100%;
    background: var(--stat-color, var(--primary));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    margin-bottom: 32px;
}

.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ===== "O QUE FAZER AGORA" ===== */
.urgentes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.urgente-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.urgente-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.urgente-prio {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.prio-alta {
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

.prio-media {
    background: var(--warning);
}

.prio-baixa {
    background: var(--secondary);
}

.urgente-info {
    flex: 1;
    min-width: 0;
}

.urgente-info strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.urgente-info small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ===== ATIVIDADES ===== */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.activity-text {
    flex: 1;
}

.activity-text strong {
    font-size: 0.85rem;
}

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

/* ===== BLOCO DE ROTINA ===== */
.rotina-hoje {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rotina-bloco {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border-left: 3px solid var(--bloco-cor, var(--primary));
    transition: var(--transition);
}

.rotina-bloco.concluido {
    opacity: 0.5;
}

.rotina-bloco.concluido .rotina-nome {
    text-decoration: line-through;
}

.rotina-hora {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 45px;
}

.rotina-nome {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
}

.rotina-dur {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

thead th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

tbody tr:hover {
    background: var(--bg-card-hover);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 16px 16px;
    vertical-align: middle;
}

.row-vencida td:first-child {
    border-left: 3px solid var(--danger);
}

.row-vencida {
    background: rgba(216, 90, 48, 0.04);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: rgba(29, 158, 117, 0.2);
    color: #4ecba4;
}

.badge-warning {
    background: rgba(240, 165, 0, 0.2);
    color: #f5be50;
}

.badge-danger {
    background: rgba(224, 59, 59, 0.2);
    color: #f07070;
}

.badge-info {
    background: rgba(59, 159, 224, 0.2);
    color: #7dc4ee;
}

.badge-primary {
    background: rgba(83, 74, 183, 0.2);
    color: #a09ae0;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.badge-orange {
    background: rgba(216, 90, 48, 0.2);
    color: #f0956a;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(83, 74, 183, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 18px rgba(83, 74, 183, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #28c48f, var(--secondary));
    color: #fff;
}

.btn-danger {
    background: rgba(224, 59, 59, 0.15);
    color: var(--danger);
    border: 1px solid rgba(224, 59, 59, 0.3);
}

.btn-danger:hover {
    background: rgba(224, 59, 59, 0.25);
}

.btn-warning {
    background: rgba(240, 165, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(240, 165, 0, 0.3);
}

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

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

.btn-icon {
    padding: 8px;
    width: 34px;
    height: 34px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    transition: all var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.2);
}

.form-control::placeholder {
    color: var(--text-dim);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239491b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.form-error {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ===== SEARCH ===== */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper .fa-solid {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.15);
}

/* ===== FILTERS BAR ===== */
.filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.filter-select {
    padding: 7px 30px 7px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.84rem;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239491b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.hidden {
    display: none !important;
}

.modal-overlay.hidden {
    display: none;
}

.config-tab-inner {
    display: flex;
}

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

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

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 28px 32px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid var(--border);
}

/* ===== POPUP BOAS-VINDAS ===== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
    backdrop-filter: blur(6px);
}

.popup-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-modal));
    border: 1px solid rgba(83, 74, 183, 0.4);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
    animation: popupIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-header {
    padding: 28px 28px 0;
    text-align: center;
}

.popup-header .logo-icon {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
    margin: 0 auto 16px;
}

.popup-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.popup-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.popup-body {
    padding: 20px 28px;
}

.popup-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.popup-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.popup-section-title .fa-solid {
    color: var(--primary-light);
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.popup-item:last-child {
    border-bottom: none;
}

.popup-num {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    min-width: 50px;
}

.popup-num.danger {
    color: var(--danger);
}

.popup-num.warning {
    color: var(--warning);
}

.popup-num.info {
    color: var(--info);
}

.popup-num.success {
    color: var(--secondary);
}

.popup-footer {
    padding: 0 28px 28px;
    text-align: center;
}

/* ===== NOTIFICAÇÕES ===== */
.notif-wrapper {
    position: relative;
}

.notif-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.notif-btn:hover,
.notif-btn.has-notif {
    color: var(--primary-light);
}

.notif-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-surface);
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    z-index: 500;
    animation: fadeDown 0.15s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    font-weight: 600;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 0.78rem;
    cursor: pointer;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 320px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    color: var(--text);
    text-decoration: none;
}

.notif-item:hover {
    background: var(--bg-card);
}

.notif-item.unread {
    background: rgba(83, 74, 183, 0.08);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: rgba(83, 74, 183, 0.15);
    color: var(--primary-light);
}

.notif-tarefa_vencida {
    background: rgba(224, 59, 59, 0.15);
    color: var(--danger);
}

.notif-pagamento_atrasado {
    background: rgba(240, 165, 0, 0.15);
    color: var(--warning);
}

.notif-lead_sem_followup {
    background: rgba(59, 159, 224, 0.15);
    color: var(--info);
}

.notif-automacao_erro {
    background: rgba(216, 90, 48, 0.15);
    color: var(--accent);
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-content strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
}

.notif-content small {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-content time {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.notif-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
}

.notif-empty {
    text-align: center;
    padding: 28px;
    color: var(--text-dim);
}

.notif-empty .fa-solid {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

/* ===== USER INFO ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: background var(--transition);
}

.user-info:hover {
    background: var(--bg-input);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== SAÚDE DOT ===== */
.saude-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.saude-verde {
    background: var(--secondary);
}

.saude-amarelo {
    background: var(--warning);
}

.saude-vermelho {
    background: var(--danger);
}

/* ===== PROGRESS BAR ===== */
.progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ===== FLASH MESSAGES ===== */
.flash-msg {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: opacity 0.4s;
    max-width: 360px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background: rgba(29, 158, 117, 0.2);
    border: 1px solid rgba(29, 158, 117, 0.4);
    color: #4ecba4;
}

.flash-error {
    background: rgba(224, 59, 59, 0.2);
    border: 1px solid rgba(224, 59, 59, 0.4);
    color: #f07070;
}

.flash-info {
    background: rgba(83, 74, 183, 0.2);
    border: 1px solid rgba(83, 74, 183, 0.4);
    color: var(--primary-light);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
}

.page-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes pulseScale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.pulse {
    animation: pulseScale 1.8s ease infinite;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-dim);
}

.empty-state .fa-solid {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== KANBAN ===== */
.kanban-board {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 60vh;
}

.kanban-col {
    min-width: 320px;
    max-width: 320px;
    width: 320px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

.kanban-col-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 600;
}

.kanban-col-body {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
}

.kanban-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: grab;
    transition: all var(--transition);
    border-left: 3px solid var(--primary);
}

.kanban-card:hover {
    border-color: rgba(83, 74, 183, 0.4);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.kanban-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.kanban-card-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

/* ===== CALENDAR ===== */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-header {
    display: contents;
}

.cal-day-name {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 8px;
    text-transform: uppercase;
}

.cal-day {
    min-height: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px;
    transition: var(--transition);
}

.cal-day.today {
    border-color: var(--primary);
    background: rgba(83, 74, 183, 0.1);
}

.cal-day.other-month {
    opacity: 0.35;
}

.cal-day-num {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cal-event {
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event.alta {
    background: rgba(224, 59, 59, 0.3);
    color: #f07070;
}

.cal-event.media {
    background: rgba(240, 165, 0, 0.3);
    color: #f5be50;
}

.cal-event.baixa {
    background: rgba(29, 158, 117, 0.3);
    color: #4ecba4;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 6px;
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 16px;
    padding-left: 16px;
}

.timeline-dot {
    position: absolute;
    left: -16px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
}

.timeline-content {
    font-size: 0.85rem;
}

.timeline-content strong {
    display: block;
    margin-bottom: 2px;
}

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

/* ===== SCORE STARS ===== */
.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.star.filled {
    color: var(--warning);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ===== CHIP / TAGS ===== */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(83, 74, 183, 0.15);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 3px;
    gap: 2px;
}

.view-btn {
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-btn.active {
    background: var(--bg-card);
    color: var(--text);
}

/* ===== ALERT BOXES ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-danger {
    background: rgba(224, 59, 59, 0.15);
    border: 1px solid rgba(224, 59, 59, 0.3);
    color: #f07070;
}

.alert-warning {
    background: rgba(240, 165, 0, 0.15);
    border: 1px solid rgba(240, 165, 0, 0.3);
    color: #f5be50;
}

.alert-info {
    background: rgba(59, 159, 224, 0.15);
    border: 1px solid rgba(59, 159, 224, 0.3);
    color: #7dc4ee;
}

.alert-success {
    background: rgba(29, 158, 117, 0.15);
    border: 1px solid rgba(29, 158, 117, 0.3);
    color: #4ecba4;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    position: relative;
}

/* ===== DROPDOWN ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 100;
    animation: fadeDown 0.15s ease;
    overflow: hidden;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition);
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-card);
}

.dropdown-item.danger {
    color: var(--danger);
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 999;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ===== LOADING ===== */
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 14, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 50;
}

/* ===== MISC ===== */
.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-success {
    color: var(--secondary) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary-light) !important;
}

.fw-bold {
    font-weight: 700;
}

.fw-600 {
    font-weight: 600;
}

.text-right {
    text-align: right;
}

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

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.flex-1 {
    flex: 1;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text);
    border-bottom-color: rgba(83, 74, 183, 0.4);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

/* ===== TABLE WRAPPER ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table-wrapper thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-wrapper tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.table-wrapper tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-muted);
    gap: 12px;
    text-align: center;
}

.empty-state .fa-solid,
.empty-state i {
    font-size: 2.5rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.92rem;
    opacity: 0.7;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    position: relative;
    width: 100%;
}

/* ===== CARD TITLE ===== */
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== PAINEL LATERAL TAREFA (ESTILO ASANA) ===== */
.task-painel-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    display: none;
}

.task-painel-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: all;
}

.task-painel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 480px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 9999;
    display: none;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
}

.task-painel.ready {
    display: flex;
    transform: translateX(100%);
}

.task-painel.open {
    display: flex;
    transform: translateX(0);
}

/* Topo */
.task-painel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
    flex-shrink: 0;
}

.task-painel-concluir {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.task-painel-concluir:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(29, 158, 117, 0.08);
}

.task-painel-concluir.done {
    border-color: rgba(29, 158, 117, 0.4);
    color: #3dd9a4;
    background: rgba(29, 158, 117, 0.1);
    cursor: default;
}

.task-painel-top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-painel-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition);
}

.task-painel-icon-btn:hover {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text);
}

/* Body scrollável */
.task-painel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 24px 16px;
}

.task-painel-body::-webkit-scrollbar {
    width: 4px;
}

.task-painel-body::-webkit-scrollbar-track {
    background: transparent;
}

.task-painel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Título */
.task-painel-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 22px;
}

/* Campos de metadados */
.task-painel-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.task-painel-field {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    min-height: 42px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.task-painel-field:last-child {
    border-bottom: none;
}

.task-painel-field:hover {
    background: rgba(255, 255, 255, 0.025);
}

.task-painel-field-label {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
    border-right: 1px solid var(--border);
}

.task-painel-field-value {
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--text);
}

/* Divisor */
.task-painel-divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
}

/* Seções */
.task-painel-section {
    margin-bottom: 18px;
}

.task-painel-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-painel-descricao {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-painel-resultado {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #3dd9a4;
    background: rgba(29, 158, 117, 0.08);
    border: 1px solid rgba(29, 158, 117, 0.2);
    border-radius: var(--radius);
    padding: 14px 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Rodapé */
.task-painel-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* Row highlight quando painel aberto */
.tarefa-row {
    transition: background var(--transition);
}

.tarefa-row:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.tarefa-row.painel-active td {
    background: rgba(83, 74, 183, 0.1) !important;
    border-left: none;
}

.tarefa-row.painel-active td:first-child {
    border-left: 3px solid var(--primary);
}

.tarefa-titulo-link {
    transition: color var(--transition);
}

.tarefa-row:hover .tarefa-titulo-link {
    color: var(--primary-light);
}

.cliente-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.cliente-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Quando painel aberto, encolher o main-content levemente no desktop */
@media (min-width: 1024px) {
    body.painel-open .main-content {
        padding-right: 500px;
        transition: padding-right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Mobile: painel ocupa tela toda */
@media (max-width: 768px) {
    .task-painel {
        width: 100vw;
        border-left: none;
    }

    body.painel-open .main-content {
        padding-right: 0;
    }
}

/* Mobile: task-painel-field em 2 linhas (sem grid fixo) */
@media (max-width: 599px) {
    .task-painel-field {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .task-painel-field-label {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 7px 14px;
        background: rgba(255, 255, 255, 0.02);
    }

    .task-painel-field-value {
        padding: 8px 14px;
    }

    .task-painel-titulo {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .task-painel-body {
        padding: 16px 16px 12px;
    }

    .task-painel-top {
        padding: 10px 14px;
    }

    .task-painel-concluir {
        font-size: 0.78rem;
        padding: 6px 10px;
    }
}