/* ==========================================================================
   NMSolutions Soporte - estilos propios
   Se cargan despues de site.css (copiado del CRM: mismas variables y componentes).
   ========================================================================== */

a.nms-kpi { text-decoration: none; color: inherit; display: block; }
a.nms-kpi:hover { border-color: var(--nms-brand); }

.nms-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.nms-grid-2-narrow { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 900px) { .nms-grid-2, .nms-grid-2-narrow { grid-template-columns: minmax(0, 1fr); } }

/* Listas del panel */
.nms-list-row {
    display: flex; align-items: center; gap: .75rem; padding: .6rem .25rem;
    border-bottom: 1px solid var(--nms-line); color: inherit; text-decoration: none;
}
.nms-list-row:last-child { border-bottom: 0; }
a.nms-list-row:hover { background: var(--nms-info-soft); }
.nms-list-row small { display: block; }
.nms-list-id { font-variant-numeric: tabular-nums; color: var(--nms-muted); min-width: 48px; font-weight: 600; }
.nms-fecha-box {
    display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 46px;
    border-radius: 10px; background: var(--nms-info-soft); color: var(--nms-brand-dark); line-height: 1.05;
}
.nms-fecha-box b { font-size: 1.15rem; }
.nms-fecha-box small { font-size: .7rem; text-transform: uppercase; }

.nms-grid-click .rz-data-row { cursor: pointer; }

/* Ticket */
.nms-ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.nms-ticket-main, .nms-ticket-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 1000px) { .nms-ticket-layout { grid-template-columns: minmax(0, 1fr); } }

.nms-mensaje { border-left: 3px solid var(--nms-line); padding: .6rem .9rem; margin: 0 0 .9rem 0; border-radius: 0 8px 8px 0; background: #fff; }
.nms-mensaje:last-child { margin-bottom: 0; }
.nms-mensaje-cliente { border-left-color: var(--nms-teal); background: var(--nms-teal-soft); }
.nms-mensaje-soporte { border-left-color: var(--nms-brand); background: var(--nms-info-soft); }
.nms-mensaje-interno { border-left-color: var(--nms-warn); background: var(--nms-warn-soft); }
.nms-mensaje-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .35rem; font-size: .9rem; }
.nms-mensaje-head .nms-muted { margin-left: auto; font-size: .8rem; }
.nms-mensaje-txt { white-space: pre-wrap; word-break: break-word; font-size: .95rem; line-height: 1.45; }
.nms-mail-preview { max-height: 180px; overflow: auto; background: var(--nms-surface); border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0 .3rem 0; }

.nms-doc { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--nms-line); color: inherit; text-decoration: none; word-break: break-all; }
.nms-doc:last-child { border-bottom: 0; }
.nms-doc:hover { color: var(--nms-brand); }
.nms-doc small { display: block; word-break: normal; }

.nms-hora-row { display: flex; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--nms-line); font-size: .9rem; }
.nms-hora-row:last-child { border-bottom: 0; }
.nms-hora-row small { display: block; }

/* Adjuntos */
.nms-adjuntador { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.nms-adjuntar-btn {
    display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; padding: .3rem .7rem; border-radius: 6px;
    border: 1px dashed #9ca3af; color: var(--nms-muted); font-size: .85rem;
}
.nms-adjuntar-btn:hover { border-color: var(--nms-brand); color: var(--nms-brand); }
.nms-chip { display: inline-flex; align-items: center; gap: .25rem; background: var(--nms-surface); border: 1px solid var(--nms-line); border-radius: 999px; padding: .15rem .3rem .15rem .6rem; font-size: .8rem; }
.nms-chip button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--nms-muted); padding: 0 .3rem; }
.nms-chip button:hover { color: var(--nms-bad); }

