@import url('patient-portal.css?v=2026090401');

:root {
    --ui-primary: #6657e8;
    --ui-primary-dark: #5143c6;
    --ui-primary-soft: #eeecff;
    --ui-ink: #252b4a;
    --ui-muted: #7e849e;
    --ui-border: #e9eaf3;
    --ui-bg: #f5f6fb;
    --ui-sidebar: #25294d;
    --ui-shadow: 0 12px 34px rgba(40, 43, 82, .07);
}

html { scroll-behavior: smooth; }

body {
    background: var(--ui-bg) !important;
    color: var(--ui-ink) !important;
    letter-spacing: -.01em;
}

.sidebar {
    width: 248px !important;
    background: var(--ui-sidebar) !important;
    box-shadow: 8px 0 30px rgba(37, 41, 77, .12) !important;
}

.sidebar.collapsed { width: 78px !important; }

.sidebar-header {
    min-height: 76px;
    padding: 1.25rem 1.15rem !important;
    border-bottom-color: rgba(255,255,255,.09) !important;
}

.sidebar-brand {
    font-size: 1.05rem !important;
    letter-spacing: -.02em;
}

.sidebar-brand i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(145deg, #8677ff, #5a4bd2);
    box-shadow: 0 8px 16px rgba(102,87,232,.3);
}
.sidebar-brand-logo { display:block !important; width:32px !important; max-width:32px !important; height:32px !important; max-height:32px !important; object-fit:contain; flex:0 0 32px; }
.auth-brand-logo { width:36px; height:36px; object-fit:contain; }

.sidebar-nav { padding: 1.1rem .85rem !important; }

.nav-link {
    min-height: 42px;
    padding: .7rem .85rem !important;
    color: rgba(255,255,255,.68) !important;
    border-radius: 11px !important;
    font-size: .82rem;
}

.nav-link i {
    width: 22px !important;
    margin-right: .75rem !important;
    font-size: .88rem !important;
}

