:root {
    --color-primary: #1C6C82;
    --color-secondary: #89B2BD;
    --color-text-primary: #455154;
    --color-text-secondary: #828282;
    --color-text-light: #8F92A1;
    --color-border: #D4E3F0;
    --color-background: #F2F8FD;
    --color-white: #FFFFFF;
    --color-success: #4CAE57;
    --color-chart-bg: rgba(26, 78, 186, 0.06);
    
    --font-primary: 'DM Sans', sans-serif;
    --font-secondary: 'Nunito Sans', sans-serif;
    --font-tertiary: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}
/* Sidebar */
.sidebar {
    width: 293px;
    background-color: var(--color-white);
    border-radius: 20px;
    margin: 0;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

@media (max-width: 991.98px) {
    .sidebar {
        border-radius: 0;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar:not(.active) {
        display: none;
    }
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0) !important;
        display: flex !important;
    }
    
    .sidebar.d-none {
        display: flex !important;
    }
}

/* Overlay para fechar sidebar em mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (min-width: 992px) {
    .sidebar-overlay {
        display: none !important;
    }
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo-section {
    margin-bottom: 40px;
    padding: 29px 0;
}

.logo {
    width: 88px;
    height: 58px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-item {
    position: relative;
    text-decoration: none;
    color: var(--color-text-secondary);
    padding: 0;
    margin-bottom: 10px;
    display: block;
    transition: all 0.3s ease;
}

.nav-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 50px;
    background-color: transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-item.active .nav-bg,
.nav-item:hover .nav-bg {
    background-color: rgba(28, 108, 130, 0.1);
}

.nav-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px 12px;
    z-index: 1;
}

.nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-item span {
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.364em;
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-item.active .nav-icon {
    filter: brightness(0) saturate(100%) invert(38%) sepia(79%) saturate(1248%) hue-rotate(150deg) brightness(92%) contrast(88%);
}

.logout-section {
    margin-top: auto;
    padding-top: 20px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.75px;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: var(--color-primary);
}

.logout-icon {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 293px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-left: 310px;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 20px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .dashboard-header {
        margin-left: 0;
        padding: 0 15px;
        margin-top: 15px;
    }
}

.header-left {
    flex: 1;
}

.welcome-title {
    font-family: var(--font-tertiary);
    font-size: 23px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.welcome-subtitle {
    font-family: var(--font-tertiary);
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-light);
    line-height: 1.5em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--color-white);
    border-radius: 7px;
    padding: 8px 16px;
    gap: 8px;
    min-width: 200px;
}

.search-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.search-input {
    border: none;
    outline: none;
    font-family: var(--font-secondary);
    font-size: 14px;
    color: var(--color-text-primary);
    flex: 1;
    background: transparent;
}

.search-input::placeholder {
    color: #A5A3A9;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.bell-icon {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #FF0000;
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 6px;
    font-weight: 700;
    width: 12px;
    height: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #F7FBFF;
    border-radius: 15px;
    padding-right: 10px;
    min-width: 150px;
}

.user-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-family: var(--font-secondary);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 8px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #A3AED0;
    justify-content: center;
}

.user-separator {
    color: #A3AED0;
}

/* Stats Section */
.stats-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 35px 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
    min-width: 237px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-icon-wrapper {
    width: 46px;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    width: 24px;
    height: 24px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-family: var(--font-secondary);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    letter-spacing: -0.019em;
}

.stat-label {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    letter-spacing: -0.028em;
}

.stat-badge {
    background: linear-gradient(146deg, rgba(251, 251, 255, 1) 0%, rgba(255, 255, 255, 0.83) 100%);
    border-radius: 6px;
    padding: 4px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0px 7px 15px rgba(204, 204, 204, 1);
    backdrop-filter: blur(6px);
    height: fit-content;
    margin-top: auto;
}

.badge-dot {
    width: 3px;
    height: 3px;
    background-color: var(--color-success);
    border-radius: 50%;
}

.stat-badge span {
    font-family: var(--font-tertiary);
    font-size: 6px;
    font-weight: 400;
    color: #6F6C99;
}

/* Chart Section */
.chart-section {
    margin-bottom: 30px;
}

.chart-card {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.chart-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    padding: 6px 26px;
    font-family: var(--font-secondary);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
}

.filter-icon {
    width: 6px;
    height: 4px;
}

.chart-container {
    height: 200px;
    margin-bottom: 20px;
}

