:root {
    --sidebar-bg: #1a1a2e;
    --sidebar-width: 240px;
}

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 1040;
    transition: transform .25s ease;
}

.sidebar .nav-link {
    color: #ccc;
    padding: .65rem 1.2rem;
    border-radius: .375rem;
    margin: 2px 8px;
    font-size: .9rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}

.sidebar .nav-link i {
    width: 24px;
    display: inline-block;
    text-align: center;
    margin-right: 8px;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1030;
    opacity: 0;
    transition: opacity .25s ease;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Hamburger button */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: .25rem .5rem;
    font-size: 1.25rem;
    color: #495057;
    cursor: pointer;
    line-height: 1;
    border-radius: 6px;
    transition: background .15s;
}
.sidebar-toggle:hover { background: #f1f3f5; }

/* Content area */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f8f9fa;
    transition: margin-left .25s ease;
}

.top-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: .75rem 1.5rem;
}

.page-body {
    padding: 1.5rem;
}

/* ── Responsive layout (<992px) ── */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
    }
    .top-header {
        padding: .625rem 1rem;
    }
    .page-body {
        padding: 1rem;
    }
}
@media (max-width: 575.98px) {
    .page-body {
        padding: .75rem;
    }
}

/* Stat cards */
.stat-card {
    border-left: 4px solid;
    transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.primary { border-left-color: #0d6efd; }
.stat-card.success { border-left-color: #198754; }
.stat-card.warning { border-left-color: #ffc107; }
.stat-card.danger { border-left-color: #dc3545; }
.stat-card.info { border-left-color: #0dcaf0; }

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
}

#blazor-error-ui { display: none; }

/* ══════════════════════════════════════
   EVENTO DETAIL - Premium SaaS Design v2
   ══════════════════════════════════════ */

/* ── Hero Header ── */
.ev-hero {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
    border: 1px solid #e9ecef;
}
.ev-back-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #f1f3f5; color: #495057;
    text-decoration: none; transition: all .2s;
    flex-shrink: 0; font-size: 1rem;
}
.ev-back-btn:hover { background: #e9ecef; color: #212529; transform: translateX(-2px); }
.ev-hero-title { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin-bottom: 0; letter-spacing: -.01em; }
.ev-hero-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .25rem;
    color: #6c757d; font-size: .875rem;
}
.ev-meta-sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #adb5bd; margin: 0 .5rem; }
.ev-hero-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.ev-countdown {
    display: inline-flex; align-items: center; gap: .375rem;
    background: #f0f4ff; border: 1px solid #d4dfff; border-radius: 8px;
    padding: .25rem .75rem; font-size: .8125rem; font-weight: 600; color: #3b5bdb;
}
.ev-countdown.ev-countdown-past { background: #f8f9fa; border-color: #e9ecef; color: #868e96; }
.ev-countdown i { font-size: .75rem; }

/* ── Hero Info Grid ── */
.ev-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
}
.ev-hero-field-label {
    display: block; font-size: .6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
    color: #868e96; margin-bottom: .125rem;
}
.ev-hero-field-value { font-size: .9rem; font-weight: 500; color: #212529; }
.ev-hero-field-value a { color: #0d6efd; text-decoration: none; font-weight: 600; }
.ev-hero-field-value a:hover { text-decoration: underline; }

/* ── Pills ── */
.ev-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.ev-pill {
    display: inline-flex; align-items: center; gap: .375rem;
    background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 20px;
    padding: .3rem .875rem; font-size: .8125rem; color: #495057;
    text-decoration: none; transition: all .2s;
}
a.ev-pill:hover { background: #e9ecef; color: #212529; text-decoration: none; transform: translateY(-1px); }
.ev-pill i { font-size: .75rem; color: #6c757d; }

/* ── Badge ── */
.ev-badge {
    display: inline-flex; align-items: center;
    padding: .25rem .75rem; border-radius: 20px;
    font-size: .75rem; font-weight: 600; letter-spacing: .01em;
    line-height: 1.4;
}
.ev-badge-primary { background: #e7f1ff; color: #0d6efd; }
.ev-badge-success { background: #d1e7dd; color: #146c43; }
.ev-badge-warning { background: #fff3cd; color: #997404; }
.ev-badge-danger  { background: #f8d7da; color: #842029; }
.ev-badge-info    { background: #cff4fc; color: #055160; }
.ev-badge-secondary { background: #e9ecef; color: #495057; }

/* ── Card System ── */
.ev-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.03);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: box-shadow .2s;
}
.ev-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05); }
.ev-card-header {
    display: flex; align-items: center; gap: .5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
    font-weight: 600; font-size: .9rem; color: #212529;
}
.ev-card-header i { color: #6c757d; font-size: 1.1rem; }
.ev-card-body { padding: 1.25rem; }

/* ── Field display ── */
.ev-field { margin-bottom: 0; }
.ev-field label {
    display: block; font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
    color: #868e96; margin-bottom: .125rem;
}
.ev-field span, .ev-field a { font-size: .9rem; color: #212529; }
.ev-field-link { color: #0d6efd; text-decoration: none; font-weight: 500; }
.ev-field-link:hover { text-decoration: underline; }

/* ── Package banner ── */
.ev-package-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #f0f4ff 0%, #e7f1ff 100%);
    border-radius: 10px; padding: 1rem 1.25rem;
    border: 1px solid #d4dfff;
}
.ev-package-name { font-weight: 700; font-size: 1rem; color: #212529; }
.ev-package-label { font-size: .75rem; color: #6c757d; }
.ev-package-price { font-weight: 700; font-size: 1.125rem; color: #0d6efd; }

/* ── Services list ── */
.ev-services-list { display: flex; flex-direction: column; }
.ev-service-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 0;
    border-bottom: 1px solid #f1f3f5;
}
.ev-service-row:last-child { border-bottom: none; }
.ev-service-info { display: flex; align-items: center; }
.ev-service-qty {
    display: inline-flex; align-items: center; justify-content: center;
    background: #e9ecef; border-radius: 4px; padding: 0 .375rem;
    font-size: .75rem; font-weight: 600; color: #495057; margin-left: .5rem;
}
.ev-service-price { font-weight: 600; color: #212529; }

/* ── Empty state ── */
.ev-empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 2.5rem 1rem; text-align: center;
}
.ev-empty-state > i {
    font-size: 2.5rem; color: #ced4da; margin-bottom: .75rem;
}
.ev-empty-state > p {
    color: #6c757d; margin-bottom: 1rem; font-size: .9rem;
}

/* ── Contract card ── */
.ev-contract-status-bar {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
}
.ev-contract-status-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.ev-contract-status-dot.draft { background: #adb5bd; }
.ev-contract-status-dot.sent { background: #0dcaf0; animation: ev-pulse 2s infinite; }
.ev-contract-status-dot.signed { background: #198754; }
.ev-contract-status-label { font-size: .8125rem; font-weight: 500; color: #495057; }
@keyframes ev-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.ev-contract-info {
    display: flex; align-items: flex-start; gap: 1rem;
}
.ev-contract-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.375rem; flex-shrink: 0;
}
.ev-contract-icon.draft { background: #e9ecef; color: #495057; }
.ev-contract-icon.sent { background: #cff4fc; color: #055160; }
.ev-contract-icon.signed { background: #d1e7dd; color: #146c43; }
.ev-contract-details { flex: 1; min-width: 0; }
.ev-contract-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── Finance card ── */
.ev-finance-card { border: 1px solid #e9ecef; }
.ev-finance-card .ev-card-header { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; border-bottom: none; }
.ev-finance-card .ev-card-header i { color: rgba(255,255,255,.7); }
.ev-finance-hero {
    text-align: center; padding: 1.5rem 1.25rem 1rem;
}
.ev-finance-amount {
    font-size: 2rem; font-weight: 800; color: #0f172a;
    letter-spacing: -.02em; line-height: 1.2;
}
.ev-finance-label { font-size: .75rem; color: #868e96; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.ev-progress-wrap { padding: 0 1.25rem; margin-bottom: 1rem; }
.ev-progress-wrap .progress { height: 10px; border-radius: 5px; background: #e9ecef; }
.ev-progress-wrap .progress-bar { border-radius: 5px; transition: width .6s ease; }
.ev-progress-pct {
    display: flex; justify-content: space-between; align-items: center; margin-top: .5rem;
}
.ev-finance-rows { padding: 0 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0; }
.ev-finance-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .625rem 0; border-bottom: 1px solid #f1f3f5;
    font-size: .875rem;
}
.ev-finance-row:last-child { border-bottom: none; }
.ev-finance-row span:first-child { color: #6c757d; }
.ev-finance-row-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 8px;
    padding: .75rem 1rem; margin: .5rem 0 0;
    border-bottom: none;
}
.ev-finance-actions { padding: 0 1.25rem 1.25rem; }

/* ── Quick Actions ── */
.ev-action-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem;
    border: 1px solid #f1f3f5; border-radius: 10px;
    text-decoration: none; color: #212529;
    transition: all .2s; cursor: pointer;
    background: #fff;
}
.ev-action-item:hover { border-color: #0d6efd; background: #f0f4ff; color: #212529; text-decoration: none; transform: translateY(-1px); }
.ev-action-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; flex-shrink: 0;
}
.ev-action-icon.blue { background: #e7f1ff; color: #0d6efd; }
.ev-action-icon.green { background: #d1e7dd; color: #198754; }
.ev-action-icon.purple { background: #ede9fe; color: #7c3aed; }
.ev-action-icon.orange { background: #fff3cd; color: #997404; }
.ev-action-label { font-size: .875rem; font-weight: 500; }
.ev-action-desc { font-size: .75rem; color: #868e96; }
button.ev-action-item { width: 100%; text-align: left; }

/* ── Timeline ── */
.ev-timeline { padding: 1.5rem 1.5rem 1.25rem; }
.ev-timeline-item {
    display: flex; align-items: flex-start; gap: .875rem;
    position: relative; padding-bottom: 1.5rem;
}
.ev-timeline-item:last-child { padding-bottom: 0; }
.ev-timeline-item::before {
    content: ''; position: absolute;
    left: 13px; top: 28px; bottom: 0;
    width: 2.5px; background: #e9ecef;
    border-radius: 2px;
}
.ev-timeline-item:last-child::before { display: none; }
.ev-timeline-item.done::before { background: #198754; }
.ev-timeline-marker {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f1f3f5; color: #adb5bd;
    font-size: .8rem; flex-shrink: 0;
    border: 2.5px solid #e9ecef;
    z-index: 1; position: relative;
    transition: all .3s;
}
.ev-timeline-item.done .ev-timeline-marker {
    background: #198754; border-color: #198754; color: #fff;
}
.ev-timeline-item.active .ev-timeline-marker {
    background: #fff; border-color: #0d6efd; color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13,110,253,.12);
    animation: ev-pulse 2s infinite;
}
.ev-timeline-content { padding-top: .125rem; }
.ev-timeline-title { font-size: .875rem; font-weight: 600; color: #212529; }
.ev-timeline-item:not(.done):not(.active) .ev-timeline-title { color: #ced4da; }
.ev-timeline-detail { font-size: .75rem; color: #6c757d; margin-top: .125rem; }
.ev-timeline-item:not(.done):not(.active) .ev-timeline-detail { color: #dee2e6; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .ev-hero { padding: 1.25rem; }
    .ev-hero-title { font-size: 1.25rem; }
    .ev-hero-grid { grid-template-columns: repeat(2, 1fr); }
    .ev-pills { gap: .375rem; }
    .ev-package-banner { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .ev-finance-amount { font-size: 1.5rem; }
}
@media (max-width: 575.98px) {
    .ev-hero { padding: 1rem; border-radius: 12px; }
    .ev-hero-meta { font-size: .8rem; }
    .ev-hero-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .ev-card-body { padding: 1rem; }
    .ev-contract-actions { flex-direction: column; }
    .ev-contract-actions .btn { width: 100%; }
    .ev-finance-amount { font-size: 1.375rem; }
    .ev-action-item { padding: .625rem .75rem; }
}

/* ===== Eventos List (evl-*) ===== */
.evl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.evl-filters {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.evl-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}
.evl-search-icon {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: .875rem;
    pointer-events: none;
}
.evl-search .form-control {
    padding-left: 2.25rem;
    border-radius: 8px;
    border-color: #dee2e6;
    font-size: .875rem;
}
.evl-search .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13,110,253,.12);
}

.evl-status-filter {
    width: auto;
    min-width: 180px;
    border-radius: 8px;
    font-size: .875rem;
    border-color: #dee2e6;
}

/* Empty state */
.evl-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}
.evl-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: #f0f4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #6c757d;
}

/* Event list */
.evl-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.evl-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
    gap: 1rem;
}
.evl-card:hover {
    border-color: #c5cad0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    color: inherit;
}

.evl-card-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

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

.evl-card-title {
    font-weight: 700;
    font-size: .95rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.evl-card:hover .evl-card-title { color: #0d6efd; }

.evl-card-client {
    font-size: .8rem;
    color: #6c757d;
    margin-top: 2px;
}

.evl-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 100px;
    text-align: center;
}
.evl-date-text {
    font-size: .825rem;
    font-weight: 600;
    color: #495057;
}
.evl-date-time {
    font-size: .75rem;
    color: #6c757d;
}
.evl-date-remaining {
    font-size: .7rem;
    color: #6c757d;
    background: #f1f3f5;
    padding: 1px 8px;
    border-radius: 10px;
}
.evl-date-remaining.evl-soon {
    color: #e67700;
    background: #fff3e0;
    font-weight: 600;
}
.evl-date-remaining.evl-past {
    color: #c92a2a;
    background: #ffe0e0;
}

.evl-card-location {
    font-size: .78rem;
    color: #868e96;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Right side */
.evl-card-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.evl-card-finance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 100px;
}
.evl-amount {
    font-weight: 700;
    font-size: .95rem;
    color: #212529;
}
.evl-finance-badge {
    font-size: .675rem;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.evl-finance-badge.evl-paid { background: #d3f9d8; color: #2b8a3e; }
.evl-finance-badge.evl-partial { background: #fff3bf; color: #e67700; }
.evl-finance-badge.evl-pending { background: #ffe0e0; color: #c92a2a; }

/* Status badges */
.evl-status {
    font-size: .725rem;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.evl-st-pending { background: #fff3bf; color: #e67700; }
.evl-st-confirmed { background: #d0ebff; color: #1971c2; }
.evl-st-active { background: #c3fae8; color: #0ca678; }
.evl-st-done { background: #d3f9d8; color: #2b8a3e; }
.evl-st-cancelled { background: #ffe0e0; color: #c92a2a; }

/* Action buttons */
.evl-card-actions {
    display: flex;
    gap: .375rem;
}
.evl-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #6c757d;
    text-decoration: none;
    transition: background .15s, color .15s;
    font-size: .875rem;
}
.evl-action-btn:hover {
    background: #e9ecef;
    color: #0d6efd;
}

/* Responsive */
@media (max-width: 991.98px) {
    .evl-card-location { display: none; }
    .evl-card-date { min-width: 85px; }
}

@media (max-width: 767.98px) {
    .evl-filters { flex-direction: column; }
    .evl-search { max-width: none; }
    .evl-status-filter { width: 100%; }

    .evl-card {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
        padding: .875rem 1rem;
    }
    .evl-card-main {
        flex-direction: column;
        align-items: flex-start;
        gap: .375rem;
        width: 100%;
    }
    .evl-card-date {
        flex-direction: row;
        gap: .5rem;
        align-items: center;
    }
    .evl-card-location { display: block; max-width: none; }
    .evl-card-right {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #f1f3f5;
        padding-top: .625rem;
    }
    .evl-card-finance { align-items: flex-start; }
}

/* ===== Cliente Detail (cd-*) ===== */
.cd-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    border: 1px solid #e9ecef;
}
.cd-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #495057;
    text-decoration: none;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
    transition: background .15s;
}
.cd-back:hover { background: #f1f3f5; color: #212529; }

.cd-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4263eb, #7048e8);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cd-header-info { flex: 1; min-width: 0; }
.cd-name {
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0;
    color: #212529;
}
.cd-header-meta {
    display: flex;
    gap: .5rem;
    margin-top: 4px;
    flex-wrap: wrap;
}
.cd-tag {
    font-size: .75rem;
    color: #6c757d;
    background: #f1f3f5;
    padding: 2px 10px;
    border-radius: 10px;
}

.cd-header-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

/* Metrics */
.cd-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.cd-metric {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    padding: 1rem 1.125rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}
.cd-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.cd-metric-value {
    font-weight: 700;
    font-size: .95rem;
    color: #212529;
    line-height: 1.2;
}
.cd-metric-label {
    font-size: .7rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Body two-column */
.cd-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
    align-items: start;
}

/* Contact card */
.cd-contact-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
}
.cd-section-title {
    font-weight: 700;
    font-size: .85rem;
    color: #495057;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.cd-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .875rem;
}
.cd-contact-item {
    display: flex;
    gap: .625rem;
    align-items: flex-start;
}
.cd-contact-item > i {
    color: #868e96;
    font-size: .9rem;
    margin-top: 2px;
}
.cd-contact-item small { font-size: .7rem; }
.cd-contact-item div:last-child > div { font-size: .875rem; color: #212529; }

.cd-notes {
    margin-top: 1rem;
    padding-top: .875rem;
    border-top: 1px solid #f1f3f5;
    font-size: .85rem;
    color: #495057;
    display: flex;
    align-items: flex-start;
}

/* Events card */
.cd-events-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
}
.cd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cd-empty {
    text-align: center;
    padding: 2.5rem 1rem;
}
.cd-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto .75rem;
    background: #f0f4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6c757d;
}

.cd-events-list {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.cd-event-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .625rem .75rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
    gap: .75rem;
}
.cd-event-row:hover {
    background: #f8f9fa;
    color: inherit;
}
.cd-event-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.cd-event-name {
    font-weight: 600;
    font-size: .875rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cd-event-row:hover .cd-event-name { color: #0d6efd; }
.cd-event-date {
    font-size: .75rem;
    color: #868e96;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.cd-event-countdown {
    font-size: .65rem;
    background: #f1f3f5;
    padding: 1px 6px;
    border-radius: 8px;
    color: #6c757d;
}
.cd-event-countdown.cd-soon { background: #fff3e0; color: #e67700; font-weight: 600; }

.cd-event-right {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.cd-event-amount {
    font-weight: 700;
    font-size: .85rem;
    color: #212529;
}

/* Responsive */
@media (max-width: 991.98px) {
    .cd-metrics { grid-template-columns: repeat(2, 1fr); }
    .cd-body { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .cd-header {
        flex-wrap: wrap;
        padding: 1rem;
        gap: .75rem;
    }
    .cd-header-actions { width: 100%; justify-content: flex-end; }
    .cd-contact-grid { grid-template-columns: 1fr; }
    .cd-metrics { grid-template-columns: 1fr 1fr; }
    .cd-event-row { padding: .5rem .375rem; }
}

/* ===== Clientes List (cl-*) ===== */
.cl-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.cl-card {
    display: flex;
    align-items: center;
    padding: .875rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
    gap: 1rem;
}
.cl-card:hover {
    border-color: #c5cad0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    color: inherit;
}

.cl-avatar {
    width: 44px;
    height: 44px;
    font-size: .95rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.cl-card-info {
    flex: 1;
    min-width: 0;
}
.cl-card-name {
    font-weight: 700;
    font-size: .925rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cl-card:hover .cl-card-name { color: #0d6efd; }

.cl-card-contact {
    font-size: .78rem;
    color: #6c757d;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-wrap: wrap;
}
.cl-contact-sep { color: #dee2e6; }

.cl-card-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 1;
    min-width: 0;
}
.cl-meta-tag {
    font-size: .75rem;
    color: #6c757d;
    background: #f1f3f5;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.cl-meta-badge {
    font-size: .7rem;
    font-weight: 600;
    color: #5f3dc4;
    background: #f3f0ff;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.cl-card-actions {
    display: flex;
    gap: .25rem;
    flex-shrink: 0;
}
.cl-action-delete {
    border: none;
    cursor: pointer;
}
.cl-action-delete:hover {
    background: #ffe0e0 !important;
    color: #c92a2a !important;
}

/* Responsive */
@media (max-width: 767.98px) {
    .cl-card {
        flex-wrap: wrap;
        padding: .75rem 1rem;
        gap: .625rem;
    }
    .cl-avatar { width: 40px; height: 40px; font-size: .85rem; }
    .cl-card-info { flex-basis: calc(100% - 56px); }
    .cl-card-meta {
        display: flex;
        width: 100%;
        padding-left: 52px;
    }
    .cl-card-actions {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid #f1f3f5;
        padding-top: .5rem;
    }
}

/* ===== Dashboard (db-*) ===== */
.db-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.db-greeting {
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0;
    color: #212529;
}
.db-date {
    font-size: .85rem;
    color: #868e96;
    margin: 2px 0 0;
    text-transform: capitalize;
}
.db-quick-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

/* Stats */
.db-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.db-stat {
    display: flex;
    align-items: center;
    gap: .875rem;
    background: #fff;
    padding: 1.125rem 1.25rem;
    border-radius: 14px;
    border: 1px solid #e9ecef;
}
.db-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.db-stat-info { min-width: 0; }
.db-stat-value {
    font-weight: 700;
    font-size: 1.25rem;
    color: #212529;
    line-height: 1.2;
}
.db-stat-success { color: #2b8a3e; }
.db-stat-danger { color: #c92a2a; }
.db-stat-label {
    font-size: .725rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Body */
.db-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    align-items: start;
}
.db-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
}
.db-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.db-section-title {
    font-weight: 700;
    font-size: .85rem;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin: 0;
}
.db-section-link {
    font-size: .78rem;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}
.db-section-link:hover { text-decoration: underline; }

/* Empty */
.db-empty {
    text-align: center;
    padding: 2rem 1rem;
}
.db-empty-icon {
    font-size: 2rem;
    color: #ced4da;
    display: block;
    margin-bottom: .5rem;
}

/* Event rows */
.db-events-list {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.db-event-row {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .625rem .75rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.db-event-row:hover { background: #f8f9fa; color: inherit; }

.db-event-date-badge {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f3f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.db-event-date-badge.db-soon { background: #fff3e0; }
.db-event-date-badge.db-urgent { background: #ffe0e0; }
.db-event-day {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
}
.db-event-date-badge.db-urgent .db-event-day { color: #c92a2a; }
.db-event-date-badge.db-soon .db-event-day { color: #e67700; }
.db-event-month {
    font-size: .6rem;
    text-transform: uppercase;
    color: #868e96;
    font-weight: 600;
}

.db-event-info { flex: 1; min-width: 0; }
.db-event-name {
    font-weight: 600;
    font-size: .875rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-event-row:hover .db-event-name { color: #0d6efd; }
.db-event-meta {
    font-size: .75rem;
    color: #868e96;
    display: flex;
    gap: .25rem;
    align-items: center;
}
.db-event-sep { color: #ced4da; }

.db-event-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.db-event-amount {
    font-weight: 700;
    font-size: .85rem;
    color: #212529;
}
.db-event-countdown {
    font-size: .65rem;
    color: #6c757d;
    background: #f1f3f5;
    padding: 1px 8px;
    border-radius: 8px;
}
.db-event-countdown.db-soon { background: #fff3e0; color: #e67700; font-weight: 600; }
.db-event-countdown.db-urgent { background: #ffe0e0; color: #c92a2a; font-weight: 600; }

/* Finance bars */
.db-finance-bars {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.db-finance-item {}
.db-finance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.db-finance-label {
    font-size: .8rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.db-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.db-finance-count {
    font-weight: 700;
    font-size: .85rem;
    color: #212529;
}
.db-bar-track {
    height: 6px;
    background: #f1f3f5;
    border-radius: 3px;
    overflow: hidden;
}
.db-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease;
    min-width: 2px;
}

.db-finance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
}
.db-finance-total {
    text-align: center;
}
.db-finance-total small { font-size: .7rem; }
.db-finance-total .fw-bold { font-size: .9rem; }

/* Responsive */
@media (max-width: 991.98px) {
    .db-stats { grid-template-columns: repeat(2, 1fr); }
    .db-body { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .db-header { flex-direction: column; gap: .75rem; }
    .db-quick-actions { width: 100%; }
    .db-quick-actions .btn { flex: 1; }
    .db-greeting { font-size: 1.25rem; }
    .db-stats { grid-template-columns: 1fr 1fr; }
    .db-stat { padding: .875rem 1rem; }
    .db-stat-value { font-size: 1.1rem; }
}

/* ===== Caja Evento (cx-*) ===== */
.cx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.cx-header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.cx-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0;
    color: #212529;
}
.cx-subtitle {
    font-size: .82rem;
    color: #868e96;
}
.cx-header-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

/* Progress card */
.cx-progress-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.cx-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}
.cx-progress-label {
    font-size: .8rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.cx-progress-pct {
    font-size: 1.25rem;
    font-weight: 800;
    color: #212529;
}
.cx-progress-bar {
    height: 10px;
    background: #f1f3f5;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: .5rem;
}
.cx-progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #2b8a3e, #40c057);
    transition: width .4s ease;
}
.cx-progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: #868e96;
}

/* Stats */
.cx-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.cx-stat {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    padding: 1rem 1.125rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}
.cx-stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
    line-height: 1.2;
}
.cx-stat-label {
    font-size: .7rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Body */
.cx-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}
.cx-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
}
.cx-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Empty */
.cx-empty {
    text-align: center;
    padding: 2rem 1rem;
}
.cx-empty-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: .5rem;
    opacity: .4;
}

/* Movement rows */
.cx-mov-list {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.cx-mov-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .625rem;
    border-radius: 8px;
    transition: background .15s;
}
.cx-mov-row:hover { background: #f8f9fa; }

.cx-mov-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
}
.cx-mov-income { background: #d3f9d8; color: #2b8a3e; }
.cx-mov-expense { background: #ffe0e0; color: #c92a2a; }

.cx-mov-info { flex: 1; min-width: 0; }
.cx-mov-title {
    font-weight: 600;
    font-size: .85rem;
    color: #212529;
}
.cx-mov-meta {
    font-size: .72rem;
    color: #868e96;
}
.cx-mov-amount {
    font-weight: 700;
    font-size: .875rem;
    flex-shrink: 0;
}
.cx-amount-income { color: #2b8a3e; }
.cx-amount-expense { color: #c92a2a; }

/* Responsive */
@media (max-width: 991.98px) {
    .cx-stats { grid-template-columns: repeat(2, 1fr); }
    .cx-body { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .cx-header { flex-direction: column; align-items: flex-start; }
    .cx-header-actions { width: 100%; }
    .cx-header-actions .btn { flex: 1; }
    .cx-stats { grid-template-columns: 1fr 1fr; }
    .cx-stat { padding: .75rem .875rem; }
    .cx-stat-value { font-size: .95rem; }
}

/* ========================================
   PlantillasContrato (pt-*)
   ======================================== */

/* List view */
.pt-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pt-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all .15s;
}
.pt-card:hover {
    border-color: #a5d8ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.pt-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #e8f4fd;
    color: #1971c2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.pt-card-info {
    flex: 1;
    min-width: 0;
}
.pt-card-name {
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.pt-badge-default {
    font-size: .65rem;
    font-weight: 600;
    background: #d3f9d8;
    color: #2b8a3e;
    padding: 2px 8px;
    border-radius: 20px;
}
.pt-card-meta {
    font-size: .8rem;
    color: #868e96;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Editor header */
.pt-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Form bar */
.pt-form-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.pt-form-field {
    flex: 1;
    min-width: 160px;
}
.pt-form-check {
    display: flex;
    align-items: center;
    padding-bottom: 4px;
}

/* Editor body (2 columns) */
.pt-editor-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 500px;
}
.pt-editor-left {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Variables panel */
.pt-vars-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: .875rem 1rem;
}
.pt-vars-title {
    font-weight: 600;
    font-size: .8rem;
    color: #495057;
    margin-bottom: .625rem;
}
.pt-vars-groups {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pt-vars-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
}
.pt-vars-group-label {
    font-size: .7rem;
    font-weight: 700;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .5px;
    min-width: 70px;
}
.pt-var-btn {
    font-size: .72rem;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
    color: #495057;
    font-family: monospace;
    transition: all .15s;
}
.pt-var-btn:hover {
    background: #e8f4fd;
    border-color: #a5d8ff;
    color: #1971c2;
}

/* Textarea */
.pt-textarea {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: .875rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    resize: none;
    min-height: 300px;
    outline: none;
    transition: border-color .15s;
    line-height: 1.6;
}
.pt-textarea:focus {
    border-color: #74c0fc;
    box-shadow: 0 0 0 3px rgba(29,113,194,.08);
}
.pt-textarea::placeholder {
    color: #adb5bd;
}

/* Preview */
.pt-preview {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pt-preview-header {
    font-size: .8rem;
    font-weight: 600;
    color: #495057;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
    background: #f8f9fa;
}
.pt-preview-body {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    font-size: .875rem;
    line-height: 1.7;
}
.pt-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}
.pt-preview-content {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Responsive */
@media (max-width: 991.98px) {
    .pt-editor-body {
        grid-template-columns: 1fr;
    }
    .pt-preview {
        min-height: 300px;
    }
}
@media (max-width: 767.98px) {
    .pt-editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
    }
    .pt-form-bar {
        flex-direction: column;
    }
    .pt-form-field {
        min-width: 100%;
    }
}

/* ========================================
   PlantillasWhatsApp (wa-*)
   ======================================== */

/* List view */
.wa-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.wa-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all .15s;
}
.wa-card:hover {
    border-color: #25d366;
    box-shadow: 0 2px 8px rgba(37,211,102,.1);
}
.wa-card-inactive {
    opacity: .55;
}
.wa-card-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    border-radius: 10px;
}
.wa-card-info {
    flex: 1;
    min-width: 0;
}
.wa-card-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 2px;
}
.wa-card-name {
    font-weight: 600;
    font-size: .95rem;
}
.wa-badge-active {
    font-size: .65rem;
    font-weight: 600;
    background: #d3f9d8;
    color: #2b8a3e;
    padding: 2px 8px;
    border-radius: 20px;
}
.wa-badge-inactive {
    font-size: .65rem;
    font-weight: 600;
    background: #f1f3f5;
    color: #868e96;
    padding: 2px 8px;
    border-radius: 20px;
}
.wa-card-type {
    font-size: .75rem;
    color: #868e96;
    font-weight: 500;
    margin-bottom: 4px;
}
.wa-card-preview {
    font-size: .8rem;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-card-arrow {
    color: #ced4da;
    font-size: .9rem;
    flex-shrink: 0;
}

/* Editor form bar */
.wa-form-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.wa-form-field { min-width: 160px; }
.wa-form-toggle {
    display: flex;
    align-items: center;
    padding-bottom: 4px;
}
.wa-editor-emoji {
    font-size: 1.5rem;
}

/* Editor body (2 columns) */
.wa-editor-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 520px;
}
.wa-editor-left {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Variables panel */
.wa-vars-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: .875rem 1rem;
}
.wa-vars-title {
    font-weight: 600;
    font-size: .8rem;
    color: #495057;
    margin-bottom: .625rem;
}
.wa-vars-groups {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.wa-vars-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
}
.wa-vars-group-label {
    font-size: .7rem;
    font-weight: 700;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .5px;
    min-width: 70px;
}
.wa-var-btn {
    font-size: .72rem;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
    color: #495057;
    font-family: monospace;
    transition: all .15s;
}
.wa-var-btn:hover {
    background: #d3f9d8;
    border-color: #25d366;
    color: #075e54;
}

/* Textarea */
.wa-textarea {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: .875rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    resize: none;
    min-height: 200px;
    outline: none;
    transition: border-color .15s;
    line-height: 1.6;
}
.wa-textarea:focus {
    border-color: #25d366;
    box-shadow: 0 0 0 3px rgba(37,211,102,.08);
}
.wa-textarea::placeholder {
    color: #adb5bd;
}

/* Character counter */
.wa-char-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
    padding: 0 .25rem;
}

/* WhatsApp chat preview */
.wa-preview {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    background: #efeae2;
}
.wa-preview-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1rem;
    background: #075e54;
    color: #fff;
}
.wa-preview-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.wa-preview-header-info { flex: 1; }
.wa-preview-header-name {
    font-size: .85rem;
    font-weight: 600;
}
.wa-preview-header-status {
    font-size: .7rem;
    opacity: .8;
}
.wa-preview-header-actions {
    display: flex;
    gap: .875rem;
    font-size: .95rem;
    opacity: .8;
}

/* Chat area */
.wa-preview-chat {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4cfc6' fill-opacity='0.15'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='60' cy='60' r='2'/%3E%3Ccircle cx='60' cy='20' r='1.5'/%3E%3Ccircle cx='20' cy='60' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}
.wa-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}
.wa-preview-date-chip {
    align-self: center;
    background: #e1f2fb;
    color: #4a5568;
    font-size: .7rem;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* Outgoing bubble */
.wa-bubble-out {
    align-self: flex-end;
    max-width: 85%;
    background: #dcf8c6;
    border-radius: 8px 0 8px 8px;
    padding: .5rem .65rem .25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
    position: relative;
}
.wa-bubble-text {
    font-size: .85rem;
    line-height: 1.5;
    color: #303030;
    word-break: break-word;
    white-space: pre-wrap;
}
.wa-bubble-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}
.wa-bubble-time {
    font-size: .65rem;
    color: #7c8b8e;
}
.wa-bubble-read {
    font-size: .75rem;
    color: #53bdeb;
}

/* Input bar */
.wa-preview-input-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: #f0f2f5;
}
.wa-preview-input-icons {
    display: flex;
    gap: .625rem;
    color: #54656f;
    font-size: 1.1rem;
}
.wa-preview-input-box {
    flex: 1;
    background: #fff;
    border-radius: 20px;
    padding: .5rem 1rem;
    font-size: .8rem;
    color: #8696a0;
}
.wa-preview-input-mic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .wa-editor-body {
        grid-template-columns: 1fr;
    }
    .wa-preview {
        min-height: 400px;
    }
}
@media (max-width: 767.98px) {
    .wa-form-bar {
        flex-direction: column;
    }
    .wa-form-field {
        min-width: 100% !important;
    }
    .wa-card-preview {
        display: none;
    }
}

/* ========================================
   Trabajadores (tw-*)
   ======================================== */

/* Search */
.tw-search {
    position: relative;
}
.tw-search input {
    padding-left: 2rem;
    min-width: 180px;
    border-radius: 8px;
}
.tw-search-icon {
    position: absolute;
    left: .625rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: .8rem;
    pointer-events: none;
}

/* List */
.tw-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.tw-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all .15s;
}
.tw-card:hover {
    border-color: #a5d8ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.tw-avatar {
    width: 44px;
    height: 44px;
    font-size: .85rem;
    flex-shrink: 0;
}
.tw-card-info {
    flex: 1;
    min-width: 0;
}
.tw-card-name {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 4px;
}
.tw-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    align-items: center;
}
.tw-badge-rol {
    font-size: .68rem;
    font-weight: 600;
    background: #e8f4fd;
    color: #1971c2;
    padding: 2px 8px;
    border-radius: 20px;
}
.tw-badge-norol {
    font-size: .68rem;
    font-weight: 600;
    background: #f1f3f5;
    color: #868e96;
    padding: 2px 8px;
    border-radius: 20px;
}
.tw-badge-pago {
    font-size: .68rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
}
.tw-pago-evento {
    background: #f3f0ff;
    color: #7048e8;
}
.tw-pago-fijo {
    background: #e6fcf5;
    color: #0ca678;
}

/* Details column */
.tw-card-details {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-shrink: 0;
}
.tw-detail {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .82rem;
    color: #495057;
}
.tw-detail i {
    color: #868e96;
    font-size: .8rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .tw-card {
        flex-wrap: wrap;
    }
    .tw-card-details {
        width: 100%;
        padding-left: 60px;
        margin-top: -.25rem;
    }
    .tw-search input {
        min-width: 120px;
    }
}

/* ========================================
   Inventario (inv-*)
   ======================================== */

/* Alert badges */
.inv-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.inv-alert {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 10px;
    font-size: .82rem;
}
.inv-alert-warn {
    background: #fff3e0;
    color: #e67700;
}
.inv-alert-danger {
    background: #ffe0e0;
    color: #c92a2a;
}
.inv-alert-muted {
    background: #f1f3f5;
    color: #868e96;
}

/* Dashboard category section */
.inv-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: .5rem;
}
.inv-cat-list {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}
.inv-cat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .5rem 0;
}
.inv-cat-row:not(:last-child) {
    border-bottom: 1px solid #f1f3f5;
}
.inv-cat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f3f5;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.inv-cat-info {
    flex: 1;
    min-width: 0;
}
.inv-cat-name {
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: 4px;
}
.inv-cat-bar-wrap {
    display: flex;
    align-items: center;
    gap: .625rem;
}
.inv-cat-bar {
    flex: 1;
    height: 6px;
    background: #f1f3f5;
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
}
.inv-cat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .3s;
}
.inv-bar-ok { background: #2b8a3e; }
.inv-bar-warn { background: #e67700; }
.inv-bar-danger { background: #c92a2a; }
.inv-cat-bar-label {
    font-size: .7rem;
    color: #868e96;
    white-space: nowrap;
}
.inv-cat-nums {
    text-align: right;
    flex-shrink: 0;
    min-width: 80px;
}
.inv-cat-available {
    font-weight: 700;
    font-size: .95rem;
    color: #2b8a3e;
}
.inv-cat-available small {
    font-weight: 400;
    font-size: .7rem;
    color: #868e96;
}
.inv-cat-total {
    font-size: .8rem;
    color: #868e96;
}

/* Catalogo list */
.inv-equip-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.inv-eq-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all .15s;
}
.inv-eq-card:hover {
    border-color: #a5d8ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.inv-eq-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #e8f4fd;
    color: #1971c2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.inv-eq-info {
    flex: 1;
    min-width: 0;
}
.inv-eq-name {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 3px;
}
.inv-eq-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    align-items: center;
}
.inv-eq-cat {
    font-size: .68rem;
    font-weight: 600;
    background: #f1f3f5;
    color: #495057;
    padding: 2px 8px;
    border-radius: 20px;
}
.inv-eq-brand {
    font-size: .75rem;
    color: #868e96;
}
.inv-eq-price {
    font-size: .75rem;
    color: #0ca678;
    font-weight: 600;
}

/* Stock indicator */
.inv-eq-stock {
    text-align: center;
    flex-shrink: 0;
    min-width: 80px;
}
.inv-eq-stock-nums {
    font-size: 1rem;
    line-height: 1;
}
.inv-eq-stock-avail {
    font-weight: 700;
}
.inv-eq-stock-sep {
    color: #ced4da;
    margin: 0 1px;
}
.inv-eq-stock-total {
    color: #868e96;
    font-size: .85rem;
}
.inv-eq-stock-label {
    font-size: .65rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: 2px;
}
.inv-eq-stock-bar {
    height: 4px;
    background: #f1f3f5;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}
.inv-eq-stock-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s;
}

/* Responsive */
@media (max-width: 767.98px) {
    .inv-cat-bar {
        max-width: 100px;
    }
    .inv-eq-card {
        flex-wrap: wrap;
    }
    .inv-eq-stock {
        width: 100%;
        display: flex;
        align-items: center;
        gap: .5rem;
        text-align: left;
        padding-left: 58px;
        margin-top: -.25rem;
    }
    .inv-eq-stock-bar {
        flex: 1;
        margin-top: 0;
    }
    .inv-eq-meta {
        gap: .25rem;
    }
}

/* ========================================
   Prospectos (pr-*)
   ======================================== */

/* KPI bar */
.pr-kpi-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.pr-kpi {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: .5rem 1rem;
}
.pr-kpi-value {
    font-weight: 700;
    font-size: .95rem;
}
.pr-kpi-label {
    font-size: .72rem;
    color: #868e96;
}
.pr-kpi-etapa {
    background: #f8f9fa;
}

/* Etapa badge */
.pr-etapa-badge {
    font-size: .68rem;
    font-weight: 600;
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* List */
.pr-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pr-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all .15s;
}
.pr-card:hover {
    border-color: #a5d8ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    color: inherit;
}
.pr-card-overdue {
    border-left: 3px solid #c92a2a;
}
.pr-avatar {
    width: 44px;
    height: 44px;
    font-size: .85rem;
    flex-shrink: 0;
}
.pr-card-info {
    flex: 1;
    min-width: 0;
}
.pr-card-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 3px;
}
.pr-card-name {
    font-weight: 600;
    font-size: .95rem;
}
.pr-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .78rem;
    color: #868e96;
}
.pr-card-meta i { font-size: .7rem; }
.pr-card-right {
    text-align: right;
    flex-shrink: 0;
    min-width: 100px;
}
.pr-card-monto {
    font-weight: 700;
    font-size: .95rem;
    color: #0ca678;
}
.pr-prob-bar {
    width: 60px;
    height: 4px;
    background: #f1f3f5;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}
.pr-prob-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s;
}
.pr-prob-text {
    font-size: .7rem;
    color: #868e96;
    margin-left: 4px;
}
.pr-overdue-badge {
    font-size: .68rem;
    color: #c92a2a;
    font-weight: 600;
    margin-top: 2px;
}
.pr-seg-date {
    font-size: .7rem;
    color: #868e96;
    margin-top: 2px;
}

/* Detail header */
.pr-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.pr-prob-inline {
    font-size: .78rem;
    color: #868e96;
}
.pr-monto-inline {
    font-size: .85rem;
    font-weight: 700;
    color: #0ca678;
}

/* Detail body (2 columns) */
.pr-detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}
.pr-detail-left, .pr-detail-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Info cards */
.pr-info-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
}
.pr-info-title {
    font-size: .85rem;
    font-weight: 700;
    color: #495057;
}
.pr-info-grid {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pr-info-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}
.pr-info-item i {
    color: #868e96;
    width: 18px;
    text-align: center;
}
.pr-notas {
    padding-top: .75rem;
    border-top: 1px solid #f1f3f5;
}

/* Tasks */
.pr-tareas {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.pr-tarea {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem 0;
}
.pr-tarea:not(:last-child) {
    border-bottom: 1px solid #f8f9fa;
}
.pr-tarea-check {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #ced4da;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.pr-tarea-checked { color: #2b8a3e; }
.pr-tarea-info { flex: 1; }
.pr-tarea-titulo { font-size: .85rem; }
.pr-tarea-fecha { font-size: .7rem; color: #868e96; display: block; }
.pr-tarea-done { opacity: .5; }

/* Cotizaciones */
.pr-cotizaciones {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pr-cotizacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px solid #f8f9fa;
}
.pr-cot-status {
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.pr-cot-draft { background: #f1f3f5; color: #868e96; }
.pr-cot-enviada { background: #e8f4fd; color: #1971c2; }
.pr-cot-aceptada { background: #d3f9d8; color: #2b8a3e; }
.pr-cot-rechazada { background: #ffe0e0; color: #c92a2a; }

/* Timeline */
.pr-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pr-timeline-item {
    display: flex;
    gap: .75rem;
    padding: .625rem 0;
    border-bottom: 1px solid #f8f9fa;
}
.pr-timeline-item:last-child { border-bottom: none; }
.pr-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #495057;
    flex-shrink: 0;
}
.pr-timeline-content { flex: 1; min-width: 0; }
.pr-timeline-tipo {
    font-size: .78rem;
    font-weight: 600;
    color: #495057;
}
.pr-timeline-msg {
    font-size: .82rem;
    color: #495057;
    margin-top: 2px;
}
.pr-timeline-date {
    font-size: .68rem;
    color: #adb5bd;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .pr-detail-body {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 767.98px) {
    .pr-detail-header {
        flex-direction: column;
    }
    .pr-card-right {
        display: none;
    }
    .pr-kpi-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .pr-kpi {
        flex-shrink: 0;
    }
}

/* ============================================
   MANTENIMIENTOS / INVENTARIO EXTENDED (mnt-*)
   ============================================ */

/* Stats bar */
.mnt-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mnt-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    flex: 1;
    min-width: 160px;
}
.mnt-stat-icon { font-size: 1.5rem; }
.mnt-stat-val { font-size: 1.2rem; font-weight: 700; }
.mnt-stat-lbl { font-size: .75rem; color: #868e96; }

/* Badge styles */
.mnt-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.mnt-badge-tipo {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 600;
    background: #f1f3f5;
    color: #495057;
}

/* Mantenimientos list */
.mnt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mnt-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}
.mnt-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.mnt-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.mnt-card-body { flex: 1; min-width: 0; }
.mnt-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.mnt-card-equipo { font-weight: 600; font-size: .95rem; }
.mnt-card-codigo { color: #868e96; font-size: .8rem; margin-left: 8px; }
.mnt-card-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: #868e96;
}
.mnt-card-desc {
    font-size: .82rem;
    color: #495057;
    margin-top: 6px;
    line-height: 1.4;
}
.mnt-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Unit list */
.mnt-unit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mnt-unit-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .1s;
}
.mnt-unit-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-1px);
    color: inherit;
}
.mnt-unit-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.mnt-unit-card-body { flex: 1; min-width: 0; }
.mnt-unit-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.mnt-unit-card-code { font-weight: 700; font-size: .95rem; }
.mnt-unit-card-name { font-size: .85rem; color: #495057; }
.mnt-unit-card-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: #868e96;
    margin-top: 4px;
}
.mnt-unit-card-arrow { color: #adb5bd; font-size: 1.1rem; flex-shrink: 0; }

/* Unit detail */
.mnt-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.mnt-unit-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}
.mnt-detail-body {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: start;
}
.mnt-detail-left, .mnt-detail-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mnt-info-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.mnt-info-title {
    font-weight: 700;
    font-size: .9rem;
    color: #495057;
    margin-bottom: 12px;
}
.mnt-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mnt-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
}
.mnt-info-label {
    font-weight: 600;
    color: #868e96;
    min-width: 90px;
    font-size: .78rem;
}

/* Cost summary */
.mnt-cost-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mnt-cost-row {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    padding: 4px 0;
}
.mnt-cost-total {
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
    margin-top: 4px;
    font-size: .95rem;
}

/* Timeline */
.mnt-timeline {
    position: relative;
    padding-left: 24px;
}
.mnt-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e9ecef;
}
.mnt-timeline-item {
    position: relative;
    padding-bottom: 20px;
}
.mnt-timeline-item:last-child { padding-bottom: 0; }
.mnt-timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}
.mnt-timeline-content { padding-left: 4px; }
.mnt-timeline-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.mnt-timeline-tipo { font-weight: 600; font-size: .85rem; }
.mnt-timeline-desc {
    font-size: .82rem;
    color: #495057;
    margin-bottom: 4px;
    line-height: 1.4;
}
.mnt-timeline-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: #868e96;
}
.mnt-timeline-obs {
    font-size: .78rem;
    color: #868e96;
    font-style: italic;
    margin-top: 4px;
}

/* Cerrar info */
.mnt-cerrar-info {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Proveedores list */
.mnt-prov-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mnt-prov-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}
.mnt-prov-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.mnt-prov-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.mnt-prov-body { flex: 1; min-width: 0; }
.mnt-prov-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.mnt-prov-name { font-weight: 600; font-size: .95rem; }
.mnt-prov-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: #868e96;
}
.mnt-prov-notas {
    font-size: .78rem;
    color: #868e96;
    margin-top: 4px;
    line-height: 1.4;
}

/* Gastos list */
.mnt-gasto-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mnt-gasto-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}
.mnt-gasto-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.mnt-gasto-left { flex-shrink: 0; }
.mnt-gasto-fecha {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 48px;
}
.mnt-gasto-dia { font-weight: 700; font-size: 1.1rem; line-height: 1; }
.mnt-gasto-mes { font-size: .7rem; color: #868e96; text-transform: uppercase; }
.mnt-gasto-body { flex: 1; min-width: 0; }
.mnt-gasto-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.mnt-gasto-concepto { font-weight: 600; font-size: .95rem; }
.mnt-gasto-monto { font-weight: 700; font-size: 1rem; color: #c92a2a; white-space: nowrap; }
.mnt-gasto-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: #868e96;
    align-items: center;
}

/* Responsive */
@media (max-width: 991.98px) {
    .mnt-detail-body {
        grid-template-columns: 1fr;
    }
    .mnt-stats {
        flex-wrap: wrap;
    }
    .mnt-stat {
        min-width: 140px;
    }
}
@media (max-width: 767.98px) {
    .mnt-card-top {
        flex-direction: column;
        gap: 4px;
    }
    .mnt-card-actions {
        flex-direction: row;
    }
    .mnt-gasto-top {
        flex-direction: column;
    }
    .mnt-stats {
        gap: 8px;
    }
    .mnt-stat {
        min-width: 100%;
        padding: 10px 14px;
    }
}

/* ============================================
   CALENDARIO (cal-*)
   ============================================ */

.cal-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.cal-main {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.cal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cal-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    transition: all .15s;
}
.cal-nav-btn:hover { background: #f1f3f5; border-color: #adb5bd; }
.cal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cal-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0;
    text-transform: capitalize;
    min-width: 180px;
}
.cal-today-btn {
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #fff;
    font-size: .78rem;
    font-weight: 600;
    color: #1971c2;
    cursor: pointer;
    transition: all .15s;
}
.cal-today-btn:hover { background: #e8f4fd; border-color: #1971c2; }

/* View toggle */
.cal-view-toggle {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}
.cal-view-btn {
    padding: 6px 16px;
    border: none;
    background: #fff;
    font-size: .8rem;
    font-weight: 600;
    color: #868e96;
    cursor: pointer;
    transition: all .15s;
}
.cal-view-btn:hover { background: #f8f9fa; }
.cal-view-active {
    background: #1971c2 !important;
    color: #fff !important;
}

/* Calendar grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-weekday {
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    color: #495057;
    padding: 8px 0;
    text-transform: uppercase;
}
.cal-weekend { color: #c92a2a; }

/* Day cells */
.cal-day {
    position: relative;
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all .15s;
    padding: 4px;
}
.cal-day:hover { background: #e9ecef; }
.cal-day-num {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1;
}
.cal-day-other {
    opacity: .35;
}
.cal-day-today {
    border: 2px solid #7048e8;
}
.cal-day-today .cal-day-num { color: #7048e8; }
.cal-day-selected {
    background: #1971c2 !important;
    opacity: 1 !important;
}
.cal-day-selected .cal-day-num { color: #fff; }
.cal-day-selected .cal-day-count { color: rgba(255,255,255,.8); }
.cal-day-busy {
    background: #edf2ff;
}

/* Dots & count */
.cal-day-dots {
    display: flex;
    gap: 3px;
}
.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.cal-dot-confirmed { background: #2b8a3e; }
.cal-dot-pending { background: #e67700; }
.cal-day-count {
    font-size: .65rem;
    font-weight: 700;
    color: #495057;
    line-height: 1;
}

/* Legend */
.cal-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}
.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    color: #868e96;
}
.cal-day-today-sample {
    width: 16px;
    height: 16px;
    border-radius: 6px;
    border: 2px solid #7048e8;
    display: inline-block;
}

/* Annual view */
.cal-annual-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}
.cal-annual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.cal-annual-month {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.cal-annual-month:hover { border-color: #1971c2; background: #f0f7ff; }
.cal-annual-current {
    border-color: #7048e8;
    background: #f3f0ff;
}
.cal-annual-name {
    font-weight: 700;
    font-size: .9rem;
    text-transform: capitalize;
}
.cal-annual-count {
    background: #1971c2;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
}
.cal-annual-free {
    color: #adb5bd;
    font-size: .85rem;
}

/* Day detail panel */
.cal-panel {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: sticky;
    top: 80px;
}
.cal-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}
.cal-panel-title {
    font-weight: 700;
    font-size: .85rem;
    margin: 0;
    text-transform: capitalize;
}
.cal-panel-count {
    font-size: .75rem;
    color: #868e96;
}
.cal-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    text-align: center;
}
.cal-panel-empty-icon {
    font-size: 2.5rem;
    color: #2b8a3e;
    margin-bottom: 8px;
}
.cal-panel-empty-text {
    font-weight: 600;
    color: #2b8a3e;
    font-size: .9rem;
}
.cal-panel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Event card */
.cal-event-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: #f8f9fa;
    text-decoration: none;
    color: inherit;
    transition: all .15s;
}
.cal-event-card:hover { background: #e9ecef; color: inherit; }
.cal-event-indicator {
    width: 4px;
    border-radius: 4px;
    flex-shrink: 0;
}
.cal-event-body { flex: 1; min-width: 0; }
.cal-event-name {
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-event-client {
    font-size: .78rem;
    color: #495057;
    margin-bottom: 4px;
}
.cal-event-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .73rem;
    color: #868e96;
    margin-bottom: 6px;
}
.cal-event-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cal-event-status {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 600;
}
.cal-event-monto {
    font-weight: 700;
    font-size: .8rem;
    color: #495057;
}

/* Responsive */
@media (max-width: 991.98px) {
    .cal-layout {
        grid-template-columns: 1fr;
    }
    .cal-panel {
        position: static;
    }
}
@media (max-width: 767.98px) {
    .cal-main {
        padding: 14px;
    }
    .cal-title {
        font-size: .95rem;
        min-width: auto;
    }
    .cal-day {
        border-radius: 8px;
        padding: 2px;
    }
    .cal-day-num { font-size: .78rem; }
    .cal-day-count { font-size: .6rem; }
    .cal-annual-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .cal-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════ Registro Exitoso (re-*) ═══════ */
.re-icon-circle {
    width: 72px; height: 72px; border-radius: 50%;
    background: #d3f9d8; color: #2b8a3e;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.re-steps { display: flex; flex-direction: column; gap: 16px; }
.re-step { display: flex; align-items: flex-start; gap: 12px; }
.re-step-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: #e9ecef; color: #868e96;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: .95rem;
}
.re-step-icon.done { background: #d3f9d8; color: #2b8a3e; }

/* ─── Signature Pad Tabs ─── */
.sig-tabs {
    display: flex;
    gap: 4px;
    background: #f1f3f5;
    border-radius: 8px;
    padding: 3px;
}
.sig-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    color: #868e96;
    cursor: pointer;
    transition: all .2s;
}
.sig-tab:hover { color: #495057; }
.sig-tab.active {
    background: #fff;
    color: var(--bs-primary, #0d6efd);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ─── Drop Zone (signature upload & config images) ─── */
.sig-drop-zone {
    display: block;
    cursor: pointer;
    margin: 0;
}
.sig-drop-zone-inner {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    transition: all .2s;
    background: #fafbfc;
}
.sig-drop-zone-inner:hover,
.sig-drop-zone-inner.drag-over {
    border-color: var(--bs-primary, #0d6efd);
    background: rgba(13, 110, 253, .04);
}

/* ─── Signature Upload Preview ─── */
.sig-upload-preview {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    background: #fff;
}
.sig-upload-preview img {
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
}