.nav-link:hover { background: rgba(255,255,255,.08) !important; color: #fff !important; }

.nav-link.active {
    background: linear-gradient(135deg, #7667f3, #5b4ed1) !important;
    color: #fff !important;
    box-shadow: 0 9px 18px rgba(96, 81, 218, .3) !important;
}

.sidebar-user {
    position: absolute;
    right: .85rem;
    bottom: 1rem;
    left: .85rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem .6rem;
    color: rgba(255,255,255,.78);
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .72rem;
}

.sidebar-user-avatar {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f2b391, #c7785c);
    color: #fff;
    font-size: .75rem;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.topbar-avatar { width: 34px; height: 34px; object-fit: cover; border: 2px solid #e7e3ff; border-radius: 50%; }

.sidebar-user strong, .sidebar-user small { display: block; line-height: 1.2; }
.sidebar-user small { color: rgba(255,255,255,.5); }
.sidebar.collapsed .sidebar-user { justify-content: center; padding-inline: 0; }
.sidebar.collapsed .sidebar-user-copy { display: none; }

.main-content { margin-left: 248px !important; }
.main-content.collapsed { margin-left: 78px !important; }

.top-bar {
    min-height: 76px;
    padding: .85rem 2rem !important;
    background: rgba(255,255,255,.86) !important;
    border-bottom: 1px solid var(--ui-border) !important;
    box-shadow: 0 4px 18px rgba(40,43,82,.035) !important;
    backdrop-filter: blur(12px);
}

.top-bar h4 { color: var(--ui-ink); font-size: 1.05rem; font-weight: 750; }
.top-bar .text-muted { color: var(--ui-muted) !important; font-size: .78rem; }
.top-bar .dropdown-toggle { color: var(--ui-primary) !important; }

.content-wrapper { padding: 1.75rem 2rem 3rem !important; }
.content-wrapper > .container-fluid { padding-inline: 0 !important; }

.card {
    border: 1px solid var(--ui-border) !important;
    border-radius: 15px !important;
    box-shadow: var(--ui-shadow) !important;
}

.card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(40,43,82,.1) !important; }
.card-header { border-bottom: 1px solid var(--ui-border); }

.btn { border-radius: 9px !important; font-weight: 650 !important; font-size: .8rem !important; }
.btn-group { gap: .4rem; flex-wrap: wrap; }
.btn-group > .btn, .btn-group > a { margin-left: 0 !important; border-radius: 9px !important; }
.btn-primary, .btn-login, .btn-register { background: linear-gradient(135deg, var(--ui-primary), var(--ui-primary-dark)) !important; border-color: transparent !important; }
.btn-primary:hover, .btn-login:hover, .btn-register:hover { filter: brightness(1.04); box-shadow: 0 10px 20px rgba(102,87,232,.22) !important; }
.btn-outline-primary { color: var(--ui-primary) !important; border-color: #d9d5ff !important; }
.btn-outline-primary:hover { color: #fff !important; background: var(--ui-primary) !important; }

.form-control, .form-select {
    min-height: 42px;
    border-color: var(--ui-border) !important;
    border-radius: 9px !important;
    color: var(--ui-ink) !important;
    font-size: .83rem;
}
.form-control::placeholder { color: #b1b5c7; }
.form-control:focus, .form-select:focus { border-color: #aaa0ff !important; box-shadow: 0 0 0 3px rgba(102,87,232,.12) !important; }
.form-label, label { color: #6e748e; font-size: .72rem; font-weight: 650; }
select { color-scheme: light; }
option { color: var(--ui-ink); background: #fff; }
.bg-primary.bg-opacity-10 { background-color: var(--ui-primary-soft) !important; }
.bg-success.bg-opacity-10 { background-color: #e6f7ef !important; }
.bg-info.bg-opacity-10 { background-color: #e6f8fb !important; }
.bg-warning.bg-opacity-10 { background-color: #fff5df !important; }

.table { --bs-table-hover-bg: #fafaff; color: var(--ui-ink); font-size: .8rem; }
.table > :not(caption) > * > * { padding: .85rem .75rem; border-bottom-color: #f0f0f6; }
.table thead th { color: #858ba3 !important; font-size: .65rem !important; letter-spacing: .06em; background: #fbfbfe !important; border-bottom: 1px solid var(--ui-border); }
.table thead.bg-gradient-primary th { color: #fff !important; background: linear-gradient(135deg, #7062ed, #5748c9) !important; }
.table tbody tr { transition: background .2s ease; }
.table tbody tr:hover { background: #fafaff; }
.badge { font-size: .66rem !important; font-weight: 700 !important; padding: .38rem .65rem !important; }

.bg-gradient-primary { background: linear-gradient(135deg, #7062ed, #5748c9) !important; }
.bg-gradient-info { background: linear-gradient(135deg, #65c9d9, #2998bd) !important; }
.text-primary { color: var(--ui-primary) !important; }
.bg-primary { background-color: var(--ui-primary) !important; }

.content-wrapper h2 { margin-bottom: .35rem !important; color: var(--ui-ink) !important; font-size: 1.32rem; letter-spacing: -.035em; }
.content-wrapper h2 + * { margin-top: .45rem; }
.page-heading { margin-bottom: 1.35rem !important; }
.page-heading h2 { margin-bottom: .15rem !important; }
.page-subtitle { margin: 0; color: var(--ui-muted); font-size: .76rem; }
.eyebrow { display: block; margin-bottom: .35rem; color: var(--ui-primary); font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hover-lift, .hover-lift-row { transition: all .2s ease; }

.dashboard-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}
.dashboard-welcome h1 { margin: 0; color: var(--ui-ink); font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; }
.dashboard-welcome p { margin: .25rem 0 0; color: var(--ui-muted); font-size: .78rem; }
.dashboard-date { padding: .6rem .8rem; color: var(--ui-primary); background: #fff; border: 1px solid #e4e1ff; border-radius: 9px; font-size: .74rem; font-weight: 700; }

/* Dashboard de referência: composição compacta da tela enviada pelo usuário. */
.dashboard-reference-page { background: #f7f8fc !important; }
.dashboard-reference-page #sidebarToggle,
.dashboard-reference-page .mobile-sidebar-toggle,
.dashboard-reference-page .top-bar > div:last-child { display: none !important; }
.dashboard-reference-page .sidebar,
.dashboard-reference-page .sidebar.collapsed {
    width: 204px !important;
    transform: none !important;
    background: linear-gradient(180deg, #292d57 0%, #202447 100%) !important;
}
.dashboard-reference-page .sidebar-header { height: 76px; padding: 0 18px !important; border-bottom-color: rgba(255,255,255,.1) !important; }
.dashboard-reference-page .sidebar-brand { gap: .65rem; font-size: 1rem; }
.dashboard-reference-page .sidebar-brand i { width: 32px; height: 32px; font-size: .9rem; border-radius: 9px; }
.dashboard-reference-page .sidebar-nav { padding: 22px 13px !important; }
.dashboard-reference-page .nav-link { min-height: 44px; gap: .7rem; margin: 3px 0; padding: .65rem .75rem !important; border-radius: 10px !important; font-size: .78rem !important; }
.dashboard-reference-page .nav-link i { width: 17px; font-size: .82rem; }
.dashboard-reference-page .nav-link.active { background: rgba(255,255,255,.16) !important; box-shadow: none !important; }
.dashboard-reference-page .sidebar-user { right: .85rem; bottom: .8rem; left: .85rem; gap: .55rem; padding: .7rem .25rem; font-size: .72rem; }
.dashboard-reference-page .sidebar-user-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: .78rem; }
.dashboard-reference-page .sidebar-user small { font-size: .64rem; }
.dashboard-reference-page .main-content,
.dashboard-reference-page .main-content.collapsed { margin-left: 204px !important; }
.dashboard-reference-page .top-bar { min-height: 64px; height: 64px; padding: 0 30px !important; box-shadow: none !important; }
.dashboard-reference-page .top-bar h4 { font-size: 1.05rem; }
.dashboard-reference-page .content-wrapper { padding: 0 !important; }
.dashboard-reference-shell { width: 100%; padding: 28px 32px 40px; }
.dashboard-reference-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.4rem; margin-bottom: 24px; }
.dashboard-reference-heading h1 { margin: 0; color: #202447; font-size: 1.45rem; font-weight: 800; letter-spacing: -.035em; }
.dashboard-reference-heading p { margin: 5px 0 0; color: #858ba3; font-size: .82rem; }
.dashboard-reference-date { display: inline-flex; align-items: center; gap: .55rem; padding: 10px 15px; color: #6657e8; background: #fff; border: 1px solid #ddd9ff; border-radius: 9px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.dashboard-reference-date i { font-size: .82rem; }
.dashboard-reference-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.dashboard-reference-stat { display: flex; min-width: 0; min-height: 128px; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 20px; background: #fff; border: 1px solid #ececf4; border-radius: 12px; box-shadow: 0 7px 20px rgba(41,45,87,.065); }
.dashboard-reference-stat > div { min-width: 0; }
.dashboard-stat-label { display: block; margin-bottom: 7px; color: #858ba3; font-size: .72rem; font-weight: 700; }
.dashboard-reference-stat strong { display: block; color: #202447; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.04em; white-space: nowrap; }
.dashboard-reference-stat small, .dashboard-reference-stat a { display: block; margin-top: 10px; color: #55b985; font-size: .64rem; font-weight: 700; text-decoration: none; }
.dashboard-reference-stat a { color: #858ba3; }
.dashboard-reference-stat a:hover { color: #6657e8; }
.dashboard-stat-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 11px; font-size: .95rem; }
.dashboard-stat-icon-purple { color: #6657e8; background: #eeeaff; }
.dashboard-stat-icon-green { color: #36af78; background: #e6f7ef; }
.dashboard-stat-icon-yellow { color: #e7a72e; background: #fff3d9; }
.dashboard-stat-icon-blue { color: #4c9ee9; background: #e9f4ff; }
.dashboard-reference-bottom { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; align-items: stretch; }
.dashboard-reference-panel { overflow: hidden; background: #fff; border: 1px solid #ececf4; border-radius: 12px; box-shadow: 0 7px 20px rgba(41,45,87,.065); }
.dashboard-reference-panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 55px; padding: 0 20px; border-bottom: 1px solid #f0f0f6; }
.dashboard-reference-panel-header h2 { margin: 0; color: #3b4067; font-size: .88rem; font-weight: 800; }
.dashboard-reference-panel-header a { color: #7667f3; font-size: .64rem; font-weight: 700; text-decoration: none; }
.dashboard-appointments-list { padding: 0 20px; }
.dashboard-appointment-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 60px; border-bottom: 1px solid #f0f0f6; }
.dashboard-appointment-row:last-child { border-bottom: 0; }
.dashboard-appointment-row time { color: #6657e8; font-size: .78rem; font-weight: 800; }
.dashboard-appointment-person { min-width: 0; }
.dashboard-appointment-person strong, .dashboard-appointment-person span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-appointment-person strong { color: #404568; font-size: .72rem; font-weight: 750; }
.dashboard-appointment-person span { margin-top: 3px; color: #9aa0b5; font-size: .62rem; }
.dashboard-appointment-status { padding: 5px 9px; border-radius: 999px; font-size: .59rem; font-weight: 800; white-space: nowrap; }
.dashboard-appointment-status.is-confirmed { color: #3ca36d; background: #e4f7ec; }
.dashboard-appointment-status.is-pending { color: #d79720; background: #fff3d6; }
.dashboard-appointment-status.is-done { color: #547bc0; background: #eaf2ff; }
.dashboard-appointment-status.is-cancelled { color: #c76969; background: #ffeded; }
.dashboard-empty-state { display: flex; min-height: 205px; align-items: center; justify-content: center; gap: 10px; color: #9aa0b5; font-size: .8rem; }
.dashboard-empty-state i { font-size: 1.35rem; }
.dashboard-quick-actions { display: grid; gap: 12px; padding: 18px 20px 20px; }
.dashboard-quick-action { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 8px !important; color: #fff !important; font-size: .7rem !important; font-weight: 750 !important; text-decoration: none; box-shadow: none !important; }
.dashboard-quick-action i { width: 16px; font-size: .78rem; text-align: center; }
.dashboard-quick-purple { background: linear-gradient(90deg, #5f4ce1, #765cf0); }
.dashboard-quick-green { background: linear-gradient(90deg, #39b878, #4dc489); }
.dashboard-quick-blue { background: linear-gradient(90deg, #4b9edc, #65b6e9); }
.dashboard-quick-orange { background: linear-gradient(90deg, #e99a1f, #fbbd3d); }

/* Tela de pacientes: mesma escala e linguagem visual do dashboard de referência. */
.patients-reference-page { background: #f7f8fc !important; }
.patients-reference-page #sidebarToggle,
.patients-reference-page .mobile-sidebar-toggle,
.patients-reference-page .top-bar > div:last-child { display: none !important; }
.patients-reference-page .sidebar,
.patients-reference-page .sidebar.collapsed {
    width: 204px !important;
    transform: none !important;
    background: linear-gradient(180deg, #292d57 0%, #202447 100%) !important;
}
.patients-reference-page .sidebar-header { height: 76px; padding: 0 18px !important; border-bottom-color: rgba(255,255,255,.1) !important; }
.patients-reference-page .sidebar-brand { gap: .65rem; font-size: 1rem; }
.patients-reference-page .sidebar-brand i { width: 32px; height: 32px; font-size: .9rem; border-radius: 9px; }
.patients-reference-page .sidebar-nav { padding: 22px 13px !important; }
.patients-reference-page .nav-link { min-height: 44px; gap: .7rem; margin: 3px 0; padding: .65rem .75rem !important; border-radius: 10px !important; font-size: .78rem !important; }
.patients-reference-page .nav-link i { width: 17px; font-size: .82rem; }
.patients-reference-page .nav-link.active { background: rgba(255,255,255,.16) !important; box-shadow: none !important; }
.patients-reference-page .sidebar-user { right: .85rem; bottom: .8rem; left: .85rem; gap: .55rem; padding: .7rem .25rem; font-size: .72rem; }
.patients-reference-page .sidebar-user-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: .78rem; }
.patients-reference-page .sidebar-user small { font-size: .64rem; }
.patients-reference-page .main-content,
.patients-reference-page .main-content.collapsed { margin-left: 204px !important; }
.patients-reference-page .top-bar { min-height: 64px; height: 64px; padding: 0 30px !important; box-shadow: none !important; }
.patients-reference-page .top-bar h4 { font-size: 1.05rem; }
.patients-reference-page .content-wrapper { padding: 0 !important; }
.patients-reference-shell { width: 100%; padding: 28px 32px 42px; }
.patients-reference-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 24px; }
.patients-reference-heading .eyebrow { display: block; margin-bottom: 7px; color: #6657e8; font-size: .7rem; font-weight: 800; letter-spacing: .11em; }
.patients-reference-heading h1 { margin: 0; color: #202447; font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; }
.patients-reference-heading p { margin: 5px 0 0; color: #858ba3; font-size: .82rem; }
.patients-reference-actions { display: flex; align-items: center; gap: 14px; }
.patients-filter-actions { display: flex; gap: 8px; }
.patients-icon-button { display: inline-grid; width: 40px; height: 40px; place-items: center; color: #858ba3; background: #fff; border: 1px solid #e5e6f1; border-radius: 9px; font-size: .84rem; text-decoration: none; transition: .2s ease; }
.patients-icon-button:hover, .patients-icon-button.is-active { color: #6657e8; border-color: #cfc9ff; background: #f3f1ff; }
.patients-icon-button.is-danger:hover, .patients-icon-button.is-danger.is-active { color: #d96969; border-color: #ffd0d0; background: #fff2f2; }
.patients-icon-button.is-neutral:hover, .patients-icon-button.is-neutral.is-active { color: #4389c4; border-color: #cbe5f8; background: #eff8ff; }
.patients-new-button { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; padding: 0 19px; color: #fff; background: linear-gradient(135deg, #6657e8, #5748c9); border: 0; border-radius: 9px; box-shadow: 0 8px 18px rgba(102,87,232,.2); font-size: .76rem; font-weight: 750; transition: .2s ease; }
.patients-new-button:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.patients-search-card { display: flex; width: min(100%, 440px); height: 50px; align-items: center; gap: 12px; padding: 0 16px; background: #fff; border: 1px solid #e7e8f1; border-radius: 9px; box-shadow: 0 5px 15px rgba(41,45,87,.045); }
.patients-search-card i { color: #9aa0b5; font-size: .9rem; }
.patients-search-card input { width: 100%; height: 100%; color: #303653; background: transparent; border: 0; outline: 0; font-size: .78rem; }
.patients-search-card input::placeholder { color: #9aa0b5; }
.patients-reference-table-card { overflow: hidden; margin-top: 20px; background: #fff; border: 1px solid #e7e8f1; border-radius: 12px; box-shadow: 0 7px 20px rgba(41,45,87,.065); }
.patients-reference-table-wrap { overflow-x: auto; }
.patients-reference-table { width: 100%; min-width: 930px; margin: 0; border-collapse: separate; border-spacing: 0; color: #303653; font-size: .76rem; }
.patients-reference-table th { height: 52px; padding: 0 18px; color: #858ba3; background: #fbfbfe; border-bottom: 1px solid #ececf4; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.patients-reference-table td { height: 78px; padding: 12px 18px; border-bottom: 1px solid #f0f0f6; vertical-align: middle; white-space: nowrap; }
.patients-reference-table tbody tr:last-child td { border-bottom: 0; }
.patients-reference-table tbody tr { transition: background .2s ease; }
.patients-reference-table tbody tr:hover { background: #fafaff; }
.patient-reference-person,
.patient-reference-contact { display: table-cell !important; min-width: 0; }
.patient-reference-person { min-width: 245px; }
.patient-reference-avatar { display: inline-grid; width: 42px; height: 42px; vertical-align: middle; place-items: center; color: #fff; background: linear-gradient(145deg, #526bc5, #8a6be6); border-radius: 50%; font-size: .76rem; font-weight: 800; }
.patient-reference-person-copy { display: inline-flex; flex-direction: column; max-width: calc(100% - 58px); margin-left: 12px; vertical-align: middle; gap: 4px; }
.patient-reference-contact strong, .patient-reference-contact small { display: block; overflow: hidden; text-overflow: ellipsis; }
.patient-reference-person-copy strong, .patient-reference-contact strong { color: #404568; font-size: .76rem; font-weight: 750; }
.patient-reference-person-copy small, .patient-reference-contact small { color: #9aa0b5; font-size: .65rem; }
.patient-reference-contact { min-width: 205px; }
.patient-reference-badge { display: inline-flex; min-width: 82px; min-height: 27px; align-items: center; justify-content: center; padding: 0 10px; border-radius: 999px; font-size: .64rem; font-weight: 800; }
.patient-reference-badge.modality-online { color: #398fd0; background: #e7f4ff; }
.patient-reference-badge.modality-presencial { color: #765ce0; background: #f0eaff; }
.patient-reference-badge.status-active { color: #3ca36d; background: #e4f7ec; }
.patient-reference-badge.status-inactive { color: #9a6570; background: #fcebed; }
.patients-actions-heading, .patient-reference-actions-cell { text-align: right !important; }
.patient-reference-row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.patient-row-action { display: inline-grid; width: 34px; height: 34px; place-items: center; background: #fff; border: 1px solid #e1e3ef; border-radius: 8px; font-size: .72rem; transition: .2s ease; }
.patient-row-action:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(41,45,87,.1); }
.patient-row-action.action-view { color: #6657e8; }
.patient-row-action.action-edit { color: #e19a29; }
.patient-row-action.action-disable { color: #d76873; }
.patient-row-action.action-enable { color: #36a873; }
.patients-empty-state { height: 240px; padding: 34px !important; color: #9aa0b5; text-align: center; }
.patients-empty-state i, .patients-empty-state strong, .patients-empty-state span { display: block; }
.patients-empty-state i { margin-bottom: 12px; color: #a9afc1; font-size: 2rem; }
.patients-empty-state strong { color: #4b5275; font-size: .9rem; }
.patients-empty-state span { margin-top: 6px; font-size: .76rem; }

/* Sidebar global e agenda: o mesmo shell visual em todas as telas regulares. */
.reference-shell-page { background: #f7f8fc !important; }
.reference-shell-page #sidebarToggle,
.reference-shell-page .mobile-sidebar-toggle,
.reference-shell-page .top-bar > div:last-child { display: none !important; }
.reference-shell-page .sidebar,
.reference-shell-page .sidebar.collapsed {
    width: 204px !important;
    transform: none !important;
    background: linear-gradient(180deg, #292d57 0%, #202447 100%) !important;
}
.reference-shell-page .sidebar-header { height: 76px; padding: 0 18px !important; border-bottom-color: rgba(255,255,255,.1) !important; }
.reference-shell-page .sidebar-brand { gap: .65rem; font-size: 1rem; }
.reference-shell-page .sidebar-brand i { width: 32px; height: 32px; font-size: .9rem; border-radius: 9px; }
.reference-shell-page .sidebar-nav { padding: 22px 13px !important; }
.reference-shell-page .nav-link { min-height: 44px; gap: .7rem; margin: 3px 0; padding: .65rem .75rem !important; border-radius: 10px !important; font-size: .78rem !important; }
.reference-shell-page .nav-link i { width: 17px; font-size: .82rem; }
.reference-shell-page .nav-link.active { background: rgba(255,255,255,.16) !important; box-shadow: none !important; }
.reference-shell-page .sidebar-user { right: .85rem; bottom: .8rem; left: .85rem; gap: .55rem; padding: .7rem .25rem; font-size: .72rem; }
.reference-shell-page .sidebar-user-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: .78rem; }
.reference-shell-page .sidebar-user small { font-size: .64rem; }
.reference-shell-page .main-content,
.reference-shell-page .main-content.collapsed { margin-left: 204px !important; }
.reference-shell-page .top-bar { min-height: 64px; height: 64px; padding: 0 30px !important; box-shadow: none !important; }
.reference-shell-page .top-bar h4 { font-size: 1.05rem; }
.reference-custom-page .content-wrapper { padding: 0 !important; }
.reference-generic-page .content-wrapper { padding: 28px 32px 42px !important; }

.agenda-reference-shell { width: 100%; padding: 28px 32px 42px; }
.agenda-reference-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 22px; }
.agenda-reference-heading .eyebrow { display: block; margin-bottom: 7px; color: #6657e8; font-size: .7rem; font-weight: 800; letter-spacing: .11em; }
.agenda-reference-heading h1 { margin: 0; color: #202447; font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; }
.agenda-reference-heading p { margin: 5px 0 0; color: #858ba3; font-size: .82rem; }
.agenda-reference-toolbar { display: flex; align-items: center; gap: 10px; }
.agenda-range-button, .agenda-week-button { display: inline-flex; min-height: 40px; align-items: center; gap: 9px; padding: 0 13px; color: #59617e; background: #fff; border: 1px solid #e3e5ef; border-radius: 8px; font-size: .66rem; font-weight: 700; }
.agenda-range-button i:first-child { color: #6657e8; }
.agenda-range-button i:last-child, .agenda-week-button i { color: #8e95ab; font-size: .58rem; }
.agenda-new-button { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 16px; color: #fff; background: linear-gradient(135deg, #6657e8, #5748c9); border: 0; border-radius: 8px; box-shadow: 0 8px 18px rgba(102,87,232,.2); font-size: .7rem; font-weight: 750; }
.agenda-new-button:hover { color: #fff; filter: brightness(1.05); }
.agenda-reference-tabs { display: flex; align-items: center; gap: 24px; min-height: 50px; padding: 0 15px; background: #fff; border: 1px solid #e7e8f1; border-radius: 9px; box-shadow: 0 5px 15px rgba(41,45,87,.045); }
.agenda-tab { position: relative; display: inline-flex; min-height: 50px; align-items: center; gap: 6px; padding: 0 2px; color: #858ba3; background: transparent; border: 0; font-size: .7rem; font-weight: 700; }
.agenda-tab span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; color: #9aa0b5; background: #f0f1f7; border-radius: 999px; font-size: .58rem; }
.agenda-tab.is-active { color: #6657e8; }
.agenda-tab.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: #6657e8; border-radius: 3px 3px 0 0; content: ''; }
.agenda-tab.is-active span { color: #6657e8; background: #eeeaff; }
.agenda-reference-table-card { overflow: hidden; margin-top: 18px; background: #fff; border: 1px solid #e7e8f1; border-radius: 12px; box-shadow: 0 7px 20px rgba(41,45,87,.065); }
.agenda-reference-table-wrap { overflow-x: auto; }
.agenda-reference-table { width: 100%; min-width: 980px; margin: 0; border-collapse: separate; border-spacing: 0; color: #303653; font-size: .76rem; }
.agenda-reference-table th { height: 52px; padding: 0 18px; color: #858ba3; background: #fbfbfe; border-bottom: 1px solid #ececf4; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.agenda-reference-table td { height: 70px; padding: 11px 18px; border-bottom: 1px solid #f0f0f6; vertical-align: middle; white-space: nowrap; }
.agenda-reference-table tbody tr:last-child td { border-bottom: 0; }
.agenda-reference-row { transition: background .2s ease; }
.agenda-reference-row:hover { background: #fafaff; }
.agenda-datetime, .agenda-patient-cell, .agenda-professional-cell { color: #404568; }
.agenda-datetime strong, .agenda-datetime small { display: block; }
.agenda-datetime strong { font-size: .7rem; font-weight: 750; }
.agenda-datetime small { margin-top: 4px; color: #8f96ae; font-size: .64rem; }
.agenda-patient-cell strong { font-size: .73rem; font-weight: 750; }
.agenda-type-copy, .agenda-professional-cell { font-size: .68rem; }
.agenda-status-badge { display: inline-flex; min-width: 76px; min-height: 27px; align-items: center; justify-content: center; padding: 0 10px; border-radius: 999px; font-size: .61rem; font-weight: 800; }
.agenda-status-badge.scheduled { color: #398fd0; background: #e7f4ff; }
.agenda-status-badge.pending { color: #d79520; background: #fff3d6; }
.agenda-status-badge.progress { color: #b8791f; background: #fff1d8; }
.agenda-status-badge.done { color: #3ca36d; background: #e4f7ec; }
.agenda-status-badge.cancelled { color: #c76969; background: #ffeded; }
.agenda-status-badge.neutral { color: #7b829d; background: #f0f1f6; }
.agenda-actions-heading, .agenda-actions-cell { text-align: right !important; }
.agenda-row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.agenda-row-action { display: inline-grid; width: 34px; height: 34px; place-items: center; background: #fff; border: 1px solid #e1e3ef; border-radius: 8px; font-size: .7rem; transition: .2s ease; }
.agenda-row-action:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(41,45,87,.1); }
.agenda-row-action.action-view { color: #6657e8; }
.agenda-row-action.action-whatsapp { color: #36a873; }
.agenda-row-action.action-edit { color: #e19a29; }
.agenda-row-action.action-timer { color: #4389c4; }
.agenda-empty-state { height: 240px; padding: 34px !important; color: #9aa0b5; text-align: center; }
.agenda-empty-state i, .agenda-empty-state strong, .agenda-empty-state span { display: block; }
.agenda-empty-state i { margin-bottom: 12px; color: #a9afc1; font-size: 2rem; }
.agenda-empty-state strong { color: #4b5275; font-size: .9rem; }
.agenda-empty-state span { margin-top: 6px; font-size: .76rem; }

.records-reference-shell { width: 100%; padding: 28px 32px 42px; }
.records-reference-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 24px; }
.records-reference-actions { display: flex; align-items: center; gap: 14px; }
.records-filter-actions { display: flex; gap: 8px; }
.records-filter-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; color: #858ba3; background: #fff; border: 1px solid #e5e6f1; border-radius: 9px; font-size: .84rem; text-decoration: none; white-space: nowrap; transition: .2s ease; }
.records-filter-button span { font-size: .71rem; font-weight: 800; }
.records-filter-button:hover, .records-filter-button.is-active { color: #287c78; border-color: #b9d9d2; background: #e3f1ed; }
.records-filter-button.is-danger:hover, .records-filter-button.is-danger.is-active { color: #b56670; border-color: #f0c9ce; background: #fff1f2; }
.records-filter-button.is-neutral:hover, .records-filter-button.is-neutral.is-active { color: #4389c4; border-color: #cbe5f8; background: #eff8ff; }
.records-reference-heading .eyebrow { display: block; margin-bottom: 7px; color: #6657e8; font-size: .7rem; font-weight: 800; letter-spacing: .11em; }
.records-reference-heading h1 { margin: 0; color: #202447; font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; }
.records-reference-heading p { margin: 5px 0 0; color: #858ba3; font-size: .82rem; }
.records-new-button { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 17px; color: #fff; background: linear-gradient(135deg, #6657e8, #5748c9); border: 0; border-radius: 8px; box-shadow: 0 8px 18px rgba(102,87,232,.2); font-size: .72rem; font-weight: 750; }
.records-new-button:hover { color: #fff; filter: brightness(1.05); }
.records-reference-table-card { overflow: hidden; background: #fff; border: 1px solid #e7e8f1; border-radius: 12px; box-shadow: 0 7px 20px rgba(41,45,87,.065); }
.records-reference-table-wrap { overflow-x: auto; }
.records-reference-table { width: 100%; min-width: 860px; margin: 0; border-collapse: separate; border-spacing: 0; color: #303653; font-size: .76rem; }
.records-reference-table th { height: 52px; padding: 0 24px; color: #fff; background: linear-gradient(135deg, #7062ed, #5748c9); border-bottom: 0; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.records-reference-table td { height: 70px; padding: 12px 24px; border-bottom: 1px solid #f0f0f6; vertical-align: middle; white-space: nowrap; }
.records-reference-table tbody tr:last-child td { border-bottom: 0; }
.records-reference-row { transition: background .2s ease; }
.records-reference-row:hover { background: #fafaff; }
.records-date-cell { color: #404568; font-size: .74rem; font-weight: 650; }
.records-patient-cell strong, .records-professional-cell { color: #404568; font-size: .76rem; font-weight: 750; }
.records-status-badge { display: inline-flex; min-width: 78px; min-height: 27px; align-items: center; justify-content: center; padding: 0 10px; border-radius: 999px; font-size: .62rem; font-weight: 800; }
.records-status-badge.active { color: #3ca36d; background: #e4f7ec; }
.records-status-badge.closed { color: #9a6570; background: #fcebed; }
.records-actions-heading, .records-actions-cell { text-align: right !important; }
.records-row-action { display: inline-grid; width: 36px; height: 36px; place-items: center; color: #6657e8; background: #fff; border: 1px solid #dedff0; border-radius: 8px; font-size: .74rem; text-decoration: none; transition: .2s ease; }
.records-row-action:hover { color: #5143c6; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(41,45,87,.1); }
.records-empty-state { height: 250px; padding: 34px !important; color: #9aa0b5; text-align: center; }
.records-empty-state i, .records-empty-state strong, .records-empty-state span { display: block; }
.records-empty-state i { margin-bottom: 12px; color: #a9afc1; font-size: 2rem; }
.records-empty-state strong { color: #4b5275; font-size: .9rem; }
.records-empty-state span { margin-top: 6px; font-size: .76rem; }

.record-detail-reference-shell { width: 100%; padding: 28px 32px 42px; }
.record-detail-reference-shell > .d-flex:first-child { margin-bottom: 24px !important; }
.record-detail-reference-shell h2 { margin: 0 !important; color: #202447 !important; font-size: 1.5rem !important; letter-spacing: -.035em; }
.record-detail-reference-shell .text-muted { color: #858ba3 !important; font-size: .8rem; }
.record-detail-reference-shell .card { overflow: hidden; border-radius: 12px !important; box-shadow: 0 7px 20px rgba(41,45,87,.065) !important; }
.record-detail-reference-shell .card-header { min-height: 58px; padding: 0 22px !important; border-bottom: 0; }
.record-detail-reference-shell .card-header h5 { font-size: .9rem; font-weight: 800; }
.record-detail-reference-shell .card-header i { font-size: 1rem !important; }
.record-detail-reference-shell .card-body { padding: 24px !important; }
.record-detail-reference-shell .card-body strong { font-size: .75rem; }
.record-detail-reference-shell .card-body .bg-light { color: #59617e; background: #f7f8fc !important; border: 1px solid #e7e8f1 !important; border-radius: 9px !important; font-size: .78rem; line-height: 1.65; }
.record-detail-reference-shell .table { margin: 0; font-size: .76rem; }
.record-detail-reference-shell .table th { color: #858ba3; background: #fbfbfe; font-size: .63rem; letter-spacing: .05em; }
.record-detail-reference-shell .table td { min-height: 62px; padding: 16px 20px; }
.record-detail-reference-shell .btn { min-height: 40px; font-size: .72rem !important; }
.record-detail-reference-shell .btn-group { gap: 7px; }

@media (max-width: 900px) {
    .records-reference-heading { align-items: flex-start; flex-direction: column; }
    .records-reference-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; }
    .records-filter-actions { width: 100%; }
    .records-filter-button { flex: 1 1 0; }
    .records-new-button { width: 100%; justify-content: center; }
    .record-detail-reference-shell { padding: 22px 16px 30px; }
}

@media (max-width: 900px) {
    .patients-reference-heading { align-items: flex-start; flex-direction: column; }
    .patients-reference-actions { width: 100%; justify-content: space-between; }
    .agenda-reference-heading { align-items: flex-start; flex-direction: column; }
    .agenda-reference-toolbar { width: 100%; flex-wrap: wrap; }
}

@media (max-width: 700px) {
    .dashboard-reference-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-reference-bottom { grid-template-columns: 1fr; }
    .dashboard-reference-shell { padding-inline: 12px; }
    .dashboard-reference-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-reference-date { align-self: flex-end; }
    .patients-reference-page .sidebar,
    .patients-reference-page .sidebar.collapsed { width: 180px !important; }
    .patients-reference-page .main-content,
    .patients-reference-page .main-content.collapsed { margin-left: 180px !important; }
    .patients-reference-shell { padding: 22px 16px 30px; }
    .patients-reference-heading h1 { font-size: 1.3rem; }
    .patients-reference-heading p { font-size: .75rem; }
    .patients-reference-actions { align-items: flex-start; flex-direction: column; }
    .reference-shell-page .sidebar,
    .reference-shell-page .sidebar.collapsed { width: 180px !important; }
    .reference-shell-page .main-content,
    .reference-shell-page .main-content.collapsed { margin-left: 180px !important; }
    .agenda-reference-shell { padding: 22px 16px 30px; }
    .agenda-reference-toolbar { align-items: stretch; flex-direction: column; }
    .agenda-range-button, .agenda-week-button, .agenda-new-button { justify-content: center; width: 100%; }
    .agenda-reference-tabs { gap: 13px; overflow-x: auto; }
}

/* Autenticação: layout único e responsivo para login e cadastro.
   Estas regras ficam no fim do arquivo para neutralizar versões anteriores
   que tinham espaçamentos e medidas conflitantes. */
.auth-body {
    min-width: 0;
    overflow-x: hidden;
}

.auth-shell {
    grid-template-columns: minmax(310px, .82fr) minmax(0, 1.18fr);
    width: min(1120px, 100%);
    min-width: 0;
}

.auth-aside,
.auth-form-card,
.auth-form-card .login-body,
.auth-form-card .register-body,
.auth-form-intro {
    min-width: 0;
}

.auth-form-card {
    overflow-x: hidden;
}

.auth-form-intro {
    padding: 3rem clamp(2rem, 5vw, 4rem) 0;
}

.auth-form-card .login-body,
.auth-form-card .register-body {
    padding: 1.65rem clamp(2rem, 5vw, 4rem) 3rem;
}

.auth-form-card .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0;
}

.auth-form-section-title {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    column-gap: .5rem;
    row-gap: .15rem;
    align-items: center;
    margin: .25rem 0 1rem;
    padding-bottom: .7rem;
    line-height: 1.25;
}

.auth-form-section-title > i {
    grid-row: 1 / span 2;
}

.auth-form-section-title > span {
    min-width: 0;
}

.auth-form-section-title > small {
    grid-column: 2;
    margin: 0;
    color: #71838a;
    font-size: .67rem;
    font-weight: 600;
    white-space: normal;
}

.auth-user-section-title {
    margin-top: 1.6rem;
}

.auth-form-card .form-floating {
    margin-bottom: 1rem;
}

.auth-form-card .form-control,
.auth-form-card .form-select {
    width: 100%;
    max-width: 100%;
}

.auth-form-card .auth-legal-links {
    padding-bottom: .25rem;
}

@media (min-width: 761px) {
    .auth-register-shell {
        height: min(860px, calc(100vh - 3rem));
        min-height: 640px;
    }

    .auth-register-shell .auth-form-card {
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #b7d3cc transparent;
    }

    .auth-register-shell .auth-form-card::-webkit-scrollbar { width: 8px; }
    .auth-register-shell .auth-form-card::-webkit-scrollbar-thumb { background: #b7d3cc; border-radius: 99px; }
}

@media (max-width: 760px) {
    .auth-body {
        display: block;
        min-height: 100dvh;
        padding: 0;
    }

    .auth-shell,
    .auth-register-shell {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
    }

    .auth-aside {
        min-height: 108px;
        padding: 1.25rem 1.25rem;
    }

    .auth-aside::before {
        width: 190px;
        height: 190px;
        right: -80px;
        top: -105px;
    }

    .auth-aside::after,
    .auth-art,
    .auth-copy {
        display: none;
    }

    .auth-brand {
        top: 50%;
        left: 1.25rem;
        transform: translateY(-50%);
    }

    .auth-form-card,
    .auth-register-shell .auth-form-card {
        min-height: calc(100dvh - 108px);
        overflow: visible;
    }

    .auth-form-intro {
        padding: 1.75rem 1.25rem 0;
    }

    .auth-form-intro h2 {
        font-size: 1.45rem;
    }

    .auth-form-card .login-body,
    .auth-form-card .register-body {
        padding: 1.35rem 1.25rem 2rem;
    }

    .auth-form-card .row {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
    }

    .auth-form-card .row > .col-md-6 {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    .auth-form-card .row > .col-md-6 + .col-md-6 {
        margin-top: 1rem;
    }

    .auth-form-section-title {
        margin-top: .1rem;
    }
}

@media (max-width: 380px) {
    .auth-aside {
        min-height: 96px;
        padding-inline: 1rem;
    }

    .auth-brand {
        left: 1rem;
        font-size: .86rem;
    }

    .auth-form-card,
    .auth-register-shell .auth-form-card {
        min-height: calc(100dvh - 96px);
    }

    .auth-form-intro,
    .auth-form-card .login-body,
    .auth-form-card .register-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
/* Overrides finais da Agenda: neutraliza regras legadas de alto contraste. */
.agenda-reference-page .agenda-reference-toolbar { position: relative; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab,
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active { color: #536a73 !important; background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active { color: #1d5c5c !important; font-weight: 800 !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active::after { background: #287c78 !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab:focus-visible { outline: 3px solid rgba(40,124,120,.22) !important; outline-offset: -3px; border-radius: 8px !important; }
.agenda-reference-page .agenda-range-button, .agenda-reference-page .agenda-week-button { color: #536a73 !important; background: #fff !important; border: 1px solid #dfe9e6 !important; outline: 0 !important; box-shadow: 0 2px 8px rgba(27,64,75,.04) !important; }
.agenda-reference-page .agenda-range-button:focus-visible, .agenda-reference-page .agenda-week-button:focus-visible { border-color: #7eb9ad !important; box-shadow: 0 0 0 3px rgba(40,124,120,.13) !important; }
.agenda-reference-page .agenda-new-button { color: #fff !important; background: #287c78 !important; border: 0 !important; }
.agenda-reference-page .agenda-range-popover { top: 52px; right: 170px; width: 238px; }
.agenda-reference-page .agenda-view-popover { top: 52px; right: 96px; width: 160px; gap: 4px; }
.agenda-reference-page .agenda-popover[hidden] { display: none !important; }

/* Final Essentia treatment for the patient portal, after legacy portal rules. */
.patient-portal-page{color:#173847!important;background:radial-gradient(circle at 8% 4%,rgba(202,244,221,.58),transparent 28%),radial-gradient(circle at 94% 30%,rgba(181,216,247,.32),transparent 26%),linear-gradient(135deg,#f6faf8,#eef7f5 52%,#f6f4ff)!important;font-family:Manrope,system-ui,sans-serif!important}
.patient-portal-card,.patient-portal-panel{border:1px solid rgba(255,255,255,.82)!important;border-radius:24px!important;background:rgba(255,255,255,.68)!important;box-shadow:0 20px 60px rgba(24,55,69,.1),inset 0 1px rgba(255,255,255,.84)!important;backdrop-filter:blur(18px)!important}
.patient-portal-brand strong{font-size:0!important}.patient-portal-brand strong::after{content:"Essentia";font-size:1.05rem!important}
.patient-portal-card{width:min(500px,calc(100% - 32px))!important;margin:clamp(42px,10vh,110px) auto!important;padding:38px!important}.patient-portal-brand{gap:10px!important;color:#173847!important;font-size:1.05rem!important;font-weight:800!important}.patient-portal-brand i{width:42px!important;height:42px!important;color:transparent!important;border:1px solid rgba(255,255,255,.72)!important;border-radius:14px!important;background:rgba(255,255,255,.6) url('../branding/essentia_logo_sem_fundo.png') center/34px no-repeat!important;box-shadow:inset 0 1px #fff,0 10px 22px rgba(25,105,101,.1)!important;font-size:0!important}.patient-portal-card .eyebrow{margin-top:38px!important;color:#287c78!important;font:500 .68rem/1 "DM Mono",monospace!important;letter-spacing:.16em!important}.patient-portal-card h1,.patient-portal-content h1{color:#173847!important;font-size:clamp(1.8rem,4vw,2.5rem)!important;line-height:1.05!important;letter-spacing:-.065em!important}.patient-portal-card p,.patient-portal-subtitle{color:#66808a!important;font-size:.84rem!important;line-height:1.6!important}.patient-portal-card label{color:#173847!important;font-size:.74rem!important;font-weight:800!important}.patient-portal-card input,.patient-journal-form input,.patient-journal-form select,.patient-journal-form textarea,.patient-preferences-form input,.patient-scale-form input{border:1px solid rgba(40,124,120,.2)!important;border-radius:13px!important;background:rgba(255,255,255,.72)!important;color:#173847!important;font:inherit!important}.patient-portal-card button,.patient-journal-form button,.patient-preferences-form button,.patient-scale-form button{min-height:50px!important;color:#fff!important;border:1px solid rgba(255,255,255,.48)!important;border-radius:14px!important;background:linear-gradient(135deg,rgba(43,136,130,.95),rgba(20,91,91,.88))!important;box-shadow:inset 0 1px rgba(255,255,255,.42),0 12px 28px rgba(25,105,101,.2)!important;font-family:Manrope,system-ui,sans-serif!important;transition:transform .28s ease,box-shadow .28s ease,filter .28s ease!important}.patient-portal-card button:hover,.patient-journal-form button:hover,.patient-preferences-form button:hover,.patient-scale-form button:hover{filter:brightness(1.05)!important;transform:translateY(-2px)!important}.patient-portal-card>a,.patient-portal-top a,.patient-portal-actions a,.patient-today-item a{color:#287c78!important;font-weight:800!important;text-decoration:none!important}.patient-portal-top{height:76px!important;padding:0 max(20px,calc((100% - 1180px)/2))!important;border:1px solid rgba(255,255,255,.78)!important;border-radius:0 0 18px 18px!important;background:rgba(255,255,255,.66)!important;box-shadow:0 16px 48px rgba(7,31,44,.09)!important;backdrop-filter:blur(22px)!important}.patient-portal-content{width:min(1180px,calc(100% - 40px))!important;padding:74px 0!important}.patient-portal-panel{min-height:240px!important;padding:26px!important}.patient-portal-panel-title{border-bottom-color:rgba(23,56,71,.1)!important}.patient-portal-panel-title i{color:#287c78!important}.patient-portal-panel-title h2{color:#173847!important;font-size:1rem!important}.patient-portal-empty{color:#78919a!important}.patient-portal-error{color:#a13742!important;background:#fff2f2!important;border-color:rgba(177,67,75,.25)!important}.patient-portal-success{color:#176b4d!important;background:rgba(223,242,165,.35)!important;border-color:rgba(66,185,168,.25)!important}
@media(max-width:700px){.patient-portal-card{margin:28px auto!important;padding:26px 22px!important}.patient-portal-top{height:auto!important;min-height:72px!important;padding:14px 16px!important}.patient-portal-content{width:calc(100% - 28px)!important;padding:42px 0!important}.patient-portal-grid{grid-template-columns:1fr!important}.patient-portal-panel{padding:21px!important}}

/* Agenda view switch: one active green pill with a quiet sliding indicator. */
body.reference-shell-page .agenda-reference-page .agenda-layout-switch {
    position:relative; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2px;
    min-width:220px; padding:3px; border:1px solid rgba(160,198,190,.58); border-radius:12px;
    background:rgba(247,252,250,.88); box-shadow:inset 0 1px rgba(255,255,255,.92);
}
body.reference-shell-page .agenda-reference-page .agenda-layout-switch::before {
    position:absolute; top:3px; bottom:3px; left:3px; width:calc((100% - 6px - 4px) / 3);
    border:1px solid rgba(72,145,115,.42); border-radius:9px; background:linear-gradient(135deg,rgba(205,239,193,.9),rgba(151,214,187,.76));
    box-shadow:0 3px 8px rgba(58,125,100,.12); content:""; transition:transform .28s ease;
}
body.reference-shell-page .agenda-reference-page .agenda-layout-switch:has(> button:nth-child(2).is-active)::before { transform:translateX(calc(100% + 2px)); }
body.reference-shell-page .agenda-reference-page .agenda-layout-switch:has(> button:nth-child(3).is-active)::before { transform:translateX(calc(200% + 4px)); }
body.reference-shell-page .agenda-reference-page .agenda-layout-switch > button {
    position:relative; z-index:1; min-height:32px; justify-content:center; padding:0 11px;
    color:#31545d !important; border:0 !important; border-radius:9px !important; background:transparent !important;
    box-shadow:none !important; transform:none !important; transition:color .2s ease !important;
}
body.reference-shell-page .agenda-reference-page .agenda-layout-switch > button.is-active { color:#111 !important; background:transparent !important; box-shadow:none !important; }
body.reference-shell-page .agenda-reference-page .agenda-layout-switch > button:not(.is-active):hover { color:#173f49 !important; background:rgba(220,241,236,.54) !important; }
body.reference-shell-page .agenda-reference-page .agenda-popover .agenda-popover-apply {
    color:#111 !important; border:1px solid rgba(72,145,115,.5) !important;
    background:linear-gradient(135deg,rgba(205,239,193,.9),rgba(151,214,187,.76)) !important;
    box-shadow:0 4px 10px rgba(58,125,100,.12) !important;
}
body.reference-shell-page .agenda-reference-page .agenda-popover .agenda-popover-apply:hover {
    color:#111 !important; background:linear-gradient(135deg,rgba(231,249,211,.95),rgba(190,233,204,.84)) !important;
    transform:translateY(-1px) !important;
}

/* Correção final de autenticação: mantida no fim para vencer estilos legados. */
.auth-body { min-width: 0; overflow-x: hidden; }
.auth-shell { grid-template-columns: minmax(310px, .82fr) minmax(0, 1.18fr); width: min(1120px, 100%); min-width: 0; }
.auth-aside, .auth-form-card, .auth-form-card .login-body, .auth-form-card .register-body, .auth-form-intro { min-width: 0; }
.auth-form-card { overflow-x: hidden; }
.auth-form-intro { padding: 3rem clamp(2rem, 5vw, 4rem) 0; }
.auth-form-card .login-body, .auth-form-card .register-body { padding: 1.65rem clamp(2rem, 5vw, 4rem) 3rem; }
.auth-form-card .row { --bs-gutter-x: 1rem; --bs-gutter-y: 0; }
.auth-form-section-title { display: grid; grid-template-columns: 25px minmax(0, 1fr); column-gap: .5rem; row-gap: .15rem; align-items: center; margin: .25rem 0 1rem; padding-bottom: .7rem; line-height: 1.25; }
.auth-form-section-title > i { grid-row: 1 / span 2; }
.auth-form-section-title > span { min-width: 0; }
.auth-form-section-title > small { grid-column: 2; margin: 0; color: #71838a; font-size: .67rem; font-weight: 600; white-space: normal; }
.auth-user-section-title { margin-top: 1.6rem; }
.auth-form-card .form-floating { margin-bottom: 1rem; }
.auth-form-card .form-control, .auth-form-card .form-select { width: 100%; max-width: 100%; }
.auth-form-card .auth-legal-links { padding-bottom: .25rem; }

@media (min-width: 761px) {
    .auth-register-shell { height: min(860px, calc(100vh - 3rem)); min-height: 640px; }
    .auth-register-shell .auth-form-card { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b7d3cc transparent; }
    .auth-register-shell .auth-form-card::-webkit-scrollbar { width: 8px; }
    .auth-register-shell .auth-form-card::-webkit-scrollbar-thumb { background: #b7d3cc; border-radius: 99px; }
}

@media (max-width: 760px) {
    .auth-body { display: block; min-height: 100dvh; padding: 0; }
    .auth-shell, .auth-register-shell { width: 100%; min-height: 100dvh; border-radius: 0; }
    .auth-aside { min-height: 108px; padding: 1.25rem; }
    .auth-aside::before { width: 190px; height: 190px; right: -80px; top: -105px; }
    .auth-aside::after, .auth-art, .auth-copy { display: none; }
    .auth-brand { top: 50%; left: 1.25rem; transform: translateY(-50%); }
    .auth-form-card, .auth-register-shell .auth-form-card { min-height: calc(100dvh - 108px); overflow: visible; }
    .auth-form-intro { padding: 1.75rem 1.25rem 0; }
    .auth-form-intro h2 { font-size: 1.45rem; }
    .auth-form-card .login-body, .auth-form-card .register-body { padding: 1.35rem 1.25rem 2rem; }
    .auth-form-card .row { --bs-gutter-x: 0; --bs-gutter-y: 0; }
    .auth-form-card .row > .col-md-6 { width: 100%; padding-right: 0; padding-left: 0; }
    .auth-form-card .row > .col-md-6 + .col-md-6 { margin-top: 1rem; }
    .auth-form-section-title { margin-top: .1rem; }
}

@media (max-width: 380px) {
    .auth-aside { min-height: 96px; padding-inline: 1rem; }
    .auth-brand { left: 1rem; font-size: .86rem; }
    .auth-form-card, .auth-register-shell .auth-form-card { min-height: calc(100dvh - 96px); }
    .auth-form-intro, .auth-form-card .login-body, .auth-form-card .register-body { padding-left: 1rem; padding-right: 1rem; }
}

/* Padrao definitivo compartilhado por Pacientes, Agenda e demais listagens. */
.reference-shell-page .content-wrapper .agenda-new-button,
.reference-shell-page .content-wrapper .patients-new-button,
.reference-shell-page .content-wrapper .records-new-button {
    min-height: 44px !important;
    padding: 0 19px !important;
    gap: 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #287c78, #1d5c5c) !important;
    box-shadow: 0 8px 18px rgba(40,124,120,.2) !important;
    font-size: .76rem !important;
    font-weight: 750 !important;
    letter-spacing: normal !important;
}
.reference-shell-page .content-wrapper .agenda-new-button:hover,
.reference-shell-page .content-wrapper .patients-new-button:hover,
.reference-shell-page .content-wrapper .records-new-button:hover { color: #fff !important; background: linear-gradient(135deg, #328d87, #216b6b) !important; transform: translateY(-1px); }
.reference-shell-page .content-wrapper table:not(.table-borderless) {
    width: 100%;
    min-width: 860px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: #303653;
    font-size: .76rem;
}
.reference-shell-page .content-wrapper table:not(.table-borderless) thead th {
    height: 52px;
    padding: 0 18px !important;
    color: #71838a !important;
    background: #f7fbfa !important;
    border-bottom: 1px solid #dfe9e6 !important;
    font-size: .62rem !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.reference-shell-page .content-wrapper table:not(.table-borderless) tbody td {
    height: 70px;
    padding: 11px 18px !important;
    border-bottom: 1px solid #edf3f1 !important;
    vertical-align: middle;
    white-space: nowrap;
}
.reference-shell-page .content-wrapper table:not(.table-borderless) tbody tr:last-child td { border-bottom: 0 !important; }
.reference-shell-page .content-wrapper table:not(.table-borderless) tbody tr:hover td { background: #f8fcfb !important; }
.reference-shell-page .content-wrapper .table-responsive { overflow-x: auto; }
.reference-shell-page .content-wrapper .btn-group { gap: 8px !important; }
.reference-shell-page .content-wrapper .btn-group > .btn,
.reference-shell-page .content-wrapper .btn-group > a { margin: 0 !important; border-radius: 9px !important; }

/* Ultimos overrides globais: mantem o padrao da Agenda em todas as telas. */
.reference-shell-page .content-wrapper .btn-primary,
.reference-shell-page .content-wrapper .btn-success,
.reference-shell-page .content-wrapper .patients-new-button,
.reference-shell-page .content-wrapper .agenda-new-button,
.reference-shell-page .content-wrapper .records-new-button { min-height: 42px !important; border-radius: 10px !important; font-weight: 800 !important; }
.reference-shell-page .content-wrapper .btn-group { gap: 8px !important; }
.reference-shell-page .content-wrapper .btn-group > .btn,
.reference-shell-page .content-wrapper .btn-group > a { margin: 0 !important; border-radius: 10px !important; }
.reference-shell-page .content-wrapper table.table:not(.planilha-table) thead th,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) thead th { color: #71838a !important; background: #f7fbfa !important; border-bottom: 1px solid #dfe9e6 !important; font-size: .62rem !important; font-weight: 800 !important; letter-spacing: .06em !important; text-transform: uppercase; }
.reference-shell-page .content-wrapper table.table:not(.planilha-table) tbody td,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) tbody td { min-height: 70px; padding: 13px 18px; border-bottom: 1px solid #edf3f1 !important; vertical-align: middle; }
.reference-shell-page .content-wrapper table.table:not(.planilha-table) tbody tr:hover td,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) tbody tr:hover td { background: #f8fcfb !important; }
.resources-progress small { display: block; margin-top: 10px; color: #77908b; font-size: .61rem; line-height: 1.35; }
.resources-next-step { display: flex; align-items: center; gap: 15px; margin-bottom: 27px; padding: 18px 20px; border: 1px solid #cfe5dc; border-radius: 16px; background: linear-gradient(110deg, #f1faf6, #fff); box-shadow: 0 8px 22px rgba(27,64,75,.05); }.resources-next-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; color: #287c78; border-radius: 14px; background: #dcefe7; font-size: 1.1rem; }.resources-next-step h2 { margin: 4px 0 3px; color: #203744; font-size: 1rem; }.resources-next-step p { margin: 0; color: #71838a; font-size: .7rem; }.resources-next-step > .btn { margin-left: auto; white-space: nowrap; }.resources-heading p { margin: 6px 0 0; color: #8a9b9d; font-size: .7rem; }.resource-card { overflow: hidden; }.resource-card.is-complete { border-color: #b9d9d2; background: #fcfefd; }.resource-card.is-complete .resource-icon { color: #287c78; background: #dcefe7; }.resource-complete { position: absolute; top: 18px; right: 16px; display: inline-flex; align-items: center; gap: 5px; color: #2f8468; font-size: .58rem; font-weight: 800; }.resource-complete i { font-size: .55rem; }.resources-help-section { margin-top: 36px; }.resources-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }.resources-help-card { display: flex; gap: 13px; padding: 19px; border: 1px solid #dfe9e6; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(27,64,75,.05); }.resources-help-card > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: #287c78; border-radius: 11px; background: #e3f1ed; }.resources-help-card h3 { margin: 1px 0 6px; color: #203744; font-size: .79rem; }.resources-help-card p { min-height: 43px; margin: 0 0 12px; color: #71838a; font-size: .65rem; line-height: 1.45; }.resources-help-card a { color: #287c78; font-size: .65rem; font-weight: 800; text-decoration: none; }.resources-help-card a i { margin-left: 4px; font-size: .58rem; }
@media (max-width: 900px) { .resources-help-grid { grid-template-columns: 1fr; }.resources-next-step { align-items: flex-start; flex-wrap: wrap; }.resources-next-step > .btn { margin-left: 63px; } }
@media (max-width: 600px) { .resources-next-step > .btn { width: calc(100% - 63px); margin-left: 63px; }.resources-help-card p { min-height: auto; } }

/* Configuracoes: central de preferencias clinicas */
.settings-page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 32px 42px 56px; color: #203744; }
.settings-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.settings-hero h1 { margin: 5px 0 0; color: #203744; font-size: clamp(1.7rem, 2.6vw, 2.35rem); letter-spacing: -.05em; }
.settings-hero p { margin: 8px 0 0; color: #71838a; font-size: .86rem; }
.settings-hero-status { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border: 1px solid #dfe9e6; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(27,64,75,.05); }
.settings-hero-status > i { display: grid; width: 34px; height: 34px; place-items: center; color: #287c78; border-radius: 10px; background: #e3f1ed; }
.settings-hero-status strong, .settings-hero-status small { display: block; }.settings-hero-status strong { font-size: .75rem; }.settings-hero-status small { margin-top: 3px; color: #71838a; font-size: .64rem; }
.settings-hero-status.is-paid { border-color: #cfe5dc; background: #f3faf6; }.settings-hero-status.is-paid > i { color: #fff; background: #287c78; }.settings-hero-status.is-warning { border-color: #f0dfb5; background: #fff9e9; }.settings-hero-status.is-warning > i { color: #8a5b16; background: #ffe7ac; }.settings-hero-status.is-alert { border-color: #f2cfcf; background: #fff5f5; }.settings-hero-status.is-alert > i { color: #fff; background: #c45a5a; }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border: 1px solid #dfe9e6; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(27,64,75,.05); }
.settings-nav-label { padding: 5px 11px 10px; color: #9aa9aa; font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.settings-nav a { display: flex; min-height: 39px; align-items: center; gap: 10px; padding: 0 11px; color: #71838a; border-radius: 9px; font-size: .7rem; font-weight: 750; text-decoration: none; }.settings-nav a i:first-child { width: 16px; text-align: center; color: #8aa09f; }.settings-nav a:hover, .settings-nav a.is-active { color: #1d5c5c; background: #e3f1ed; }.settings-nav a.is-active i:first-child { color: #287c78; }.settings-nav .settings-external { margin-left: auto; width: auto !important; color: #a4b1b1 !important; font-size: .58rem; }
.settings-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }.settings-section { padding: 24px; border: 1px solid #dfe9e6; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(27,64,75,.05); scroll-margin-top: 20px; }.settings-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }.settings-section-heading h2 { margin: 1px 0 4px; color: #203744; font-size: 1rem; letter-spacing: -.025em; }.settings-section-heading p { margin: 0; color: #8a9b9d; font-size: .72rem; }.settings-section-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; font-size: .85rem; }.settings-section-icon.is-teal { color: #287c78; background: #e3f1ed; }.settings-section-icon.is-sage { color: #4b8c72; background: #e4f1e9; }.settings-section-icon.is-blue { color: #477ea6; background: #e7f0f7; }.settings-section-icon.is-coral { color: #a76150; background: #f8e8e2; }.settings-section-icon.is-lilac { color: #746ca5; background: #eeecf7; }
.settings-fields { display: grid; gap: 16px; }.settings-fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }.settings-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }.settings-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: #536a73; font-size: .7rem; font-weight: 750; }.settings-field small { color: #93a1a2; font-size: .62rem; font-weight: 500; line-height: 1.4; }.settings-field input, .settings-field select, .settings-field textarea { width: 100%; min-height: 42px; padding: 0 12px; color: #203744; border: 1px solid #dfe9e6; border-radius: 9px; outline: 0; background: #fbfdfc; font-size: .76rem; font-weight: 500; }.settings-field textarea { min-height: 88px; padding-top: 11px; resize: vertical; }.settings-field input:focus, .settings-field select:focus, .settings-field textarea:focus { border-color: #7eb9ad; background: #fff; box-shadow: 0 0 0 3px rgba(40,124,120,.12); }.settings-field-wide { margin-bottom: 18px; }.settings-input-suffix, .settings-input-prefix { position: relative; display: flex; align-items: center; }.settings-input-suffix input { padding-right: 40px; }.settings-input-suffix em { position: absolute; right: 12px; color: #8da09f; font-size: .67rem; font-style: normal; }.settings-input-prefix em { padding: 0 10px 0 12px; color: #287c78; font-size: .7rem; font-style: normal; font-weight: 800; }.settings-input-prefix input { padding-left: 0; }
.settings-inline-note { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 11px 13px; color: #5c7775; border: 1px solid #dcece5; border-radius: 9px; background: #f3faf6; font-size: .67rem; }.settings-inline-note i { color: #7aaf76; }
.settings-toggle-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr; gap: 12px; }.settings-toggle-grid-two { grid-template-columns: 1fr 1fr; }.settings-toggle-grid-four { grid-template-columns: repeat(2, 1fr); }.settings-toggle { display: flex; min-height: 68px; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #e3ecea; border-radius: 11px; background: #fbfdfc; cursor: pointer; }.settings-toggle.is-readonly { cursor: not-allowed; opacity: .72; background: #f7f9f8; }.settings-toggle input { position: absolute; opacity: 0; pointer-events: none; }.settings-toggle-control { position: relative; width: 34px; height: 20px; flex: 0 0 34px; border-radius: 99px; background: #cbd7d5; transition: background .2s ease; }.settings-toggle-control::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.16); content: ''; transition: transform .2s ease; }.settings-toggle input:checked + .settings-toggle-control { background: #287c78; }.settings-toggle input:checked + .settings-toggle-control::after { transform: translateX(14px); }.settings-toggle strong, .settings-toggle small { display: block; }.settings-toggle strong { color: #405b60; font-size: .7rem; }.settings-toggle small { margin-top: 4px; color: #8b9b9d; font-size: .61rem; line-height: 1.35; }.settings-toggle-field { justify-content: center; padding: 0 13px; border: 1px solid #e3ecea; border-radius: 11px; background: #fbfdfc; }.settings-feature-card { display: flex; min-height: 68px; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed #c9dfd8; border-radius: 11px; background: #f3faf6; }.settings-feature-card > i { color: #287c78; font-size: 1rem; }.settings-feature-card strong { color: #405b60; font-size: .7rem; }.settings-feature-card p { margin: 4px 0 0; color: #7f9493; font-size: .63rem; line-height: 1.4; }.settings-feature-card-soft { border-color: #e3e0ee; background: #faf9fd; }.settings-feature-card-soft > i { color: #746ca5; }
.settings-save-bar { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 17px; border: 1px solid #cfe5dc; border-radius: 13px; background: #f1faf6; }.settings-save-bar span { color: #5c7775; font-size: .68rem; }.settings-save-bar span i { margin-right: 6px; color: #3e9b75; }.settings-save-bar .btn { min-height: 42px; border-radius: 10px !important; }
@media (max-width: 1050px) { .settings-fields-4 { grid-template-columns: repeat(2, 1fr); }.settings-toggle-grid { grid-template-columns: 1fr 1fr; }.settings-toggle-field { min-height: 68px; } }
@media (max-width: 760px) { .settings-page { padding: 22px 16px 40px; }.settings-hero { align-items: flex-start; flex-direction: column; }.settings-hero-status { width: 100%; }.settings-layout { display: block; }.settings-nav { position: static; display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }.settings-nav-label { grid-column: 1 / -1; }.settings-nav a { min-height: 42px; }.settings-fields-4, .settings-fields-3, .settings-toggle-grid, .settings-toggle-grid-two, .settings-toggle-grid-four { grid-template-columns: 1fr; }.settings-section { padding: 18px; }.settings-save-bar { align-items: flex-start; flex-direction: column; }.settings-save-bar .btn { width: 100%; } }
/* Financeiro: painel de gestão alinhado ao shell PrimeVue/Clínico. */
.financial-page { max-width: none; padding: 32px 42px 56px !important; }
.financial-page .finance-heading h2 { color: #203744 !important; font-size: 1.55rem; letter-spacing: -.04em; }
.financial-page .finance-heading h2 i { color: #287c78 !important; }
.financial-page .finance-heading .page-subtitle { max-width: 600px; }
.financial-page .finance-export { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 15px; border-radius: 9px !important; font-size: .72rem !important; font-weight: 750 !important; text-decoration: none; }
.financial-page .finance-export-excel { color: #1d6b59 !important; background: #e3f1ed !important; border: 1px solid #c5e1d9 !important; }
.financial-page .finance-export-pdf { color: #9b554d !important; background: #f7e5df !important; border: 1px solid #edc8bc !important; }
.financial-page .finance-filter-card { border: 1px solid #dfe9e6 !important; border-radius: 16px !important; box-shadow: 0 8px 22px rgba(27,64,75,.05) !important; }
.financial-page .finance-filter-card .card-body { padding: 18px 20px !important; }
.financial-page .finance-filter-form .form-select { min-height: 42px; min-width: 145px !important; border-color: #dfe9e6 !important; border-radius: 9px !important; background: #fbfdfc; }
.financial-page .finance-filter-form .btn-primary { min-height: 42px; color: #fff !important; background: #287c78 !important; border-color: #287c78 !important; border-radius: 9px !important; }
.financial-page .finance-summary-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-right: 0; margin-left: 0; }
.financial-page .finance-summary-grid > [class*="col-"] { width: auto; max-width: none; padding: 0; }
.financial-page .finance-summary-card { min-height: 164px; border: 1px solid #dfe9e6 !important; border-top: 0 !important; border-radius: 15px !important; box-shadow: 0 8px 22px rgba(27,64,75,.05) !important; }
.financial-page .finance-summary-card::before { display: block; height: 4px; background: var(--card-accent, #287c78); content: ''; }
.financial-page .finance-summary-card .card-body { padding: 20px 13px !important; }
.financial-page .finance-summary-card .bg-opacity-10 { padding: 11px !important; border-radius: 11px !important; }
.financial-page .finance-summary-card .text-muted { color: #71838a !important; font-size: .64rem !important; letter-spacing: .05em; }
.financial-page .finance-summary-card .h4 { font-size: 1.12rem !important; }
.financial-page .finance-data-card { border: 1px solid #dfe9e6 !important; border-radius: 16px !important; box-shadow: 0 8px 22px rgba(27,64,75,.05) !important; }
.financial-page .planilha-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; color: #fff; background: linear-gradient(135deg, #287c78, #1d5c5c) !important; font-size: .82rem; letter-spacing: .06em; }
.financial-page .finance-data-kicker { color: rgba(255,255,255,.7); font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: none; }
.financial-page .planilha-table { color: #40565d; font-size: .77rem; }
.financial-page .planilha-table th { height: 48px; padding: 0 18px; color: #71838a; background: #f7fbfa !important; border-bottom: 1px solid #dfe9e6; font-size: .62rem; letter-spacing: .06em; }
.financial-page .planilha-table td { min-height: 62px; padding: 13px 18px; border-bottom: 1px solid #edf3f1; }
.financial-page .planilha-table tbody tr:hover td { background: #f8fcfb !important; }
.financial-page .badge-nome, .financial-page .badge-horario, .financial-page .badge-modalidade { border-radius: 8px !important; font-size: .68rem; }
.financial-page .badge-horario { color: #287c78; background: #e3f1ed; border-color: #c5e1d9; }
.financial-page .badge-presencial { color: #9a6235; background: #f8eadb; border-color: #eed5b9; }
.financial-page .badge-online { color: #1d6b59; background: #e3f1ed; border-color: #c5e1d9; }
.financial-page .planilha-total-row td { color: #203744; background: #f7fbfa !important; border-color: #dfe9e6; }
.financial-page .btn-pago-toggle { min-height: 36px; min-width: 132px; padding: 0 16px; border-radius: 9px !important; font-size: .7rem; }
.financial-page .finance-overdue-card .card-header { padding: 19px 22px 13px !important; }
.financial-page .finance-overdue-card .card-header h6 { color: #9b554d !important; font-size: .86rem; }
.financial-page .finance-overdue-card table thead { background: #9b554d !important; }
@media (max-width: 1200px) { .financial-page .finance-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .financial-page { padding: 22px 16px 40px !important; } .financial-page .finance-heading .btn { width: 100%; justify-content: center; } .financial-page .finance-filter-form > div { width: 100%; } .financial-page .finance-filter-form .form-select, .financial-page .finance-filter-form .btn { width: 100%; } .financial-page .finance-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .financial-page .planilha-header { align-items: flex-start; flex-direction: column; } }

/* Paleta clínica: azul-petróleo, sálvia e areia substituem o roxo dominante. */
:root {
    --ui-primary: #287c78;
    --ui-primary-dark: #1d5c5c;
    --ui-primary-soft: #e3f1ed;
    --ui-ink: #203744;
    --ui-muted: #71838a;
    --ui-border: #dfe9e6;
    --ui-bg: #f5f8f7;
    --ui-sidebar: #17324d;
    --figma-lime: #dcefc4;
    --figma-lilac: #d6ebe8;
    --figma-mint: #c8e6d7;
    --figma-cream: #f5eddb;
    --figma-coral: #f1d4c7;
}
.reference-shell-page .sidebar,
.reference-shell-page .sidebar.collapsed { background: linear-gradient(180deg, #17324d 0%, #204c5a 100%) !important; }
.reference-shell-page .sidebar-header { background: #112b43 !important; }
.reference-shell-page .sidebar-brand i { background: linear-gradient(145deg, #5ca69b, #287c78) !important; box-shadow: 0 8px 16px rgba(40,124,120,.28) !important; }
.reference-shell-page .nav-link.active { background: #dcefc4 !important; color: #17324d !important; box-shadow: 0 8px 18px rgba(220,239,196,.16) !important; }
.reference-shell-page .nav-link.active i { color: #17324d !important; }
.reference-shell-page .nav-link:hover { background: rgba(220,239,196,.15) !important; color: #fff !important; }
.reference-shell-page .top-bar h4,
.reference-shell-page .dashboard-reference-heading h1,
.reference-shell-page .patients-reference-heading h1,
.reference-shell-page .agenda-reference-heading h1,
.reference-shell-page .records-reference-heading h1 { color: #203744 !important; }
.reference-shell-page .dashboard-reference-date,
.reference-shell-page .dashboard-date { color: #287c78 !important; border-color: #c5e1d9 !important; }
.reference-shell-page .btn-primary,
.reference-shell-page .patients-new-button,
.reference-shell-page .agenda-new-button,
.reference-shell-page .records-new-button,
.reference-shell-page .dashboard-quick-action.dashboard-quick-purple { background: linear-gradient(135deg, #287c78, #1d5c5c) !important; border-color: transparent !important; box-shadow: 0 8px 18px rgba(40,124,120,.2) !important; }
.reference-shell-page .btn-outline-primary { color: #287c78 !important; border-color: #b9d9d2 !important; }
.reference-shell-page .btn-outline-primary:hover { color: #fff !important; background: #287c78 !important; }
.reference-shell-page .dashboard-stat-icon-purple { color: #287c78 !important; background: #e3f1ed !important; }
.reference-shell-page .dashboard-reference-stat a,
.reference-shell-page .dashboard-reference-panel-header a,
.reference-shell-page .dashboard-appointment-row time,
.reference-shell-page .patients-reference-heading .eyebrow,
.reference-shell-page .agenda-reference-heading .eyebrow,
.reference-shell-page .records-reference-heading .eyebrow,
.reference-shell-page .patient-row-action.action-view,
.reference-shell-page .agenda-row-action.action-view,
.reference-shell-page .records-row-action { color: #287c78 !important; }
.reference-shell-page .agenda-tab.is-active { color: #287c78 !important; }
.reference-shell-page .agenda-tab.is-active::after { background: #287c78 !important; }
.reference-shell-page .agenda-tab.is-active span { color: #287c78 !important; background: #e3f1ed !important; }
.reference-shell-page .records-reference-table th,
.reference-shell-page .table thead.bg-gradient-primary th { background: linear-gradient(135deg, #287c78, #1d5c5c) !important; }
.reference-shell-page .dashboard-quick-purple { background: #d6ebe8 !important; color: #17324d !important; }
.reference-shell-page .dashboard-quick-green { background: #c8e6d7 !important; color: #17324d !important; }
.reference-shell-page .dashboard-quick-blue { background: #f5eddb !important; color: #17324d !important; }
.reference-shell-page .dashboard-quick-orange { background: #f1d4c7 !important; color: #17324d !important; }
.reference-shell-page .dashboard-advanced-card { box-shadow: 12px 14px 0 rgba(23,50,77,.08); }
.reference-shell-page .global-search > i { color: #287c78 !important; }
.reference-shell-page .global-search input:focus { border-color: #8fc4b8 !important; box-shadow: 0 0 0 3px rgba(40,124,120,.13) !important; }
.reference-shell-page .content-wrapper thead[style*="5a7eff"],
.reference-shell-page .content-wrapper thead[style*="4a6ae0"] { background: linear-gradient(135deg, #287c78, #1d5c5c) !important; }
.reference-shell-page .form-control:focus,
.reference-shell-page .form-select:focus { border-color: #8fc4b8 !important; box-shadow: 0 0 0 3px rgba(40,124,120,.13) !important; }
.patient-portal-card button,
.patient-journal-form button,
.patient-preferences-form button,
.patient-scale-form button { background: linear-gradient(135deg, #287c78, #1d5c5c) !important; }
.patient-portal-card > a,
.patient-portal-top a,
.patient-portal-actions a,
.patient-today-item a,
.patient-portal-panel-title i,
.smart-notes-card h2 i,
.agenda-row-action.action-smart-notes { color: #287c78 !important; }
.atendimento-header { background: linear-gradient(135deg, #287c78, #1d5c5c) !important; }
.modal { --bs-modal-width: 760px; }
.modal-backdrop.show { opacity: .56 !important; background: #102a3a !important; }
.modal-dialog { margin: 1.25rem auto; }
.modal-dialog.modal-xl { --bs-modal-width: 980px; }
.modal-dialog.modal-lg { --bs-modal-width: 780px; }
.modal-content,
.modern-modal,
.modern-view-modal,
.atendimento-modal { overflow: hidden; border: 1px solid #dfe9e6 !important; border-radius: 22px !important; background: #fff !important; box-shadow: 0 24px 70px rgba(19,48,61,.2) !important; }
.modal-header,
.modern-header,
.modern-view-header,
.atendimento-header { min-height: 86px; padding: 20px 26px !important; border: 0 !important; background: linear-gradient(135deg, #287c78, #1d5c5c) !important; color: #fff !important; }
.modal-header .modal-title,
.modern-header .modal-title,
.modern-view-header .modal-title,
.atendimento-header .modal-title { color: #fff !important; font-size: 1.08rem !important; font-weight: 750 !important; letter-spacing: -.02em; }
.modal-header .modal-subtitle,
.modern-header .modal-subtitle,
.modern-view-header .modal-subtitle { margin: 5px 0 0; color: rgba(255,255,255,.78) !important; font-size: .73rem !important; }
.modal-header .btn-close,
.modern-header .btn-close,
.modern-view-header .btn-close,
.atendimento-header .btn-close { width: 32px; height: 32px; margin: 0 !important; padding: 8px; border-radius: 50%; opacity: 1 !important; background-color: rgba(255,255,255,.14) !important; filter: invert(1) grayscale(1) brightness(4); }
.modal-body,
.modern-body,
.modern-view-body { max-height: min(68vh, 650px); overflow-y: auto; padding: 26px !important; background: #fff !important; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: #b9d9d2; border: 2px solid #fff; border-radius: 20px; }
.modal-body .form-label,
.modal-body label { margin-bottom: 7px; color: #536a73 !important; font-size: .72rem !important; font-weight: 700 !important; }
.modal-body .form-control,
.modal-body .form-select,
.modal-body input,
.modal-body select,
.modal-body textarea { min-height: 44px; border: 1px solid #dfe9e6 !important; border-radius: 10px !important; background: #fbfdfc !important; color: #203744 !important; box-shadow: none !important; }
.modal-body textarea { min-height: 100px; padding-top: 12px; }
.modal-body .form-control:focus,
.modal-body .form-select:focus,
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus { border-color: #7eb9ad !important; background: #fff !important; box-shadow: 0 0 0 3px rgba(40,124,120,.12) !important; }
.modal-body .section-title,
.modal-body h6.border-bottom { padding-bottom: 10px; color: #287c78 !important; border-color: #dfe9e6 !important; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.modal-body .alert { border: 0; border-radius: 10px; font-size: .78rem; }
.modal-footer,
.modern-footer,
.modern-view-footer { display: flex; gap: 10px; min-height: 76px; align-items: center; padding: 16px 26px !important; border-top: 1px solid #e6efec !important; background: #f8fbfa !important; }
.modal-footer .btn,
.modern-footer .btn,
.modern-view-footer .btn { min-height: 40px; padding: 0 17px; border-radius: 9px !important; font-size: .76rem !important; font-weight: 750 !important; }
.modal-footer .btn-secondary,
.modal-footer .btn-light,
.modern-footer .btn-secondary,
.modern-footer .btn-light,
.modern-view-footer .btn-light { color: #536a73 !important; background: #fff !important; border: 1px solid #dfe9e6 !important; }
.modal-footer .btn-primary,
.modal-footer .btn-success,
.modern-footer .btn-primary,
.modern-footer .btn-success { color: #fff !important; background: #287c78 !important; border-color: #287c78 !important; }
.modal-footer .btn-danger { background: #c96e62 !important; border-color: #c96e62 !important; }
.modal .btn-close:focus { box-shadow: 0 0 0 3px rgba(143,196,184,.35) !important; }
.modal .rounded-pill { border-radius: 9px !important; }
.modal .btn-group { gap: 8px !important; }
.modal .card,
.modal .bg-light { border: 1px solid #e2ece9 !important; border-radius: 12px !important; box-shadow: none !important; }
.modal .bg-info { background: #d6ebe8 !important; color: #1d5c5c !important; }
.modal .text-primary { color: #287c78 !important; }
.primevue-shell-actions { display: inline-flex; align-items: center; min-width: 36px; }
.primevue-shell-actions .p-button { width: 36px; height: 36px; color: #287c78 !important; border: 1px solid #dfe9e6 !important; border-radius: 10px !important; background: #fff !important; }
.primevue-shell-actions .p-button:hover { color: #1d5c5c !important; background: #e3f1ed !important; border-color: #acd5ca !important; }
.resources-page { width: 100%; padding: 32px 42px 56px; }
.resources-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 30px 34px; border: 1px solid #dfe9e6; border-radius: 22px; background: linear-gradient(120deg, #e6f3ee 0%, #f8f4e8 100%); }
.resources-hero h1 { margin: 0; color: #203744; font-size: clamp(1.55rem, 2.8vw, 2.35rem); letter-spacing: -.05em; }
.resources-hero p { max-width: 590px; margin: 9px 0 0; color: #5c7379; font-size: .88rem; }
.resources-progress { width: 190px; flex: 0 0 190px; padding: 17px; border: 1px solid rgba(40,124,120,.18); border-radius: 14px; background: rgba(255,255,255,.72); }
.resources-progress strong, .resources-progress span { display: block; }
.resources-progress strong { color: #287c78; font-size: 1.65rem; }
.resources-progress span { margin-top: 2px; color: #71838a; font-size: .68rem; font-weight: 700; }
.resources-progress > div { height: 7px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #dce9e5; }
.resources-progress i { display: block; height: 100%; border-radius: inherit; background: #287c78; }
.resources-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0 32px; }
.resources-summary > div { display: flex; min-height: 86px; flex-direction: column; justify-content: center; padding: 16px 20px; border: 1px solid #dfe9e6; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(27,64,75,.05); }
.resources-summary strong { color: #203744; font-size: 1.45rem; line-height: 1; }
.resources-summary span { margin-top: 6px; color: #71838a; font-size: .7rem; font-weight: 700; }
.resources-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.resources-heading h2 { margin: 0; color: #203744; font-size: 1.25rem; letter-spacing: -.03em; }
.resources-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.resource-card { position: relative; display: flex; min-height: 218px; flex-direction: column; padding: 20px; border: 1px solid #dfe9e6; border-radius: 16px; background: #fff; color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.resource-card:hover { transform: translateY(-3px); border-color: #9ccdc1; box-shadow: 0 14px 28px rgba(27,64,75,.1); }
.resource-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #287c78; background: #e3f1ed; font-size: .95rem; }
.resource-category { margin-top: 16px; color: #87979a; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.resource-card h3 { margin: 7px 0 0; color: #203744; font-size: .91rem; font-weight: 800; letter-spacing: -.02em; }
.resource-card p { margin: 7px 0 15px; color: #71838a; font-size: .72rem; line-height: 1.5; }
.resource-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; color: #287c78; font-size: .7rem; font-weight: 800; }

/* Padrao transversal: acoes e tabelas seguem a mesma linguagem da Agenda. */
.reference-shell-page .content-wrapper .btn-primary,
.reference-shell-page .content-wrapper .btn-success,
.reference-shell-page .content-wrapper .btn-action-primary,
.reference-shell-page .content-wrapper .patients-new-button,
.reference-shell-page .content-wrapper .agenda-new-button,
.reference-shell-page .content-wrapper .records-new-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #287c78, #1d5c5c) !important;
    box-shadow: 0 8px 18px rgba(40,124,120,.18) !important;
    font-size: .76rem !important;
    font-weight: 800 !important;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.reference-shell-page .content-wrapper .btn-primary:hover,
.reference-shell-page .content-wrapper .btn-success:hover,
.reference-shell-page .content-wrapper .btn-action-primary:hover,
.reference-shell-page .content-wrapper .patients-new-button:hover,
.reference-shell-page .content-wrapper .agenda-new-button:hover,
.reference-shell-page .content-wrapper .records-new-button:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 11px 22px rgba(40,124,120,.24) !important; }
.reference-shell-page .content-wrapper .btn-outline-primary,
.reference-shell-page .content-wrapper .btn-secondary,
.reference-shell-page .content-wrapper .btn-light { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding-inline: 16px !important; border-radius: 10px !important; font-size: .76rem !important; font-weight: 750 !important; }
.reference-shell-page .content-wrapper .btn-group { display: inline-flex; gap: 8px !important; }
.reference-shell-page .content-wrapper .btn-group > .btn,
.reference-shell-page .content-wrapper .btn-group > a { border-radius: 10px !important; }

/* Tabelas genericas: mesma densidade, cabecalho e estados da Agenda. */
.reference-shell-page .content-wrapper table.table:not(.planilha-table),
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: #40565d;
    font-size: .76rem;
}
.reference-shell-page .content-wrapper table.table:not(.planilha-table) thead th,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) thead th {
    height: 52px;
    padding: 0 18px;
    color: #71838a !important;
    background: #f7fbfa !important;
    border-bottom: 1px solid #dfe9e6 !important;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.reference-shell-page .content-wrapper table.table:not(.planilha-table) tbody td,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) tbody td {
    min-height: 70px;
    padding: 13px 18px;
    border-bottom: 1px solid #edf3f1 !important;
    vertical-align: middle;
    white-space: nowrap;
}
.reference-shell-page .content-wrapper table.table:not(.planilha-table) tbody tr:last-child td,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) tbody tr:last-child td { border-bottom: 0 !important; }
.reference-shell-page .content-wrapper table.table:not(.planilha-table) tbody tr:hover td,
.reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) tbody tr:hover td { background: #f8fcfb !important; }
.reference-shell-page .content-wrapper .table-responsive { overflow-x: auto; border-radius: inherit; }
.reference-shell-page .content-wrapper .card:has(> .card-body > .table-responsive > table),
.reference-shell-page .content-wrapper .card:has(> .table-responsive > table),
.reference-shell-page .content-wrapper .report-table-card {
    overflow: hidden;
    border: 1px solid #dfe9e6 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 22px rgba(27,64,75,.05) !important;
}
.reference-shell-page .content-wrapper .badge.bg-success { color: #1d6b59 !important; background: #e3f1ed !important; }
.reference-shell-page .content-wrapper .badge.bg-danger { color: #9b554d !important; background: #f7e5df !important; }
.reference-shell-page .content-wrapper .badge.bg-secondary { color: #62747a !important; background: #edf2f1 !important; }

@media (max-width: 760px) {
    .reference-shell-page .content-wrapper .btn-primary,
    .reference-shell-page .content-wrapper .btn-success,
    .reference-shell-page .content-wrapper .btn-action-primary,
    .reference-shell-page .content-wrapper .patients-new-button,
    .reference-shell-page .content-wrapper .agenda-new-button,
    .reference-shell-page .content-wrapper .records-new-button { min-height: 44px; }
    .reference-shell-page .content-wrapper table.table,
    .reference-shell-page .content-wrapper table:not(.agenda-reference-table):not(.patients-reference-table):not(.records-reference-table):not(.planilha-table) { min-width: 680px; }
}
.resource-link i { font-size: .62rem; transition: transform .2s ease; }
.resource-card:hover .resource-link i { transform: translateX(3px); }
@media (max-width: 1100px) { .resources-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .resources-page { padding: 22px 18px 40px; } .resources-hero { align-items: flex-start; flex-direction: column; padding: 24px; } .resources-progress { width: 100%; flex-basis: auto; } .resources-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .resources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .resources-heading { align-items: flex-start; flex-direction: column; } .resources-heading .btn { width: 100%; } .resources-grid { grid-template-columns: 1fr; } }
@media (max-width: 576px) {
    .modal-dialog, .modal-dialog.modal-lg, .modal-dialog.modal-xl { margin: .65rem; }
    .modal-header, .modern-header, .modern-view-header, .atendimento-header { min-height: 74px; padding: 17px 18px !important; }
    .modal-body, .modern-body, .modern-view-body { padding: 20px 18px !important; max-height: 70vh; }
    .modal-footer, .modern-footer, .modern-view-footer { align-items: stretch; flex-direction: column-reverse; padding: 13px 18px !important; }
    .modal-footer .btn, .modern-footer .btn, .modern-view-footer .btn { width: 100%; }
}
/* Agenda: remove o legado de alto contraste e tornar os controles realmente utilizáveis. */
.agenda-reference-page .agenda-reference-tabs .agenda-tab,
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active { color: #536a73 !important; background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active { color: #1d5c5c !important; font-weight: 800 !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active::after { height: 3px !important; background: #287c78 !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab:focus-visible { outline: 3px solid rgba(40,124,120,.22) !important; outline-offset: -3px; border-radius: 8px !important; }
.agenda-reference-page .agenda-range-button,
.agenda-reference-page .agenda-week-button { color: #536a73 !important; background: #fff !important; border: 1px solid #dfe9e6 !important; outline: 0 !important; box-shadow: 0 2px 8px rgba(27,64,75,.04) !important; }
.agenda-reference-page .agenda-range-button:focus-visible,
.agenda-reference-page .agenda-week-button:focus-visible { border-color: #7eb9ad !important; box-shadow: 0 0 0 3px rgba(40,124,120,.13) !important; }
.agenda-reference-page .agenda-range-button i:first-child { color: #287c78 !important; }
.agenda-reference-page .agenda-new-button { color: #fff !important; background: #287c78 !important; border: 0 !important; box-shadow: 0 8px 18px rgba(40,124,120,.18) !important; }
.agenda-reference-page .agenda-popover { position: absolute; z-index: 30; display: grid; gap: 12px; padding: 16px; border: 1px solid #dfe9e6; border-radius: 14px; background: #fff; box-shadow: 0 18px 40px rgba(27,64,75,.16); }
.agenda-reference-page .agenda-popover[hidden] { display: none; }
.agenda-reference-page .agenda-range-popover { top: 52px; right: 170px; width: 238px; }
.agenda-reference-page .agenda-view-popover { top: 52px; right: 96px; width: 160px; gap: 4px; }
.agenda-reference-page .agenda-popover strong { color: #203744; font-size: .75rem; }
.agenda-reference-page .agenda-popover label { display: grid; gap: 5px; color: #71838a; font-size: .66rem; font-weight: 700; }
.agenda-reference-page .agenda-popover input { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid #dfe9e6; border-radius: 8px; color: #203744; background: #fbfdfc; font-size: .72rem; }
.agenda-reference-page .agenda-popover > div { display: flex; justify-content: flex-end; gap: 7px; }
.agenda-reference-page .agenda-popover button { min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; font-size: .68rem; font-weight: 750; cursor: pointer; }
.agenda-reference-page .agenda-popover-clear { color: #536a73; background: #f1f6f4; }
.agenda-reference-page .agenda-popover-apply { color: #111 !important; background: linear-gradient(135deg,rgba(205,239,193,.9),rgba(151,214,187,.76)) !important; border:1px solid rgba(72,145,115,.5) !important; box-shadow:0 4px 10px rgba(58,125,100,.12) !important; }
.agenda-reference-page .agenda-view-popover button { color: #536a73; background: transparent; text-align: left; }
.agenda-reference-page .agenda-view-popover button:hover { color: #1d5c5c; background: #e3f1ed; }
@media (max-width: 700px) { .agenda-reference-page .agenda-range-popover, .agenda-reference-page .agenda-view-popover { top: auto; right: auto; left: 0; width: 100%; margin-top: 6px; } }
.auth-benefits { display: grid; gap: 9px; margin-top: 24px; }
.auth-benefits span { display: inline-flex; align-items: center; gap: 9px; color: rgba(255,255,255,.86); font-size: .75rem; }
.auth-benefits i { width: 22px; color: #dcefc4; text-align: center; }
.dashboard-empty-state { flex-direction: column; gap: 6px; }
.dashboard-empty-state strong { color: #203744; font-size: .92rem; }
.dashboard-empty-state span { color: #71838a; font-size: .76rem; }
.dashboard-empty-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 13px; color: #fff !important; background: #287c78; border-radius: 8px; font-size: .72rem; font-weight: 750; text-decoration: none; }
.dashboard-empty-cta:hover { color: #fff !important; background: #1d5c5c; }

.modal-content.modern-modal { border-radius: 18px !important; }
.modern-header { padding: 1.4rem 1.5rem !important; }
.modern-body { padding: 1.35rem 1.5rem !important; }
.modern-footer { padding: 1rem 1.5rem !important; background: #fbfbfe; border-top: 1px solid var(--ui-border); }
.section-title { color: var(--ui-ink); border-bottom-color: var(--ui-border) !important; }

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: radial-gradient(circle at 15% 10%, #dcefe9 0, transparent 36%), linear-gradient(135deg, #f6fbfa, #edf5f3) !important;
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(420px, 1.25fr);
    width: min(960px, 100%);
    min-height: 560px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe9e6;
    border-radius: 20px;
    box-shadow: 0 22px 60px rgba(27, 64, 75, .12);
}
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(155deg, #287c78 0%, #1d5c5c 100%);
}
.auth-aside::before, .auth-aside::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.auth-aside::before { width: 300px; height: 300px; right: -130px; top: -100px; }
.auth-aside::after { width: 240px; height: 240px; left: -130px; bottom: -90px; }
.auth-brand { position: absolute; top: 1.6rem; left: 2rem; display: flex; gap: .6rem; align-items: center; font-size: .84rem; font-weight: 750; }
.auth-brand i { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; }
.auth-art { position: absolute; inset: 28% 0 auto; display: grid; place-items: center; color: rgba(255,255,255,.75); font-size: 7rem; }
.auth-copy { position: relative; z-index: 1; }
.auth-copy h1 { max-width: 240px; margin: 0 0 .7rem; font-size: 1.85rem; line-height: 1.1; letter-spacing: -.05em; }
.auth-copy p { max-width: 250px; margin: 0; color: rgba(255,255,255,.78); font-size: .78rem; line-height: 1.65; }
.auth-form-card { display: flex; flex-direction: column; justify-content: center; max-width: none; border: 0; border-radius: 0; box-shadow: none; }
.auth-form-card .form-control, .auth-form-card .form-select { border-color:#dfe9e6; color:#203744; background:#fff; }
.auth-form-card .form-control:focus, .auth-form-card .form-select:focus { border-color:#7eb9ad; box-shadow:0 0 0 4px rgba(40,124,120,.12); }
.auth-form-card .form-floating > label { color:#71838a; }
.auth-form-card .form-floating > .form-control:focus ~ label, .auth-form-card .form-floating > .form-control:not(:placeholder-shown) ~ label, .auth-form-card .form-floating > .form-select:focus ~ label { color:#287c78; }
.auth-form-card .btn-login, .auth-form-card .btn-register { color:#fff; background:linear-gradient(135deg,#287c78,#1d5c5c)!important; border-color:transparent!important; box-shadow:0 10px 22px rgba(40,124,120,.18); }
.auth-form-card .btn-login:hover, .auth-form-card .btn-register:hover { background:linear-gradient(135deg,#328d87,#216b6b)!important; box-shadow:0 13px 26px rgba(40,124,120,.24); }
.auth-form-card .register-link a, .auth-form-card .login-link a { color:#287c78; }.auth-form-card .register-link a:hover, .auth-form-card .login-link a:hover { color:#1d5c5c; }
.auth-shell { width:min(1080px,100%); min-height:640px; border-radius:26px; box-shadow:0 28px 80px rgba(27,64,75,.16); }
.auth-aside { padding:3.2rem; background:linear-gradient(150deg,#1d5c5c 0%,#287c78 58%,#3c8d83 100%); }
.auth-aside::before { width:380px; height:380px; right:-170px; top:-145px; background:rgba(255,255,255,.07); }
.auth-aside::after { width:290px; height:290px; left:-165px; bottom:-120px; background:rgba(220,239,233,.1); }
.auth-brand { top:2rem; left:2.5rem; font-size:.95rem; letter-spacing:-.02em; }.auth-brand i { width:36px; height:36px; border-radius:11px; background:rgba(255,255,255,.12); }
.auth-art { inset:24% 0 auto; color:rgba(255,255,255,.9); font-size:8rem; text-shadow:0 14px 32px rgba(15,54,55,.2); }
.auth-copy h1 { max-width:300px; font-size:2.3rem; line-height:1.04; }.auth-copy p { max-width:310px; font-size:.82rem; }
.auth-form-card { justify-content:flex-start; padding-top:3.4rem; background:#fff; }
.auth-form-intro { padding:0 4rem; }.auth-form-intro .kicker { color:#287c78; }.auth-form-intro h2 { font-size:1.65rem; letter-spacing:-.05em; }.auth-form-intro p { font-size:.78rem; }
.auth-form-card .login-body, .auth-form-card .register-body { padding:2rem 4rem 3rem; }.auth-form-card .form-floating { margin-bottom:1.15rem; }
.auth-form-card .form-control, .auth-form-card .form-select { height:54px; min-height:54px; padding:1.15rem 1rem .3rem; border-radius:12px; background:#fbfdfc; font-size:.82rem; }
.auth-form-card .form-control:hover, .auth-form-card .form-select:hover { border-color:#b9d9d2; background:#fff; }.auth-form-card .form-floating > label { padding:.95rem 1rem; font-size:.78rem; }
.auth-form-card .btn-login, .auth-form-card .btn-register { height:52px; border-radius:12px; font-size:.82rem; letter-spacing:.01em; }
.auth-form-card .alert { border:1px solid #dfe9e6; border-radius:11px; color:#536a73; font-size:.75rem; }
.auth-form-card .register-link, .auth-form-card .login-link { font-size:.76rem; }.auth-benefits { gap:12px; margin-top:28px; }.auth-benefits span { font-size:.78rem; }
.auth-form-section-title { display:flex; align-items:center; gap:8px; margin:0 0 1rem; padding-bottom:.65rem; color:#287c78; border-bottom:1px solid #e2eeeb; font-size:.75rem; font-weight:800; }.auth-form-section-title i { display:grid; width:25px; height:25px; place-items:center; border-radius:8px; background:#e3f1ed; font-size:.65rem; }.auth-form-section-title small { margin-left:auto; color:#8a9b9d; font-size:.62rem; font-weight:600; }.auth-user-section-title { margin-top:1.55rem; }
@media (max-width:760px) { .auth-body { padding:0; }.auth-shell { display:block; width:100%; min-height:100vh; border:0; border-radius:0; }.auth-aside { min-height:265px; padding:2rem 1.5rem; }.auth-brand { top:1.4rem; left:1.5rem; }.auth-art { inset:20% 0 auto; font-size:5.3rem; }.auth-copy { display:none; }.auth-form-card { min-height:calc(100vh - 265px); padding-top:2.3rem; }.auth-form-intro { padding:0 1.5rem; }.auth-form-intro h2 { font-size:1.4rem; }.auth-form-card .login-body, .auth-form-card .register-body { padding:1.6rem 1.5rem 2.5rem; } }
@media (max-width:480px) { .auth-aside { min-height:220px; padding:1.5rem 1rem; }.auth-brand { top:1rem; left:1rem; font-size:.82rem; }.auth-brand i { width:32px; height:32px; }.auth-art { inset:25% 0 auto; font-size:4.2rem; }.auth-form-card { min-height:calc(100vh - 220px); padding-top:1.8rem; }.auth-form-intro, .auth-form-card .login-body, .auth-form-card .register-body { padding-left:1rem; padding-right:1rem; }.auth-form-intro h2 { font-size:1.25rem; }.auth-form-intro p { font-size:.72rem; }.auth-form-card .form-control, .auth-form-card .form-select { height:50px; min-height:50px; }.auth-form-card .btn-login, .auth-form-card .btn-register { height:50px; }.auth-form-card .row.g-3 { --bs-gutter-y:.35rem; }.auth-form-card .alert { font-size:.7rem; } }
.auth-form-intro { padding: 2.5rem 3.5rem 0; }
.auth-form-intro .kicker { color: var(--ui-primary); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-form-intro h2 { margin: .4rem 0 .35rem; color: var(--ui-ink); font-size: 1.25rem; letter-spacing: -.04em; }
.auth-form-intro p { margin: 0; color: var(--ui-muted); font-size: .73rem; }
.auth-form-card .login-header, .auth-form-card .register-header { display: none; }
.auth-form-card .login-body, .auth-form-card .register-body { padding: 1.7rem 3.5rem 2.8rem; }
.auth-form-card .form-floating { margin-bottom: 1rem; }
.auth-form-card .form-control, .auth-form-card .form-select { height: 48px; min-height: 48px; padding: 1rem .85rem .25rem; }
.auth-form-card .form-floating > label { padding: .8rem .85rem; font-size: .74rem; }
.auth-form-card .form-floating > .form-control:focus ~ label, .auth-form-card .form-floating > .form-control:not(:placeholder-shown) ~ label { transform: scale(.78) translateY(-.45rem) translateX(.3rem); }
.auth-form-card .btn-login, .auth-form-card .btn-register { height: 46px; padding: .65rem 1rem; font-size: .8rem; }
.auth-form-card .register-link, .auth-form-card .login-link { margin-top: 1rem; font-size: .73rem; }
.profile-avatar-wrap { position: relative; width: 116px; height: 116px; }
.profile-avatar { width: 116px; height: 116px; display: grid; place-items: center; overflow: hidden; border: 5px solid #f0eeff; border-radius: 50%; color: var(--ui-primary); background: var(--ui-primary-soft); font-size: 2.5rem; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: var(--ui-primary); cursor: pointer; font-size: .75rem; }
.profile-name { margin: 0; color: var(--ui-ink); font-size: 1.05rem; font-weight: 800; }
.profile-role { margin: .25rem 0 1.5rem; color: var(--ui-muted); font-size: .75rem; }
.profile-section-title { margin-bottom: 1rem; padding-bottom: .65rem; color: var(--ui-ink); border-bottom: 1px solid var(--ui-border); font-size: .85rem; font-weight: 800; }
.atendimento-modal { overflow: hidden; border: 0 !important; }
.atendimento-header { display: flex; justify-content: space-between; align-items: flex-start; color: #fff; background: linear-gradient(135deg, #6657e8, #4d3db8); }
.atendimento-header h5 { margin: 0 0 .25rem; font-weight: 800; }
.atendimento-header p { color: rgba(255,255,255,.75); font-size: .78rem; }
.atendimento-timer-card { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.4rem; border-radius: 14px; color: #fff; background: #25294d; }
.atendimento-label { display: block; margin-bottom: .25rem; color: rgba(255,255,255,.65); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.atendimento-timer-card strong { font-size: 2.2rem; letter-spacing: .04em; }
.atendimento-live { padding: .4rem .65rem; border-radius: 999px; color: #a9f4c9; background: rgba(57, 207, 128, .12); font-size: .7rem; font-weight: 800; }
.atendimento-live i { font-size: .45rem; }
.atendimento-panel { padding: 1rem; border: 1px solid var(--ui-border); border-radius: 13px; background: #fff; }
.atendimento-panel h6 { color: var(--ui-ink); font-size: .8rem; font-weight: 800; }

.patient-portal-page { min-height: 100vh; margin: 0; color: #25294d; background: linear-gradient(135deg, #f4f3ff 0%, #f7f8fc 55%, #eef7ff 100%) !important; font-family: Inter, system-ui, sans-serif; }
.patient-portal-card { width: min(430px, calc(100% - 32px)); margin: 8vh auto 0; padding: 38px; background: #fff; border: 1px solid #e7e8f1; border-radius: 18px; box-shadow: 0 18px 50px rgba(41,45,87,.1); }
.patient-portal-brand { display: flex; align-items: center; gap: 10px; color: #25294d; font-size: 1.05rem; }
.patient-portal-brand i { display: inline-grid; width: 34px; height: 34px; place-items: center; color: #fff; background: linear-gradient(145deg, #8677ff, #5a4bd2); border-radius: 10px; }
.patient-portal-card .eyebrow { margin-top: 34px; }
.patient-portal-card h1, .patient-portal-content h1 { margin: 7px 0 5px; color: #25294d; font-size: 1.7rem; letter-spacing: -.04em; }
.patient-portal-card p, .patient-portal-subtitle { margin: 0 0 25px; color: #7e849e; font-size: .84rem; }
.patient-portal-card label { display: block; margin: 16px 0; color: #59617e; font-size: .74rem; font-weight: 700; }
.patient-portal-card input { display: block; width: 100%; height: 46px; margin-top: 7px; padding: 0 13px; color: #25294d; border: 1px solid #e1e3ef; border-radius: 9px; outline: 0; font-size: .84rem; }
.patient-portal-card input:focus { border-color: #aaa0ff; box-shadow: 0 0 0 3px rgba(102,87,232,.12); }
.patient-portal-card button { width: 100%; height: 46px; margin-top: 9px; color: #fff; background: linear-gradient(135deg, #6657e8, #5143c6); border: 0; border-radius: 9px; font-size: .82rem; font-weight: 750; }
.patient-portal-card > a { display: block; margin-top: 20px; color: #6657e8; font-size: .75rem; text-align: center; text-decoration: none; }
.patient-portal-error { margin: 15px 0; padding: 11px 13px; color: #a64f5b; background: #fff0f2; border: 1px solid #ffd3d9; border-radius: 8px; font-size: .76rem; }
.patient-portal-home { padding: 0 !important; }
.patient-portal-top { display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100% - 1120px) / 2)); background: #fff; border-bottom: 1px solid #e7e8f1; }
.patient-portal-top a { color: #6657e8; font-size: .8rem; font-weight: 750; text-decoration: none; }
.patient-portal-content { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0; }
.patient-portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.patient-portal-panel { min-height: 220px; padding: 24px; background: #fff; border: 1px solid #e7e8f1; border-radius: 14px; box-shadow: 0 7px 20px rgba(41,45,87,.065); }
.patient-portal-panel-title { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f6; }
.patient-portal-panel-title i { color: #6657e8; font-size: 1rem; }
.patient-portal-panel-title h2 { margin: 0; color: #404568; font-size: .95rem; }
.patient-today-item { display: flex; min-height: 58px; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0f6; }
.patient-today-item strong { color: #404568; font-size: .85rem; }
.patient-today-item span { color: #3ca36d; background: #e4f7ec; border-radius: 999px; padding: 6px 10px; font-size: .65rem; font-weight: 750; }
.patient-portal-empty { padding: 60px 0; color: #9aa0b5; font-size: .8rem; text-align: center; }
@media (max-width: 700px) { .patient-portal-card { padding: 28px 22px; } .patient-portal-content { width: calc(100% - 32px); padding: 32px 0; } .patient-portal-grid { grid-template-columns: 1fr; } .patient-portal-top { padding: 0 16px; } }
.patient-portal-actions { display:flex; align-items:center; gap:18px; }
.patient-portal-actions a, .patient-today-item a { color:#6657e8; font-size:.78rem; font-weight:750; text-decoration:none; }
.patient-journal-form, .patient-preferences-form, .patient-scale-form { max-width:720px; display:grid; gap:16px; }
.patient-journal-form label, .patient-scale-form label { color:#59617e; font-size:.78rem; font-weight:700; }
.patient-journal-form input, .patient-journal-form select, .patient-journal-form textarea { display:block; width:100%; margin-top:7px; padding:12px; border:1px solid #e1e3ef; border-radius:9px; font:inherit; resize:vertical; }
.patient-journal-form button, .patient-preferences-form button, .patient-scale-form button { width:max-content; padding:12px 20px; color:#fff; background:#6657e8; border:0; border-radius:9px; font-weight:750; cursor:pointer; }
.patient-check, .patient-radio { display:flex !important; align-items:center; gap:9px; font-weight:600 !important; }
.patient-check input, .patient-radio input { width:auto !important; margin:0 !important; }
.patient-scale-form fieldset { padding:18px; border:1px solid #ececf4; border-radius:10px; }
.patient-scale-form legend { padding:0 5px; color:#404568; font-size:.9rem; font-weight:750; }
.patient-portal-dark { color:#ebedff; background:linear-gradient(135deg,#171a35,#242849) !important; }
.patient-portal-dark .patient-portal-top, .patient-portal-dark .patient-portal-panel { color:#ebedff; background:#252947; border-color:#3c4168; }
.patient-portal-dark .patient-portal-brand, .patient-portal-dark h1, .patient-portal-dark h2, .patient-portal-dark .patient-scale-form legend { color:#fff; }
@media (max-width:700px) { .patient-portal-actions { gap:8px; flex-wrap:wrap; justify-content:flex-end; } .patient-portal-actions a { font-size:.68rem; } }
.smart-notes-page { padding: 28px; }
.agenda-row-action.action-smart-notes { color:#6657e8; text-decoration:none; }
.smart-notes-page .section-heading h1 { margin: 5px 0; color:#25294d; font-size:1.65rem; }
.smart-notes-page .section-heading p { color:#7e849e; }
.smart-notes-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:24px; }
.smart-notes-card { padding:24px; }
.smart-notes-card h2 { display:flex; align-items:center; gap:10px; color:#3d4163; font-size:1rem; }
.smart-notes-card h2 i { color:#6657e8; }
.smart-notes-card textarea { display:block; width:100%; margin:8px 0 14px; padding:12px; border:1px solid #e1e3ef; border-radius:9px; resize:vertical; }
.smart-notes-card input[type=file] { display:block; max-width:100%; margin:15px 0; }
.smart-note-status { padding:10px 12px; color:#50607e; background:#f3f5ff; border-radius:8px; }
.smart-notes-draft { padding:15px; white-space:normal; color:#424663; background:#fafaff; border:1px solid #ececf5; border-radius:9px; }
@media (max-width:800px) { .smart-notes-page { padding:18px; } .smart-notes-grid { grid-template-columns:1fr; } }

/* Sistema visual editorial solicitado: monocromático + blocos pastel. */
:root {
  --figma-ink:#000; --figma-canvas:#fff; --figma-hairline:#e6e6e6; --figma-soft:#f7f7f5;
  --figma-lime:#dceeb1; --figma-lilac:#c5b0f4; --figma-cream:#f4ecd6; --figma-mint:#c8e6cd;
  --figma-pink:#efd4d4; --figma-coral:#f3c9b6; --figma-navy:#1f1d3d; --figma-magenta:#ff3d8b;
}
html, body { font-family: Inter, "figmaSans Fallback", system-ui, sans-serif; color:var(--figma-ink); background:var(--figma-canvas); font-feature-settings:"kern" 1; }
body { font-size:16px; }
h1,h2,h3,h4,h5,h6,p,span,a,label,button,input,textarea,select,td,th { text-shadow:none; }
.sidebar { background:var(--figma-ink) !important; border-right:0 !important; }
.sidebar-header { background:var(--figma-ink) !important; border-bottom:1px solid #292929 !important; }
.sidebar-brand, .sidebar .nav-link, .sidebar .nav-link i, .sidebar-footer, .sidebar-footer * { color:#fff !important; }
.sidebar .nav-link { border-radius:50px !important; margin:4px 12px !important; }
.sidebar .nav-link:hover { background:var(--figma-soft) !important; color:#000 !important; }
.sidebar .nav-link.active { background:var(--figma-lime) !important; color:#000 !important; }
.sidebar .nav-link.active i { color:#000 !important; }
#mainContent, .main-content { background:#fff !important; }
.topbar, .top-header, .page-header { background:#fff !important; border-bottom:1px solid var(--figma-hairline) !important; box-shadow:none !important; }
.dashboard-reference-shell, .agenda-reference-shell, .patients-reference-shell, .smart-notes-page { max-width:1280px; margin:0 auto; }
.dashboard-reference-heading h1, .agenda-reference-heading h1, .patients-reference-heading h1, .section-heading h1 { color:#000 !important; font-size:clamp(32px,4vw,64px) !important; font-weight:340 !important; line-height:1.1 !important; letter-spacing:-.96px !important; }
.dashboard-reference-heading p, .agenda-reference-heading p, .patients-reference-heading p, .section-heading p { color:#000 !important; font-size:18px !important; font-weight:330 !important; }
.reference-custom-page .eyebrow, .smart-notes-page .eyebrow, .patient-portal-page .eyebrow { color:#000 !important; font-family:"JetBrains Mono","figmaMono Fallback",monospace !important; font-size:12px !important; letter-spacing:.6px !important; font-weight:400 !important; text-transform:uppercase; }
.reference-custom-page .modern-card, .reference-custom-page .form-card, .reference-custom-page .card, .dashboard-reference-stat, .dashboard-reference-panel, .agenda-reference-table-card, .patient-portal-panel { background:#fff !important; border:1px solid var(--figma-hairline) !important; border-radius:24px !important; box-shadow:none !important; }
.dashboard-reference-stat { min-height:150px; padding:24px !important; }
.dashboard-reference-stat:nth-child(1) { background:var(--figma-lime) !important; }
.dashboard-reference-stat:nth-child(2) { background:var(--figma-lilac) !important; }
.dashboard-reference-stat:nth-child(3) { background:var(--figma-cream) !important; }
.dashboard-reference-stat:nth-child(4) { background:var(--figma-mint) !important; }
.dashboard-stat-label, .dashboard-reference-stat strong, .dashboard-reference-stat small, .dashboard-reference-stat a { color:#000 !important; }
.dashboard-stat-icon { background:#000 !important; color:#fff !important; border-radius:9999px !important; }
.dashboard-reference-panel { padding:24px !important; }
.dashboard-reference-panel-header { border-bottom:1px solid var(--figma-hairline-soft); }
.dashboard-reference-panel-header h2, .dashboard-reference-panel-header a { color:#000 !important; }
.dashboard-quick-action { border:0 !important; border-radius:50px !important; color:#000 !important; font-size:16px !important; font-weight:480 !important; }
.dashboard-quick-purple { background:var(--figma-lilac) !important; }.dashboard-quick-green { background:var(--figma-mint) !important; }.dashboard-quick-blue { background:var(--figma-cream) !important; }.dashboard-quick-orange { background:var(--figma-coral) !important; }
.reference-custom-page .dashboard-quick-action, .agenda-new-button, .agenda-range-button, .agenda-week-button { border-radius:50px !important; box-shadow:none !important; font-size:16px !important; font-weight:480 !important; }
.reference-custom-page .dashboard-quick-action, .agenda-new-button { color:#111 !important; background:linear-gradient(135deg,rgba(205,239,193,.86),rgba(151,214,187,.72)) !important; border-color:rgba(103,171,141,.5) !important; }
.reference-custom-page .dashboard-quick-action span { color:#111 !important; }
.reference-shell-page .btn:not(.btn-close) span,
.reference-shell-page button:not(.btn-close):not(.help-fab) span { color:#111 !important; }
.reference-shell-page .patients-new-button,
.reference-shell-page .patients-new-button span,
.reference-shell-page .patients-new-button i { color:#fff !important; }
.agenda-range-button, .agenda-week-button { color:#000 !important; background:#fff !important; border:1px solid var(--figma-hairline) !important; }
.reference-custom-page input, .reference-custom-page textarea, .reference-custom-page select, .reference-custom-page .form-control, .reference-custom-page .form-select { color:#000 !important; background:#fff !important; border:1px solid var(--figma-hairline) !important; border-radius:8px !important; box-shadow:none !important; min-height:44px; }
.reference-custom-page input:focus, .reference-custom-page textarea:focus, .reference-custom-page select:focus { border-color:#000 !important; box-shadow:0 0 0 3px rgba(0,0,0,.12) !important; }
.agenda-reference-tabs .agenda-tab, .nav-tabs .nav-link { border-radius:50px !important; color:#000 !important; background:#fff !important; }
.agenda-reference-tabs .agenda-tab.is-active, .nav-tabs .nav-link.active { color:#fff !important; background:#000 !important; }
.agenda-reference-table thead th, .patients-reference-table thead th { color:#000 !important; background:var(--figma-soft) !important; border-bottom:1px solid var(--figma-hairline) !important; }
.agenda-reference-table tbody tr, .patients-reference-table tbody tr { border-bottom:1px solid var(--figma-hairline-soft) !important; }
.reference-custom-page .badge, .agenda-status-badge, .status-badge { border-radius:50px !important; color:#000 !important; background:var(--figma-lime) !important; }
.color-block-section { background:var(--figma-lime); border-radius:24px; padding:48px; color:#000; }
.color-block-section-lilac { background:var(--figma-lilac); border-radius:24px; padding:48px; color:#000; }
.color-block-section-navy { background:var(--figma-navy); border-radius:24px; padding:48px; color:#fff; }
.promo-banner-lilac { background:var(--figma-lilac); color:#000; border-radius:8px; padding:16px 24px; }
.patient-portal-page { color:#000 !important; background:#fff !important; }
.patient-portal-card { border:1px solid var(--figma-hairline) !important; border-radius:24px !important; box-shadow:none !important; }
.patient-portal-card button, .patient-journal-form button, .patient-preferences-form button, .patient-scale-form button { color:#fff !important; background:#000 !important; border-radius:50px !important; }
.patient-portal-success { margin:15px 0; padding:11px 13px; color:#176b4d; background:#eaf8f1; border:1px solid #bfe8d3; border-radius:8px; font-size:.76rem; }
.patient-portal-help { margin:16px 0 0 !important; color:#777 !important; font-size:.72rem !important; text-align:center; }
@media (max-width:768px) { .dashboard-reference-shell, .agenda-reference-shell, .patients-reference-shell, .smart-notes-page { width:100%; } .dashboard-reference-heading h1, .agenda-reference-heading h1, .patients-reference-heading h1, .section-heading h1 { font-size:48px !important; } .color-block-section, .color-block-section-lilac, .color-block-section-navy { border-radius:0; padding:32px 24px; } }
.dashboard-advanced-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr); gap:24px; margin:0 0 28px; perspective:1200px; }
.dashboard-advanced-card { min-width:280px; min-height:310px; padding:24px; background:#fff; border:1px solid #e6e6e6; border-radius:24px; transform:rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transform-style:preserve-3d; transition:transform .18s ease, box-shadow .18s ease; box-shadow:12px 14px 0 rgba(31,29,61,.08); }
.dashboard-advanced-card:hover { box-shadow:18px 20px 0 rgba(31,29,61,.13); }
.dashboard-widget-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.dashboard-widget-header h2 { margin:4px 0 0; color:#000; font-size:24px; font-weight:540; letter-spacing:-.26px; }
.dashboard-widget-menu { width:40px; height:40px; padding:0; color:#000; background:#f7f7f5; border:0; border-radius:9999px !important; cursor:default; }
.dashboard-chart-wrap { position:relative; height:220px; min-height:160px; }
.dashboard-pie-wrap { height:240px; }
.dashboard-layout-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:-12px 0 24px; color:#000; font-family:"JetBrains Mono",monospace; font-size:12px; letter-spacing:.3px; }
.dashboard-layout-tools button { padding:8px 16px; color:#000; background:#fff; border:1px solid #e6e6e6; border-radius:9999px; font:inherit; cursor:pointer; }
.dashboard-resizable { resize:both; overflow:auto; }
@media (max-width:900px) { .dashboard-advanced-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .dashboard-layout-tools { align-items:flex-start; flex-direction:column; } .dashboard-advanced-card { min-height:280px; } }
.global-search { position:relative; width:min(360px,32vw); }
.global-search > i { position:absolute; top:14px; left:14px; color:#000; z-index:1; }
.global-search input { width:100%; height:42px; padding:0 14px 0 40px; border:1px solid #e6e6e6; border-radius:50px !important; background:#f7f7f5 !important; font-size:14px; }
.global-search-results { position:absolute; top:50px; right:0; left:0; z-index:20; display:none; padding:6px; background:#fff; border:1px solid #e6e6e6; border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,.1); }
.global-search-results.is-open { display:block; }
.global-search-results a { display:flex; flex-direction:column; gap:2px; padding:10px 12px; color:#000; border-radius:10px; text-decoration:none; }
.global-search-results a:hover { background:var(--figma-lime); }
.global-search-results small, .global-search-empty { color:#666; font-size:11px; }
@media (max-width:700px) { .global-search { width:min(230px,45vw); } .global-search input { font-size:12px; } }

/* Shell definitivo: navegação consistente e conteúdo aproveitando a área útil. */
.reference-shell-page .main-content,
.reference-shell-page .main-content.collapsed { margin-left: 204px !important; }
.reference-shell-page .top-bar > div:last-child,
.dashboard-reference-page .top-bar > div:last-child { display: flex !important; }
.reference-shell-page .topbar-title-group { min-width: 0; }
.reference-shell-page .topbar-actions { flex: 0 0 auto; }
.reference-shell-page .global-search { width: min(360px, 34vw); flex: 0 1 360px; }
.reference-shell-page .topbar-title-group h4 { white-space: nowrap; }
.dashboard-reference-shell,
.agenda-reference-shell,
.patients-reference-shell,
.records-reference-shell,
.record-detail-reference-shell,
.smart-notes-page { max-width: none !important; width: 100%; margin: 0 !important; }
.dashboard-reference-shell { padding: 32px 42px 52px; }
.dashboard-reference-heading { margin-bottom: 26px; }
.dashboard-reference-heading h1 { font-size: clamp(1.6rem, 2.2vw, 2.2rem); }
.dashboard-reference-stats { gap: 22px; margin-bottom: 26px; }
.dashboard-reference-bottom { gap: 22px; margin-bottom: 28px; }
.dashboard-advanced-grid { margin-top: 0; }
.dashboard-layout-tools { margin-bottom: 16px; }
.dashboard-reference-page .dashboard-advanced-card { min-height: 360px; }
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(1) { background: #dcefae !important; }
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(2) { background: #c7b1ef !important; }
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(3) { background: #f4ecd6 !important; }
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(4) { background: #c9e7cf !important; }
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(-n+4) .dashboard-stat-label,
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(-n+4) strong,
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(-n+4) small,
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(-n+4) a { color: #111 !important; }
.dashboard-reference-page .dashboard-reference-stats .dashboard-reference-stat:nth-child(-n+4) .dashboard-stat-icon { background: #000 !important; color: #fff !important; border-radius: 999px !important; }
.dashboard-reference-page .dashboard-advanced-grid { display: grid !important; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr) !important; gap: 24px !important; }
.dashboard-reference-page .dashboard-advanced-card { min-width: 0 !important; width: auto !important; height: 360px !important; max-height: none !important; }
.dashboard-reference-page .dashboard-advanced-card .dashboard-chart-wrap { min-height: 230px !important; height: auto !important; }
.dashboard-reference-page .dashboard-widget-header h2 { font-size: 1.25rem; }
.dashboard-advanced-grid { align-items: start; }
.dashboard-advanced-card { container-type: size; display: flex; width: 100%; max-width: 100%; min-width: 280px; min-height: 310px; max-height: calc(100vh - 230px); flex-direction: column; align-self: start; overflow: hidden; }
.dashboard-advanced-card .dashboard-widget-header { flex: 0 0 auto; min-width: 0; }
.dashboard-advanced-card .dashboard-widget-header > div { min-width: 0; }
.dashboard-advanced-card .dashboard-widget-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-advanced-card .dashboard-chart-wrap { width: 100%; min-height: 0; height: auto; flex: 1 1 auto; }
.dashboard-advanced-card .dashboard-chart-wrap canvas { display: block; width: 100% !important; height: 100% !important; max-width: 100%; }
@container (max-width: 520px) {
    .dashboard-advanced-card { padding: 16px; border-radius: 16px; }
    .dashboard-advanced-card .dashboard-widget-header { gap: 8px; margin-bottom: 10px; }
    .dashboard-advanced-card .dashboard-widget-header h2 { font-size: 1rem; }
    .dashboard-advanced-card .dashboard-widget-menu { width: 32px; height: 32px; flex: 0 0 32px; }
}
@container (max-height: 380px) {
    .dashboard-advanced-card { padding: 14px 16px; }
    .dashboard-advanced-card .dashboard-widget-header { margin-bottom: 6px; }
    .dashboard-advanced-card .eyebrow { margin-bottom: 0; font-size: 9px; }
    .dashboard-advanced-card .dashboard-widget-header h2 { margin-top: 1px; font-size: .92rem; }
}
.reports-page { width: 100%; padding: 32px 42px 52px; }
.reports-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 22px 0 28px; }
.report-card, .report-table-card { background: #fff; border: 1px solid var(--ui-border); border-radius: 16px; box-shadow: var(--ui-shadow); }
.report-card { display: flex; min-height: 142px; flex-direction: column; gap: 8px; padding: 22px; }
.report-card span { color: var(--ui-muted); font-size: .76rem; font-weight: 700; }
.report-card strong { color: var(--ui-ink); font-size: 1.65rem; }
.report-card a { margin-top: auto; color: var(--ui-primary); font-size: .72rem; font-weight: 700; text-decoration: none; }
.report-table-card { overflow: hidden; }
.report-table-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--ui-border); }
.report-table-card h3 { margin: 0; color: var(--ui-ink); font-size: 1.1rem; }
.report-table-card .table { font-size: .82rem; }
.report-table-card .table th { padding: 14px 24px; }
.report-table-card .table td { padding: 16px 24px; }
.reference-shell-page .btn-group { display: inline-flex; gap: 8px !important; }
.reference-shell-page .btn-group > .btn,
.reference-shell-page .btn-group > a { margin: 0 !important; border-radius: 9px !important; }
@media (max-width: 900px) {
    .reference-shell-page .global-search { width: min(280px, 42vw); }
    .dashboard-reference-shell, .reports-page { padding-inline: 22px; }
    .reports-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .reference-shell-page .top-bar { padding-inline: 16px !important; }
    .reference-shell-page .global-search { width: min(230px, 50vw); }
    .reference-shell-page .topbar-actions .text-muted { display: none !important; }
    .dashboard-reference-shell, .reports-page { padding-inline: 14px; }
    .reports-grid { grid-template-columns: 1fr; }
    .report-table-card > header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 992px) {
    .sidebar { width: 280px !important; }
    .main-content { margin-left: 0 !important; }
    .content-wrapper { padding: 1.35rem 1rem 2.5rem !important; }
    .top-bar { padding-inline: 1rem !important; }
}
@media (max-width: 700px) {
    .auth-shell { display: block; min-height: auto; }
    .auth-aside { min-height: 230px; padding: 1.65rem; }
    .auth-brand { top: 1rem; left: 1.4rem; }
    .auth-art { inset: 20% 0 auto; font-size: 4.5rem; }
    .auth-copy h1 { font-size: 1.45rem; }
    .auth-copy p { max-width: 300px; }
    .auth-form-intro { padding: 2rem 1.5rem 0; }
    .auth-form-card .login-body, .auth-form-card .register-body { padding: 1.35rem 1.5rem 2rem; }
    .dashboard-welcome { align-items: flex-start; flex-direction: column; }
}
/* Overrides finais da Agenda: neutraliza regras legadas de alto contraste. */
.agenda-reference-page .agenda-reference-toolbar { position: relative; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab,
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active { color: #536a73 !important; background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active { color: #1d5c5c !important; font-weight: 800 !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab.is-active::after { background: #287c78 !important; }
.agenda-reference-page .agenda-reference-tabs .agenda-tab:focus-visible { outline: 3px solid rgba(40,124,120,.22) !important; outline-offset: -3px; border-radius: 8px !important; }
.agenda-reference-page .agenda-range-button, .agenda-reference-page .agenda-week-button { color: #536a73 !important; background: #fff !important; border: 1px solid #dfe9e6 !important; outline: 0 !important; box-shadow: 0 2px 8px rgba(27,64,75,.04) !important; }
.agenda-reference-page .agenda-range-button:focus-visible, .agenda-reference-page .agenda-week-button:focus-visible { border-color: #7eb9ad !important; box-shadow: 0 0 0 3px rgba(40,124,120,.13) !important; }
.agenda-reference-page .agenda-new-button { color: #fff !important; background: #287c78 !important; border: 0 !important; }
.agenda-reference-page .agenda-range-popover { top: 52px; right: 170px; width: 238px; }
.agenda-reference-page .agenda-view-popover { top: 52px; right: 96px; width: 160px; gap: 4px; }
.agenda-reference-page .agenda-popover[hidden] { display: none !important; }
