/* ============================================================
   Portal del Medico - Hospital Las Colinas
   Sistema de diseno premium: depth, refinamiento, polish.
   ============================================================ */

:root {
    /* Brand — aligned to Hospital Las Colinas (navy + green) */
    --doc-brand-1: #262161;
    --doc-brand-2: #5da334;
    --doc-brand-3: #6fb43f;
    --doc-grad-brand: linear-gradient(135deg, #18154f 0%, #262161 55%, #322b80 100%);
    --doc-grad-brand-soft: linear-gradient(135deg, #eef6e7 0%, #f3eee6 100%);

    /* Semantic */
    --doc-success: #5da334;
    --doc-success-soft: #e2efd5;
    --doc-warning: #b45309;
    --doc-warning-soft: #fef3c7;
    --doc-danger: #b91c1c;
    --doc-danger-soft: #fee2e2;
    --doc-info: #262161;
    --doc-info-soft: #e6e3f2;
    --doc-violet: #6d28d9;
    --doc-violet-soft: #ede9fe;

    /* Neutrals — warm family */
    --doc-text: #1c1a17;
    --doc-text-2: #2b2823;
    --doc-muted: #6f6d68;
    --doc-muted-2: #a8a39a;
    --doc-line: rgba(38, 33, 97, .08);
    --doc-line-2: rgba(38, 33, 97, .14);
    --doc-bg: #fbfaf7;
    --doc-surface: #ffffff;
    --doc-surface-2: #fdfbf7;

    /* Depth — navy-tinted */
    --doc-shadow-xs: 0 1px 2px rgba(38, 33, 97, .04);
    --doc-shadow-sm: 0 2px 6px -2px rgba(38, 33, 97, .08), 0 4px 12px -6px rgba(38, 33, 97, .05);
    --doc-shadow-md: 0 4px 12px -4px rgba(38, 33, 97, .08), 0 12px 28px -12px rgba(38, 33, 97, .10);
    --doc-shadow-lg: 0 12px 32px -10px rgba(38, 33, 97, .14), 0 22px 48px -22px rgba(38, 33, 97, .20);
    --doc-shadow-brand: 0 16px 36px -16px rgba(38, 33, 97, .42);

    /* Radius */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 22px;
    --r-2xl: 28px;

    /* Type */
    --font-display: "Outfit", "Plus Jakarta Sans", 'Inter', system-ui, sans-serif;
}

.doctor-portal-page {
    background:
        radial-gradient(1100px 600px at -10% -20%, rgba(38, 33, 97, .07), transparent 60%),
        radial-gradient(900px 600px at 110% 0%, rgba(30, 64, 175, .06), transparent 55%),
        var(--doc-bg);
    color: var(--doc-text);
    position: relative;
}

.doctor-portal-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(38, 33, 97, .04) 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at top, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at top, #000 30%, transparent 80%);
}

.doctor-portal-page>* {
    position: relative;
    z-index: 1;
}

/* El skip-link de accesibilidad debe permanecer fixed y fuera de pantalla
   hasta recibir foco. La regla `.doctor-portal-page > *` de arriba le imponía
   position:relative, dejándolo visible y cortado en la esquina superior. */
.doctor-portal-page>.skip-link {
    position: fixed;
    z-index: 100;
}

/* Topbar aislado: alinear su contenido con el ancho del shell del médico. */
.doctor-portal-page .portal-topbar-inner {
    max-width: 1380px;
}

/* ── SHELL ─────────────────────────────────────────────────── */
.doctor-shell {
    max-width: 1380px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
}

.doctor-shell-app {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.doctor-shell-auth {
    display: flex;
    justify-content: center;
}

.doctor-main {
    min-width: 0;
}

@media (max-width: 1020px) {
    .doctor-shell-app {
        grid-template-columns: 1fr;
    }

    .doctor-sidebar {
        position: static !important;
    }
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.doctor-sidebar {
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-xl);
    padding: 0;
    box-shadow: var(--doc-shadow-sm);
    position: sticky;
    top: 1.5rem;
    overflow: hidden;
}

.doctor-sidebar::before {
    content: '';
    display: block;
    height: 6px;
    background: var(--doc-grad-brand);
}

.doctor-profile {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 1.1rem 1.1rem 1rem;
    border-bottom: 1px solid var(--doc-line);
    position: relative;
}

.doctor-profile::after {
    content: '';
    position: absolute;
    inset-inline: 1.1rem;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--doc-line-2), transparent);
}

.doctor-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--doc-grad-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: .02em;
    box-shadow: var(--doc-shadow-brand);
    flex-shrink: 0;
    font-family: var(--font-display);
}

.doctor-avatar::after {
    content: '';
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #6fb43f;
    border: 2.5px solid var(--doc-surface);
    box-shadow: 0 0 0 2px rgba(111, 180, 63, .15);
}

.doctor-profile-text {
    min-width: 0;
}

.doctor-greeting {
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--doc-muted);
    font-weight: 800;
    margin: 0;
}

.doctor-name {
    font-size: .96rem;
    font-weight: 700;
    color: var(--doc-text);
    margin: .1rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-family: var(--font-display);
}

.doctor-specialty {
    font-size: .72rem;
    color: var(--doc-muted-2);
    margin: .15rem 0 0;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

.doctor-nav {
    display: grid;
    gap: .15rem;
    padding: .75rem .75rem 1rem;
}

.doctor-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .8rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--doc-muted);
    text-decoration: none;
    transition: background .18s, color .18s, transform .15s;
    position: relative;
}

.doctor-nav-link i {
    color: var(--doc-muted-2);
    transition: color .18s;
}

.doctor-nav-link:hover {
    background: var(--doc-surface-2);
    color: var(--doc-text);
}

.doctor-nav-link:hover i {
    color: var(--doc-brand-1);
}

.doctor-nav-link.is-active {
    background: var(--doc-grad-brand);
    color: #fff;
    box-shadow: 0 8px 24px -10px rgba(38, 33, 97, .55);
}

.doctor-nav-link.is-active i {
    color: #fff;
}

.doctor-nav-link.is-active::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #fff;
    margin-left: auto;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.doctor-nav-logout {
    margin-top: .4rem;
    color: #b91c1c;
}

.doctor-nav-logout i {
    color: #ef4444;
}

.doctor-nav-logout:hover {
    background: var(--doc-danger-soft);
    color: #991b1b;
}

.doctor-nav-logout:hover i {
    color: #b91c1c;
}

.doctor-sidebar-foot {
    padding: .85rem 1.1rem;
    border-top: 1px solid var(--doc-line);
    background: var(--doc-surface-2);
    font-size: .72rem;
    color: var(--doc-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.doctor-sidebar-foot i {
    color: var(--doc-success);
}

/* ── HEADER ────────────────────────────────────────────────── */
.doctor-header {
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-top: .25rem;
}

.doctor-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--doc-muted);
    font-weight: 800;
    margin: 0 0 .25rem;
}

