/* Custom CSS for BarbaFlow Admin - Search Field Positioning */

/* Reposiciona o campo de busca para a direita */
.navbar .navbar-nav.ml-auto {
    margin-left: auto !important;
}

.navbar-search-form {
    margin-left: auto;
}

/* Garante que o campo de busca fique alinhado à direita */
#navbar-search-input {
    text-align: left;
}

/* Keep top navbar aligned with desired layout from local screenshot */
.main-header.navbar,
.main-header .navbar {
    background-color: #343a40 !important;
}

.main-header .navbar-nav .nav-link {
    color: #ffffff !important;
}

/* Keep topmenu links visible instead of collapsing on medium widths */
@media (min-width: 576px) {
    .main-header .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
    }

    .main-header .navbar-toggler {
        display: none !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */

body.dark-mode,
body.dark-mode #content,
body.dark-mode .content-wrapper,
body.dark-mode .content,
body.dark-mode section.content {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .card,
body.dark-mode .info-box,
body.dark-mode .modal-content {
    background-color: #1a1a1b !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

/* Kanban Dark Mode */
body.dark-mode .kanban-container {
    background: #121212 !important;
}

body.dark-mode .kanban-header,
body.dark-mode .month-navigation,
body.dark-mode .stage-column,
body.dark-mode .card-item,
body.dark-mode .loading-spinner,
body.dark-mode .view-tab {
    background-color: #1a1a1b !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

body.dark-mode .kanban-title,
body.dark-mode .month-display,
body.dark-mode .stage-title,
body.dark-mode .card-client,
body.dark-mode .modal-title,
body.dark-mode .detail-value,
body.dark-mode .loading-text {
    color: #ffffff !important;
}

body.dark-mode .month-count,
body.dark-mode .stage-metrics,
body.dark-mode .card-week,
body.dark-mode .card-appointments,
body.dark-mode .appointment-employee,
body.dark-mode .appointment-time,
body.dark-mode .detail-section h4,
body.dark-mode .appointment-detail-employee,
body.dark-mode .history-date {
    color: #b0b0b0 !important;
}

body.dark-mode .card-appointments,
body.dark-mode .appointments-list,
body.dark-mode #pipeline-selector,
body.dark-mode .view-tab {
    background-color: #3d3d3e !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .card-item {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .card-item:hover {
    border-color: #417690 !important;
    background-color: #353536 !important;
}

body.dark-mode .status-agendado {
    background: #1a3a5a !important;
    color: #add8e6 !important;
}

body.dark-mode .status-confirmado {
    background: #1b4d2e !important;
    color: #90ee90 !important;
}

body.dark-mode .status-compareceu {
    background: #1b4d2e !important;
    color: #90ee90 !important;
}

body.dark-mode .status-nao_compareceu {
    background: #4d1b1b !important;
    color: #ffcccb !important;
}

body.dark-mode .status-cancelado {
    background: #333 !important;
    color: #aaa !important;
}

body.dark-mode .status-previsto {
    background: #4d3d1b !important;
    color: #ffeb3b !important;
}

/* Live Chat Dark Mode Variables Overrides */
body.dark-mode {
    --bg-color: #121212;
    --chat-bg: #1a1a1b;
    --sidebar-bg: #1a1a1b;
    --border-color: #333;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --msg-in-bg: #2d2d2e;
    --msg-in-text: #e0e0e0;
    --msg-out-bg: #054a91;
    --msg-out-text: #ffffff;
    --chat-header-bg: rgba(26, 26, 27, 0.9);
}

body.dark-mode .chat-main,
body.dark-mode .chat-header,
body.dark-mode .chat-messages,
body.dark-mode .chat-input-area,
body.dark-mode .control-card,
body.dark-mode .btn-soft,
body.dark-mode textarea,
body.dark-mode .modal-content,
body.dark-mode .template-card {
    background-color: #1a1a1b !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

body.dark-mode .chat-messages {
    background-image: radial-gradient(#333 1px, transparent 1px) !important;
}

body.dark-mode .chat-header {
    background: var(--chat-header-bg) !important;
}

body.dark-mode .btn-soft:hover,
body.dark-mode .template-card:hover {
    background-color: #2d2d2e !important;
    border-color: #417690 !important;
}

body.dark-mode .template-var-input {
    background-color: #2d2d2e !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.dark-mode .msg-checkbox {
    background-color: #333 !important;
    border-color: #444 !important;
}

body.dark-mode h3,
body.dark-mode h2 {
    color: #ffffff !important;
}