@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --mw-next-radius: 0.75rem;
    --mw-next-background: oklch(0.975 0.008 240);
    --mw-next-foreground: oklch(0.18 0.02 250);
    --mw-next-card: oklch(1 0 0);
    --mw-next-primary: oklch(0.52 0.2 255);
    --mw-next-accent: oklch(0.64 0.18 175);
    --mw-next-muted: oklch(0.94 0.01 240);
    --mw-next-sidebar: oklch(0.22 0.04 255);
    --mw-next-sidebar-foreground: oklch(0.92 0.01 240);
    --mw-next-sidebar-accent: oklch(0.3 0.05 255);
    --mw-next-sidebar-border: oklch(0.32 0.04 255);
    --mw-next-amber: oklch(0.72 0.18 55);
    --mw-next-violet: oklch(0.62 0.22 320);
    --mw-next-rouge: oklch(0.58 0.2 30);
}

.mw-next-wrap {
    min-height: 100vh;
    background: var(--mw-next-background);
    color: var(--mw-next-foreground);
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}

.mw-next-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 16rem;
    z-index: 40;
    background: var(--mw-next-sidebar);
    color: var(--mw-next-sidebar-foreground);
    border-right: 1px solid var(--mw-next-sidebar-border);
    overflow: hidden;
    transition: width 0.24s ease;
}

.mw-next-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.42);
    transition: opacity 0.24s ease;
}

.mw-next-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 1rem;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.mw-next-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
}

.mw-next-brand strong,
.mw-next-brand small {
    display: block;
    line-height: 1.1;
}

.mw-next-brand small {
    opacity: 0.72;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.mw-next-brand-mark,
.mw-next-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.mw-next-brand-mark {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, rgba(94, 135, 255, 1), rgba(55, 162, 182, 1));
    color: white;
    box-shadow: 0 18px 40px rgba(22, 35, 91, 0.28);
}

.mw-next-profile-card,
.mw-next-card,
.mw-next-feature-card,
.mw-next-list-card,
.mw-next-activity-card,
.mw-next-family-card,
.mw-next-prescription-card,
.mw-next-mini-kpi,
.mw-next-kpi-card,
.mw-next-banner {
    border-radius: 1.25rem;
    background: var(--mw-next-card);
    box-shadow: 0 18px 40px rgba(18, 29, 61, 0.08);
}

.mw-next-profile-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.mw-next-profile-card strong,
.mw-next-profile-card span,
.mw-next-profile-card div {
    color: inherit;
}

.mw-next-profile-card-copy {
    min-width: 0;
}

.mw-next-profile-photo-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.mw-next-profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.mw-next-profile-meta {
    font-size: 0.84rem;
    opacity: 0.75;
}