.doctor-eyebrow::before {
    content: '';
    width: 8px;
    height: 2px;
    background: var(--doc-grad-brand);
    border-radius: 2px;
}

.doctor-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2.6vw, 2.4rem);
    font-weight: 800;
    color: var(--doc-text);
    line-height: 1.1;
    margin: 0;
    letter-spacing: -.02em;
}

.doctor-subtitle {
    color: var(--doc-muted);
    font-size: .95rem;
    margin: .45rem 0 0;
    max-width: 580px;
}

.doctor-header-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.doctor-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, background .18s, border-color .18s;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.doctor-btn-primary {
    background: var(--doc-grad-brand);
    color: #fff;
    box-shadow: var(--doc-shadow-brand);
}

.doctor-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 44px -16px rgba(38, 33, 97, .55);
}

.doctor-btn-outline {
    background: #fff;
    color: var(--doc-text-2);
    border-color: var(--doc-line-2);
    box-shadow: var(--doc-shadow-xs);
}

.doctor-btn-outline:hover {
    background: var(--doc-surface-2);
    border-color: var(--doc-brand-1);
    color: var(--doc-brand-1);
}

.doctor-btn-ghost {
    background: transparent;
    color: var(--doc-muted);
}

.doctor-btn-ghost:hover {
    background: var(--doc-surface-2);
    color: var(--doc-text);
}

/* ── KPI CARDS ─────────────────────────────────────────────── */
.doctor-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.doctor-kpi {
    position: relative;
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.3rem;
    box-shadow: var(--doc-shadow-sm);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    overflow: hidden;
}

.doctor-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--doc-grad-brand);
    opacity: 0;
    transition: opacity .2s;
}

.doctor-kpi:hover {
    transform: translateY(-3px);
    box-shadow: var(--doc-shadow-md);
}

.doctor-kpi:hover::before {
    opacity: 1;
}

.doctor-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .6rem;
}

.doctor-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doctor-kpi-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--doc-muted);
    font-weight: 800;
    margin: 0;
}

.doctor-kpi-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
    line-height: 1;
    letter-spacing: -.02em;
}

.doctor-kpi-foot {
    margin-top: .55rem;
    font-size: .76rem;
    color: var(--doc-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.doctor-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

.doctor-kpi-trend-up {
    background: var(--doc-success-soft);
    color: var(--doc-success);
}

.doctor-kpi-trend-down {
    background: var(--doc-danger-soft);
    color: var(--doc-danger);
}

.doctor-kpi-trend-flat {
    background: #ece5da;
    color: var(--doc-muted);
}

.doctor-kpi-blue .doctor-kpi-icon {
    background: var(--doc-info-soft);
    color: var(--doc-info);
}

.doctor-kpi-amber .doctor-kpi-icon {
    background: var(--doc-warning-soft);
    color: var(--doc-warning);
}

.doctor-kpi-green .doctor-kpi-icon {
    background: var(--doc-success-soft);
    color: var(--doc-success);
}

.doctor-kpi-violet .doctor-kpi-icon {
    background: var(--doc-violet-soft);
    color: var(--doc-violet);
}

/* ── CARDS ─────────────────────────────────────────────────── */
.doctor-card {
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-lg);
    box-shadow: var(--doc-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.doctor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--doc-line);
    background: linear-gradient(180deg, var(--doc-surface), var(--doc-surface-2));
}

.doctor-card-header h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .55rem;
    letter-spacing: -.01em;
}

.doctor-card-header h2 i {
    color: var(--doc-brand-1);
    background: var(--doc-grad-brand-soft);
    padding: 6px;
    border-radius: 8px;
    width: 28px;
    height: 28px;
}

.doctor-text-link {
    color: var(--doc-brand-1);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.doctor-text-link:hover {
    color: var(--doc-brand-3);
}

.doctor-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1100px) {
    .doctor-grid-2 {
        grid-template-columns: 1fr;
    }
}

.doctor-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.doctor-quick {
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-lg);
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    box-shadow: var(--doc-shadow-sm);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    color: var(--doc-text);
    position: relative;
    overflow: hidden;
}

.doctor-quick::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(38, 33, 97, .04));
    pointer-events: none;
    transition: opacity .2s;
    opacity: 0;
}

.doctor-quick:hover {
    transform: translateY(-3px);
    box-shadow: var(--doc-shadow-md);
    border-color: rgba(38, 33, 97, .35);
}

.doctor-quick:hover::after {
    opacity: 1;
}

.doctor-quick i {
    color: var(--doc-brand-1);
    background: var(--doc-grad-brand-soft);
    width: 46px;
    height: 46px;
    border-radius: 13px;
    padding: 11px;
    flex-shrink: 0;
}

.doctor-quick h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
}

.doctor-quick p {
    font-size: .82rem;
    color: var(--doc-muted);
    margin: .2rem 0 0;
}

/* ── CALENDAR ───────────────────────────────────────────────── */
#doctor-calendar,
#doctor-agenda {
    padding: .75rem 1rem 1rem;
    min-height: 480px;
}

.doctor-calendar-legend {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--doc-line);
    background: var(--doc-surface-2);
    color: var(--doc-muted);
    font-size: .8rem;
    font-weight: 600;
}

.doctor-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: .35rem;
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}

/* ── APPT LIST ─────────────────────────────────────────────── */
.doctor-appt-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0;
}

.doctor-appt-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--doc-line);
    transition: background .12s;
}

.doctor-appt-row:hover {
    background: var(--doc-surface-2);
}

.doctor-appt-row:last-child {
    border-bottom: none;
}

.doctor-appt-date {
    background: var(--doc-grad-brand-soft);
    color: var(--doc-brand-3);
    border-radius: 12px;
    padding: .4rem .25rem;
    text-align: center;
    line-height: 1.1;
}

.doctor-appt-date strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
}

.doctor-appt-date span {
    display: block;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    opacity: .85;
}

.doctor-appt-name {
    font-size: .94rem;
    font-weight: 700;
    color: var(--doc-text);
    margin: 0;
}

.doctor-appt-meta {
    font-size: .8rem;
    color: var(--doc-muted);
    margin: .2rem 0 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.doctor-appt-meta i {
    color: var(--doc-muted-2);
}

.doctor-appt-action {
    color: var(--doc-brand-1);
    background: var(--doc-grad-brand-soft);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .15s, color .15s, transform .15s;
    border: none;
    cursor: pointer;
}

.doctor-appt-action:hover {
    background: var(--doc-grad-brand);
    color: #fff;
    transform: translateX(2px);
}

/* ── TODAY TIMELINE ────────────────────────────────────────── */
.doctor-timeline-today {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0;
}

.doctor-timeline-today-item {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--doc-line);
    position: relative;
}

.doctor-timeline-today-item:last-child {
    border-bottom: none;
}

.doctor-timeline-time {
    text-align: right;
    font-family: var(--font-display);
}

.doctor-timeline-time strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--doc-text);
}

