body {
    font-size: 0.92rem;
}

.brand-link {
    white-space: normal;
}

.user-initial {
    width: 34px;
    height: 34px;
    font-weight: 700;
}

.card-tools .btn {
    margin-left: .25rem;
}

.help-box {
    border-left: 4px solid #17a2b8;
}

.item-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .5rem;
    padding: 1rem;
    margin-bottom: .75rem;
    background: #fff;
}

.item-card h5 {
    font-size: 1rem;
    margin-bottom: .35rem;
}

.item-meta {
    color: #6c757d;
    font-size: .86rem;
}

.quick-stats .small-box {
    margin-bottom: 1rem;
}

.form-control,
.custom-select,
.btn {
    border-radius: .35rem;
}

.small-box.border {
    border-radius: .75rem;
}

.small-box.border .inner {
    min-height: 90px;
}

.small-box.border .icon {
    top: 10px;
    right: 10px;
}

.small-box.border .icon > i {
    font-size: 2rem;
    top: 0;
    right: 0;
}



.module-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.module-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 118px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.module-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    border-color: rgba(0,123,255,.25);
}

.module-card-body {
    min-width: 0;
    flex: 1 1 auto;
}

.module-card-body h5 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.module-card-body p {
    margin: 0;
    color: #5f6b7a;
    line-height: 1.4;
}

.module-card-icon {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(0,123,255,.10);
    color: #0d6efd;
}

.module-card-icon i {
    font-size: 2rem;
    line-height: 1;
}

.table td, .table th {
    vertical-align: middle;
}

.preview-doc {
    white-space: pre-wrap;
    max-height: 300px;
    overflow: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: .75rem;
}

.mini-line:last-child {
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

@media (max-width: 767.98px) {
    .content-header h1 {
        font-size: 1.2rem;
    }

    .desktop-only {
        display: none !important;
    }

    .small-box .icon,
    .module-card-icon {
        display: none;
    }

    .module-card {
        min-height: 0;
        padding: .9rem;
    }

    .item-card {
        padding: .85rem;
    }
}


.portal-avatar-preview{width:96px;height:96px;object-fit:cover;border-radius:14px;}
.portal-meta-grid>div{margin-bottom:.35rem;}
.legal-preview-box{max-height:170px;overflow:auto;background:#fff;border:1px solid #dee2e6;border-radius:.35rem;padding:.75rem;font-size:.9rem;}
.portal-hero-card{border-top-width:3px;}
@media (max-width: 767.98px){.legal-preview-box{max-height:none;}.portal-avatar-preview{width:76px;height:76px;}}


.agenda-mobile-header {
    border: 1px solid rgba(0,0,0,.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
}

.agenda-mobile-title {
    font-size: 1.35rem;
    font-weight: 700;
}

.agenda-mobile-subtitle {
    color: #6c757d;
    font-size: .9rem;
}

.mobile-timeline {
    display: grid;
    gap: .85rem;
}

.mobile-turno-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: .85rem;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 1rem;
    background: #fff;
    padding: .9rem;
    box-shadow: 0 8px 18px rgba(0,0,0,.04);
}

.mobile-turno-time {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
}

.mobile-turno-time .hour {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.mobile-turno-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.mobile-turno-meta {
    color: #6c757d;
    font-size: .86rem;
    line-height: 1.35;
}

.mobile-turno-note {
    margin-top: .5rem;
    padding: .55rem .65rem;
    border-radius: .75rem;
    background: #f8f9fa;
    font-size: .85rem;
}

.mobile-turno-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .7rem;
}

.mobile-event-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .55rem 0;
    border-bottom: 1px solid #eceff4;
    font-size: .9rem;
}

.mobile-event-line:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

@media (max-width: 767.98px) {
    .mobile-turno-card {
        grid-template-columns: 1fr;
    }

    .mobile-turno-time {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .agenda-mobile-title {
        font-size: 1.15rem;
    }

    .mobile-turno-actions .btn {
        flex: 1 1 calc(50% - .35rem);
    }
}


.history-entry-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .9rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,.03);
}

.history-entry-title {
    font-size: 1rem;
    font-weight: 700;
}

.history-entry-content {
    white-space: pre-wrap;
    line-height: 1.5;
}

.history-attachment-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .85rem;
    background: #fafbfc;
    padding: .85rem;
    margin-bottom: .75rem;
}

@media (max-width: 767.98px) {
    .history-entry-card,
    .history-attachment-card {
        padding: .8rem;
        border-radius: .75rem;
    }
}