.chart-legend {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-secondary);
    font-size: 7px;
    font-weight: 500;
    color: #6F6C99;
    letter-spacing: 0.04em;
}

.legend-dot {
    width: 5px;
    height: 5px;
    background-color: var(--color-success);
    border-radius: 50%;
}

/* Appointments Section */
.appointments-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.appointments-left,
.appointments-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Date Picker */
.date-picker-card {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 21px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.date-picker {
    text-align: center;
}

.week-days {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 3px;
}

.week-day {
    font-family: var(--font-secondary);
    font-size: 13px;
    font-weight: 500;
    color: #93B0C8;
    flex: 1;
}

.week-day.active {
    color: var(--color-primary);
}

.month-days {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    position: relative;
}

.month-days::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 83px;
    width: 41px;
    height: 74px;
    background-color: rgba(63, 189, 241, 0.1);
    border-radius: 20px;
    z-index: 0;
}

.day {
    font-family: var(--font-secondary);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-secondary);
    padding: 10px;
    position: relative;
    z-index: 1;
}

.day.active {
    color: var(--color-primary);
}

.day.active::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--color-success);
    border-radius: 50%;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.month-name {
    font-family: var(--font-secondary);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-align: left;
    padding-left: 2px;
}

/* Appointments List */
.appointments-list {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.appointment-item {
    display: flex;
    gap: 11px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.appointment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.appointment-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.icon-bg {
    width: 100%;
    height: 100%;
    background-color: rgba(113, 221, 177, 0.11);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appointment-content {
    flex: 1;
}

.appointment-type {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 500;
    color: #858585;
    margin-bottom: 4px;
}

.appointment-patient {
    font-family: var(--font-secondary);
    font-size: 12px;
    font-weight: 400;
    color: #858585;
    margin-bottom: 4px;
}

.appointment-time {
    font-family: var(--font-tertiary);
    font-size: 10px;
    font-weight: 300;
    color: #9E9E9E;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 10px;
    padding: 30px 29px;
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    background-color: #155a6f;
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
}

.action-icon {
    width: 21px;
    height: 21px;
}

/* Recent Patients */
.recent-patients {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.patient-card {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.patient-card:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.patient-icon {
    width: 51px;
    height: 45px;
    flex-shrink: 0;
}

.icon-bg-blue {
    width: 100%;
    height: 100%;
    background-color: #EEF7FE;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.patient-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.patient-name {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    text-align: center;
}

.patient-specialty {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-align: center;
}

/* Responsividade */
@media (max-width: 1200px) {
    .appointments-section {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        flex-wrap: wrap;
    }
    
    .patients-section-wrapper {
        grid-template-columns: 1fr;
    }
    
    .side-panel {
        order: -1;
    }
}

@media (max-width: 991.98px) {
    .header-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .page-title-main {
        font-size: 22px;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-profile {
        padding: 6px 10px;
    }
    
    .profile-info {
        display: none;
    }
    
    .profile-avatar {
        width: 36px;
        height: 36px;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-card {
        width: 100%;
        min-width: 100%;
        padding: 25px 20px;
    }
    
    .chart-card,
    .graph-card {
        padding: 15px;
    }
    
    .chart-container,
    .graph-container {
        height: 180px;
    }
    
    .appointments-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .appointments-list {
        padding: 20px 15px;
    }
    
    .action-btn {
        padding: 20px;
        font-size: 14px;
    }
    
    .patients-section-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .side-panel {
        order: -1;
    }
    
    .table-header-frame {
        gap: 15px;
        overflow-x: auto;
        width: 100%;
    }
    
    .patient-card-frame {
        width: 100%;
    }
    
    .patient-data-frame {
        gap: 10px;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-left {
        width: 100%;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .page-title-main {
        font-size: 20px;
    }
    
    .main-content {
        padding: 0;
    }
    
    .main-content > .p-3 {
        padding: 15px !important;
    }
    
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .row.g-3 > [class*="col-"] {
        margin-bottom: 15px;
    }
    
    .stats-section {
        gap: 12px;
    }
    
    .stat-card {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .stat-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .chart-header,
    .graph-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .chart-container,
    .graph-container {
        height: 200px;
    }
    
    .appointment-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .appointment-content {
        width: 100%;
    }
    
    .action-btn {
        padding: 18px;
        font-size: 14px;
    }
    
    .patient-card-frame {
        height: auto;
        min-height: 60px;
        padding: 10px 0;
    }
    
    .patient-card-inner {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        height: auto;
        margin-bottom: 8px;
    }
    
    .patient-data-frame {
        position: relative;
        left: auto;
        top: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 0 15px;
    }
    
    .patient-cell {
        font-size: 13px;
    }
    
    .patient-code {
        font-size: 16px;
        font-weight: 700;
    }
    
    .table-header-frame {
        display: none;
    }
    
    .header-cell,
    .patient-cell {
        font-size: 12px;
    }
    
    /* Formulários responsivos */
    .form-floating {
        margin-bottom: 15px;
    }
    
    .text-end {
        text-align: left !important;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .page-title-main {
        font-size: 18px;
    }
    
    .stat-card {
        padding: 18px 12px;
    }
    
    .chart-card,
    .graph-card,
    .appointments-list {
        padding: 15px 12px;
    }
    
    .section-title {
        font-size: 14px;
    }
    
    .action-btn {
        padding: 15px;
        font-size: 13px;
    }
    
    .profile-dropdown {
        right: -10px;
    }
    
    /* Ajustes adicionais para telas muito pequenas */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .card-body {
        padding: 12px !important;
    }
    
    h5.fw-semibold {
        font-size: 16px;
    }
    
    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .btn-sm {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Página de Pacientes - Estilos Exatos do Figma */

.page-title {
    font-family: var(--font-tertiary);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-light);
    margin: 0;
}

/* Graph Section */
.graph-section {
    margin-bottom: 30px;
}

.graph-card {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.graph-title {
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.graph-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-chart-bg);
    border-radius: 6px;
    padding: 6px 26px;
    font-family: var(--font-secondary);
    font-size: 7px;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
    cursor: pointer;
}

.filter-icon {
    width: 6px;
    height: 4px;
}

.graph-container {
    height: 200px;
    margin-bottom: 20px;
}

.graph-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.stat-badge-small {
    background: linear-gradient(146deg, rgba(251, 251, 255, 1) 0%, rgba(255, 255, 255, 0.83) 100%);
    border-radius: 6px;
    padding: 4px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0px 7px 15px rgba(204, 204, 204, 1);
    backdrop-filter: blur(6px);
}

.stat-badge-small span {
    font-family: var(--font-tertiary);
    font-size: 6px;
    font-weight: 400;
    color: #6F6C99;
}

/* Patients Section Wrapper */
.patients-section-wrapper {
    display: grid;
    grid-template-columns: 1fr 307px;
    gap: 20px;
}

.patients-main-section {
    display: flex;
    flex-direction: column;
}

/* Table Header Frame - Exatamente como no Figma */
.table-header-frame {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 80px;
    margin-bottom: 20px;
    padding: 0;
    width: fit-content;
}

.header-cell {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    letter-spacing: -0.028em;
    text-align: center;
    line-height: 1.364em;
}

.header-cod {
    width: 33px;
}

.header-nome {
    width: 99px;
}

.header-data {
    width: 89px;
}

.header-sexo {
    width: 32px;
}

.header-urgencia {
    width: 60px;
}

/* Patients List Frame - Exatamente como no Figma */
.patients-list-frame {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.patient-card-frame {
    position: relative;
    width: 100%;
    height: 49px;
    background-color: var(--color-white);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.patient-card-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.patient-card-frame.selected {
    background-color: rgba(242, 248, 253, 0.69);
}

.patient-card-inner {
    position: absolute;
    left: 16px;
    top: 6px;
    width: 36.52px;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.patient-icon {
    width: 17px;
    height: 15px;
    background-color: var(--color-primary);
    border-radius: 4px;
}

.patient-data-frame {
    position: absolute;
    left: 69px;
    top: 11px;
    display: flex;
    align-items: center;
}

.patient-cell {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    letter-spacing: -0.028em;
    line-height: 1.364em;
    white-space: nowrap;
}

.patient-code {
    width: 37px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.019em;
    text-align: left;
}

.patient-name {
    width: 148px;
    text-align: left;
}

.patient-birthdate {
    width: 73px;
    text-align: center;
}

.patient-gender {
    width: 61px;
    text-align: center;
}

.patient-urgency {
    width: 30px;
    text-align: center;
}

/* Side Panel */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* New Patient Button */
.new-patient-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 7px;
    padding: 14px 20px;
    font-family: var(--font-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 45px;
}

.new-patient-btn:hover {
    background-color: #155a6f;
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(28, 108, 130, 0.3);
}

.btn-icon {
    width: 15px;
    height: 15px;
}

/* Calendar Card */
.calendar-card {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 21px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar {
    text-align: center;
}

.week-days {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 3px;
}

.week-day {
    font-family: var(--font-secondary);
    font-size: 13px;
    font-weight: 500;
    color: #93B0C8;
    flex: 1;
}

.week-day.active {
    color: var(--color-primary);
}

.month-days {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    position: relative;
}

.month-days::before {
    content: '';
    position: absolute;
    top: 20.78px;
    left: 83px;
    width: 41px;
    height: 73.22px;
    background-color: rgba(63, 189, 241, 0.1);
    border-radius: 20px;
    z-index: 0;
}

.day {
    font-family: var(--font-secondary);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-secondary);
    padding: 10px;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.day.active {
    color: var(--color-primary);
}

.day.active::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--color-success);
    border-radius: 50%;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.month-name {
    font-family: var(--font-secondary);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-align: left;
    padding-left: 2px;
}

/* Appointments Sidebar */
.appointments-sidebar {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.appointment-item-sidebar {
    display: flex;
    gap: 11px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.appointment-item-sidebar:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.appointment-icon-sidebar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.icon-bg-sidebar {
    width: 100%;
    height: 100%;
    background-color: rgba(113, 221, 177, 0.11);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appointment-content-sidebar {
    flex: 1;
}

.appointment-type {
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 500;
    color: #858585;
    margin-bottom: 4px;
}

.appointment-patient {
    font-family: var(--font-secondary);
    font-size: 12px;
    font-weight: 400;
    color: #858585;
    margin-bottom: 4px;
}

.appointment-time {
    font-family: var(--font-tertiary);
    font-size: 10px;
    font-weight: 300;
    color: #9E9E9E;
}

.no-patients {
    background-color: var(--color-white);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 14px;
    color: var(--color-text-secondary);
}


.custom-pagination {
    margin-top: 20px;
}

/* Lista de paginação */
.custom-pagination .pagination {
    gap: 6px;
}

/* Botões */
.custom-pagination .page-item .page-link {
    border: 1px solid #dcdcdc;
    background: #ffffff;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px !important;
    color: #495057;
    transition: all .2s ease-in-out;
}

/* Hover */
.custom-pagination .page-item .page-link:hover {
    background: #f8f9fa;
    border-color: #b3b3b3;
    text-decoration: none;
}

/* Ativo */
.custom-pagination .page-item.active .page-link {
    background: #0d6efd;
    color: #fff !important;
    border-color: #0d6efd;
}

/* Desabilitado */
.custom-pagination .page-item.disabled .page-link {
    background: #e9ecef;
    border-color: #dcdcdc;
    color: #9e9e9e;
    cursor: not-allowed;
}

/* New header layout */
.improved-header {
    align-items: center !important;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    margin-left: 310px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .improved-header {
        margin-left: 0;
        padding: 10px 15px;
        margin-bottom: 15px;
    }
}

/* Botão hamburger para mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-primary);
    cursor: pointer;
    padding: 8px;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 991.98px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Page title + breadcrumb */
.page-title-main {
    font-family: var(--font-tertiary);
    font-size: 26px;
    font-weight: 600;
    color: var(--color-primary);
}

.breadcrumb {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Search compact style */
.header-search {
    min-width: 220px;
    box-shadow: 0 0 8px rgba(0,0,0,0.06);
}

/* Profile dropdown */
.header-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-white);
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: .2s;
}

.header-profile:hover {
    background: var(--color-background);
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.profile-role {
    font-size: 11px;
    color: var(--color-text-light);
}

/* Dropdown menu */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 52px;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
}

.profile-dropdown a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 14px;
}

.profile-dropdown a:hover {
    background: var(--color-background);
}

/* Hover to show dropdown */
.header-profile:hover .profile-dropdown {
    display: block;
}

.btn {
    z-index:999;
}

.form-chat-fixed {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
    z-index: 10;
    border-radius: 1rem;
}

.anamnese-body {
    position: relative !important;
    overflow-y: auto !important;
    height: 750px !important;
}

@media(max-width: 991.98px){
    .form-chat-fixed {
        left: 0;
    }
}

.espacamento{
    height: 100px;
}
@media(max-width: 991.98px){
    .espacamento {
        height: 200px;
    }
}