.doctor-timeline-time span {
    display: block;
    font-size: .72rem;
    color: var(--doc-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.doctor-timeline-marker {
    position: relative;
    width: 12px;
    margin-left: -.25rem;
    align-self: stretch;
}

.doctor-timeline-marker::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--doc-line-2);
    transform: translateX(-50%);
}

.doctor-timeline-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    border: 3px solid var(--doc-brand-1);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px var(--doc-grad-brand-soft);
}

.doctor-timeline-today-item.is-past .doctor-timeline-marker::after {
    background: var(--doc-success);
    border-color: var(--doc-success);
    box-shadow: 0 0 0 4px var(--doc-success-soft);
}

.doctor-timeline-card {
    background: var(--doc-surface-2);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-md);
    padding: .75rem .95rem;
    transition: border-color .15s, background .15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.doctor-timeline-card:hover {
    background: #fff;
    border-color: rgba(38, 33, 97, .35);
}

.doctor-timeline-card-inner {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.doctor-timeline-card-inner>div {
    min-width: 0;
}

.doctor-timeline-patient {
    font-size: .94rem;
    font-weight: 700;
    color: var(--doc-text);
    margin: 0;
}

.doctor-timeline-meta {
    font-size: .78rem;
    color: var(--doc-muted);
    margin: .15rem 0 0;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.doctor-timeline-meta i {
    color: var(--doc-muted-2);
}

/* ── EMPTY STATE ──────────────────────────────────────────── */
.doctor-empty {
    padding: 3rem 1.25rem 3.25rem;
    text-align: center;
    color: var(--doc-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}

.doctor-empty-illustration {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: var(--doc-grad-brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--doc-brand-1);
    margin-bottom: .5rem;
    box-shadow: 0 12px 24px -16px rgba(38, 33, 97, .35);
}

.doctor-empty p {
    margin: 0;
    font-size: .92rem;
    max-width: 320px;
}

.doctor-empty-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--doc-text);
    font-size: 1.02rem;
}

/* ── FLASH ─────────────────────────────────────────────────── */
.doctor-flash {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .9rem 1.15rem;
    border-radius: 14px;
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid;
    box-shadow: var(--doc-shadow-xs);
}

.doctor-flash-success {
    background: var(--doc-success-soft);
    border-color: rgba(93, 163, 52, .25);
    color: #3f6e1c;
}

.doctor-flash-error {
    background: var(--doc-danger-soft);
    border-color: rgba(185, 28, 28, .25);
    color: #991b1b;
}

.doctor-flash-info {
    background: var(--doc-info-soft);
    border-color: rgba(29, 78, 216, .25);
    color: #1e3a8a;
}

/* ── PILLS ────────────────────────────────────────────────── */
.doctor-pill {
    display: inline-flex;
    align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: .03em;
    border: 1px solid transparent;
    gap: .35rem;
}

.doctor-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.doctor-pill-scheduled {
    background: var(--doc-info-soft);
    color: var(--doc-info);
    border-color: rgba(29, 78, 216, .18);
}

.doctor-pill-completed {
    background: var(--doc-success-soft);
    color: var(--doc-success);
    border-color: rgba(93, 163, 52, .18);
}

.doctor-pill-cancelled {
    background: var(--doc-danger-soft);
    color: var(--doc-danger);
    border-color: rgba(185, 28, 28, .18);
}

/* ── AUTH (login + recuperar + reset) ──────────────────────── */
.doctor-auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 1100px;
    margin: 2.5rem auto 3rem;
}

@media (max-width: 880px) {
    .doctor-auth-wrap {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
    }

    /* Permite que la tarjeta y el panel encojan por debajo de su contenido
       intrínseco (inputs, botones); sin esto el grid/flex no baja de su
       min-content y aparece scroll horizontal en móvil. */
    .doctor-auth-card,
    .doctor-auth-aside {
        min-width: 0;
    }

    /* En móvil el formulario va primero (acción principal); el panel de
       marca queda debajo para no empujar el login fuera de la vista. */
    .doctor-auth-aside {
        order: 2;
    }
}

.doctor-auth-card {
    background: #fff;
    border: 1px solid var(--doc-line);
    border-radius: var(--r-2xl);
    padding: 2.5rem 2.25rem;
    box-shadow: var(--doc-shadow-lg);
    position: relative;
    overflow: hidden;
}

.doctor-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--doc-grad-brand);
}

.doctor-auth-brand {
    display: flex;
    align-items: center;
    gap: .95rem;
    margin-bottom: 1.35rem;
}

.doctor-auth-brand i {
    background: var(--doc-grad-brand);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    padding: 12px;
    box-shadow: var(--doc-shadow-brand);
}

.doctor-auth-eyebrow {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--doc-muted);
    font-weight: 800;
    margin: 0;
}

.doctor-auth-card h1 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.doctor-auth-subtitle {
    color: var(--doc-muted);
    margin: .35rem 0 1.75rem;
    font-size: .95rem;
}

.doctor-form {
    display: grid;
}

.doctor-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: var(--doc-text-2);
    margin-bottom: .4rem;
    letter-spacing: .02em;
}

.doctor-input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.doctor-input-icon>i:first-child,
.doctor-input-icon>svg:first-child {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--doc-muted-2);
    pointer-events: none;
    transition: color .15s;
}

.doctor-input {
    width: 100%;
    padding: .85rem 1rem .85rem 2.6rem;
    border: 1px solid var(--doc-line-2);
    border-radius: 12px;
    font-size: .95rem;
    background: #fff;
    color: var(--doc-text);
    transition: border-color .18s, box-shadow .18s;
    font-family: inherit;
}

.doctor-input:focus {
    outline: none;
    border-color: var(--doc-brand-1);
    box-shadow: 0 0 0 4px rgba(38, 33, 97, .14);
}

.doctor-input:focus+.doctor-input-toggle,
.doctor-input-icon:focus-within>i:first-child,
.doctor-input-icon:focus-within>svg:first-child {
    color: var(--doc-brand-1);
}

.doctor-input-toggle {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--doc-muted-2);
    cursor: pointer;
    padding: .35rem;
    border-radius: 8px;
    transition: color .15s, background .15s;
}

.doctor-input-toggle:hover {
    color: var(--doc-brand-1);
    background: var(--doc-surface-2);
}

.doctor-btn.mt-6 {
    margin-top: 1.5rem;
    justify-content: center;
    padding: .9rem 1.1rem;
    font-size: 1rem;
}

.doctor-auth-help {
    margin-top: 1.1rem;
    text-align: center;
    font-size: .82rem;
    color: var(--doc-muted);
    line-height: 1.5;
}

.doctor-auth-row {
    display: flex;
    justify-content: flex-end;
    margin-top: .65rem;
}

.doctor-auth-aside {
    background: var(--doc-grad-brand);
    color: #fff;
    border-radius: var(--r-2xl);
    padding: 2.5rem 2.25rem;
    display: flex;
    align-items: center;
    box-shadow: var(--doc-shadow-lg);
    position: relative;
    overflow: hidden;
}

