@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ============================================================
   PORTAL MÉDICOS — rediseño Julio 2026
   Misma estética que el Panel de Prestadores:
   DM Sans, paleta cálida, acento verde, cards con sombra suave
   ============================================================ */

#medicos-app {
    --bg: #f4f3f0;
    --surface: #fff;
    --surface2: #f9f8f6;
    --border: #d8d6d0;
    --border2: #b8b5ae;
    --text: #1a1916;
    --text2: #4a4844;
    --text3: #6e6c66;
    --accent: #1a6b4a;
    --accent-light: #e8f4ee;
    --amber: #92540a;
    --amber-light: #fef3e2;
    --red: #9b2626;
    --red-light: #fdeaea;
    --blue: #1a4a7a;
    --blue-light: #e8f0fb;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.05);

    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
    color: var(--text);
}
#medicos-app *, #medicos-app *::before, #medicos-app *::after { box-sizing: border-box; }
#medicos-app button, #medicos-app input, #medicos-app select { font-family: 'DM Sans', sans-serif; }

/* LOGIN / ACTIVACION */
#pantalla-login, #pantalla-activacion { display: flex; justify-content: center; align-items: center; min-height: 400px; }
.med-btn-link { background: none; border: none; color: var(--accent); font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 16px; text-decoration: underline; display: block; }
.med-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-md); width: 100%; max-width: 400px; }
.med-card h2 { margin: 0 0 4px; color: var(--text); font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
.med-subtitle { color: var(--text3); margin: 0 0 24px; font-size: 14px; }
.med-form-group { margin-bottom: 16px; }
.med-form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.med-form-group input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 15px; background: var(--surface2); color: var(--text); }
.med-form-group input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.med-password-wrap { position: relative; }
.med-password-wrap input { padding-right: 42px !important; }
.med-toggle-pass { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); background: none; border: none; padding: 6px 8px; font-size: 16px; line-height: 1; cursor: pointer; opacity: .6; }
.med-toggle-pass:hover { opacity: 1; }

