:root{--cdpos-blue:#066fd9;--cdpos-dark:#101827;--cdpos-deep:#0a1020;--cdpos-card:#141f33;--cdpos-soft:#e8eef9;--cdpos-muted:#97a4ba;--cdpos-danger:#e5484d;--cdpos-border:rgba(255,255,255,.11);--cdpos-shadow:0 22px 70px rgba(0,0,0,.24)}
.cdpos-login-page,.cdpos-wrap,.cdpos-header{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-sizing:border-box}.cdpos-login-page *,.cdpos-wrap *,.cdpos-header *{box-sizing:border-box}.cdpos-login-page{min-height:720px;background:radial-gradient(circle at top left,rgba(255,255,255,.22),transparent 34%),var(--cdpos-blue);display:flex;align-items:center;justify-content:center;padding:34px}.cdpos-login-card{width:min(460px,100%);background:rgba(0,0,0,.54);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.18);border-radius:28px;padding:38px;color:#fff;box-shadow:var(--cdpos-shadow)}.cdpos-login-card h1,.cdpos-hero h1,.cdpos-page-title h1,.cdpos-card h1,.cdpos-card h2{font-family:Montserrat,Inter,sans-serif;margin:0 0 12px;line-height:1.1}.cdpos-login-card p,.cdpos-hero p,.cdpos-page-title p,.cdpos-card p{color:var(--cdpos-muted);margin:0 0 22px}.cdpos-form,.cdpos-grid-form,.cdpos-filters{display:grid;gap:16px}.cdpos-grid-form{grid-template-columns:repeat(2,minmax(0,1fr))}.cdpos-filters{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}.cdpos-form label,.cdpos-grid-form label,.cdpos-filters label{display:grid;gap:7px;color:#dbe5f6;font-weight:700;font-size:13px}.cdpos-form input,.cdpos-form select,.cdpos-grid-form input,.cdpos-grid-form select,.cdpos-filters input{width:100%;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(255,255,255,.07);color:#fff;padding:13px 14px;outline:none}.cdpos-form input:focus,.cdpos-form select:focus,.cdpos-grid-form input:focus,.cdpos-filters input:focus{border-color:var(--cdpos-blue);box-shadow:0 0 0 4px rgba(6,111,217,.16)}.cdpos-form select{background:#111a2b}.cdpos-btn,.cdpos-logout,.cdpos-btn-mini{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;background:var(--cdpos-blue);color:#fff!important;text-decoration:none!important;font-weight:800;line-height:1;cursor:pointer;transition:.2s ease;box-shadow:0 12px 28px rgba(6,111,217,.25)}.cdpos-btn{min-height:48px;padding:0 22px}.cdpos-btn:hover,.cdpos-logout:hover,.cdpos-btn-mini:hover{transform:translateY(-1px);filter:brightness(1.05)}.cdpos-btn-full{width:100%}.cdpos-header{height:84px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,54px);box-shadow:0 8px 28px rgba(16,24,39,.08);position:relative;z-index:2}.cdpos-logo{max-height:52px;width:auto;display:block}.cdpos-logout{padding:13px 20px}.cdpos-wrap{padding:clamp(24px,4vw,56px);min-height:680px}.cdpos-dark{background:linear-gradient(135deg,var(--cdpos-deep),var(--cdpos-dark));color:#fff}.cdpos-hero,.cdpos-page-title{max-width:980px;margin:0 auto 28px;text-align:center}.cdpos-hero h1,.cdpos-page-title h1{font-size:clamp(30px,4vw,52px)}.cdpos-button-grid{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:20px}.cdpos-tile{min-height:160px;border:1px solid var(--cdpos-border);background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.035));border-radius:28px;padding:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;text-decoration:none!important;color:#fff!important;box-shadow:var(--cdpos-shadow);transition:.22s ease}.cdpos-tile:hover{transform:translateY(-4px);border-color:rgba(6,111,217,.8)}.cdpos-tile-icon{font-size:42px;margin-bottom:14px}.cdpos-card{max-width:1180px;margin:0 auto 22px;background:rgba(20,31,51,.92);border:1px solid var(--cdpos-border);border-radius:26px;padding:24px;box-shadow:var(--cdpos-shadow)}.cdpos-card-centered{max-width:620px;text-align:center}.cdpos-form-actions{grid-column:1/-1}.cdpos-notice{max-width:1180px;margin:0 auto 18px;border-radius:16px;padding:14px 16px;font-weight:700}.cdpos-notice-success{background:rgba(0,180,115,.16);color:#a8ffd9;border:1px solid rgba(0,180,115,.3)}.cdpos-notice-error{background:rgba(229,72,77,.15);color:#ffd0d2;border:1px solid rgba(229,72,77,.35)}.cdpos-table-wrap{overflow:auto;border-radius:18px;border:1px solid var(--cdpos-border)}.cdpos-table{width:100%;border-collapse:collapse;min-width:760px}.cdpos-table th,.cdpos-table td{padding:14px 15px;border-bottom:1px solid var(--cdpos-border);text-align:left}.cdpos-table th{font-family:Montserrat,Inter,sans-serif;color:#fff;background:rgba(255,255,255,.06)}.cdpos-table td{color:#d9e2f2}.cdpos-actions{white-space:nowrap}.cdpos-btn-mini{padding:10px 13px;font-size:12px;margin:2px;box-shadow:none}.cdpos-danger{background:var(--cdpos-danger)!important}.cdpos-pagination{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:20px}.cdpos-pagination a{width:38px;height:38px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none!important;background:rgba(255,255,255,.08);color:#fff!important;border:1px solid var(--cdpos-border);font-weight:800}.cdpos-pagination a.is-active{background:var(--cdpos-blue);border-color:var(--cdpos-blue)}
@media(max-width:780px){.cdpos-grid-form,.cdpos-filters{grid-template-columns:1fr}.cdpos-header{height:auto;gap:14px;padding:16px;flex-wrap:wrap}.cdpos-wrap{padding:20px}.cdpos-login-card{padding:26px}.cdpos-button-grid{grid-template-columns:1fr 1fr}.cdpos-tile{min-height:135px;padding:18px}}
@media(max-width:520px){.cdpos-button-grid{grid-template-columns:1fr}}

.cdpos-top-menu{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:8px;max-width:62vw;white-space:nowrap;overflow-x:auto;padding:8px;border-radius:999px;background:#f3f7fd}.cdpos-top-menu a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 13px;border-radius:999px;color:#22304a!important;text-decoration:none!important;font-weight:800;font-size:13px;transition:.2s ease}.cdpos-top-menu a:hover{background:#fff;color:var(--cdpos-blue)!important;box-shadow:0 8px 18px rgba(16,24,39,.08)}.cdpos-back-row{max-width:1180px;margin:0 auto 18px;display:flex;justify-content:flex-start}.cdpos-back-btn{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border:1px solid var(--cdpos-border);border-radius:999px;background:rgba(255,255,255,.08);color:#fff!important;text-decoration:none!important;font-weight:800}.cdpos-back-btn:hover{background:rgba(255,255,255,.14)}.cdpos-page-title-with-action{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;text-align:left}.cdpos-page-title-with-action>div{min-width:0}.cdpos-page-title-with-action .cdpos-btn{flex:0 0 auto;margin-bottom:4px}.cdpos-modal{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:24px}.cdpos-modal.is-open{display:flex}.cdpos-modal-backdrop{position:absolute;inset:0;background:rgba(4,10,20,.74);backdrop-filter:blur(10px)}.cdpos-modal-dialog{position:relative;width:min(860px,100%);max-height:calc(100vh - 48px);overflow:auto;background:linear-gradient(180deg,#17243b,#101827);border:1px solid rgba(255,255,255,.14);border-radius:28px;padding:28px;color:#fff;box-shadow:0 30px 90px rgba(0,0,0,.45)}.cdpos-modal-dialog h2{font-family:Montserrat,Inter,sans-serif;margin:0 54px 22px 0;line-height:1.1}.cdpos-modal-close{position:absolute;right:18px;top:16px;width:42px;height:42px;border:0;border-radius:999px;background:rgba(255,255,255,.1);color:#fff;font-size:28px;line-height:1;cursor:pointer}.cdpos-modal-close:hover{background:var(--cdpos-danger)}body.cdpos-modal-is-open{overflow:hidden}.cdpos-modal-form{margin-top:8px}.cdpos-modal .cdpos-grid-form input,.cdpos-modal .cdpos-grid-form select{background:rgba(255,255,255,.08)}.cdpos-modal .cdpos-form-actions{display:flex;justify-content:flex-end}.cdpos-modal .cdpos-btn{min-width:180px}.cdpos-actions button.cdpos-btn-mini{border:0;cursor:pointer;color:#fff!important}
@media(max-width:1120px){.cdpos-header{height:auto;min-height:84px;display:grid;grid-template-columns:1fr auto;gap:12px}.cdpos-top-menu{position:static;transform:none;grid-column:1/-1;grid-row:2;max-width:100%;width:100%;justify-content:flex-start}.cdpos-logout{justify-self:end}.cdpos-page-title-with-action{align-items:flex-start;flex-direction:column;text-align:center}.cdpos-page-title-with-action .cdpos-btn{align-self:center}}
@media(max-width:780px){.cdpos-top-menu{border-radius:18px}.cdpos-modal{padding:14px}.cdpos-modal-dialog{border-radius:22px;padding:22px}.cdpos-modal .cdpos-form-actions{justify-content:stretch}.cdpos-modal .cdpos-btn{width:100%}.cdpos-page-title-with-action{text-align:center}}

.cdpos-form textarea,.cdpos-grid-form textarea,.cdpos-budget-form textarea{width:100%;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(255,255,255,.07);color:#fff;padding:13px 14px;outline:none;resize:vertical}.cdpos-form textarea:focus,.cdpos-grid-form textarea:focus,.cdpos-budget-form textarea:focus{border-color:var(--cdpos-blue);box-shadow:0 0 0 4px rgba(6,111,217,.16)}.cdpos-budget-top{margin-bottom:24px}.cdpos-budget-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:8px 0 18px}.cdpos-budget-toolbar h2{margin:0}.cdpos-budget-items{display:grid;gap:18px}.cdpos-treatment-row{border:1px solid var(--cdpos-border);border-radius:22px;background:rgba(255,255,255,.045);padding:18px}.cdpos-treatment-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.cdpos-treatment-grid{display:grid;grid-template-columns:2fr .7fr 1fr 1fr .75fr 1fr;gap:14px;align-items:start}.cdpos-treatment-grid label{display:grid;gap:7px;color:#dbe5f6;font-weight:700;font-size:13px}.cdpos-treatment-grid input,.cdpos-treatment-grid select{width:100%;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(255,255,255,.07);color:#fff;padding:13px 14px;outline:none}.cdpos-treatment-grid select{background:#111a2b}.cdpos-treatment-detail{grid-column:1/-1}.cdpos-budget-summary{display:flex;justify-content:flex-end;gap:14px;flex-wrap:wrap;margin-top:22px}.cdpos-budget-summary>div{min-width:210px;border:1px solid var(--cdpos-border);border-radius:18px;background:rgba(255,255,255,.06);padding:15px;text-align:right}.cdpos-budget-summary span{display:block;color:var(--cdpos-muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.cdpos-budget-summary strong{display:block;margin-top:6px;font-family:Montserrat,Inter,sans-serif;font-size:24px}.cdpos-budget-actions{display:flex;justify-content:flex-end;margin-top:22px}
@media(max-width:1100px){.cdpos-treatment-grid{grid-template-columns:1fr 1fr}.cdpos-treatment-detail{grid-column:1/-1}.cdpos-budget-toolbar{align-items:flex-start;flex-direction:column}.cdpos-budget-toolbar .cdpos-btn{width:100%}}
@media(max-width:640px){.cdpos-treatment-grid{grid-template-columns:1fr}.cdpos-budget-summary>div{width:100%;text-align:left}.cdpos-budget-actions .cdpos-btn{width:100%}}

/* Importador manual de pacientes */
.cdpos-import-card{
    max-width: 1180px;
    margin: 0 auto;
}
.cdpos-warning-box{
    background: #fff7ed;
    color: #7c2d12;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 18px 0;
    font-family: Inter, sans-serif;
}
.cdpos-import-form{
    margin-top: 22px;
}
.cdpos-form-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.cdpos-check-row{
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 14px 0 0;
    font-weight: 600;
}
.cdpos-check-row input{
    width: auto !important;
    margin: 0;
}
.cdpos-import-submit{
    margin-top: 18px;
}
.cdpos-import-result{
    border-radius: 18px;
    padding: 18px;
    margin: 20px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.cdpos-import-result.is-ok{
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.cdpos-import-result.is-warning{
    border-color: #fde68a;
    background: #fffbeb;
}
.cdpos-import-result h2{
    margin: 0 0 14px;
    color: #111827;
}
.cdpos-progress{
    width: 100%;
    height: 14px;
    background: rgba(15,23,42,.12);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}
.cdpos-progress span{
    display: block;
    height: 100%;
    background: #066fd9;
    border-radius: 999px;
}
.cdpos-import-stats{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.cdpos-import-stats span{
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    border: 1px solid #e5e7eb;
    font-size: 13px;
}
.cdpos-import-log{
    max-height: 360px;
    overflow: auto;
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}
.cdpos-log-line{
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.cdpos-log-success{ color: #86efac; }
.cdpos-log-error{ color: #fca5a5; }
.cdpos-log-warning{ color: #fde68a; }
.cdpos-log-info{ color: #bfdbfe; }
@media (max-width: 800px){
    .cdpos-form-grid,
    .cdpos-import-stats{
        grid-template-columns: 1fr;
    }
}
.cdpos-import-auto-path{
    display:block;
    border:1px solid rgba(255,255,255,.14);
    border-radius:16px;
    background:rgba(255,255,255,.07);
    color:#dbe5f6;
    padding:14px;
    font-size:13px;
    line-height:1.55;
}
.cdpos-import-auto-path code{
    color:#fff;
    background:rgba(6,111,217,.25);
    border-radius:6px;
    padding:2px 5px;
}

/* Ficha Paciente */
.cdpos-ficha-page .cdpos-page-title p{
    color: #cbd5e1;
}
.cdpos-ficha-shell{
    padding: 0;
    overflow: hidden;
}
.cdpos-tabs{
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.cdpos-tab-btn{
    appearance: none;
    border: 0;
    background: transparent;
    color: #334155;
    padding: 16px 18px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.cdpos-tab-btn:hover{
    color: #066fd9;
    background: #eef6ff;
}
.cdpos-tab-btn.is-active{
    color: #066fd9;
    background: #fff;
    border-bottom-color: #066fd9;
}
.cdpos-tab-content{
    padding: 24px;
    background: #fff;
}
.cdpos-tab-content.is-loading{
    opacity: .75;
}
.cdpos-ficha-table th{
    width: 28%;
    min-width: 220px;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    vertical-align: top;
}
.cdpos-ficha-table td{
    background: #fff;
}
.cdpos-ficha-table input,
.cdpos-ficha-table select,
.cdpos-ficha-table textarea{
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 11px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cdpos-ficha-table textarea{
    resize: vertical;
    min-height: 86px;
}
.cdpos-ficha-table input:focus,
.cdpos-ficha-table select:focus,
.cdpos-ficha-table textarea:focus{
    border-color: #066fd9;
    box-shadow: 0 0 0 3px rgba(6,111,217,.12);
}
.cdpos-form-actions{
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
}
.cdpos-empty-box{
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #f8fafc;
    color: #334155;
    padding: 34px;
    text-align: center;
}
.cdpos-empty-box h2{
    margin: 0 0 8px;
    color: #0f172a;
    font-family: 'Montserrat', sans-serif;
}
.cdpos-empty-box p{
    margin: 0;
}
@media (max-width: 760px){
    .cdpos-tab-content{
        padding: 16px;
    }
    .cdpos-ficha-table th,
    .cdpos-ficha-table td{
        display: block;
        width: 100%;
        min-width: 0;
    }
    .cdpos-ficha-table th{
        border-bottom: 0;
        padding-bottom: 4px;
    }
}

/* POS Dental 3.6.1 - Ajustes visuales Ficha Paciente */
.cdpos-tabs{
    gap: 10px;
    padding: 12px 18px 0;
}
.cdpos-tab-btn{
    padding: 18px 24px;
    border-radius: 14px 14px 0 0;
    letter-spacing: .01em;
}
.cdpos-ficha-table th,
.cdpos-ficha-table td{
    vertical-align: top;
}
.cdpos-ficha-table tbody tr:nth-child(odd) th,
.cdpos-ficha-table tbody tr:nth-child(odd) td{
    background: #ffffff;
}
.cdpos-ficha-table tbody tr:nth-child(even) th,
.cdpos-ficha-table tbody tr:nth-child(even) td{
    background: #f4f8fd;
}
.cdpos-ficha-table th{
    padding-top: 18px;
}
.cdpos-ficha-table td{
    padding-top: 12px;
    padding-bottom: 12px;
    color: #0f172a;
}
.cdpos-table td.cdpos-table-action,
.cdpos-table th.cdpos-table-action{
    text-align: center;
    vertical-align: middle;
}
.cdpos-table td.cdpos-table-action .cdpos-btn-mini{
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 760px){
    .cdpos-tabs{
        gap: 8px;
        padding: 10px 12px 0;
    }
    .cdpos-tab-btn{
        padding: 15px 18px;
    }
}

/* POS Dental 3.6.2 - Correcciones Ficha Paciente */
.cdpos-ficha-table tbody tr.cdpos-row-important th,
.cdpos-ficha-table tbody tr.cdpos-row-important td{
    background: #fff1f2 !important;
    border-bottom-color: #fecdd3;
}
.cdpos-ficha-table tbody tr.cdpos-row-important th{
    color: #9f1239;
}
.cdpos-date-input{
    min-height: 44px;
}


/* POS Dental 3.6.3 - Filas críticas más visibles */
.cdpos-ficha-table tbody tr.cdpos-row-important th{
    background: #7f1d1d !important;
    color: #ffffff !important;
    border-bottom-color: #991b1b !important;
}
.cdpos-ficha-table tbody tr.cdpos-row-important td{
    background: #ffffff !important;
    color: #0f172a !important;
    border-bottom-color: #fecaca !important;
}

/* POS Dental 3.7.1 - Pestaña Archivos Ficha Paciente */
.cdpos-notice-warning{
    background:#fff7ed;
    border-color:#fdba74;
    color:#9a3412;
}
.cdpos-files-tab{
    display:flex;
    flex-direction:column;
    gap:28px;
}
.cdpos-files-section{
    background:#ffffff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:18px;
    padding:24px;
    box-shadow:0 16px 42px rgba(15,23,42,.06);
}
.cdpos-section-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:18px;
    padding:18px 20px;
    border-radius:16px;
    background:linear-gradient(135deg,#066fd9 0%,#0f172a 100%);
    box-shadow:0 14px 34px rgba(2,111,217,.16);
}
.cdpos-section-head h2{
    margin:0 0 7px;
    font-family:'Montserrat',sans-serif;
    font-size:22px;
    color:#ffffff;
    letter-spacing:-.02em;
}
.cdpos-section-head p{
    margin:0;
    color:rgba(255,255,255,.82);
    font-weight:500;
}
.cdpos-files-date-card{
    border:1px solid #e2e8f0;
    border-radius:16px;
    overflow:hidden;
    margin-bottom:18px;
    background:#f8fafc;
}
.cdpos-files-date-title{
    display:flex;
    align-items:center;
    gap:10px;
    padding:13px 16px;
    background:#0f172a;
    color:#fff;
}
.cdpos-files-date-title span{
    opacity:.75;
    font-size:13px;
}
.cdpos-files-date-title strong{
    font-weight:700;
}
.cdpos-files-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    padding:18px;
}
.cdpos-file-card{
    display:flex;
    flex-direction:column;
    gap:12px;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:14px;
    padding:13px;
    min-width:0;
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cdpos-file-card:hover{
    transform:translateY(-2px);
    border-color:#bfdbfe;
    box-shadow:0 10px 25px rgba(2,111,217,.12);
}
.cdpos-file-preview{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    height:132px;
    background:#f1f5f9;
    border-radius:12px;
    overflow:hidden;
    text-decoration:none;
}
.cdpos-file-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.cdpos-file-icon-preview svg{
    width:82px;
    height:82px;
}
.cdpos-file-meta{
    min-width:0;
}
.cdpos-file-meta strong{
    display:block;
    color:#0f172a;
    font-size:14px;
    line-height:1.25;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    margin-bottom:4px;
}
.cdpos-file-meta span{
    display:block;
    color:#64748b;
    font-size:12px;
    margin-bottom:10px;
}
.cdpos-file-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}
.cdpos-file-actions a,
.cdpos-file-actions button{
    border:0;
    padding:8px 10px;
    border-radius:10px;
    font-size:12px;
    font-weight:700;
    text-decoration:none;
    cursor:pointer;
}
.cdpos-file-actions a{
    background:#e0f2fe;
    color:#075985;
}
.cdpos-file-actions button{
    background:#7f1d1d;
    color:#fff;
}
.cdpos-file-delete-form{
    margin:0;
}
.cdpos-upload-form{
    margin-top:22px;
    padding:18px;
    border:1px dashed #93c5fd;
    border-radius:16px;
    background:#eff6ff;
}
.cdpos-upload-grid{
    display:grid;
    grid-template-columns:minmax(180px,260px) 1fr;
    gap:16px;
    align-items:start;
}
.cdpos-upload-grid label{
    display:flex;
    flex-direction:column;
    gap:8px;
    color:#0f172a;
    font-weight:700;
}
.cdpos-upload-grid input[type="date"],
.cdpos-upload-grid input[type="file"]{
    width:100%;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:11px 12px;
    background-color:#fff;
}
.cdpos-upload-grid input[type="date"]{
    color-scheme:light;
    appearance:auto;
    -webkit-appearance:auto;
    padding-right:14px;
}
.cdpos-upload-grid input[type="date"]::-webkit-calendar-picker-indicator{
    display:block;
    opacity:1;
    cursor:pointer;
}
.cdpos-upload-grid small{
    color:#475569;
    font-weight:500;
}
.cdpos-files-empty{
    margin-bottom:18px;
}
.cdpos-file-modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:999999;
    padding:28px;
    background:rgba(2,6,23,.78);
}
.cdpos-file-modal.is-open{
    display:block;
}
.cdpos-file-modal-dialog{
    position:relative;
    width:min(1120px,100%);
    height:90vh;
    margin:0 auto;
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 24px 80px rgba(0,0,0,.35);
}
.cdpos-file-modal-close{
    position:absolute;
    top:12px;
    right:12px;
    z-index:5;
    width:38px;
    height:38px;
    border:0;
    border-radius:999px;
    background:#0f172a;
    color:#fff;
    font-size:24px;
    line-height:1;
    cursor:pointer;
}
.cdpos-file-modal-body,
.cdpos-file-modal-body iframe,
.cdpos-file-modal-body img{
    width:100%;
    height:100%;
}
.cdpos-file-modal-body iframe{
    border:0;
}
.cdpos-file-modal-body img{
    object-fit:contain;
    background:#fff;
    display:block;
}
@media (max-width:1024px){
    .cdpos-files-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:768px){
    .cdpos-files-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .cdpos-upload-grid{grid-template-columns:1fr;}
}
@media (max-width:520px){
    .cdpos-files-grid{grid-template-columns:1fr;}
    .cdpos-files-section{padding:18px;}
}

/* POS Dental 3.7.2 - Nuevo Presupuesto: paciente buscable y selector dental */
.cdpos-hidden-select{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    opacity:0!important;
    pointer-events:none!important;
}
.cdpos-patient-combobox-label{
    position:relative;
}
.cdpos-patient-search,
.cdpos-treatment-grid select,
.cdpos-treatment-grid input,
.cdpos-treatment-grid textarea{
    background:#fff!important;
    color:#0f172a!important;
}
.cdpos-treatment-grid select option{
    background:#fff!important;
    color:#0f172a!important;
}
.cdpos-patient-results{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + 6px);
    z-index:30;
    max-height:280px;
    overflow:auto;
    background:#fff;
    color:#0f172a;
    border:1px solid #cbd5e1;
    border-radius:16px;
    box-shadow:0 22px 60px rgba(2,8,23,.24);
    padding:8px;
}
.cdpos-patient-results.is-open{
    display:grid;
    gap:6px;
}
.cdpos-patient-result,
.cdpos-patient-result-empty{
    width:100%;
    border:0;
    border-radius:12px;
    background:#f8fafc;
    color:#0f172a;
    text-align:left;
    padding:11px 12px;
    font-weight:700;
    cursor:pointer;
}
.cdpos-patient-result:hover,
.cdpos-patient-result.is-selected{
    background:#066fd9;
    color:#fff;
}
.cdpos-patient-result-empty{
    cursor:default;
    color:#64748b;
}
.cdpos-treatment-grid{
    grid-template-columns:2fr .65fr .95fr .95fr 1.1fr;
}
.cdpos-treatment-detail{
    grid-column:1/-1;
}
.cdpos-treatment-detail textarea{
    min-height:74px;
}
.cdpos-tooth-field{
    width:100%;
    min-height:47px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:14px;
    background:#fff;
    color:#0f172a;
    padding:12px 14px;
    text-align:left;
    font-weight:800;
    cursor:pointer;
}
.cdpos-tooth-field:hover,
.cdpos-tooth-field:focus{
    border-color:#066fd9;
    box-shadow:0 0 0 4px rgba(6,111,217,.16);
    outline:none;
}
.cdpos-tooth-dialog{
    width:min(980px,100%);
}
.cdpos-tooth-intro{
    color:#cbd5e1!important;
    margin-bottom:18px!important;
}
.cdpos-tooth-specials{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:22px;
}
.cdpos-tooth-special{
    border:1px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.08);
    color:#fff;
    border-radius:999px;
    padding:10px 14px;
    font-weight:800;
    cursor:pointer;
}
.cdpos-tooth-special:hover,
.cdpos-tooth-special.is-selected{
    background:#066fd9;
    border-color:#066fd9;
    color:#fff;
}
.cdpos-mouth-map{
    position:relative;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    background:radial-gradient(circle at center, rgba(255,255,255,.12), rgba(255,255,255,.04));
    border:1px solid rgba(255,255,255,.12);
    border-radius:28px;
    padding:22px;
}
.cdpos-mouth-map:before,
.cdpos-mouth-map:after{
    content:"";
    position:absolute;
    background:rgba(255,255,255,.18);
    pointer-events:none;
}
.cdpos-mouth-map:before{
    left:50%;
    top:18px;
    bottom:18px;
    width:1px;
}
.cdpos-mouth-map:after{
    left:18px;
    right:18px;
    top:50%;
    height:1px;
}
.cdpos-mouth-quadrant{
    position:relative;
    z-index:1;
    border-radius:22px;
    background:rgba(15,23,42,.54);
    padding:14px;
}
.cdpos-mouth-quadrant>span{
    display:block;
    margin-bottom:10px;
    color:#e2e8f0;
    font-family:Montserrat,Inter,sans-serif;
    font-weight:800;
    font-size:13px;
    letter-spacing:.02em;
}
.cdpos-teeth-line{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.cdpos-tooth{
    width:48px;
    min-height:64px;
    border:1px solid rgba(255,255,255,.18);
    background:#fff;
    color:#0f172a;
    border-radius:16px;
    display:grid;
    justify-items:center;
    align-content:center;
    gap:5px;
    cursor:pointer;
    font-weight:900;
    transition:.16s ease;
}
.cdpos-tooth:hover,
.cdpos-tooth.is-selected{
    background:#066fd9;
    border-color:#066fd9;
    color:#fff;
    transform:translateY(-1px);
}
.cdpos-tooth-shape{
    width:22px;
    height:28px;
    display:block;
    border-radius:48% 48% 55% 55%;
    background:linear-gradient(180deg,#fff,#dbeafe);
    border:2px solid #cbd5e1;
    box-shadow:inset 0 -4px 8px rgba(15,23,42,.12);
}
.cdpos-tooth.is-selected .cdpos-tooth-shape{
    background:linear-gradient(180deg,#dbeafe,#93c5fd);
    border-color:#fff;
}
.cdpos-tooth-selected-preview{
    margin-top:18px;
    padding:14px 16px;
    border-radius:16px;
    background:rgba(255,255,255,.08);
    color:#fff;
}
.cdpos-tooth-selected-preview span{
    color:#bfdbfe;
    font-weight:800;
}
.cdpos-tooth-actions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    flex-wrap:wrap;
    margin-top:18px;
}
.cdpos-btn-muted{
    background:#334155!important;
    box-shadow:none!important;
}
@media(max-width:900px){
    .cdpos-mouth-map{grid-template-columns:1fr;}
    .cdpos-mouth-map:before,.cdpos-mouth-map:after{display:none;}
}
@media(max-width:1100px){
    .cdpos-treatment-grid{grid-template-columns:1fr 1fr;}
}
@media(max-width:640px){
    .cdpos-treatment-grid{grid-template-columns:1fr;}
    .cdpos-tooth{width:44px;}
}

/* POS Dental 3.7.4 - Ajustes nuevo presupuesto */
.cdpos-budget-toolbar-simple{
    justify-content:flex-start;
    margin-bottom:18px;
}
.cdpos-add-treatment-bottom{
    display:flex;
    justify-content:flex-end;
    margin:18px 0 4px;
}
.cdpos-tooth-dialog{
    width:min(1120px,100%);
}
.cdpos-mouth-real{
    position:relative;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.14);
    border-radius:30px;
    padding:30px 28px;
    background:
        radial-gradient(circle at center, rgba(255,255,255,.12), rgba(255,255,255,.04) 48%, rgba(255,255,255,.02)),
        linear-gradient(180deg, rgba(15,23,42,.7), rgba(15,23,42,.42));
}
.cdpos-mouth-axis{
    position:absolute;
    background:rgba(255,255,255,.2);
    pointer-events:none;
    z-index:0;
}
.cdpos-mouth-axis-v{
    width:2px;
    top:22px;
    bottom:22px;
    left:50%;
    transform:translateX(-50%);
}
.cdpos-mouth-axis-h{
    height:2px;
    left:24px;
    right:24px;
    top:50%;
    transform:translateY(-50%);
}
.cdpos-mouth-half{
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}
.cdpos-mouth-upper{
    padding-bottom:56px;
}
.cdpos-mouth-lower{
    padding-top:56px;
}
.cdpos-mouth-quadrant-real{
    min-width:0;
    padding:10px;
}
.cdpos-mouth-quadrant-real>span{
    display:block;
    color:#dbeafe;
    font-family:Montserrat,Inter,sans-serif;
    font-size:12px;
    line-height:1.25;
    font-weight:900;
    letter-spacing:.02em;
    text-align:center;
    margin-bottom:12px;
}
.cdpos-teeth-arch{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:120px;
}
.cdpos-mouth-upper .cdpos-tooth-real{
    transform:translateY(var(--curve));
}
.cdpos-mouth-lower .cdpos-tooth-real{
    transform:translateY(var(--curve));
}
.cdpos-mouth-upper .cdpos-tooth-real:hover,
.cdpos-mouth-upper .cdpos-tooth-real.is-selected,
.cdpos-mouth-lower .cdpos-tooth-real:hover,
.cdpos-mouth-lower .cdpos-tooth-real.is-selected{
    transform:translateY(calc(var(--curve) - 2px));
}
.cdpos-tooth-real{
    width:48px;
    min-height:74px;
    border-radius:18px;
    gap:5px;
}
.cdpos-tooth-real strong{
    font-size:13px;
    line-height:1;
}
.cdpos-tooth-real .cdpos-tooth-shape{
    width:25px;
    height:32px;
}
.cdpos-q1 .cdpos-teeth-arch,
.cdpos-q4 .cdpos-teeth-arch{
    justify-content:flex-end;
}
.cdpos-q2 .cdpos-teeth-arch,
.cdpos-q3 .cdpos-teeth-arch{
    justify-content:flex-start;
}
@media(max-width:900px){
    .cdpos-mouth-half{grid-template-columns:1fr;gap:10px;}
    .cdpos-mouth-upper{padding-bottom:32px;}
    .cdpos-mouth-lower{padding-top:32px;}
    .cdpos-mouth-axis-v{display:none;}
    .cdpos-teeth-arch{justify-content:center!important;flex-wrap:wrap;min-height:auto;}
    .cdpos-tooth-real,.cdpos-tooth-real:hover,.cdpos-tooth-real.is-selected{transform:none!important;}
}
@media(max-width:640px){
    .cdpos-tooth-real{width:42px;min-height:68px;}
    .cdpos-add-treatment-bottom .cdpos-btn{width:100%;}
}

/* POS Dental 3.7.4 - Odontograma realista y ajustes visuales */
.cdpos-tooth-dialog{
    width:min(1040px,100%);
}
.cdpos-mouth-odontogram{
    position:relative;
    height:640px;
    min-height:640px;
    padding:0;
    overflow:hidden;
    border-radius:30px;
    background:
        radial-gradient(ellipse at 50% 25%, rgba(255,255,255,.16), transparent 35%),
        radial-gradient(ellipse at 50% 75%, rgba(255,255,255,.12), transparent 35%),
        linear-gradient(180deg, rgba(15,23,42,.9), rgba(15,23,42,.68));
}
.cdpos-mouth-odontogram .cdpos-mouth-axis-v{
    left:50%;
    top:38px;
    bottom:38px;
    width:2px;
    background:rgba(226,232,240,.38);
    background-image:linear-gradient(to bottom, rgba(226,232,240,.95) 52%, transparent 0);
    background-size:2px 18px;
}
.cdpos-mouth-odontogram .cdpos-mouth-axis-h{
    top:50%;
    left:46px;
    right:46px;
    height:2px;
    background:rgba(226,232,240,.38);
    background-image:linear-gradient(to right, rgba(226,232,240,.95) 52%, transparent 0);
    background-size:18px 2px;
}
.cdpos-mouth-palate{
    position:absolute;
    left:50%;
    width:270px;
    height:170px;
    transform:translateX(-50%);
    border:2px solid rgba(148,163,184,.16);
    pointer-events:none;
}
.cdpos-mouth-palate-upper{
    top:116px;
    border-radius:0 0 170px 170px;
    border-top:0;
    background:radial-gradient(ellipse at 50% 0%, rgba(239,68,68,.07), transparent 72%);
}
.cdpos-mouth-palate-lower{
    bottom:116px;
    border-radius:170px 170px 0 0;
    border-bottom:0;
    background:radial-gradient(ellipse at 50% 100%, rgba(239,68,68,.05), transparent 72%);
}
.cdpos-mouth-quadrant-label{
    position:absolute;
    z-index:3;
    color:#dbeafe;
    font-size:12px;
    line-height:1.25;
    font-weight:900;
    text-align:center;
    pointer-events:none;
    opacity:.92;
}
.cdpos-q1-label{left:20%;top:52px;}
.cdpos-q2-label{right:20%;top:52px;}
.cdpos-q4-label{left:20%;bottom:52px;}
.cdpos-q3-label{right:20%;bottom:52px;}
.cdpos-mouth-odontogram .cdpos-tooth-real{
    position:absolute;
    left:var(--x);
    top:var(--y);
    z-index:5;
    width:48px;
    min-height:66px;
    padding:5px 3px;
    border-radius:20px;
    transform:translate(-50%, -50%) rotate(var(--rot));
    box-shadow:0 8px 20px rgba(2,6,23,.22);
}
.cdpos-mouth-odontogram .cdpos-tooth-real:hover,
.cdpos-mouth-odontogram .cdpos-tooth-real.is-selected{
    transform:translate(-50%, -53%) rotate(var(--rot));
}
.cdpos-mouth-odontogram .cdpos-tooth-number{
    font-size:12px;
    line-height:1;
    font-weight:900;
}
.cdpos-mouth-odontogram .cdpos-tooth-shape{
    width:27px;
    height:34px;
    border-radius:48% 48% 56% 56%;
}
.cdpos-mouth-odontogram .cdpos-tooth-11 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-21 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-31 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-41 .cdpos-tooth-shape{
    width:30px;
    height:38px;
    border-radius:45% 45% 58% 58%;
}
.cdpos-mouth-odontogram .cdpos-tooth-18 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-17 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-16 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-26 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-27 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-28 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-38 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-37 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-36 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-46 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-47 .cdpos-tooth-shape,
.cdpos-mouth-odontogram .cdpos-tooth-48 .cdpos-tooth-shape{
    width:31px;
    height:31px;
    border-radius:42%;
}
@media(max-width:900px){
    .cdpos-mouth-odontogram{height:560px;min-height:560px;}
    .cdpos-mouth-odontogram .cdpos-tooth-real{width:40px;min-height:58px;}
    .cdpos-mouth-odontogram .cdpos-tooth-shape{width:22px;height:28px;}
    .cdpos-mouth-quadrant-label{font-size:10px;}
}
@media(max-width:640px){
    .cdpos-mouth-odontogram{height:480px;min-height:480px;}
    .cdpos-mouth-odontogram .cdpos-tooth-real{width:34px;min-height:50px;border-radius:14px;}
    .cdpos-mouth-odontogram .cdpos-tooth-number{font-size:10px;}
    .cdpos-mouth-odontogram .cdpos-tooth-shape{width:18px;height:23px;border-width:1px;}
    .cdpos-mouth-palate{width:170px;height:110px;}
}

/* POS Dental 3.7.6.2 - Odontograma por bloques flex */
.cdpos-mouth-flex.bocacompleta{
    position:relative;
    height:640px;
    min-height:640px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.16);
    border-radius:30px;
    background:
        radial-gradient(ellipse at 50% 27%, rgba(239,68,68,.13), transparent 33%),
        radial-gradient(ellipse at 50% 73%, rgba(239,68,68,.10), transparent 33%),
        linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.7));
    padding:36px;
}
.cdpos-mouth-flex .cdpos-mouth-axis{position:absolute;pointer-events:none;z-index:1;}
.cdpos-mouth-flex .cdpos-mouth-axis-v{
    left:50%;top:34px;bottom:34px;width:2px;transform:translateX(-50%);
    background-image:linear-gradient(to bottom, rgba(226,232,240,.9) 52%, transparent 0);
    background-size:2px 18px;
}
.cdpos-mouth-flex .cdpos-mouth-axis-h{
    top:50%;left:38px;right:38px;height:2px;transform:translateY(-50%);
    background-image:linear-gradient(to right, rgba(226,232,240,.9) 52%, transparent 0);
    background-size:18px 2px;
}
.cdpos-mouth-row{position:relative;z-index:2;display:flex;width:100%;height:50%;}
.cdpos-mouth-quadrant{position:relative;width:50%;height:100%;}
.cdpos-mouth-quadrant>span{
    position:absolute;left:50%;transform:translateX(-50%);z-index:3;color:#dbeafe;font-weight:900;
    font-size:12px;line-height:1.25;text-align:center;white-space:nowrap;opacity:.95;
}
.maxilarsuperior .cdpos-mouth-quadrant>span{top:6px;}
.maxilarinferior .cdpos-mouth-quadrant>span{bottom:6px;}
.cdpos-mouth-palate-area{position:absolute;left:50%;width:250px;height:145px;transform:translateX(-50%);border:2px solid rgba(148,163,184,.18);pointer-events:none;z-index:1;}
.cdpos-palate-upper{top:112px;border-top:0;border-radius:0 0 150px 150px;}
.cdpos-palate-lower{bottom:112px;border-bottom:0;border-radius:150px 150px 0 0;}
.cdpos-tooth-pos{position:absolute;z-index:5;}
.cdpos-tooth-pos .cdpos-tooth-real{width:50px;min-height:66px;padding:5px 3px;border-radius:20px;transform:none!important;box-shadow:0 8px 20px rgba(2,6,23,.24);}
.cdpos-tooth-pos .cdpos-tooth-real:hover,
.cdpos-tooth-pos .cdpos-tooth-real.is-selected{transform:translateY(-2px)!important;}
.cdpos-tooth-pos .cdpos-tooth-number{font-size:12px;line-height:1;font-weight:900;}
.cdpos-tooth-pos .cdpos-tooth-shape{width:27px;height:34px;border-radius:48% 48% 56% 56%;}
.cdpos-tooth-pos .cdpos-tooth-11 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-21 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-31 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-41 .cdpos-tooth-shape{width:31px;height:39px;border-radius:45% 45% 58% 58%;}
.cdpos-tooth-pos .cdpos-tooth-18 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-17 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-16 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-26 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-27 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-28 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-38 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-37 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-36 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-46 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-47 .cdpos-tooth-shape,
.cdpos-tooth-pos .cdpos-tooth-48 .cdpos-tooth-shape{width:32px;height:32px;border-radius:42%;}
@media(max-width:900px){
    .cdpos-mouth-flex.bocacompleta{height:560px;min-height:560px;padding:22px;}
    .cdpos-tooth-pos .cdpos-tooth-real{width:40px;min-height:58px;}
    .cdpos-tooth-pos .cdpos-tooth-shape{width:22px;height:28px;}
    .cdpos-mouth-quadrant>span{font-size:10px;}
}
@media(max-width:640px){
    .cdpos-mouth-flex.bocacompleta{height:480px;min-height:480px;padding:14px;}
    .cdpos-tooth-pos .cdpos-tooth-real{width:34px;min-height:50px;border-radius:14px;}
    .cdpos-tooth-pos .cdpos-tooth-number{font-size:10px;}
    .cdpos-tooth-pos .cdpos-tooth-shape{width:18px;height:23px;border-width:1px;}
}

/* POS Dental 3.8 - Presupuesto embebido en ficha paciente */
.cdpos-embedded-budget .cdpos-card{
    margin-top: 18px;
}
.cdpos-embedded-intro{
    margin-bottom: 18px;
}
.cdpos-budget-card-locked .cdpos-patient-locked{
    background: #eef4ff;
    color: #0f172a;
    font-weight: 800;
    cursor: not-allowed;
}

/* POS Dental 3.9.1 - Pestaña Presupuestos */
.cdpos-presupuestos-panel{width:100%;}
.cdpos-subtabs{display:flex;gap:12px;width:100%;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.12);border-radius:22px;padding:12px;margin-bottom:20px;}
.cdpos-subtab{flex:1;border:0;border-radius:16px;padding:14px 16px;background:#e5e7eb;color:#334155;font-weight:900;font-family:Montserrat,Inter,sans-serif;cursor:pointer;transition:.18s ease;box-shadow:inset 0 -1px 0 rgba(15,23,42,.08);}
.cdpos-subtab:hover{background:#cbd5e1;color:#0f172a;box-shadow:0 10px 20px rgba(15,23,42,.12);}
.cdpos-subtab.is-active{background:#066fd9;color:#fff;box-shadow:0 14px 26px rgba(6,111,217,.22);}
.cdpos-subtab-content{display:none;}
.cdpos-subtab-content.is-active{display:block;}
.cdpos-budget-inline-message{display:none;margin:0 0 16px;padding:13px 16px;border-radius:14px;font-weight:800;}
.cdpos-inline-success{background:#dcfce7;color:#14532d;border:1px solid #86efac;}
.cdpos-inline-error{background:#fee2e2;color:#7f1d1d;border:1px solid #fecaca;}
.cdpos-kanban{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch;}
.cdpos-kanban-col,.cdpos-closed-col{border-radius:24px;padding:14px;min-height:520px;border:1px solid rgba(255,255,255,.14);transition:.18s ease;display:flex;flex-direction:column;}
.cdpos-kanban-col>header,.cdpos-closed-col>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
.cdpos-kanban-col h3,.cdpos-closed-col h3{margin:0;font-family:Montserrat,Inter,sans-serif;font-size:17px;color:#0f172a;}
.cdpos-kanban-col header span,.cdpos-closed-col header span{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 9px;border-radius:999px;background:rgba(255,255,255,.78);color:#0f172a;font-weight:900;}
.cdpos-kanban-pendiente{background:#dbeafe;}
.cdpos-kanban-realizado{background:#dcfce7;}
.cdpos-kanban-pagado{background:#fee2e2;}
.cdpos-kanban-col.is-drag-over{outline:3px dashed #066fd9;outline-offset:3px;transform:translateY(-2px);}
.cdpos-kanban-dropzone{display:grid;gap:12px;min-height:420px;align-content:start;flex:1;}
.cdpos-kanban-empty{border:1px dashed rgba(15,23,42,.28);border-radius:18px;padding:18px;text-align:center;color:#334155;background:rgba(255,255,255,.46);font-weight:700;}
.cdpos-treatment-card{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.12);border-radius:20px;padding:12px;box-shadow:0 12px 25px rgba(15,23,42,.12);cursor:grab;transition:opacity .18s ease, transform .18s ease, box-shadow .18s ease;}
.cdpos-treatment-card.is-dragging{opacity:.55;transform:scale(.985);}
.cdpos-treatment-card.is-updating{opacity:.68;pointer-events:none;}
.cdpos-treatment-card-main{display:flex;gap:12px;align-items:flex-start;}
.cdpos-treatment-thumb{width:58px;height:58px;flex:0 0 58px;border-radius:16px;background:#eff6ff;border:1px solid #dbeafe;display:flex;align-items:center;justify-content:center;overflow:hidden;font-size:28px;}
.cdpos-treatment-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.cdpos-treatment-info{min-width:0;flex:1;}
.cdpos-treatment-info strong{display:block;font-family:Montserrat,Inter,sans-serif;font-size:15px;line-height:1.25;color:#0f172a;}
.cdpos-treatment-info small{display:block;color:#64748b;font-size:12px;font-weight:700;margin-top:3px;}
.cdpos-treatment-info p{margin:7px 0 0;font-size:12px;line-height:1.45;color:#334155;}
.cdpos-treatment-money{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.cdpos-treatment-money span,.cdpos-treatment-money strong{display:inline-flex;border-radius:999px;padding:6px 9px;font-size:12px;line-height:1;background:#f1f5f9;color:#334155;}
.cdpos-treatment-money strong{background:#eaf3ff;color:#0758ad;}
.cdpos-treatment-date{background:#f8fafc;border-radius:12px;padding:8px 10px;}
.cdpos-treatment-card footer{display:flex;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #e5e7eb;}
.cdpos-mini-btn{border:0;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:900;cursor:pointer;color:#fff;}
.cdpos-mini-btn.cdpos-complete{background:#16a34a;}
.cdpos-mini-btn.cdpos-reject{background:#b91c1c;}
.cdpos-closed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.cdpos-closed-col{gap:12px;align-content:start;}
.cdpos-closed-completado{background:#dcfce7;}
.cdpos-closed-rechazado{background:#7f1d1d;}
.cdpos-closed-rechazado header h3{color:#fff;}
.cdpos-closed-rechazado .cdpos-kanban-empty{color:#fff;background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25);}
.cdpos-budget-history{display:grid;gap:16px;}
.cdpos-history-budget-card{background:#f6f6f6;border:1px solid #dbe4ef;border-radius:22px;overflow:hidden;box-shadow:0 16px 34px rgba(15,23,42,.12);}
.cdpos-history-budget-card>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;background:#eaf3ff;border-bottom:1px solid #cbd5e1;}
.cdpos-history-budget-card h3{margin:0;font-family:Montserrat,Inter,sans-serif;color:#0f172a;}
.cdpos-history-budget-card p{margin:5px 0 0;color:#475569;font-size:13px;}
.cdpos-history-budget-totals{text-align:right;display:grid;gap:4px;}
.cdpos-history-budget-totals span{color:#334155;font-weight:800;font-size:13px;}
.cdpos-history-budget-totals strong{color:#0758ad;font-size:18px;font-family:Montserrat,Inter,sans-serif;}
.cdpos-history-items{display:grid;background:#f6f6f6;}
.cdpos-history-item{display:grid;grid-template-columns:1fr 190px;gap:12px;padding:15px 18px;border-bottom:1px solid #dde5ef;background:#fff;}
.cdpos-history-item:last-child{border-bottom:0;}
.cdpos-history-item:nth-child(even){background:#f8fafc;}
.cdpos-history-item strong{color:#0f172a;}
.cdpos-history-item p{margin:5px 0 0;color:#475569;font-size:13px;line-height:1.45;}
.cdpos-history-item>div:last-child{text-align:right;color:#0f172a;font-weight:800;}
.cdpos-history-item>div:last-child span{display:block;color:#64748b;font-size:13px;margin-bottom:4px;font-weight:700;}
.cdpos-history-grand-total{display:flex;justify-content:flex-end;gap:18px;flex-wrap:wrap;background:#066fd9;color:#fff;border-radius:20px;padding:18px;font-weight:900;}
.cdpos-history-grand-total strong{font-family:Montserrat,Inter,sans-serif;font-size:18px;}
@media(max-width:980px){.cdpos-kanban,.cdpos-closed-grid{grid-template-columns:1fr}.cdpos-history-budget-card>header,.cdpos-history-item{grid-template-columns:1fr;display:grid}.cdpos-history-budget-totals,.cdpos-history-item>div:last-child{text-align:left}.cdpos-subtabs{flex-direction:column}}


/* POS Dental 3.10.0 - Pestaña Historial Tratamientos */
.cdpos-history-tab{display:grid;gap:24px;width:100%;}
.cdpos-history-section{background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.11);border-radius:24px;padding:20px;box-shadow:0 18px 45px rgba(0,0,0,.15);}
.cdpos-history-form{display:grid;gap:16px;margin-top:16px;}
.cdpos-history-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start;}
.cdpos-history-grid label,.cdpos-history-detail-label{display:grid;gap:8px;color:#e5e7eb;font-weight:800;}
.cdpos-history-grid label span,.cdpos-history-detail-label span{font-family:Montserrat,Inter,sans-serif;font-size:13px;letter-spacing:.01em;}
.cdpos-history-grid input,.cdpos-history-grid select,.cdpos-history-grid textarea,.cdpos-history-detail-label textarea{width:100%;border:1px solid #cbd5e1;border-radius:14px;padding:11px 12px;background:#fff;color:#0f172a;font-family:Inter,Arial,sans-serif;}
.cdpos-history-detail-label textarea{min-height:105px;resize:vertical;line-height:1.45;}
.cdpos-history-file-field{grid-column:span 2;}
.cdpos-history-file-field small{display:block;color:#cbd5e1;font-weight:600;line-height:1.45;}
.cdpos-history-card{background:#f8fafc;color:#0f172a;border:1px solid #dbe4ef;border-radius:24px;overflow:hidden;box-shadow:0 14px 32px rgba(15,23,42,.14);margin-bottom:16px;}
.cdpos-history-card:last-child{margin-bottom:0;}
.cdpos-history-card-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;background:#eaf3ff;border-bottom:1px solid #cbd5e1;padding:16px 18px;}
.cdpos-history-card-head strong{display:block;font-family:Montserrat,Inter,sans-serif;font-size:17px;color:#0f172a;}
.cdpos-history-card-head span{display:block;margin-top:4px;color:#475569;font-weight:800;font-size:13px;}
.cdpos-history-tooth-pill{background:#066fd9;color:#fff;border-radius:999px;padding:8px 12px;font-weight:900;font-size:12px;white-space:nowrap;}
.cdpos-history-meta{padding:13px 18px;background:#fff;border-bottom:1px solid #e5e7eb;color:#475569;}
.cdpos-history-meta strong{color:#0f172a;}
.cdpos-history-detail{padding:18px;color:#1f2937;line-height:1.62;background:#fff;}
.cdpos-history-files{padding:16px 18px 18px;background:#f1f5f9;border-top:1px solid #e2e8f0;}
.cdpos-history-files h3{margin:0 0 12px;font-family:Montserrat,Inter,sans-serif;color:#0f172a;font-size:16px;}
.cdpos-files-empty-mini{border:1px dashed #cbd5e1;border-radius:16px;background:#fff;color:#64748b;padding:14px;text-align:center;font-weight:800;}
@media(max-width:1100px){.cdpos-history-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.cdpos-history-file-field{grid-column:span 2;}}
@media(max-width:680px){.cdpos-history-grid{grid-template-columns:1fr}.cdpos-history-file-field{grid-column:span 1}.cdpos-history-card-head{display:grid}.cdpos-history-tooth-pill{white-space:normal}}

/* POS Dental 3.10.1 - Historial Tratamientos refinado */
.cdpos-section-head-with-action{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap;}
.cdpos-section-head-with-action .cdpos-btn{flex:0 0 auto;white-space:nowrap;}
.cdpos-modal-lead{margin:-10px 54px 18px 0;color:#cbd5e1;line-height:1.55;font-weight:600;}
.cdpos-history-section .cdpos-section-head{margin-bottom:18px;}
.cdpos-history-card{background:#f8fafc;color:#0f172a;border:1px solid #dbe4ef;border-radius:24px;overflow:hidden;box-shadow:0 14px 32px rgba(15,23,42,.14);margin-bottom:18px;}
.cdpos-history-card:last-child{margin-bottom:0;}
.cdpos-history-card-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;background:#eaf3ff;border-bottom:1px solid #cbd5e1;padding:16px 18px;}
.cdpos-history-head-left{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;color:#475569;font-size:13px;font-weight:800;line-height:1.45;}
.cdpos-history-head-left span:not(:last-child)::after{content:'|';margin-left:12px;color:#94a3b8;font-weight:900;}
.cdpos-history-head-left strong{display:inline!important;font-family:Inter,Arial,sans-serif;font-size:13px;color:#0f172a;font-weight:900;}
.cdpos-history-body{display:grid;grid-template-columns:40% 60%;background:#fff;}
.cdpos-history-detail-panel,.cdpos-history-files-panel{padding:18px;min-width:0;}
.cdpos-history-detail-panel{border-right:1px solid #e2e8f0;background:#fff;}
.cdpos-history-files-panel{background:#f1f5f9;}
.cdpos-history-detail-panel h3,.cdpos-history-files-panel h3{margin:0 0 12px;font-family:Montserrat,Inter,sans-serif;color:#0f172a;font-size:16px;}
.cdpos-history-detail{padding:0!important;color:#1f2937;line-height:1.62;background:transparent!important;}
.cdpos-history-files-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.cdpos-history-modal .cdpos-modal-dialog{width:min(980px,100%);}
.cdpos-history-modal .cdpos-history-form{margin-top:10px;}
@media(max-width:900px){.cdpos-history-card-head,.cdpos-history-body{grid-template-columns:1fr}.cdpos-history-detail-panel{border-right:0;border-bottom:1px solid #e2e8f0}.cdpos-history-files-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.cdpos-section-head-with-action .cdpos-btn{width:100%;}}
@media(max-width:540px){.cdpos-history-files-grid{grid-template-columns:1fr}.cdpos-history-head-left{display:grid}.cdpos-history-head-left span:not(:last-child)::after{content:'';margin:0}.cdpos-modal-lead{margin-right:0}}

/* POS Dental 3.11.0 - Contabilidad ficha paciente */
.cdpos-accounting-tab{
    display:block;
}
.cdpos-accounting-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
    align-items:start;
}
.cdpos-accounting-card,
.cdpos-accounting-balance{
    background:#f6f6f6;
    border:1px solid #dbe4ef;
    border-radius:18px;
    padding:22px;
    color:#0f172a;
    box-shadow:0 14px 34px rgba(2,8,23,.08);
}
.cdpos-accounting-card h3,
.cdpos-accounting-balance h3{
    margin:0 0 16px;
    color:#066fd9;
    font-family:Montserrat, Inter, sans-serif;
    font-size:20px;
    font-weight:800;
}
.cdpos-accounting-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0 8px;
}
.cdpos-accounting-table th,
.cdpos-accounting-table td{
    padding:12px 14px;
    background:#fff;
    border-top:1px solid #e2e8f0;
    border-bottom:1px solid #e2e8f0;
    color:#111827;
}
.cdpos-accounting-table th{
    text-align:left;
    font-weight:800;
    border-left:1px solid #e2e8f0;
    border-radius:12px 0 0 12px;
}
.cdpos-accounting-table td{
    text-align:right;
    font-weight:900;
    color:#066fd9;
    border-right:1px solid #e2e8f0;
    border-radius:0 12px 12px 0;
}
.cdpos-accounting-total-table{
    margin-top:14px;
}
.cdpos-accounting-movements{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:420px;
    overflow:auto;
    padding-right:4px;
}
.cdpos-accounting-movement{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:14px;
    padding:14px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px 14px;
    color:#111827;
}
.cdpos-accounting-movement strong,
.cdpos-accounting-movement span{
    display:block;
}
.cdpos-accounting-movement span{
    color:#475569;
    font-size:13px;
    margin-top:3px;
}
.cdpos-accounting-movement b{
    color:#066fd9;
    font-size:18px;
    white-space:nowrap;
}
.cdpos-accounting-movement p{
    grid-column:1 / -1;
    margin:4px 0 0;
    color:#334155;
    font-size:13px;
}
.cdpos-accounting-balance{
    margin-top:22px;
    background:#eef6ff;
    border-color:#bfdbfe;
}
.cdpos-accounting-balance.is-positive{
    background:#ecfdf5;
    border-color:#bbf7d0;
}
.cdpos-accounting-balance.is-negative{
    background:#fff1f2;
    border-color:#fecdd3;
}
.cdpos-accounting-balance-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    background:#fff;
    border-radius:14px;
    padding:16px;
    color:#111827;
    font-weight:800;
}
.cdpos-accounting-balance-row strong{
    color:#066fd9;
    font-size:24px;
}
.cdpos-accounting-balance p{
    margin:12px 0 0;
    color:#334155;
}
.cdpos-accounting-form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:14px;
}
.cdpos-accounting-form-grid label,
.cdpos-accounting-detail-label{
    display:flex;
    flex-direction:column;
    gap:6px;
    color:#0f172a;
    font-weight:700;
}
.cdpos-accounting-form-grid input,
.cdpos-accounting-form-grid select,
.cdpos-accounting-detail-label textarea{
    width:100%;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:11px 12px;
    background:#fff;
    color:#0f172a;
    font-family:Inter, sans-serif;
}
.cdpos-accounting-detail-label{
    margin-top:14px;
}
@media (max-width: 900px){
    .cdpos-accounting-grid,
    .cdpos-accounting-form-grid{
        grid-template-columns:1fr;
    }
}

/* POS Dental 3.12.0 - Exportar */
.cdpos-export-tab{display:block;}
.cdpos-export-head{margin-bottom:18px;}
.cdpos-export-form{background:#f8fafc;border:1px solid #dbe4f0;border-radius:20px;padding:22px;box-shadow:0 16px 40px rgba(15,23,42,.08);}
.cdpos-export-date-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px;}
.cdpos-export-date-grid label span{display:block;font-weight:800;color:#0e1524;margin-bottom:7px;}
.cdpos-export-date-grid input{width:100%;border:1px solid #cbd5e1;border-radius:14px;padding:12px 13px;background:#fff;color:#0e1524;}
.cdpos-export-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:18px 0;}
.cdpos-export-options label{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid #dbe4f0;border-radius:16px;padding:14px;cursor:pointer;font-weight:800;color:#0e1524;transition:.2s ease;}
.cdpos-export-options label:hover{border-color:#066fd9;box-shadow:0 10px 24px rgba(6,111,217,.12);}
.cdpos-export-options input{width:18px;height:18px;accent-color:#066fd9;}
.cdpos-export-note{background:#e8f2ff;border-left:5px solid #066fd9;border-radius:14px;padding:13px 15px;color:#0e1524;margin:12px 0 18px;}
@media(max-width:900px){.cdpos-export-date-grid,.cdpos-export-options{grid-template-columns:1fr 1fr;}}
@media(max-width:520px){.cdpos-export-date-grid,.cdpos-export-options{grid-template-columns:1fr;}}

.cdpos-header-actions{display:flex;align-items:center;gap:14px;justify-content:flex-end;min-width:220px;}
.cdpos-header-greeting{font-weight:800;color:#17243b;white-space:nowrap;font-size:14px;}
.cdpos-page-title-with-action{max-width:1180px;}
.cdpos-table td.cdpos-table-action,.cdpos-table th.cdpos-table-action{text-align:center;vertical-align:middle;}
.cdpos-table td.cdpos-table-action .cdpos-btn-mini{margin-left:auto;margin-right:auto;}
@media(max-width:1120px){.cdpos-header-actions{justify-self:end}.cdpos-header-greeting{font-size:13px}.cdpos-logout{justify-self:auto}}
@media(max-width:640px){.cdpos-header-actions{width:100%;justify-content:space-between}.cdpos-header-greeting{white-space:normal}}


.cdpos-danger-zone{
    margin:18px 0;
    padding:18px;
    border:1px solid rgba(220,38,38,.28);
    background:rgba(254,242,242,.96);
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    color:#7f1d1d;
}
.cdpos-danger-zone p{margin:6px 0 0;color:#991b1b;font-size:14px;}
.cdpos-inline-form{margin:0;display:flex;align-items:center;}
@media (max-width: 780px){.cdpos-danger-zone{flex-direction:column;align-items:flex-start}.cdpos-inline-form{width:100%}.cdpos-inline-form .cdpos-btn{width:100%;}}


/* POS Dental 3.13.6 - Ajustes listado de pacientes */
.cdpos-patients-table{
    table-layout: fixed;
    min-width: 980px;
}
.cdpos-patients-table .cdpos-col-name{width:24%;}
.cdpos-patients-table .cdpos-col-rut{width:16%;}
.cdpos-patients-table .cdpos-col-email{width:25%;}
.cdpos-patients-table .cdpos-col-phone{width:12%;}
.cdpos-patients-table .cdpos-col-ficha{width:11%;}
.cdpos-patients-table .cdpos-col-delete{width:12%;}
.cdpos-patients-table td.cdpos-col-phone,
.cdpos-patients-table td.cdpos-col-rut{
    white-space: nowrap;
}
.cdpos-patients-table td.cdpos-col-email,
.cdpos-patients-table td.cdpos-col-name{
    word-break: break-word;
}
.cdpos-patients-table td.cdpos-table-action,
.cdpos-patients-table th.cdpos-table-action{
    text-align:center;
}

/* POS Dental 3.13.6 - Importación automática */
.cdpos-import-auto-hint,
.cdpos-import-autocontinue{
    background:#eff6ff;
    border:1px solid #bfdbfe;
    border-radius:14px;
    color:#0f172a;
    padding:14px 16px;
    line-height:1.5;
}
.cdpos-import-autocontinue{
    margin:18px 0;
}
.cdpos-auto-next-form{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    margin-top:12px;
}
.cdpos-btn-muted{
    background:#64748b !important;
    color:#fff !important;
}
.cdpos-auto-countdown{
    margin:10px 0 0;
    color:#334155;
}

/* POS Dental 3.14 - Acceso y selección de sede */
.cdpos-login-page-v314{
    min-height:100vh!important;
    width:100%;
    margin:0!important;
    padding:clamp(28px,5vw,70px) 22px!important;
    background:
        radial-gradient(circle at 18% 12%,rgba(255,255,255,.25),transparent 28%),
        radial-gradient(circle at 82% 18%,rgba(95,168,255,.28),transparent 32%),
        linear-gradient(135deg,#066fd9 0%,#064f9c 42%,#0e1524 100%)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
}
.cdpos-login-shell{
    width:min(520px,100%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:22px;
}
.cdpos-login-logo-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:16px 22px;
    border-radius:26px;
    background:#fff;
    box-shadow:0 24px 70px rgba(2,10,24,.28);
    text-decoration:none!important;
}
.cdpos-login-logo{
    display:block;
    max-width:230px;
    max-height:92px;
    width:auto;
    height:auto;
}
.cdpos-login-card-v314{
    width:100%!important;
    background:rgba(8,18,34,.72)!important;
    border:1px solid rgba(255,255,255,.2)!important;
    border-radius:34px!important;
    padding:clamp(28px,4vw,44px)!important;
    box-shadow:0 32px 90px rgba(2,10,24,.38)!important;
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
}
.cdpos-login-kicker{
    display:inline-flex;
    margin-bottom:14px;
    padding:8px 13px;
    border-radius:999px;
    background:rgba(6,111,217,.18);
    border:1px solid rgba(125,190,255,.25);
    color:#d9ecff;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.cdpos-login-card-v314 h1{
    font-size:clamp(28px,4vw,42px)!important;
}
.cdpos-login-card-v314 p{
    color:#dce8f8!important;
    line-height:1.55;
}
.cdpos-login-form input,
.cdpos-login-form select,
.cdpos-sede-form select{
    min-height:50px;
    background:#fff!important;
    color:#0e1524!important;
    border:1px solid rgba(255,255,255,.28)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.55);
}
.cdpos-login-form input::placeholder{color:#7b8797!important;}
.cdpos-login-form select option{color:#0e1524;background:#fff;}
.cdpos-login-form select:disabled,.cdpos-login-form button:disabled{opacity:.58;cursor:not-allowed;}
.cdpos-sede-gate-wrap{
    min-height:calc(100vh - 84px)!important;
    display:flex;
    align-items:center;
    justify-content:center;
}
.cdpos-sede-gate-card{
    background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.045))!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:34px!important;
    padding:clamp(28px,4vw,46px)!important;
}
.cdpos-sede-form select option{color:#0e1524;background:#fff;}
.cdpos-header-actions{display:flex;align-items:center;gap:14px;}
.cdpos-header-greeting{color:#0e1524;font-weight:900;white-space:nowrap;}
@media(max-width:780px){
    .cdpos-login-logo{max-width:190px;}
    .cdpos-sede-gate-wrap{min-height:calc(100vh - 120px)!important;}
}

/* POS Dental 3.15 - Control Accesos Dentistas */
.cdpos-access-filters{
    align-items:flex-end;
}
.cdpos-access-filters select,
.cdpos-access-filters input[type="date"]{
    min-height:44px;
}
.cdpos-access-summary-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:16px;
    margin:0 0 20px;
}
.cdpos-access-summary-card{
    background:#ffffff;
    border:1px solid rgba(148,163,184,.35);
    border-radius:18px;
    padding:18px;
    box-shadow:0 12px 26px rgba(15,23,42,.10);
}
.cdpos-access-summary-card span{
    display:block;
    color:#64748b;
    font-size:13px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
    margin-bottom:8px;
}
.cdpos-access-summary-card strong{
    display:block;
    color:#0f172a;
    font-size:26px;
    font-family:'Montserrat', sans-serif;
}
.cdpos-access-summary-card.is-open{
    border-color:#f59e0b;
    background:#fffbeb;
}
.cdpos-access-summary-card.is-closed{
    border-color:#22c55e;
    background:#f0fdf4;
}
.cdpos-access-table td strong{
    display:block;
    color:#0f172a;
}
.cdpos-access-table td small{
    display:block;
    color:#64748b;
    margin-top:3px;
    font-size:12px;
}
.cdpos-access-row-open{
    background:#fff7ed;
}
.cdpos-access-row-closed{
    background:#ffffff;
}
.cdpos-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    line-height:1;
    font-weight:800;
    white-space:nowrap;
}
.cdpos-badge-open{
    background:#fed7aa;
    color:#9a3412;
}
.cdpos-badge-closed{
    background:#bbf7d0;
    color:#166534;
}
.cdpos-badge-warning{
    background:#fee2e2;
    color:#991b1b;
}
.cdpos-muted-text{
    color:#94a3b8;
    font-size:12px;
    font-weight:700;
}
@media (max-width: 900px){
    .cdpos-access-summary-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px){
    .cdpos-access-summary-grid{
        grid-template-columns:1fr;
    }
}


/* POS Dental 3.15.1 - Mejor lectura Control Accesos Dentistas */
.cdpos-access-table{
    background:#ffffff;
    border-collapse:separate;
    border-spacing:0;
}
.cdpos-access-table thead th{
    background:#1f2b3f !important;
    color:#ffffff !important;
    font-size:14px;
    letter-spacing:.02em;
    padding:18px 16px;
    border-bottom:0;
}
.cdpos-access-table tbody td{
    color:#0f172a !important;
    background:#ffffff;
    border-bottom:1px solid #e5e7eb;
    vertical-align:middle;
    font-weight:600;
}
.cdpos-access-table tbody tr:nth-child(even) td{
    background:#f8fafc;
}
.cdpos-access-table tbody tr.cdpos-access-row-open td{
    background:#fff7ed;
}
.cdpos-access-table tbody tr.cdpos-access-row-closed td{
    background:#ffffff;
}
.cdpos-access-table td strong{
    color:#020617 !important;
    font-weight:800;
}
.cdpos-access-table td small{
    color:#475569 !important;
    font-weight:600;
}
.cdpos-access-table .cdpos-muted-text{
    color:#64748b !important;
}
.cdpos-access-table .cdpos-table-action{
    text-align:center;
}
.cdpos-access-table .cdpos-btn-mini{
    white-space:nowrap;
}
.cdpos-access-table td:nth-child(2),
.cdpos-access-table td:nth-child(3),
.cdpos-access-table td:nth-child(4),
.cdpos-access-table td:nth-child(5){
    color:#334155 !important;
}
@media (max-width: 980px){
    .cdpos-access-table{min-width:980px;}
}

/* POS Dental 3.15.2 - Acciones del importador */
.cdpos-import-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
    margin-top:18px;
}
.cdpos-import-actions .cdpos-secondary{
    background:#334155;
    color:#fff;
    border:1px solid rgba(255,255,255,.12);
}
.cdpos-import-actions .cdpos-secondary:hover{
    background:#1f2937;
    color:#fff;
}

/* POS Dental 3.16 - Acciones en Historial Presupuestos */
.cdpos-history-budget-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    background:#eef6ff;
    border-top:1px solid #d7e7fb;
    border-bottom:1px solid #d7e7fb;
}
.cdpos-history-budget-actions .cdpos-download-budget,
.cdpos-history-budget-actions .cdpos-resend-budget{
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    border-radius:12px;
    padding:9px 14px;
    border:0;
    cursor:pointer;
    font-weight:800;
    font-family:Inter,Arial,sans-serif;
}
.cdpos-history-budget-actions .cdpos-download-budget{
    background:#066fd9;
    color:#fff;
}
.cdpos-history-budget-actions .cdpos-resend-budget{
    background:#0f172a;
    color:#fff;
}
.cdpos-resend-budget-form{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    margin:0;
    flex:1 1 420px;
}
.cdpos-resend-budget-form input[type="email"]{
    width:min(100%, 280px);
    min-height:38px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:8px 11px;
    color:#0f172a;
    background:#fff;
    font-family:Inter,Arial,sans-serif;
}
@media (max-width: 720px){
    .cdpos-history-budget-actions,
    .cdpos-resend-budget-form{
        align-items:stretch;
        flex-direction:column;
    }
    .cdpos-resend-budget-form{flex-basis:auto; width:100%;}
    .cdpos-resend-budget-form input[type="email"]{width:100%;}
}

/* POS Dental 3.17 - Responsive móvil */
.cdpos-mobile-menu-toggle{display:none;}
.cdpos-logout-mobile-text{display:none;}
.cdpos-mobile-state-btn{display:none;}

@media (max-width: 780px){
  body:has(.cdpos-header){padding-top:74px;}
  .cdpos-header{
    position:fixed!important;
    top:0;left:0;right:0;z-index:99980;
    height:70px!important;min-height:70px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    padding:10px 72px!important;gap:0!important;flex-wrap:nowrap!important;
    box-shadow:0 10px 28px rgba(15,23,42,.12);
  }
  .cdpos-logo-wrap{position:static!important;margin:0 auto!important;display:flex!important;justify-content:center!important;align-items:center!important;}
  .cdpos-logo{max-height:50px!important;width:auto!important;display:block!important;}
  .cdpos-header-greeting{display:none!important;}
  .cdpos-header-actions{position:absolute!important;right:10px!important;top:8px!important;display:flex!important;align-items:center!important;gap:0!important;}
  .cdpos-logout{
    width:52px!important;height:52px!important;min-width:52px!important;padding:0!important;border-radius:18px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;
    background:#eef4ff!important;color:#066fd9!important;border:1px solid #d9e8ff!important;text-decoration:none!important;box-shadow:none!important;
  }
  .cdpos-logout-icon{font-size:25px!important;line-height:1!important;font-weight:900!important;transform:rotate(180deg);}
  .cdpos-logout-text{display:none!important;}
  .cdpos-logout-mobile-text{display:block!important;font-size:9px!important;line-height:1!important;font-weight:800!important;text-transform:lowercase!important;color:#334155!important;}
  .cdpos-mobile-menu-toggle{
    position:absolute;left:10px;top:8px;z-index:99985;
    display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:0;
    width:54px;height:54px;border:0;border-radius:18px;background:#066fd9;color:#fff;
    font-size:11px;font-weight:900;text-transform:lowercase;box-shadow:0 10px 26px rgba(6,111,217,.28);cursor:pointer;
  }
  .cdpos-mobile-menu-icon{font-size:23px;line-height:1;display:block;}
  .cdpos-mobile-menu-toggle.is-active{background:#0e1524;}
  .cdpos-top-menu{
    display:none!important;position:fixed!important;left:10px!important;right:10px!important;top:76px!important;transform:none!important;z-index:99979;
    max-width:none!important;width:auto!important;padding:12px!important;border-radius:22px!important;background:#ffffff!important;
    box-shadow:0 20px 55px rgba(15,23,42,.24)!important;overflow:visible!important;white-space:normal!important;
    grid-template-columns:1fr!important;gap:8px!important;
  }
  .cdpos-top-menu.is-mobile-open{display:grid!important;}
  .cdpos-top-menu a{justify-content:flex-start!important;width:100%!important;min-height:42px!important;border-radius:14px!important;background:#f5f8fc!important;color:#111827!important;font-size:13px!important;padding:0 14px!important;}
  .cdpos-wrap{padding:30px 14px 22px!important;}
  .cdpos-ficha-page,.cdpos-dark{padding-top:30px!important;}
  .cdpos-login-page{min-height:100vh!important;height:auto!important;padding:26px 16px!important;}
  .cdpos-login-shell{width:100%!important;}
  .cdpos-login-card{padding:24px 18px!important;border-radius:24px!important;}
  .cdpos-button-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
  .cdpos-tile{min-height:112px!important;padding:14px 10px!important;border-radius:20px!important;}
  .cdpos-tile-icon{font-size:27px!important;}
  .cdpos-tile strong{font-size:13px!important;line-height:1.18!important;}
  .cdpos-page-title{margin-bottom:14px!important;}
  .cdpos-page-title h1{font-size:24px!important;}
  .cdpos-page-title p{font-size:13px!important;}
  .cdpos-back-row{margin:0 0 12px!important;justify-content:flex-start!important;}
  .cdpos-back-btn,.cdpos-page-title-with-action .cdpos-btn{font-size:12px!important;min-height:34px!important;padding:0 11px!important;border-radius:999px!important;}
  .cdpos-page-title-with-action{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:start!important;gap:10px!important;text-align:left!important;}
  .cdpos-page-title-with-action>div{grid-column:1/-1!important;order:2!important;}
  .cdpos-page-title-with-action .cdpos-btn{grid-column:2!important;grid-row:1!important;justify-self:end!important;align-self:start!important;margin:0!important;}
  .cdpos-back-row + .cdpos-page-title-with-action{margin-top:-46px!important;padding-top:46px!important;}
  .cdpos-card{border-radius:20px!important;padding:16px!important;}

  /* Listados CRUD como tarjetas */
  .cdpos-table-wrap{overflow:visible!important;border:0!important;border-radius:0!important;}
  .cdpos-table{min-width:0!important;width:100%!important;border-collapse:separate!important;border-spacing:0 12px!important;}
  .cdpos-table thead{display:none!important;}
  .cdpos-table tbody,.cdpos-table tr,.cdpos-table td{display:block!important;width:100%!important;}
  .cdpos-table tr{background:#ffffff!important;border:1px solid #dbe7f5!important;border-radius:18px!important;padding:12px!important;box-shadow:0 12px 30px rgba(15,23,42,.08)!important;overflow:hidden!important;}
  .cdpos-table td{padding:7px 0!important;border:0!important;color:#1e293b!important;font-size:13px!important;}
  .cdpos-table td:before{display:block;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px;}
  .cdpos-table td:nth-child(1):before{content:'Nombre';}
  .cdpos-table td:nth-child(2):before{content:'RUT';}
  .cdpos-table td:nth-child(3):before{content:'Email';}
  .cdpos-table td:nth-child(4):before{content:'Teléfono';}
  .cdpos-table td:nth-child(5):before{content:'Acciones';}
  .cdpos-table td:nth-child(6):before{content:'Eliminar';}
  .cdpos-actions,.cdpos-table-action{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;flex-wrap:wrap!important;padding-top:10px!important;}
  .cdpos-actions:before,.cdpos-table-action:before{width:100%!important;}
  .cdpos-btn-mini{font-size:12px!important;padding:8px 10px!important;border-radius:12px!important;}

  /* Pacientes */
  .cdpos-filters{grid-template-columns:1fr!important;gap:10px!important;}
  .cdpos-filters label{font-size:0!important;gap:0!important;}
  .cdpos-filters input{font-size:14px!important;background:#fff!important;color:#0f172a!important;}
  .cdpos-filters .cdpos-btn{width:100%!important;min-height:40px!important;font-size:13px!important;}
  .cdpos-patients-table .cdpos-col-phone{display:none!important;}
  .cdpos-patients-table td:nth-child(4){display:none!important;}
  .cdpos-patients-table td:nth-child(5):before{content:'Ficha';}
  .cdpos-patients-table td:nth-child(6):before{content:'Eliminar';}
  .cdpos-pagination a{width:34px!important;height:34px!important;font-size:12px!important;}

  /* Ficha paciente */
  .cdpos-tabs{display:flex!important;flex-wrap:wrap!important;gap:7px!important;overflow:visible!important;padding:0!important;margin-bottom:14px!important;}
  .cdpos-tab-btn{flex:1 1 calc(33.333% - 8px)!important;min-width:92px!important;min-height:38px!important;padding:8px 7px!important;font-size:11px!important;white-space:normal!important;text-align:center!important;}
  .cdpos-tab-content{overflow-x:auto!important;max-width:100%!important;}
  .cdpos-ficha-table{border-spacing:0 8px!important;}
  .cdpos-ficha-table tr{padding:9px 10px!important;border-radius:15px!important;}
  .cdpos-ficha-table th,.cdpos-ficha-table td{display:block!important;width:100%!important;padding:4px 0!important;border:0!important;text-align:left!important;vertical-align:top!important;}
  .cdpos-ficha-table th{font-size:11px!important;line-height:1.2!important;color:#334155!important;background:transparent!important;}
  .cdpos-ficha-table td{font-size:13px!important;}
  .cdpos-ficha-table input,.cdpos-ficha-table textarea,.cdpos-ficha-table select{min-height:36px!important;font-size:13px!important;padding:8px 10px!important;border-radius:10px!important;}
  .cdpos-patient-form .cdpos-form-actions{justify-content:stretch!important;}
  .cdpos-patient-form .cdpos-btn{width:100%!important;}

  /* Archivos */
  .cdpos-files-tab,.cdpos-history-tab,.cdpos-accounting-tab{max-width:100%!important;overflow-x:hidden!important;}
  .cdpos-files-grid,.grid-archivos-tratamiento,.cdpos-file-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  .cdpos-file-card,.archivo-item{min-width:0!important;}
  .cdpos-file-card img,.archivo-thumb-img{height:96px!important;}
  .cdpos-upload-grid{grid-template-columns:1fr!important;}

  /* Nuevo presupuesto */
  .cdpos-budget-top,.cdpos-treatment-grid{grid-template-columns:1fr!important;}
  .cdpos-treatment-row{padding:14px!important;border-radius:18px!important;}
  .cdpos-treatment-row-head{align-items:flex-start!important;}
  .cdpos-budget-toolbar{align-items:stretch!important;flex-direction:column!important;gap:10px!important;}
  .cdpos-budget-summary{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .cdpos-budget-summary>div{text-align:left!important;min-width:0!important;}
  .cdpos-budget-actions{justify-content:stretch!important;}
  .cdpos-budget-actions .cdpos-btn{width:100%!important;}
  .cdpos-tooth-modal .cdpos-modal-dialog{max-width:calc(100vw - 18px)!important;padding:16px!important;}
  .bocacompleta{transform:scale(.82);transform-origin:top center;margin-bottom:-80px!important;}

  /* Presupuestos */
  .cdpos-subtabs{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .cdpos-subtab{width:100%!important;justify-content:center!important;min-height:40px!important;font-size:13px!important;}
  .cdpos-kanban,.cdpos-closed-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;}
  .cdpos-kanban-col,.cdpos-closed-col{min-height:260px!important;}
  .cdpos-kanban-dropzone{min-height:190px!important;}
  .cdpos-treatment-card{border-radius:18px!important;}
  .cdpos-treatment-card-main{display:grid!important;grid-template-columns:76px 1fr!important;gap:11px!important;}
  .cdpos-treatment-thumb{width:76px!important;height:76px!important;}
  .cdpos-treatment-info strong{font-size:14px!important;}
  .cdpos-treatment-info p,.cdpos-treatment-info small{font-size:12px!important;line-height:1.35!important;}
  .cdpos-treatment-card footer{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
  .cdpos-mobile-state-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;background:#e0f2fe!important;color:#075985!important;border:1px solid #bae6fd!important;}
  .cdpos-treatment-card footer .cdpos-complete,.cdpos-treatment-card footer .cdpos-reject{width:100%!important;}
  .cdpos-history-budget-card{border-radius:18px!important;padding:14px!important;}
  .cdpos-history-budget-card>header{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .cdpos-history-budget-totals{text-align:left!important;}
  .cdpos-history-budget-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .cdpos-resend-budget-form{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .cdpos-history-item{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;border-radius:14px!important;}

  /* Historial tratamientos */
  .cdpos-history-card-header,.cdpos-treatment-history-card header{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .cdpos-history-card-body,.cdpos-treatment-history-body{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;}
  .cdpos-history-files,.cdpos-treatment-history-files{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* POS Dental 3.18 - Correcciones responsive móvil */
@media (max-width: 780px){
  body:has(.cdpos-header){padding-top:0!important;}
  .cdpos-header{z-index:99990!important;}
  .cdpos-mobile-menu-toggle svg,
  .cdpos-logout-icon svg{width:24px!important;height:24px!important;display:block!important;}
  .cdpos-mobile-menu-icon{font-size:0!important;line-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#fff!important;}
  .cdpos-logout-icon{font-size:0!important;line-height:0!important;transform:none!important;color:#066fd9!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .cdpos-header-actions{left:auto!important;right:10px!important;top:8px!important;z-index:99995!important;}
  .cdpos-logout{position:relative!important;right:auto!important;left:auto!important;top:auto!important;}
  .cdpos-mobile-menu-toggle{left:10px!important;right:auto!important;top:8px!important;}

  .cdpos-wrap{padding:96px 12px 24px!important;position:relative!important;}
  .cdpos-dark,.cdpos-ficha-page{padding-top:96px!important;}
  .cdpos-login-page{padding-top:24px!important;}

  .cdpos-back-row{position:absolute!important;top:10px!important;left:10px!important;z-index:3!important;margin:0!important;max-width:none!important;}
  .cdpos-page-title-with-action{position:relative!important;display:block!important;padding-top:52px!important;margin-bottom:14px!important;min-height:92px!important;}
  .cdpos-page-title-with-action .cdpos-btn{position:absolute!important;top:10px!important;right:10px!important;z-index:3!important;font-size:12px!important;min-height:34px!important;height:34px!important;padding:0 11px!important;line-height:1!important;}
  .cdpos-back-btn{font-size:12px!important;min-height:34px!important;height:34px!important;padding:0 11px!important;line-height:1!important;}
  .cdpos-back-row + .cdpos-page-title-with-action{margin-top:0!important;}
  .cdpos-page-title-with-action>div{display:block!important;}

  .cdpos-card{width:100%!important;max-width:none!important;margin:0 0 14px!important;padding:14px!important;}

  .cdpos-table tr{width:100%!important;}
  .cdpos-btn-mini,
  .cdpos-actions .cdpos-btn-mini,
  .cdpos-table-action .cdpos-btn-mini{height:36px!important;min-height:36px!important;line-height:1!important;padding:0 12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:12px!important;}

  .cdpos-patients-table .cdpos-col-phone,
  .cdpos-patients-table td.cdpos-col-phone,
  .cdpos-patients-table td:nth-child(4){display:none!important;}
  .cdpos-patients-table td:nth-child(5):before,
  .cdpos-patients-table td:nth-child(6):before{content:''!important;display:none!important;}
  .cdpos-patients-table .cdpos-table-action{display:inline-flex!important;width:auto!important;vertical-align:top!important;margin-right:8px!important;padding-top:8px!important;}
  .cdpos-patients-table tr{display:block!important;}
  .cdpos-patients-table td.cdpos-table-action + td.cdpos-table-action{margin-left:0!important;}
  .cdpos-patients-table td.cdpos-table-action .cdpos-btn-mini{min-width:96px!important;}

  .cdpos-patients-table td:nth-child(1):before{content:'Nombre'!important;}
  .cdpos-patients-table td:nth-child(2):before{content:'RUT'!important;display:block!important;}
  .cdpos-patients-table td:nth-child(3):before{content:'Email'!important;}

  .cdpos-table:not(.cdpos-patients-table) .cdpos-actions,
  .cdpos-table:not(.cdpos-patients-table) .cdpos-table-action{display:flex!important;gap:8px!important;align-items:center!important;}
}


/* POS Dental 3.18.1 - Ajustes móviles de cabecera y lista pacientes */
.cdpos-mobile-menu-extra{display:none!important;}
@media (max-width: 780px){
  .cdpos-header-actions{
    width:52px!important;
    max-width:52px!important;
    min-width:52px!important;
    position:absolute!important;
    right:10px!important;
    left:auto!important;
    top:8px!important;
  }
  .cdpos-mobile-menu-extra{display:flex!important;}
  .cdpos-mobile-menu-home{background:#eaf3ff!important;color:#066fd9!important;font-weight:900!important;}
  .cdpos-mobile-menu-logout{background:#fff1f2!important;color:#be123c!important;font-weight:900!important;}

  .cdpos-dark,
  .cdpos-ficha-page{
    padding-top:10px!important;
    margin-top:25px!important;
  }
  .cdpos-wrap.cdpos-dark,
  .cdpos-wrap.cdpos-ficha-page{
    padding-top:10px!important;
    margin-top:25px!important;
  }

  .cdpos-back-row{
    position:absolute!important;
    top:0!important;
    left:0!important;
    z-index:5!important;
    margin:0!important;
  }
  .cdpos-page-title-with-action{
    position:relative!important;
    padding-top:48px!important;
    margin-top:0!important;
    min-height:94px!important;
  }
  .cdpos-page-title-with-action .cdpos-btn{
    position:absolute!important;
    top:0!important;
    right:0!important;
    z-index:5!important;
    height:34px!important;
    min-height:34px!important;
    padding:0 10px!important;
    font-size:12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .cdpos-back-btn{
    height:34px!important;
    min-height:34px!important;
    padding:0 10px!important;
    font-size:12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  .cdpos-patients-table{
    border-spacing:0 10px!important;
  }
  .cdpos-patients-table tr{
    margin:0 0 10px!important;
    padding:12px 13px!important;
  }
  .cdpos-patients-table td{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:8px!important;
    padding:3px 0!important;
    text-align:left!important;
  }
  .cdpos-patients-table td:before{
    display:inline-block!important;
    min-width:54px!important;
    margin:0!important;
    color:#0f172a!important;
    font-size:11px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
    letter-spacing:.02em!important;
  }
  .cdpos-patients-table td:nth-child(1):before{content:'Nombre:'!important;}
  .cdpos-patients-table td:nth-child(2):before{content:'RUT:'!important;}
  .cdpos-patients-table td:nth-child(3):before{content:'Email:'!important;}
  .cdpos-patients-table td:nth-child(4),
  .cdpos-patients-table .cdpos-col-phone{display:none!important;}
  .cdpos-patients-table td.cdpos-table-action,
  .cdpos-patients-table td:nth-child(5),
  .cdpos-patients-table td:nth-child(6){
    display:inline-flex!important;
    width:auto!important;
    margin:9px 8px 0 0!important;
    padding:0!important;
    vertical-align:top!important;
  }
  .cdpos-patients-table td.cdpos-table-action:before,
  .cdpos-patients-table td:nth-child(5):before,
  .cdpos-patients-table td:nth-child(6):before{
    display:none!important;
    content:''!important;
  }
  .cdpos-patients-table td.cdpos-table-action .cdpos-btn-mini{
    height:36px!important;
    min-height:36px!important;
    min-width:96px!important;
    padding:0 12px!important;
  }
}


/* POS Dental 3.18.2 - Ajustes móviles y adminbar */
body:has(.cdpos-header) #wpadminbar,
#wpadminbar:has(~ .cdpos-header){
  display:none!important;
}
html:has(.cdpos-header){
  margin-top:0!important;
}
@media (max-width: 780px){
  #wpadminbar{display:none!important;}
  html{margin-top:0!important;}
  .cdpos-wrap.cdpos-dark,
  .cdpos-wrap.cdpos-ficha-page{
    padding-top:20px!important;
  }
  .cdpos-back-row{
    position:absolute!important;
    top:20px!important;
    left:20px!important;
    z-index:5!important;
    margin:0!important;
  }
  .cdpos-back-row + .cdpos-page-title-with-action{
    padding-top:60px!important;
  }
  .cdpos-page-title-with-action{
    margin-bottom:0!important;
  }
}


/* POS Dental 3.18.3 - Correcciones móviles ficha/presupuestos */
.cdpos-tooth-fallback svg{width:28px;height:28px;display:block;}
@media (max-width: 780px){
  .cdpos-wrap.cdpos-dark,
  .cdpos-wrap.cdpos-ficha-page{
    padding-top:70px!important;
    margin-top:70px!important;
  }
  .cdpos-ficha-page .cdpos-page-title p,
  section.cdpos-page-title p{
    margin-bottom:10px!important;
  }
  .cdpos-ficha-table td:before,
  .cdpos-ficha-table th:before{
    content:''!important;
    display:none!important;
  }
  .cdpos-ficha-table tr{
    margin-bottom:5px!important;
    border-spacing:0!important;
  }
  .cdpos-ficha-table th,
  .cdpos-ficha-table td{
    padding-top:5px!important;
    padding-bottom:5px!important;
  }
  .cdpos-ficha-table tr:has([name="billing_Motivo_de_Consulta"]),
  .cdpos-ficha-table tr:has([name="billing_Alergias"]){
    background:#7f1d1d!important;
    border-color:#7f1d1d!important;
  }
  .cdpos-ficha-table tr:has([name="billing_Motivo_de_Consulta"]) th,
  .cdpos-ficha-table tr:has([name="billing_Alergias"]) th{
    color:#fff!important;
  }
  .cdpos-ficha-table tr:has([name="billing_Motivo_de_Consulta"]) td,
  .cdpos-ficha-table tr:has([name="billing_Alergias"]) td{
    background:#7f1d1d!important;
  }
  .cdpos-ficha-table tr:has([name="billing_Motivo_de_Consulta"]) textarea,
  .cdpos-ficha-table tr:has([name="billing_Motivo_de_Consulta"]) input,
  .cdpos-ficha-table tr:has([name="billing_Alergias"]) textarea,
  .cdpos-ficha-table tr:has([name="billing_Alergias"]) input{
    background:#fff!important;
    color:#0f172a!important;
  }
}


/* POS Dental 3.18.4 - Ajustes globales y tarjetas móviles de administración */
.wptwa-container,
.wd-toolbar{
  display:none!important;
}

@media (max-width: 780px){
  .page-id-3846 main.cdpos-wrap.cdpos-dark,
  .page-id-3825 main.cdpos-wrap.cdpos-dark,
  .page-id-3872 main.cdpos-wrap.cdpos-dark,
  .page-id-3839 main.cdpos-wrap.cdpos-dark{
    padding-top:20px!important;
  }

  .cdpos-dentists-table,
  .cdpos-assistants-table,
  .cdpos-sedes-table{
    border-spacing:0 10px!important;
  }
  .cdpos-dentists-table tr,
  .cdpos-assistants-table tr,
  .cdpos-sedes-table tr{
    margin:0 0 10px!important;
    padding:12px 13px!important;
  }
  .cdpos-dentists-table td,
  .cdpos-assistants-table td,
  .cdpos-sedes-table td{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:8px!important;
    padding:3px 0!important;
    text-align:left!important;
  }
  .cdpos-dentists-table td:before,
  .cdpos-assistants-table td:before,
  .cdpos-sedes-table td:before{
    display:inline-block!important;
    min-width:72px!important;
    margin:0!important;
    color:#0f172a!important;
    font-size:11px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
    letter-spacing:.02em!important;
    flex:0 0 72px!important;
  }

  .cdpos-dentists-table td:nth-child(1):before,
  .cdpos-assistants-table td:nth-child(1):before{content:'Nombre:'!important;}
  .cdpos-dentists-table td:nth-child(2):before,
  .cdpos-assistants-table td:nth-child(2):before{content:'RUT:'!important;}
  .cdpos-dentists-table td:nth-child(3):before,
  .cdpos-assistants-table td:nth-child(3):before{content:'Email:'!important;}
  .cdpos-dentists-table td:nth-child(4),
  .cdpos-assistants-table td:nth-child(4){display:none!important;}

  .cdpos-sedes-table td:nth-child(1):before{content:'Nombre:'!important;}
  .cdpos-sedes-table td:nth-child(2):before{content:'Región:'!important;}
  .cdpos-sedes-table td:nth-child(3):before{content:'Comuna:'!important;}
  .cdpos-sedes-table td:nth-child(4):before{content:'Dirección:'!important;}
  .cdpos-sedes-table td:nth-child(5):before{content:'Box:'!important;}

  .cdpos-dentists-table td.cdpos-actions,
  .cdpos-dentists-table td:nth-child(5),
  .cdpos-assistants-table td.cdpos-actions,
  .cdpos-assistants-table td:nth-child(5),
  .cdpos-sedes-table td.cdpos-actions,
  .cdpos-sedes-table td:nth-child(6){
    display:flex!important;
    width:100%!important;
    gap:8px!important;
    margin:9px 0 0!important;
    padding:0!important;
    flex-wrap:wrap!important;
  }
  .cdpos-dentists-table td.cdpos-actions:before,
  .cdpos-dentists-table td:nth-child(5):before,
  .cdpos-assistants-table td.cdpos-actions:before,
  .cdpos-assistants-table td:nth-child(5):before,
  .cdpos-sedes-table td.cdpos-actions:before,
  .cdpos-sedes-table td:nth-child(6):before{
    display:none!important;
    content:''!important;
  }
  .cdpos-dentists-table td.cdpos-actions .cdpos-btn-mini,
  .cdpos-assistants-table td.cdpos-actions .cdpos-btn-mini,
  .cdpos-sedes-table td.cdpos-actions .cdpos-btn-mini{
    height:36px!important;
    min-height:36px!important;
    min-width:96px!important;
    padding:0 12px!important;
    font-size:12px!important;
    margin:0!important;
  }
}

/* POS Dental 4.0: análisis y control de sesión única */
.cdpos-single-session-card h1 { margin-bottom: 12px; }
.cdpos-single-session-card p { margin-bottom: 18px; }
.cdpos-analysis-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.cdpos-analysis-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cdpos-analysis-metric span { display: block; font-weight: 700; color: #4b5563; margin-bottom: 8px; }
.cdpos-analysis-metric strong { display: block; font-size: 30px; color: #0f172a; line-height: 1.1; margin-bottom: 8px; }
.cdpos-analysis-metric p { margin: 0; color: #64748b; font-size: 13px; }
.cdpos-analysis-chart-card h2 { margin: 0 0 14px; font-size: 18px; color: #0f172a; }
.cdpos-analysis-chart-card.wide { margin-top: 16px; }
.cdpos-pie-wrap { display: flex; justify-content: center; align-items: center; min-height: 180px; }
.cdpos-pie { width: 180px; height: 180px; transform: rotate(-90deg); border-radius: 50%; }
.cdpos-pie-bg { fill: none; stroke: #e5e7eb; stroke-width: 6; }
.cdpos-pie-slice { fill: none; stroke-width: 6; stroke-linecap: butt; }
.cdpos-pie-slice.slice-0 { stroke: #066fd9; }
.cdpos-pie-slice.slice-1 { stroke: #19a8e6; }
.cdpos-pie-slice.slice-2 { stroke: #16a34a; }
.cdpos-pie-slice.slice-3 { stroke: #f59e0b; }
.cdpos-pie-slice.slice-4 { stroke: #dc2626; }
.cdpos-pie-slice.slice-5 { stroke: #7c3aed; }
.cdpos-pie-slice.slice-6 { stroke: #0f766e; }
.cdpos-pie-slice.slice-7 { stroke: #475569; }
.cdpos-line-wrap { width: 100%; height: 240px; background: linear-gradient(to top, rgba(15,23,42,.06) 1px, transparent 1px); background-size: 100% 25%; border: 1px solid #e5e7eb; border-radius: 18px; padding: 12px; box-sizing: border-box; }
.cdpos-line { width: 100%; height: 100%; overflow: visible; }
.cdpos-line polyline { fill: none; stroke: #066fd9; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.cdpos-empty-chart { min-height: 140px; display: flex; align-items: center; justify-content: center; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 18px; }
.cdpos-analysis-table td:last-child, .cdpos-analysis-table th:last-child { text-align: right; }
.cdpos-analisis-tabs { margin-top: 12px; }
.cdpos-analisis-filters { align-items: end; }

@media (max-width: 900px) {
    .cdpos-analysis-grid,
    .cdpos-analysis-grid-2 { grid-template-columns: 1fr; }
    .cdpos-analysis-metric strong { font-size: 24px; }
    .cdpos-analisis-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
    .cdpos-analisis-tabs .cdpos-tab { flex: 1 1 calc(50% - 6px); text-align: center; font-size: 12px; padding: 9px 7px; }
    .cdpos-analisis-filters { display: grid !important; grid-template-columns: 1fr; gap: 10px; }
}

/* POS Dental 4.1: ajustes visuales de análisis */
.cdpos-analisis-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:12px!important;
  margin:18px 0 20px!important;
}
.cdpos-analisis-tabs .cdpos-tab{
  background:#fff!important;
  color:rgb(0,84,142)!important;
  border:1px solid rgba(0,84,142,.18)!important;
  border-radius:999px!important;
  padding:12px 18px!important;
  font-weight:800!important;
  line-height:1.1!important;
  text-decoration:none!important;
  box-shadow:0 8px 22px rgba(15,23,42,.08)!important;
}
.cdpos-analisis-tabs .cdpos-tab.is-active,
.cdpos-analisis-tabs .cdpos-tab:hover{
  background:rgb(0,84,142)!important;
  color:#fff!important;
  border-color:rgb(0,84,142)!important;
}
.cdpos-analisis-filter-card{
  margin-top:0!important;
}
.cdpos-analysis-period-note{
  margin:20px 0 14px!important;
  color:#fff!important;
  font-weight:700!important;
}
.cdpos-analysis-period-note p{
  color:#fff!important;
  margin:0 0 8px!important;
  line-height:1.45!important;
}
.cdpos-analysis-metric{
  background:#0f172a!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#fff!important;
  box-shadow:0 14px 34px rgba(2,6,23,.22)!important;
}
.cdpos-analysis-metric span,
.cdpos-analysis-metric strong,
.cdpos-analysis-metric p{
  color:#fff!important;
}
.cdpos-analysis-metric span{
  opacity:.86!important;
}
.cdpos-analysis-metric p{
  opacity:.78!important;
}
.cdpos-pie{
  width:190px!important;
  height:190px!important;
}
.cdpos-pie-bg,
.cdpos-pie-slice{
  stroke-width:26!important;
}
.cdpos-pie-bg{
  stroke:#eef2f7!important;
}
.cdpos-analysis-table tbody tr.cdpos-analysis-color-row{
  background:var(--cdpos-row-color)!important;
  color:#fff!important;
}
.cdpos-analysis-table tbody tr.cdpos-analysis-color-row td{
  color:#fff!important;
  border-color:rgba(255,255,255,.22)!important;
  font-weight:700!important;
}
.cdpos-analysis-swatch{
  display:inline-block!important;
  width:10px!important;
  height:10px!important;
  border-radius:50%!important;
  background:#fff!important;
  margin-right:8px!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.28)!important;
  vertical-align:middle!important;
}

@media (max-width: 900px){
  .cdpos-analisis-tabs{
    gap:10px!important;
    margin-bottom:20px!important;
  }
  .cdpos-analisis-tabs .cdpos-tab{
    flex:1 1 calc(50% - 10px)!important;
    padding:11px 10px!important;
    font-size:12px!important;
  }
}

/* POS Dental v4.1.2 - Iconos SVG para botones de inicio */
.cdpos-tile-icon{display:inline-flex;align-items:center;justify-content:center;width:58px;height:58px;color:#fff;}
.cdpos-tile-icon .cdpos-svg-icon{width:58px;height:58px;display:block;}
@media(max-width:780px){.cdpos-tile-icon{width:42px!important;height:42px!important;margin-bottom:10px!important;}.cdpos-tile-icon .cdpos-svg-icon{width:42px!important;height:42px!important;}}
