/* Estilos globais para flat design */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #34495e; /* Wet Asphalt */
}

/* Estilos para o formulário de agendamento front-end */
.agendamento-medico-form-wrapper {
    background-color: #ffffff; /* White */
    border: 1px solid #bdc3c7; /* Silver */
    padding: 25px;
    border-radius: 6px;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.agendamento-medico-form-wrapper:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.agendamento-medico-form-wrapper h2 {
    text-align: center;
    color: #3498db; /* Peter River */
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 600;
}

.agendamento-medico-form-wrapper p {
    margin-bottom: 18px;
}

.agendamento-medico-form-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e; /* Wet Asphalt */
    font-size: 0.95em;
}

.agendamento-medico-form-wrapper input[type="text"],
.agendamento-medico-form-wrapper input[type="email"],
.agendamento-medico-form-wrapper input[type="date"],
.agendamento-medico-form-wrapper input[type="datetime-local"],
.agendamento-medico-form-wrapper input[type="number"],
.agendamento-medico-form-wrapper select,
.agendamento-medico-form-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #bdc3c7; /* Silver */
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    color: #34495e;
    background-color: #ecf0f1; /* Clouds */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.agendamento-medico-form-wrapper input[type="text"]:focus,
.agendamento-medico-form-wrapper input[type="email"]:focus,
.agendamento-medico-form-wrapper input[type="date"]:focus,
.agendamento-medico-form-wrapper input[type="datetime-local"]:focus,
.agendamento-medico-form-wrapper input[type="number"]:focus,
.agendamento-medico-form-wrapper select:focus,
.agendamento-medico-form-wrapper textarea:focus {
    border-color: #3498db; /* Peter River */
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.agendamento-medico-form-wrapper input[type="submit"] {
    background-color: #2ecc71; /* Emerald */
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: auto;
    display: block;
    margin: 25px auto 0 auto;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.agendamento-medico-form-wrapper input[type="submit"]:hover {
    background-color: #27ae60; /* Nephritis */
    transform: translateY(-1px);
}

.agendamento-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 1em;
    font-weight: 500;
}

.agendamento-message p {
    margin: 0;
}

.agendamento-message p[style*="green"] {
    background-color: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.agendamento-message p[style*="red"] {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

/* Estilos para o painel administrativo */
.agendamento-medico-admin-dashboard {
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #ecf0f1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 20px;
    border-radius: 6px;
}

.agendamento-medico-admin-dashboard h1 {
    color: #3498db;
    font-size: 2.2em;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.agendamento-medico-admin-dashboard p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #34495e;
}

/* Estilos para as meta boxes */
.postbox .inside {
    padding: 15px 20px;
}

.postbox .inside label {
    font-weight: 500;
    margin-bottom: 7px;
    display: block;
    color: #34495e;
    font-size: 0.95em;
}

.postbox .inside input[type="text"],
.postbox .inside input[type="email"],
.postbox .inside input[type="date"],
.postbox .inside input[type="datetime-local"],
.postbox .inside input[type="number"],
.postbox .inside select,
.postbox .inside textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 5px;
    margin-bottom: 15px;
    background-color: #ecf0f1;
    color: #34495e;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.postbox .inside input[type="text"]:focus,
.postbox .inside input[type="email"]:focus,
.postbox .inside input[type="date"]:focus,
.postbox .inside input[type="datetime-local"]:focus,
.postbox .inside input[type="number"]:focus,
.postbox .inside select:focus,
.postbox .inside textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.postbox .inside select {
    height: 40px;
}

.postbox .inside textarea {
    min-height: 100px;
    resize: vertical;
}

/* Estilos para a página de configurações */
.form-table th {
    padding-left: 0;
    width: 250px;
}

.form-table td {
    padding-bottom: 20px;
}

.form-table input[type="number"] {
    max-width: 100px;
    text-align: center;
}

.submit .button-primary {
    background-color: #3498db; /* Peter River */
    border-color: #3498db;
    box-shadow: none;
    text-shadow: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.submit .button-primary:hover,
.submit .button-primary:focus {
    background-color: #2980b9; /* Belize Hole */
    border-color: #2980b9;
}

/* Estilos para filtros de lista (admin) */
.tablenav .actions select {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    background-color: #ecf0f1;
    color: #34495e;
}

.tablenav .actions input[type="search"] {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    background-color: #ecf0f1;
    color: #34495e;
}



/* Responsividade */
@media (max-width: 768px) {
    .agendamento-medico-form-wrapper {
        margin: 20px 10px;
        padding: 15px;
    }

    .agendamento-medico-form-wrapper h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .agendamento-medico-form-wrapper input[type="submit"] {
        padding: 10px 20px;
        font-size: 1em;
    }

    .postbox .inside input[type="text"],
    .postbox .inside input[type="email"],
    .postbox .inside input[type="date"],
    .postbox .inside input[type="datetime-local"],
    .postbox .inside input[type="number"],
    .postbox .inside select,
    .postbox .inside textarea {
        font-size: 0.9em;
    }

    .form-table th, .form-table td {
        display: block;
        width: 100%;
        padding: 5px 0;
    }

    .form-table th {
        font-weight: bold;
    }
}



/* Estilos para a Página de Finanças */
.agendamento-medico-admin-dashboard .kpi-section {
    grid-column: 1 / -1; /* Ocupa toda a largura */
    padding: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 20px;
}

.agendamento-medico-admin-dashboard .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.agendamento-medico-admin-dashboard .kpi-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.agendamento-medico-admin-dashboard .kpi-box .kpi-label {
    display: block;
    font-size: 13px;
    color: #646970;
    margin-bottom: 5px;
}

.agendamento-medico-admin-dashboard .kpi-box .kpi-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #2271b1;
}

.agendamento-medico-admin-dashboard .chart-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 0;
}

.agendamento-medico-admin-dashboard .full-width {
    grid-column: 1 / -1;
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap .list-column {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap h4 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap li {
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
    font-size: 13px;
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap li:last-child {
    border-bottom: none;
}

.agendamento-medico-admin-dashboard .transaction-tag {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 5px;
}

.agendamento-medico-admin-dashboard .entry-tag {
    background-color: #d9edf7;
    color: #31708f;
}

.agendamento-medico-admin-dashboard .expense-tag {
    background-color: #f2dede;
    color: #a94442;
}

.agendamento-medico-admin-dashboard .finances-actions-bar {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agendamento-medico-admin-dashboard .finances-actions-bar .postform {
    padding: 5px 8px;
    height: 30px;
}

/* Estilos para o Dashboard Administrativo */
.agendamento-medico-admin-dashboard {
    padding: 20px;
    background-color: #f9fbfd; /* Light background for the dashboard area */
    border: 1px solid #e0e6ed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    margin-top: 20px;
    border-radius: 8px;
}

.agendamento-medico-admin-dashboard h1 {
    color: #2c3e50; /* Darker blue-gray for headings */
    font-size: 2.4em;
    margin-bottom: 25px;
    border-bottom: 2px solid #dfe4e8;
    padding-bottom: 15px;
    text-align: center;
}

.agendamento-medico-admin-dashboard > p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #7f8c8d; /* Gray for descriptive text */
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-widgets-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1200px; /* Limita a largura máxima do contêiner para 4 colunas */
    margin-left: auto;
    margin-right: auto;
    gap: 25px;
    margin-top: 20px;
}

.dashboard-widget-section {
    background-color: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    padding: 20px;
    transition: all 0.3s ease;
}

.dashboard-widget-section:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.dashboard-widget-section h3 {
    color: #3498db; /* Peter River */
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.dashboard-widget-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-widget-section ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f7;
    color: #555;
    font-size: 0.95em;
}

.dashboard-widget-section ul li:last-child {
    border-bottom: none;
}

.dashboard-widget-section ul li strong {
    color: #2c3e50;
}

.consultas-hoje-list li {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f0f4f7;
}

.consultas-hoje-list li:last-child {
    border-bottom: none;
}

.consultas-hoje-list li strong {
    font-size: 1.1em;
    color: #34495e;
    margin-bottom: 5px;
}

.consultas-hoje-list li small {
    color: #7f8c8d;
    font-size: 0.85em;
}

/* Cores de status para consultas */
.consultas-hoje-list li span.status-pendente {
    color: #f39c12; /* Orange */
}
.consultas-hoje-list li span.status-confirmado {
    color: #2ecc71; /* Emerald */
}
.consultas-hoje-list li span.status-realizado {
    color: #2980b9; /* Belize Hole */
}
.consultas-hoje-list li span.status-cancelado {
    color: #e74c3c; /* Alizarin */
}

/* Responsividade para o dashboard */
@media (max-width: 992px) {
    .dashboard-widgets-wrap {
        grid-template-columns: 1fr;
    }
}



.dashboard-widget-section.chart-container {
    height: 350px; /* Altura fixa para os contêineres dos gráficos */
    display: flex;
    flex-direction: column;
}

.dashboard-widget-section.chart-container canvas {
    flex-grow: 1;
    max-height: calc(100% - 40px); /* Ajusta a altura máxima do canvas dentro do contêiner */
}

/* Ajustes para 4 colunas em telas maiores */
@media (min-width: 1200px) {
    .dashboard-widgets-wrap {
        grid-template-columns: repeat(4, 1fr); /* Força 4 colunas em telas grandes */
    }
}

/* Ajustes para telas menores, garantindo que os gráficos não fiquem muito pequenos */
@media (max-width: 768px) {
    .dashboard-widget-section.chart-container {
        height: 300px; /* Altura ligeiramente menor em dispositivos móveis */
    }
}

/* Ajuste de fonte para títulos de gráficos */
.dashboard-widget-section h3 {
    font-size: 1.2em; /* Reduz o tamanho da fonte para caber melhor */
}



.dashboard-widget-section canvas {
    height: 100% !important;
    width: 100% !important;
}



.chart-canvas-wrapper {
    position: relative;
    height: 300px; /* Altura fixa para o contêiner do canvas */
    width: 100%;
    margin: auto;
}

.chart-canvas-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}



/* Estilos para o novo Dashboard de Finanças */

.agendamento-medico-admin-dashboard .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Mais colunas para os novos KPIs */
    gap: 15px;
}

.agendamento-medico-admin-dashboard .kpi-box {
    background: #fff;
    border: 1px solid #e0e6ed;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-left: 5px solid #0073aa; /* Cor padrão */
    text-align: left;
}

.agendamento-medico-admin-dashboard .kpi-box.highlight {
    border-left-color: #d54e21; /* Cor de destaque para Lucro e Margem */
}

.agendamento-medico-admin-dashboard .kpi-box .kpi-label {
    font-size: 12px;
    color: #646970;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.agendamento-medico-admin-dashboard .kpi-box .kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.agendamento-medico-admin-dashboard .kpi-box .kpi-value.negative-profit {
    color: #dc3232; /* Vermelho para lucro negativo */
}

.agendamento-medico-admin-dashboard .cash-flow-box {
    border-left-color: #46b450 !important; /* Cor para Fluxo de Caixa */
    grid-column: 1 / -1; /* Ocupa toda a largura */
    margin-top: 5px;
}

.agendamento-medico-admin-dashboard .chart-container {
    grid-column: 1 / -1; /* Gráficos ocupam toda a largura */
    margin-bottom: 20px;
}

.agendamento-medico-admin-dashboard .chart-container h3 {
    text-align: center;
}

.agendamento-medico-admin-dashboard .transaction-lists-wrap {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