/* BOTONES */
.med-btn-primary { width: 100%; padding: 12px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.med-btn-primary:hover { background: #155a3c; }
.med-btn-primary:disabled { background: var(--border2); border-color: var(--border2); cursor: not-allowed; }
.med-btn-logout { padding: 7px 16px; background: var(--surface); color: var(--text2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; }
.med-btn-logout:hover { background: var(--surface2); border-color: var(--text3); color: var(--text); }
.med-btn-pagar { padding: 8px 16px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-xs); font-size: 13px; font-weight: 600; cursor: pointer; }

/* HEADER */
.med-header { background: var(--surface); color: var(--text); padding: 16px 24px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; box-shadow: var(--shadow); }
.med-header-info h2 { margin: 0 0 2px; font-size: 18px; font-weight: 600; letter-spacing: -.3px; color: var(--text); }
.med-header-info span { font-size: 12px; color: var(--text3); }

/* TABS (estilo píldora, como el panel) */
.med-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: none; flex-wrap: wrap; }
.med-tab { padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text2); transition: all .15s; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.med-tab:hover { border-color: var(--border2); color: var(--text); background: var(--surface); border-radius: 20px; }
.med-tab.active { background: var(--text); color: var(--surface); border-color: var(--text); border-radius: 20px; }

/* ARCHIVOS */
.archivo-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.archivo-item .nombre { font-size: 14px; font-weight: 500; color: var(--text); }
.archivo-item .fecha { font-size: 12px; color: var(--text3); }
.archivo-item a { color: var(--accent); font-size: 13px; text-decoration: none; font-weight: 600; }

/* PLANILLAS */
.plan-container { padding: 4px 0; }
.plan-header { margin-bottom: 16px; }
.plan-header h3 { margin: 0 0 4px; color: var(--text); font-size: 18px; font-weight: 600; }
.plan-header p { margin: 0; color: var(--text3); font-size: 13px; }

.plan-filtros { display: flex; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); padding: 14px 16px; border-radius: var(--radius); margin-bottom: 16px; align-items: center; box-shadow: var(--shadow); }
.plan-filtros input[type="text"] { flex: 2; min-width: 160px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; background: var(--surface2); }
.plan-filtros input[type="text"]:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.plan-filtros select { flex: 1; min-width: 140px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; background: var(--surface2); }
.med-btn-secundario { padding: 9px 16px; background: var(--surface); color: var(--text2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; }
.med-btn-secundario:hover { background: var(--surface2); border-color: var(--text3); }

.plan-resumen { font-size: 13px; color: var(--text3); margin-bottom: 12px; }

.plan-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media(min-width:600px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width:900px) { .plan-grid { grid-template-columns: 1fr 1fr 1fr; } }

.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: flex-start; transition: all .15s; box-shadow: var(--shadow); }
.plan-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.plan-ico { flex: 0 0 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 11px; }
.plan-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.plan-titulo { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.plan-obra-chip { display: none; }
.plan-acciones { display: flex; gap: 6px; margin-top: 4px; }
.plan-btn { padding: 5px 12px; background: var(--accent); color: #fff; border-radius: var(--radius-xs); font-size: 12px; text-decoration: none; font-weight: 600; }
.plan-btn:hover { background: #155a3c; }
.plan-btn-sec { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.plan-btn-sec:hover { background: var(--border); }

/* PEDIDO DE ADELANTO */
.adelanto-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 480px; }
.adelanto-titulo { margin: 0 0 20px; font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.adelanto-container .misdatos-campo { margin-bottom: 16px; }
.adelanto-container textarea.misdatos-input { resize: vertical; min-height: 80px; font-family: inherit; }
.adelanto-aclaracion { margin: 18px 0 0; padding: 12px 14px; background: var(--amber-light); color: var(--amber); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; }

/* BUSCADOR GENERAL */
.buscador-intro { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 640px; color: var(--text2); font-size: 14px; line-height: 1.6; }
.buscador-intro p { margin: 0 0 12px; }
.buscador-intro ul { margin: 0 0 18px; padding-left: 20px; }
.buscador-intro li { margin-bottom: 4px; }

/* NOVEDADES */
.novedad-card { display: flex; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
@media (max-width: 600px) { .novedad-card { flex-direction: column; } }
.novedad-img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
@media (max-width: 600px) { .novedad-img { width: 100%; height: 160px; } }
.novedad-body { flex: 1; min-width: 0; }
.novedad-fecha { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 4px; }
.novedad-titulo { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--text); }
.novedad-contenido { font-size: 14px; color: var(--text2); line-height: 1.6; }
.novedad-contenido p { margin: 0 0 10px; }
.novedad-contenido p:last-child { margin-bottom: 0; }

/* INSTRUCTIVOS */
.inst-container { padding: 4px 0; }
.inst-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media(min-width:600px) { .inst-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width:900px) { .inst-grid { grid-template-columns: 1fr 1fr 1fr; } }

.inst-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all .15s; box-shadow: var(--shadow); }
.inst-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }

.inst-thumb { position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; background: var(--text); }
.inst-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.inst-thumb video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.inst-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; background: rgba(0,0,0,0.65); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; transition: background 0.2s; }
.inst-card:hover .inst-play { background: var(--accent); }
.inst-card-titulo { padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* MODAL VIDEO */
.inst-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.inst-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(20,18,15,0.75); }
.inst-modal-content { position: relative; z-index: 1; background: var(--text); border-radius: 14px; padding: 20px; width: 100%; max-width: 800px; }
.inst-modal-close { position: absolute; top: 12px; right: 14px; background: rgba(255,255,255,0.15); color: #fff; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.inst-modal-close:hover { background: rgba(255,255,255,0.3); }
.inst-modal-titulo { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 14px; padding-right: 40px; }
.inst-modal-video { border-radius: 8px; overflow: hidden; background: #000; min-height: 200px; }

/* FILTROS NOMENCLADORES */
.med-filtros { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.med-filtros-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.med-filtros-row input[type="text"] { flex: 2; min-width: 180px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; background: var(--surface2); }
.med-filtros-row input[type="text"]:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.med-select { flex: 1; min-width: 160px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; background: var(--surface2); cursor: pointer; color: var(--text); }
.med-select:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.med-btn-buscar { padding: 10px 20px; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.med-btn-buscar:hover { background: #155a3c; }

/* NOMENCLADORES */
.nomenclador-grupo { margin-bottom: 24px; }
.nomenclador-grupo h4 { font-size: 14px; font-weight: 600; color: var(--accent); padding: 8px 12px; background: var(--accent-light); border-radius: var(--radius-xs); margin: 0 0 8px; }
.med-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.med-tabla th { text-align: left; padding: 10px 12px; background: var(--surface2); color: var(--text3); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.med-tabla td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.med-tabla tr:hover td { background: var(--surface2); }
#medicos-app mark { background: var(--amber-light); color: var(--amber); padding: 1px 3px; border-radius: 3px; }

/* BADGES */
#medicos-app .badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
#medicos-app .badge-pendiente { background: var(--amber-light); color: var(--amber); }
#medicos-app .badge-vencido { background: var(--red-light); color: var(--red); }
#medicos-app .badge-pagado { background: var(--accent-light); color: var(--accent); }

/* MENSAJES */
.med-error { background: var(--red-light); color: var(--red); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.med-success { background: var(--accent-light); color: var(--accent); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.med-loading { text-align: center; padding: 40px; color: var(--text3); font-size: 14px; }

/* CATEGORIA BADGE */
.med-categoria-badge { display: inline-block; background: var(--amber-light); color: var(--amber); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; margin-left: 8px; vertical-align: middle; }

/* NOMENCLADORES — filtros */
.nomen-filtros { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.nomen-os-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.nomen-os-label { font-size: 12px; font-weight: 500; color: var(--text3); white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; }
.nomen-os-select { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 15px; font-weight: 500; background: var(--surface2); color: var(--text); cursor: pointer; }
.nomen-os-select:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.nomen-buscar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nomen-buscar-row input { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; background: var(--surface2); }
.nomen-buscar-row input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.nomen-obra-titulo { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding: 10px 16px; background: var(--accent-light); color: var(--accent); border-radius: var(--radius-sm); }
.nomen-tabla-wrap { overflow-x: auto; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ===== LAYOUT CON MENÚ LATERAL ===== */
/* El dashboard ocupa todo el ancho de la pantalla (breakout del contenedor de WP) */
#pantalla-dashboard {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    /* Al ocultar el banner "Portal Médicos" de la página (ver dashboard.js,
       mostrarDashboard()) se pierde el padding-top que compensaba el menú
       fijo (navbar-fixed-top). Se replica acá el mismo valor (4rem) que usa
       el resto del sitio para que el mensaje de bienvenida no quede tapado. */
    padding: 4rem 24px 0;
    box-sizing: border-box;
}
.med-layout { display: flex; gap: 20px; align-items: flex-start; }
.med-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 20px;
}
.med-sidebar .med-tab {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text2);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.med-sidebar .med-tab:hover { background: var(--surface2); color: var(--text); border-radius: var(--radius-sm); }
.med-sidebar .med-tab.active { background: var(--text); color: var(--surface); border-radius: var(--radius-sm); }
.med-tab-ico { width: 22px; text-align: center; font-size: 16px; flex-shrink: 0; }
.med-content { flex: 1; min-width: 0; }
.nomen-tabla { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); }
.nomen-tabla thead { background: var(--surface2); color: var(--text3); position: sticky; top: 0; }
.nomen-tabla th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 500; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.nomen-tabla td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text2); }
.nomen-tabla td:nth-child(3) { max-width: 280px; white-space: normal; word-break: break-word; line-height: 1.4; }
.nomen-tabla tbody tr:hover { background: var(--surface2); }
.nomen-tabla .col-total { font-weight: 700; color: var(--accent); text-align: right; }
.nomen-tabla .col-num { text-align: right; white-space: nowrap; }
.nomen-tabla .col-codigo { font-family: 'DM Mono', monospace; white-space: nowrap; }
.nomen-tabla .col-nomen { color: var(--text3); font-size: 11px; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.nomen-vacio { text-align: center; padding: 40px; color: var(--text3); }
.nomen-cargando { text-align: center; padding: 40px; color: var(--text3); }

/* BIENVENIDA */
.med-bienvenida-banner { position: relative; background: var(--accent-light); border: 1px solid #bcdccc; border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 44px 16px 20px; margin-bottom: 20px; color: var(--text2); font-size: 14px; line-height: 1.6; }
.med-bienvenida-banner strong { display: block; font-size: 16px; margin-bottom: 6px; color: var(--accent); }
.med-bienvenida-banner p { margin: 0; }
.med-bienvenida-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 20px; color: var(--accent); cursor: pointer; line-height: 1; padding: 0; opacity: 0.7; }
.med-bienvenida-close:hover { opacity: 1; }

/* MIS DATOS */
.misdatos-seccion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.misdatos-seccion-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.misdatos-seccion-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.misdatos-aviso-edicion { background: var(--accent-light); color: var(--text2); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; line-height: 1.5; margin: 0 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.med-btn-whatsapp { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; background: #25D366; color: #fff; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: opacity .15s; }
.med-btn-whatsapp:hover { opacity: .88; }
.misdatos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
@media (max-width: 600px) { .misdatos-grid { grid-template-columns: 1fr; } }
.misdatos-campo label { display: block; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 4px; }
.misdatos-valor { font-size: 15px; color: var(--text); padding: 4px 0; border-bottom: 1px solid var(--border); min-height: 28px; }
.misdatos-input { width: 100%; padding: 9px 12px; border: 1px solid var(--accent); border-radius: var(--radius-xs); font-size: 14px; background: var(--surface); }
.misdatos-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,107,74,0.12); }

/* SUBTABS MIS DATOS */
.misdatos-subtabs { display: flex; gap: 8px; border-bottom: none; margin-bottom: 20px; }
.misdatos-subtab { padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--text2); cursor: pointer; border: 1px solid var(--border); background: var(--surface); transition: all .15s; }
.misdatos-subtab.active { background: var(--text); color: var(--surface); border-color: var(--text); border-radius: 20px; }
.misdatos-subtab:hover:not(.active) { border-color: var(--border2); color: var(--text); background: var(--surface); border-radius: 20px; }
.misdatos-subcontent { }
.misdatos-subtab-desc { font-size: 13px; color: var(--text3); margin: 0 0 16px; }

/* OBRA SOCIAL */
.os-buscador { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.os-situacion-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.os-situacion-label { font-size: 13px; font-weight: 600; color: var(--text2); }
.os-seccion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.os-seccion h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 14px; }
.os-norma-item { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.os-norma-item:last-child { margin-bottom: 0; }
.os-norma-item label { font-size: 12px; font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }
.os-norma-valor { font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 10px; }
.os-vacio { color: var(--text3); font-size: 13px; margin: 0; }
.os-fila-destacada td { background: var(--accent-light) !important; font-weight: 600; }

/* MOBILE */
@media (max-width: 600px) {
    #medicos-app { padding: 10px; }
    .med-tabs { gap: 4px; }
    .med-tab { padding: 6px 10px; font-size: 11px; }
    .plan-filtros { flex-direction: column; }
    .plan-filtros input, .plan-filtros select { width: 100%; }
    .med-filtros-row { flex-direction: column; }
    .med-filtros-row input, .med-select, .med-btn-buscar { width: 100%; min-width: 100%; }
    .med-tabla { font-size: 12px; }
    .med-tabla th, .med-tabla td { padding: 8px 6px; }
    .inst-modal-content { padding: 14px; }

    /* Dashboard: cancelar el breakout 100vw en mobile (mantiene el padding-top) */
    #pantalla-dashboard { left: 0; right: 0; margin-left: 0; margin-right: 0; width: 100%; padding: 4rem 4px 0; }

    /* Menú lateral pasa a fila horizontal arriba del contenido */
    .med-layout { flex-direction: column; }
    .med-sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 8px; }
    .med-sidebar .med-tab { width: auto; flex: 1 1 auto; justify-content: center; padding: 8px 10px; font-size: 12px; }
    .med-tab-ico { width: auto; font-size: 14px; }

    /* Card layout: cada fila se convierte en una tarjeta */
    .nomen-tabla-wrap { overflow-x: visible; background: transparent; border: none; box-shadow: none; }
    .nomen-tabla, .nomen-tabla tbody { display: block; width: 100%; background: transparent; }
    .nomen-tabla thead { display: none; }
    .nomen-tabla tr {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0;
        margin-bottom: 10px;
        border: 1px solid var(--border);
        border-radius: 10px;
        overflow: hidden;
        background: var(--surface);
        box-shadow: var(--shadow);
    }
    .nomen-tabla td {
        display: flex;
        align-items: baseline;
        gap: 8px;
        padding: 7px 12px;
        border-bottom: 1px solid var(--surface2);
        font-size: 13px;
        white-space: normal;
        max-width: none;
        grid-column: 1 / -1;
    }
    .nomen-tabla td:last-child { border-bottom: none; }
    .nomen-tabla td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--text3);
        min-width: 82px;
        flex-shrink: 0;
    }
    /* Destacar la fila de Total */
    .nomen-tabla td.col-total {
        background: var(--accent-light);
        font-weight: 700;
        color: var(--accent);
        font-size: 14px;
    }
    .nomen-tabla td.col-total::before { color: var(--accent); }
    /* Ocultar columnas menos relevantes en mobile */
    .nomen-tabla td:nth-child(1),
    .nomen-tabla td:nth-child(5),
    .nomen-tabla td:nth-child(6) { display: none; }
    .nomen-tabla tbody tr:hover { background: var(--surface); }
}