/* Reserva de reuniones */
.nms-dias { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.nms-dia {
    flex: 0 0 auto; width: 64px; padding: .45rem 0; border-radius: 10px; border: 1px solid var(--nms-line); background: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; line-height: 1.1; color: inherit;
}
.nms-dia small { font-size: .72rem; text-transform: uppercase; color: var(--nms-muted); }
.nms-dia b { font-size: 1.25rem; }
.nms-dia:hover { border-color: var(--nms-brand); }
.nms-dia.sel { background: var(--nms-brand); border-color: var(--nms-brand); color: #fff; }
.nms-dia.sel small { color: #e5efff; }
.nms-horarios { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.nms-horario {
    padding: .55rem 0; border-radius: 8px; border: 1px solid var(--nms-brand); background: #fff; color: var(--nms-brand);
    font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
}
.nms-horario:hover { background: var(--nms-info-soft); }
.nms-horario.sel { background: var(--nms-brand); color: #fff; }

/* Disponibilidad */
.nms-semana-row { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--nms-line); }
.nms-semana-row:last-child { border-bottom: 0; }
.nms-semana-dia { width: 120px; display: flex; gap: .4rem; align-items: center; padding-top: .3rem; }
.nms-franja { display: flex; gap: .35rem; align-items: center; margin-bottom: .3rem; }
.nms-input.nms-hora { width: 72px; text-align: center; padding: .3rem .4rem; }
.nms-reglas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }

/* Facturacion */
.nms-liq-total { font-size: 1.1rem; font-variant-numeric: tabular-nums; margin-right: .3rem; }
.nms-factura { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .88rem; }
.nms-factura th { text-align: left; font-weight: 600; color: var(--nms-muted); border-bottom: 1px solid var(--nms-line); padding: .35rem .4rem; }
.nms-factura td { border-bottom: 1px solid #f1f2f4; padding: .35rem .4rem; vertical-align: top; }
.nms-factura .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Login: registro y links */
.nms-login-alt { margin-top: 1.1rem; text-align: center; font-size: .9rem; }
.nms-login-alt p { margin: .6rem 0 0 0; font-size: .8rem; }
.nms-login-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nms-login-card .nms-link { color: var(--nms-brand); }

/* Calendario */
.nms-cal-ley { display: inline-flex; gap: .35rem; align-items: center; font-size: .8rem; color: var(--nms-muted); flex-wrap: wrap; }
.nms-cal-ley i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: .5rem; }
.nms-cal-ley i.r { background: #0a66c2; } .nms-cal-ley i.h { background: #18794e; }
.nms-cal-ley i.g { background: #e5e7eb; border: 1px solid #cbd5e1; } .nms-cal-ley i.b { background: #fdecea; border: 1px solid #f5b5ae; }
.rz-scheduler .rz-event-content { font-size: .78rem; }

/* ===== Reserva publica (estilo Calendly) ===== */
.nms-pub-wrapper { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 12px; background: var(--nms-surface); box-sizing: border-box; }
.nms-pub-wrapper .nms-login-footer a { color: var(--nms-muted); }
.nms-pub-card { width: 100%; max-width: 1060px; background: #fff; border: 1px solid var(--nms-line); border-radius: 10px; box-shadow: 0 1px 8px rgba(0,0,0,.08); overflow: hidden; }
.nms-pub-embed { background: #fff; min-height: 100vh; }
.nms-agenda { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 560px; }
.nms-agenda-info { border-right: 1px solid var(--nms-line); padding: 28px 24px; position: relative; }
.nms-agenda-info h2 { font-size: 1.45rem; margin: .4rem 0 1rem; color: #1a1a1a; }
.nms-agenda-logo { max-width: 170px; max-height: 48px; margin-bottom: 14px; display: block; }
.nms-agenda-dato { display: flex; gap: .6rem; color: #4b5563; font-weight: 600; font-size: .92rem; margin: .7rem 0; line-height: 1.35; }
.nms-agenda-dato span { width: 20px; flex: 0 0 20px; text-align: center; }
.nms-agenda-volver { position: absolute; top: 18px; left: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--nms-line); background: #fff; color: var(--nms-brand); font-size: 1.2rem; cursor: pointer; }
.nms-agenda-volver + .nms-agenda-logo { margin-top: 44px; }
.nms-agenda-main { padding: 28px 32px; min-width: 0; }
.nms-agenda-main h3 { font-size: 1.25rem; margin: 0 0 1.2rem; color: #1a1a1a; }
.nms-agenda-form { display: flex; flex-direction: column; gap: .45rem; max-width: 520px; }
.nms-agenda-form label { font-weight: 600; font-size: .9rem; margin-top: .6rem; color: #1a1a1a; }
.nms-agenda-form .nms-input { padding: .7rem .8rem; border-radius: 8px; font-size: .95rem; width: 100%; box-sizing: border-box; }
.nms-agenda-pill { align-self: flex-start; margin-top: .7rem; border: 1px solid var(--nms-brand); color: var(--nms-brand); background: #fff; border-radius: 999px; padding: .45rem 1rem; font-weight: 600; cursor: pointer; }
.nms-agenda-btn { align-self: flex-start; margin-top: 1rem; background: var(--nms-brand); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.4rem; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; display: inline-block; }
.nms-agenda-btn:disabled { opacity: .6; cursor: default; }
.nms-agenda-btn-light { background: #fff; color: var(--nms-brand); border: 1px solid var(--nms-brand); }
.nms-agenda-btn-bad { background: var(--nms-bad); }
.nms-agenda-meet { margin-top: 1.4rem; }
.nms-agenda-acciones { display: flex; gap: .6rem; flex-wrap: wrap; }
.nms-agenda-error { background: var(--nms-bad-soft); color: var(--nms-bad); border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0; font-size: .9rem; }
.nms-agenda-ok { text-align: center; padding: 2rem 1rem; }
.nms-agenda-check { width: 56px; height: 56px; border-radius: 50%; background: var(--nms-ok); color: #fff; font-size: 1.8rem; line-height: 56px; margin: 0 auto 1rem; }
.nms-agenda-resumen { display: inline-block; text-align: left; background: var(--nms-surface); border-radius: 8px; padding: .8rem 1.1rem; margin: .5rem 0 1rem; line-height: 1.8; }

.nms-sel { display: grid; grid-template-columns: minmax(280px, 400px) minmax(200px, 1fr); gap: 32px; }
.nms-sel-mes { display: flex; align-items: center; justify-content: center; gap: 2.2rem; margin-bottom: 1rem; font-size: .95rem; }
.nms-sel-nav { border: 0; background: transparent; color: var(--nms-brand); font-size: 1.6rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; line-height: 1; }
.nms-sel-nav:hover:not(:disabled) { background: var(--nms-info-soft); }
.nms-sel-nav:disabled { color: #c4c9d0; cursor: default; }
.nms-sel-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 4px; justify-items: center; }
.nms-sel-dow { font-size: .75rem; color: #4b5563; margin-bottom: 4px; }
.nms-sel-dia { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #4b5563; font-size: .95rem; cursor: default; position: relative; }
.nms-sel-dia.disp { background: #e8f1fb; color: var(--nms-brand); font-weight: 700; cursor: pointer; }
.nms-sel-dia.disp:hover { background: #d3e5f8; }
.nms-sel-dia.sel { background: var(--nms-brand); color: #fff; }
.nms-sel-dia.hoy::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.nms-sel-tz { margin-top: 1.2rem; font-size: .82rem; color: #4b5563; }
.nms-sel-fecha { margin: .3rem 0 1rem; font-size: 1rem; color: #1a1a1a; }
.nms-sel-fecha::first-letter { text-transform: uppercase; }
.nms-sel-lista { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.nms-sel-hora { width: 100%; padding: .95rem 0; border: 1px solid var(--nms-brand); border-radius: 6px; background: #fff; color: var(--nms-brand); font-weight: 700; font-size: 1rem; cursor: pointer; }
.nms-sel-hora:hover { border-width: 2px; padding: calc(.95rem - 1px) 0; }
.nms-sel-par { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nms-sel-hora.elegido { background: #666; border-color: #666; color: #fff; display: flex; align-items: center; justify-content: center; cursor: default; }
.nms-sel-sig { border: 0; border-radius: 6px; background: var(--nms-brand); color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; }

@media (max-width: 860px) {
    .nms-agenda { grid-template-columns: minmax(0, 1fr); }
    .nms-agenda-info { border-right: 0; border-bottom: 1px solid var(--nms-line); }
    .nms-sel { grid-template-columns: minmax(0, 1fr); }
    .nms-agenda-main { padding: 22px 16px; }
}

.nms-link-box { background: var(--nms-surface); border: 1px solid var(--nms-line); border-radius: 6px; padding: .5rem .7rem; margin-top: .5rem; display: flex; align-items: center; gap: .4rem; word-break: break-all; }
.nms-link-box code { font-size: .82rem; flex: 1; }
