/* 
   Personal Control - Responsive CSS
   Estilos responsivos para o sistema
*/

/* Layout Responsivo Geral */
@media (max-width: 1199px) {
    .content-wrapper {
        padding: 1.5rem;
    }

    .sidebar {
        width: 250px;
    }

    .main-content {
        margin-left: 250px;
    }

    .main-content.expanded {
        margin-left: 60px;
    }
}

@media (max-width: 991px) {
    .sidebar {
        width: 60px;
        z-index: 1050;
    }

    .sidebar .logo-text,
    .sidebar .profile-info,
    .sidebar-nav a span,
    .sidebar-footer a span {
        display: none;
    }

    .sidebar-nav a i {
        font-size: 1.5rem;
    }

    .sidebar-nav a .badge {
        position: absolute;
        top: 10px;
        right: 5px;
    }

    .main-content {
        margin-left: 60px;
    }

    .top-bar {
        padding: 0.75rem 1rem;
    }

    .search-container {
        flex: 0 0 300px;
    }

    .btn-action span {
        display: none;
    }

    .btn-action i {
        margin-right: 0;
    }

    .quick-actions {
        gap: 0.5rem;
    }
}

@media (max-width: 767px) {
    .content-wrapper {
        padding: 1rem;
    }

    .top-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-container {
        flex: 1;
        width: 100%;
    }

    .top-bar-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-input {
        width: 100%;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .date-info {
        margin-top: 1rem;
        align-items: center;
    }

    .kpi-card {
        margin-bottom: 1rem;
    }

    .chart-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 575px) {
    .btn-filter {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .view-options {
        margin-top: 1rem;
    }

    .client-card {
        margin-bottom: 1rem;
    }
}

/* Estilos específicos para a página de mensagens */
@media (max-width: 991px) {
    .chat-container .row {
        flex-direction: column;
    }

    .conversas-panel {
        margin-bottom: 1.5rem;
    }

    .list-group-container {
        max-height: 300px !important;
    }

    .chat-area {
        height: 500px !important;
    }
}

@media (max-width: 575px) {
    .chat-messages {
        padding: 1rem !important;
    }

    .card-header .btn-sm {
        padding: 0.25rem 0.5rem;
    }

    .conversas-panel .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filter-tabs {
        width: 100%;
        display: flex;
    }

    .filter-tabs .btn {
        flex: 1;
    }
}

/* Estilos específicos para a página de agenda */
@media (max-width: 991px) {
    .calendar-controls .row > div {
        margin-bottom: 1rem;
    }

    .date-navigation, .view-options, .filter-options {
        justify-content: center;
    }

    .view-options .btn-group {
        flex-wrap: wrap;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-actions {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .schedule-item .card-body {
        padding: 0.75rem;
    }

    .schedule-status {
        margin-top: 0.5rem;
        text-align: left !important;
    }

    .schedule-item .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .client-avatar {
        margin-bottom: 0.5rem;
    }
}

/* Estilos específicos para a página de clientes */
@media (max-width: 991px) {
    .filters-section .btn-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .view-options {
        justify-content: center !important;
        margin-top: 1rem;
    }
}

@media (max-width: 575px) {
    .client-card {
        margin-bottom: 1.5rem;
    }

    .client-avatar img {
        width: 80px !important;
        height: 80px !important;
    }

    .client-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem !important;
    }
}

/* Corrigindo problemas de sobreposição */
.list-group-item-action .d-flex {
    flex-wrap: nowrap;
}

.conversas-panel .badge {
    min-width: 24px;
}

.schedule-time {
    white-space: nowrap;
}

.client-meta .badge {
    white-space: normal;
    text-align: center;
    max-width: 100%;
    display: inline-block;
}

/* Melhorias de contraste */
.login-form .form-control {
    border: 1px solid #adb5bd;
    background-color: #fff;
    color: #212529;
}

.login-form .form-control:focus {
    border-color: #e60023;
    box-shadow: 0 0 0 3px rgba(230, 0, 35, 0.25);
}

.login-banner {
    background: linear-gradient(135deg, #d50020 0%, #8a0015 100%);
}

.login-banner-content {
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
}

.login-form .btn-login {
    background: linear-gradient(135deg, #e60023 0%, #a60019 100%);
    box-shadow: 0 4px 10px rgba(230, 0, 35, 0.3);
}

.login-form-footer a {
    color: #d50020;
    text-decoration: underline;
}

/* Melhorias de acessibilidade */
.badge.bg-danger {
    background-color: #d50020 !important;
}

.badge.bg-success {
    background-color: #0a8043 !important;
}

.badge.bg-warning {
    background-color: #cc7000 !important;
    color: #fff !important;
}

.btn-filter.active {
    background-color: #e60023;
    border-color: #e60023;
    color: white;
    font-weight: 500;
}

.filter-buttons .btn:hover {
    opacity: 0.9;
}

/* Ajustes para formulários e tabelas */
.form-control, .form-select {
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.btn-action {
    font-weight: 500;
}

/* Melhorias para os gráficos */
canvas {
    max-height: 350px;
} 