:root {
    --clinic-primary: #4d92c8;
    --clinic-primary-dark: #2f668f;
    --clinic-accent: #8abce0;
    --clinic-bg: #f4f7fa;
    --clinic-text: #263b4b;
    --mind-blue-soft: #e9f3fb;
    --mind-blue-pale: #f4f9fd;
    --mind-gray: #afb2b5;
    --mind-gray-dark: #66727c;
}

body {
    background: radial-gradient(circle at top right, #e4f1fa 0, transparent 34%), var(--clinic-bg);
    color: var(--clinic-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.container-narrow {
    max-width: 920px;
}

.installer-container {
    max-width: 980px;
}

.surface-card {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(77, 146, 200, .14);
    border-radius: 1.25rem;
    box-shadow: 0 1.25rem 3rem rgba(45, 91, 126, .1);
}

.brand-mark {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.25rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--clinic-primary), var(--clinic-accent));
    color: white;
    font-size: 2rem;
    box-shadow: 0 .75rem 1.5rem rgba(23, 107, 104, .2);
}

.status-tile {
    height: 100%;
    padding: 1rem;
    background: #f7fbfa;
    border: 1px solid #e3efed;
    border-radius: .9rem;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .75rem;
    align-items: center;
}

.status-tile i {
    grid-row: 1 / span 2;
    font-size: 1.45rem;
    color: var(--clinic-primary);
}

.status-tile strong,
.status-tile small {
    display: block;
}

.status-tile small {
    color: #607774;
}

.btn-primary {
    --bs-btn-bg: var(--clinic-primary);
    --bs-btn-border-color: var(--clinic-primary);
    --bs-btn-hover-bg: var(--clinic-primary-dark);
    --bs-btn-hover-border-color: var(--clinic-primary-dark);
}

.error-code {
    font-size: 4rem;
    line-height: 1;
    font-weight: 800;
    color: var(--clinic-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--clinic-accent);
    box-shadow: 0 0 0 .25rem rgba(77, 146, 200, .16);
}

.requirement-ok {
    color: #18794e;
}

.requirement-error {
    color: #b42318;
}

.tracking-wide {
    letter-spacing: .09em;
}

.step-number {
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    margin-right: .4rem;
    border-radius: .55rem;
    background: #e2f3ef;
    color: var(--clinic-primary);
    font-size: .85rem;
}

.requirement-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border-radius: .75rem;
    background: #f7fbfa;
}

.requirement-row i {
    font-size: 1.1rem;
}

.requirement-row strong,
.requirement-row small {
    display: block;
}

.requirement-row small {
    color: #607774;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .surface-card {
        border-radius: 1rem;
    }

    .display-6 {
        font-size: 1.8rem;
    }
}

/* Authentication */
.auth-body {
    min-height: 100vh;
    background: #edf3f8;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 44%) 1fr;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 7rem);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #244f70, #397dad 62%, #65a6d4);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
}

.auth-brand-panel::before {
    width: 32rem;
    height: 32rem;
    right: -13rem;
    top: -9rem;
}

.auth-brand-panel::after {
    width: 22rem;
    height: 22rem;
    left: -9rem;
    bottom: -10rem;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 31rem;
}

.mind-auth-logo {
    width: min(250px, 72%);
    height: 190px;
    margin-bottom: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    filter: drop-shadow(0 .9rem 1.5rem rgba(20, 48, 70, .2));
}

.auth-brand-content .brand-mark {
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, .16);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, .18);
}

.auth-eyebrow {
    display: block;
    margin-bottom: .6rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #d6eafb;
}

.auth-brand-content h1 {
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 750;
    letter-spacing: -.04em;
}

.auth-brand-content p {
    max-width: 28rem;
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .78);
}

.auth-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 2.5rem;
    font-size: .88rem;
    color: rgba(255, 255, 255, .88);
}

.auth-trust i {
    margin-right: .4rem;
    color: #d6eafb;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 2rem;
    background: #fff;
}

.auth-form-wrap {
    width: min(100%, 430px);
}

.auth-heading {
    margin-bottom: 2rem;
}

.auth-heading h2 {
    margin-bottom: .5rem;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -.03em;
}

.auth-heading p {
    margin: 0;
    color: #657876;
    line-height: 1.6;
}

.mobile-brand {
    display: none;
    margin-bottom: 2rem;
    color: var(--clinic-primary);
    font-weight: 700;
}

.mobile-brand img {
    width: 135px;
    height: 86px;
    object-fit: contain;
}

.auth-form {
    display: grid;
    gap: 1.3rem;
}

.auth-form .form-control,
.auth-form .input-group-text {
    min-height: 3.15rem;
}

.input-icon {
    position: relative;
}

.input-icon>i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #718783;
}

.input-icon .form-control {
    padding-left: 2.8rem;
}

.input-password .input-group-text {
    background: #fff;
    border-right: 0;
    color: #718783;
}

.input-password .form-control {
    border-left: 0;
}

.input-password .form-control:focus {
    border-left: 0;
}

.form-link,
.back-link {
    color: var(--clinic-primary);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-security-note {
    margin-top: 1.75rem;
    color: #718783;
    text-align: center;
    font-size: .82rem;
}

.auth-page-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
    border-radius: 1rem;
    background: #e5f4f1;
    color: var(--clinic-primary);
    font-size: 1.5rem;
}

/* Admin shell */
.admin-body {
    min-height: 100vh;
    background: #f3f6f9;
}

.admin-sidebar {
    position: fixed;
    z-index: 1035;
    inset: 0 auto 0 0;
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 1.2rem .9rem;
    background: #254e6b;
    color: #fff;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .4rem .65rem 1.5rem;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 750;
    text-decoration: none;
}

.mind-sidebar-brand {
    justify-content: center;
    min-height: 92px;
    padding: .25rem .3rem 1rem;
}

.mind-sidebar-brand img {
    width: 142px;
    height: 82px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(10, 32, 48, .18));
}

.mind-sidebar-brand>span {
    display: none;
}

.sidebar-logo {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: .75rem;
    background: linear-gradient(135deg, #4d92c8, #8abce0);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-menu-group {
    margin: .2rem 0;
}

.sidebar-group-toggle {
    width: 100%;
    min-height: 2.85rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .75rem;
    border: 0;
    border-radius: .65rem;
    color: #b8cede;
    background: transparent;
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.sidebar-group-toggle>i:first-child {
    width: 1.2rem;
    font-size: 1rem;
    text-align: center;
}

.sidebar-group-toggle>span {
    min-width: 0;
    flex: 1;
}

.sidebar-group-toggle .sidebar-group-chevron {
    width: auto;
    font-size: .72rem;
    transition: transform .18s ease;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-links {
    padding: .15rem 0 .3rem .35rem;
}

.sidebar-group-links .sidebar-link {
    padding-block: .6rem;
}

.nav-section {
    display: block;
    padding: 1.25rem .75rem .45rem;
    color: #9ebdd3;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: .15rem 0;
    padding: .72rem .8rem;
    border-radius: .7rem;
    color: #d5e3ed;
    text-decoration: none;
    transition: .18s ease;
}

.sidebar-link i {
    width: 1.25rem;
    font-size: 1.08rem;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.sidebar-link.active {
    color: #fff;
    background: #3d80b0;
    box-shadow: inset 3px 0 #a8d2ef;
}

.sidebar-footer {
    display: flex;
    gap: .55rem;
    align-items: center;
    padding: .8rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #a9c2d3;
    font-size: .78rem;
}

.admin-main {
    min-height: 100vh;
    margin-left: 260px;
}

.admin-topbar {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid #dce6ee;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-spacer {
    flex: 1;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .35rem .45rem;
    border: 0;
    background: transparent;
    color: #233f3d;
    text-align: left;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .8rem;
    background: #dff2ee;
    color: var(--clinic-primary);
    font-weight: 800;
}

.small-avatar {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: .65rem;
}

.user-copy {
    display: grid;
    line-height: 1.25;
}

.user-copy strong {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
}

.user-copy small {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #71817f;
    font-size: .7rem;
}

.admin-content {
    padding: 2rem;
}

.content-container {
    max-width: 1440px;
    margin: 0 auto;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    z-index: 1030;
    inset: 0;
    background: rgba(6, 31, 30, .5);
}

.icon-button {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border: 1px solid #dce6ee;
}

/* Admin components */
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    margin: .15rem 0 .25rem;
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.035em;
}

.page-heading p {
    margin: 0;
    color: #6b7d7a;
}

.page-eyebrow {
    color: var(--clinic-primary);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.date-chip,
.read-only-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .8rem;
    border: 1px solid #dce9e7;
    border-radius: .65rem;
    background: #fff;
    color: #607572;
    font-size: .82rem;
}

.read-only-chip {
    color: var(--clinic-primary);
    background: #e9f6f3;
}

.panel-card {
    border: 1px solid #dfe8ef;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .3rem 1.2rem rgba(22, 66, 63, .04);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid #e8efed;
}

.panel-header h2,
.section-heading h2 {
    margin: 0 0 .2rem;
    font-size: 1rem;
    font-weight: 750;
}

.panel-header p,
.section-heading p {
    margin: 0;
    color: #71817f;
    font-size: .82rem;
}

.section-heading {
    margin-bottom: 1.25rem;
}

.metric-card {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid #dfe8ef;
    border-radius: .95rem;
    background: #fff;
}

.metric-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: .85rem;
    font-size: 1.3rem;
}

.tone-teal {
    background: #e0f4f0;
    color: #17756f;
}

.tone-blue {
    background: #e5f0fb;
    color: #27689e;
}

.tone-amber {
    background: #fff1d9;
    color: #9b6209;
}

.tone-green {
    background: #e4f5e9;
    color: #267a42;
}

.tone-purple {
    background: #eee9fa;
    color: #6950a0;
}

.metric-card strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1.1;
}

.metric-card span {
    color: #6c7e7b;
    font-size: .78rem;
}

.activity-list {
    padding: .25rem 1.35rem;
}

.activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .8rem;
    padding: .9rem 0;
    border-bottom: 1px solid #edf1f4;
}

.activity-item:last-child {
    border: 0;
}

.activity-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--clinic-accent);
}

.activity-item strong,
.activity-item small {
    display: block;
}

.activity-item strong {
    font-size: .86rem;
    text-transform: capitalize;
}

.activity-item small,
.activity-item time {
    color: #748582;
    font-size: .74rem;
}

.content-empty {
    padding: 2.5rem;
    color: #71817f;
    text-align: center;
}

.content-empty>i,
.empty-icon {
    color: #90aaa6;
    font-size: 2rem;
}

.content-empty p {
    margin: .5rem 0 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px auto;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e8efed;
}

.search-control {
    position: relative;
}

.search-control i {
    position: absolute;
    top: 50%;
    left: .9rem;
    transform: translateY(-50%);
    color: #83928f;
}

.search-control input {
    padding-left: 2.5rem;
}

.data-table thead th {
    padding: .8rem 1rem;
    border-bottom-color: #dce6ee;
    background: #f8fafc;
    color: #647572;
    font-size: .69rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody td {
    padding: .85rem 1rem;
    border-bottom-color: #edf1f4;
    font-size: .82rem;
}

.table-user {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.table-user strong,
.table-user small {
    display: block;
}

.table-user small,
.table-muted {
    color: #71817f;
    font-size: .76rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .55rem;
    border-radius: 2rem;
    font-size: .72rem;
    font-weight: 650;
}

.status-badge span {
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: currentColor;
}

.status-ativo {
    color: #267a42;
    background: #e6f6eb;
}

.status-inativo {
    color: #667572;
    background: #eef1f0;
}

.status-bloqueado {
    color: #aa3027;
    background: #fce9e7;
}

.pagination-wrap {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
}

.pagination {
    --bs-pagination-color: var(--clinic-primary);
    --bs-pagination-active-bg: var(--clinic-primary);
    --bs-pagination-active-border-color: var(--clinic-primary);
}

.form-stack {
    display: grid;
    gap: 1.25rem;
}

.form-aside {
    top: 6rem;
}

.profile-options {
    display: grid;
    gap: .55rem;
}

.profile-option {
    display: flex;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid #e2ebe9;
    border-radius: .75rem;
    cursor: pointer;
}

.profile-option strong,
.profile-option small {
    display: block;
}

.profile-option small {
    color: #71817f;
    font-size: .72rem;
    line-height: 1.35;
}

.permission-groups {
    display: grid;
    gap: 1rem;
}

.permission-group {
    overflow: hidden;
}

.permission-group>h3 {
    margin: 0 0 .65rem;
    color: #607572;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.permission-grid {
    display: grid;
    gap: .5rem;
}

.permission-override {
    display: grid;
    grid-template-columns: 1fr 110px;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: .65rem;
    background: #f7f9fb;
}

.permission-override strong,
.permission-override small {
    display: block;
}

.permission-override strong {
    font-size: .78rem;
}

.permission-override small {
    color: #84918f;
    font-size: .67rem;
}

.session-item {
    display: flex;
    gap: .7rem;
    padding: .7rem 0;
    border-bottom: 1px solid #edf1f4;
}

.session-item>i {
    color: var(--clinic-primary);
}

.session-item strong,
.session-item small {
    display: block;
}

.session-item strong {
    font-size: .78rem;
}

.session-item small {
    color: #71817f;
    font-size: .68rem;
    overflow-wrap: anywhere;
}

.profile-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    border: 1px solid #dfe8ef;
    border-radius: 1rem;
    background: #fff;
}

.profile-card-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    margin-bottom: .8rem;
    border-radius: .8rem;
    background: #e3f3f0;
    color: var(--clinic-primary);
    font-size: 1.2rem;
}

.profile-type {
    color: #82918f;
    font-size: .63rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.profile-card h2 {
    margin: .35rem 0;
    font-size: 1.02rem;
}

.profile-card p {
    flex: 1;
    color: #6f807e;
    font-size: .75rem;
}

.profile-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: .9rem;
    color: #71817f;
    font-size: .68rem;
}

.profile-stats strong {
    color: #244341;
    font-size: .86rem;
}

.inline-create-form {
    display: grid;
    grid-template-columns: 1fr .75fr .75fr 1.2fr auto;
    align-items: end;
    gap: .75rem;
    margin-bottom: 1.2rem;
    padding: 1rem;
    border-radius: .75rem;
    background: #f2f8f6;
}

.permission-catalog {
    display: grid;
    gap: 1rem;
}

.permission-catalog h3 {
    margin-bottom: .5rem;
    font-size: .78rem;
    text-transform: capitalize;
}

.permission-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.permission-tags span {
    padding: .3rem .55rem;
    border: 1px solid #dfe8ef;
    border-radius: 2rem;
    background: #f8fafc;
    color: #607572;
    font-size: .68rem;
}

.permission-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e8efed;
}

.permission-group-header h3 {
    margin: 0;
    font-size: .9rem;
    text-transform: capitalize;
}

.permission-group-header small {
    color: #71817f;
}

.permission-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.permission-check {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem 1.1rem;
    border-right: 1px solid #edf1f4;
    border-bottom: 1px solid #edf1f4;
}

.permission-check strong,
.permission-check small {
    display: block;
}

.permission-check strong {
    font-size: .77rem;
}

.permission-check small {
    color: #83918f;
    font-size: .65rem;
}

.audit-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr .8fr .8fr auto;
    align-items: end;
    gap: .7rem;
    padding: 1rem;
    border-bottom: 1px solid #e8efed;
}

.audit-table {
    min-width: 1050px;
}

.action-label {
    text-transform: capitalize;
}

.audit-details summary {
    color: var(--clinic-primary);
    cursor: pointer;
    font-weight: 650;
}

.audit-details pre {
    max-width: 300px;
    max-height: 180px;
    margin-top: .5rem;
    padding: .6rem;
    overflow: auto;
    border-radius: .5rem;
    background: #f4f7f6;
    color: #425653;
    font-size: .64rem;
    white-space: pre-wrap;
}

@media (max-width: 1199.98px) {
    .permission-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-create-form,
    .audit-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-create-form button,
    .audit-filters button {
        align-self: end;
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: 100vh;
    }

    .mobile-brand {
        display: block;
    }

    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-topbar {
        padding: 0 1rem;
    }

    .admin-content {
        padding: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading>.btn {
        width: 100%;
    }

    .user-copy {
        display: none;
    }

    .filter-bar,
    .audit-filters,
    .inline-create-form {
        grid-template-columns: 1fr;
    }

    .permission-check-grid {
        grid-template-columns: 1fr;
    }

    .activity-item {
        grid-template-columns: auto 1fr;
    }

    .activity-item time {
        grid-column: 2;
    }

    .permission-override {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 1rem .75rem;
    }

    .panel-card {
        border-radius: .8rem;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 1.25rem;
    }

    .auth-heading h2 {
        font-size: 1.65rem;
    }

    .date-chip,
    .read-only-chip {
        display: none;
    }

    .data-table tbody td,
    .data-table thead th {
        padding-left: .75rem;
        padding-right: .75rem;
    }
}

/* Clinical and operational modules */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8efed;
}

.compact-create {
    display: grid;
    grid-template-columns: 1fr .55fr 1fr auto;
    align-items: end;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e8efed;
    background: #f8fafc;
}

.compact-create-room {
    grid-template-columns: 1fr .6fr 1fr auto;
}

.filter-single {
    grid-template-columns: 1fr auto;
}

.calendar-color {
    width: .75rem;
    height: 2.25rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    background: var(--event-color, #4d92c8);
}

.code-chip,
.tag,
.wait-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .55rem;
    border-radius: 2rem;
    background: #edf5f3;
    color: #46625f;
    font-size: .7rem;
    font-weight: 650;
}

.tag {
    margin: .1rem;
}

.wait-chip {
    margin-top: .35rem;
    background: #fff0d5;
    color: #8b5b0b;
}

.check-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.check-pills label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-pills label span {
    display: block;
    padding: .45rem .65rem;
    border: 1px solid #dbe8e5;
    border-radius: .6rem;
    color: #607572;
    cursor: pointer;
    font-size: .76rem;
}

.check-pills label input:checked+span {
    border-color: #75bdb5;
    background: #e5f5f2;
    color: var(--clinic-primary);
    font-weight: 700;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1.2fr repeat(4, 1fr) auto;
    gap: .55rem;
    margin-bottom: .55rem;
}

.agenda-toolbar,
.report-filters {
    display: grid;
    grid-template-columns: auto 155px 140px minmax(180px, 1fr) minmax(180px, 1fr) auto;
    align-items: end;
    gap: .7rem;
    padding: 1rem 1.25rem;
}

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(175px, 1fr));
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: .35rem;
}

.agenda-grid.one-column {
    grid-template-columns: 1fr;
    overflow: visible;
}

.agenda-day {
    min-width: 0;
    border: 1px solid #dee9e7;
    border-radius: .9rem;
    background: #fff;
    overflow: hidden;
}

.agenda-day>header {
    display: flex;
    justify-content: space-between;
    padding: .8rem .9rem;
    background: #f7f9fb;
}

.agenda-day>header strong {
    color: var(--clinic-primary);
}

.agenda-day>header span {
    color: #71817f;
    font-size: .78rem;
}

.agenda-events {
    display: grid;
    gap: .5rem;
    padding: .55rem;
}

.agenda-empty {
    padding: 2rem .5rem;
    color: #9aaba9;
    text-align: center;
    font-size: .75rem;
}

.appointment-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .55rem;
    min-width: 0;
    padding: .65rem;
    border-left: 3px solid var(--event-color);
    border-radius: .6rem;
    background: #f7f9fb;
}

.appointment-time strong,
.appointment-time small,
.appointment-copy strong,
.appointment-copy span,
.appointment-copy small {
    display: block;
}

.appointment-time strong {
    font-size: .78rem;
}

.appointment-time small,
.appointment-copy small {
    color: #798986;
    font-size: .65rem;
}

.appointment-copy {
    min-width: 0;
}

.appointment-copy strong,
.appointment-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-copy strong {
    font-size: .76rem;
}

.appointment-copy span {
    color: #536865;
    font-size: .67rem;
}

.status-card-cancelado,
.status-card-faltou,
.status-card-remarcado {
    opacity: .55;
}

.calendar-month {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    border-top: 1px solid #dce6ee;
    border-left: 1px solid #dce6ee;
    overflow-x: auto;
}

