/* ─────────────────────────────────────────────
   Design Tokens
───────────────────────────────────────────── */
:root {
    --font-base: 'Inter', system-ui, -apple-system, sans-serif;
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: rgba(67, 97, 238, 0.12);
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-text: rgba(255, 255, 255, 0.6);
    --sidebar-active-bg: rgba(67, 97, 238, 0.18);
    --sidebar-active-text: #7c9ef5;
    --topbar-height: 58px;
    --card-radius: 0.75rem;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.06);
    --transition: 0.2s ease;
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --input-bg: #ffffff;
    --table-stripe: #f8fafc;
}

[data-bs-theme="dark"] {
    --body-bg: #0d1117;
    --card-bg: #161b22;
    --text-primary: #e6edf3;
    --text-muted: #8b949e;
    --border: #30363d;
    --card-shadow: 0 1px 4px rgba(0,0,0,0.4), 0 4px 20px rgba(0,0,0,0.3);
    --input-bg: #0d1117;
    --table-stripe: #1c2128;
}

/* ─────────────────────────────────────────────
   Base
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}
@media (min-width: 768px) { html { font-size: 15px; } }

body {
    font-family: var(--font-base);
    background: var(--body-bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* ─────────────────────────────────────────────
   Layout Shell
───────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─────────────────────────────────────────────
   Sidebar
───────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition);
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.sidebar-brand i { font-size: 1.3rem; color: var(--primary); }
.sidebar-brand:hover { color: #fff; }

.sidebar-close {
    background: none;
    border: none;
    color: var(--sidebar-text);
    padding: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0 1rem;
}

.nav-group { margin-bottom: 0.5rem; }

.nav-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
    padding: 1rem 1.25rem 0.35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    margin: 0.1rem 0.65rem;
    color: var(--sidebar-text);
    border-radius: 0.5rem;
    transition: all var(--transition);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
}
.nav-item i { font-size: 1rem; flex-shrink: 0; }
.nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
}
.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 500;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sidebar-footer a, .sidebar-footer span, .sidebar-footer form button {
    color: var(--sidebar-text) !important;
    font-size: 0.8rem;
}
.sidebar-footer .nav-link { padding: 0.3rem 0; }
.sidebar-footer form button {
    background: none;
    border: none;
    padding: 0.3rem 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.sidebar-footer form button:hover { color: #fff !important; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: none;
    border: none;
    padding: 0.35rem 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 0.78rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: color var(--transition);
}
.btn-logout:hover { color: #fff; }

/* ─────────────────────────────────────────────
   Overlay Mobile
───────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ─────────────────────────────────────────────
   Main Content
───────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ─────────────────────────────────────────────
   Topbar
───────────────────────────────────────────── */
.topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.topbar-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

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

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-muted);
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
}
.btn-icon:hover { background: var(--body-bg); color: var(--text-primary); }

/* ─────────────────────────────────────────────
   Page Body
───────────────────────────────────────────── */
.page-body {
    padding: 1.5rem;
    flex: 1;
}

/* ─────────────────────────────────────────────
   Cards
───────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.card-kpi {
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
}
.card-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.kpi-icon {
    width: 48px; height: 48px;
    border-radius: 0.65rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────
   Tables
───────────────────────────────────────────── */
.table {
    color: var(--text-primary);
    margin-bottom: 0;
}
.table thead th {
    background: var(--body-bg);
    border-color: var(--border);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.7rem 1rem;
    white-space: nowrap;
}
.table tbody td {
    border-color: var(--border);
    vertical-align: middle;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
}
.table-hover tbody tr:hover { background: var(--table-stripe); }
.table tbody tr:last-child td { border-bottom: none; }