.doc-print-box{background:#fff;border:1px solid #dee2e6;border-radius:1rem;padding:1.25rem;box-shadow:0 10px 24px rgba(0,0,0,.04);}
.doc-print-header h2{font-size:1.35rem;margin-bottom:.25rem;}
.doc-print-meta{margin:.9rem 0 1rem;color:#495057;font-size:.92rem;}
.doc-print-content{line-height:1.6;font-size:.98rem;}
.signature-preview-box{border:1px dashed #adb5bd;border-radius:.85rem;min-height:120px;background:#fff;padding:1rem;display:flex;align-items:center;justify-content:center;}
.kanban-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;}
.kanban-column{background:#f8f9fa;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:.85rem;}
.kanban-column h5{font-size:.95rem;font-weight:700;}
@media (max-width: 991.98px){.kanban-grid{grid-template-columns:1fr 1fr;}}
@media (max-width: 575.98px){.kanban-grid{grid-template-columns:1fr;}}
@media print{.main-header,.main-sidebar,.content-header,.card-tools,.btn,.no-print{display:none !important;}.content-wrapper{margin-left:0 !important;}.doc-print-box{border:0;box-shadow:none;padding:0;}}


.funnel-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1rem;}
.funnel-box{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:.9rem;box-shadow:0 8px 18px rgba(0,0,0,.04);}
.funnel-box h6{font-size:.85rem;text-transform:uppercase;letter-spacing:.03em;color:#6c757d;margin-bottom:.35rem;}
.funnel-box .value{font-size:1.45rem;font-weight:700;}
.kpi-progress{height:.6rem;border-radius:999px;background:#edf2f7;overflow:hidden;}
.kpi-progress>span{display:block;height:100%;background:#17a2b8;border-radius:999px;}
.mobile-dock{position:sticky;bottom:10px;z-index:30;display:flex;gap:.5rem;overflow:auto;padding:.25rem 0;}
.mobile-dock .btn{white-space:nowrap;border-radius:999px;box-shadow:0 8px 16px rgba(0,0,0,.12);}
.mobile-board-card{border:1px solid rgba(0,0,0,.08);border-radius:1rem;background:#fff;padding:1rem;box-shadow:0 10px 18px rgba(0,0,0,.04);}
.mobile-board-time{font-size:1.25rem;font-weight:700;}
.mobile-board-actions{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.75rem;}
.whatsapp-float-btn{position:fixed;right:18px;bottom:18px;width:58px;height:58px;border-radius:50%;background:#25d366;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.8rem;box-shadow:0 12px 24px rgba(0,0,0,.22);z-index:1040;}
.whatsapp-float-btn:hover{color:#fff;text-decoration:none;transform:translateY(-2px);}
@media (max-width: 991.98px){.funnel-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 575.98px){.funnel-grid{grid-template-columns:1fr;}.mobile-board-card{padding:.85rem;}.whatsapp-float-btn{width:54px;height:54px;font-size:1.65rem;right:14px;bottom:14px;}}


.branding-preview {
    border-radius: 1rem;
    border: 1px dashed rgba(0,0,0,.15);
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0,123,255,.08), rgba(108,117,125,.06));
}

.badge-soft {
    background: rgba(0,123,255,.08);
    color: #0c63e7;
    border-radius: 999px;
    padding: .3rem .6rem;
    font-size: .78rem;
}

.payment-link-box {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .8rem;
    padding: .9rem;
    background: #fff;
}

.audit-mini {
    font-size: .86rem;
    line-height: 1.35;
}

.tele-scroll{max-height:420px;overflow:auto;}


.validation-code{font-family:monospace;letter-spacing:1px;}


.phase14-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;}
.phase14-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:1rem;box-shadow:0 10px 18px rgba(0,0,0,.04);}
.phase14-card h5{margin-bottom:.35rem;font-size:1rem;font-weight:700;}
.phase14-kpi{font-size:1.8rem;font-weight:800;line-height:1;}
.provider-badge{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.28rem .7rem;background:#eef5ff;color:#0d6efd;font-weight:600;font-size:.78rem;}
.crm-stage-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1rem;}
.crm-stage-box{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:.85rem;min-height:120px;}
.crm-stage-box h6{font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:#6c757d;margin-bottom:.4rem;}
.crm-stage-box .crm-count{font-size:1.6rem;font-weight:800;}
.export-toolbar{display:flex;flex-wrap:wrap;gap:.5rem;}
.print-sheet{background:#fff;border:1px solid #dee2e6;border-radius:1rem;padding:1.25rem;box-shadow:0 10px 24px rgba(0,0,0,.04);}
.print-sheet .sheet-title{font-size:1.35rem;font-weight:700;}
.automation-log{border-left:3px solid #17a2b8;padding-left:.75rem;margin-bottom:.85rem;}
.gateway-checkout-box{max-width:760px;margin:0 auto;background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:1.25rem;box-shadow:0 12px 26px rgba(0,0,0,.08);}
@media (max-width: 991.98px){.phase14-grid,.crm-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 575.98px){.phase14-grid,.crm-stage-grid{grid-template-columns:1fr;}}


/* Fase 15 */
.phase15-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;}
.phase15-card{background:#fff;border:1px solid #dee2e6;border-radius:12px;padding:14px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.phase15-kpi{font-size:1.35rem;font-weight:700;line-height:1.2;}


.portal-navbar {
    border-bottom: 1px solid rgba(13, 110, 253, .08);
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(12px);
}

.portal-navbar-inner {
    min-height: 74px;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-right: 1.25rem;
    padding-top: .25rem;
    padding-bottom: .25rem;
}

.portal-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13,110,253,.14) 0%, rgba(13,110,253,.06) 100%);
    color: #0d6efd;
    font-size: 1.1rem;
    box-shadow: inset 0 0 0 1px rgba(13,110,253,.08);
}

.portal-brand .brand-text {
    font-size: 1.75rem;
    letter-spacing: -.02em;
    color: #0f172a;
    white-space: nowrap;
}

.portal-main-menu-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.portal-main-menu {
    align-items: center;
    flex-wrap: nowrap;
    gap: .15rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    padding-bottom: .2rem;
}

.portal-main-menu::-webkit-scrollbar {
    height: 6px;
}

.portal-main-menu::-webkit-scrollbar-thumb {
    background: rgba(108,117,125,.25);
    border-radius: 999px;
}

.portal-menu-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 999px;
    padding: .62rem .92rem !important;
    color: #475569 !important;
    font-weight: 600;
    white-space: nowrap;
    transition: all .16s ease;
}

.portal-menu-link i {
    font-size: .92rem;
    opacity: .85;
}

.portal-menu-link:hover {
    background: #f2f7ff;
    color: #0d6efd !important;
}

.portal-menu-link.active {
    background: linear-gradient(135deg, rgba(13,110,253,.16) 0%, rgba(13,110,253,.08) 100%);
    color: #0d6efd !important;
    box-shadow: inset 0 0 0 1px rgba(13,110,253,.08);
}

.portal-user-actions {
    align-items: center;
    gap: .55rem;
    flex-wrap: nowrap;
    margin-left: 1rem;
}

.portal-user-chip {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .45rem .8rem .45rem .5rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,.08);
    max-width: 240px;
}

.portal-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #3b82f6 100%);
    color: #fff;
    flex: 0 0 32px;
}

.portal-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
    font-weight: 600;
}

.portal-action-btn,
.portal-logout-btn {
    border-radius: 999px !important;
    min-width: 92px;
    font-weight: 600;
    padding-left: .95rem !important;
    padding-right: .95rem !important;
}

.portal-logout-btn {
    color: #dc3545;
    border: 1px solid rgba(220,53,69,.35);
    background: #fff;
}

.portal-logout-btn:hover {
    background: #fff5f5;
    color: #c82333;
}

.portal-content-wrapper {
    background: #f4f6f9;
}