.doctor-auth-aside::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 60%);
    pointer-events: none;
}

.doctor-auth-aside::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, .10), transparent 60%);
    pointer-events: none;
}

.doctor-auth-aside-inner {
    position: relative;
    z-index: 1;
}

.doctor-auth-aside>.doctor-auth-aside-inner i:first-child {
    background: rgba(255, 255, 255, .18);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 1rem;
    backdrop-filter: blur(4px);
}

.doctor-auth-aside h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 1.2rem;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.doctor-auth-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: .75rem;
}

.doctor-auth-points li {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .94rem;
    color: rgba(255, 255, 255, .96);
}

.doctor-auth-points li i {
    background: rgba(255, 255, 255, .16);
    padding: 6px;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    color: #fff;
}

.doctor-auth-aside-foot {
    font-size: .8rem;
    color: rgba(255, 255, 255, .78);
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding-top: 1rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.doctor-auth-aside-foot::before {
    content: '🔒';
    font-size: 1rem;
}

/* ── TABLE ─────────────────────────────────────────────────── */
.doctor-table-wrap {
    overflow-x: auto;
}

.doctor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.doctor-table thead th {
    text-align: left;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--doc-muted);
    font-weight: 800;
    padding: .9rem 1.2rem;
    border-bottom: 1px solid var(--doc-line);
    background: var(--doc-surface-2);
}

.doctor-table tbody td {
    padding: .9rem 1.2rem;
    border-bottom: 1px solid var(--doc-line);
    vertical-align: middle;
}

.doctor-table tbody tr:hover {
    background: var(--doc-surface-2);
}

.doctor-cell-muted {
    font-size: .78rem;
    color: var(--doc-muted);
}

.text-right {
    text-align: right;
}

.doctor-link-strong {
    color: var(--doc-text);
    font-weight: 700;
    text-decoration: none;
    transition: color .15s;
}

.doctor-link-strong:hover {
    color: var(--doc-brand-1);
}

.doctor-table-action {
    color: var(--doc-brand-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.doctor-table-action:hover {
    background: var(--doc-grad-brand);
    color: #fff;
}

/* ── SEARCH FORM ──────────────────────────────────────────── */
.doctor-search-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.doctor-search-form>i:first-child,
.doctor-search-form>svg:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--doc-muted-2);
    pointer-events: none;
}

.doctor-input-search {
    padding-left: 2.4rem !important;
    width: 320px;
    box-shadow: var(--doc-shadow-xs);
}

.doctor-search-clear {
    position: absolute;
    right: 102px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--doc-muted-2);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: .25rem;
    border-radius: 8px;
}

.doctor-search-clear:hover {
    color: var(--doc-danger);
    background: var(--doc-danger-soft);
}

.doctor-search-submit {
    flex-shrink: 0;
}

/* ── PAGINATION ───────────────────────────────────────────── */
.doctor-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--doc-line);
    color: var(--doc-muted);
    font-size: .9rem;
    background: var(--doc-surface-2);
}

.doctor-page-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .9rem;
    border: 1px solid var(--doc-line-2);
    border-radius: 10px;
    text-decoration: none;
    color: var(--doc-text);
    font-weight: 600;
    background: #fff;
    transition: background .15s, border-color .15s, color .15s;
}

.doctor-page-btn:hover:not(.is-disabled) {
    background: var(--doc-grad-brand-soft);
    border-color: var(--doc-brand-1);
    color: var(--doc-brand-1);
}

.doctor-page-btn.is-disabled {
    pointer-events: none;
    opacity: .45;
}

/* ── BACK LINK ─────────────────────────────────────────────── */
.doctor-back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--doc-muted);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 1rem;
    padding: .35rem 0;
    transition: color .15s, transform .15s;
}

.doctor-back-link:hover {
    color: var(--doc-brand-1);
    transform: translateX(-2px);
}

/* ── PATIENT HEADER ───────────────────────────────────────── */
.doctor-patient-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-xl);
    box-shadow: var(--doc-shadow-sm);
    padding: 1.75rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.doctor-patient-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--doc-grad-brand);
}

.doctor-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    font-size: 1.65rem;
}

.doctor-avatar-lg::after {
    display: none;
}

.doctor-patient-info {
    flex: 1;
    min-width: 200px;
}

.doctor-patient-info h1 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0 0 .5rem;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.doctor-patient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    color: var(--doc-muted);
    font-size: .88rem;
}

/* El ARS se mira para decidir indicaciones, asi que resalta sobre el resto de
   la meta (cedula, sexo, edad, telefono), que solo se lee de pasada.
   Va con `.is-app` delante porque portal-medico-pro.css define
   `.is-app .doctor-patient-meta span` (0,2,1) y le ganaria al color. */
.is-app .doctor-patient-meta .doctor-meta-ars,
.doctor-patient-meta .doctor-meta-ars {
    background: var(--doc-green-soft, #eef6e7);
    border: 1px solid var(--doc-green-line, #d3e7ba);
    color: var(--doc-green-deep, #4a8f27);
    font-weight: 700;
}

.is-app .doctor-patient-meta .doctor-meta-ars svg,
.doctor-patient-meta .doctor-meta-ars svg { color: currentColor; }

/* Sin seguro registrado: se avisa, pero sin alarmar. */
.is-app .doctor-patient-meta .doctor-meta-ars.is-vacia,
.doctor-patient-meta .doctor-meta-ars.is-vacia {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.doctor-patient-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .55rem;
    background: var(--doc-surface-2);
    border-radius: 8px;
    border: 1px solid var(--doc-line);
}

.doctor-patient-meta i {
    color: var(--doc-muted-2);
}

.doctor-patient-actions {
    display: flex;
    gap: .5rem;
}

/* ── DL ────────────────────────────────────────────────────── */
.doctor-dl,
.doctor-dl-grid {
    padding: 1.1rem 1.25rem;
}

.doctor-dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .95rem;
}

.doctor-dl dt,
.doctor-dl-grid dt {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--doc-muted);
    font-weight: 800;
    margin-bottom: .2rem;
}

.doctor-dl dd,
.doctor-dl-grid dd {
    font-size: .94rem;
    color: var(--doc-text);
    font-weight: 600;
    margin: 0 0 .8rem;
}

.doctor-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: .6rem;
    padding: 1.1rem 1.25rem;
}

.doctor-summary-stat {
    background: var(--doc-surface-2);
    border: 1px solid var(--doc-line);
    border-radius: 12px;
    padding: .8rem .9rem;
    transition: border-color .15s;
}

.doctor-summary-stat:hover {
    border-color: var(--doc-brand-1);
}

.doctor-summary-k {
    display: block;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--doc-muted);
    font-weight: 800;
    margin-bottom: .15rem;
}

.doctor-summary-v {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--doc-text);
    letter-spacing: -.02em;
}