/* ─────────────────────────────────────────────
   Status Badges
───────────────────────────────────────────── */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-pendente { background: #fef9c3; color: #713f12; }
.badge-pago { background: #dcfce7; color: #14532d; }
.badge-atrasado { background: #fee2e2; color: #7f1d1d; }
.badge-cancelado { background: #f1f5f9; color: #475569; }
.badge-ativo { background: #dcfce7; color: #14532d; }
.badge-inativo { background: #f1f5f9; color: #475569; }
.badge-pf { background: #ede9fe; color: #4c1d95; }
.badge-pj { background: #dbeafe; color: #1e3a8a; }

[data-bs-theme="dark"] .badge-pendente { background: #422006; color: #fde68a; }
[data-bs-theme="dark"] .badge-pago { background: #052e16; color: #86efac; }
[data-bs-theme="dark"] .badge-atrasado { background: #450a0a; color: #fca5a5; }
[data-bs-theme="dark"] .badge-cancelado { background: #1e293b; color: #94a3b8; }
[data-bs-theme="dark"] .badge-ativo { background: #052e16; color: #86efac; }
[data-bs-theme="dark"] .badge-inativo { background: #1e293b; color: #94a3b8; }
[data-bs-theme="dark"] .badge-pf { background: #2e1065; color: #c4b5fd; }
[data-bs-theme="dark"] .badge-pj { background: #172554; color: #93c5fd; }

/* ─────────────────────────────────────────────
   Forms
───────────────────────────────────────────── */
.form-control, .form-select {
    background-color: var(--input-bg);
    border-color: var(--border);
    color: var(--text-primary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}
.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}
.form-text { font-size: 0.78rem; }

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    color: var(--text-primary);
    border-color: var(--border);
    background-color: #0d1117;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #4a5568; }
[data-bs-theme="dark"] .form-select option { background: #161b22; }

/* ─────────────────────────────────────────────
   Buttons
───────────────────────────────────────────── */
.btn {
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.65rem; }

/* ─────────────────────────────────────────────
   Page Header
───────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

/* ─────────────────────────────────────────────
   Toasts
───────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: calc(var(--topbar-height) + 1rem);
    right: 1.25rem;
    z-index: 9999;
    pointer-events: none;
}
.toast-msg {
    padding: 0.75rem 1.25rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    animation: slideInRight 0.3s ease forwards;
    pointer-events: all;
    min-width: 250px;
    max-width: 400px;
}
.toast-success { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.toast-error { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

[data-bs-theme="dark"] .toast-success { background: #052e16; color: #86efac; border-color: #166534; }
[data-bs-theme="dark"] .toast-error { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─────────────────────────────────────────────
   Auth Layout
───────────────────────────────────────────── */
.auth-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
}
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    letter-spacing: -0.02em;
}
.auth-brand i { font-size: 1.5rem; color: var(--primary); }
.auth-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}
.auth-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}
.auth-card .form-label { color: #64748b; }
.auth-card .form-control {
    background-color: #fff;
    color: #1e293b;
    padding-left: 2.5rem;
    height: 2.75rem;
}
.auth-card .form-check-label { color: #475569; }
.auth-input-group { position: relative; }
.auth-input-group > i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 5;
}
.auth-toggle-pass {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    z-index: 5;
}
.auth-toggle-pass:hover { color: #475569; }
.auth-input-group .form-control { padding-right: 2.5rem; }
.auth-error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fca5a5;
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}
.auth-error ul { margin: 0; padding-left: 1rem; }
.auth-error.validation-summary-valid { display: none; }

/* ─────────────────────────────────────────────
   Progress bar utilitário
───────────────────────────────────────────── */
.progress {
    height: 6px;
    border-radius: 1rem;
    background: var(--border);
}

/* ─────────────────────────────────────────────
   Chart container
───────────────────────────────────────────── */
.chart-container {
    position: relative;
    width: 100%;
}

/* ─────────────────────────────────────────────
   Cartão bancário visual
───────────────────────────────────────────── */
.bank-card {
    border-radius: 1rem;
    padding: 1.25rem;
    color: #fff;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.bank-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}

/* ─────────────────────────────────────────────
   Utilidades
───────────────────────────────────────────── */
.text-money { font-variant-numeric: tabular-nums; }
.cursor-pointer { cursor: pointer; }

/* Row actions visíveis só no hover */
.table tbody tr .row-actions { opacity: 0.3; transition: opacity var(--transition); }
.table tbody tr:hover .row-actions { opacity: 1; }

/* ─────────────────────────────────────────────
   Responsive Mobile
───────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.3);
    }
    .main-content {
        margin-left: 0;
    }
    .page-body { padding: 1rem; }
    .kpi-value { font-size: 1.25rem; }
}

@media (max-width: 575.98px) {
    .topbar { padding: 0 1rem; }
    .page-body { padding: 0.75rem; }
    .card-body { padding: 1rem; }
    .page-header h1 { font-size: 1rem; }
}

/* ─────────────────────────────────────────────
   Quadros (Boards)
───────────────────────────────────────────── */
.quadro-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.quadro-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
.quadro-card-plain { cursor: default; }
.quadro-card-plain:hover { transform: none; box-shadow: var(--card-shadow); }

.quadro-card-accent {
    height: 5px;
    width: 100%;
}

.quadro-card-body { padding: 1.25rem; }

.quadro-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.quadro-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.quadro-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.quadro-stat i { font-size: 0.75rem; }

/* Color picker */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition);
    padding: 0;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: var(--text-primary); transform: scale(1.1); }

/* Icon picker */
.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.icon-dot {
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    background: var(--body-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition);
    padding: 0;
}
.icon-dot:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.icon-dot.selected { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─────────────────────────────────────────────
   Kanban Board
───────────────────────────────────────────── */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    align-items: flex-start;
    min-height: calc(100vh - 280px);
}
.kanban-board::-webkit-scrollbar { height: 6px; }
.kanban-board::-webkit-scrollbar-track { background: var(--border); border-radius: 1rem; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 1rem; }

.kanban-column {
    min-width: 285px;
    max-width: 285px;
    background: var(--body-bg);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 240px);
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.kanban-count {
    background: var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 80px;
}
.kanban-cards::-webkit-scrollbar { width: 4px; }
.kanban-cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 1rem; }

/* Kanban Card */
.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow var(--transition), transform var(--transition);
    user-select: none;
}
.kanban-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.kanban-card-ghost { opacity: 0.35; }
.kanban-card-dragging { cursor: grabbing; box-shadow: 0 8px 24px rgba(0,0,0,0.15); transform: rotate(1.5deg); }

.kanban-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.kanban-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.3rem;
}

.kanban-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.4rem;
    line-height: 1.45;
}

.kanban-card-prazo {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.kanban-card-prazo.vencido { color: #ef4444; font-weight: 600; }

.kanban-card-actions {
    display: flex;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity var(--transition);
}
.kanban-card:hover .kanban-card-actions { opacity: 1; }

.kcard-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.2rem 0.35rem;
    cursor: pointer;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    line-height: 1;
}
.kcard-btn:hover { background: var(--body-bg); color: var(--primary); }
.kcard-btn.text-danger:hover { color: #ef4444 !important; }

/* Prioridade badges */
.kanban-prio {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.prio-urgente { background: #fce7f3; color: #9d174d; }
.prio-alta    { background: #fee2e2; color: #7f1d1d; }
.prio-media   { background: #fef9c3; color: #713f12; }
.prio-baixa   { background: #f0fdf4; color: #14532d; }

[data-bs-theme="dark"] .prio-urgente { background: #4a0d30; color: #f9a8d4; }
[data-bs-theme="dark"] .prio-alta    { background: #450a0a; color: #fca5a5; }
[data-bs-theme="dark"] .prio-media   { background: #422006; color: #fde68a; }
[data-bs-theme="dark"] .prio-baixa   { background: #052e16; color: #86efac; }

/* Timer no card */
.kanban-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.timer-display {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.timer-buttons { display: flex; gap: 0.25rem; }

.timer-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all var(--transition);
}
.timer-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.timer-btn.running { background: #10b981; border-color: #10b981; color: #fff; }

/* Fullscreen Timer Overlay */
.timer-fullscreen-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #0f172a;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.timer-fullscreen-overlay.active { display: flex; }

.timer-fullscreen-inner {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
}

.timer-fs-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.6);
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.timer-fs-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

.timer-fs-project {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.5rem;
}

.timer-fs-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2.5rem;
    line-height: 1.3;
}

.timer-fs-display {
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    margin-bottom: 3rem;
    line-height: 1;
}

.timer-fs-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-fs-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 3rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.timer-fs-btn:hover { background: var(--primary-dark); transform: scale(1.03); }
.timer-fs-stop { background: rgba(255,255,255,0.12); }
.timer-fs-stop:hover { background: rgba(255,255,255,0.22); transform: scale(1.03); }
