:root {
    --sidebar-bg: #1a1a2e;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 68px;
}

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: hidden;
    z-index: 1040;
    transition: width .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}

/* Header fijo dentro del sidebar */
.sidebar-header {
    padding: 1rem 1rem .75rem;
    flex-shrink: 0;
}

.sidebar-brand { white-space: nowrap; overflow: hidden; }

/* Botón colapsar (desktop) */
.sidebar-collapse-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    padding: .25rem .35rem;
    border-radius: .375rem;
    cursor: pointer;
    font-size: .9rem;
    transition: color .15s;
    align-items: center;
    justify-content: center;
}
.sidebar-collapse-btn:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Área scrollable del nav */
.sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 .5rem .5rem;
}
.sidebar-nav .nav { gap: 0; }

/* Footer fijo dentro del sidebar */
.sidebar-footer {
    flex-shrink: 0;
    padding: .75rem 1rem;
}
.sidebar-username {
    display: block;
    color: rgba(255,255,255,.7);
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .5rem;
}

/* Inicio sticky dentro del scroll */
.sidebar .nav-inicio-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--sidebar-bg);
    padding-bottom: 2px;
}

/* ── Sidebar colapsado ── */
.sidebar.sidebar-collapsed { width: var(--sidebar-collapsed-width); }

.sidebar.sidebar-collapsed .nav-text,
.sidebar.sidebar-collapsed .nav-section-item,
.sidebar.sidebar-collapsed .nav-chevron,
.sidebar.sidebar-collapsed .sidebar-brand span { display: none; }

.sidebar.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: .65rem 0;
    margin: 2px 6px;
}
.sidebar.sidebar-collapsed .nav-link i {
    width: auto;
    margin-right: 0;
    font-size: 1.05rem;
}
.sidebar.sidebar-collapsed .sidebar-footer button { font-size: 0; padding: .4rem; }
.sidebar.sidebar-collapsed .sidebar-footer button i { font-size: .9rem; }
.sidebar.sidebar-collapsed .sidebar-username i { margin-right: 0; }

.main-content.content-expanded { margin-left: var(--sidebar-collapsed-width); }

.sidebar .nav-link {
    color: #d8d8e0;
    padding: .7rem 1.1rem;
    border-radius: .375rem;
    margin: 2px 8px;
    font-size: .98rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(99,102,241,.22);
    font-weight: 600;
}

.sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8%;
    bottom: 8%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #7c8cff;
}

.sidebar .nav-link i {
    width: 26px;
    display: inline-block;
    text-align: center;
    margin-right: 10px;
    font-size: 1.08rem;
    vertical-align: middle;
}

/* Section dividers */
.sidebar .nav-section-item {
    margin-top: .35rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar .nav-section-label {
    display: block;
    color: rgba(255,255,255,.7);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    padding: 0 1.2rem .25rem;
}

/* Text wrapper inside expandable nav items */
.sidebar .nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Collapsible parent link */
.sidebar .nav-link.nav-parent {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar .nav-chevron {
    width: auto !important;
    margin-right: 0 !important;
    font-size: .65rem;
    transition: transform .25s ease;
}
.sidebar .nav-chevron.rotated {
    transform: rotate(180deg);
}

/* Collapsible submenu */
.sidebar .nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.sidebar .nav-submenu.open {
    max-height: 300px;
}

/* Sub-item links */
.sidebar .nav-link.nav-sub {
    padding: .5rem 1rem .5rem 3rem;
    font-size: .9rem;
    font-weight: 500;
    margin: 0 8px 0 8px;
    opacity: .9;
    border-radius: .25rem;
}
.sidebar .nav-link.nav-sub:hover,
.sidebar .nav-link.nav-sub.active {
    opacity: 1;
    font-weight: 600;
}
.sidebar .nav-link.nav-sub i {
    width: 18px;
    font-size: .75rem;
    margin-right: 6px;
}

/* Asistente IA — item destacado */
.sidebar .nav-link.nav-ia {
    border-left: 2px solid #7c3aed;
    background: rgba(124,58,237,.08);
}
.sidebar .nav-link.nav-ia:hover,
.sidebar .nav-link.nav-ia.active {
    background: rgba(124,58,237,.18);
    opacity: 1;
}

/* ── Toasts ── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;
}
.toast-item {
    padding: .7rem 1.1rem;
    border-radius: .5rem;
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    animation: toast-in .2s ease;
    min-width: 220px;
    max-width: 360px;
}
.toast-success { background: #2f9e44; }
.toast-error   { background: #c92a2a; }
.toast-warning { background: #e67700; }
.toast-info    { background: #1971c2; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 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; }

/* Legacy login shell — preserved for any third-party page still referencing it. */
.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; }

/* ════════════════════════════════════════════════
   AUTH V2 — login / register / forgot / reset
   Two-column on desktop (brand panel + form);
   single centered card on mobile.
   ════════════════════════════════════════════════ */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--ce-surface, #fff);
    font-family: var(--ce-font-sans);
    color: var(--ce-text, #0F172A);
}
.auth-shell--single { grid-template-columns: 1fr; }

@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
}