/* ── TIMELINE (paciente.php) ──────────────────────────────── */
.doctor-timeline {
    list-style: none;
    padding: 1.25rem 1.5rem 1.5rem 1.75rem;
    margin: 0;
    position: relative;
}

.doctor-timeline::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--doc-grad-brand-soft), transparent);
}

.doctor-timeline-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.5rem;
}

.doctor-timeline-dot {
    position: absolute;
    left: 17px;
    top: .55rem;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    border: 3.5px solid var(--doc-brand-1);
    box-shadow: 0 0 0 4px var(--doc-grad-brand-soft);
}

.doctor-timeline-card {
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-md);
    box-shadow: var(--doc-shadow-xs);
    padding: 1.1rem 1.25rem;
    transition: border-color .15s, box-shadow .15s;
    display: block;
}

.doctor-timeline-card:hover {
    box-shadow: var(--doc-shadow-sm);
    border-color: rgba(38, 33, 97, .3);
}

.doctor-timeline-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: .7rem;
    flex-wrap: wrap;
}

.doctor-timeline-date {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
    text-transform: capitalize;
    font-size: 1rem;
}

.doctor-timeline-doc {
    font-size: .85rem;
    color: var(--doc-muted);
    margin: .2rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.doctor-timeline-doc i {
    color: var(--doc-muted-2);
}

.doctor-timeline-body {
    display: grid;
    gap: .6rem;
}

.doctor-timeline-row {
    background: var(--doc-surface-2);
    border-left: 3px solid var(--doc-brand-1);
    padding: .65rem .85rem;
    border-radius: 8px;
    font-size: .92rem;
}

.doctor-timeline-row strong {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--doc-brand-3);
    font-weight: 800;
    margin-bottom: .25rem;
}

.doctor-timeline-row p {
    margin: 0;
    color: var(--doc-text);
    line-height: 1.5;
}

.doctor-timeline-foot {
    margin-top: 1rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* ── MODAL ─────────────────────────────────────────────────── */
.doctor-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.doctor-modal[hidden] {
    display: none;
}

.doctor-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 18, 32, .60);
    backdrop-filter: blur(3px);
}

.doctor-modal-card {
    position: relative;
    background: #fff;
    border-radius: var(--r-xl);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--doc-shadow-lg);
    z-index: 1;
    overflow: hidden;
}

.doctor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--doc-line);
    background: linear-gradient(180deg, var(--doc-surface), var(--doc-surface-2));
}

.doctor-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
    letter-spacing: -.01em;
}

.doctor-modal-close {
    background: transparent;
    border: none;
    color: var(--doc-muted);
    cursor: pointer;
    padding: .35rem;
    border-radius: 8px;
}

.doctor-modal-close:hover {
    background: var(--doc-surface-2);
    color: var(--doc-text);
}

.doctor-modal-body {
    padding: 1.4rem;
    max-height: calc(90vh - 130px);
    overflow-y: auto;
}

.doctor-modal-footer {
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--doc-line);
    background: var(--doc-surface-2);
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}

/* ── FORM GRID ─────────────────────────────────────────────── */
.doctor-form-pad {
    padding: 1.25rem 1.4rem;
}

.doctor-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.doctor-form-grid label {
    display: grid;
    font-size: .78rem;
    font-weight: 700;
    color: var(--doc-text-2);
    gap: .35rem;
}

.doctor-form-grid input,
.doctor-form-grid textarea,
.doctor-form-grid select {
    font-weight: 500;
    color: var(--doc-text);
    font-family: inherit;
}

.doctor-form-full {
    grid-column: 1 / -1;
}

.doctor-input-inline {
    display: inline-block;
    width: auto;
    padding: .55rem .75rem;
}

/* ── CONSULT ──────────────────────────────────────────────── */
.doctor-consult-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-xl);
    box-shadow: var(--doc-shadow-sm);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.doctor-consult-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--doc-grad-brand);
}

.doctor-consult-header h1 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: .3rem 0;
    letter-spacing: -.02em;
}

.doctor-consult-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.doctor-consult-form textarea {
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
}

.doctor-consult-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* ── PDF CARDS (en consulta.php) ──────────────────────────── */
.doctor-pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .85rem;
    padding: 1.25rem 1.4rem;
}

.doctor-pdf-card {
    display: flex;
    align-items: center;
    gap: .95rem;
    padding: 1.1rem;
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--doc-text);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.doctor-pdf-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--doc-shadow-sm);
    border-color: var(--doc-brand-1);
}

.doctor-pdf-card i {
    color: var(--doc-brand-1);
    background: var(--doc-grad-brand-soft);
    width: 46px;
    height: 46px;
    border-radius: 13px;
    padding: 11px;
    flex-shrink: 0;
}

.doctor-pdf-card strong {
    display: block;
    font-size: .98rem;
    font-family: var(--font-display);
    font-weight: 800;
}

.doctor-pdf-card span {
    display: block;
    font-size: .78rem;
    color: var(--doc-muted);
    margin-top: .2rem;
}

/* ── HERO (dashboard) ─────────────────────────────────────── */
.doctor-hero {
    background: var(--doc-grad-brand);
    color: #fff;
    border-radius: var(--r-xl);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: var(--doc-shadow-md);
}

.doctor-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, .20), transparent 60%);
    pointer-events: none;
}

.doctor-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, .10), transparent 60%);
    pointer-events: none;
}

.doctor-hero-text {
    position: relative;
    z-index: 1;
}

.doctor-hero-eyebrow {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(255, 255, 255, .85);
    font-weight: 800;
    margin: 0 0 .35rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.doctor-hero-eyebrow::before {
    content: '';
    width: 10px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.doctor-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.doctor-hero-subtitle {
    margin: .5rem 0 0;
    color: rgba(255, 255, 255, .92);
    font-size: 1rem;
    max-width: 540px;
}

.doctor-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.doctor-hero .doctor-btn-primary {
    background: #fff;
    color: var(--doc-brand-3);
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .25);
}

.doctor-hero .doctor-btn-primary:hover {
    background: #fbfaf7;
}

.doctor-hero .doctor-btn-outline {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .30);
    backdrop-filter: blur(6px);
}

.doctor-hero .doctor-btn-outline:hover {
    background: rgba(255, 255, 255, .20);
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

/* ── FullCalendar tweaks ───────────────────────────────────── */
#doctor-calendar .fc,
#doctor-agenda .fc {
    font-family: 'Inter', sans-serif;
    font-size: .85rem;
}

#doctor-calendar .fc .fc-toolbar.fc-header-toolbar,
#doctor-agenda .fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

#doctor-calendar .fc .fc-toolbar-title,
#doctor-agenda .fc .fc-toolbar-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--doc-text);
    letter-spacing: -.01em;
    text-transform: capitalize;
}

#doctor-calendar .fc .fc-button,
#doctor-agenda .fc .fc-button {
    background: #fff;
    color: var(--doc-text);
    border: 1px solid var(--doc-line-2);
    border-radius: 10px;
    padding: .4rem .8rem;
    font-weight: 700;
    font-size: .8rem;
    text-transform: capitalize;
    box-shadow: var(--doc-shadow-xs);
    transition: background .15s, color .15s, border-color .15s;
}