.calendar-day {
    min-height: 125px;
    padding: .55rem;
    border-right: 1px solid #dce6ee;
    border-bottom: 1px solid #dce6ee;
    background: #fff;
}

.calendar-day.outside {
    background: #f6f8f7;
    opacity: .55;
}

.calendar-day>strong {
    display: block;
    margin-bottom: .35rem;
    color: #607572;
    font-size: .75rem;
}

.calendar-event {
    display: block;
    margin: .25rem 0;
    padding: .25rem .4rem;
    overflow: hidden;
    border-left: 3px solid var(--event-color);
    border-radius: .3rem;
    background: #edf5f3;
    color: #284b48;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .64rem;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid #edf1f4;
}

.list-row:last-child {
    border-bottom: 0;
}

.list-row strong,
.list-row small {
    display: block;
}

.list-row strong {
    font-size: .8rem;
}

.list-row small {
    color: #71817f;
    font-size: .7rem;
}

.autocomplete {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    z-index: 1040;
    top: calc(100% + .3rem);
    right: 0;
    left: 0;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #dce6ee;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 .8rem 2rem rgba(20, 60, 57, .15);
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-result {
    display: block;
    width: 100%;
    padding: .7rem .85rem;
    border: 0;
    border-bottom: 1px solid #edf1f4;
    background: #fff;
    color: #294542;
    text-align: left;
}

.autocomplete-result:hover {
    background: #edf6fc;
}

.autocomplete-result strong,
.autocomplete-result small {
    display: block;
}

.autocomplete-result small {
    color: #71817f;
    font-size: .7rem;
}

.available-slots {
    min-height: 2.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding: .6rem;
    border-radius: .65rem;
    background: #f4f8f7;
}

.slot-button {
    padding: .35rem .55rem;
    border: 1px solid #cce1dd;
    border-radius: .45rem;
    background: #fff;
    color: var(--clinic-primary);
    font-size: .72rem;
}

.summary-list {
    display: grid;
    gap: 0;
}

.summary-list>div {
    padding: .7rem 0;
    border-bottom: 1px solid #edf1f4;
}

.summary-list span,
.summary-list strong {
    display: block;
}

.summary-list span {
    color: #71817f;
    font-size: .68rem;
}

.summary-list strong {
    font-size: .82rem;
}

.professional-appointment {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf1f4;
}

.professional-appointment.waiting {
    border-left: 4px solid #e6a52d;
    background: #fffbf4;
}

.appointment-hour strong,
.appointment-hour small {
    display: block;
}

.appointment-hour strong {
    font-size: 1rem;
}

.appointment-hour small {
    color: #71817f;
    font-size: .7rem;
}

.shared-card {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf1f4;
}

.shared-card strong,
.shared-card small {
    display: block;
}

.shared-card small {
    color: #71817f;
    font-size: .68rem;
}

.shared-card p {
    margin: .7rem 0;
    color: #3e5653;
    font-size: .78rem;
    white-space: pre-wrap;
}

.patient-context {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid #dee9e7;
    border-radius: .8rem;
    background: #dee9e7;
}

.patient-context>div {
    padding: .8rem 1rem;
    background: #fff;
}

.patient-context span,
.patient-context strong {
    display: block;
}

.patient-context span {
    color: #71817f;
    font-size: .66rem;
}

.patient-context strong {
    font-size: .78rem;
}

.clinical-tabs {
    gap: .35rem;
}

.clinical-tabs .nav-link {
    border: 1px solid #dce6ee;
    background: #fff;
    color: #59706d;
    white-space: nowrap;
    font-size: .78rem;
}

.clinical-tabs .nav-link.active {
    border-color: var(--clinic-primary);
    background: var(--clinic-primary);
}

.clinical-textarea {
    min-height: 110px;
}

.clinical-editor {
    min-height: 280px;
    line-height: 1.65;
}

.finalized-evolution {
    min-height: 200px;
    padding: 1.25rem;
    border: 1px solid #dce6ee;
    border-radius: .7rem;
    background: #f8fafc;
    line-height: 1.7;
    white-space: pre-wrap;
}

.evolution-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1rem;
    border-bottom: 1px solid #edf1f4;
    color: #294542;
    text-decoration: none;
}

.evolution-link strong,
.evolution-link small {
    display: block;
}

.evolution-link strong {
    font-size: .76rem;
}

.evolution-link small {
    color: #71817f;
    font-size: .65rem;
}

.recipe-item {
    display: grid;
    grid-template-columns: 1.35fr repeat(6, 1fr) auto;
    gap: .45rem;
    margin-bottom: .5rem;
}

.exam-card {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf1f4;
}

.exam-card strong,
.exam-card small {
    display: block;
}

.exam-card small {
    margin-bottom: .4rem;
    color: #71817f;
    font-size: .68rem;
}

.exam-result-form {
    display: grid;
    grid-template-columns: 130px 1fr 1fr 120px auto;
    gap: .45rem;
}

.cash-total {
    padding: 1.25rem;
    border-radius: .8rem;
    background: #e8f5f2;
}

.cash-total span,
.cash-total strong,
.cash-total small {
    display: block;
}

.cash-total strong {
    margin: .25rem 0;
    color: var(--clinic-primary);
    font-size: 1.8rem;
}

.cash-total small {
    color: #617a76;
}

.payment-method-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr .6fr 1fr auto;
    gap: .5rem;
    margin-top: .5rem;
}

.finance-summary {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: .7rem;
    background: #f3f8f7;
}

.finance-summary span {
    color: #71817f;
    font-size: .75rem;
}

.finance-summary strong {
    margin-left: .3rem;
    color: #294542;
}

.report-filters {
    grid-template-columns: 150px 150px minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    margin-top: 1rem;
}

.rule-grid>div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: .65rem .75rem;
    border: 1px solid #e1ebe9;
    border-radius: .65rem;
}

.rule-grid strong {
    font-size: .75rem;
}

.rule-grid span {
    font-size: .66rem;
}

.dashboard-appointment {
    display: grid;
    grid-template-columns: auto 50px 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid #edf1f4;
}

.dashboard-appointment time {
    font-weight: 750;
}

.dashboard-appointment strong,
.dashboard-appointment small {
    display: block;
}

.dashboard-appointment strong {
    font-size: .8rem;
}

.dashboard-appointment small {
    color: #71817f;
    font-size: .68rem;
}

.validation-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .7rem;
    margin: 1.5rem 0;
    text-align: left;
}

.validation-data>div {
    padding: .75rem;
    border-radius: .6rem;
    background: #f5f8f7;
}

.validation-data span,
.validation-data strong {
    display: block;
}

.validation-data span {
    color: #71817f;
    font-size: .68rem;
}

.validation-data strong {
    font-size: .82rem;
}

.receipt-sheet {
    min-height: 240mm;
}

.receipt-sheet>h2 {
    margin-bottom: .55rem;
    color: #1d4f6c;
}

.receipt-welcome {
    max-width: 560px;
    margin: 0 auto 1.75rem;
    color: #5d747f;
    text-align: center;
    font-size: .9rem;
    line-height: 1.55;
}

.receipt-data {
    gap: .9rem;
}

.receipt-data>div {
    padding: 1rem;
    border: 1px solid #dfeaf0;
    border-radius: 8px;
    background: #f8fbfc;
}

.receipt-data .receipt-date {
    border-color: #cfe4f1;
    background: #eef7fc;
}

.receipt-data .receipt-date strong {
    color: #246b94;
    font-size: 1rem;
}