/* ── Left brand panel ── */
.auth-aside {
    background: linear-gradient(160deg, #1F1742 0%, #3F3286 45%, #5142B0 100%);
    color: #fff;
    padding: 56px 56px 48px;
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}
.auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 90%, rgba(255, 255, 255, .12), transparent 55%);
    pointer-events: none;
}
.auth-aside__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 480px;
    margin: auto 0;
}
.auth-aside__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -.02em;
}
.auth-aside__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}
.auth-aside__title {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin: 36px 0 24px;
    text-wrap: balance;
}
.auth-aside__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .92);
}
.auth-aside__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.auth-aside__list i {
    color: rgba(255, 255, 255, .85);
    font-size: 18px;
    margin-top: 1px;
    flex-shrink: 0;
}
.auth-aside__foot {
    margin: 40px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    letter-spacing: .02em;
}

@media (max-width: 960px) {
    .auth-aside { display: none; }
}

/* ── Right form panel ── */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}
@media (max-width: 480px) {
    .auth-main { padding: 24px 16px; align-items: flex-start; }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--ce-surface, #fff);
    padding: 8px;
}
.auth-card__head {
    text-align: left;
    margin-bottom: 24px;
}
.auth-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ce-primary-soft, #EDE9FE);
    color: var(--ce-primary, #7C3AED);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.auth-card__title {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ce-text, #0F172A);
    margin: 0 0 6px;
    line-height: 1.15;
}
.auth-card__sub {
    margin: 0;
    color: var(--ce-text-muted, #64748B);
    font-size: 15px;
    line-height: 1.45;
}

.auth-validation-summary {
    color: var(--ce-danger, #DC2626);
    background: var(--ce-danger-soft, #FEE2E2);
    border: 1px solid #FCA5A5;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.auth-validation-summary ul { margin: 0; padding-left: 18px; }
.auth-validation-summary li { line-height: 1.4; }

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.auth-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ce-text, #0F172A);
    margin: 0;
}
.auth-aux-link {
    font-size: 12px;
    color: var(--ce-primary, #7C3AED);
    text-decoration: none;
    font-weight: 500;
}
.auth-aux-link:hover { text-decoration: underline; }

.auth-input.form-control,
.auth-input.form-select {
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--ce-border, #E2E8F0);
    padding: 10px 14px;
    font-size: 15px;
    color: var(--ce-text, #0F172A);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input.form-control:focus,
.auth-input.form-select:focus {
    outline: none;
    border-color: var(--ce-primary, #7C3AED);
    box-shadow: var(--ce-focus-ring, 0 0 0 3px rgba(124, 58, 237, .18));
}
.auth-input.invalid,
.auth-input.modified.invalid {
    border-color: var(--ce-danger, #DC2626);
}

.auth-error {
    font-size: 12.5px;
    color: var(--ce-danger, #DC2626);
    line-height: 1.3;
}

.auth-btn-primary {
    width: 100%;
    height: 46px;
    background: var(--ce-primary, #7C3AED);
    border: 1px solid var(--ce-primary, #7C3AED);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(124, 58, 237, .25);
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.auth-btn-primary:hover:not(:disabled) {
    background: var(--ce-primary-hover, #6D28D9);
    border-color: var(--ce-primary-hover, #6D28D9);
    color: #fff;
}
.auth-btn-primary:disabled {
    opacity: .7;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-btn-outline {
    width: 100%;
    height: 44px;
    background: #fff;
    color: var(--ce-text, #0F172A);
    border: 1px solid var(--ce-border, #E2E8F0);
    font-weight: 500;
    font-size: 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.auth-btn-outline:hover {
    border-color: var(--ce-border-strong, #CBD5E1);
    color: var(--ce-text, #0F172A);
}

.auth-divider {
    text-align: center;
    color: var(--ce-text-muted, #64748B);
    font-size: 12px;
    margin: 18px 0;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--ce-border, #E2E8F0);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-google {
    display: flex;
    justify-content: center;
    min-height: 40px;
}

.auth-card__foot {
    margin: 22px 0 0;
    text-align: center;
    color: var(--ce-text-muted, #64748B);
    font-size: 14px;
}
.auth-card__foot a {
    color: var(--ce-primary, #7C3AED);
    font-weight: 600;
    text-decoration: none;
}
.auth-card__foot a:hover { text-decoration: underline; }

.auth-fineprint {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--ce-text-muted, #64748B);
    line-height: 1.5;
    text-align: center;
}
.auth-fineprint a { color: var(--ce-primary, #7C3AED); text-decoration: none; }
.auth-fineprint a:hover { text-decoration: underline; }

.auth-emailpill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ce-surface-alt, #F1F5F9);
    border: 1px solid var(--ce-border, #E2E8F0);
    border-radius: 9999px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--ce-text, #0F172A);
    margin-bottom: 14px;
}

/* Bootstrap alert tuning so the brand reads consistently inside the card */
.auth-card .alert {
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.4;
}
.auth-card .alert-danger { background: var(--ce-danger-soft, #FEE2E2); color: var(--ce-danger, #B91C1C); border-color: #FCA5A5; }
.auth-card .alert-success { background: var(--ce-success-soft, #DCFCE7); color: #166534; border-color: #86EFAC; }
.auth-card .alert-warning { background: var(--ce-warning-soft, #FEF3C7); color: #92400E; border-color: #FCD34D; }

/* ══════════════════════════════════════
   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: #fff3e0; color: #e67700; }
.evl-st-confirmed { background: #e6fcf5; color: #2b8a3e; }
.evl-st-done { background: #e8f4fd; color: #1971c2; }
.evl-st-cancelled { background: #ffe3e3; 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; }

.db-collections {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
}
.db-collections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
    font-size: .8rem;
    color: #495057;
}
.db-collections-header strong {
    color: #c92a2a;
}
.db-collections-list {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    max-height: 220px;
    overflow: auto;
}
.db-collection-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .65rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.db-collection-row:hover {
    background: #fff5f5;
    color: inherit;
}
.db-collection-info {
    flex: 1;
    min-width: 0;
}
.db-empty-compact {
    margin-top: 1rem;
    padding: 1rem;
}
.db-empty-compact .db-empty-icon {
    font-size: 1.25rem;
    margin-bottom: .35rem;
}

/* 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;
}

/* Guided editor */
.pt-guide-card {
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f9ff 100%);
    padding: 18px 20px;
    margin-bottom: 18px;
}
.pt-guide-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}
.pt-guide-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pt-guide-steps span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe4f0;
    color: #334155;
    font-size: .82rem;
    font-weight: 700;
}
.pt-guide-text {
    margin: 10px 0 0;
    font-size: .88rem;
    color: #475569;
}

.pt-start-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 18px;
    margin-bottom: 24px;
}
.pt-start-header {
    margin-bottom: 14px;
}
.pt-start-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.pt-start-text {
    margin: 0;
    font-size: .9rem;
    color: #64748b;
}
.pt-start-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.pt-start-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid #dbe4f0;
    background: #fff;
    transition: all .15s ease;
}
.pt-start-option:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .08);
}
.pt-start-option.active {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, .08);
}
.pt-start-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.pt-start-option-title {
    font-size: .95rem;
    font-weight: 800;
    color: #0f172a;
}
.pt-start-option-text {
    font-size: .84rem;
    color: #64748b;
    line-height: 1.55;
}
.pt-manual-card {
    margin-top: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
}
.pt-manual-title {
    font-size: .92rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.pt-manual-text {
    margin: 0;
    font-size: .84rem;
    color: #64748b;
    line-height: 1.55;
}

.pt-starters-card {
    border-top: 1px solid #eef2f7;
    margin-top: 16px;
    padding-top: 16px;
}
.pt-starters-header {
    margin-bottom: 14px;
}
.pt-starters-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.pt-starters-text {
    margin: 0;
    font-size: .86rem;
    color: #64748b;
}
.pt-starters-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.pt-starter-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    transition: all .15s ease;
}
.pt-starter-btn:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 16px rgba(124, 58, 237, .10);
    transform: translateY(-1px);
}
.pt-starter-btn.active {
    background: #f6f0ff;
    border-color: #7c3aed;
}
.pt-starter-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: .72rem;
    font-weight: 700;
}
.pt-starter-name {
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
}
.pt-starter-description {
    font-size: .8rem;
    color: #64748b;
    line-height: 1.45;
}

.pt-import-card {
    border-top: 1px solid #eef2f7;
    margin-top: 16px;
    padding-top: 16px;
}
.pt-import-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.pt-import-kicker {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff3c4;
    color: #92400e;
    font-size: .74rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.pt-import-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.pt-import-text {
    margin: 0;
    font-size: .9rem;
    color: #475569;
    line-height: 1.6;
    max-width: 760px;
}
.pt-import-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pt-import-steps span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe4f0;
    color: #334155;
    font-size: .78rem;
    font-weight: 700;
}
.pt-import-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pt-import-input {
    background: #fff;
    border: 1px solid #cbd5e1;
    min-height: 52px;
    font-size: .95rem;
}
.pt-import-help {
    font-size: .82rem;
    color: #64748b;
    line-height: 1.5;
}
.pt-import-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: .86rem;
    font-weight: 600;
}
.pt-import-result {
    margin-top: 16px;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #dbe4f0;
    background: #fff;
}
.pt-import-result.has-success {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}
.pt-import-result.has-warning {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbea 0%, #ffffff 100%);
}
.pt-import-result-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.pt-import-result-title {
    font-size: .95rem;
    font-weight: 800;
    color: #0f172a;
}
.pt-import-result-text {
    font-size: .84rem;
    color: #475569;
    margin-top: 4px;
    line-height: 1.5;
}
.pt-import-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.pt-import-meta span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe4f0;
    color: #334155;
    font-size: .76rem;
}
.pt-import-warning-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #fde68a;
}
.pt-import-section-title {
    font-size: .82rem;
    font-weight: 800;
    color: #334155;
    margin-bottom: 8px;
}
.pt-import-warning-list {
    margin: 0;
    padding-left: 18px;
    color: #92400e;
    font-size: .82rem;
    line-height: 1.6;
}
.pt-import-match-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pt-import-match {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    padding: 10px 12px;
}
.pt-import-match span {
    display: block;
    font-size: .76rem;
    color: #64748b;
    margin-bottom: 4px;
}
.pt-import-match strong {
    display: block;
    font-size: .85rem;
    color: #0f172a;
}
.pt-import-extra-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    font-size: .8rem;
    color: #64748b;
}
.pt-import-original {
    margin-top: 10px;
    padding: 14px;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .82rem;
    line-height: 1.6;
}

.pt-default-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
}
.pt-default-option strong {
    display: block;
    font-size: .86rem;
    color: #0f172a;
}
.pt-default-option small {
    display: block;
    color: #64748b;
    line-height: 1.4;
    margin-top: 2px;
}

.pt-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 18px;
    align-items: start;
}
.pt-editor-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pt-editor-helper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pt-editor-helper-top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
    gap: 12px;
}
.pt-editor-note,
.pt-editor-tip-box {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 16px 18px;
}
.pt-editor-tip-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg, #fffdf8 0%, #fff7ed 100%);
    border-color: #fed7aa;
    color: #9a3412;
}
.pt-editor-tip-box strong {
    font-size: .88rem;
}
.pt-editor-tip-box span {
    font-size: .82rem;
    line-height: 1.55;
}
.pt-editor-note-title {
    font-size: .98rem;
    font-weight: 700;
    color: #312e81;
    margin-bottom: 8px;
}
.pt-editor-note-list {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    font-size: .9rem;
    line-height: 1.65;
}
.pt-editor-note-list li + li {
    margin-top: 6px;
}

/* Variables panel */
.pt-vars-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1rem 1.1rem;
}
.pt-vars-panel-compact {
    background: #fbfdff;
}
.pt-vars-panel-details {
    margin-top: 10px;
}
.pt-vars-title {
    font-weight: 700;
    font-size: .98rem;
    color: #0f172a;
    margin-bottom: 4px;
}
.pt-vars-help {
    font-size: .88rem;
    color: #64748b;
    margin-bottom: 12px;
}
.pt-vars-details {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
}
.pt-vars-details summary {
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    color: #334155;
    list-style: none;
}
.pt-vars-details summary::-webkit-details-marker {
    display: none;
}
.pt-vars-details summary::after {
    content: "Mostrar";
    float: right;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}
.pt-vars-details[open] summary::after {
    content: "Ocultar";
}
.pt-vars-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pt-vars-group-block {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}
.pt-vars-group-block:first-child {
    border-top: 0;
    padding-top: 0;
}
.pt-vars-group-heading {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    margin-bottom: 8px;
}
.pt-vars-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pt-var-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    color: #334155;
    transition: all .15s;
}
.pt-var-btn-quick {
    min-width: 150px;
}
.pt-var-btn:hover {
    background: #f8fafc;
    border-color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124, 58, 237, .08);
}
.pt-var-label {
    font-size: .82rem;
    font-weight: 600;
}
.pt-var-token {
    font-size: .72rem;
    color: #7c3aed;
    font-family: Consolas, monospace;
}

.pt-editor-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}
.pt-editor-box-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfdff;
}
.pt-editor-box-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.pt-editor-box-subtitle {
    font-size: .88rem;
    color: #64748b;
    margin-top: 2px;
}
.pt-editor-status {
    flex-shrink: 0;
    font-size: .78rem;
    font-weight: 700;
    color: #6d28d9;
    background: #f6f0ff;
    border-radius: 999px;
    padding: 6px 10px;
}

/* Textarea */
.pt-textarea {
    flex: 1;
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    resize: vertical;
    min-height: 360px;
    outline: none;
    transition: border-color .15s;
    line-height: 1.75;
}
.pt-textarea:focus {
    box-shadow: none;
}
.pt-textarea::placeholder {
    color: #94a3b8;
}
.pt-editor-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 14px;
    border-top: 1px solid #eef2f7;
    font-size: .78rem;
    color: #64748b;
    background: #fbfdff;
}

/* Preview */
.pt-preview {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    position: sticky;
    top: 88px;
}
.pt-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, #fcfcff 0%, #f8fafc 100%);
}
.pt-preview-title {
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
}
.pt-preview-subtitle {
    font-size: .8rem;
    color: #64748b;
    margin-top: 2px;
}
.pt-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: .74rem;
    font-weight: 700;
}
.pt-preview-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    font-size: .92rem;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pt-preview-checklist {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
}
.pt-preview-checklist-title {
    font-size: .86rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.pt-preview-checklist ul {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: .84rem;
    line-height: 1.6;
}
.pt-preview-paper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}
.pt-preview-paper-header {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 12px;
    margin-bottom: 14px;
}
.pt-preview-document {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.pt-preview-document-meta {
    font-size: .78rem;
    color: #64748b;
    margin-top: 3px;
}
.pt-preview-content {
    white-space: pre-wrap;
    word-break: break-word;
}
.pt-preview-samples {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
}
.pt-preview-samples-title {
    font-size: .82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}
.pt-preview-samples-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pt-preview-sample {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}
.pt-preview-sample span {
    display: block;
    font-size: .74rem;
    color: #64748b;
    margin-bottom: 3px;
}
.pt-preview-sample strong {
    display: block;
    font-size: .84rem;
    color: #0f172a;
}

/* Responsive */
@media (max-width: 991.98px) {
    .pt-start-grid,
    .pt-starters-grid {
        grid-template-columns: 1fr;
    }
    .pt-editor-helper-top {
        grid-template-columns: 1fr;
    }
    .pt-import-header,
    .pt-import-result-top,
    .pt-import-extra-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .pt-import-match-grid {
        grid-template-columns: 1fr;
    }
    .pt-editor-layout {
        grid-template-columns: 1fr;
    }
    .pt-preview {
        min-height: 420px;
        position: static;
    }
}
@media (max-width: 767.98px) {
    .pt-editor-box-header,
    .pt-preview-header,
    .pt-editor-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .pt-preview-samples-grid {
        grid-template-columns: 1fr;
    }
    .pt-textarea {
        min-height: 300px;
    }
}

/* ========================================
   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;
}
/* BUG-P013: KPIs clickables (botones) */
button.pr-kpi-clickable {
    cursor: pointer;
    transition: transform .1s ease, border-color .1s ease;
    font-family: inherit;
    text-align: left;
}
button.pr-kpi-clickable:hover {
    border-color: #7048e8;
    transform: translateY(-1px);
}
button.pr-kpi-clickable.active {
    border-color: #7048e8;
    background: #f3f0ff;
    box-shadow: 0 0 0 1px #7048e8 inset;
}

/* 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: 16px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.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);
    grid-auto-rows: 64px;
    gap: 2px;
}
.cal-weekday {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    color: #495057;
    padding: 5px 0;
    text-transform: uppercase;
}
.cal-weekend { color: #c92a2a; }

/* Day cells */
.cal-day {
    position: relative;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all .15s;
    padding: 3px;
}
.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;
    }
}

/* ═══════ FullCalendar overrides ═══════ */
.fc-wrapper {
    padding: 0 16px 16px;
    min-height: 480px;
}
/* Hacer que los números de día y los eventos tengan el font del app */
.fc { font-family: inherit; font-size: .88rem; }

/* Color de hoy */
.fc .fc-day-today { background-color: rgba(124, 58, 237, .07) !important; }
.fc .fc-day-today .fc-daygrid-day-number { color: #7048e8; font-weight: 700; }

/* Encabezado de días de semana */
.fc .fc-col-header-cell { background: #f8f9fa; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #495057; }

/* Eventos: cursor pointer, bordes redondeados */
.fc-event { cursor: pointer; border-radius: 5px !important; font-size: .78rem; }
.fc-daygrid-event { padding: 1px 4px; }

/* Línea del indicador de hora actual */
.fc .fc-timegrid-now-indicator-line { border-color: #7048e8; border-width: 2px; }
.fc .fc-timegrid-now-indicator-arrow { border-top-color: #7048e8; border-bottom-color: #7048e8; }

/* Link "+N más" */
.fc .fc-daygrid-more-link { color: #7048e8; font-weight: 600; font-size: .75rem; }

/* Vista lista */
.fc .fc-list-event:hover td { background: #f0ebff; }
.fc .fc-list-day-cushion { background: #f8f9fa; }

/* Quitar el borde exterior del grid */
.fc .fc-scrollgrid { border-radius: 8px; overflow: hidden; }

/* ═══════ 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;
}

/* Compact event date picker */
.cx-date-field {
    position: relative;
}

.cx-mini-calendar {
    position: absolute;
    z-index: 1080;
    top: calc(100% + 8px);
    left: 0;
    width: min(320px, 92vw);
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}

.cx-mini-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.cx-mini-calendar-weekdays,
.cx-mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cx-mini-calendar-weekdays {
    margin-bottom: 6px;
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
    text-align: center;
}

.cx-date-day {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f8fafc;
    color: #111827;
    font-weight: 700;
    text-align: center;
}

button.cx-date-day:hover {
    border-color: #7c3aed;
    background: #f3efff;
}

.cx-date-day.is-today {
    border-color: #0ea5e9;
    color: #0369a1;
}

.cx-date-day.is-selected {
    background: #7c3aed;
    color: #fff;
}

.cx-date-day.is-empty {
    background: transparent;
}

.cx-date-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* ── Wizard / Asistente paso a paso ── */
.wiz-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    max-width: 720px;
    margin: 0 auto;
}
.wiz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
}
.wiz-bullet {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all .2s ease;
    border: 2px solid #dee2e6;
}
.wiz-step.active .wiz-bullet {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.18);
}
.wiz-step.done .wiz-bullet {
    background: #198754;
    color: #fff;
    border-color: #198754;
}
.wiz-label {
    font-size: .82rem;
    color: #6c757d;
    text-align: center;
    max-width: 110px;
}
.wiz-step.active .wiz-label { color: #1f2937; font-weight: 600; }
.wiz-step.done .wiz-label { color: #198754; }
.wiz-line {
    flex: 1 1 auto;
    height: 3px;
    background: #dee2e6;
    border-radius: 2px;
    min-width: 16px;
    margin-bottom: 22px;
}
.wiz-line.done { background: #198754; }

/* ── Tooltip de ayuda ── */
.help-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #6366f1;
    cursor: help;
    font-size: .9rem;
    line-height: 1;
    transition: color .15s ease;
}
.help-tooltip:hover,
.help-tooltip:focus { color: #4338ca; outline: none; }

.help-tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: .55rem .75rem;
    border-radius: .5rem;
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
    z-index: 1100;
}
.help-tooltip-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}
.help-tooltip:hover .help-tooltip-bubble,
.help-tooltip:focus .help-tooltip-bubble {
    opacity: 1;
    visibility: visible;
}
/* En móvil: anclar al lado derecho para no salir de pantalla */
@media (max-width: 576px) {
    .help-tooltip-bubble {
        left: auto;
        right: 0;
        transform: none;
        max-width: 240px;
    }
    .help-tooltip-bubble::after {
        left: auto;
        right: 6px;
        transform: none;
    }
}