#doctor-calendar .fc .fc-button:hover,
#doctor-agenda .fc .fc-button:hover {
    background: var(--doc-grad-brand-soft);
    color: var(--doc-brand-3);
    border-color: var(--doc-brand-1);
}

#doctor-calendar .fc .fc-button-active,
#doctor-calendar .fc .fc-button-primary:not(:disabled).fc-button-active,
#doctor-agenda .fc .fc-button-active,
#doctor-agenda .fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--doc-grad-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--doc-shadow-brand);
}

#doctor-calendar .fc .fc-button-group .fc-button,
#doctor-agenda .fc .fc-button-group .fc-button {
    border-radius: 0;
}

#doctor-calendar .fc .fc-button-group .fc-button:first-child,
#doctor-agenda .fc .fc-button-group .fc-button:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#doctor-calendar .fc .fc-button-group .fc-button:last-child,
#doctor-agenda .fc .fc-button-group .fc-button:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

#doctor-calendar .fc-theme-standard td,
#doctor-calendar .fc-theme-standard th,
#doctor-agenda .fc-theme-standard td,
#doctor-agenda .fc-theme-standard th {
    border-color: var(--doc-line);
}

#doctor-calendar .fc th,
#doctor-agenda .fc th {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    color: var(--doc-muted);
    font-weight: 800;
    padding: .55rem .35rem;
    background: var(--doc-surface-2);
}

#doctor-calendar .fc .fc-daygrid-day-number,
#doctor-agenda .fc .fc-daygrid-day-number {
    color: var(--doc-text-2);
    font-weight: 700;
    font-size: .8rem;
    padding: .35rem .45rem;
}

#doctor-calendar .fc .fc-daygrid-day.fc-day-today,
#doctor-agenda .fc .fc-daygrid-day.fc-day-today {
    background: var(--doc-grad-brand-soft);
}

#doctor-calendar .fc .fc-day-today .fc-daygrid-day-number,
#doctor-agenda .fc .fc-day-today .fc-daygrid-day-number {
    background: var(--doc-grad-brand);
    color: #fff;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: .25rem;
    box-shadow: var(--doc-shadow-brand);
}

#doctor-calendar .fc .fc-event,
#doctor-agenda .fc .fc-event {
    border: none;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: .72rem;
    font-weight: 700;
    margin: 1px 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    cursor: pointer;
    transition: transform .12s;
}

#doctor-calendar .fc .fc-event:hover,
#doctor-agenda .fc .fc-event:hover {
    transform: scale(1.02);
}

#doctor-calendar .fc .fc-daygrid-event-dot,
#doctor-agenda .fc .fc-daygrid-event-dot {
    display: none;
}

#doctor-calendar .fc .fc-daygrid-day-events,
#doctor-agenda .fc .fc-daygrid-day-events {
    margin-top: 2px;
}

/* ── AVATARS (gradient hash-deterministic) ────────────────── */
.doctor-av {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: .02em;
    border-radius: 50%;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -4px rgba(38, 33, 97, .25), inset 0 0 0 1px rgba(255, 255, 255, .18);
    line-height: 1;
}

.doctor-av-sm {
    width: 32px;
    height: 32px;
    font-size: .75rem;
}

.doctor-av-md {
    width: 40px;
    height: 40px;
    font-size: .82rem;
    border-radius: 12px;
}

.doctor-av-lg {
    width: 56px;
    height: 56px;
    font-size: 1rem;
    border-radius: 14px;
}

.doctor-av-xl {
    width: 80px;
    height: 80px;
    font-size: 1.55rem;
    border-radius: 22px;
}

/* ── FULLCALENDAR EVENTS (custom rendering) ───────────────── */
#doctor-calendar .fc-evt-wrap,
#doctor-agenda .fc-evt-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    border-radius: 7px;
    background: var(--doc-info-soft);
    color: var(--doc-info);
    overflow: hidden;
    transition: transform .12s, box-shadow .12s;
    border: 1px solid rgba(29, 78, 216, .15);
}

#doctor-calendar .fc-evt-wrap.fc-evt-completed,
#doctor-agenda .fc-evt-wrap.fc-evt-completed {
    background: var(--doc-success-soft);
    color: var(--doc-success);
    border-color: rgba(93, 163, 52, .15);
}

#doctor-calendar .fc-evt-wrap.fc-evt-cancelled,
#doctor-agenda .fc-evt-wrap.fc-evt-cancelled {
    background: var(--doc-danger-soft);
    color: var(--doc-danger);
    border-color: rgba(185, 28, 28, .15);
    text-decoration: line-through;
    opacity: .75;
}

#doctor-calendar .fc-evt-dot,
#doctor-agenda .fc-evt-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .4);
}

#doctor-calendar .fc-evt-title,
#doctor-agenda .fc-evt-title {
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#doctor-calendar .fc-event,
#doctor-agenda .fc-event {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#doctor-calendar .fc-daygrid-day-frame,
#doctor-agenda .fc-daygrid-day-frame {
    padding: 2px;
}

#doctor-calendar .fc-daygrid-more-link,
#doctor-agenda .fc-daygrid-more-link {
    color: var(--doc-brand-1) !important;
    font-weight: 700;
    font-size: .72rem;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--doc-grad-brand-soft);
}

#doctor-calendar .fc-daygrid-more-link:hover,
#doctor-agenda .fc-daygrid-more-link:hover {
    background: var(--doc-brand-1);
    color: #fff !important;
}

/* ── SPARKLINE en KPIs ─────────────────────────────────────── */
.doctor-kpi-spark {
    margin-top: .55rem;
    height: 26px;
    width: 100%;
    display: block;
    opacity: .85;
}

.doctor-kpi-spark path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.doctor-kpi-spark .spark-fill {
    fill: currentColor;
    opacity: .12;
    stroke: none;
}

/* ── STICKY SAVE BAR (consulta) ───────────────────────────── */
.doctor-sticky-save {
    position: sticky;
    bottom: 1rem;
    z-index: 10;
    margin-top: 1.25rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-lg);
    box-shadow: 0 14px 40px -16px rgba(38, 33, 97, .25);
    padding: .85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.doctor-save-status {
    font-size: .82rem;
    color: var(--doc-muted);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
}

.doctor-save-saving {
    color: var(--doc-warning);
}

.doctor-save-saved {
    color: var(--doc-success);
}

.doctor-save-error {
    color: var(--doc-danger);
}