.mw-next-profile-location {
    font-size: 0.84rem;
    opacity: 0.82;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.mw-next-avatar {
    width: 3rem;
    height: 3rem;
}

.mw-next-avatar-primary { background: rgba(94, 135, 255, 0.2); color: white; }
.mw-next-avatar-soft { background: rgba(94, 135, 255, 0.12); color: rgb(53, 86, 196); }
.mw-next-avatar-blue { background: #dbeafe; color: #1d4ed8; }
.mw-next-avatar-teal { background: #ccfbf1; color: #0f766e; }
.mw-next-avatar-violet { background: #ede9fe; color: #7c3aed; }
.mw-next-avatar-amber { background: #fef3c7; color: #b45309; }
.mw-next-avatar-pink { background: #fce7f3; color: #be185d; }
.mw-next-avatar-green { background: #dcfce7; color: #15803d; }

.mw-next-side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mw-next-side-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    opacity: 0.62;
    padding: 0.85rem 0.95rem;
    border-radius: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mw-next-side-link.is-active,
.mw-next-side-link:hover {
    opacity: 1;
    background: var(--mw-next-sidebar-accent);
    color: white;
}

.mw-next-demo-badge {
    margin-top: auto;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    line-height: 1.45;
}

.mw-next-wrap.is-sidebar-collapsed .mw-next-sidebar {
    width: 5.5rem;
}

.mw-next-wrap.is-sidebar-collapsed .mw-next-sidebar-inner {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.mw-next-wrap.is-sidebar-collapsed .mw-next-brand span:last-child,
.mw-next-wrap.is-sidebar-collapsed .mw-next-profile-card-copy,
.mw-next-wrap.is-sidebar-collapsed .mw-next-side-link span,
.mw-next-wrap.is-sidebar-collapsed .mw-next-demo-badge {
    display: none;
}

.mw-next-wrap.is-sidebar-collapsed .mw-next-brand,
.mw-next-wrap.is-sidebar-collapsed .mw-next-side-link,
.mw-next-wrap.is-sidebar-collapsed .mw-next-profile-card {
    justify-content: center;
}

.mw-next-main {
    min-height: 100vh;
    padding-left: 0;
}

@media (min-width: 768px) {
    .mw-next-main {
        padding-left: 16rem;
        transition: padding-left 0.24s ease;
    }
    .mw-next-wrap.is-sidebar-collapsed .mw-next-main {
        padding-left: 5.5rem;
    }
}

.mw-next-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1rem;
    background: color-mix(in oklch, var(--mw-next-background) 92%, white 8%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(128, 144, 176, 0.14);
}

@media (min-width: 768px) {
    .mw-next-header {
        padding: 1.35rem 1.5rem;
    }
}

.mw-next-page-title {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.mw-next-page-subtitle {
    margin: 0.3rem 0 0;
    color: rgba(60, 76, 110, 0.84);
}

.mw-next-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mw-next-header-action-group {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(128, 144, 176, 0.14);
}

.mw-next-header-action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.9rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(128, 144, 176, 0.16);
    background: white;
    color: var(--mw-next-foreground);
    font-weight: 700;
    line-height: 1;
}

.mw-next-header-action-button:hover {
    text-decoration: none;
    color: var(--mw-next-foreground);
}

.mw-next-header-action-button i {
    flex-shrink: 0;
}

.mw-next-mobile-action-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.mw-next-icon-button {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 999px;
    border: 1px solid rgba(128, 144, 176, 0.18);
    background: white;
}

.mw-next-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem 1rem 6rem;
}

@media (min-width: 768px) {
    .mw-next-content {
        padding: 1.25rem 1.5rem 1.5rem;
    }
}

.mw-next-alert-banner,
.mw-next-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}

.mw-next-alert-banner {
    background: linear-gradient(135deg, rgba(66, 193, 162, 0.12), rgba(94, 135, 255, 0.08));
    border: 1px solid rgba(66, 193, 162, 0.16);
}

.mw-next-alert-copy {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mw-next-alert-copy p,
.mw-next-feature-copy p {
    margin: 0.2rem 0 0;
    color: rgba(61, 75, 105, 0.88);
}

.mw-next-feature-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.mw-next-feature-portrait {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(94, 135, 255, 0.15);
    background: rgba(94, 135, 255, 0.08);
}

.mw-next-feature-portrait-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.mw-next-alert-icon,
.mw-next-feature-icon,
.mw-next-insurance-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(94, 135, 255, 0.14);
    color: rgb(49, 84, 188);
    flex-shrink: 0;
}

.mw-next-pill-button,
.mw-next-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.8rem 1.15rem;
    background: rgb(54, 98, 235);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border: 0;
}

.mw-next-pill-button:hover,
.mw-next-action-button:hover,
.mw-next-icon-button:hover,
.mw-next-filter-pill:hover {
    text-decoration: none;
}

.mw-next-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mw-next-action-button.is-light,
.mw-next-filter-pill,
.mw-next-icon-button,
.mw-next-family-card code,
.mw-next-inline-badge,
.mw-next-category-chip,
.mw-next-prescription-badges span,
.mw-next-finance-meta span {
    background: var(--mw-next-muted);
    color: var(--mw-next-foreground);
}

.mw-next-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.mw-next-dashboard-main {
    min-width: 0;
}

@media (min-width: 1200px) {
    .mw-next-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .mw-next-kpi-grid--three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.mw-next-kpi-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
    .mw-next-kpi-grid--four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.mw-next-kpi-card,
.mw-next-mini-kpi {
    padding: 1.15rem;
}

.mw-next-kpi-card {
    color: white;
}

.mw-next-kpi-card .mw-next-kpi-label,
.mw-next-kpi-card .mw-next-kpi-subtitle,
.mw-next-kpi-card .mw-next-kpi-value,
.mw-next-kpi-card .mw-next-kpi-head,
.mw-next-kpi-card i,
.mw-next-kpi-card span,
.mw-next-kpi-card strong {
    color: #ffffff !important;
}

.mw-next-kpi-card.is-cyan { background: linear-gradient(135deg, #0891b2, #38bdf8); }
.mw-next-kpi-card.is-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.mw-next-kpi-card.is-amber { background: linear-gradient(135deg, #d97706, #fbbf24); }
.mw-next-kpi-card.is-violet { background: linear-gradient(135deg, #9333ea, #c084fc); }

.mw-next-kpi-head,
.mw-next-card-head,
.mw-next-family-top,
.mw-next-prescription-head,
.mw-next-finance-item,
.mw-next-insurance-item,
.mw-next-appointment-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mw-next-kpi-label,
.mw-next-kpi-subtitle,
.mw-next-member-role,
.mw-next-family-meta span,
.mw-next-finance-copy span,
.mw-next-finance-copy small,
.mw-next-prescription-copy span,
.mw-next-prescription-copy small,
.mw-next-appointment-copy span,
.mw-next-appointment-meta small,
.mw-next-timeline-copy span,
.mw-next-timeline-copy small,
.mw-next-activity-copy span {
    color: rgba(66, 82, 114, 0.82);
}

.mw-next-kpi-value {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin: 0.75rem 0 0.35rem;
}

.mw-next-dashboard-grid,
.mw-next-finance-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1200px) {
    .mw-next-dashboard-grid {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    }
    .mw-next-finance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mw-next-card,
.mw-next-feature-card,
.mw-next-list-card,
.mw-next-activity-card {
    padding: 1.25rem;
}

.mw-next-card h2,
.mw-next-feature-copy h2 {
    margin: 0.15rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.mw-next-eyebrow,
.mw-next-section-label {
    display: inline-block;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.74rem;
    color: rgba(86, 102, 128, 0.72);
}

.mw-next-members-grid,
.mw-next-stat-grid,
.mw-next-family-grid {
    display: grid;
    gap: 1rem;
}

.mw-next-members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
    .mw-next-members-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.mw-next-member-card,
.mw-next-stat-chip {
    border-radius: 1rem;
    background: #f8fbff;
    padding: 1rem;
}

.mw-next-stat-chip {
    display: grid;
    gap: 0.55rem;
    align-items: start;
}

.mw-next-member-card strong,
.mw-next-family-card strong,
.mw-next-finance-copy strong,
.mw-next-prescription-copy strong,
.mw-next-appointment-copy strong,
.mw-next-activity-copy strong,
.mw-next-timeline-copy strong {
    display: block;
}

.mw-next-member-card code,
.mw-next-inline-badge,
.mw-next-category-chip,
.mw-next-filter-pill,
.mw-next-prescription-badges span,
.mw-next-finance-meta span,
.mw-next-allergy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.mw-next-split-cards {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .mw-next-split-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mw-next-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.mw-next-stat-chip i {
    color: rgb(54, 98, 235);
    margin-bottom: 0;
}

.mw-next-stat-chip span {
    order: 1;
}

.mw-next-stat-chip strong {
    order: 2;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(129, 145, 176, 0.18);
}

.mw-next-timeline {
    margin-top: 1rem;
}

.mw-next-timeline-item,
.mw-next-activity-item {
    position: relative;
    display: flex;
    gap: 0.9rem;
    padding-left: 0.4rem;
    padding-bottom: 1rem;
}

.mw-next-timeline-item:not(:last-child)::after,
.mw-next-activity-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0.52rem;
    top: 0.85rem;
    bottom: -0.2rem;
    width: 1px;
    background: rgba(117, 133, 161, 0.28);
}

.mw-next-timeline-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: rgb(54, 98, 235);
    margin-top: 0.32rem;
    flex-shrink: 0;
}

.mw-next-feature-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(94, 135, 255, 0.08), rgba(94, 135, 255, 0.14));
    margin-bottom: 1rem;
}

.mw-next-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.mw-next-filter-row,
.mw-next-family-actions,
.mw-next-prescription-badges,
.mw-next-activity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.mw-next-filter-row {
    margin-bottom: 1rem;
}

.mw-next-filter-pill.is-active {
    background: rgb(54, 98, 235);
    color: white;
}

.mw-next-appointment-item,
.mw-next-finance-item,
.mw-next-insurance-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.75rem;
    row-gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(129, 145, 176, 0.15);
}

.mw-next-finance-item > .mw-next-insurance-icon,
.mw-next-finance-item > .mw-next-feature-icon,
.mw-next-finance-item > .mw-next-appointment-icon {
    margin-right: 0;
}

.mw-next-finance-copy,
.mw-next-appointment-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.mw-next-finance-item > .mw-next-finance-icon,
.mw-next-finance-item > .mw-next-insurance-icon,
.mw-next-finance-item > .mw-next-feature-icon,
.mw-next-finance-item > .mw-next-appointment-icon,
.mw-next-insurance-item > .mw-next-finance-icon,
.mw-next-insurance-item > .mw-next-insurance-icon,
.mw-next-insurance-item > .mw-next-feature-icon,
.mw-next-insurance-item > .mw-next-appointment-icon,
.mw-next-appointment-item > .mw-next-finance-icon,
.mw-next-appointment-item > .mw-next-insurance-icon,
.mw-next-appointment-item > .mw-next-feature-icon,
.mw-next-appointment-item > .mw-next-appointment-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.mw-next-finance-item .mw-next-finance-copy,
.mw-next-finance-item .mw-next-appointment-copy,
.mw-next-insurance-item .mw-next-finance-copy,
.mw-next-insurance-item .mw-next-appointment-copy,
.mw-next-appointment-item .mw-next-finance-copy,
.mw-next-appointment-item .mw-next-appointment-copy {
    grid-column: 2;
    grid-row: 1;
}

.mw-next-appointment-item:last-child,
.mw-next-finance-item:last-child,
.mw-next-insurance-item:last-child {
    border-bottom: 0;
}

.mw-next-appointment-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mw-next-appointment-meta {
    text-align: right;
}

.mw-next-family-section {
    margin-top: 1rem;
}

.mw-next-family-grid {
    margin-top: 0.75rem;
}

@media (min-width: 992px) {
    .mw-next-family-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mw-next-family-card {
    padding: 1.15rem;
}

.mw-next-family-heading {
    display: grid;
    gap: 0.35rem;
}

.mw-next-family-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.55rem;
    align-items: center;
}

.mw-next-family-meta strong {
    padding-left: 0.9rem;
    margin-left: 0;
    text-align: right;
    border-left: 1px solid rgba(129, 145, 176, 0.18);
}

.mw-next-allergies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.mw-next-allergy-badge {
    background: #fee2e2;
    color: #b91c1c;
}

.mw-next-prescription-card {
    padding: 1.15rem;
    margin-top: 0.75rem;
}

.mw-next-prescription-copy {
    display: flex;
    gap: 0.85rem;
}

.mw-next-prescription-copy i,
.mw-next-med-item i {
    color: rgb(54, 98, 235);
}

.mw-next-meds-list {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0;
}

.mw-next-med-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: #f8fbff;
}

.mw-next-stat-chip i,
.mw-next-prescription-copy i,
.mw-next-med-item i,
.mw-next-finance-item > .mw-next-finance-icon,
.mw-next-finance-item > .mw-next-insurance-icon,
.mw-next-finance-item > .mw-next-feature-icon,
.mw-next-finance-item > .mw-next-appointment-icon {
    flex-shrink: 0;
}

.mw-next-finance-copy,
.mw-next-appointment-copy,
.mw-next-activity-copy,
.mw-next-timeline-copy {
    flex: 1 1 auto;
}

.mw-next-finance-meta {
    display: grid;
    justify-items: start;
    gap: 0.45rem;
    align-content: center;
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    padding-top: 0.75rem;
    padding-left: 0;
    margin-left: 0;
    border-top: 1px solid rgba(129, 145, 176, 0.18);
    border-left: 0;
}

.mw-next-finance-meta strong,
.mw-next-appointment-meta strong,
.mw-next-finance-copy strong,
.mw-next-appointment-copy strong,
.mw-next-activity-copy strong,
.mw-next-timeline-copy strong,
.mw-next-family-meta strong {
    margin-top: 0.16rem;
}

.mw-next-finance-meta strong + span,
.mw-next-finance-copy strong + span,
.mw-next-finance-copy strong + small,
.mw-next-appointment-copy strong + span,
.mw-next-activity-copy strong + span,
.mw-next-timeline-copy strong + span,
.mw-next-family-meta span + strong {
    margin-top: 0.3rem;
}

.mw-next-primary-text {
    color: rgb(54, 98, 235);
}

.mw-next-insurance-item > .mw-next-primary-text,
.mw-next-appointment-item > .mw-next-appointment-meta {
    grid-column: 2;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(129, 145, 176, 0.18);
}

.mw-next-insurance-item > .mw-next-primary-text {
    display: block;
}

.mw-next-appointment-meta {
    text-align: left;
}

.mw-next-empty-note {
    margin: 0.95rem 0 0;
    padding: 0.95rem 1rem;
    border-radius: 0.95rem;
    background: #f8fbff;
    color: rgba(66, 82, 114, 0.88);
    border: 1px dashed rgba(129, 145, 176, 0.28);
}

.mw-next-activity-date {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    margin: 1rem 0 0.65rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(129, 145, 176, 0.15);
}

.mw-next-activity-group:first-child .mw-next-activity-date {
    border-top: 0;
    padding-top: 0;
}

.mw-next-iframe-shell {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 1.1rem;
    overflow: hidden;
    border: 1px solid rgba(129, 145, 176, 0.16);
    background: #e2e8f0;
}

.mw-next-iframe-panel {
    width: 100%;
    min-height: 35rem;
    border: 0;
    display: block;
    background: white;
}

.mw-next-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(129, 145, 176, 0.16);
    backdrop-filter: blur(18px);
}

.mw-next-bottom-scroll {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.65rem 0.75rem calc(env(safe-area-inset-bottom, 0px) + 0.65rem);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mw-next-bottom-scroll::-webkit-scrollbar {
    display: none;
}

.mw-next-bottom-link {
    min-width: 5.25rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    padding: 0.55rem 0.7rem;
    border-radius: 1rem;
    color: rgba(50, 65, 97, 0.72);
    font-size: 0.76rem;
    font-weight: 700;
}

.mw-next-bottom-link.is-active {
    color: white;
    background: rgb(54, 98, 235);
}

.mw-next-animate {
    opacity: 0;
    transform: translateY(16px);
    animation: mwNextFadeUp 0.4s ease-out forwards;
}

@keyframes mwNextFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mw-next-badge-blue,
.mw-next-badge-success,
.mw-next-badge-warning,
.mw-next-badge-muted,
.mw-next-badge-red-soft,
.mw-next-badge-blue-soft,
.mw-next-badge-teal-soft,
.mw-next-badge-cyan-soft,
.mw-next-badge-green-soft,
.mw-next-badge-pink-soft,
.mw-next-badge-purple-soft,
.mw-next-badge-amber-soft,
.mw-next-badge-slate-soft,
.mw-next-badge-teal,
.mw-next-badge-violet,
.mw-next-badge-amber,
.mw-next-badge-pink,
.mw-next-badge-green {
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.mw-next-badge-success { background: #dcfce7; color: #15803d; }
.mw-next-badge-warning { background: #fef3c7; color: #b45309; }
.mw-next-badge-muted { background: #e5e7eb; color: #4b5563; }
.mw-next-badge-blue { background: #dbeafe; color: #1d4ed8; }
.mw-next-badge-red-soft { background: #fee2e2; color: #b91c1c; }
.mw-next-badge-blue-soft { background: #dbeafe; color: #1d4ed8; }
.mw-next-badge-teal-soft { background: #ccfbf1; color: #0f766e; }
.mw-next-badge-cyan-soft { background: #cffafe; color: #0e7490; }
.mw-next-badge-green-soft { background: #dcfce7; color: #15803d; }
.mw-next-badge-pink-soft { background: #fce7f3; color: #be185d; }
.mw-next-badge-purple-soft { background: #ede9fe; color: #7c3aed; }
.mw-next-badge-amber-soft { background: #fef3c7; color: #b45309; }
.mw-next-badge-slate-soft { background: #e2e8f0; color: #475569; }
.mw-next-badge-teal { background: #ccfbf1; color: #0f766e; }
.mw-next-badge-violet { background: #ede9fe; color: #7c3aed; }
.mw-next-badge-amber { background: #fef3c7; color: #b45309; }
.mw-next-badge-pink { background: #fce7f3; color: #be185d; }
.mw-next-badge-green { background: #dcfce7; color: #15803d; }

.mw-next-icon-success { color: #15803d; }
.mw-next-icon-warning { color: #b45309; }

.mw-next-finance-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(94, 135, 255, 0.12);
    flex-shrink: 0;
}

.mw-next-card-surface {
    margin-top: 1rem;
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(33, 58, 110, 0.96), rgba(14, 116, 144, 0.96));
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mw-next-card-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    background: white;
}

.mw-next-id-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    border-radius: 1.75rem;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.28), transparent 30%),
        radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.22), transparent 28%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}

.mw-next-id-stage-copy {
    color: white;
}

.mw-next-id-stage-copy h2 {
    color: white;
    margin: 0.35rem 0 0.6rem;
}

.mw-next-id-stage-copy p {
    color: rgba(226, 232, 240, 0.88);
    max-width: 34rem;
}

.mw-next-id-device-wrap {
    display: flex;
    justify-content: center;
}

.mw-next-id-device {
    width: min(100%, 20rem);
    padding: 0.7rem;
    border-radius: 2.2rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mw-next-id-notch {
    width: 6.5rem;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    margin: 0 auto 0.8rem;
}

.mw-next-id-screen {
    min-height: 34.5rem;
    border-radius: 1.7rem;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(14, 165, 233, 0.18), transparent 20%),
        linear-gradient(160deg, #081224, #0f1f3d 55%, #132947);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.15rem 1.2rem 1rem;
    gap: 1rem;
}

.mw-next-id-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.mw-next-id-brand {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.88);
    font-weight: 800;
}

.mw-next-id-portrait {
    border-radius: 999px;
    overflow: hidden;
    width: 6.5rem;
    height: 6.5rem;
    min-height: 0;
    max-height: none;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.mw-next-id-photo {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.mw-next-id-photo.is-fallback {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(191, 219, 254, 0.82);
}

.mw-next-id-body {
    display: grid;
    gap: 0.4rem;
}

.mw-next-id-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.92);
    font-weight: 700;
}

.mw-next-id-body h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

.mw-next-id-body p {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(191, 219, 254, 0.84);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mw-next-id-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.2rem;
}

.mw-next-id-pill {
    border-radius: 999px;
    padding: 0.38rem 0.64rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(241, 245, 249, 0.94);
    font-size: 0.72rem;
    line-height: 1.2;
}

.mw-next-id-pill strong {
    color: white;
    margin-right: 0.2rem;
}

.mw-next-id-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.25rem;
    gap: 0.7rem;
    align-items: center;
}

.mw-next-id-emergency {
    display: grid;
    gap: 0.25rem;
}

.mw-next-id-label {
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

.mw-next-id-emergency strong {
    color: white;
    font-size: 0.82rem;
}

.mw-next-id-qr {
    width: 7.25rem;
    height: 7.25rem;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    flex-shrink: 0;
    box-sizing: border-box;
    justify-self: end;
    margin-right: 0.2rem;
    margin-bottom: 0.2rem;
}

.mw-next-id-qr-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: white;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.mw-next-id-qr-fallback {
    font-size: 2rem;
    color: #0f172a;
}

.mw-next-qr-panel {
    display: grid;
    gap: 1rem;
}

.mw-next-qr-box {
    min-height: 15rem;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.92), rgba(226, 232, 240, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mw-next-qr-box.is-fallback {
    flex-direction: column;
    gap: 0.75rem;
    color: rgba(51, 65, 85, 0.82);
    font-weight: 700;
}

.mw-next-qr-box.is-fallback i {
    font-size: 2rem;
}

.mw-next-qr-image {
    width: min(100%, 16rem);
    height: auto;
    display: block;
    border-radius: 1rem;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

@media (max-width: 767.98px) {
    .mw-next-sidebar {
        width: min(18rem, calc(100vw - 2.5rem));
        transform: translateX(-110%);
        transition: transform 0.24s ease;
        box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
    }

    .mw-next-wrap.is-mobile-sidebar-open .mw-next-sidebar {
        transform: translateX(0);
    }

    .mw-next-wrap.is-mobile-sidebar-open .mw-next-sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .mw-next-header {
        align-items: stretch;
        flex-direction: column;
    }

    .mw-next-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .mw-next-mobile-action-group {
        flex: 1 1 auto;
    }

    .mw-next-mobile-action-group .mw-next-header-action-button {
        min-height: 2.7rem;
        padding: 0.68rem 0.8rem;
        font-size: 0.84rem;
    }

    .mw-next-iframe-shell {
        margin-top: 0.35rem;
        margin-bottom: 0.85rem;
        border-radius: 0.95rem;
    }

    .mw-next-iframe-panel {
        min-height: 60vh;
    }

    .mw-next-family-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mw-next-family-actions .mw-next-action-button,
    .mw-next-family-actions .mw-next-pill-button {
        width: 100%;
        justify-content: center;
    }

    .mw-next-id-stage {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .mw-next-id-device {
        width: min(100%, 17.4rem);
        padding: 0.62rem;
    }

    .mw-next-id-screen {
        min-height: 30.5rem;
        padding: 0.82rem 0.95rem 1rem 0.82rem;
        gap: 0.82rem;
    }

    .mw-next-id-portrait {
        width: 5.4rem;
        height: 5.4rem;
    }

    .mw-next-id-body h3 {
        font-size: 1.08rem;
    }

    .mw-next-id-pill {
        padding: 0.34rem 0.56rem;
        font-size: 0.68rem;
    }

    .mw-next-id-footer {
        grid-template-columns: minmax(0, 1fr) 6.1rem;
        gap: 0.55rem;
    }

    .mw-next-id-qr {
        width: 6.1rem;
        height: 6.1rem;
        padding: 0;
        margin-right: 0.15rem;
        margin-bottom: 0.15rem;
    }

    .mw-next-page-subtitle {
        font-size: 0.92rem;
    }

    .mw-next-header-action-group {
        display: none !important;
    }

    .mw-next-feature-card,
    .mw-next-alert-banner,
    .mw-next-banner,
    .mw-next-appointment-item,
    .mw-next-prescription-head,
    .mw-next-finance-item,
    .mw-next-insurance-item,
    .mw-next-family-meta,
    .mw-next-stat-chip {
        flex-direction: column;
        align-items: stretch;
    }

    .mw-next-appointment-meta,
    .mw-next-finance-meta {
        text-align: left;
        justify-items: start;
        padding-left: 0;
        margin-left: 0;
        border-left: 0;
    }

    .mw-next-family-meta strong {
        padding-left: 0;
        text-align: left;
        border-left: 0;
    }

    .mw-next-feature-portrait {
        width: 4.6rem;
        height: 4.6rem;
    }
}