.receipt-data .receipt-value {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.receipt-data .receipt-value strong {
    color: #1f7651;
    font-size: 1rem;
}

.receipt-guidance {
    margin-top: 1.5rem;
    padding: 1rem 1.15rem;
    border-left: 4px solid #4d92c8;
    color: #35596e;
    background: #f1f7fb;
}

.receipt-guidance strong {
    display: flex;
    gap: .45rem;
    align-items: center;
    font-size: .88rem;
}

.receipt-guidance p {
    margin: .45rem 0 0;
    color: #607986;
    font-size: .8rem;
    line-height: 1.55;
}

/* Protected printing */
.print-body {
    min-height: 100vh;
    padding: 4rem 1rem;
    background: #e5ebf0;
}

.print-toolbar {
    position: fixed;
    z-index: 10;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: .5rem;
}

.document-sheet {
    position: relative;
    width: min(100%, 210mm);
    min-height: 297mm;
    margin: 0 auto;
    padding: 22mm 20mm;
    background: #fff;
    color: #172b29;
    box-shadow: 0 1rem 3rem rgba(20, 50, 48, .12);
}

.document-page-watermark {
    position: fixed;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: min(54vw, 470px);
    max-height: 48vh;
    opacity: .045;
    object-fit: contain;
    pointer-events: none;
    transform: translate(-50%, -47%);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.print-toolbar,
.document-sheet>* {
    position: relative;
    z-index: 6;
}

.document-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4d92c8;
}

.document-header h1 {
    margin: 0;
    font-size: 1.25rem;
}

.document-header p {
    margin: .2rem 0 0;
    color: #647572;
    font-size: .72rem;
}

.document-logo {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: .7rem;
    background: #4d92c8;
    color: #fff;
    font-size: 1.4rem;
}

.mind-print-logo {
    width: 4.4rem;
    height: 3.8rem;
    padding: .2rem;
    border-radius: .45rem;
    background: #fff;
}

.mind-print-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mind-home-logo {
    width: min(230px, 70%);
    height: 180px;
    object-fit: contain;
}

.mind-mini-logo {
    width: 42px;
    height: 32px;
    margin-right: .35rem;
    object-fit: contain;
    vertical-align: middle;
}

.document-sheet>h2 {
    margin: 2rem 0 1rem;
    text-align: center;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.document-patient {
    padding: .75rem;
    border-radius: .5rem;
    background: #f4f7f6;
    font-size: .78rem;
}

.document-content {
    min-height: 360px;
    padding: 2rem 0;
    line-height: 1.8;
    white-space: pre-wrap;
}

.document-sheet footer {
    margin-top: 3rem;
    text-align: center;
    font-size: .7rem;
}

.document-sheet footer code,
.document-sheet footer small {
    display: block;
}

.document-signature {
    width: 280px;
    margin: 0 auto 1.5rem;
}

.document-signature>span {
    display: block;
    border-top: 1px solid #334;
}

.document-signature strong,
.document-signature small {
    display: block;
}

.pdf-link {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

.recipe-print-items {
    min-height: 380px;
    padding: 2rem 0 2rem 1.5rem;
}

.recipe-print-items li {
    margin-bottom: 1.4rem;
}

.recipe-print-items p {
    margin: .25rem 0;
    font-size: .82rem;
}

@media (max-width: 1199.98px) {
    .recipe-item {
        grid-template-columns: repeat(4, 1fr);
    }

    .recipe-item button {
        grid-column: -2;
    }

    .exam-card {
        grid-template-columns: 1fr;
    }

    .exam-result-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .rule-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agenda-toolbar {
        grid-template-columns: repeat(3, 1fr);
    }

    .agenda-toolbar .btn-group {
        grid-column: span 3;
    }

    .report-filters {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {

    .compact-create,
    .compact-create-room,
    .schedule-row,
    .recipe-item,
    .payment-method-row,
    .exam-result-form,
    .report-filters,
    .agenda-toolbar {
        grid-template-columns: 1fr;
    }

    .agenda-toolbar .btn-group {
        grid-column: auto;
    }

    .patient-context,
    .validation-data,
    .rule-grid {
        grid-template-columns: 1fr 1fr;
    }

    .appointment-card {
        grid-template-columns: auto 1fr;
    }

    .appointment-actions {
        grid-column: 2;
    }

    .finance-summary {
        flex-direction: column;
        gap: .4rem;
    }

    .document-sheet {
        min-height: auto;
        padding: 1.5rem;
    }

    .print-body {
        padding: 4rem .25rem .25rem;
    }
}

@media (max-width: 575.98px) {

    .patient-context,
    .validation-data,
    .rule-grid {
        grid-template-columns: 1fr;
    }

    .professional-appointment {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .professional-appointment>div:last-child {
        width: 100%;
    }

    .professional-appointment .btn {
        width: 100%;
    }

    .dashboard-appointment {
        grid-template-columns: auto 42px 1fr;
    }

    .dashboard-appointment .tag {
        grid-column: 3;
        justify-self: start;
    }
}

.media-preview {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 3px solid #e5efed;
    border-radius: 1rem;
}

/* Dashboard inspired by the operational overview */
.topbar-welcome {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    min-width: 360px;
}

.topbar-welcome strong {
    color: #142927;
    font-size: 1rem;
    white-space: nowrap;
}

.topbar-welcome span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #6a7c79;
    font-size: .78rem;
    white-space: nowrap;
}

.topbar-welcome i {
    color: var(--clinic-primary);
    font-size: 1rem;
}

.topbar-search {
    position: relative;
    width: min(36vw, 520px);
    margin: 0 auto;
}

.topbar-search>i {
    position: absolute;
    top: 50%;
    left: .9rem;
    transform: translateY(-50%);
    color: #6f827f;
}

.topbar-search input {
    width: 100%;
    height: 2.65rem;
    padding: 0 1rem 0 2.55rem;
    border: 1px solid #dbe5e3;
    border-radius: .6rem;
    outline: 0;
    background: #fbfdfc;
    color: #28413e;
    font-size: .78rem;
}

.topbar-search input:focus {
    border-color: #73bbb3;
    box-shadow: 0 0 0 .2rem rgba(66, 183, 166, .12);
}

.topbar-notification {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    margin: 0 .6rem;
    padding: 0;
    border: 0;
    border-radius: .7rem;
    color: #294441;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.topbar-notification:hover {
    background: #eef6f4;
    color: var(--clinic-primary);
}

.topbar-notification>span {
    position: absolute;
    top: -.05rem;
    right: -.05rem;
    min-width: 1.05rem;
    height: 1.05rem;
    display: grid;
    place-items: center;
    padding: 0 .2rem;
    border: 2px solid #fff;
    border-radius: 1rem;
    background: #db5146;
    color: #fff;
    font-size: .55rem;
    font-weight: 800;
}

.topbar-notification-menu {
    width: min(360px, calc(100vw - 1.5rem));
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce7e5;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(27, 61, 73, .16);
}

.topbar-notification-menu>header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid #e6edeb;
    background: #f8fbfa;
}

.topbar-notification-menu>header strong {
    color: #243f3c;
    font-size: .88rem;
}

.topbar-notification-menu>header small {
    color: #7b8b88;
    font-size: .68rem;
}

.topbar-notification-item {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    padding: .8rem 1rem;
    border-bottom: 1px solid #edf1f0;
    color: #294844;
    text-decoration: none;
}

.topbar-notification-item:hover {
    color: #176b64;
    background: #f3f9f7;
}

.topbar-notification-item>i:first-child {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #347fa8;
    background: #eaf4f9;
}

.topbar-notification-item>span {
    min-width: 0;
    display: flex;
    gap: .35rem;
    align-items: baseline;
}

.topbar-notification-item strong {
    font-size: .88rem;
}

.topbar-notification-item small {
    overflow: hidden;
    color: #6e817e;
    font-size: .73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-notification-item>i:last-child {
    color: #9aaba8;
    font-size: .7rem;
}

.topbar-notification-empty {
    display: flex;
    gap: .55rem;
    align-items: center;
    padding: 1rem;
    color: #66817a;
    font-size: .78rem;
}

.sidebar-footer button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .35rem;
    border: 0;
    background: transparent;
    color: #b7d3d0;
    font-size: .78rem;
    text-align: left;
}

.sidebar-footer button:hover {
    color: #fff;
}

.sidebar-footer button i {
    width: 1.6rem;
    height: 1.6rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    transition: transform .2s ease;
}

.dashboard-page {
    display: grid;
    gap: 1rem;
}

.dashboard-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .25rem 0 .15rem;
}

.dashboard-titlebar h1 {
    margin: 0;
    color: #102321;
    font-size: clamp(1.7rem, 2.6vw, 2.15rem);
    font-weight: 780;
    letter-spacing: -.04em;
}

.dashboard-titlebar p {
    margin: .25rem 0 0;
    color: #70817f;
    font-size: .82rem;
}

.dashboard-new-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding-inline: 1.2rem;
    box-shadow: 0 .4rem 1rem rgba(23, 107, 104, .13);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
}

.dashboard-metric {
    min-width: 0;
    min-height: 94px;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .95rem;
    border: 1px solid #dce6ee;
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 .2rem .75rem rgba(28, 64, 60, .035);
}

.dashboard-metric-icon {
    width: 2.85rem;
    height: 2.85rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    font-size: 1.22rem;
}

.tone-red {
    background: #fceae7;
    color: #cf4138;
}

.tone-gray {
    background: #edf1f0;
    color: #667875;
}

.dashboard-metric div {
    min-width: 0;
}

.dashboard-metric span:not(.dashboard-metric-icon) {
    display: block;
    margin-bottom: .18rem;
    overflow: hidden;
    color: #637370;
    font-size: .69rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-metric strong {
    display: block;
    overflow: hidden;
    color: #087d77;
    font-size: clamp(1.25rem, 1.8vw, 1.62rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, .95fr);
    gap: 1rem;
    align-items: stretch;
}

.dashboard-side-stack {
    display: grid;
    grid-template-rows: minmax(260px, 1fr) auto;
    gap: 1rem;
}

.dashboard-panel-heading {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.05rem;
    border-bottom: 1px solid #e7eeec;
}

.dashboard-panel-heading h2 {
    margin: 0;
    color: #172b29;
    font-size: 1rem;
    font-weight: 760;
}

.dashboard-panel-heading p {
    margin: .18rem 0 0;
    color: #7a8987;
    font-size: .68rem;
}

.dashboard-panel-heading a {
    color: var(--clinic-primary);
    font-size: .72rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-panel-heading a:hover {
    text-decoration: underline;
}

.dashboard-period {
    padding: .35rem .55rem;
    border: 1px solid #dce6e4;
    border-radius: .45rem;
    color: #637572;
    font-size: .68rem;
}

.dashboard-today {
    overflow: hidden;
}

.dashboard-timeline {
    position: relative;
    padding: 0 1rem;
}

.dashboard-timeline::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 1.65rem;
    bottom: 1.65rem;
    left: 1.45rem;
    width: 1px;
    background: #87cec6;
}

.dashboard-timeline-row {
    position: relative;
    z-index: 1;
    min-height: 70px;
    display: grid;
    grid-template-columns: 58px 42px minmax(130px, 1fr) minmax(135px, .9fr) auto auto;
    align-items: center;
    gap: .65rem;
    border-bottom: 1px solid #edf1f4;
}

.dashboard-inline-actions,
.dashboard-table-actions {
    display: flex;
    gap: .35rem;
    align-items: center;
    justify-content: flex-end;
}

.dashboard-inline-actions form,
.dashboard-table-actions form { margin: 0; }

.dashboard-inline-actions button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: .55rem;
    color: #fff;
    box-shadow: 0 .2rem .55rem rgba(38, 73, 92, .13);
}

.dashboard-inline-actions .confirm { background: #2f9a63; }
.dashboard-inline-actions .arrival { background: #438fc4; }
.dashboard-inline-actions .whatsapp,
.dashboard-table-actions .btn-whatsapp { border-color: #ccebd7; color: #15763d; background: #e4f7eb; }

.dashboard-birthdays {
    position: relative;
    display: flex;
    gap: .85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    overflow: hidden;
    border: 1px solid #d7dff5;
    border-radius: .85rem;
    color: #334f83;
    background: linear-gradient(110deg, #f2f6ff, #f8f1ff);
    box-shadow: 0 .3rem 1rem rgba(69, 89, 148, .07);
}

.dashboard-birthdays>span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #6286d6; font-size: 1.1rem; }
.dashboard-birthdays strong { display: block; font-size: .82rem; }
.dashboard-birthdays p { margin: .15rem 0 0; color: #60729a; font-size: .74rem; }
.dashboard-birthdays>.bi-stars { position: absolute; right: 1rem; color: #a986d8; font-size: 1.55rem; opacity: .65; }
.birthday-whatsapp { display:inline-grid;width:1.55rem;height:1.55rem;margin-left:.25rem;place-items:center;border-radius:50%;color:#177943;background:#dff5e7;text-decoration:none;vertical-align:middle; }
.birthday-whatsapp:hover { color:#fff;background:#1b9850; }

@media (max-width: 767.98px) {
    .dashboard-timeline-row { grid-template-columns: 53px 38px minmax(0, 1fr) auto auto; }
}

@media (max-width: 479.98px) {
    .dashboard-timeline-row { grid-template-columns: 50px 34px minmax(0, 1fr); }
    .dashboard-inline-actions { grid-column: 3; justify-content: flex-start; }
    .dashboard-birthdays>.bi-stars { display: none; }
}

.dashboard-timeline-row::before {
    content: "";
    position: absolute;
    left: .15rem;
    width: .62rem;
    height: .62rem;
    border-radius: 50%;
    background: #128c85;
    box-shadow: 0 0 0 3px #fff;
}

.dashboard-timeline-row time {
    padding-left: 1.25rem;
    color: #223b38;
    font-size: .78rem;
    font-weight: 750;
}

.dashboard-patient-avatar,
.dashboard-table-person>span {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #dff3ef;
    color: #197a74;
    font-size: .7rem;
    font-weight: 750;
}

.dashboard-timeline-row:nth-child(3n+2) .dashboard-patient-avatar,
.dashboard-table tbody tr:nth-child(3n+2) .dashboard-table-person>span {
    background: #e9edfd;
    color: #556dc0;
}

.dashboard-timeline-row:nth-child(3n) .dashboard-patient-avatar,
.dashboard-table tbody tr:nth-child(3n) .dashboard-table-person>span {
    background: #fff0df;
    color: #bd6a19;
}

.dashboard-patient,
.dashboard-professional {
    min-width: 0;
}

.dashboard-patient strong,
.dashboard-patient small,
.dashboard-professional strong,
.dashboard-professional small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-patient strong,
.dashboard-professional strong {
    color: #263c39;
    font-size: .75rem;
}

.dashboard-patient small,
.dashboard-professional small {
    margin-top: .12rem;
    color: #81908e;
    font-size: .63rem;
}

.dashboard-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: .3rem .52rem;
    border-radius: .35rem;
    font-size: .64rem;
    font-weight: 650;
    white-space: nowrap;
}

.status-tone-green {
    background: #e2f5e7;
    color: #267943;
}

.status-tone-blue {
    background: #e2edfb;
    color: #2868a0;
}

.status-tone-amber {
    background: #fff0d9;
    color: #a05c08;
}

.status-tone-red {
    background: #fce8e5;
    color: #c43f35;
}

.status-tone-gray {
    background: #edf1f0;
    color: #637572;
}

.dashboard-panel-footer {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1rem;
    border-top: 1px solid #e7eeec;
    color: var(--clinic-primary);
    font-size: .7rem;
    font-weight: 650;
    text-decoration: none;
}

.dashboard-panel-footer:hover {
    background: #f7fbfa;
    color: var(--clinic-primary-dark);
}

.dashboard-chart-card {
    overflow: hidden;
}

.dashboard-chart {
    padding: .4rem 1rem .7rem;
}

.dashboard-chart svg {
    width: 100%;
    height: 155px;
    overflow: visible;
}

.chart-axis {
    stroke: #cfdad8;
    stroke-width: 1;
}

.chart-gridline {
    stroke: #e9efee;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.chart-line {
    fill: none;
    stroke: #0f8983;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.chart-dot {
    fill: #0f8983;
    stroke: #fff;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.chart-value {
    fill: #3c5552;
    font-size: 10px;
    text-anchor: middle;
}

.dashboard-chart-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 .2rem;
    color: #71827f;
    font-size: .62rem;
    text-align: center;
}

.dashboard-pending {
    overflow: hidden;
    scroll-margin-top: 85px;
}

.dashboard-pending-list a {
    min-height: 50px;
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    align-items: center;
    gap: .65rem;
    padding: .45rem .8rem;
    border-bottom: 1px solid #edf1f4;
    color: #314743;
    text-decoration: none;
}

.dashboard-pending-list a:last-child {
    border-bottom: 0;
}

.dashboard-pending-list a:hover {
    background: #f8fafc;
}

.dashboard-pending-list strong {
    font-size: .72rem;
    font-weight: 550;
}

.dashboard-pending-list strong b {
    color: #142927;
    font-size: .82rem;
}

.pending-icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: .45rem;
}

.pending-red {
    background: #fce8e5;
    color: #d2463c;
}

.pending-amber {
    background: #fff0db;
    color: #b66a12;
}

.pending-blue {
    background: #e4edfc;
    color: #356abb;
}

.pending-number {
    color: #db4138;
    font-size: .82rem;
    font-weight: 750;
}

.dashboard-pending-list>a>i {
    color: #71827f;
    font-size: .7rem;
}

.dashboard-upcoming {
    overflow: hidden;
}

.dashboard-table {
    min-width: 920px;
}

.dashboard-table thead th {
    padding: .65rem 1rem;
    border-bottom: 1px solid #dce6ee;
    background: #fbfcfc;
    color: #576b68;
    font-size: .64rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-table tbody td {
    padding: .6rem 1rem;
    border-color: #edf1f4;
    color: #344b47;
    font-size: .7rem;
    vertical-align: middle;
}

.dashboard-table tbody td>strong {
    font-size: .68rem;
}

.dashboard-table-person {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    white-space: nowrap;
}

.dashboard-table-person>span {
    width: 1.9rem;
    height: 1.9rem;
    font-size: .6rem;
}

.dashboard-row-action {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-color: #dfe7e5;
}

@media (min-width: 992px) {

    .admin-sidebar,
    .admin-main {
        transition: width .22s ease, margin-left .22s ease;
    }

    .sidebar-collapsed .admin-sidebar {
        width: 78px;
    }

    .sidebar-collapsed .admin-main {
        margin-left: 78px;
    }

    .sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding-inline: 0;
    }

    .sidebar-collapsed .mind-sidebar-brand img {
        width: 58px;
        height: 58px;
    }

    .sidebar-collapsed .sidebar-brand>span:last-child,
    .sidebar-collapsed .sidebar-link span,
    .sidebar-collapsed .sidebar-group-toggle span,
    .sidebar-collapsed .sidebar-group-chevron,
    .sidebar-collapsed .nav-section,
    .sidebar-collapsed .sidebar-footer span {
        display: none;
    }

    .sidebar-collapsed .sidebar-link,
    .sidebar-collapsed .sidebar-group-toggle {
        justify-content: center;
        padding-inline: .5rem;
    }

    .sidebar-collapsed .sidebar-group-links {
        padding-left: 0;
    }

    .sidebar-collapsed .sidebar-link i {
        width: auto;
    }

    .sidebar-collapsed .sidebar-footer {
        justify-content: center;
        padding-inline: 0;
    }

    .sidebar-collapsed .sidebar-footer button {
        justify-content: center;
    }

    .sidebar-collapsed .sidebar-footer button i {
        transform: rotate(180deg);
    }
}

@media (max-width: 1399.98px) {
    .topbar-welcome {
        min-width: auto;
    }

    .topbar-welcome span {
        display: none;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side-stack {
        grid-template-columns: minmax(0, 1fr) minmax(350px, .65fr);
        grid-template-rows: auto;
    }
}

@media (max-width: 991.98px) {
    .topbar-welcome {
        margin-left: .6rem;
    }

    .topbar-search {
        width: min(42vw, 420px);
    }

    .sidebar-footer button {
        display: none;
    }

    .dashboard-side-stack {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .admin-topbar {
        gap: .25rem;
    }

    .topbar-welcome {
        display: none;
    }

    .topbar-search {
        flex: 1;
        width: auto;
        margin-left: .4rem;
    }

    .topbar-search input {
        font-size: .7rem;
    }

    .topbar-notification {
        margin: 0;
    }

    .dashboard-titlebar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-new-button {
        justify-content: center;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric {
        min-height: 82px;
        padding: .75rem;
    }

    .dashboard-metric-icon {
        width: 2.45rem;
        height: 2.45rem;
    }

    .dashboard-timeline-row {
        grid-template-columns: 53px 38px minmax(0, 1fr) auto auto;
    }

    .dashboard-professional {
        display: none;
    }

    .dashboard-timeline {
        padding-inline: .75rem;
    }

    .dashboard-timeline::before {
        left: 1.2rem;
    }
}

@media (max-width: 479.98px) {
    .topbar-search {
        display: none;
    }

    .topbar-notification {
        margin-left: auto;
    }

    .dashboard-metrics {
        gap: .55rem;
    }

    .dashboard-metric {
        gap: .55rem;
    }

    .dashboard-metric strong {
        font-size: 1.14rem;
    }

    .dashboard-metric span:not(.dashboard-metric-icon) {
        font-size: .62rem;
    }

    .dashboard-panel-heading {
        align-items: flex-start;
    }

    .dashboard-panel-heading a {
        font-size: 0;
    }

    .dashboard-panel-heading a i {
        font-size: .75rem;
    }

    .dashboard-timeline-row {
        grid-template-columns: 50px 34px minmax(0, 1fr);
        padding: .45rem 0;
    }

    .dashboard-timeline-row .dashboard-status {
        grid-column: 3;
    }

    .dashboard-patient-avatar {
        width: 2rem;
        height: 2rem;
    }
}

.appointment-modal .modal-dialog {
    width: calc(100% - 1.5rem);
    max-width: 1050px;
    margin: .75rem auto;
}

.appointment-modal .modal-content {
    max-height: calc(100dvh - 1.5rem);
    overflow: hidden;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 1.6rem 4rem rgba(16, 49, 47, .28);
}

.appointment-modal #appointment-modal-form {
    display: flex;
    min-width: 0;
    min-height: 0;
    max-height: calc(100dvh - 1.5rem);
    flex-direction: column;
}

.appointment-modal-header {
    flex: 0 0 auto;
    gap: .8rem;
    padding: 1rem 1.25rem .75rem;
    border: 0;
}

.appointment-modal-header h2 {
    margin: 0;
    color: #102f2d;
    font-size: 1.15rem;
    font-weight: 800;
}

.appointment-modal-header p {
    margin: .12rem 0 0;
    color: #71817f;
    font-size: .72rem;
}

.appointment-modal-title-icon {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    place-items: center;
    border-radius: .7rem;
    background: #e0f4f1;
    color: var(--clinic-primary);
    font-size: 1.35rem;
}

.appointment-stepper {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .25rem 2rem .85rem;
}

.appointment-step {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: #85928f;
    white-space: nowrap;
}

.appointment-step span {
    display: grid;
    width: 1.6rem;
    height: 1.6rem;
    place-items: center;
    border: 1px solid #cddad8;
    border-radius: 50%;
    background: #fff;
    font-size: .7rem;
    font-weight: 800;
}

.appointment-step strong {
    font-size: .68rem;
    font-weight: 700;
}

.appointment-step.active,
.appointment-step.complete {
    color: var(--clinic-primary);
}

.appointment-step.active span,
.appointment-step.complete span {
    border-color: var(--clinic-primary);
    background: var(--clinic-primary);
    color: #fff;
}

.appointment-step-line {
    width: 155px;
    height: 1px;
    margin: 0 .75rem;
    background: #d7e1df;
}

.appointment-step-line.complete {
    background: var(--clinic-primary);
}

.appointment-modal-body {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: .75rem 1.25rem 1rem;
    background: #f8fafc;
}

.appointment-wizard-step {
    display: none;
}

.appointment-wizard-step.active {
    display: block;
    animation: appointment-step-in .2s ease;
}

@keyframes appointment-step-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.appointment-section-card,
.appointment-live-summary {
    padding: 1rem;
    border: 1px solid #dde8e6;
    border-radius: .75rem;
    background: #fff;
}

.appointment-section-card>h3,
.appointment-live-summary h3 {
    margin: 0 0 .8rem;
    color: #173c39;
    font-size: .83rem;
    font-weight: 800;
}

.appointment-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.appointment-section-heading span {
    display: block;
    color: var(--clinic-primary);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.appointment-section-heading h3 {
    margin: .12rem 0 0;
    color: #173c39;
    font-size: .92rem;
    font-weight: 800;
}

.appointment-section-heading>i {
    color: #41a99f;
    font-size: 1.25rem;
}

.appointment-patient-search>i {
    position: absolute;
    z-index: 2;
    top: .72rem;
    left: .8rem;
    color: #738582;
}

.appointment-patient-search>.form-control {
    padding-left: 2.25rem;
}

.autocomplete-empty {
    padding: 1rem;
    color: #748480;
    font-size: .72rem;
    text-align: center;
}

.appointment-selected-patient,
.appointment-confirm-patient,
.appointment-summary-person {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: .75rem;
    padding: .7rem;
    border: 1px solid #d9e8e5;
    border-radius: .65rem;
    background: #f8fcfb;
}

.appointment-selected-patient strong,
.appointment-selected-patient small,
.appointment-confirm-patient strong,
.appointment-confirm-patient small {
    display: block;
}

.appointment-selected-patient small,
.appointment-confirm-patient small {
    color: #72827f;
    font-size: .67rem;
}

.appointment-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 50%;
    background: #dff4f1;
    color: #16746e;
    font-size: .75rem;
    font-weight: 800;
}

.appointment-modal-slots {
    min-height: 3.15rem;
}

.appointment-modal-slots .slot-button {
    min-width: 65px;
    padding: .48rem .65rem;
}

.appointment-modal-slots .slot-button:hover,
.appointment-modal-slots .slot-button.selected {
    border-color: var(--clinic-primary);
    background: var(--clinic-primary);
    color: #fff;
}

.appointment-live-summary {
    height: 100%;
}

.appointment-summary-person {
    margin: 0 0 .55rem;
    border: 0;
    background: #f4faf8;
}

.appointment-summary-person strong {
    font-size: .8rem;
}

.appointment-summary-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: .45rem;
    align-items: center;
    padding: .5rem .15rem;
    border-bottom: 1px solid #edf3f2;
    color: #405b58;
    font-size: .7rem;
}

.appointment-summary-row i {
    color: #69807c;
}

.appointment-summary-value {
    margin-top: .75rem;
    padding: .75rem;
    border: 1px solid #d9e9e6;
    border-radius: .6rem;
    background: #f4fbf9;
}

.appointment-summary-value span,
.appointment-summary-value strong {
    display: block;
}

.appointment-summary-value span {
    color: #738581;
    font-size: .65rem;
}

.appointment-summary-value strong {
    color: var(--clinic-primary);
    font-size: 1.15rem;
}

.appointment-summary-status {
    margin-top: .6rem;
    padding: .55rem;
    border: 1px solid #f0d5a5;
    border-radius: .55rem;
    background: #fff8e9;
    color: #a76700;
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
}

.appointment-ready-banner {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .75rem;
    padding: .75rem;
    border: 1px solid #bfe4cb;
    border-radius: .65rem;
    background: #effbf2;
    color: #256b3b;
}

.appointment-ready-banner>i {
    font-size: 1.3rem;
}

.appointment-ready-banner strong,
.appointment-ready-banner small {
    display: block;
}

.appointment-ready-banner strong {
    font-size: .75rem;
}

.appointment-ready-banner small {
    font-size: .65rem;
}

.appointment-confirm-patient {
    margin: 0 0 .65rem;
}

.appointment-confirm-list {
    margin: 0;
}

.appointment-confirm-list>div {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: .5rem;
    padding: .42rem 0;
    border-bottom: 1px solid #eef3f7;
    font-size: .68rem;
}

.appointment-confirm-list dt {
    color: #687c79;
    font-weight: 600;
}

.appointment-confirm-list dt i {
    width: 1rem;
    margin-right: .3rem;
    color: var(--clinic-primary);
}

.appointment-confirm-list dd {
    margin: 0;
    color: #253f3c;
    font-weight: 700;
}

.appointment-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #dfeae8;
}

.appointment-total span {
    color: #607572;
    font-size: .7rem;
}

.appointment-total strong {
    color: var(--clinic-primary);
    font-size: 1.15rem;
}

.appointment-message {
    margin-top: .65rem;
    resize: vertical;
    color: #435b58;
    font-size: .68rem;
    line-height: 1.45;
}

.appointment-modal-footer {
    position: relative;
    z-index: 8;
    flex: 0 0 auto;
    padding: .75rem 1.25rem;
    border-top-color: #e6eeec;
    background: #fff;
    box-shadow: 0 -.4rem 1rem rgba(31, 62, 79, .06);
}

.appointment-modal-footer [data-step-button="save"] {
    min-width: 180px;
    font-weight: 800;
    box-shadow: 0 .35rem .8rem rgba(42, 145, 89, .24);
}

.appointment-modal-footer>small {
    color: #748581;
    font-size: .64rem;
}

.appointment-new-patient-card {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 2px solid #e0f4f1;
    border-radius: .8rem;
    background: linear-gradient(135deg, #f0faf8 0%, #e8f5f2 100%);
    transition: all .3s ease;
}

.appointment-new-patient-card:hover {
    border-color: #b8e5dd;
    box-shadow: 0 .4rem 1.2rem rgba(22, 116, 110, .12);
    transform: translateY(-2px);
}

.appointment-new-patient-content {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .85rem;
}

.appointment-new-patient-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    place-items: center;
    border-radius: .7rem;
    background: linear-gradient(135deg, var(--clinic-primary) 0%, #4d92c8 100%);
    color: #fff;
    font-size: 1.45rem;
    box-shadow: 0 .3rem .8rem rgba(22, 116, 110, .25);
}

.appointment-new-patient-text strong {
    display: block;
    margin-bottom: .2rem;
    color: #102f2d;
    font-size: .82rem;
    font-weight: 700;
}

.appointment-new-patient-text small {
    display: block;
    color: #5a7370;
    font-size: .68rem;
    line-height: 1.4;
}

.btn-new-patient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .7rem 1rem;
    border: 0;
    border-radius: .6rem;
    background: linear-gradient(135deg, var(--clinic-primary) 0%, #4d92c8 100%);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 .25rem .75rem rgba(22, 116, 110, .3);
    transition: all .25s ease;
}

.btn-new-patient:hover {
    background: linear-gradient(135deg, #4d92c8 0%, #117a73 100%);
    color: #fff;
    box-shadow: 0 .35rem 1rem rgba(22, 116, 110, .4);
    transform: translateY(-1px);
}

.btn-new-patient:active {
    transform: translateY(0);
    box-shadow: 0 .2rem .5rem rgba(22, 116, 110, .3);
}

.btn-new-patient i {
    font-size: .9rem;
    transition: transform .25s ease;
}

.btn-new-patient:hover i {
    transform: translateX(3px);
}

@media (max-width: 767.98px) {
    .appointment-modal .modal-dialog {
        width: calc(100% - 1rem);
        margin: .5rem;
    }

    .appointment-stepper {
        padding-inline: .75rem;
    }

    .appointment-step strong {
        display: none;
    }

    .appointment-step-line {
        width: 22vw;
    }

    .appointment-modal-body {
        min-height: 0;
        padding: .65rem;
    }

    .appointment-modal-header,
    .appointment-modal-footer {
        padding-inline: .75rem;
    }

    .appointment-modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .appointment-modal-footer>small {
        display: none;
    }

    .appointment-modal-footer .ms-auto {
        width: 100%;
    }

    .appointment-modal-footer .btn {
        flex: 1;
    }

    .appointment-confirm-list>div {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    .appointment-new-patient-content {
        flex-direction: column;
        text-align: center;
    }

    .appointment-new-patient-text {
        text-align: center;
    }

}

@media (max-height: 820px) and (min-width: 768px) {
    .appointment-modal .modal-dialog {
        margin: .4rem auto;
    }

    .appointment-modal .modal-content,
    .appointment-modal #appointment-modal-form {
        max-height: calc(100dvh - .8rem);
    }

    .appointment-modal-header {
        padding-block: .65rem .45rem;
    }

    .appointment-stepper {
        padding-block: .4rem .55rem;
    }

    .appointment-modal-body {
        padding-block: .55rem;
    }

    .appointment-section-card,
    .appointment-live-summary {
        padding: .8rem;
    }
}

/* Patient registration */
.patient-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.patient-page-heading h1 {
    margin: .35rem 0 .2rem;
    color: #132322;
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    font-weight: 780;
    letter-spacing: -.035em;
}

.patient-page-heading p {
    margin: 0;
    color: #6b7d7a;
    font-size: .88rem;
}

.patient-breadcrumb {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: #758784;
    font-size: .76rem;
}

.patient-breadcrumb a {
    color: var(--clinic-primary);
    font-weight: 650;
    text-decoration: none;
}

.patient-breadcrumb i {
    font-size: .55rem;
}

.patient-heading-actions {
    display: flex;
    gap: .7rem;
}

.patient-registration {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1.25rem;
    align-items: start;
}

.patient-form-card,
.patient-summary-card {
    border: 1px solid #dce6ee;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 .25rem 1rem rgba(22, 66, 63, .045);
}

.patient-form-section {
    padding: 1.45rem;
    border-bottom: 1px solid #e7eeec;
}

.patient-section-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.2rem;
}

.patient-section-title>span {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .65rem;
    background: #e4f5f2;
    color: #138078;
    font-size: 1rem;
}

.patient-section-title h2,
.patient-summary-card h2,
.patient-subsection-heading h3 {
    margin: 0;
    color: #172927;
    font-size: 1rem;
    font-weight: 760;
}

.patient-section-title p,
.patient-subsection-heading p {
    margin: .12rem 0 0;
    color: #748481;
    font-size: .76rem;
}

.patient-registration .form-label {
    margin-bottom: .35rem;
    color: #344b48;
    font-size: .74rem;
    font-weight: 650;
}

.patient-registration .form-label b,
.patient-summary-info b {
    color: #e24c42;
}

.patient-registration .form-control,
.patient-registration .form-select {
    min-height: 2.65rem;
    border-color: #d6e1df;
    border-radius: .55rem;
    color: #263d3a;
    font-size: .8rem;
}

.patient-registration .form-control::placeholder {
    color: #a2aeac;
}

.patient-registration .form-control:focus,
.patient-registration .form-select:focus {
    border-color: #5ab8ae;
    box-shadow: 0 0 0 .2rem rgba(22, 128, 120, .11);
}

.patient-readonly {
    background: #f5f7f7 !important;
    color: #7c8987 !important;
}

.patient-without-cpf {
    margin-top: .45rem;
}

.patient-without-cpf .form-check-label {
    color: #687b78;
    font-size: .73rem;
}

.patient-minor-card {
    margin: 1.35rem;
    overflow: hidden;
    border: 1px solid #6abdb5;
    border-radius: .7rem;
    background: #fbfefd;
}

.patient-minor-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
}

.patient-minor-toggle strong,
.patient-minor-toggle small {
    display: block;
}

.patient-minor-toggle strong {
    color: #253b38;
    font-size: .79rem;
}

.patient-minor-toggle small {
    margin-top: .12rem;
    color: #71817f;
    font-size: .68rem;
}

.patient-minor-toggle .form-switch {
    margin: 0;
    padding-left: 2.8rem;
}

.patient-minor-toggle .form-check-input {
    width: 2.35rem;
    height: 1.25rem;
    margin-left: -2.8rem;
}

.patient-responsible-fields,
.patient-responsible-hint {
    padding: 1rem;
    border-top: 1px solid #d8ece9;
    background: #f8fcfb;
}

.patient-subsection-heading {
    margin-bottom: 1rem;
}

.patient-responsible-hint {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #56716d;
    font-size: .76rem;
}

.patient-responsible-fields[hidden],
.patient-responsible-hint[hidden] {
    display: none;
}

.patient-notes-section {
    border-top: 1px solid #e7eeec;
}

.patient-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.45rem;
}

.patient-form-footer .form-check-label {
    color: #526865;
    font-size: .78rem;
}

.patient-summary-card {
    position: sticky;
    top: 92px;
    padding: 1.35rem;
}

.patient-photo-wrap {
    width: 5.5rem;
    height: 5.5rem;
    display: grid;
    place-items: center;
    margin: 1rem auto .85rem;
    overflow: hidden;
    border-radius: 50%;
    background: #dff3ef;
    color: #11877e;
}

.patient-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.patient-photo-wrap span {
    font-size: 1.7rem;
}

.patient-photo-button {
    display: block;
    width: max-content;
    margin: 0 auto 1rem;
    padding: .48rem .85rem;
    font-size: .72rem;
}

.patient-summary-status {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 1rem;
    padding: .7rem .75rem;
    border: 1px solid #f0c283;
    border-radius: .55rem;
    background: #fffaf3;
    color: #9c6216;
    font-size: .7rem;
}

.patient-summary-status.complete {
    border-color: #a9d9c0;
    background: #f3fbf6;
    color: #28794a;
}

.patient-summary-list {
    margin: 0;
    padding: .15rem 0 .85rem;
}

.patient-summary-list>div {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: .6rem;
    padding: .55rem 0;
    border-bottom: 1px solid #edf1f4;
    font-size: .72rem;
}

.patient-summary-list dt {
    color: #7b8b88;
    font-weight: 500;
}

.patient-summary-list dd {
    margin: 0;
    overflow: hidden;
    color: #304845;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-summary-info {
    padding-top: .8rem;
}

.patient-summary-info h3 {
    margin: 0 0 .65rem;
    color: #263d3a;
    font-size: .78rem;
    font-weight: 750;
}

.patient-summary-info>div {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .4rem;
    padding: .55rem;
    border: 1px solid #dce6ee;
    border-radius: .5rem;
    color: #657976;
    font-size: .65rem;
}

.patient-summary-info>div i {
    color: #168a81;
    font-size: .9rem;
}

.patient-summary-info>small {
    display: block;
    margin-top: .75rem;
    color: #879592;
    font-size: .61rem;
}

.patient-related-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
    align-items: start;
}

.patient-related-panel {
    overflow: hidden;
}

.patient-related-toggle {
    width: 100%;
    min-height: 5rem;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.25rem;
    border: 0;
    color: #203b38;
    text-align: left;
    background: #fff;
}

.patient-related-toggle:hover {
    background: #f8fbfa;
}

.patient-related-toggle>span:nth-child(2) {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.patient-related-toggle strong {
    font-size: 1rem;
}

.patient-related-toggle small {
    overflow: hidden;
    color: #748582;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-related-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #168a81;
    background: #e5f5f2;
}

.patient-related-count {
    min-width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #35605b;
    font-size: .78rem;
    font-weight: 700;
    background: #edf3f2;
}

.patient-related-chevron {
    color: #738481;
    transition: transform .2s ease;
}

.patient-related-toggle[aria-expanded="true"] .patient-related-chevron {
    transform: rotate(180deg);
}

.patient-related-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.25rem;
    border-top: 1px solid #e8efed;
    border-bottom: 1px solid #e8efed;
    background: #f8fbfa;
}

.patient-related-toolbar p {
    margin: 0;
    color: #667a76;
    font-size: .82rem;
}

.patient-related-empty {
    padding: 1rem 1.25rem;
    color: #71817f;
    font-size: .86rem;
}

@media (max-width: 1199.98px) {
    .patient-registration {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 991.98px) {
    .patient-registration,
    .patient-related-grid {
        grid-template-columns: 1fr;
    }

    .patient-summary-card {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .patient-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .patient-heading-actions .btn {
        flex: 1;
    }

    .patient-form-section,
    .patient-form-footer {
        padding: 1rem;
    }

    .patient-minor-card {
        margin: 1rem;
    }

    .patient-related-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 449.98px) {
    .patient-heading-actions,
    .patient-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .patient-heading-actions .btn,
    .patient-form-footer .btn {
        width: 100%;
    }
}

/* Patient list and printable registration sheet */
.patient-table-actions {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.patient-table-actions form {
    margin: 0;
}

.patient-table-actions .btn {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    padding: 0;
}

.patient-table-actions .btn-whatsapp,
.professional-patient-actions .btn-whatsapp {
    border-color: #bfe6cc;
    color: #14763b;
    background: #e4f7eb;
}

.patient-table-actions .btn-whatsapp:hover,
.professional-patient-actions .btn-whatsapp:hover {
    border-color: #88cfa0;
    color: #fff;
    background: #1b9850;
}

.patient-table-actions .btn:disabled {
    color: #a8b2b0;
    background: #f3f5f5;
    opacity: .72;
}

.patient-incomplete-warning {
    width: max-content;
    max-width: 100%;
    margin-top: .18rem;
    color: #b26a14 !important;
    font-weight: 750;
}

.patient-incomplete-warning i {
    margin-right: .2rem;
    color: #dc8a1c;
}

.patient-table-actions .dropdown,
.professional-patient-actions .dropdown {
    display: inline-flex;
}

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

.message-template-card {
    display: flex;
    gap: .8rem;
    padding: 1.15rem;
    flex-direction: column;
}

.message-template-card>header {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.message-template-card>header>span {
    width: 2.7rem;
    height: 2.7rem;
    display: grid;
    flex: 0 0 auto;
    color: #168846;
    background: #e3f7ea;
    border-radius: .75rem;
    place-items: center;
    font-size: 1.2rem;
}

.message-template-card h2,
.message-template-card p {
    margin: 0;
}

.message-template-card h2 {
    color: #264356;
    font-size: .95rem;
}

.message-template-card p,
.message-template-card>small {
    color: #71818e;
    font-size: .72rem;
}

.message-template-card textarea {
    line-height: 1.55;
}

.message-template-card .btn {
    align-self: flex-start;
}

.message-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    padding: .65rem;
    border-radius: .55rem;
    color: #486b65;
    background: #edf7f4;
    font-size: .68rem;
}

@media (max-width: 991.98px) {
    .message-template-grid {
        grid-template-columns: 1fr;
    }
}

.patient-print-header img {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.patient-print-registered-name {
    margin: -.5rem 0 1rem;
    color: #71817f;
    font-size: .8rem;
}

.patient-print-section {
    margin: 1.5rem 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid #dce6ee;
    color: #1c5551;
    font-size: .9rem;
    font-weight: 750;
}

.patient-print-wide {
    grid-column: 1 / -1;
}

.patient-print-table {
    font-size: .75rem;
}

.patient-print-notes {
    padding: .8rem;
    border-radius: .5rem;
    background: #f5f8f7;
    color: #425b58;
    font-size: .78rem;
}

/* Calendar workspace */
.agenda-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.agenda-page-heading h1 {
    margin: 0 0 .2rem;
    color: #152825;
    font-size: 1.8rem;
    font-weight: 780;
    letter-spacing: -.035em;
}

.agenda-page-heading p {
    margin: 0;
    color: #71817f;
    font-size: .82rem;
}

.agenda-calendar-shell {
    overflow: hidden;
    border: 1px solid #dce6ee;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 .3rem 1.2rem rgba(22, 66, 63, .05);
}

.agenda-calendar-toolbar {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .8rem;
    border-bottom: 1px solid #e3ecea;
}

.agenda-calendar-toolbar .btn,
.agenda-calendar-toolbar .form-select {
    min-height: 2.35rem;
    font-size: .7rem;
}

.agenda-calendar-toolbar .form-select {
    width: auto;
    min-width: 150px;
}

.agenda-nav-buttons {
    display: flex;
    gap: .3rem;
}

.agenda-nav-buttons .btn:first-child {
    min-width: 3.5rem;
}

.agenda-range-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 215px;
    color: #344b48;
    font-size: .7rem;
    cursor: pointer;
}

.agenda-range-picker>i {
    font-size: .9rem;
}

.agenda-range-picker input {
    position: absolute;
    inset: 0 auto 0 0;
    width: 1.3rem;
    opacity: 0;
    cursor: pointer;
}

.agenda-view-switch {
    display: flex;
    margin-left: auto;
    overflow: hidden;
    border: 1px solid #dce6e4;
    border-radius: .5rem;
}

.agenda-view-switch a {
    min-width: 3.5rem;
    padding: .6rem .7rem;
    color: #4c625f;
    font-size: .68rem;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.agenda-view-switch a.active {
    background: var(--clinic-primary);
    color: #fff;
}

.agenda-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px;
    min-height: 700px;
}

.agenda-calendar-main {
    min-width: 0;
    overflow-x: auto;
    border-right: 1px solid #e3ecea;
}

.agenda-time-scroll {
    width: 100%;
    max-height: calc(100vh - 185px);
    min-height: 620px;
    overflow: auto;
    scroll-behavior: smooth;
}

.agenda-time-grid {
    display: grid;
    grid-template-columns: 60px repeat(var(--agenda-days), minmax(135px, 1fr));
    grid-template-rows: 54px var(--agenda-height, 780px);
    min-width: 1010px;
}

.agenda-time-grid.single-day {
    grid-template-columns: 60px minmax(320px, 1fr);
    min-width: 0;
}

.agenda-time-corner,
.agenda-day-heading {
    border-bottom: 1px solid #dce6ee;
    background: #fbfcfc;
}

.agenda-time-corner {
    border-right: 1px solid #e3eaf0;
}

.agenda-day-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-right: 1px solid #e3eaf0;
    color: #60716e;
    font-size: .68rem;
}

.agenda-time-corner,
.agenda-day-heading {
    position: sticky;
    z-index: 6;
    top: 0;
}

.agenda-day-heading strong {
    color: #283c39;
    font-size: .82rem;
}

.agenda-day-heading.today strong {
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--clinic-primary);
    color: #fff;
}

.agenda-hour-labels {
    position: relative;
    border-right: 1px solid #e3eaf0;
    background: #fbfcfc;
}

.agenda-hour-labels span {
    position: absolute;
    right: .55rem;
    transform: translateY(-.48em);
    color: #6f807d;
    font-size: .62rem;
}

.agenda-time-lane {
    position: relative;
    border-right: 1px solid #e3eaf0;
    background: repeating-linear-gradient(to bottom, #fff 0, #fff 29px, #f4f7f6 30px, #fff 31px, #fff 59px, #e5ecea 60px);
}

.agenda-lane-empty {
    position: absolute;
    top: 1rem;
    left: 50%;
    color: #a1aeac;
    font-size: .62rem;
    transform: translateX(-50%);
    white-space: nowrap;
}

.agenda-slot-card {
    position: absolute;
    z-index: 2;
    left: 4px;
    width: calc(100% - 8px);
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-height: 32px;
    padding: .38rem .42rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--event-color, #4d92c8) 48%, white);
    border-left: 3px solid var(--event-color, #4d92c8);
    border-radius: .38rem;
    background: color-mix(in srgb, var(--event-color, #4d92c8) 10%, white);
    color: #263c39;
    text-align: left;
    transition: transform .15s ease, box-shadow .15s ease;
}

.agenda-slot-card:hover {
    z-index: 4;
    box-shadow: 0 .35rem .8rem rgba(25, 67, 63, .16);
    transform: translateY(-1px);
}

.agenda-slot-card time,
.agenda-slot-card strong,
.agenda-slot-card span,
.agenda-slot-card small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-slot-card time {
    color: #47625e;
    font-size: .64rem;
    line-height: 1.1;
}

.agenda-slot-card strong {
    margin-top: .12rem;
    display: -webkit-box;
    overflow: hidden;
    font-size: .77rem;
    line-height: 1.12;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.agenda-slot-card>span,
.agenda-slot-card small {
    font-size: .61rem;
    line-height: 1.1;
}

.agenda-slot-card>span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-slot-card small {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-top: auto;
    color: #526865;
}

.agenda-slot-card small i {
    color: var(--event-color, #4d92c8);
}

.agenda-slot-card.compact {
    padding: .25rem .38rem;
}

.agenda-slot-card.compact strong {
    width: 100%;
    margin-top: .08rem;
    display: block;
    font-size: .76rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-slot-card.compact>span {
    display: none;
}

.agenda-slot-card.compact small {
    width: 100%;
    margin-top: auto;
    font-size: .59rem;
}

.agenda-slot-card.status-card-paciente_chegou,
.agenda-month-event.status-card-paciente_chegou {
    border-color: #efc066;
    border-left-color: #db8b13;
    background: #fff7e7;
}

.agenda-slot-card.status-card-finalizado,
.agenda-month-event.status-card-finalizado {
    border-color: #83c9a0;
    border-left-color: #2d985a;
    background: #edf9f1;
}

.agenda-slot-card.status-card-nao_atendido,
.agenda-month-event.status-card-nao_atendido {
    border-color: #e8a1a5;
    border-left-color: #c94e55;
    background: #fff1f2;
}

.agenda-slot-card.status-card-paciente_chegou small i,
.agenda-slot-card.status-card-finalizado small i,
.agenda-slot-card.status-card-nao_atendido small i {
    color: inherit;
}

.agenda-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(115px, 1fr));
    min-width: 805px;
}

.agenda-month-day {
    min-height: 132px;
    padding: .45rem;
    border-right: 1px solid #e7eeed;
    border-bottom: 1px solid #e7eeed;
}

.agenda-month-day.outside {
    background: #f8fafc;
    opacity: .58;
}

.agenda-month-day>header {
    display: flex;
    justify-content: space-between;
    margin-bottom: .35rem;
    color: #6d7f7c;
    font-size: .62rem;
}

.agenda-month-event {
    width: 100%;
    display: flex;
    gap: .3rem;
    margin-bottom: .25rem;
    padding: .28rem .35rem;
    overflow: hidden;
    border: 0;
    border-left: 2px solid var(--event-color, #4d92c8);
    border-radius: .25rem;
    background: color-mix(in srgb, var(--event-color, #4d92c8) 10%, white);
    color: #334a47;
    font-size: .57rem;
    text-align: left;
}

.agenda-month-event span {
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-summary-sidebar {
    padding: .85rem;
    background: #fbfcfc;
}

.agenda-summary-sidebar>h2 {
    margin: 0 0 .7rem;
    color: #293e3b;
    font-size: .78rem;
    font-weight: 750;
}

.agenda-summary-metric {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .5rem;
    padding: .7rem;
    border: 1px solid #e3eae9;
    border-radius: .55rem;
    background: #fff;
}

.agenda-summary-metric>i {
    color: #617572;
    font-size: 1.15rem;
}

.agenda-summary-metric.confirmed>i,
.agenda-status-legend.confirmed i {
    color: #18a352;
}

.agenda-summary-metric.waiting>i,
.agenda-status-legend.waiting i {
    color: #f0a11b;
}

.agenda-summary-metric.service>i,
.agenda-status-legend.service i {
    color: #3185d6;
}

.agenda-summary-metric strong,
.agenda-summary-metric span {
    display: block;
}

.agenda-summary-metric strong {
    color: #243a37;
    font-size: .85rem;
}

.agenda-summary-metric span {
    color: #71817f;
    font-size: .58rem;
}

.agenda-sidebar-section {
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px solid #e2eae8;
}

.agenda-sidebar-section h3 {
    margin: 0 0 .55rem;
    color: #3c514e;
    font-size: .67rem;
    font-weight: 750;
}

.agenda-professional-legend,
.agenda-status-legend {
    display: flex;
    align-items: center;
    gap: .42rem;
    margin: .35rem 0;
    color: #60736f;
    font-size: .59rem;
}

.agenda-professional-legend>span {
    width: .8rem;
    height: .42rem;
    border: 1px solid var(--legend-color);
    border-radius: .15rem;
    background: color-mix(in srgb, var(--legend-color) 12%, white);
}

.agenda-wait-card {
    margin-top: .9rem;
    padding: .7rem;
    border: 1px solid #dfe8ef;
    border-radius: .55rem;
    background: #fff;
}

.agenda-wait-card>div {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .55rem;
}

.agenda-wait-card>div>i {
    color: var(--clinic-primary);
    font-size: 1rem;
}

.agenda-wait-card strong,
.agenda-wait-card small {
    display: block;
    font-size: .6rem;
}

.agenda-wait-card small {
    color: #788986;
}

.agenda-wait-card .btn {
    width: 100%;
    font-size: .6rem;
}

/* Appointment detail and quick payment modal */
.appointment-detail-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: .9rem;
}

.appointment-detail-modal .modal-header {
    padding: 1.15rem 1.3rem;
    border-bottom-color: #e3eaf0;
}

.appointment-detail-modal .modal-title {
    margin-top: .15rem;
    color: #203633;
    font-size: 1.15rem;
    font-weight: 760;
}

.appointment-detail-eyebrow {
    color: var(--clinic-primary);
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
}

.appointment-detail-modal .modal-body {
    padding: 1.25rem;
}

.appointment-detail-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .4rem .65rem;
    border-radius: 2rem;
    background: #edf4f2;
    color: #526a66;
    font-size: .68rem;
    font-weight: 700;
}

.appointment-detail-status.paciente_chegou {
    background: #fff4df;
    color: #a96a16;
}

.appointment-detail-status.finalizado {
    background: #e7f7ed;
    color: #238951;
}

.appointment-detail-status.nao_atendido {
    background: #fff0f1;
    color: #c84e55;
}

.appointment-detail-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.appointment-detail-info>div {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid #e2ebe9;
    border-radius: .55rem;
    background: #fbfcfc;
}

.appointment-detail-info>div>i {
    color: var(--clinic-primary);
    font-size: 1rem;
}

.appointment-detail-info small,
.appointment-detail-info strong {
    display: block;
}

.appointment-detail-info small {
    color: #788986;
    font-size: .58rem;
}

.appointment-detail-info strong {
    color: #344b48;
    font-size: .71rem;
}

.appointment-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0;
}

.appointment-quick-actions .btn {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
    justify-content: center;
    border: 0;
    font-size: .7rem;
    font-weight: 700;
    box-shadow: 0 .18rem .45rem rgba(28, 66, 62, .12);
}

.appointment-quick-actions .btn-arrival {
    background: #e4f0fc;
    color: #246da8;
}

.appointment-quick-actions .btn-whatsapp {
    background: #def7e7;
    color: #16753a;
}

.appointment-quick-actions [hidden] {
    display: none !important;
}

.appointment-quick-actions .btn-cancel-appointment {
    border: 1px solid #efc7ca;
    background: #fff5f5;
    color: #b73d46;
}

.appointment-quick-actions .btn-reschedule-appointment {
    border: 1px solid #bfd5ec;
    background: #f1f7fd;
    color: #286a9f;
}

.appointment-quick-actions .btn-not-served {
    background: #fff0f1;
    color: #b83f48;
}

.appointment-quick-actions .btn-not-served:hover {
    background: #f9dfe1;
    color: #a7333b;
}

.appointment-quick-actions .btn-start-attendance {
    background: #6552a3;
    color: #fff;
}

.appointment-quick-actions .btn-start-attendance:hover {
    background: #55438f;
    color: #fff;
}

.appointment-detail-modal .btn-patient-print {
    border: 1px solid #b9dcd7;
    background: #eaf7f5;
    color: #126e68;
    font-weight: 700;
}

.appointment-detail-modal .btn-reservation-print {
    border: 1px solid #c9d8ee;
    background: #edf3fb;
    color: #315f9a;
    font-weight: 700;
}

.appointment-action-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: .5rem;
    box-shadow: 0 1.2rem 3rem rgba(26, 48, 58, .2);
}

.appointment-action-modal .modal-dialog {
    --bs-modal-width: 430px;
}

#appointment-reschedule-modal .modal-dialog {
    --bs-modal-width: 820px;
}

.appointment-action-modal .modal-header,
.appointment-action-modal .modal-body,
.appointment-action-modal .modal-footer {
    padding: 1rem 1.15rem;
}

.appointment-action-modal .modal-title {
    margin-top: .15rem;
    color: #203633;
    font-size: 1rem;
    font-weight: 750;
}

.appointment-action-modal .modal-footer {
    flex-wrap: nowrap;
}

.appointment-action-modal .modal-footer .btn {
    min-height: 2.5rem;
}

.reschedule-availability-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-area: heading;
}

.reschedule-availability-heading .btn {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    padding: 0;
}

.reschedule-days,
.reschedule-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
    margin-top: .65rem;
}

.reschedule-availability {
    display: grid;
    grid-template-columns: minmax(250px, .85fr) minmax(360px, 1.15fr);
    grid-template-areas:
        "heading slot-label"
        "date slots"
        "days slots";
    column-gap: 1.25rem;
    align-items: start;
}

.reschedule-availability>#detail-reschedule-date {
    grid-area: date;
}

.reschedule-availability>.reschedule-days {
    grid-area: days;
}

.reschedule-availability>label:last-of-type {
    grid-area: slot-label;
    align-self: end;
    margin-top: 0 !important;
}

.reschedule-availability>.reschedule-slots {
    grid-area: slots;
}

.reschedule-day,
.reschedule-slot {
    min-width: 0;
    min-height: 3rem;
    padding: .4rem;
    border: 1px solid #d8e4e8;
    border-radius: 8px;
    background: #fff;
    color: #395552;
}

.reschedule-day {
    display: grid;
    place-items: center;
}

.reschedule-day span {
    font-size: .64rem;
    text-transform: capitalize;
}

.reschedule-day strong,
.reschedule-slot {
    font-size: .76rem;
    font-weight: 750;
}

.reschedule-day:hover,
.reschedule-slot:hover {
    border-color: #68a9d1;
    background: #f1f8fc;
}

.reschedule-day.selected,
.reschedule-slot.selected {
    border-color: #2e84bb;
    background: #2e84bb;
    color: #fff;
}

.reschedule-slot {
    min-height: 2.5rem;
}

.reschedule-loading,
.reschedule-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    color: #647a77;
    font-size: .72rem;
}

.appointment-action-note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: .85rem 0 0;
    padding: .65rem;
    border-left: 3px solid #4b93cb;
    background: #f1f7fc;
    color: #526f80;
    font-size: .72rem;
}

.appointment-cancel-copy {
    margin-bottom: .85rem;
    color: #617572;
    font-size: .78rem;
}

@media (max-width: 575px) {
    #appointment-reschedule-modal .modal-dialog {
        --bs-modal-width: 100%;
    }

    .reschedule-availability {
        display: block;
    }

    .reschedule-availability>label:last-of-type {
        display: block;
        margin-top: 1rem !important;
    }

    .reschedule-days,
    .reschedule-slots {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.appointment-payment-box {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #cfe5e1;
    border-radius: .7rem;
    background: #f8fcfb;
}

.appointment-payment-box.paid {
    border-color: #bfe2cb;
    background: #f5fcf7;
}

.appointment-payment-heading,
.appointment-payment-heading>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.appointment-payment-heading {
    margin-bottom: .85rem;
}

.appointment-payment-heading>div>span {
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: .55rem;
    background: #dff2ee;
    color: var(--clinic-primary);
}

.appointment-payment-heading h3,
.appointment-payment-heading p {
    margin: 0;
}

.appointment-payment-heading h3 {
    color: #2b413e;
    font-size: .8rem;
    font-weight: 750;
}

.appointment-payment-heading p {
    color: #758683;
    font-size: .6rem;
}

.appointment-payment-heading>strong {
    color: var(--clinic-primary);
    font-size: .9rem;
}

.appointment-payment-box .form-label {
    font-size: .64rem;
}

.appointment-payment-box .form-control,
.appointment-payment-box .form-select {
    min-height: 2.4rem;
    font-size: .7rem;
}

@media (max-width: 1599.98px) {
    .agenda-calendar-toolbar {
        flex-wrap: wrap;
    }

    .agenda-view-switch {
        margin-left: 0;
    }

    .agenda-calendar-toolbar .form-select {
        flex: 1;
    }

    .agenda-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .agenda-calendar-main {
        border-right: 0;
    }

    .agenda-time-grid {
        grid-template-columns: 56px repeat(var(--agenda-days), minmax(120px, 1fr));
        min-width: 900px;
    }

    .agenda-time-grid.single-day {
        grid-template-columns: 56px minmax(320px, 1fr);
        min-width: 0;
    }

    .agenda-summary-sidebar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
        border-top: 1px solid #e3ecea;
    }

    .agenda-summary-sidebar>h2,
    .agenda-sidebar-section,
    .agenda-wait-card {
        grid-column: 1 / -1;
    }

    .agenda-summary-metric {
        margin: 0;
    }
}

@media (max-width: 991.98px) {
    .agenda-summary-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .agenda-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .agenda-calendar-toolbar>* {
        flex: 1 1 auto;
    }

    .agenda-range-picker {
        min-width: 190px;
    }

    .agenda-view-switch {
        order: 5;
        width: 100%;
    }

    .agenda-view-switch a {
        flex: 1;
    }

    .appointment-detail-info {
        grid-template-columns: 1fr;
    }

    .appointment-detail-modal .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .appointment-detail-modal .modal-footer .btn {
        width: 100%;
    }
}

/* Professional clinical workspace */
.doctor-patient-header {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid #dce6ee;
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 .2rem .8rem rgba(24, 66, 62, .04);
}

.doctor-patient-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.doctor-patient-avatar {
    width: 3.8rem;
    height: 3.8rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #dff4f0;
    color: #07877d;
    font-size: 1.35rem;
    font-weight: 750;
}

.doctor-patient-identity h1 {
    max-width: 34rem;
    margin: 0;
    overflow: hidden;
    color: #192c2a;
    font-size: 1.2rem;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doctor-patient-identity p {
    margin: .15rem 0;
    color: #71817f;
    font-size: .67rem;
}

.doctor-patient-identity p i {
    margin-right: .3rem;
}

.doctor-patient-status {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: #2e6e42;
    font-size: .65rem;
    font-weight: 650;
}

.doctor-patient-status>span {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #2bb45b;
}

.doctor-patient-status>i {
    margin-left: .6rem;
    color: #617471;
}

.doctor-header-privacy {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .7rem;
    border: 1px solid #54b9af;
    border-radius: .5rem;
    color: #14796f;
    font-size: .67rem;
    font-weight: 700;
    white-space: nowrap;
}

.doctor-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
    padding-left: 1rem;
    border-left: 1px solid #e3eaf0;
}

.doctor-header-actions .btn {
    font-size: .67rem;
}

.doctor-header-actions>small {
    width: 100%;
    color: #748582;
    font-size: .58rem;
    text-align: right;
}

.doctor-saved-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #27804a;
    font-size: .68rem;
    font-weight: 700;
}

.doctor-record-workspace {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 250px;
    gap: .9rem;
    align-items: start;
}

.doctor-history-card,
.doctor-record-main,
.doctor-essential-card,
.doctor-privacy-card,
.doctor-share-button,
.doctor-finish-card {
    border: 1px solid #dce6ee;
    border-radius: .75rem;
    background: #fff;
}

.doctor-history-card {
    padding: .85rem;
}

.doctor-history-card>h2,
.doctor-essential-card>h2 {
    margin: 0 0 .85rem;
    color: #263a37;
    font-size: .76rem;
    font-weight: 760;
}

.doctor-history-timeline {
    position: relative;
    margin-bottom: .9rem;
}

.doctor-history-timeline::before {
    position: absolute;
    z-index: 0;
    top: .65rem;
    bottom: .65rem;
    left: .48rem;
    width: 1px;
    background: #d8e4e2;
    content: '';
}

.doctor-history-item {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: .4rem;
    padding: .75rem .65rem .75rem 1.35rem;
    border: 1px solid transparent;
    border-radius: .6rem;
    color: #314b5e;
    text-decoration: none;
}

.doctor-history-item.active {
    border-color: #a9dcd6;
    background: #f1fbf9;
}

.doctor-history-dot {
    position: absolute;
    top: .88rem;
    left: .23rem;
    width: .55rem;
    height: .55rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #9cb6b2;
    box-shadow: 0 0 0 1px #cbdad8;
}

.doctor-history-item.active .doctor-history-dot {
    background: #15968c;
}

.doctor-history-item>strong,
.doctor-history-item>small,
.doctor-history-item>em,
.doctor-history-item>p {
    display: block;
}

.doctor-history-item>strong {
    color: #24423e;
    font-size: .68rem;
}

.doctor-history-item>small {
    margin-top: .12rem;
    color: #788986;
    font-size: .57rem;
}

.doctor-history-item>em {
    width: max-content;
    margin-top: .35rem;
    padding: .2rem .35rem;
    border-radius: .25rem;
    background: #e6f5ed;
    color: #2e7549;
    font-size: .54rem;
    font-style: normal;
}

.doctor-history-type {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .45rem;
    color: #40635f;
    font-size: .57rem;
    font-weight: 650;
}

.doctor-history-item>p {
    display: -webkit-box;
    margin: .4rem 0 0;
    overflow: hidden;
    color: #71817f;
    font-size: .55rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.doctor-history-item>.bi-chevron-right {
    position: absolute;
    right: .55rem;
    bottom: .75rem;
    color: #258c83;
    font-size: .65rem;
}

.doctor-history-card>.btn {
    font-size: .62rem;
}

.doctor-record-main {
    min-width: 0;
    overflow: hidden;
}

.doctor-record-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #dfe8ef;
}

.doctor-record-tabs button {
    position: relative;
    flex: 1;
    min-width: 105px;
    padding: .9rem .65rem;
    border: 0;
    background: #fff;
    color: #647673;
    font-size: .64rem;
    white-space: nowrap;
}

.doctor-record-tabs button.active {
    color: #3f84b8;
    font-weight: 720;
}

.doctor-record-tabs button.active::after {
    position: absolute;
    right: .8rem;
    bottom: 0;
    left: .8rem;
    height: 2px;
    background: #4d92c8;
    content: '';
}

.doctor-record-pane {
    padding: 1rem;
}

.doctor-field {
    position: relative;
    margin-bottom: .85rem;
}

.doctor-field>label,
.doctor-return-row label,
.doctor-form-grid label,
.doctor-addendum-form label,
.doctor-finish-card label {
    display: block;
    margin-bottom: .35rem;
    color: #344b48;
    font-size: .62rem;
    font-weight: 680;
}

.doctor-field>textarea,
.doctor-editor>textarea {
    width: 100%;
    display: block;
    padding: .7rem;
    resize: vertical;
    border: 1px solid #d8e2e0;
    border-radius: .45rem;
    outline: 0;
    color: #314b5e;
    font-size: .67rem;
    line-height: 1.55;
}

.doctor-field>textarea:focus,
.doctor-editor>textarea:focus {
    border-color: #5ab8ae;
    box-shadow: 0 0 0 .17rem rgba(22, 128, 120, .1);
}

.doctor-field>span {
    position: absolute;
    right: .5rem;
    bottom: .35rem;
    color: #8c9997;
    font-size: .5rem;
}

.doctor-editor {
    overflow: hidden;
    border: 1px solid #d8e2e0;
    border-radius: .45rem;
}

.doctor-editor-toolbar {
    display: flex;
    align-items: center;
    gap: .1rem;
    padding: .3rem .45rem;
    border-bottom: 1px solid #e3eae9;
    background: #fbfcfc;
}

.doctor-editor-toolbar select,
.doctor-editor-toolbar button {
    height: 1.75rem;
    border: 0;
    border-radius: .25rem;
    background: transparent;
    color: #485e5a;
    font-size: .62rem;
}

.doctor-editor-toolbar select {
    width: 85px;
}

.doctor-editor-toolbar button {
    width: 1.7rem;
}

.doctor-editor-toolbar button:hover {
    background: #edf4f2;
}

.doctor-editor-toolbar>span {
    flex: 1;
}

.doctor-editor>textarea {
    min-height: 155px;
    border: 0;
    border-radius: 0;
}

.doctor-return-row,
.doctor-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.doctor-return-row .form-control,
.doctor-form-grid .form-control,
.doctor-form-grid .form-select {
    font-size: .66rem;
}

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

.doctor-form-grid textarea {
    min-height: 90px;
}

.doctor-readonly-block {
    min-height: 260px;
    padding: 1rem;
    border: 1px solid #e0e8e6;
    border-radius: .55rem;
    background: #fafcfc;
}

.doctor-readonly-block h3 {
    font-size: .78rem;
}

.doctor-readonly-block p {
    color: #405754;
    font-size: .7rem;
    line-height: 1.65;
}

.doctor-addendum-form {
    display: grid;
    gap: .5rem;
    margin-top: 1rem;
}

.doctor-addendum-form .btn {
    width: max-content;
}

.doctor-documents-empty {
    padding: 3rem 1rem;
    color: #71817f;
    text-align: center;
}

.doctor-documents-empty>i {
    color: #70aaa4;
    font-size: 2rem;
}

.doctor-documents-empty h3 {
    margin: .65rem 0 .3rem;
    color: #314b5e;
    font-size: .85rem;
}

.doctor-documents-empty p {
    font-size: .66rem;
}

.doctor-documents-pane {
    padding: 1rem !important;
}

.doctor-documents-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.doctor-documents-heading span {
    color: #3f84b8;
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.doctor-documents-heading h2 {
    margin: .12rem 0 .15rem;
    color: #253f3c;
    font-size: .9rem;
}

.doctor-documents-heading p {
    margin: 0;
    color: #71827f;
    font-size: .61rem;
}

.doctor-documents-heading .btn {
    flex: 0 0 auto;
    font-size: .61rem;
}

.doctor-document-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: .8rem;
}

.doctor-document-actions>button {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    padding: .7rem;
    border: 1px solid #dce6ee;
    border-radius: .65rem;
    background: #fff;
    color: #344d49;
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.doctor-document-actions>button:hover {
    border-color: #9acbc5;
    box-shadow: 0 5px 16px rgba(41, 83, 78, .08);
    transform: translateY(-1px);
}

.doctor-document-actions>button>i {
    display: grid;
    flex: 0 0 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border-radius: .55rem;
    font-size: 1rem;
}

.doctor-document-actions>button span,
.doctor-document-actions>button strong,
.doctor-document-actions>button small {
    display: block;
    min-width: 0;
}

.doctor-document-actions>button strong {
    font-size: .68rem;
}

.doctor-document-actions>button small {
    overflow: hidden;
    margin-top: .08rem;
    color: #7b8b88;
    font-size: .51rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doctor-document-actions>.recipe>i {
    background: #e8f3fb;
    color: #3f84b8;
}

.doctor-document-actions>.referral>i {
    background: #e7efff;
    color: #3c70cf;
}

.doctor-document-actions>.certificate>i {
    background: #fff0dc;
    color: #d57b16;
}

.doctor-document-actions>.active.recipe {
    border-color: #35aa87;
    box-shadow: 0 0 0 2px rgba(53, 170, 135, .1);
}

.doctor-document-actions>.active.referral {
    border-color: #6f98e6;
    box-shadow: 0 0 0 2px rgba(80, 120, 204, .1);
}

.doctor-document-actions>.active.certificate {
    border-color: #e3a355;
    box-shadow: 0 0 0 2px rgba(215, 133, 35, .1);
}

.doctor-document-form-panels {
    border: 1px solid #dce6ee;
    border-radius: .7rem;
    background: #fbfdfd;
}

.doctor-document-form-panels>.tab-pane {
    padding: 1rem;
}

.doctor-document-form-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .85rem;
}

.doctor-document-form-title>div {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 50%;
}

.doctor-document-form-title>div.recipe {
    background: #e8f3fb;
    color: #3f84b8;
}

.doctor-document-form-title>div.referral {
    background: #e7efff;
    color: #3c70cf;
}

.doctor-document-form-title>div.certificate {
    background: #fff0dc;
    color: #d57b16;
}

.doctor-document-form-title strong,
.doctor-document-form-title small {
    display: block;
}

.doctor-document-form-title strong {
    color: #314b5e;
    font-size: .72rem;
}

.doctor-document-form-title small {
    color: #7d8d8a;
    font-size: .53rem;
}

.doctor-recipe-items .recipe-item {
    grid-template-columns: 1.4fr .8fr .7fr 1fr 1fr .75fr auto;
    align-items: end;
    gap: .5rem;
    padding: .75rem;
    border: 1px solid #dfe8ef;
    border-radius: .55rem;
    background: #fff;
}

.doctor-recipe-items .recipe-item .instructions {
    grid-column: 1 / -2;
}

.doctor-recipe-items label,
.doctor-document-grid label,
.doctor-document-field label {
    display: block;
    margin-bottom: .25rem;
    color: #405753;
    font-size: .56rem;
    font-weight: 700;
}

.doctor-recipe-items .form-control,
.doctor-document-grid .form-control,
.doctor-document-grid .form-select,
.doctor-document-field .form-control,
.doctor-cid-consent .form-control {
    min-height: 2.25rem;
    border-color: #d7e2e0;
    font-size: .61rem;
}

.doctor-remove-medicine {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #f1d1d1;
    background: #fff5f5;
    color: #cf4545;
}

.doctor-add-medicine {
    margin: .1rem 0 .8rem;
    border: 1px dashed #8abfb7;
    background: #f1fbf9;
    color: #3f84b8;
    font-size: .59rem;
    font-weight: 700;
}

.doctor-add-medicine i {
    margin-right: .3rem;
}

.doctor-document-field {
    margin-bottom: .75rem;
}

.doctor-document-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: .7rem;
    margin-bottom: .85rem;
}

.doctor-document-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.doctor-document-warning {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-bottom: .8rem;
    padding: .65rem;
    border: 1px solid #f0d7a6;
    border-radius: .5rem;
    background: #fffaf0;
    color: #9a6819;
}

.doctor-document-warning i {
    margin-top: .05rem;
    font-size: .85rem;
}

.doctor-document-warning strong,
.doctor-document-warning small {
    display: block;
}

.doctor-document-warning strong {
    font-size: .59rem;
}

.doctor-document-warning small {
    margin-top: .08rem;
    color: #8a7656;
    font-size: .51rem;
    line-height: 1.45;
}

.doctor-cid-consent {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    align-items: center;
    gap: .75rem;
    margin-bottom: .9rem;
    padding: .7rem;
    border: 1px solid #ead8bc;
    border-radius: .55rem;
    background: #fffaf3;
}

.doctor-cid-consent>label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 0;
}

.doctor-cid-consent input[type="checkbox"] {
    margin-top: .16rem;
    accent-color: #148b79;
}

.doctor-cid-consent strong,
.doctor-cid-consent small {
    display: block;
}

.doctor-cid-consent strong {
    color: #5c4b33;
    font-size: .58rem;
}

.doctor-cid-consent small {
    color: #88775d;
    font-size: .5rem;
}

.doctor-emit-button {
    color: #fff;
    font-size: .63rem;
    font-weight: 700;
}

.doctor-emit-button.recipe {
    background: #4d92c8;
}

.doctor-emit-button.referral {
    background: #3f70ce;
}

.doctor-emit-button.certificate {
    background: #cf7d1e;
}

.doctor-emit-button:hover {
    filter: brightness(.94);
    color: #fff;
}

/* Tipografia da área médica: maior que a interface administrativa compacta. */
.doctor-patient-identity h1 {
    font-size: 1.18rem;
}

.doctor-patient-identity p,
.doctor-patient-status,
.doctor-header-privacy,
.doctor-header-actions .btn,
.doctor-saved-status {
    font-size: .74rem;
}

.doctor-header-actions>small,
.doctor-history-item small,
.doctor-history-item p,
.doctor-history-type,
.doctor-essential-card small,
.doctor-privacy-card p,
.doctor-finish-card>p {
    font-size: .64rem;
}

.doctor-history-card h2,
.doctor-essential-card h2,
.doctor-record-pane label,
.doctor-return-row label,
.doctor-form-grid label {
    font-size: .72rem;
}

.doctor-history-item>strong,
.doctor-essential-card strong,
.doctor-privacy-card strong,
.doctor-finish-card>strong {
    font-size: .76rem;
}

.doctor-record-tabs button {
    font-size: .72rem;
}

.doctor-field>textarea,
.doctor-editor>textarea,
.doctor-return-row .form-control,
.doctor-form-grid .form-control,
.doctor-form-grid .form-select,
.doctor-document-form-panels .form-control,
.doctor-document-form-panels .form-select {
    font-size: .75rem;
}

.doctor-field>label,
.doctor-document-form-title strong,
.doctor-document-actions>button strong {
    font-size: .76rem;
}

.doctor-field>span,
.doctor-document-form-title small,
.doctor-document-actions>button small,
.doctor-document-warning small {
    font-size: .61rem;
}

.doctor-document-actions>.exam>i,
.doctor-document-form-title>div.exam {
    background: #e8f5ff;
    color: #2680bd;
}

.doctor-document-actions>.declaration>i,
.doctor-document-form-title>div.declaration {
    background: #edf7df;
    color: #5f9220;
}

.doctor-document-actions>.report>i,
.doctor-document-form-title>div.report {
    background: #f2eafe;
    color: #7a51ba;
}

.doctor-document-actions>.active.exam { border-color: #65a8d7; box-shadow: 0 0 0 2px rgba(38,128,189,.1); }
.doctor-document-actions>.active.declaration { border-color: #8dbb54; box-shadow: 0 0 0 2px rgba(95,146,32,.1); }
.doctor-document-actions>.active.report { border-color: #9c78cf; box-shadow: 0 0 0 2px rgba(122,81,186,.1); }
.doctor-emit-button.exam { background: #277fb9; }
.doctor-emit-button.declaration { background: #609226; }
.doctor-emit-button.report { background: #7750b4; }

.doctor-exam-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
    margin-bottom: .8rem;
}

.doctor-exam-options label {
    cursor: pointer;
}

.doctor-exam-options input {
    position: absolute;
    opacity: 0;
}

.doctor-exam-options span {
    display: block;
    padding: .55rem .65rem;
    border: 1px solid #dce6ee;
    border-radius: .45rem;
    background: #fff;
    color: #435a56;
    font-size: .68rem;
}

.doctor-exam-options input:checked+span {
    border-color: #4c9dcf;
    background: #eaf6fd;
    color: #1e6e9f;
    font-weight: 700;
}

.doctor-digital-readiness {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .7rem;
    margin-top: .8rem;
    padding: .75rem;
    border: 1px solid #d9e5e3;
    border-radius: .6rem;
    background: #f8fbfb;
}

.doctor-digital-readiness>i {
    color: #16877c;
    font-size: 1.2rem;
}

.doctor-digital-readiness strong { color: #314b5e; font-size: .72rem; }
.doctor-digital-readiness p { margin: .12rem 0 0; color: #71817f; font-size: .63rem; line-height: 1.5; }
.doctor-digital-readiness>span { padding: .28rem .5rem; border-radius: 2rem; background: #eef3f7; color: #657572; font-size: .58rem; font-weight: 700; }

.doctor-section-intro span {
    color: #3f84b8;
    font-size: .59rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.doctor-section-intro h2 { margin: .15rem 0; color: #314b5e; font-size: 1rem; }
.doctor-section-intro p { margin: 0 0 .9rem; color: #72827f; font-size: .68rem; }

.doctor-clinical-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.doctor-clinical-summary {
    min-width: 0;
    padding: .8rem;
    border: 1px solid #dce6ee;
    border-radius: .65rem;
    background: #fff;
}

.doctor-clinical-summary>header {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .65rem;
}

.doctor-clinical-summary>header>span {
    display: grid;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: .55rem;
}

.doctor-clinical-summary.vitals>header>span { background:#edf6fc;color:#3f84b8; }
.doctor-clinical-summary.allergies>header>span { background:#fff0eb;color:#d86842; }
.doctor-clinical-summary.medications>header>span { background:#e9f1ff;color:#4778cf; }
.doctor-clinical-summary.problems>header>span { background:#f3eafe;color:#8455be; }
.doctor-clinical-summary>header>div { flex:1;min-width:0; }
.doctor-clinical-summary>header strong,.doctor-clinical-summary>header small { display:block; }
.doctor-clinical-summary>header strong { color:#314b5e;font-size:.74rem; }
.doctor-clinical-summary>header small { color:#84918f;font-size:.6rem; }
.doctor-clinical-summary>header>button { border:0;background:transparent;color:#3f84b8;font-size:.63rem;font-weight:700; }

.doctor-vitals-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem;
}

.doctor-vitals-preview span { padding:.45rem;border-radius:.4rem;background:#f5f9f8;color:#778784;font-size:.55rem;text-align:center; }
.doctor-vitals-preview strong { display:block;margin-bottom:.08rem;color:#314b5e;font-size:.72rem; }
.doctor-clinical-empty { margin:0;padding:.6rem;border-radius:.4rem;background:#f8fafc;color:#7c8c89;font-size:.64rem; }
.doctor-clinical-list { display:grid;gap:.35rem;max-height:145px;overflow:auto; }
.doctor-clinical-list>div { display:flex;align-items:center;gap:.4rem;padding:.45rem .5rem;border-radius:.4rem;background:#f7f9fb; }
.doctor-clinical-list p { flex:1;min-width:0;margin:0; }
.doctor-clinical-list strong,.doctor-clinical-list small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.doctor-clinical-list strong { color:#384f4b;font-size:.68rem; }
.doctor-clinical-list small { color:#7b8987;font-size:.57rem; }
.doctor-clinical-list form button { width:1.7rem;height:1.7rem;border:0;border-radius:50%;background:#e5f5ed;color:#25845f; }

.doctor-data-modal .modal-content { overflow:hidden;border:0;border-radius:.85rem;box-shadow:0 24px 70px rgba(22,53,49,.2); }
.doctor-data-modal .modal-header { align-items:flex-start;padding:1rem 1.15rem;border-bottom:1px solid #e3eaf0; }
.doctor-data-modal .modal-header span { color:#3f84b8;font-size:.61rem;font-weight:800;letter-spacing:.08em; }
.doctor-data-modal .modal-header h2 { margin:.12rem 0 0;color:#314b5e;font-size:1rem; }
.doctor-data-modal .modal-body { padding:1rem 1.15rem; }
.doctor-data-modal .modal-footer { padding:.75rem 1.15rem;border-top:1px solid #e3eaf0; }
.doctor-data-modal .modal-footer .btn { font-size:.72rem; }
.doctor-modal-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem; }
.doctor-modal-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.doctor-modal-grid .full { grid-column:1/-1; }
.doctor-modal-grid label { display:block;margin-bottom:.3rem;color:#3d5652;font-size:.7rem;font-weight:700; }
.doctor-modal-grid .form-control,.doctor-modal-grid .form-select { min-height:2.45rem;font-size:.76rem; }
.doctor-modal-note { margin:0 0 .8rem;color:#71817e;font-size:.68rem; }

.medical-dashboard {
    display: grid;
    gap: 1rem;
}

.medical-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
    align-items: end;
    gap: 1rem;
}

.medical-dashboard-welcome { padding:.4rem 0; }
.medical-dashboard-welcome p { margin:0;color:#38514d;font-size:1rem; }
.medical-dashboard-welcome h1 { margin:.1rem 0 .25rem;color:#263b4b;font-size:1.75rem;font-weight:800; }
.medical-dashboard-welcome h1 span { font-size:1.35rem; }
.medical-dashboard-welcome small { color:#718480;font-size:.76rem; }
.medical-dashboard-welcome small i { margin-right:.35rem;color:#4d92c8; }

.medical-daily-phrase {
    position: relative;
    min-height: 105px;
    margin: 0;
    padding: 1rem 3.5rem 1rem 2.5rem;
    overflow: hidden;
    border: 1px solid #d5ebe7;
    border-radius: .85rem;
    background: linear-gradient(135deg,#f1f7fc,#e5f1fa);
}

.medical-daily-phrase>.bi-quote { position:absolute;top:.65rem;left:.75rem;color:#199487;font-size:1.35rem; }
.medical-daily-phrase>.bi-flower1 { position:absolute;right:1rem;bottom:.5rem;color:#71ad79;font-size:2.6rem;opacity:.65; }
.medical-daily-phrase p { position:relative;z-index:1;margin:0 0 .3rem;color:#365f7b;font-size:.8rem;line-height:1.55; }
.medical-daily-phrase span { position:relative;z-index:1;color:#3f84b8;font-size:.7rem;font-weight:800; }

.medical-dashboard-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem; }
.medical-metric-card { display:grid;place-items:center;min-height:160px;padding:1rem;border:1px solid #dce6ee;border-radius:.8rem;background:#fff;box-shadow:0 6px 20px rgba(34,71,66,.045);text-align:center; }
.medical-metric-card>span { display:grid;width:2.7rem;height:2.7rem;place-items:center;border-radius:50%;font-size:1.15rem; }
.medical-metric-card.agenda>span { background:#def4f1;color:#4d92c8; }
.medical-metric-card.progress>span { background:#e9f1ff;color:#4777cb; }
.medical-metric-card.done>span { background:#e4f7e9;color:#329657; }
.medical-metric-card.pending>span { background:#fff2dd;color:#ce7c17; }
.medical-metric-card>strong { margin:.4rem 0 0;color:#263b4b;font-size:1.55rem; }
.medical-metric-card>p { margin:0;color:#748582;font-size:.72rem; }
.medical-metric-card>a { margin-top:.6rem;color:#3f84b8;font-size:.67rem;font-weight:700;text-decoration:none; }

.medical-dashboard-grid { display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,.8fr);gap:1rem; }
.medical-today-card,.medical-next-card,.medical-shortcuts,.medical-shared-card { border:1px solid #dce6ee;border-radius:.8rem;background:#fff;box-shadow:0 6px 20px rgba(34,71,66,.04); }
.medical-today-card>header,.medical-next-card>header,.medical-shortcuts>header,.medical-shared-card>header { display:flex;align-items:center;justify-content:space-between;padding:.9rem 1rem;border-bottom:1px solid #e5ebf0; }
.medical-today-card h2,.medical-next-card h2,.medical-shortcuts h2,.medical-shared-card h2 { margin:0;color:#314b5e;font-size:.9rem; }
.medical-today-card h2 i,.medical-next-card h2 i,.medical-shortcuts h2 i,.medical-shared-card h2 i { margin-right:.4rem;color:#4d92c8; }
.medical-today-card>header span { color:#66807c;font-size:.68rem; }
.medical-today-list { padding:.65rem 1rem; }
.medical-today-list>article { display:grid;grid-template-columns:55px 34px minmax(0,1fr) auto auto;align-items:center;gap:.65rem;padding:.7rem;border:1px solid #e3eaf0;border-radius:.55rem; }
.medical-today-list>article+article { margin-top:.5rem; }
.medical-today-list time { padding:.4rem;border-radius:.45rem;background:#edf6fc;color:#3f84b8;font-size:.76rem;font-weight:800;text-align:center; }
.medical-patient-avatar { display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:#e8f3fb;color:#3f84b8;font-size:.7rem;font-weight:800; }
.medical-today-list article>div { min-width:0; }
.medical-today-list article>div strong,.medical-today-list article>div small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.medical-today-list article>div strong { color:#314b5e;font-size:.76rem; }
.medical-today-list article>div small { color:#778784;font-size:.63rem; }
.medical-today-list .btn { display:inline-flex;align-items:center;justify-content:center;gap:.4rem;font-size:.65rem;white-space:nowrap; }
.medical-status { padding:.25rem .45rem;border-radius:2rem;background:#eef3f7;color:#647572;font-size:.58rem;font-style:normal;font-weight:700;white-space:nowrap; }
.medical-status.confirmado,.medical-status.retorno { background:#e4f6e9;color:#338958; }
.medical-status.em_atendimento { background:#e6f0ff;color:#3e6fbf; }
.medical-status.paciente_chegou,.medical-status.aguardando_atendimento { background:#fff1d9;color:#a96a16; }
.medical-status.finalizado { background:#e7f7ed;color:#238951; }
.medical-status.nao_atendido { background:#fff0f1;color:#c84e55; }
.medical-card-footer { display:block;margin:.2rem 1rem .9rem;padding:.65rem;border:1px solid #e4ebe9;border-radius:.5rem;color:#3f84b8;font-size:.68rem;font-weight:700;text-align:center;text-decoration:none; }
.medical-dashboard-side { display:grid;gap:1rem; }
.medical-next-card { position:relative;overflow:hidden; }
.medical-next-card>div { display:grid;padding:1rem; }
.medical-next-card>div time { color:#263b4b;font-size:1rem;font-weight:800; }
.medical-next-card>div small { color:#72837f;font-size:.62rem; }
.medical-next-card>div strong { margin-top:.45rem;color:#314b5e;font-size:.78rem; }
.medical-next-card>div p { margin:0;color:#71817e;font-size:.65rem; }
.medical-next-card>.bi-calendar2-week { position:absolute;right:1.2rem;bottom:.5rem;color:#a8bbb8;font-size:3.7rem;opacity:.55; }
.medical-shortcuts>div { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;padding:.85rem; }
.medical-shortcuts a { display:grid;gap:.3rem;place-items:center;min-height:75px;padding:.55rem;border:1px solid #e4ebe9;border-radius:.55rem;color:#3f6f92;text-align:center;text-decoration:none; }
.medical-shortcuts a i { font-size:1.05rem; }
.medical-shortcuts a span { font-size:.58rem;font-weight:700; }
.medical-dashboard-empty { padding:1.5rem;color:#7a8c88;text-align:center; }
.medical-dashboard-empty i { font-size:1.7rem; }
.medical-dashboard-empty p { margin:.3rem 0;font-size:.72rem; }
.medical-dashboard-empty.compact { padding:1rem;text-align:left; }
.medical-shared-card>div { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;padding:.8rem; }
.medical-shared-card article { padding:.7rem;border-radius:.55rem;background:#f7f9fb; }
.medical-shared-card strong,.medical-shared-card small { display:block; }
.medical-shared-card strong { color:#34504b;font-size:.72rem; }
.medical-shared-card small,.medical-shared-card p { color:#758581;font-size:.62rem; }
.medical-shared-card p { margin:.35rem 0 0; }

.doctor-attachment-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .45rem;
    margin: 0 1rem 1rem;
    padding: .85rem;
    border: 1px dashed #afc5c2;
    border-radius: .5rem;
    text-align: center;
}

.doctor-attachment-box strong {
    grid-column: 1 / -1;
    color: #364c49;
    font-size: .66rem;
    text-align: left;
}

.doctor-attachment-box a {
    grid-column: 1 / -1;
    color: #3f84b8;
    font-size: .65rem;
    font-weight: 680;
    text-decoration: none;
}

.doctor-attachment-box small {
    grid-column: 1 / -1;
    color: #84928f;
    font-size: .52rem;
}

.doctor-essential-column {
    display: grid;
    gap: .75rem;
}

.doctor-essential-card {
    padding: .9rem;
}

.doctor-essential-card>div {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem 0;
    border-bottom: 1px solid #ebf0ef;
}

.doctor-essential-card>div:last-child {
    border-bottom: 0;
}

.doctor-essential-card>div>span,
.doctor-share-button>span {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e1f4f1;
    color: #178b82;
}

.doctor-essential-card p {
    margin: 0;
}

.doctor-essential-card strong,
.doctor-essential-card small {
    display: block;
}

.doctor-essential-card strong {
    color: #334946;
    font-size: .64rem;
}

.doctor-essential-card small {
    margin-top: .12rem;
    color: #768784;
    font-size: .55rem;
    line-height: 1.45;
}

.doctor-privacy-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    overflow: hidden;
    padding: 1rem;
    border-color: #d9c6f6;
    background: #fbf8ff;
}

.doctor-privacy-card>i:first-child {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e8dcfb;
    color: #714ab5;
}

.doctor-privacy-card strong {
    color: #58447d;
    font-size: .67rem;
}

.doctor-privacy-card p {
    margin: .2rem 0 0;
    color: #776b8c;
    font-size: .55rem;
    line-height: 1.5;
}

.doctor-privacy-card>i:last-child {
    position: absolute;
    right: -.1rem;
    color: rgba(112, 75, 180, .09);
    font-size: 3.8rem;
}

.doctor-share-button {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem;
    color: #167b73;
    text-align: left;
}

.doctor-share-button strong {
    flex: 1;
    font-size: .63rem;
}

.doctor-share-button>.bi-chevron-right {
    font-size: .7rem;
}

.doctor-finish-card {
    padding: .9rem;
}

.doctor-finish-card>strong {
    color: #314b5e;
    font-size: .72rem;
}

.doctor-finish-card>p {
    margin: .2rem 0 .7rem;
    color: #788986;
    font-size: .55rem;
}

.doctor-finish-card .btn {
    width: 100%;
    margin-top: .65rem;
    font-size: .65rem;
}

@media (max-width: 1250px) {
    .doctor-record-workspace {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .doctor-essential-column {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .medical-dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .doctor-patient-header {
        grid-template-columns: 1fr auto;
    }

    .doctor-header-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding: .8rem 0 0;
        border-top: 1px solid #e3eaf0;
        border-left: 0;
    }

    .doctor-header-actions>small {
        text-align: left;
    }

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

    .doctor-history-card {
        order: 2;
    }

    .doctor-record-main {
        order: 1;
    }

    .doctor-essential-column {
        order: 3;
        grid-column: auto;
    }

    .doctor-history-timeline {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .doctor-history-timeline::before {
        display: none;
    }

    .doctor-recipe-items .recipe-item {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .doctor-recipe-items .recipe-item .medicine,
    .doctor-recipe-items .recipe-item .instructions {
        grid-column: span 2;
    }

    .medical-dashboard-hero,
    .medical-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .medical-dashboard-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .doctor-patient-header {
        grid-template-columns: 1fr;
    }

    .doctor-header-privacy {
        width: max-content;
    }

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

    .doctor-essential-column,
    .doctor-history-timeline,
    .doctor-return-row,
    .doctor-form-grid {
        grid-template-columns: 1fr;
    }

    .doctor-form-grid .full {
        grid-column: auto;
    }

    .doctor-documents-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .doctor-documents-heading .btn {
        width: 100%;
    }

    .doctor-document-actions,
    .doctor-document-grid,
    .doctor-document-grid.three,
    .doctor-cid-consent,
    .doctor-recipe-items .recipe-item,
    .doctor-clinical-summary-grid,
    .doctor-modal-grid,
    .doctor-modal-grid.three,
    .doctor-exam-options,
    .medical-dashboard-metrics,
    .medical-dashboard-side,
    .medical-shared-card>div {
        grid-template-columns: 1fr;
    }

    .doctor-recipe-items .recipe-item .medicine,
    .doctor-recipe-items .recipe-item .instructions,
    .doctor-document-grid .full {
        grid-column: auto;
    }

    .doctor-remove-medicine {
        width: 100%;
    }

    .doctor-modal-grid .full {
        grid-column: auto;
    }

    .doctor-vitals-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .doctor-digital-readiness {
        grid-template-columns: auto 1fr;
    }

    .doctor-digital-readiness>span {
        grid-column: 1 / -1;
        text-align: center;
    }

    .medical-dashboard-welcome h1 {
        font-size: 1.4rem;
    }

    .medical-today-list>article {
        grid-template-columns: 50px 32px minmax(0, 1fr);
    }

    .medical-today-list .medical-status,
    .medical-today-list article>form,
    .medical-today-list article>.btn {
        grid-column: 3;
        width: max-content;
    }

    .medical-shortcuts>div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.professional-agenda {
    color: #18384c;
}

.professional-agenda-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.professional-agenda-heading h1 {
    margin: 0 0 .25rem;
    color: #123b52;
    font-size: clamp(1.55rem, 2.1vw, 2rem);
    font-weight: 800;
}

.professional-agenda-heading p {
    margin: 0;
    color: #718594;
}

.professional-agenda-heading>span {
    display: inline-flex;
    gap: .55rem;
    align-items: center;
    padding: .65rem .9rem;
    border: 1px solid #dce7ee;
    border-radius: 12px;
    color: #356680;
    background: #fff;
    font-weight: 700;
}

.professional-agenda-toolbar {
    display: grid;
    grid-template-columns: auto minmax(250px, 1fr) auto minmax(180px, 220px) auto;
    gap: .8rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: .9rem;
    border: 1px solid #dce7ee;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(27, 69, 93, .04);
}

.professional-agenda-nav,
.professional-agenda-view {
    display: flex;
}

.professional-agenda-nav a,
.professional-agenda-view a {
    display: grid;
    min-width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #d9e5ec;
    color: #315a72;
    background: #fff;
    text-decoration: none;
}

.professional-agenda-nav a:first-child,
.professional-agenda-view a:first-child {
    border-radius: 10px 0 0 10px;
}

.professional-agenda-nav a:last-child,
.professional-agenda-view a:last-child {
    border-radius: 0 10px 10px 0;
}

.professional-agenda-nav a+a,
.professional-agenda-view a+a {
    border-left: 0;
}

.professional-agenda-view a {
    min-width: 60px;
    padding-inline: .8rem;
    font-size: .83rem;
    font-weight: 700;
}

.professional-agenda-view a.active {
    border-color: #356f94;
    color: #fff;
    background: #356f94;
}

.professional-agenda-range {
    display: flex;
    min-width: 0;
    gap: .65rem;
    align-items: center;
    color: #356680;
}

.professional-agenda-range input {
    width: 18px;
    border: 0;
    color: transparent;
    background: transparent;
}

.professional-agenda-range input::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
}

.professional-agenda-range strong {
    overflow: hidden;
    color: #1d455d;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.professional-agenda-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 1rem;
    align-items: start;
}

.professional-agenda-list,
.professional-agenda-side>section {
    border: 1px solid #dce7ee;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(27, 69, 93, .04);
}

.professional-agenda-list {
    min-width: 0;
    overflow: hidden;
}

.professional-agenda-columns,
.professional-agenda-row {
    display: grid;
    grid-template-columns: 78px minmax(160px, 1.15fr) minmax(135px, .9fr) minmax(130px, .8fr) minmax(145px, 175px) minmax(40px, auto);
    gap: 1rem;
    align-items: center;
}

.professional-agenda-columns {
    padding: .8rem 1rem;
    color: #748997;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.professional-agenda-day {
    border-top: 1px solid #e1eaf0;
}

.professional-agenda-day>header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .75rem 1rem;
    color: #27566e;
    background: #f6f9fb;
}

.professional-agenda-day>header div {
    display: flex;
    gap: .65rem;
    align-items: center;
}

.professional-agenda-day>header span {
    color: #3c7b9e;
    font-size: .78rem;
    font-weight: 700;
}

.professional-agenda-row {
    min-height: 76px;
    padding: .7rem 1rem;
    border-top: 1px solid #edf2f5;
}

.professional-agenda-row:hover {
    background: #fbfdfe;
}

.professional-agenda-row>time {
    display: grid;
    gap: .1rem;
    justify-items: center;
    padding: .5rem .3rem;
    border-radius: 10px;
    color: #245f7b;
    background: #edf6fa;
}

.professional-agenda-row>time strong {
    font-size: 1rem;
}

.professional-agenda-row>time small,
.professional-agenda-row p small,
.professional-agenda-procedure small,
.professional-agenda-professional small {
    color: #7d909d;
    font-size: .75rem;
}

.professional-agenda-patient {
    display: flex;
    min-width: 0;
    gap: .7rem;
    align-items: center;
}

.professional-agenda-patient>span {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    color: #327293;
    background: #e8f3f8;
    font-weight: 800;
}

.professional-agenda-patient p,
.professional-agenda-summary p,
.professional-agenda-legend p {
    display: grid;
    min-width: 0;
    margin: 0;
}

.professional-agenda-patient strong,
.professional-agenda-procedure strong,
.professional-agenda-professional strong {
    display: block;
    overflow: hidden;
    color: #24485c;
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.professional-agenda-status {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    gap: .4rem;
    align-items: center;
    padding: .35rem .55rem;
    overflow: hidden;
    border-radius: 7px;
    color: #8d641f;
    background: #fff2dc;
    font-size: .73rem;
    font-style: normal;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.professional-agenda-status>span,
.professional-agenda-legend>div>span {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
}

.professional-agenda-status.confirmado,
.professional-agenda-status.retorno {
    color: #238951;
    background: #e7f7ed;
}

.professional-agenda-status.em_atendimento,
.professional-agenda-status.paciente_chegou,
.professional-agenda-status.aguardando_atendimento {
    color: #2e76be;
    background: #e8f2ff;
}

.professional-agenda-status.finalizado {
    color: #238951;
    background: #e7f7ed;
}

.professional-agenda-status.cancelado,
.professional-agenda-status.faltou,
.professional-agenda-status.nao_atendido,
.professional-agenda-status.remarcado {
    color: #c84e55;
    background: #fff0f1;
}

.professional-agenda-actions {
    display: flex;
    min-width: 0;
    justify-content: flex-end;
    gap: .45rem;
    align-items: center;
}

.professional-agenda-actions .btn {
    display: inline-flex;
    gap: .42rem;
    align-items: center;
    justify-content: center;
    min-width: 158px;
    border-color: #245f7b;
    background: #245f7b;
    font-size: .78rem;
    font-weight: 750;
}

.professional-agenda-more {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #dce7ee;
    border-radius: 9px;
    color: #557080;
    background: #fff;
}

.professional-agenda-unavailable {
    min-width: 158px;
    color: #97a5ae;
    text-align: center;
    font-size: .78rem;
}

.professional-agenda-empty {
    display: flex;
    min-height: 64px;
    gap: .7rem;
    align-items: center;
    justify-content: center;
    color: #91a3ae;
}

.professional-agenda-empty i {
    font-size: 1.5rem;
}

.professional-agenda-no-results {
    padding: 3rem 1rem;
    color: #81939f;
    text-align: center;
}

.professional-agenda-no-results i {
    font-size: 2rem;
}

.professional-agenda-no-results h2 {
    margin: .7rem 0 .25rem;
    color: #315a72;
    font-size: 1.1rem;
}

.professional-agenda-side {
    display: grid;
    gap: 1rem;
}

.professional-agenda-side>section {
    padding: 1rem;
}

.professional-agenda-side h2 {
    margin: 0 0 .85rem;
    color: #214b61;
    font-size: .95rem;
    font-weight: 800;
}

.professional-agenda-summary>div,
.professional-agenda-legend>div {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .7rem 0;
    border-top: 1px solid #edf2f5;
}

.professional-agenda-summary>div>i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: #397b9e;
    background: #ecf5f9;
}

.professional-agenda-summary p strong {
    color: #1c465d;
    font-size: 1rem;
}

.professional-agenda-summary p small,
.professional-agenda-legend p small {
    color: #81929d;
    font-size: .72rem;
}

.professional-agenda-summary .confirmed>i,
.professional-agenda-legend .confirmed {
    color: #2a9a5d;
}

.professional-agenda-summary .waiting>i,
.professional-agenda-legend .waiting {
    color: #e39a2c;
}

.professional-agenda-summary .service>i,
.professional-agenda-legend .service {
    color: #388be0;
}

.professional-agenda-summary .cancelled>i,
.professional-agenda-legend .cancelled {
    color: #d9585e;
}

.professional-agenda-legend>div>span {
    flex: 0 0 8px;
}

.professional-agenda-legend p strong {
    color: #355468;
    font-size: .8rem;
}

.professional-agenda-side .professional-agenda-tip {
    display: flex;
    gap: .7rem;
    border-color: #d6e8f1;
    color: #39728f;
    background: #eff7fa;
}

.professional-agenda-tip>i {
    font-size: 1.1rem;
}

.professional-agenda-tip strong {
    display: block;
    margin-bottom: .25rem;
    font-size: .8rem;
}

.professional-agenda-tip p {
    margin: 0;
    color: #688491;
    font-size: .74rem;
    line-height: 1.45;
}

@media (max-width: 1280px) {
    .professional-agenda-layout {
        grid-template-columns: 1fr;
    }

    .professional-agenda-side {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .professional-agenda-columns,
    .professional-agenda-row {
        grid-template-columns: 72px minmax(170px, 1.2fr) minmax(140px, 1fr) minmax(145px, 175px) minmax(40px, auto);
    }

    .professional-agenda-columns span:nth-child(4),
    .professional-agenda-professional {
        display: none;
    }
}

@media (max-width: 900px) {
    .professional-agenda-toolbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .professional-agenda-view {
        grid-column: 1 / -1;
    }

    .professional-agenda-toolbar>.form-select {
        grid-column: 1 / 3;
    }

    .professional-agenda-columns {
        display: none;
    }

    .professional-agenda-row {
        grid-template-columns: 68px minmax(0, 1fr) auto;
        gap: .75rem;
    }

    .professional-agenda-procedure {
        grid-column: 2;
    }

    .professional-agenda-status {
        grid-column: 3;
        grid-row: 1;
    }

    .professional-agenda-actions {
        grid-column: 2 / 4;
        justify-content: flex-start;
    }

    .professional-agenda-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .professional-agenda-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .professional-agenda-toolbar {
        grid-template-columns: auto 1fr;
    }

    .professional-agenda-range {
        min-width: 0;
    }

    .professional-agenda-view,
    .professional-agenda-toolbar>.form-select,
    .professional-agenda-toolbar>.btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .professional-agenda-view a {
        flex: 1;
    }

    .professional-agenda-day>header {
        align-items: flex-start;
        flex-direction: column;
    }

    .professional-agenda-row {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .professional-agenda-status,
    .professional-agenda-actions {
        grid-column: 2;
        grid-row: auto;
    }

    .professional-agenda-actions {
        flex-wrap: wrap;
    }

    .professional-agenda-actions .btn,
    .professional-agenda-unavailable {
        min-width: 0;
    }
}

.doctor-plan-explainer {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #d6e7f1;
    border-radius: 13px;
    background: #f2f8fc;
}

.doctor-plan-explainer>span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: #4d92c8;
    font-size: 1.1rem;
}

.doctor-plan-explainer strong {
    display: block;
    margin-bottom: .25rem;
    color: #254e6b;
}

.doctor-plan-explainer p {
    margin: 0;
    color: #617b8b;
    font-size: .85rem;
    line-height: 1.55;
}

.doctor-data-modal [data-add-clinical-row] {
    display: flex;
    width: 100%;
    gap: .7rem;
    align-items: center;
    justify-content: flex-start;
    padding: .75rem .9rem;
    border: 1px dashed #9fc6dd;
    border-radius: 12px;
    color: #2d6f94;
    background: #f2f8fc;
    font-weight: 750;
    text-align: left;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.doctor-data-modal [data-add-clinical-row] i {
    display: grid;
    width: 30px;
    height: 30px;
    margin: 0 !important;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: #4d92c8;
}

.doctor-data-modal [data-add-clinical-row]::after {
    content: "Adicionar novo item";
    margin-left: auto;
    color: #7891a1;
    font-size: .72rem;
    font-weight: 600;
}

.doctor-data-modal [data-add-clinical-row]:hover {
    border-color: #4d92c8;
    color: #245f82;
    background: #e9f4fa;
    transform: translateY(-1px);
}

.professional-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1.2rem;
    align-items: start;
}

.professional-profile-form {
    padding: 1.4rem;
}

.professional-profile-hero {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #e4ecf1;
}

.professional-profile-hero>img,
.professional-profile-hero>span {
    display: grid;
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    place-items: center;
    border: 4px solid #edf5fa;
    border-radius: 50%;
    color: #2f789f;
    background: #dceff7;
    object-fit: cover;
    font-size: 1.8rem;
    font-weight: 800;
}

.professional-profile-hero h2 {
    margin: 0 0 .2rem;
    color: #214b63;
    font-size: 1.25rem;
}

.professional-profile-hero p,
.professional-profile-hero small {
    display: block;
    margin: 0;
    color: #728692;
}

.professional-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.professional-profile-fields .full {
    grid-column: 1 / -1;
}

.professional-profile-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin-top: 1rem;
}

.professional-profile-media label {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .9rem;
    border: 1px dashed #abc8d9;
    border-radius: 12px;
    color: #315f78;
    background: #f7fafc;
    cursor: pointer;
}

.professional-profile-media label>span {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: #4d92c8;
}

.professional-profile-media label div {
    display: grid;
}

.professional-profile-media label small {
    color: #7b8f9c;
    font-size: .72rem;
}

.professional-profile-media input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.professional-signature-preview {
    display: grid;
    width: min(100%, 340px);
    gap: .35rem;
    margin-top: 1rem;
    padding: .8rem;
    border: 1px solid #e1eaf0;
    border-radius: 12px;
    background: #fff;
}

.professional-signature-preview small {
    color: #738895;
}

.professional-signature-preview img {
    width: 100%;
    height: 90px;
    object-fit: contain;
}

.professional-profile-save {
    margin-top: 1.2rem;
}

.professional-profile-side {
    display: grid;
    gap: 1rem;
}

.professional-profile-side>section {
    padding: 1.2rem;
}

.professional-profile-side>section>span {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: .8rem;
    place-items: center;
    border-radius: 12px;
    color: #34799f;
    background: #e7f3f8;
    font-size: 1.15rem;
}

.professional-profile-side h2 {
    color: #254e67;
    font-size: 1rem;
}

.professional-profile-side p {
    color: #708590;
    font-size: .82rem;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .professional-profile-grid {
        grid-template-columns: 1fr;
    }

    .professional-profile-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .professional-profile-fields,
    .professional-profile-media,
    .professional-profile-side {
        grid-template-columns: 1fr;
    }
}

.clinical-repeat-row {
    padding: 1rem;
    border: 1px solid #dbe5ec;
    border-radius: 14px;
    background: #f9fbfd;
}

.clinical-repeat-row + .clinical-repeat-row {
    margin-top: .9rem;
}

.clinical-repeat-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .8rem;
    color: #254e6b;
}

.clinical-repeat-heading button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #c44747;
    background: #fff0f0;
}

.doctor-return-slots {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    min-height: 58px;
    padding: .75rem;
    align-items: center;
    border: 1px dashed #a9c5d8;
    border-radius: 12px;
    background: #f6fafd;
}

.doctor-return-slots small {
    color: #63798a;
}

.doctor-return-slot {
    min-width: 72px;
    padding: .55rem .75rem;
    border: 1px solid #9dc1da;
    border-radius: 10px;
    color: #254e6b;
    background: #fff;
    font-weight: 700;
}

.doctor-return-slot:hover,
.doctor-return-slot.active {
    border-color: #4d92c8;
    color: #fff;
    background: #4d92c8;
    box-shadow: 0 5px 14px rgba(77, 146, 200, .22);
}

.professional-password-action {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 12px 14px;
    color: #fff;
    text-decoration: none;
    border: 1px solid #3f86bd;
    border-radius: 12px;
    background: linear-gradient(135deg, #397fae, #4d92c8);
    box-shadow: 0 8px 20px rgba(54, 119, 164, .2);
    transition: transform .18s ease, box-shadow .18s ease;
}

.professional-password-action:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(54, 119, 164, .28);
}

.professional-password-action>span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .17);
    font-size: 1.1rem;
}

.professional-password-action div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.professional-password-action strong {
    font-size: .94rem;
}

.professional-password-action small {
    color: rgba(255, 255, 255, .8);
    font-size: .75rem;
}

.document-access-note {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 17px;
    color: #245778;
    border: 1px solid #c7dfef;
    border-radius: 14px;
    background: #f0f8fd;
}

.document-access-note>i {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 11px;
    background: #dceef8;
    font-size: 1.15rem;
}

.document-access-note div {
    display: grid;
    gap: 2px;
}

.document-access-note span {
    color: #617b8d;
    font-size: .84rem;
}

.document-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(240px, .8fr) auto;
    gap: 12px;
    align-items: center;
}

.professional-patients-heading {
    margin-bottom: 18px;
}

.professional-patient-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.professional-patient-stats article {
    display: flex;
    gap: 13px;
    align-items: center;
    min-height: 94px;
    padding: 17px;
    border: 1px solid #d7e4ec;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(41, 75, 96, .05);
}

.professional-patient-stats article>span {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    color: #357fad;
    place-items: center;
    border-radius: 13px;
    background: #e8f4fb;
    font-size: 1.15rem;
}

.professional-patient-stats article.has-warning>span {
    color: #a56c17;
    background: #fff4db;
}

.professional-patient-stats article div {
    display: grid;
    gap: 2px;
}

.professional-patient-stats strong {
    color: #17384d;
    font-size: 1.45rem;
    line-height: 1;
}

.professional-patient-stats small {
    color: #6d8291;
    font-size: .78rem;
}

.professional-patient-panel {
    overflow: hidden;
    padding: 0;
}

.professional-patient-filter {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 220px auto;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e2ebf0;
    background: #fbfdfe;
}

.professional-patient-list {
    display: grid;
}

.professional-patient-row {
    display: grid;
    grid-template-columns: minmax(210px, 1.25fr) minmax(150px, .85fr) minmax(160px, .9fr) minmax(160px, .9fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 104px;
    padding: 17px 19px;
    border-bottom: 1px solid #e6edf1;
    transition: background .18s ease;
}

.professional-patient-row:hover {
    background: #f8fbfd;
}

.professional-patient-person {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.professional-patient-person>span {
    display: grid;
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    color: #2d759f;
    place-items: center;
    border-radius: 13px;
    background: #dff0f8;
    font-weight: 800;
}

.professional-patient-person div,
.professional-patient-contact,
.professional-patient-date {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.professional-patient-person strong,
.professional-patient-contact strong,
.professional-patient-date strong {
    overflow: hidden;
    color: #18384c;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
}

.professional-patient-person small,
.professional-patient-contact small,
.professional-patient-date small,
.professional-patient-date span {
    color: #78909f;
    font-size: .73rem;
}

.professional-patient-contact em {
    color: #af7620;
    font-size: .68rem;
    font-style: normal;
}

.professional-patient-date.next strong {
    color: #317cab;
}

.professional-patient-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
}

.professional-patient-actions .btn {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    gap: 7px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    white-space: nowrap;
}

.professional-patient-panel .pagination-wrap {
    padding: 14px 18px;
}

.doctor-history-heading {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.doctor-history-heading h2,
.doctor-history-heading p {
    margin: 0;
}

.doctor-history-heading h2 {
    color: #263f50;
    font-size: .76rem;
    font-weight: 780;
}

.doctor-history-heading p {
    margin-top: .2rem;
    color: #7b8d98;
    font-size: .62rem;
    line-height: 1.4;
}

.doctor-history-heading>span {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    color: #357da9;
    place-items: center;
    border-radius: 9px;
    background: #e6f2f9;
    font-size: .72rem;
    font-weight: 800;
}

.doctor-history-complete {
    display: flex;
    gap: .35rem;
    align-items: center;
    justify-content: center;
    padding: .55rem;
    color: #628072;
    font-size: .62rem;
}

.doctor-history-full-list {
    display: grid;
    gap: .55rem;
}

.doctor-history-full-list>a {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) auto 18px;
    gap: .8rem;
    align-items: center;
    padding: .8rem;
    color: #27465a;
    text-decoration: none;
    border: 1px solid #dce7ed;
    border-radius: 11px;
    background: #fff;
}

.doctor-history-full-list>a:hover,
.doctor-history-full-list>a.active {
    border-color: #82b9db;
    background: #f2f8fc;
}

.doctor-history-full-list time,
.doctor-history-full-list>a>span {
    display: grid;
    gap: .2rem;
}

.doctor-history-full-list small {
    color: #758b98;
    font-size: .72rem;
}

.doctor-history-full-list em {
    padding: .3rem .5rem;
    color: #377452;
    border-radius: 2rem;
    background: #eaf7ef;
    font-size: .67rem;
    font-style: normal;
    white-space: nowrap;
}

.doctor-return-charge {
    padding: .85rem;
    border: 1px solid #d8e6ee;
    border-radius: 12px;
    background: #f8fbfd;
}

.doctor-return-charge>p {
    margin: .15rem 0 .7rem;
    color: #748996;
    font-size: .7rem;
}

.doctor-return-charge>div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.doctor-return-charge label,
.return-free-choice label {
    cursor: pointer;
}

.doctor-return-charge input,
.return-free-choice input {
    position: absolute;
    opacity: 0;
}

.doctor-return-charge label>span,
.return-free-choice label>span {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: .15rem .65rem;
    align-items: center;
    padding: .7rem;
    border: 1px solid #d9e5ec;
    border-radius: 10px;
    background: #fff;
}

.doctor-return-charge label>span>i,
.return-free-choice label>span>i {
    grid-row: 1 / 3;
    display: grid;
    width: 34px;
    height: 34px;
    color: #3d85b3;
    place-items: center;
    border-radius: 9px;
    background: #e7f3fa;
}

.doctor-return-charge label>span small,
.return-free-choice label>span small {
    color: #748895;
    font-size: .66rem;
}

.doctor-return-charge input:checked+span,
.return-free-choice input:checked+span {
    border-color: #4d92c8;
    background: #f0f8fd;
    box-shadow: 0 0 0 2px rgba(77, 146, 200, .1);
}

.return-free-choice {
    margin: 0 0 .85rem;
}

.return-free-choice label {
    display: block;
}

.finance-return-free-choice {
    margin: 1rem 0;
}

.agenda-heading-actions {
    display: flex;
    gap: .65rem;
    align-items: center;
}

.btn-receive-payment,
.appointment-detail-modal .btn-finance-open {
    border: 1px solid #c7dcef;
    background: #edf5fb;
    color: #326f98;
    font-weight: 700;
}

.btn-receive-payment:hover,
.appointment-detail-modal .btn-finance-open:hover {
    border-color: #4d92c8;
    background: #4d92c8;
    color: #fff;
}

@media (max-width: 1199.98px) {
    .professional-patient-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .professional-patient-row {
        grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(150px, .9fr)) auto;
    }

    .professional-patient-contact {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .document-filter-bar,
    .professional-patient-stats,
    .professional-patient-filter {
        grid-template-columns: 1fr;
    }

    .professional-patient-row {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .professional-patient-person,
    .professional-patient-actions {
        grid-column: 1 / -1;
    }

    .professional-patient-actions {
        justify-content: stretch;
    }

    .professional-patient-actions .btn-primary {
        flex: 1;
    }

    .doctor-history-full-list>a {
        grid-template-columns: 1fr auto;
    }

    .doctor-history-full-list>a>span,
    .doctor-history-full-list>a>time {
        grid-column: 1;
    }

    .doctor-return-charge>div {
        grid-template-columns: 1fr;
    }

    .agenda-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.appointment-quick-actions .btn-arrival {
    display: inline-flex;
    min-height: 42px;
    gap: .55rem;
    align-items: center;
    padding: .45rem .85rem .45rem .5rem;
    border: 1px solid #b8d9f2;
    border-radius: .7rem;
    color: #185f95;
    background: linear-gradient(135deg, #eaf5ff, #d8ebfb);
    box-shadow: 0 5px 14px rgba(51, 125, 181, .16);
}

.appointment-quick-actions .btn-arrival span {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: .5rem;
    color: #fff;
    background: #3f91cc;
}

.appointment-saved-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 55px rgba(25, 65, 88, .22);
}

.appointment-saved-modal .modal-body {
    padding: 1.5rem;
    text-align: center;
}

.appointment-saved-icon {
    width: 3.25rem;
    height: 3.25rem;
    display: grid;
    margin: 0 auto .85rem;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #2b9860;
    font-size: 1.35rem;
}

.appointment-saved-modal h2 {
    margin: 0;
    color: #1f4358;
    font-size: 1.15rem;
}

.appointment-saved-modal p {
    margin: .4rem 0 1.15rem;
    color: #718693;
    font-size: .82rem;
}

.appointment-saved-actions {
    display: grid;
    gap: .55rem;
}

.appointment-saved-actions form {
    margin: 0;
}

.appointment-saved-actions .btn {
    width: 100%;
    min-height: 2.6rem;
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
}

.appointment-saved-actions .btn-whatsapp {
    border-color: #249554;
    color: #fff;
    background: #249554;
}

.appointment-saved-actions .btn-whatsapp:hover {
    border-color: #197a42;
    color: #fff;
    background: #197a42;
}

.appointment-saved-actions .btn-whatsapp:disabled {
    border-color: #d9e2e0;
    color: #82918e;
    background: #edf1f0;
}

.btn-call-patient,
.professional-agenda-actions .btn-call-patient {
    display: inline-flex;
    gap: .42rem;
    align-items: center;
    justify-content: center;
    border-color: #d58a16;
    color: #fff;
    background: linear-gradient(135deg, #f3a52b, #d8830b);
    box-shadow: 0 5px 14px rgba(213, 138, 22, .22);
}

.btn-call-patient:hover,
.professional-agenda-actions .btn-call-patient:hover { color: #fff; background: #c97808; }

.btn-start-ready,
.professional-agenda-actions .btn-start-ready {
    display: inline-flex;
    gap: .42rem;
    align-items: center;
    justify-content: center;
    border-color: #347fb8;
    color: #fff;
    background: linear-gradient(135deg, #4e9bd2, #347fb8);
    box-shadow: 0 5px 14px rgba(52, 127, 184, .22);
}

.medical-action-hint,
.professional-agenda-unavailable {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    justify-content: center;
    color: #8b6a31;
}

.medical-action-hint.confirmed,
.professional-agenda-unavailable.confirmed { color: #2d8050; }

.care-live-alerts {
    position: fixed;
    z-index: 1090;
    top: 78px;
    right: 20px;
    display: grid;
    width: min(410px, calc(100vw - 30px));
    gap: .65rem;
}

.care-alert-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid #bdd8eb;
    border-left: 5px solid #438fc4;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 12px 34px rgba(28, 63, 86, .2);
    animation: care-alert-in .24s ease-out;
}

.care-alert-card.arrival { border-left-color: #e6961e; }
.care-alert-card.reception-call { border-left-color: #7255b7; }
.care-alert-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: .7rem; color: #fff; background: #438fc4; font-size: 1.15rem; }
.care-alert-card.arrival .care-alert-icon { background: #e6961e; }
.care-alert-card.reception-call .care-alert-icon { background: #7255b7; }
.care-alert-card small,.care-alert-card strong,.care-alert-card p { display: block; }
.care-alert-card small { color: #758894; font-size: .68rem; }
.care-alert-card strong { color: #244b63; font-size: .86rem; }
.care-alert-card p { margin: .15rem 0 0; color: #647984; font-size: .75rem; }
.care-alert-action { padding: .5rem .7rem; border: 0; border-radius: .55rem; color: #fff; background: #367fad; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.care-alert-card.arrival .care-alert-action { background: #d9850b; }
.care-alert-card.reception-call .care-alert-action { background: #674ca8; }

@keyframes care-alert-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 767.98px) {
    .care-live-alerts { top: 68px; right: 10px; }
    .care-alert-card { grid-template-columns: 42px minmax(0, 1fr); }
    .care-alert-action { grid-column: 1 / -1; width: 100%; }
}

@media print {
    .print-body {
        padding: 0;
        background: #fff;
    }

    .print-toolbar,
    .pdf-link,
    .admin-sidebar,
    .admin-topbar {
        display: none !important;
    }

    .document-sheet {
        width: 100%;
        min-height: auto;
        box-shadow: none;
    }

    .admin-main {
        margin: 0;
    }

    .admin-content {
        padding: 0;
    }

    .panel-card {
        box-shadow: none;
    }
}

/* Television panel settings */
.tv-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.tv-settings-card,
.tv-banner-manager {
    padding: 1.4rem;
}

.tv-settings-card {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.tv-settings-card .section-heading {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.settings-card-icon {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    flex: 0 0 2.8rem;
    place-items: center;
    border-radius: .85rem;
    color: #2f7eb7;
    background: #e5f3fb;
    font-size: 1.25rem;
}

.tv-settings-card small {
    display: block;
    margin-top: .42rem;
    color: var(--muted);
}

.tv-settings-card>.btn {
    align-self: flex-start;
}

.tv-settings-note {
    display: flex;
    gap: .65rem;
    padding: .8rem .9rem;
    border: 1px solid #d8eaf4;
    border-radius: .7rem;
    color: #45677d;
    background: #f5fbfe;
    font-size: .86rem;
}

.tv-banner-manager>.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.tv-banner-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tv-banner-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #d8e4ec;
    border-radius: .9rem;
    background: #fff;
}

.tv-banner-item.is-inactive>img {
    opacity: .42;
    filter: grayscale(.5);
}

.tv-banner-item>img {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border-bottom: 1px solid #e2eaf0;
    background: #edf3f6;
    object-fit: cover;
}

.tv-banner-item>form:not(.tv-banner-remove) {
    padding: .9rem;
}

.tv-banner-item-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    margin-bottom: .75rem;
}

.tv-banner-remove {
    padding: 0 .9rem .9rem;
}

.tv-banner-remove .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

@media (max-width: 1100px) {
    .tv-settings-grid { grid-template-columns: 1fr; }
    .tv-banner-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .tv-banner-list { grid-template-columns: 1fr; }
}

/* Waiting-room television panel */
.tv-body {
    min-width: 100vw;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: #f7fbff;
    background: #163f64;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.tv-panel {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 13vh minmax(0, 1fr) 8vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 110%, rgba(89, 163, 214, .45), transparent 34%),
        radial-gradient(circle at 100% 0, rgba(94, 178, 222, .32), transparent 28%),
        linear-gradient(135deg, #173e60 0%, #285f89 48%, #4a99ca 100%);
}

.tv-panel::before,
.tv-panel::after {
    position: absolute;
    width: 38vw;
    height: 38vw;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.tv-panel::before { top: -25vw; right: -10vw; }
.tv-panel::after { bottom: -30vw; left: -14vw; }

.tv-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5vh 3vw;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    background: rgba(10, 44, 69, .25);
}

.tv-brand,
.tv-clock {
    display: flex;
    align-items: center;
    gap: 1.1vw;
}

.tv-brand img {
    width: 8vh;
    height: 8vh;
    padding: .5vh;
    border-radius: 1.4vh;
    background: rgba(255, 255, 255, .96);
    object-fit: contain;
}

.tv-brand strong,
.tv-brand span,
.tv-clock strong,
.tv-clock span {
    display: block;
}

.tv-brand strong { font-size: clamp(1.2rem, 2vw, 2.2rem); }
.tv-brand span { margin-top: .2vh; opacity: .76; font-size: clamp(.7rem, 1vw, 1.1rem); letter-spacing: .12em; text-transform: uppercase; }
.tv-clock { align-items: flex-end; flex-direction: column; gap: 0; text-align: right; }
.tv-clock strong { font-size: clamp(2rem, 3.2vw, 4rem); line-height: 1; }
.tv-clock span { margin-top: .5vh; font-size: clamp(.75rem, 1.1vw, 1.25rem); text-transform: capitalize; opacity: .82; }

.tv-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 31vw;
    min-height: 0;
    gap: 2vw;
    padding: 2.2vh 3vw;
}

.tv-call-stage,
.tv-recent {
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 2.2vh;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2vh 5vh rgba(7, 32, 50, .2);
}

.tv-call-stage {
    position: relative;
    display: grid;
    color: #17384f;
    place-items: center;
    text-align: center;
}

.tv-banner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #eaf1f5;
}

.tv-banner[hidden] { display: none; }

.tv-banner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.tv-banner>div {
    position: absolute;
    right: 2vw;
    bottom: 2vh;
    left: 2vw;
    padding: 1.2vh 1.4vw;
    border-radius: 1vh;
    color: #fff;
    background: rgba(13, 52, 79, .82);
    font-size: clamp(1rem, 1.5vw, 1.8rem);
    font-weight: 750;
    text-align: left;
    backdrop-filter: blur(5px);
}

.tv-waiting span {
    width: 11vh;
    height: 11vh;
    display: grid;
    margin: 0 auto 2vh;
    place-items: center;
    border-radius: 50%;
    color: #367faf;
    background: #e3f2fa;
    font-size: 5vh;
}

.tv-waiting h1 { margin: 0; color: #183e59; font-size: clamp(2rem, 4vw, 5rem); }
.tv-waiting p { margin: 1.2vh 0 0; color: #648096; font-size: clamp(1rem, 1.6vw, 2rem); }

.tv-current-call {
    width: 100%;
    padding: 3vh 4vw;
}

.tv-call-label {
    display: inline-flex;
    align-items: center;
    gap: .65vw;
    padding: .8vh 1.2vw;
    border-radius: 5vh;
    color: #266d9b;
    background: #e2f1fa;
    font-size: clamp(.85rem, 1.25vw, 1.5rem);
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.tv-current-call h1 {
    margin: 3vh 0 2vh;
    overflow-wrap: anywhere;
    color: #173e5b;
    font-size: clamp(4rem, 8vw, 10rem);
    font-weight: 850;
    letter-spacing: -.035em;
    line-height: .95;
}

.tv-room {
    display: inline-flex;
    align-items: center;
    gap: 1vw;
    padding: 1.6vh 2.2vw;
    border-radius: 1.4vh;
    color: #fff;
    background: linear-gradient(135deg, #448fca, #276eaa);
    font-size: clamp(1.6rem, 3vw, 3.8rem);
}

.tv-current-call>p { margin: 2vh 0 0; color: #718796; font-size: clamp(.9rem, 1.3vw, 1.55rem); }

.tv-recent {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    color: #17384f;
}

.tv-recent>header {
    display: flex;
    align-items: center;
    gap: 1vw;
    padding: 2.2vh 1.5vw;
    border-bottom: 1px solid #d8e5ed;
    background: #f6fbfd;
}

.tv-recent>header>i { color: #377faf; font-size: 3.2vh; }
.tv-recent>header strong,
.tv-recent>header span { display: block; }
.tv-recent>header strong { font-size: clamp(1rem, 1.45vw, 1.65rem); }
.tv-recent>header span { margin-top: .3vh; color: #718594; font-size: clamp(.7rem, .9vw, 1rem); }

.tv-recent-list {
    min-height: 0;
    padding: 1vh 1.2vw;
    overflow: hidden;
}

.tv-recent-list>p {
    margin: 3vh 1vw;
    color: #718594;
    font-size: clamp(.8rem, 1vw, 1.1rem);
    text-align: center;
}

.tv-recent-list article {
    display: grid;
    grid-template-columns: 4.2vw minmax(0, 1fr);
    align-items: center;
    gap: .9vw;
    padding: 1.45vh .8vw;
    border-bottom: 1px solid #e4edf2;
}

.tv-recent-list article.latest {
    border-radius: 1vh;
    background: #eaf5fb;
}

.tv-recent-list article>span {
    color: #397fae;
    font-size: clamp(.8rem, 1.1vw, 1.3rem);
    font-weight: 800;
}

.tv-recent-list article strong,
.tv-recent-list article small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-recent-list article strong { font-size: clamp(1rem, 1.45vw, 1.7rem); }
.tv-recent-list article small { margin-top: .25vh; color: #6d8291; font-size: clamp(.75rem, .95vw, 1.05rem); }

.tv-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2vw;
    padding: 0 3vw;
    border-top: 1px solid rgba(255, 255, 255, .18);
    background: rgba(10, 41, 63, .3);
    font-size: clamp(.8rem, 1.25vw, 1.5rem);
}

.tv-footer strong { letter-spacing: .04em; text-transform: uppercase; }

.tv-start-overlay {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: grid;
    color: #173e5b;
    background: rgba(13, 43, 65, .88);
    place-items: center;
    backdrop-filter: blur(8px);
}

.tv-start-overlay[hidden] { display: none; }
.tv-start-overlay>div { width: min(520px, 88vw); padding: 4vh 3vw; border-radius: 2.5vh; background: #fff; box-shadow: 0 2vh 7vh rgba(0, 0, 0, .3); text-align: center; }
.tv-start-overlay img { width: 16vh; height: 12vh; object-fit: contain; }
.tv-start-overlay h2 { margin: 1vh 0; font-size: clamp(1.8rem, 3vw, 3rem); }
.tv-start-overlay p { color: #6b8190; font-size: 1rem; }
.tv-start-overlay label { display: block; margin: 1.2rem 0 .4rem; color: #34566d; font-size: .85rem; font-weight: 750; text-align: left; }
.tv-start-overlay select { width: 100%; padding: .75rem .85rem; border: 1px solid #cbdbe5; border-radius: .65rem; color: #173e5b; background: #fff; font: inherit; }
.tv-start-overlay button { display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.5vh; padding: .9rem 1.4rem; border: 0; border-radius: .7rem; color: #fff; background: #3e8fc8; font-size: 1rem; font-weight: 800; }
.tv-start-overlay small { display: block; margin-top: .8rem; color: #758a98; font-size: .75rem; }

.tv-panel.is-calling .tv-call-stage {
    animation: tv-call-pulse 1s ease 3;
}

.tv-panel.is-offline::after {
    width: auto;
    height: auto;
    right: 2vw;
    bottom: 1.6vh;
    left: auto;
    padding: .5rem .8rem;
    border: 0;
    border-radius: .5rem;
    color: #8b4c00;
    background: #fff2d9;
    content: "Reconectando...";
    font-size: .8rem;
}

@keyframes tv-call-pulse {
    0%, 100% { box-shadow: 0 2vh 5vh rgba(7, 32, 50, .2); }
    50% { box-shadow: 0 0 0 1.2vh rgba(104, 196, 242, .4), 0 2vh 5vh rgba(7, 32, 50, .2); }
}

@media (max-aspect-ratio: 4/3) {
    .tv-content { grid-template-columns: minmax(0, 1fr) 35vw; }
    .tv-current-call h1 { font-size: clamp(3rem, 7vw, 7rem); }
}