/* ── PROFILE COMPLETION BAR ───────────────────────────────── */
.doctor-completion {
    background: var(--doc-surface);
    border: 1px solid var(--doc-line);
    border-radius: var(--r-lg);
    box-shadow: var(--doc-shadow-sm);
    padding: 1.1rem 1.35rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.doctor-completion-ring {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.doctor-completion-ring svg {
    transform: rotate(-90deg);
}

.doctor-completion-ring circle {
    fill: none;
    stroke-width: 6;
}

.doctor-completion-ring .bg {
    stroke: var(--doc-line-2);
}

.doctor-completion-ring .fg {
    stroke: url(#docGrad);
    stroke-linecap: round;
    transition: stroke-dashoffset .8s ease;
}

.doctor-completion-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    color: var(--doc-text);
}

.doctor-completion-text {
    flex: 1;
    min-width: 200px;
}

.doctor-completion-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--doc-text);
    margin: 0;
}

.doctor-completion-hint {
    font-size: .85rem;
    color: var(--doc-muted);
    margin: .2rem 0 0;
}

.doctor-completion-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .5rem;
}

.doctor-completion-pill {
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: var(--doc-danger-soft);
    color: var(--doc-danger);
    border: 1px solid rgba(185, 28, 28, .18);
}

/* ── TABLE PATIENT ROW (con avatar) ───────────────────────── */
.doctor-table-patient {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.doctor-table-patient .doctor-av {
    width: 36px;
    height: 36px;
    font-size: .76rem;
    border-radius: 11px;
}

.doctor-table-patient-name {
    font-weight: 700;
    color: var(--doc-text);
}

.doctor-visit-chip {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: var(--doc-grad-brand-soft);
    color: var(--doc-brand-3);
    font-weight: 800;
    font-size: .82rem;
    min-width: 32px;
    justify-content: center;
}

/* ── CUENTA / SEGURIDAD ────────────────────────────────────── */
.doctor-account-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid var(--doc-line);
}

.doctor-account-info {
    min-width: 0;
    flex: 1;
}

.doctor-account-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 0;
    letter-spacing: -.01em;
}

.doctor-account-row {
    font-size: .85rem;
    color: var(--doc-muted);
    margin: .25rem 0 0;
    display: flex;
    align-items: center;
    gap: .35rem;
    word-break: break-word;
}

.doctor-account-row i {
    color: var(--doc-muted-2);
    flex-shrink: 0;
}

.doctor-account-note {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    background: var(--doc-info-soft);
    color: var(--doc-info);
    border: 1px solid rgba(29, 78, 216, .15);
    border-radius: var(--r-md);
    padding: .85rem 1rem;
    margin: 1.25rem 1.4rem;
    font-size: .85rem;
    line-height: 1.45;
}

.doctor-account-note p {
    margin: 0;
    flex: 1;
}

.doctor-account-note i {
    flex-shrink: 0;
    margin-top: 1px;
}

.doctor-card-warning .doctor-card-header h2 i {
    background: var(--doc-warning-soft);
    color: var(--doc-warning);
}

.doctor-tips {
    list-style: none;
    padding: 1.25rem 1.4rem;
    margin: 0;
    display: grid;
    gap: .65rem;
}

.doctor-tips li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .92rem;
    color: var(--doc-text-2);
    line-height: 1.4;
}

.doctor-tips li i {
    color: var(--doc-success);
    background: var(--doc-success-soft);
    padding: 4px;
    border-radius: 999px;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

/* ── LOGIN ENHANCEMENTS (caps lock, loading, security badges) ── */
.doctor-capslock-hint {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: .5rem 0 0;
    font-size: .78rem;
    color: var(--doc-warning);
    font-weight: 600;
}

.doctor-capslock-hint i {
    color: var(--doc-warning);
}

.doctor-btn[disabled] {
    opacity: .8;
    cursor: not-allowed;
    pointer-events: none;
}

.doctor-btn-content,
.doctor-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.doctor-spin {
    animation: doctor-spin 1s linear infinite;
}

@keyframes doctor-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.doctor-security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--doc-line-2);
    justify-content: center;
}

.doctor-security-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .65rem;
    background: var(--doc-surface-2);
    border: 1px solid var(--doc-line);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--doc-muted);
}

.doctor-security-badge i {
    color: var(--doc-success);
}

/* ── OTP (codigo de 6 digitos en verificar.php) ───────────── */
.doctor-otp {
    display: flex;
    gap: .55rem;
    justify-content: center;
    margin: .35rem 0 .25rem;
}

.doctor-otp-slot {
    width: 48px;
    height: 56px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--doc-text);
    border: 1.5px solid var(--doc-line-2);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    caret-color: var(--doc-brand-1);
}

.doctor-otp-slot:focus {
    outline: none;
    border-color: var(--doc-brand-1);
    box-shadow: 0 0 0 4px rgba(38, 33, 97, .14);
    transform: scale(1.04);
}

@media (max-width: 480px) {
    .doctor-otp-slot {
        width: 40px;
        height: 50px;
        font-size: 1.35rem;
    }

    .doctor-otp {
        gap: .35rem;
    }
}

/* ── CHECKBOX (remember device, etc) ──────────────────────── */
.doctor-check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .85rem;
    color: var(--doc-muted);
    line-height: 1.45;
    cursor: pointer;
}

.doctor-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--doc-brand-1);
    flex-shrink: 0;
}

.doctor-check span {
    user-select: none;
}

.doctor-check:hover span {
    color: var(--doc-text-2);
}

.doctor-btn-inline {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

/* ── LOGIN ACTIVITY (cuenta.php) ─────────────────────────── */
.doctor-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doctor-activity-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: .85rem;
    padding: .8rem 1.2rem;
    border-bottom: 1px solid var(--doc-line);
}

.doctor-activity-row:last-child {
    border-bottom: none;
}

.doctor-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-activity-icon i {
    width: 16px;
    height: 16px;
}

.doctor-activity-success .doctor-activity-icon {
    background: var(--doc-success-soft);
    color: var(--doc-success);
}

.doctor-activity-failed .doctor-activity-icon {
    background: var(--doc-danger-soft);
    color: var(--doc-danger);
}

.doctor-activity-meta {
    min-width: 0;
}

.doctor-activity-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--doc-text);
    margin: 0;
}

.doctor-activity-sub {
    font-size: .78rem;
    color: var(--doc-muted);
    margin: .15rem 0 0;
    word-break: break-word;
}

.doctor-activity-when {
    font-size: .78rem;
    color: var(--doc-muted);
    text-align: right;
    white-space: nowrap;
}

.doctor-device-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1.2rem;
    border-bottom: 1px solid var(--doc-line);
}

.doctor-device-row:last-child {
    border-bottom: none;
}