@media (max-width: 991.98px) {
    .portal-navbar-inner {
        min-height: 66px;
    }

    .portal-brand .brand-text {
        font-size: 1.45rem;
    }

    .portal-main-menu-wrap {
        margin-top: .75rem;
        margin-bottom: .35rem;
    }

    .portal-main-menu {
        flex-wrap: wrap;
        overflow: visible;
        gap: .3rem;
    }

    .portal-user-actions {
        margin-left: 0;
        padding-top: .5rem;
        flex-wrap: wrap;
    }

    .portal-user-chip {
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .portal-brand {
        gap: .55rem;
        margin-right: .5rem;
    }

    .portal-brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .portal-brand .brand-text {
        font-size: 1.25rem;
    }

    .portal-menu-link {
        width: 100%;
        justify-content: flex-start;
    }

    .portal-user-actions {
        align-items: stretch;
    }

    .portal-user-chip,
    .portal-action-btn,
    .portal-logout-btn {
        width: 100%;
        justify-content: center;
    }
}

.agenda-legend {display:flex;flex-wrap:wrap;gap:.75rem 1rem;align-items:center;}
.agenda-legend-item {font-size:.875rem;color:#495057;display:inline-flex;align-items:center;gap:.4rem;}
.agenda-dot {width:12px;height:12px;border-radius:50%;display:inline-block;}
.agenda-dot-purple {background:#6610f2;}
#agenda-calendar {min-height:700px;}
.fc .fc-toolbar-title {font-size:1.1rem;}
.fc .fc-button {text-transform:capitalize;}
.fc .fc-timegrid-event, .fc .fc-daygrid-event {border-radius:8px;overflow:hidden;}
.legal-preview-box {max-height:220px;overflow:auto;background:#fff;border:1px solid #dee2e6;border-radius:.35rem;padding:.75rem;}
.portal-slot-card input[type=radio] {margin-bottom:.35rem;}

.timeline-simple{display:grid;gap:.6rem;}
.timeline-simple-item{border-left:3px solid rgba(0,123,255,.2);padding-left:.75rem;}
.agenda-suggest-chip{border-radius:999px;}
.portal-day-card{border-radius:.85rem;min-height:88px;display:flex;flex-direction:column;justify-content:center;}
.portal-day-card.active,.portal-day-card:focus{border-color:#007bff;box-shadow:0 0 0 .12rem rgba(0,123,255,.15);}
.portal-slot-card{cursor:pointer;transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;}
.portal-slot-card:hover{border-color:#007bff;transform:translateY(-1px);}
.agenda-detail-wrap .badge{font-size:.82rem;}
.portal-hero-card{border-radius:1rem;overflow:hidden;}
.portal-stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;}
.portal-stat-box{background:#fff;border:1px solid #e5e7eb;border-radius:1rem;padding:1rem;text-align:center;box-shadow:0 8px 20px rgba(15,23,42,.04);}
.portal-stat-label{font-size:.78rem;text-transform:uppercase;color:#64748b;letter-spacing:.04em;}
.portal-stat-value{font-size:1.55rem;font-weight:700;color:#0f172a;line-height:1.1;}
.portal-turn-grid{display:grid;gap:1rem;}
.portal-turn-card{border-radius:1rem;box-shadow:0 8px 20px rgba(15,23,42,.04);}
.portal-turn-date{font-size:1.1rem;font-weight:700;color:#0f172a;}
.portal-turn-prof{font-size:.95rem;color:#334155;font-weight:600;}
.portal-reprog-box{border-radius:1rem;}
.portal-step-title{font-size:1rem;font-weight:700;color:#0f172a;margin-bottom:1rem;}
.js-agenda-slots-container .btn{border-radius:999px;}
@media (max-width:767.98px){.portal-stats-grid{grid-template-columns:1fr;}}

.agenda-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;}
.agenda-kpi-card{background:#fff;border:1px solid #e5e7eb;border-radius:1rem;padding:1rem;box-shadow:0 8px 20px rgba(15,23,42,.04);}
.agenda-kpi-label{font-size:.78rem;text-transform:uppercase;color:#64748b;letter-spacing:.04em;}
.agenda-kpi-value{font-size:1.55rem;font-weight:700;color:#0f172a;line-height:1.1;}
@media (max-width: 767.98px){.agenda-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}


.teleconsulta-flow-card,.teleconsulta-step-card,.teleconsulta-room-card{border-radius:1rem;overflow:hidden;box-shadow:0 8px 20px rgba(15,23,42,.04);}
.teleconsulta-action-row{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;}
.teleconsulta-action-row .btn{border-radius:999px;}
.teleconsulta-help-box,.teleconsulta-detail-box,.teleconsulta-precheck-box,.teleconsulta-wait-box,.teleconsulta-external-box,.teleconsulta-finish-box{padding:.25rem 0;}
.teleconsulta-list-item{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:1rem;border:1px solid #e5e7eb;border-radius:1rem;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.04);margin-bottom:1rem;}
.teleconsulta-check-item{border:1px solid #e5e7eb;border-radius:1rem;padding:1rem;background:#fff;height:100%;box-shadow:0 6px 18px rgba(15,23,42,.03);}
.teleconsulta-check-item.ok{border-color:rgba(40,167,69,.35);background:rgba(40,167,69,.05);}
.teleconsulta-check-item.error{border-color:rgba(220,53,69,.35);background:rgba(220,53,69,.05);}
.teleconsulta-check-item.pending{border-color:rgba(0,123,255,.2);background:rgba(0,123,255,.03);}
.teleconsulta-check-title{font-weight:700;color:#0f172a;margin-bottom:.35rem;}
.teleconsulta-check-status{font-size:.9rem;color:#475569;}
.teleconsulta-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;}
.teleconsulta-status-chip{background:#fff;border:1px solid #e5e7eb;border-radius:1rem;padding:.9rem;box-shadow:0 6px 18px rgba(15,23,42,.03);}
.teleconsulta-status-label{display:block;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#64748b;margin-bottom:.2rem;}
.teleconsulta-status-value{display:block;font-size:.95rem;font-weight:700;color:#0f172a;}
.teleconsulta-finish-icon{font-size:3rem;color:#28a745;margin-bottom:1rem;}
.teleconsulta-room-side .teleconsulta-room-block{padding-bottom:.75rem;border-bottom:1px dashed #dbe1ea;}
.teleconsulta-room-side .teleconsulta-room-block:last-child{border-bottom:0;padding-bottom:0;}
@media (max-width:767.98px){.teleconsulta-status-grid{grid-template-columns:1fr;}.teleconsulta-action-row{flex-direction:column;align-items:stretch;}.teleconsulta-action-row .btn{width:100%;}}


.agenda-teleconsulta-box{border:1px solid #e5e7eb;border-radius:1rem;padding:.85rem 1rem;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.03);}
.agenda-teleconsulta-box .badge{margin-right:.35rem;}
.portal-turn-card .btn{border-radius:999px;}
.portal-turn-card .border.rounded.bg-light{border-color:#e2e8f0!important;}
.teleconsulta-step-card .alert{border-radius:.9rem;}
.teleconsulta-flow-card .card-body p,.teleconsulta-step-card .card-body p{max-width:68rem;}

/* Imágenes con recorte previo: consultorios y profesionales */
.image-cropper-widget{display:flex;align-items:center;gap:1rem;border:1px solid #dbe3ef;border-radius:1rem;background:#fff;padding:.85rem;box-shadow:0 6px 18px rgba(15,23,42,.03)}
.image-cropper-preview{width:118px;height:118px;min-width:118px;border:1px solid #cbd5e1;border-radius:.85rem;overflow:hidden;background:#f3f6fa;display:flex;align-items:center;justify-content:center;text-align:center;color:#64748b}
.image-cropper-preview.is-wide{width:190px;min-width:190px;height:104px}
.image-cropper-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:.78rem;gap:.35rem;width:100%;height:100%}
.image-cropper-placeholder i{font-size:1.15rem;color:#64748b}
.image-cropper-preview-image{width:100%;height:100%;object-fit:cover;display:block}
.image-cropper-info{min-width:0;flex:1}
.image-cropper-info p{font-size:.82rem;color:#475569;margin:.25rem 0 .55rem}
.image-cropper-status{font-size:.78rem;color:#64748b}
.image-cropper-status.is-success{color:#198754;font-weight:600}
.image-cropper-status.is-muted{color:#64748b}
.image-cropper-stage{position:relative;height:430px;background:#111827;border-radius:1rem;overflow:hidden;touch-action:none;cursor:grab;user-select:none}
.image-cropper-stage.is-dragging{cursor:grabbing}
.image-cropper-stage-image{position:absolute;max-width:none!important;max-height:none!important;user-select:none;pointer-events:none}
.image-cropper-frame{position:absolute;left:50%;top:50%;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.48);z-index:3;pointer-events:none;border-radius:.45rem}
.consultorio-map-box{border:1px solid #dbe3ef;border-radius:1rem;background:#fff;padding:.75rem;box-shadow:0 6px 18px rgba(15,23,42,.03)}
.consultorio-map-toolbar{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:.5rem}
.consultorio-map-status{font-size:.82rem;font-weight:600;color:#0d6efd}
.consultorio-map{height:305px;border-radius:.75rem;overflow:hidden;border:1px solid #dbe3ef;background:#eef2f7}
.consultorio-thumb{width:132px;height:82px;object-fit:cover;border-radius:.75rem;border:1px solid #dbe3ef;background:#f8fafc}
.profesional-thumb{width:74px;height:74px;object-fit:cover;border-radius:.75rem;border:1px solid #dbe3ef;background:#f8fafc}
.item-card-with-image{display:flex;gap:.9rem;align-items:flex-start}
@media (max-width:767.98px){.image-cropper-widget,.item-card-with-image{flex-direction:column}.image-cropper-preview,.image-cropper-preview.is-wide{width:100%;height:170px}.consultorio-map{height:260px}}


/* Portal paciente · Solicitud de turnos pro */
.portal-appointment-card{border-radius:1rem;overflow:hidden;box-shadow:0 12px 30px rgba(15,23,42,.06)}
.portal-appointment-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;border:1px solid #e5eaf2;background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);border-radius:1rem;padding:1rem 1.15rem}
.portal-appointment-hero h2{font-size:1.65rem;font-weight:800;color:#111827}
.portal-appointment-mode .badge{border-radius:999px;font-size:.85rem}
.portal-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.portal-step{border:1px solid #e1e8f2;background:#fff;border-radius:1rem;padding:.8rem;display:flex;align-items:center;gap:.6rem;color:#64748b;box-shadow:0 6px 18px rgba(15,23,42,.035)}
.portal-step span{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#edf2f7;color:#334155;font-weight:800;flex:0 0 28px}
.portal-step strong{font-size:.9rem;color:#334155}
.portal-step.active{border-color:rgba(0,123,255,.45);box-shadow:0 0 0 .14rem rgba(0,123,255,.08)}
.portal-step.active span,.portal-step.done span{background:#007bff;color:#fff}
.portal-step.done{border-color:rgba(40,167,69,.35);background:rgba(40,167,69,.035)}
.portal-selector-card,.portal-pro-section,.portal-submit-card,.portal-selected-pro{border:1px solid #e1e8f2;border-radius:1rem;background:#fff;padding:1rem;box-shadow:0 8px 22px rgba(15,23,42,.04);overflow:hidden}
.portal-selected-pro-img{width:74px;height:74px;border-radius:1rem;object-fit:cover;border:1px solid #dbe3ef;background:#f8fafc}
.portal-selected-pro-avatar{width:74px;height:74px;border-radius:1rem;background:#edf6ff;color:#007bff;display:inline-flex;align-items:center;justify-content:center;font-size:1.7rem;border:1px solid #dbeafe}
.portal-days-calendar{border:1px solid #e9eef5;border-radius:1rem;background:linear-gradient(180deg,#fbfdff 0%,#ffffff 100%);padding:.8rem;box-shadow:inset 0 1px 0 rgba(255,255,255,.85);overflow:hidden}
.portal-days-weekdays,.portal-days-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.45rem;min-width:0}
.portal-days-weekdays{margin-bottom:.65rem;position:static;background:linear-gradient(180deg,#f5f9ff 0%,#eef5ff 100%);border:1px solid #dce8fb;border-radius:.8rem;padding:.5rem .45rem;box-shadow:0 4px 12px rgba(15,23,42,.04)}
.portal-weekday-head{text-align:center;font-size:.88rem;font-weight:700;color:#334155;letter-spacing:.01em}
.portal-days-grid{max-height:560px;overflow:auto;padding:.05rem .05rem .15rem .05rem;align-content:start}
.portal-day-placeholder{min-height:112px;border-radius:.9rem;background:transparent}
.portal-day-mini{border:1px solid #e2e8f0;background:#fff;border-radius:.95rem;text-align:center;padding:.55rem .25rem;display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:112px;text-decoration:none!important;color:#0f172a;transition:all .15s ease;box-shadow:0 3px 10px rgba(15,23,42,.03)}
.portal-day-mini .dow{font-size:.74rem;color:#64748b;font-weight:700;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin-bottom:.15rem}
.portal-day-mini .num{font-size:1.95rem;line-height:1;font-weight:800;color:#111827}
.portal-day-mini .mon{font-size:.82rem;color:#64748b;text-transform:uppercase;letter-spacing:.03em;margin-top:.18rem}
.portal-day-mini .count{font-size:.72rem;line-height:1.15;margin-top:.38rem;color:#475569}
.portal-day-mini.has-slots:hover{border-color:#007bff;transform:translateY(-1px);box-shadow:0 10px 22px rgba(0,123,255,.12)}
.portal-day-mini.active{border-color:#007bff;background:#eef6ff;box-shadow:0 0 0 .14rem rgba(0,123,255,.1),0 10px 22px rgba(0,123,255,.08)}
.portal-day-mini.disabled{opacity:.56;cursor:not-allowed;background:#f8fafc;color:#94a3b8;box-shadow:none}
.portal-slots-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;max-height:560px;overflow:auto;padding-right:.2rem}
.portal-slot-pro{position:relative;border:1px solid #dbe3ef;border-radius:1rem;background:#fff;padding:.85rem .8rem;cursor:pointer;box-shadow:0 6px 18px rgba(15,23,42,.035);transition:all .15s ease;display:block;margin:0}
.portal-slot-pro:hover{border-color:#007bff;transform:translateY(-1px)}
.portal-slot-pro input{position:absolute;opacity:0;pointer-events:none}
.portal-slot-pro:has(input:checked){border-color:#007bff;background:#eef6ff;box-shadow:0 0 0 .14rem rgba(0,123,255,.08)}
.portal-slot-pro .slot-main{display:block;font-size:1.18rem;font-weight:800;color:#0f172a}
.portal-slot-pro .slot-sub{display:block;font-size:.78rem;color:#64748b;margin-top:.15rem;line-height:1.25;word-break:break-word}
.portal-empty-availability{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px dashed #cbd5e1;border-radius:1rem;background:#f8fafc;color:#64748b;padding:1rem}
.portal-empty-availability i{font-size:2.2rem;color:#94a3b8;margin-bottom:.65rem}
.portal-summary-box{height:100%;border:1px solid #dbeafe;background:#f8fbff;border-radius:1rem;padding:1rem;color:#334155}
.portal-summary-box .summary-title{font-weight:800;color:#0f172a;margin-bottom:.6rem}
.portal-submit-btn{border-radius:999px;padding:.55rem 1.15rem;font-weight:700}
@media (max-width:1199.98px){.portal-days-grid,.portal-slots-grid{max-height:none}}
@media (max-width:991.98px){.portal-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-days-calendar{padding:.7rem}.portal-slots-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}}
@media (max-width:575.98px){.portal-appointment-hero{flex-direction:column}.portal-steps{grid-template-columns:1fr}.portal-days-calendar{padding:.55rem}.portal-days-weekdays,.portal-days-grid{gap:.38rem}.portal-weekday-head{font-size:.76rem}.portal-slots-grid{grid-template-columns:1fr}.portal-selected-pro .d-flex{align-items:flex-start!important}.portal-selected-pro-img,.portal-selected-pro-avatar{width:58px;height:58px}.portal-day-placeholder,.portal-day-mini{min-height:98px}.portal-day-mini{padding:.5rem .15rem}.portal-day-mini .dow{font-size:.66rem}.portal-day-mini .num{font-size:1.55rem}.portal-day-mini .mon{font-size:.72rem}.portal-day-mini .count{font-size:.64rem}}

/* Ajuste visual: selector de turnos con fuente reducida */
.portal-selector-card{
    padding:.85rem!important;
}
.portal-selector-card label{
    font-size:.82rem!important;
    line-height:1.15!important;
    margin-bottom:.35rem!important;
    color:#0f172a;
}
.portal-selector-card .form-group{
    margin-bottom:.55rem!important;
}
.portal-selector-card .form-control,
.portal-selector-card .custom-select,
.portal-selector-card .form-control-lg{
    font-size:.92rem!important;
    line-height:1.35!important;
    min-height:38px!important;
    height:38px!important;
    padding:.35rem .65rem!important;
    border-radius:.42rem!important;
}
.portal-selector-card select.form-control,
.portal-selector-card select.form-control-lg{
    padding-right:1.8rem!important;
}
.portal-selector-card .btn,
.portal-selector-card .btn-lg{
    min-height:38px!important;
    height:38px!important;
    padding:.38rem .65rem!important;
    font-size:.92rem!important;
    line-height:1.2!important;
    border-radius:.42rem!important;
}
.portal-selector-card .form-text{
    font-size:.75rem!important;
}
@media (max-width:991.98px){
    .portal-selector-card .form-control,
    .portal-selector-card .custom-select,
    .portal-selector-card .form-control-lg,
    .portal-selector-card .btn,
    .portal-selector-card .btn-lg{
        font-size:.9rem!important;
    }
}


/* Buscador interno para selects de pacientes */
.paciente-search-widget .paciente-search-input-group .form-control,
.paciente-search-widget select.form-control {
    font-size: .88rem;
}

.paciente-search-widget .paciente-search-hint {
    line-height: 1.25;
}

.paciente-search-widget select.form-control option[hidden] {
    display: none;
}


.card-tools .paciente-search-widget,
.form-inline .paciente-search-widget {
    min-width: 260px;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .card-tools .paciente-search-widget,
    .form-inline .paciente-search-widget {
        width: 100%;
        min-width: 0;
        margin-bottom: .5rem;
    }
}

/* Dashboard profesional personalizable */
.dashboard-pro .dashboard-hero {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
.dashboard-pro .dashboard-hero .card-body {
    background: linear-gradient(135deg, rgba(0, 123, 255, .08), rgba(23, 162, 184, .05));
}
.dashboard-pro .dash-kicker {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 800;
    color: #0b66c3;
    margin-bottom: .35rem;
}
.dashboard-pro .dash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-start;
}
.dashboard-pro .dash-kpis > [class*="col-"] {
    margin-bottom: 1rem;
}
.pro-kpi-card {
    position: relative;
    min-height: 112px;
    padding: 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
    overflow: hidden;
}
.pro-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #007bff;
}
.pro-kpi-icon {
    position: absolute;
    right: .8rem;
    top: .8rem;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 123, 255, .09);
    color: #007bff;
    font-size: 1.2rem;
}
.pro-kpi-value {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 800;
    color: #111827;
    max-width: calc(100% - 46px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pro-kpi-title {
    margin-top: .45rem;
    color: #64748b;
    font-weight: 700;
    font-size: .84rem;
}
.pro-kpi-success::before { background: #28a745; }
.pro-kpi-success .pro-kpi-icon { background: rgba(40, 167, 69, .10); color: #28a745; }
.pro-kpi-warning::before { background: #ffc107; }
.pro-kpi-warning .pro-kpi-icon { background: rgba(255, 193, 7, .16); color: #a77700; }
.pro-kpi-danger::before { background: #dc3545; }
.pro-kpi-danger .pro-kpi-icon { background: rgba(220, 53, 69, .10); color: #dc3545; }
.pro-kpi-info::before { background: #17a2b8; }
.pro-kpi-info .pro-kpi-icon { background: rgba(23, 162, 184, .10); color: #17a2b8; }
.pro-kpi-secondary::before { background: #6c757d; }
.pro-kpi-secondary .pro-kpi-icon { background: rgba(108, 117, 125, .12); color: #6c757d; }
.pro-kpi-navy::before { background: #001f3f; }
.pro-kpi-navy .pro-kpi-icon { background: rgba(0, 31, 63, .10); color: #001f3f; }
.pro-kpi-fuchsia::before { background: #f012be; }
.pro-kpi-fuchsia .pro-kpi-icon { background: rgba(240, 18, 190, .10); color: #f012be; }
.pro-kpi-purple::before { background: #605ca8; }
.pro-kpi-purple .pro-kpi-icon { background: rgba(96, 92, 168, .10); color: #605ca8; }
.pro-kpi-indigo::before { background: #6610f2; }
.pro-kpi-indigo .pro-kpi-icon { background: rgba(102, 16, 242, .10); color: #6610f2; }
.pro-kpi-pink::before { background: #e83e8c; }
.pro-kpi-pink .pro-kpi-icon { background: rgba(232, 62, 140, .10); color: #e83e8c; }
.pro-kpi-orange::before { background: #fd7e14; }
.pro-kpi-orange .pro-kpi-icon { background: rgba(253, 126, 20, .12); color: #fd7e14; }
.dashboard-pro .dash-panel {
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.dashboard-pro .dash-panel .card-header {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    background: #fff;
}
.dash-list-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    margin-bottom: .65rem;
    background: #fff;
}
.dash-list-item:last-child { margin-bottom: 0; }
.dash-list-item.compact { padding: .65rem; }
.dash-list-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    background: rgba(0, 123, 255, .09);
    color: #007bff;
}
.dash-list-icon-pink {
    background: rgba(232, 62, 140, .10);
    color: #e83e8c;
}
.dash-list-body {
    min-width: 0;
    flex: 1 1 auto;
}
.dash-list-body strong {
    color: #111827;
    display: block;
    line-height: 1.2;
}
.dash-list-meta {
    color: #64748b;
    font-size: .82rem;
    line-height: 1.35;
    margin-top: .2rem;
}
.dash-list-state {
    flex: 0 0 auto;
    margin-left: .35rem;
}
.dash-empty {
    min-height: 74px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
    padding: 1rem;
}
.dash-empty i { color: #28a745; font-size: 1.2rem; }
.dash-shortcuts {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
}
.dash-shortcut-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border-radius: 14px;
    border: 1px solid #edf2f7;
    color: #111827;
    background: #fff;
    transition: all .15s ease-in-out;
}
.dash-shortcut-card:hover {
    color: #0056b3;
    border-color: rgba(0, 123, 255, .25);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
    transform: translateY(-1px);
    text-decoration: none;
}
.dash-shortcut-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: rgba(0, 123, 255, .08);
    color: #007bff;
    font-size: 1.15rem;
}
.dash-shortcut-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.dash-shortcut-text small {
    color: #64748b;
    line-height: 1.2;
}
.dash-account-state {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    color: #475569;
}
.dash-account-state strong {
    font-size: 1.05rem;
    color: #111827;
}
.dash-modal-title {
    font-weight: 800;
    color: #111827;
    padding-bottom: .45rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: .65rem;
}
.dash-check {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    padding: .65rem;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    margin-bottom: .55rem;
    cursor: pointer;
    background: #fff;
}
.dash-check:hover { background: #f8fafc; }
.dash-check input { margin-top: .15rem; }
.dash-check span { display: flex; flex-direction: column; line-height: 1.2; }
.dash-check small { color: #64748b; margin-top: .15rem; font-weight: 400; }
@media (max-width: 767.98px) {
    .dashboard-pro .dashboard-hero h2 { font-size: 1.35rem; }
    .dashboard-pro .dash-hero-actions .btn { width: 100%; }
    .pro-kpi-card { min-height: 104px; padding: .85rem; }
    .pro-kpi-value { font-size: 1.45rem; }
    .dash-list-item { flex-wrap: wrap; }
    .dash-list-state { margin-left: 0; width: 100%; }
}

/* Google Login - Portal paciente */
.btn-google {
    background: #fff;
    border: 1px solid #d8dee6;
    color: #2f3640;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.btn-google:hover,
.btn-google:focus {
    background: #f8fafc;
    color: #111827;
    border-color: #cbd5e1;
}
.google-auth-separator {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #6b7280;
    font-size: .82rem;
    font-weight: 600;
}
.google-auth-separator:before,
.google-auth-separator:after {
    content: '';
    height: 1px;
    background: #e5e7eb;
    flex: 1;
}
.google-confirm-box {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px;
}
.google-confirm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.login-brand-logo {
    max-width: 92px;
    max-height: 92px;
    object-fit: contain;
}

.app-sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
    vertical-align: middle;
}

.portal-brand-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

/* FASE 4 - Portal paciente: dashboard orientado al paciente */
.patient-home .card{border-radius:16px;overflow:hidden}
.patient-hero{background:linear-gradient(135deg,#ffffff 0%,#eef6ff 100%);border:1px solid #dbeafe!important}
.patient-eyebrow{font-size:.78rem;font-weight:700;color:#0d6efd;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.35rem}
.patient-profile-box{background:#fff;border:1px solid #d7e3f3;border-radius:14px;padding:14px 16px;box-shadow:0 6px 18px rgba(13,110,253,.07)}
.patient-profile-title{font-weight:700;color:#10223b;margin-bottom:.3rem}
.patient-summary-row>[class*="col-"]{margin-bottom:.75rem}
.patient-summary-card{display:flex;align-items:center;gap:.75rem;min-height:92px;padding:14px;border-radius:16px;background:#fff;border:1px solid #e0e7f0;color:#172b4d;text-decoration:none;box-shadow:0 4px 14px rgba(15,23,42,.05);transition:.15s ease}
.patient-summary-card:hover{transform:translateY(-2px);text-decoration:none;color:#0d6efd;border-color:#b8d4ff;box-shadow:0 8px 20px rgba(15,23,42,.08)}
.patient-summary-icon{width:40px;height:40px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#eef6ff;color:#0d6efd;font-size:1.05rem;flex:0 0 40px}
.patient-summary-card strong{font-size:1.55rem;line-height:1;display:block;color:#10223b}
.patient-summary-card small{display:block;color:#667085;font-weight:600;margin-top:.2rem}
.patient-card-primary{border:1px solid #dbeafe;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.patient-card-primary .card-header{background:#fff;border-bottom:1px solid #e8eef7}
.patient-empty-state{text-align:center;padding:26px 10px;color:#667085}
.patient-empty-state i{font-size:2.1rem;color:#0d6efd;margin-bottom:.7rem}
.patient-empty-state h5{color:#10223b;font-weight:700;margin-bottom:.25rem}
.patient-next-appointment{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}
.patient-date-box{width:86px;min-height:74px;border-radius:16px;background:#0d6efd;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 8px 18px rgba(13,110,253,.24)}
.patient-date-box span{font-size:.78rem;font-weight:700;opacity:.9}.patient-date-box strong{font-size:1.4rem;line-height:1.1}
.patient-next-appointment h4{font-size:1.1rem;font-weight:800;margin-bottom:.25rem;color:#10223b}
.patient-activity-list{display:flex;flex-direction:column}.patient-activity-item{display:flex;gap:.75rem;padding:13px 16px;border-bottom:1px solid #edf2f7;color:#172b4d;text-decoration:none;align-items:center}.patient-activity-item:last-child{border-bottom:0}.patient-activity-item:hover{background:#f8fbff;text-decoration:none;color:#0d6efd}.patient-activity-item i{width:34px;height:34px;border-radius:12px;background:#f1f5f9;color:#0d6efd;display:flex;align-items:center;justify-content:center}.patient-activity-item strong{display:block;font-size:.92rem}.patient-activity-item small{display:block;color:#667085}
.patient-actions-card .card-header{background:#fff}.patient-action-link{display:flex;align-items:center;gap:.7rem;width:100%;padding:11px 12px;border:1px solid #e3eaf3;border-radius:13px;margin-bottom:.6rem;color:#172b4d;background:#fff;text-decoration:none;font-weight:700}.patient-action-link:hover{text-decoration:none;border-color:#b8d4ff;color:#0d6efd;background:#f8fbff}.patient-action-link.primary{background:#0d6efd;color:#fff;border-color:#0d6efd}.patient-action-link.primary:hover{color:#fff;background:#0b5ed7}.patient-action-link i{width:24px;text-align:center}
.patient-mini-stat{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf2f7;padding:.55rem 0;color:#667085}.patient-mini-stat:last-child{border-bottom:0}.patient-mini-stat strong{font-size:1.25rem;color:#10223b}
@media (max-width:767.98px){.patient-hero .card-body{padding:1rem}.patient-summary-card{min-height:82px;padding:12px}.patient-summary-card strong{font-size:1.25rem}.patient-summary-icon{width:34px;height:34px;border-radius:12px;flex-basis:34px}.patient-next-appointment{align-items:flex-start}.patient-date-box{width:76px;min-height:64px}.patient-next-appointment .text-right{text-align:left!important;width:100%;margin-left:92px}}

/* Fase 5 - Ajuste visual general del portal del paciente */
.portal-content-wrapper .container{max-width:1180px;}
.portal-content-wrapper .content{padding-bottom:1.75rem;}
.portal-form-card,.patient-card-primary,.patient-actions-card,.portal-turn-card,.card.card-outline{border-radius:16px;overflow:hidden;box-shadow:0 8px 22px rgba(15,23,42,.045);border-color:#e2e8f0;}
.portal-form-card .card-header,.card.card-outline>.card-header{background:#fff;border-bottom:1px solid #edf2f7;padding:.72rem 1rem;}
.portal-form-card .card-title,.card.card-outline .card-title{font-size:.96rem;font-weight:800;color:#10223b;}
.portal-form-card .card-body{padding:1rem;}
.portal-form-card h5,.portal-section-title{font-size:.9rem;font-weight:800;color:#10223b;margin:.35rem 0 .75rem;display:flex;align-items:center;gap:.45rem;}
.portal-form-card h5:before,.portal-section-title:before{content:"";width:7px;height:22px;border-radius:999px;background:#0d6efd;display:inline-block;}
.portal-form-card label,.portal-compact-form label,.portal-content-wrapper label{font-size:.78rem;font-weight:700;color:#475569;margin-bottom:.25rem;}
.portal-content-wrapper .form-control,.portal-content-wrapper .custom-select{border-radius:10px;border-color:#dbe3ef;font-size:.88rem;}
.portal-content-wrapper .form-control-sm,.portal-content-wrapper .custom-select-sm{height:calc(1.65em + .5rem + 2px);padding:.25rem .55rem;font-size:.84rem;}
.portal-content-wrapper .form-control:focus,.portal-content-wrapper .custom-select:focus{border-color:#93c5fd;box-shadow:0 0 0 .14rem rgba(13,110,253,.12);}
.portal-content-wrapper input[readonly],.portal-content-wrapper textarea[readonly]{background:#f8fafc;color:#64748b;}
.portal-content-wrapper .btn-sm{border-radius:999px;font-weight:700;padding:.35rem .82rem;}
.portal-content-wrapper .alert{border-radius:13px;}
.portal-content-wrapper .table{font-size:.86rem;}
.portal-content-wrapper .table thead th{background:#f8fafc;color:#475569;border-bottom-width:1px;font-size:.78rem;text-transform:uppercase;letter-spacing:.025em;}
.portal-content-wrapper .badge{border-radius:999px;padding:.36em .6em;}
.portal-dropdown-menu{border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 12px 28px rgba(15,23,42,.12);padding:.45rem;min-width:250px;}
.portal-dropdown-menu .dropdown-item{border-radius:10px;padding:.55rem .7rem;font-size:.9rem;font-weight:650;color:#334155;}
.portal-dropdown-menu .dropdown-item:hover,.portal-dropdown-menu .dropdown-item.active{background:#eef6ff;color:#0d6efd;}
.portal-navbar-toggler{border-radius:12px;border-color:#dbe3ef;padding:.35rem .55rem;}
.portal-main-menu{max-width:100%;}
.portal-menu-link{font-size:.91rem;}
.portal-brand-logo-img{max-width:28px;max-height:28px;object-fit:contain;}
.portal-user-chip{transition:.16s ease;}
.portal-user-chip:hover{background:#eef6ff;border-color:#bfd7ff;}
.patient-home .card-header h3,.patient-home .card-title{font-size:.97rem;font-weight:800;}
.patient-action-link{font-size:.9rem;}
.patient-empty-state{border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;}
@media (min-width:992px){.portal-main-menu-wrap{display:flex;align-items:center;}.portal-main-menu{overflow:visible;}.portal-navbar-inner{min-height:68px;}.portal-menu-link{padding:.52rem .76rem!important;}.portal-brand .brand-text{font-size:1.42rem;}.portal-user-chip{max-width:205px;}}
@media (max-width:991.98px){.portal-navbar{position:sticky;top:0;z-index:1030;}.portal-main-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem;}.portal-main-menu .nav-item{width:100%;}.portal-main-menu .dropdown-menu{position:static!important;float:none;transform:none!important;margin-top:.35rem;width:100%;}.portal-menu-link{width:100%;justify-content:flex-start;background:#f8fafc;border:1px solid #e8eef7;}.portal-user-actions{border-top:1px solid #edf2f7;margin-top:.65rem;}.portal-content-wrapper .container{max-width:100%;}}
@media (max-width:575.98px){.portal-content-wrapper .content{padding-top:.7rem!important;}.portal-form-card .card-body{padding:.85rem;}.portal-content-wrapper .table-responsive{border:1px solid #edf2f7;border-radius:12px;}.portal-main-menu{grid-template-columns:1fr;}.patient-summary-row>[class*="col-"]{margin-bottom:.5rem;}.patient-summary-card{border-radius:14px;}.patient-hero .btn{width:100%;margin-bottom:.35rem;}}


/* =========================================================
   Portal Paciente Fases 6 a 12 - UX mobile, notificaciones,
   documentos, seguridad y PWA
   ========================================================= */
.portal-menu-badge{position:absolute;top:2px;right:2px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#dc3545;color:#fff;font-size:10px;line-height:18px;text-align:center;font-style:normal;font-weight:700}.portal-menu-link{position:relative}.portal-notification-dropdown{min-width:340px;max-width:420px}.portal-notification-mini{display:flex;gap:10px;white-space:normal}.portal-notification-mini-icon{width:30px;height:30px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#eef6ff;color:#0d6efd;flex:0 0 30px}.portal-mobile-bottom-nav{display:none}.portal-page-hero{border:0;border-radius:18px;box-shadow:0 8px 28px rgba(15,23,42,.08)}.portal-soft-card{border:1px solid #e9eef5;border-radius:18px;box-shadow:0 4px 18px rgba(15,23,42,.05)}.portal-filter-card{border-radius:16px;background:#fff;border:1px solid #e9eef5;padding:14px}.portal-chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;background:#eef6ff;color:#0d6efd;font-size:12px;font-weight:700}.portal-timeline{position:relative;padding-left:0}.portal-timeline-item{display:flex;gap:12px;padding:14px;border-bottom:1px solid #edf2f7}.portal-timeline-item:last-child{border-bottom:0}.portal-timeline-icon{width:42px;height:42px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#eef6ff;color:#0d6efd;flex:0 0 42px}.portal-timeline-item.unread{background:#f8fbff}.portal-timeline-title{font-weight:700;color:#111827}.portal-timeline-meta{font-size:12px;color:#6b7280}.portal-doc-card{border:1px solid #e5e7eb;border-radius:16px;padding:14px;height:100%;background:#fff;transition:.15s ease}.portal-doc-card:hover{box-shadow:0 8px 24px rgba(15,23,42,.08);transform:translateY(-1px)}.portal-doc-icon{width:44px;height:44px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#f1f5f9;color:#0f172a}.portal-security-device{border:1px solid #e5e7eb;border-radius:16px;padding:14px;background:#fff}.portal-preference-toggle{border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#fff}.portal-install-banner{display:none;border-radius:18px;background:#0d6efd;color:#fff;padding:12px 14px;margin-bottom:14px}.portal-install-banner.show{display:flex;align-items:center;justify-content:space-between;gap:12px}.portal-install-banner .btn{background:#fff;color:#0d6efd;border:0}.portal-wellbeing-item{border:1px solid #e5e7eb;border-radius:16px;padding:12px;background:#fff;margin-bottom:10px}.portal-bottom-spacer{height:0}
@media (max-width: 991.98px){.portal-navbar .navbar-collapse{position:fixed;top:60px;left:12px;right:12px;background:#fff;border-radius:18px;box-shadow:0 16px 48px rgba(15,23,42,.18);padding:12px;z-index:1030}.portal-main-menu .nav-item{width:100%}.portal-menu-link{border-radius:12px;padding:.65rem .85rem!important}.portal-user-actions{border-top:1px solid #edf2f7;margin-top:8px;padding-top:8px}.portal-content-wrapper .container{padding-bottom:82px}.portal-mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;height:66px;background:#fff;border-top:1px solid #e5e7eb;display:grid;grid-template-columns:repeat(5,1fr);z-index:1040;box-shadow:0 -8px 24px rgba(15,23,42,.08)}.portal-mobile-bottom-nav a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;color:#64748b;text-decoration:none;font-weight:700}.portal-mobile-bottom-nav a i{font-size:18px;margin-bottom:3px}.portal-mobile-bottom-nav a.active{color:#0d6efd}.portal-mobile-bottom-nav a em{position:absolute;top:6px;right:22%;background:#dc3545;color:#fff;border-radius:999px;font-size:9px;min-width:17px;height:17px;line-height:17px;font-style:normal}.portal-filter-card .form-control,.portal-filter-card .custom-select{font-size:14px;height:36px}.portal-notification-dropdown{min-width:calc(100vw - 32px)}}
@media (max-width: 575.98px){.portal-page-hero .card-body{padding:1rem}.portal-soft-card .card-body{padding:1rem}.portal-doc-card{padding:12px}.portal-timeline-item{padding:12px 10px}.portal-timeline-icon{width:36px;height:36px;border-radius:14px;flex-basis:36px}.btn{white-space:normal}.portal-install-banner{font-size:13px}}


/* Fase 13 - contenido compartido y PWA mobile */
.portal-shared-card { border-radius: 18px; border: 1px solid rgba(15,23,42,.08); box-shadow: 0 12px 30px rgba(15,23,42,.05); }
.portal-shared-card .portal-shared-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.portal-content-hero { border-radius: 20px; overflow: hidden; }
.portal-pwa-install-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1080; background: #0d6efd; color: #fff; border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 14px 40px rgba(13,110,253,.28); }
.portal-pwa-install-text { display: flex; flex-direction: column; line-height: 1.25; }
.portal-pwa-install-text span { font-size: .86rem; opacity: .92; }
.portal-pwa-install-actions { display: flex; align-items: center; gap: 8px; }
.portal-pwa-install-actions .btn-link { color: #fff; text-decoration: none; }
@media (min-width: 1025px) { .portal-pwa-install-banner { display: none !important; } }
@media (max-width: 575.98px) {
    .portal-pwa-install-banner { flex-direction: column; align-items: stretch; }
    .portal-pwa-install-actions { justify-content: space-between; }
    .portal-shared-card { border-radius: 14px; }
}