.doctor-device-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--doc-grad-brand-soft);
    color: var(--doc-brand-1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-device-label {
    font-weight: 700;
    color: var(--doc-text);
    margin: 0;
}

.doctor-device-meta {
    font-size: .78rem;
    color: var(--doc-muted);
    margin: .15rem 0 0;
}

.doctor-device-revoke {
    border: 1px solid var(--doc-line-2);
    background: #fff;
    color: var(--doc-danger);
    padding: .35rem .65rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.doctor-device-revoke:hover {
    background: var(--doc-danger-soft);
    border-color: var(--doc-danger);
}

/* ── HOVER TILT subtle on cards ───────────────────────────── */
@media (hover: hover) {

    .doctor-kpi,
    .doctor-quick {
        will-change: transform;
    }
}

/* utility */
.ml-3 {
    margin-left: .75rem;
}

.mt-3 {
    margin-top: .75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.align-text-bottom {
    vertical-align: text-bottom;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet pequeño */
@media (max-width: 1020px) {
    .doctor-shell {
        padding: 1rem;
    }

    .doctor-shell-app {
        gap: 1rem;
    }

    .doctor-sidebar {
        position: static !important;
        order: -1;
    }

    .doctor-sidebar::before {
        height: 4px;
    }

    .doctor-profile {
        padding: .9rem 1rem .85rem;
    }

    .doctor-nav {
        padding: .65rem .65rem .85rem;
    }

    .doctor-grid-2 {
        gap: 1rem;
    }

    .doctor-hero {
        padding: 1.5rem 1.5rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .doctor-shell {
        padding: .75rem;
        padding-bottom: 2rem;
    }

    .doctor-header {
        gap: .85rem;
        margin-bottom: 1.25rem;
    }

    .doctor-header h1 {
        font-size: 1.5rem;
    }

    .doctor-hero {
        padding: 1.25rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .doctor-hero h1 {
        font-size: 1.4rem;
    }

    .doctor-hero-subtitle {
        font-size: .9rem;
    }

    .doctor-hero-actions {
        width: 100%;
    }

    .doctor-hero-actions .doctor-btn {
        flex: 1;
        justify-content: center;
    }

    .doctor-header-actions {
        width: 100%;
    }

    .doctor-header-actions .doctor-btn {
        flex: 1;
        justify-content: center;
    }

    /* Search form: stack input + button */
    .doctor-search-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .doctor-input-search {
        width: 100%;
    }

    .doctor-search-clear {
        right: 12px;
    }

    .doctor-search-submit {
        width: 100%;
        justify-content: center;
    }

    /* KPIs: 2 per row */
    .doctor-kpis {
        grid-template-columns: repeat(2, 1fr);
    }

    .doctor-kpi {
        padding: 1rem 1.1rem;
    }

    .doctor-kpi-value {
        font-size: 1.7rem;
    }

    .doctor-kpi-spark {
        height: 22px;
    }

    /* Cards */
    .doctor-card-header {
        padding: .85rem 1.1rem;
    }

    .doctor-form-pad {
        padding: 1.1rem 1.1rem;
    }

    /* Patient header */
    .doctor-patient-header {
        padding: 1.25rem;
        gap: 1rem;
    }

    .doctor-patient-info h1 {
        font-size: 1.35rem;
    }

    .doctor-av-xl {
        width: 64px;
        height: 64px;
        font-size: 1.3rem;
        border-radius: 18px;
    }

    .doctor-patient-actions {
        width: 100%;
    }

    .doctor-patient-actions .doctor-btn {
        flex: 1;
        justify-content: center;
    }

    /* Consult */
    .doctor-consult-header {
        padding: 1.25rem;
    }

    .doctor-consult-header h1 {
        font-size: 1.35rem;
    }

    .doctor-consult-actions {
        width: 100%;
    }

    .doctor-consult-actions .doctor-btn {
        flex: 1;
        justify-content: center;
    }

    .doctor-sticky-save {
        flex-direction: column;
        align-items: stretch;
        gap: .65rem;
        bottom: .5rem;
        padding: .75rem .85rem;
    }

    .doctor-sticky-save .doctor-consult-actions {
        width: 100%;
    }

    /* Auth */
    .doctor-auth-wrap {
        margin: 1.25rem auto 2rem;
    }

    .doctor-auth-card,
    .doctor-auth-aside {
        padding: 1.75rem 1.5rem;
        border-radius: 20px;
    }

    .doctor-auth-card h1 {
        font-size: 1.55rem;
    }

    .doctor-auth-aside h2 {
        font-size: 1.55rem;
    }

    .doctor-auth-brand i {
        width: 44px;
        height: 44px;
        padding: 10px;
    }

    /* Timeline today */
    .doctor-timeline-today-item {
        grid-template-columns: 60px 1fr;
        gap: .65rem;
        padding: .85rem 1rem;
    }

    .doctor-timeline-today-item .doctor-timeline-marker {
        display: none;
    }

    /* Modal */
    .doctor-modal {
        padding: 0;
        align-items: flex-end;
    }

    .doctor-modal-card {
        max-width: none;
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
    }

    .doctor-modal-body {
        padding: 1.1rem;
    }

    .doctor-modal-header {
        padding: 1rem 1.1rem;
    }

    .doctor-modal-footer {
        padding: .85rem 1.1rem;
    }

    /* Table compaction */
    .doctor-table thead th {
        padding: .7rem .85rem;
    }

    .doctor-table tbody td {
        padding: .7rem .85rem;
    }

    /* Calendar */
    #doctor-calendar,
    #doctor-agenda {
        padding: .5rem .65rem .85rem;
        min-height: 420px;
    }

    #doctor-calendar .fc .fc-toolbar.fc-header-toolbar,
    #doctor-agenda .fc .fc-toolbar.fc-header-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }

    #doctor-calendar .fc .fc-toolbar-chunk,
    #doctor-agenda .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }

    #doctor-calendar .fc-evt-title,
    #doctor-agenda .fc-evt-title {
        font-size: .66rem;
    }

    #doctor-calendar .fc th,
    #doctor-agenda .fc th {
        font-size: .65rem;
        padding: .35rem .15rem;
    }

    #doctor-calendar .fc .fc-daygrid-day-number,
    #doctor-agenda .fc .fc-daygrid-day-number {
        font-size: .72rem;
        padding: .25rem .3rem;
    }

    /* Completion */
    .doctor-completion {
        padding: .9rem 1rem;
        gap: .85rem;
    }

    .doctor-completion-ring {
        width: 52px;
        height: 52px;
    }

    .doctor-completion-ring svg {
        width: 52px;
        height: 52px;
    }

    .doctor-completion-pct {
        font-size: .85rem;
    }

    /* Pacientes table - hide email under name to save space */
    .doctor-table-patient .doctor-cell-muted {
        display: none;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .doctor-kpis {
        grid-template-columns: 1fr;
    }

    .doctor-grid-3 {
        grid-template-columns: 1fr;
    }

    .doctor-header h1 {
        font-size: 1.35rem;
    }

    .doctor-hero h1 {
        font-size: 1.25rem;
    }

    .doctor-patient-meta {
        gap: .5rem;
    }

    .doctor-patient-meta span {
        font-size: .8rem;
        padding: .15rem .45rem;
    }

    /* PDFs grid 1 col */
    .doctor-pdf-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    /* Pagination compacta */
    .doctor-pagination {
        flex-direction: column;
        gap: .65rem;
        padding: .85rem 1rem;
    }

    .doctor-page-btn {
        flex: 1;
        justify-content: center;
    }
}