/**
 * Sistema de Gestão de Agência - Estilos Principais
 * Versão 1.0
 */

/* ============================================
   RESET E VARIÁVEIS
   ============================================ */

:root {
    /* PALETA PRETO E BRANCO - ELEGANTE */
    --primary: #000000;
    --secondary: #333333;
    --accent: #666666;

    /* Status Colors - Mantendo funcionalidade */
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --success: #10b981;

    /* Cores Neutras - Escala de Cinza */
    --black: #000000;
    --dark: #1a1a1a;
    --gray-dark: #333333;
    --gray: #666666;
    --gray-medium: #999999;
    --gray-light: #e5e5e5;
    --gray-lighter: #f5f5f5;
    --white: #ffffff;

    /* Cores Antigas mantidas para compatibilidade */
    --purple: #000000;
    --teal: #333333;
    --orange: #666666;
    --red: #dc2626;
    --green: #10b981;
    --blue: #3b82f6;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 4px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;

    /* Tipografia */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-sm: 12px;
}

/* Dark Mode - Estilo Apple */
[data-theme="dark"] {
    --primary: #ffffff;
    --secondary: #e5e5e5;
    --accent: #999999;

    --black: #ffffff;
    --dark: #e5e5e5;
    --gray-dark: #cccccc;
    --gray: #999999;
    --gray-medium: #666666;
    --gray-light: #2c2c2c;
    --gray-lighter: #1c1c1c;
    --white: #000000;

    --box-shadow: 0 2px 12px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] body {
    background: #000000;
    color: #e5e5e5;
}

[data-theme="dark"] .top-header {
    background: rgba(28, 28, 28, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sidebar {
    background: #1c1c1c;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .main-content {
    background: #000000;
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .kanban-filters,
[data-theme="dark"] .profile-header {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .kanban-column-header {
    background: #2c2c2c;
}

[data-theme="dark"] .kanban-card {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .kanban-card:hover {
    background: #2c2c2c;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-content {
    background: #1c1c1c;
    color: #e5e5e5;
}

/* Dark Mode - Kanban Client Logo */
[data-theme="dark"] .kanban-client-logo .client-name {
    color: #ffffff !important;
}

[data-theme="dark"] .kanban-client-logo img {
    background: #ffffff;
}

/* Dark Mode - Filtros e Selects */
[data-theme="dark"] .kanban-filters select,
[data-theme="dark"] .kanban-filters input {
    background: #2c2c2c;
    color: #e5e5e5;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Dark Mode - Empty Column */
[data-theme="dark"] .empty-column {
    color: #999999;
}

/* Dark Mode - Loading */
[data-theme="dark"] .loading-cards {
    color: #999999;
}

/* Dark Mode - Textos e Labels */
[data-theme="dark"] label {
    color: #e5e5e5;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #ffffff;
}

[data-theme="dark"] .page-header h1,
[data-theme="dark"] .page-header-left h1 {
    color: #ffffff !important;
}

[data-theme="dark"] p {
    color: #e5e5e5;
}

/* Dark Mode - Kanban Column Headers */
[data-theme="dark"] .column-title {
    color: #ffffff;
}

[data-theme="dark"] .column-count {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Dark Mode - Kanban Cards - Textos */
[data-theme="dark"] .kanban-card-title {
    color: #ffffff;
}

[data-theme="dark"] .kanban-card-meta,
[data-theme="dark"] .card-footer-info {
    color: #cccccc;
}

/* Dark Mode - Badges */
[data-theme="dark"] .badge,
[data-theme="dark"] .meta-badge {
    background: #2c2c2c;
    color: #e5e5e5;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dark Mode - Tables */
[data-theme="dark"] table {
    color: #e5e5e5;
}

[data-theme="dark"] table th {
    background: #2c2c2c;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] table td {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] table tbody tr:hover {
    background: #2c2c2c;
}

/* Dark Mode - Buttons Secondary */
[data-theme="dark"] .btn-secondary {
    background: #2c2c2c;
    color: #e5e5e5;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #3c3c3c;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Dark Mode - Page Headers */
[data-theme="dark"] .page-header,
[data-theme="dark"] .page-header-left {
    color: #ffffff;
}

[data-theme="dark"] .page-header p,
[data-theme="dark"] .page-header-left p {
    color: #999999;
}

/* Dark Mode - Filtros e Search */
[data-theme="dark"] .filtros,
[data-theme="dark"] .search-bar {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark Mode - Lista Cards */
[data-theme="dark"] .lista-card,
[data-theme="dark"] .user-card,
[data-theme="dark"] .tipo-card {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .lista-card:hover,
[data-theme="dark"] .user-card:hover,
[data-theme="dark"] .tipo-card:hover {
    background: #2c2c2c;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* Dark Mode - Info Boxes */
[data-theme="dark"] .info-box,
[data-theme="dark"] .alert,
[data-theme="dark"] .notice {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

/* Dark Mode - Checkboxes e Radio */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Dark Mode - Dropdowns */
[data-theme="dark"] .dropdown-menu {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .dropdown-item {
    color: #e5e5e5;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #2c2c2c;
}

/* Dark Mode - Links */
[data-theme="dark"] a {
    color: #60a5fa;
}

[data-theme="dark"] a:hover {
    color: #93c5fd;
}

/* Dark Mode - Modals */
[data-theme="dark"] .modal-header {
    background: #1c1c1c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .modal-body {
    background: #1c1c1c;
    color: #e5e5e5;
}

[data-theme="dark"] .modal-footer {
    background: #1c1c1c;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark Mode - Form Elements */
[data-theme="dark"] .form-group label {
    color: #e5e5e5;
}

[data-theme="dark"] .form-row {
    color: #e5e5e5;
}

/* Dark Mode - Tabs */
[data-theme="dark"] .tabs,
[data-theme="dark"] .tab-list {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tab {
    color: #999999;
}

[data-theme="dark"] .tab.active {
    color: #ffffff;
    border-color: #60a5fa;
}

/* Dark Mode - Mensagens de Sucesso/Erro */
[data-theme="dark"] .success-message {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: #4ade80;
}

[data-theme="dark"] .error-message {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: #f87171;
}

[data-theme="dark"] .warning-message {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border-color: #fbbf24;
}

[data-theme="dark"] .info-message {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: #60a5fa;
}

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

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    color: var(--dark);
    background: #f5f7fa;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   PÁGINA DE LOGIN
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #000000 0%, #333333 50%, #666666 100%);
    padding: 20px;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.02) 10px,
        rgba(255, 255, 255, 0.02) 20px
    );
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    max-width: 220px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.login-header i {
    font-size: 50px;
    color: var(--black);
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--black);
    margin-bottom: 5px;
    font-weight: 700;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 18px;
}

.alert-error {
    background: #fee;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff4e5;
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-success {
    background: #e8f8f5;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-info {
    background: #e3f2fd;
    color: var(--info);
    border-left: 4px solid var(--info);
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: var(--font-size-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-block {
    width: 100%;
    justify-content: center;
    font-size: var(--font-size-lg);
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.login-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    color: var(--gray-dark);
    text-align: left;
}

.login-info i {
    color: var(--primary);
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--border-radius);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.top-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

.header-left .page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
}

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

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 300px;
    padding: 10px 15px 10px 45px;
    border: 2px solid var(--gray-light);
    border-radius: 25px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 350px;
}

.notification-dropdown,
.user-dropdown {
    position: relative;
}

.notification-btn,
.user-btn,
.theme-toggle {
    position: relative;
    padding: 10px;
    background: transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-btn {
    font-size: 20px;
    color: var(--gray-dark);
}

.theme-toggle {
    font-size: 18px;
    color: var(--gray-dark);
    cursor: pointer;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    background: var(--gray-light);
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

[data-theme="dark"] .theme-toggle {
    color: #fbbf24;
}

.notification-btn:hover,
.user-btn:hover {
    background: var(--gray-light);
}

.notification-btn .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Animação de pulso para novas notificações */
.notification-btn .badge.badge-pulse {
    animation: badge-pulse 1.5s ease-in-out 3;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
}

.user-btn img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    text-transform: uppercase;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

.notification-menu,
.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 300px;
    display: none;
    z-index: 1000;
}

.notification-menu.show,
.user-menu.show {
    display: block;
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header h3 {
    font-size: var(--font-size-lg);
}

.mark-all-read {
    color: var(--primary);
    font-size: var(--font-size-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-info {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
}

.user-info strong {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--dark);
}

.user-info span {
    font-size: var(--font-size-sm);
    color: var(--gray);
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    transition: var(--transition);
}

.user-menu a:hover {
    background: var(--gray-light);
}

.user-menu a i {
    width: 20px;
    font-size: 16px;
    color: var(--gray);
}

.logout-link {
    color: var(--danger) !important;
}

.logout-link i {
    color: var(--danger) !important;
}

.user-menu-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 5px 0;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);
    color: var(--white);
    overflow-y: auto;
    z-index: 101;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
    overflow: visible;
}
.sidebar-logo {
    max-width: 160px;
    height: auto;
    max-height: 45px;
    object-fit: contain;
    transition: var(--transition);
}

.sidebar-logo:hover {
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.2));
    transform: scale(1.02);
}

.sidebar-header i {
    color: var(--white);
    font-size: 28px;
}

.sidebar-menu {
    padding: 15px 0 10px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    font-weight: 500;
}

.menu-item i {
    width: 22px;
    font-size: 18px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.menu-item.active {
    background: var(--primary);
    color: var(--white);
    border-left: 4px solid var(--white);
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 20px;
}

.menu-item-group .menu-item {
    justify-content: space-between;
}

.submenu-arrow {
    transition: var(--transition);
    font-size: 12px;
}

.menu-item.active .submenu-arrow,
.submenu-arrow.rotated {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.show {
    max-height: 500px;
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 55px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.submenu a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.submenu a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--white);
    padding-left: 52px;
}

.submenu a i {
    font-size: 14px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

/* ============================================
   CONTEÚDO PRINCIPAL
   ============================================ */

.main-content {
    padding: 30px;
}

.main-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-light);
    padding: 20px;
    text-align: center;
    color: var(--gray);
    font-size: var(--font-size-sm);
    margin-left: var(--sidebar-width);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-container {
    max-width: 1400px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.orange { background: var(--orange); }
.stat-icon.red { background: var(--danger); }
.stat-icon.yellow { background: #f39c12; }
.stat-icon.green { background: var(--success); }
.stat-icon.purple { background: var(--purple); }
.stat-icon.teal { background: var(--teal); }

.stat-details h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-details p {
    color: var(--gray);
    font-size: var(--font-size-sm);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: var(--font-size-lg);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.demanda-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demanda-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.demanda-item:hover {
    background: var(--gray-light);
    transform: translateX(5px);
}

.demanda-badge {
    width: 4px;
    height: 50px;
    border-radius: 2px;
}

.demanda-info {
    flex: 1;
}

.demanda-info h4 {
    font-size: var(--font-size-base);
    color: var(--dark);
    margin-bottom: 5px;
}

.demanda-info p {
    font-size: var(--font-size-sm);
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-badge {
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.separator {
    color: var(--gray-light);
}

.demanda-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.priority-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.priority-badge.baixa {
    background: #e3f2fd;
    color: var(--primary);
}

.priority-badge.media {
    background: #fff4e5;
    color: var(--warning);
}

.priority-badge.alta {
    background: #ffe8e0;
    color: var(--orange);
}

.priority-badge.urgente {
    background: #fee;
    color: var(--danger);
}

.deadline {
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 5px;
}

.deadline.warning {
    color: var(--warning);
}

.deadline.overdue {
    color: var(--danger);
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--white);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--gray-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

.quick-action-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.quick-action-btn i {
    font-size: 28px;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* ============================================
   BOTÕES E COMPONENTES
   ============================================ */

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-sm);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--red);
}

.btn-warning {
    background: #f59e0b;
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: var(--green);
}

.btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-dark);
}

/* ============================================
   SCROLLBAR CUSTOMIZADA
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-dark);
}

/* ============================================
   LOADING
   ============================================ */

.loading {
    text-align: center;
    padding: 20px;
    color: var(--gray);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   KANBAN BOARD - DESIGN MODERNO PRETO E BRANCO
   ============================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
}

.page-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 5px;
}

.page-header-left p {
    color: var(--gray);
    font-size: 14px;
}

/* Logo do Cliente no Kanban */
.kanban-client-logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 120px;
}

.kanban-client-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kanban-client-logo .client-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Filtros do Kanban */
.kanban-filters {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 14px;
    min-width: 180px;
    background: white;
    transition: var(--transition);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--black);
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    /* Scroll suave */
    scroll-behavior: smooth;
}

/* Scroll horizontal customizado */
.kanban-board::-webkit-scrollbar {
    height: 12px;
}

.kanban-board::-webkit-scrollbar-track {
    background: var(--gray-lighter);
    border-radius: 6px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--gray-medium);
    border-radius: 6px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

.kanban-column {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex: 1;
    min-width: 250px;
    height: calc(100vh - 280px);
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    padding: 12px;
    border-bottom: 2px solid var(--gray-light);
    background: var(--gray-lighter);
    flex-shrink: 0;
}

.column-title {
    font-weight: 700;
    font-size: 12px;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.column-count {
    background: var(--black);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.kanban-cards {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
}

/* Scroll vertical das colunas customizado */
.kanban-cards::-webkit-scrollbar {
    width: 8px;
}

.kanban-cards::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-cards::-webkit-scrollbar-thumb {
    background: var(--gray-medium);
    border-radius: 4px;
}

.kanban-cards::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* Cards do Kanban */
.kanban-card {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    padding: 12px;
    cursor: grab;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    user-select: none;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--black);
    transform: translateY(-2px);
}

.kanban-card:active {
    cursor: grabbing;
}

.card-header-kanban {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 6px;
}

.card-cliente {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.card-prioridade {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Badge para demandas criadas por IA - Adicionado em 2025-12-18 */
.badge-ia {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}
.badge-ia::before {
    content: "\f544";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 3px;
    font-size: 8px;
}
.card-title-kanban {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-meta {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta i {
    color: var(--gray-medium);
    font-size: 11px;
}

.card-prazo.atrasado {
    color: var(--danger);
    font-weight: 600;
}

.card-prazo.urgente {
    color: var(--warning);
    font-weight: 600;
}

.card-prazo.proximo {
    color: var(--info);
}

/* Drag & Drop States */
.sortable-ghost {
    opacity: 0.3;
    background: var(--gray-lighter);
    border: 2px dashed var(--gray-medium);
}

.sortable-drag {
    opacity: 0.95;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    transform: rotate(2deg) scale(1.05);
    cursor: grabbing !important;
    z-index: 9999;
}

.sortable-chosen {
    cursor: grabbing;
}

/* Highlight da coluna ao arrastar sobre ela */
.kanban-cards.sortable-over {
    background: rgba(59, 130, 246, 0.05);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 8px;
}

/* Empty Column */
.empty-column {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 13px;
}

.empty-column i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.2;
}

/* Loading state */
.loading-cards {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-medium);
    font-size: 14px;
}

.loading-cards i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: var(--primary);
}

.loading-cards {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-bottom: 3px solid #3b82f6;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    font-size: 28px;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-light);
    color: var(--black);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

/* Formulários */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.form-group.col-6 {
    flex: 0 0 calc(50% - 7.5px);
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--black);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive Kanban */
@media (max-width: 1200px) {
    .kanban-column {
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .kanban-column {
        min-width: 280px;
        flex: 0 0 280px;
    }
}

@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        overflow-x: hidden;
    }

    .kanban-column {
        flex: 1;
        min-width: 100%;
        height: auto;
        min-height: 400px;
    }

    .kanban-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select {
        min-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}


/* Modal Detalhes da Demanda */
.detalhes-demanda {
    padding: 10px 0;
}

.detalhes-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
}

.detalhes-header h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: var(--black);
}

.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.detalhes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.detalhe-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.detalhe-item p {
    margin: 0;
    color: var(--black);
    font-size: 15px;
}

.detalhe-descricao {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
}

.detalhe-descricao label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 10px;
    font-size: 14px;
}

.detalhe-descricao p {
    margin: 0;
    color: var(--black);
    line-height: 1.6;
    white-space: pre-wrap;
}

.detalhes-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--gray-light);
    margin-top: 30px;
}

/* Comentários */
.detalhes-comentarios {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
}

.detalhes-comentarios h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comentario-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
}

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

.comentario-header strong {
    color: var(--black);
    font-size: 14px;
}

.comentario-data {
    font-size: 12px;
    color: var(--gray);
}

.comentario-texto {
    color: var(--gray-dark);
    line-height: 1.5;
    font-size: 14px;
    white-space: pre-wrap;
}

.form-comentario {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 15px;
}

.form-comentario textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.form-comentario textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Timeline */
.detalhes-timeline {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
}

.detalhes-timeline h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.timeline-content {
    background: var(--gray-lighter);
    padding: 12px;
    border-radius: 6px;
}

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

.timeline-header strong {
    color: var(--black);
    font-size: 14px;
}

.timeline-data {
    font-size: 12px;
    color: var(--gray);
}

.timeline-texto {
    color: var(--gray-dark);
    font-size: 14px;
    line-height: 1.5;
}

.empty-text {
    text-align: center;
    color: var(--gray);
    padding: 20px;
    font-size: 14px;
}

.loading-small {
    text-align: center;
    padding: 20px;
    color: var(--gray-medium);
}

@media (max-width: 768px) {
    .detalhes-grid {
        grid-template-columns: 1fr;
    }

    .detalhes-acoes {
        flex-wrap: wrap;
    }

    .form-comentario {
        flex-direction: column;
    }
}

/* ========================================
   CHECKLIST
   ======================================== */

.detalhes-checklist {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    margin-bottom: 20px;
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checklist-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-header h4 i {
    color: var(--primary);
}

/* Barra de Progresso */
.checklist-progress {
    flex: 1;
    max-width: 250px;
    margin-left: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
}

.progress-info span:last-child {
    font-weight: 600;
    color: var(--primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-lighter);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Lista de Itens */
[id^="listaChecklist-"] {
    margin-bottom: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--gray-lighter);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.checklist-item:hover {
    background: #e0e0e0;
}

.checklist-item.concluido {
    opacity: 0.6;
}

.checklist-item.concluido label {
    text-decoration: line-through;
    color: var(--gray);
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--success);
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: var(--black);
}

.btn-delete-item {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
    opacity: 0;
}

.checklist-item:hover .btn-delete-item {
    opacity: 1;
}

.btn-delete-item:hover {
    background: var(--danger);
    color: white;
}

/* Formulário para adicionar item */
.form-checklist {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.form-checklist input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-size: 14px;
}

.form-checklist input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.form-checklist .btn {
    white-space: nowrap;
}

/* Texto vazio */
.empty-text {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    padding: 20px;
    margin: 0;
}

/* Responsividade do Checklist */
@media (max-width: 768px) {
    .checklist-header {
        flex-direction: column;
        gap: 10px;
    }

    .checklist-progress {
        max-width: 100%;
        margin-left: 0;
    }

    .form-checklist {
        flex-direction: column;
    }

    .checklist-item {
        padding: 8px;
    }
}

/* ============================================
   MULTI-SELECT DE RESPONSÁVEIS
   ============================================ */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-input {
    min-height: 44px;
    padding: 8px 40px 8px 12px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    transition: all 0.2s ease;
}

.multi-select-input:hover {
    border-color: var(--gray);
}

.multi-select-input.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.multi-select-input i.fa-chevron-down {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    transition: transform 0.2s ease;
}

.multi-select-input.active i.fa-chevron-down {
    transform: translateY(-50%) rotate(180deg);
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.selected-items .placeholder {
    color: var(--gray);
    font-size: 14px;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.selected-chip .remove-chip {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.selected-chip .remove-chip:hover {
    opacity: 1;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
}

.multi-select-dropdown.active {
    display: block;
}

.multi-select-search {
    padding: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.multi-select-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-size: 14px;
}

.multi-select-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.multi-select-options {
    max-height: 200px;
    overflow-y: auto;
}

.multi-select-option {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.multi-select-option:hover {
    background: var(--gray-lighter);
}

.multi-select-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.multi-select-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: var(--black);
}

.multi-select-option.selected {
    background: rgba(0, 0, 0, 0.05);
}

.multi-select-empty {
    padding: 20px;
    text-align: center;
    color: var(--gray);
    font-size: 14px;
}

/* Dark Mode Support */
[data-theme="dark"] .multi-select-input {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .multi-select-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .multi-select-input.active {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .selected-items .placeholder {
    color: #999;
}

[data-theme="dark"] .selected-chip {
    background: #60a5fa;
}

[data-theme="dark"] .multi-select-dropdown {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .multi-select-search {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .multi-select-search input {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

[data-theme="dark"] .multi-select-option {
    color: #e5e5e5;
}

[data-theme="dark"] .multi-select-option:hover {
    background: #3c3c3c;
}

[data-theme="dark"] .multi-select-option label {
    color: #e5e5e5;
}

[data-theme="dark"] .multi-select-option.selected {
    background: rgba(96, 165, 250, 0.15);
}

/* ============================================
   NOTIFICAÇÕES - ESTILO MELHORADO
   ============================================ */

.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
    background: white;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
    border-left: 4px solid var(--primary);
}

.notification-item.unread:hover {
    background: #e6f2ff;
}

.notification-item.read {
    opacity: 0.75;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.notification-icon.info {
    background: #e3f2fd;
    color: #2196f3;
}

.notification-icon.alerta {
    background: #fff3e0;
    color: #ff9800;
}

.notification-icon.urgente {
    background: #ffebee;
    color: #f44336;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px 0;
}

.notification-content p {
    font-size: 13px;
    color: var(--gray);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.notif-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.notif-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.notif-badge i {
    font-size: 10px;
}

.notif-badge.notif-cliente {
    border-width: 1px;
    border-style: solid;
}

.notif-badge.notif-prioridade {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notif-criador {
    font-size: 11px;
    color: #666;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notif-criador i {
    font-size: 10px;
}

.notification-time {
    display: inline-block;
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}

.empty-state {
    padding: 30px 20px;
    text-align: center;
    color: var(--gray);
    font-size: var(--font-size-sm);
}

/* Dark Mode para Notificações */
[data-theme="dark"] .notification-item {
    background: #2c2c2c;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notification-item:hover {
    background: #3c3c3c;
}

[data-theme="dark"] .notification-item.unread {
    background: #1a2332;
    border-left-color: #60a5fa;
}

[data-theme="dark"] .notification-item.unread:hover {
    background: #1f2937;
}

[data-theme="dark"] .notification-content h4 {
    color: #e5e5e5;
}

[data-theme="dark"] .notification-content p {
    color: #999;
}

[data-theme="dark"] .notif-criador {
    color: #888;
}

[data-theme="dark"] .notification-time {
    color: #888;
}

[data-theme="dark"] .notification-icon.info {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
}

[data-theme="dark"] .notification-icon.alerta {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

[data-theme="dark"] .notification-icon.urgente {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
}

[data-theme="dark"] .empty-state {
    color: #888;
}


/* ============================================
   DARK MODE - CORREÇÕES ADICIONAIS
   ============================================ */

/* Correção de elementos que ficavam brancos */
[data-theme="dark"] .demanda-item {
    background: #2c2c2c;
}

[data-theme="dark"] .demanda-item:hover {
    background: #3c3c3c;
}

[data-theme="dark"] .comentario-item {
    background: #2c2c2c;
    border-left-color: #60a5fa;
}

[data-theme="dark"] .timeline-content {
    background: #2c2c2c;
}

[data-theme="dark"] .detalhes-timeline {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .detalhes-comentarios {
    background: #1c1c1c;
}

[data-theme="dark"] .detalhes-checklist {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .checklist-item {
    background: #2c2c2c;
}

[data-theme="dark"] .checklist-item:hover {
    background: #3c3c3c;
}

[data-theme="dark"] .progress-bar {
    background: #2c2c2c;
}

[data-theme="dark"] .detalhe-descricao {
    background: #2c2c2c;
}

[data-theme="dark"] .main-footer {
    background: #1c1c1c;
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .notification-menu,
[data-theme="dark"] .user-menu {
    background: #1c1c1c;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notification-header,
[data-theme="dark"] .user-info {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .user-menu a:hover {
    background: #2c2c2c;
}

[data-theme="dark"] .quick-action-btn {
    background: #2c2c2c;
}

[data-theme="dark"] .quick-action-btn:hover {
    background: #60a5fa;
    color: #ffffff;
}

[data-theme="dark"] .dashboard-card {
    background: #1c1c1c;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .login-box {
    background: #1c1c1c;
}

[data-theme="dark"] .login-info {
    background: #2c2c2c;
    color: #e5e5e5;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #666;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #2c2c2c;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #666;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #888;
}

[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #1c1c1c 100%);
    border-bottom-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .modal-close:hover {
    background: #3c3c3c;
    color: #ffffff;
}

[data-theme="dark"] .priority-badge.baixa {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .priority-badge.media {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .priority-badge.alta {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

[data-theme="dark"] .priority-badge.urgente {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .timeline-icon {
    background: #60a5fa;
}

[data-theme="dark"] .timeline::before {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .client-badge {
    background: #60a5fa;
    color: #ffffff;
}

[data-theme="dark"] .deadline.warning {
    color: #fbbf24;
}

[data-theme="dark"] .deadline.overdue {
    color: #f87171;
}

[data-theme="dark"] .user-info strong {
    color: #ffffff;
}

[data-theme="dark"] .user-info span {
    color: #999;
}

[data-theme="dark"] .mark-all-read {
    color: #60a5fa;
}

[data-theme="dark"] .user-avatar-circle {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
}

[data-theme="dark"] .stat-details h3 {
    color: #ffffff;
}

[data-theme="dark"] .stat-details p {
    color: #999;
}

[data-theme="dark"] .demanda-info h4 {
    color: #ffffff;
}

[data-theme="dark"] .demanda-info p {
    color: #999;
}

[data-theme="dark"] .card-meta {
    color: #999;
}

[data-theme="dark"] .card-meta i {
    color: #666;
}

[data-theme="dark"] .detalhe-item p {
    color: #e5e5e5;
}

[data-theme="dark"] .detalhes-header h3 {
    color: #ffffff;
}

[data-theme="dark"] .detalhe-descricao p {
    color: #e5e5e5;
}

[data-theme="dark"] .comentario-header strong {
    color: #ffffff;
}

[data-theme="dark"] .comentario-data {
    color: #888;
}

[data-theme="dark"] .comentario-texto {
    color: #cccccc;
}

[data-theme="dark"] .form-comentario textarea {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

[data-theme="dark"] .form-comentario textarea:focus {
    border-color: #60a5fa;
}

[data-theme="dark"] .timeline-header strong {
    color: #ffffff;
}

[data-theme="dark"] .timeline-data {
    color: #888;
}

[data-theme="dark"] .timeline-texto {
    color: #cccccc;
}

[data-theme="dark"] .detalhes-timeline h4 {
    color: #ffffff;
}

[data-theme="dark"] .checklist-header h4 {
    color: #ffffff;
}

[data-theme="dark"] .checklist-header h4 i {
    color: #60a5fa;
}

[data-theme="dark"] .progress-info {
    color: #999;
}

[data-theme="dark"] .progress-info span:last-child {
    color: #60a5fa;
}

[data-theme="dark"] .checklist-item.concluido label {
    color: #666;
}

[data-theme="dark"] .form-checklist input[type="text"] {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

[data-theme="dark"] .form-checklist input[type="text"]:focus {
    border-color: #60a5fa;
}

[data-theme="dark"] .detalhes-comentarios h4 {
    color: #ffffff;
}

[data-theme="dark"] .card-title-kanban {
    color: #ffffff;
}

[data-theme="dark"] .card-prazo.atrasado {
    color: #f87171;
}

[data-theme="dark"] .card-prazo.urgente {
    color: #fbbf24;
}

[data-theme="dark"] .card-prazo.proximo {
    color: #60a5fa;
}

[data-theme="dark"] .sortable-ghost {
    background: #2c2c2c;
    border-color: #666;
}

[data-theme="dark"] .loading-cards i {
    color: #60a5fa;
}

[data-theme="dark"] .empty-text {
    color: #888;
}

[data-theme="dark"] .loading-small {
    color: #888;
}

[data-theme="dark"] .separator {
    color: #666;
}

/* ============================================
   DARK MODE - CALENDÁRIO/AGENDA DE GRAVAÇÕES
   ============================================ */

/* Toolbar do calendário */
[data-theme="dark"] .calendario-toolbar {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .calendario-nav h2 {
    color: #ffffff;
}

[data-theme="dark"] .calendario-filtros select {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

/* Header do calendário */
[data-theme="dark"] .calendario-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #1c1c1c 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .calendario-header h3 {
    color: #ffffff;
}

[data-theme="dark"] .calendario-header .btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

[data-theme="dark"] .calendario-header .btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Grid do calendário */
[data-theme="dark"] .calendario-grid {
    background: #000000;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Headers dos dias da semana */
[data-theme="dark"] .calendario-dia-header {
    background: #1c1c1c;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Dias do calendário */
[data-theme="dark"] .calendario-dia {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .calendario-dia:hover {
    background: #2c2c2c;
    box-shadow: inset 0 0 0 2px #60a5fa;
}

[data-theme="dark"] .calendario-dia.hoje {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.1) 100%);
}

[data-theme="dark"] .calendario-dia.hoje .dia-numero {
    background: #fbbf24;
    color: #000000;
}

[data-theme="dark"] .calendario-dia.outro-mes {
    background: #0d0d0d;
    color: #666;
}

[data-theme="dark"] .dia-numero {
    color: #e5e5e5;
}

/* Items de gravação */
[data-theme="dark"] .gravacao-item {
    color: #ffffff;
}

[data-theme="dark"] .gravacao-item:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Sortable ghost */
[data-theme="dark"] .sortable-ghost {
    background: #2c2c2c !important;
    opacity: 0.4;
}

[data-theme="dark"] .sortable-drag {
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2) !important;
}

/* Datas comemorativas */
[data-theme="dark"] .data-comemorativa {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e5e5;
}

[data-theme="dark"] .data-comemorativa:hover {
    background: #3c3c3c;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

/* Legenda */
[data-theme="dark"] .calendario-legenda {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .legenda-item {
    color: #e5e5e5;
}

/* Filtros */
[data-theme="dark"] .calendario-filtros {
    background: #1c1c1c;
}

/* Dica da agenda */
[data-theme="dark"] #agendaTip {
    background: linear-gradient(135deg, #2c2c2c 0%, #1c1c1c 100%) !important;
}

[data-theme="dark"] #agendaTip h4 {
    color: #ffffff;
}

[data-theme="dark"] #agendaTip p {
    color: #e5e5e5;
}

[data-theme="dark"] #agendaTip button {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] #agendaTip button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================
   DARK MODE - DASHBOARD ICONS & STATS
   ============================================ */

/* Stat icons - garantir que mantenham suas cores no dark mode */
[data-theme="dark"] .stat-icon {
    opacity: 1;
}

[data-theme="dark"] .stat-icon i {
    color: inherit;
}

/* Cores específicas de ícones inline no dark mode */
[data-theme="dark"] i[style*="color: #9ca3af"] {
    color: #6b7280 !important;
}

[data-theme="dark"] i[style*="color: #d97706"] {
    color: #fbbf24 !important;
}

/* Dashboard cards específicos */
[data-theme="dark"] .stats-grid .stat-card {
    background: #1c1c1c;
}

/* Alertas e notificações no dashboard */
[data-theme="dark"] .dashboard-alerta {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dashboard-alerta i {
    opacity: 1;
}

/* Dashboard welcome tip */
[data-theme="dark"] #dashboardTip {
    background: linear-gradient(135deg, #2c2c2c 0%, #1c1c1c 100%) !important;
}

[data-theme="dark"] #dashboardTip h2 {
    color: #ffffff;
}

[data-theme="dark"] #dashboardTip p,
[data-theme="dark"] #dashboardTip h4 {
    color: #e5e5e5;
}

[data-theme="dark"] #dashboardTip button {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

[data-theme="dark"] #dashboardTip button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Lista de demandas no dashboard */
[data-theme="dark"] .dashboard-list-item {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dashboard-list-item:hover {
    background: #2c2c2c;
}

[data-theme="dark"] .dashboard-list-item h4 {
    color: #ffffff;
}

[data-theme="dark"] .dashboard-list-item p {
    color: #999;
}

/* Spans com ícones no dashboard */
[data-theme="dark"] .dashboard-list-item span {
    color: #999;
}

[data-theme="dark"] .dashboard-list-item span i {
    color: #666 !important;
}

/* ============================================
   DARK MODE - CORREÇÃO DE ÍCONES INVISÍVEIS
   ============================================ */

/* Stat icons - cores visíveis no dark mode */
[data-theme="dark"] .stat-icon.blue {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .stat-icon.orange {
    background: rgba(251, 146, 60, 0.2) !important;
    color: #fb923c !important;
}

[data-theme="dark"] .stat-icon.red {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .stat-icon.yellow {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .stat-icon.green {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .stat-icon.purple {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #a78bfa !important;
}

[data-theme="dark"] .stat-icon.teal {
    background: rgba(20, 184, 166, 0.2) !important;
    color: #5eead4 !important;
}

/* Stat icons com cores inline */
[data-theme="dark"] .stat-icon[style*="background: #fee2e2"] {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .stat-icon[style*="background: #fef3c7"] {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
}

/* Garantir que os ícones dentro sejam visíveis */
[data-theme="dark"] .stat-icon i {
    opacity: 1 !important;
}

/* ============================================
   DARK MODE - CORREÇÃO DE BOTÕES
   ============================================ */

/* Botão primário no dark mode - usar cor de destaque ao invés de branco */
[data-theme="dark"] .btn-primary {
    background: #60a5fa !important;
    color: #000000 !important;
    border-color: #60a5fa !important;
}

[data-theme="dark"] .btn-primary:hover {
    background: #3b82f6 !important;
    color: #000000 !important;
    border-color: #3b82f6 !important;
}

/* Botão primário alternativo (se houver) */
[data-theme="dark"] .btn.btn-primary {
    background: #60a5fa !important;
    color: #000000 !important;
}

[data-theme="dark"] .btn.btn-primary:hover {
    background: #3b82f6 !important;
    color: #000000 !important;
}


/* ============================================
   LOGO EM TEXTO - ATUALIZADA - FONTE ROBOTO
   ============================================ */

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 15px 0;
}

.logo-agencia {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Roboto', 'Inter', sans-serif;
}

.logo-fille {
    font-size: 48px;
    font-weight: 100;
    letter-spacing: 2px;
    color: #ffffff;
    font-family: 'Roboto', 'Arial', sans-serif;
    text-transform: lowercase;
    line-height: 1;
}

/* Dark mode - logo sempre visível */
[data-theme="dark"] .logo-agencia {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .logo-fille {
    color: #ffffff;
}

/* ============================================
   LOGO FINAL - ROCKETWILDNESS FONT
   ============================================ */

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 0 5px 0;
}

.logo-agencia {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    margin-bottom: 3px;
}

.logo-fille {
    font-size: 42px;
    font-weight: normal;
    letter-spacing: 1px;
    color: #ffffff;
    font-family: 'ROCKETWILDNESS', sans-serif;
    line-height: 0.85;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dark mode - logo sempre visível */
[data-theme="dark"] .logo-agencia {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .logo-fille {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* ============================================
   LOGO VERSION TEXT
   ============================================ */

.logo-version {
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    margin-top: 2px;
}

[data-theme="dark"] .logo-version {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   DARK MODE - TABELA DE GRAVAÇÕES NO DASHBOARD
   ============================================ */

/* Título da seção */
[data-theme="dark"] h3 strong,
[data-theme="dark"] .dashboard-card h3 {
    color: #ffffff !important;
}

/* Texto do parágrafo */
[data-theme="dark"] p[style*="color: #6b7280"] {
    color: #999999 !important;
}

/* Tabela - Header */
[data-theme="dark"] .table thead {
    background: #2c2c2c !important;
}

[data-theme="dark"] .table thead th {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Tabela - Corpo */
[data-theme="dark"] .table tbody tr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table tbody td {
    color: #e5e5e5 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table tbody td strong {
    color: #ffffff !important;
}

/* Hover na linha da tabela */
[data-theme="dark"] .table-hover tbody tr:hover {
    background: #2c2c2c !important;
}

/* Badges */
[data-theme="dark"] .badge {
    opacity: 1 !important;
}

[data-theme="dark"] .badge-info {
    background: rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .badge-warning {
    background: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .badge-danger {
    background: rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .badge-success {
    background: rgba(34, 197, 94, 0.3) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .badge-secondary {
    background: rgba(107, 114, 128, 0.3) !important;
    color: #9ca3af !important;
}

/* Ícones na seção */
[data-theme="dark"] .fas.fa-calendar-week {
    color: #a78bfa !important;
}

/* Card da tabela */
[data-theme="dark"] .card {
    background: #1c1c1c !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   NAVEGADOR DE MÊS NO KANBAN (INLINE)
   ============================================ */

.month-navigator-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.month-navigator-inline .nav-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.month-navigator-inline .nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.month-navigator-inline .nav-arrow:active {
    transform: scale(0.95);
}

.month-navigator-inline .current-month {
    min-width: 140px;
    text-align: center;
    padding: 0 8px;
}

.month-navigator-inline .current-month #monthText {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.month-navigator-inline .btn-mostrar-todas {
    background: #60a5fa;
    border: none;
    color: #000000;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.month-navigator-inline .btn-mostrar-todas:hover {
    background: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.month-navigator-inline .btn-mostrar-todas:active {
    transform: translateY(0);
}

/* Dark Mode - Month Navigator Inline */
[data-theme="dark"] .month-navigator-inline {
    background: linear-gradient(135deg, #2c2c2c 0%, #1c1c1c 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .month-navigator-inline .nav-arrow {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .month-navigator-inline .nav-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .month-navigator-inline .btn-mostrar-todas {
    background: #60a5fa;
    color: #000000;
}

[data-theme="dark"] .month-navigator-inline .btn-mostrar-todas:hover {
    background: #3b82f6;
}

/* ============================================
   REUNIÕES COM CLIENTES - CALENDÁRIO
   ============================================ */

.reuniao-item {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid;
    font-size: 12px;
}

.reuniao-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.reuniao-item.status-agendada {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.reuniao-item.status-realizada {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.reuniao-item.status-cancelada {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    opacity: 0.7;
}

.reuniao-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.reuniao-info strong {
    font-weight: 600;
}

/* Dark Mode - Reuniões */
[data-theme="dark"] .reuniao-item {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .reuniao-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   CALENDÁRIO - ESTILOS BASE
   ============================================ */

.calendario-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.calendario-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.calendario-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendario-nav h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    min-width: 200px;
    text-align: center;
}

.calendario-filtros {
    display: flex;
    gap: 10px;
}

.calendario-filtros select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendario-dia-header {
    background: #f3f4f6;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendario-dia {
    background: white;
    min-height: 120px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendario-dia:hover {
    background: #f9fafb;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

.calendario-dia.hoje {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.calendario-dia.outro-mes {
    background: #f9fafb;
    opacity: 0.5;
}

.dia-numero {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.calendario-dia.hoje .dia-numero {
    background: #3b82f6;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.dia-conteudo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Dark Mode - Calendário Base */
[data-theme="dark"] .calendario-container {
    background: #1c1c1c;
}

[data-theme="dark"] .calendario-dia {
    background: #1c1c1c;
}

[data-theme="dark"] .calendario-dia:hover {
    background: #2c2c2c;
}

[data-theme="dark"] .calendario-dia.hoje {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
}

[data-theme="dark"] .calendario-dia.outro-mes {
    background: #0d0d0d;
}

[data-theme="dark"] .dia-numero {
    color: #e5e5e5;
}

[data-theme="dark"] .calendario-dia.hoje .dia-numero {
    background: #60a5fa;
    color: #000000;
}

/* ============================================
   DARK MODE - SEÇÃO DE REUNIÕES NO DASHBOARD
   ============================================ */

[data-theme="dark"] .dashboard-card {
    background: #1c1c1c;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Header laranja da seção de reuniões */
[data-theme="dark"] .dashboard-card > div[style*="background: linear-gradient(135deg, #f59e0b"] {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

/* Área de estatísticas (fundo cinza) */
[data-theme="dark"] .dashboard-card > div[style*="background: #f9fafb"] {
    background: #2c2c2c !important;
}

/* Banner azul de próximas reuniões */
[data-theme="dark"] .dashboard-card div[style*="background: #eff6ff"] {
    background: rgba(59, 130, 246, 0.15) !important;
    border-left-color: #60a5fa !important;
}

[data-theme="dark"] .dashboard-card div[style*="background: #eff6ff"] h3 {
    color: #60a5fa !important;
}

[data-theme="dark"] .dashboard-card div[style*="background: #eff6ff"] p {
    color: #9ca3af !important;
}

/* Card interno da tabela */
[data-theme="dark"] .dashboard-card .card[style*="border: 1px solid #e5e7eb"] {
    background: #1c1c1c !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Botão branco no header */
[data-theme="dark"] .dashboard-card a.btn[style*="background: white"] {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #d97706 !important;
}

[data-theme="dark"] .dashboard-card a.btn[style*="background: white"]:hover {
    background: #ffffff !important;
    transform: translateY(-1px);
}

/* Texto do header */
[data-theme="dark"] .dashboard-card h2[style*="color: white"] {
    color: #ffffff !important;
}

[data-theme="dark"] .dashboard-card p[style*="rgba(255,255,255,0.9)"] {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ============================================
   DARK MODE - SEÇÃO DE GRAVAÇÕES NO DASHBOARD
   ============================================ */

/* Header roxo da seção de gravações */
[data-theme="dark"] .dashboard-card > div[style*="background: linear-gradient(135deg, #8b5cf6"] {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

/* Banner roxo de próximas gravações */
[data-theme="dark"] .dashboard-card div[style*="background: #f3e8ff"] {
    background: rgba(139, 92, 246, 0.15) !important;
    border-left-color: #a78bfa !important;
}

[data-theme="dark"] .dashboard-card div[style*="background: #f3e8ff"] h3 {
    color: #a78bfa !important;
}

[data-theme="dark"] .dashboard-card div[style*="background: #f3e8ff"] p {
    color: #9ca3af !important;
}

/* Botão branco no header gravações */
[data-theme="dark"] .dashboard-card a.btn[style*="color: #8b5cf6"] {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #7c3aed !important;
}

[data-theme="dark"] .dashboard-card a.btn[style*="color: #8b5cf6"]:hover {
    background: #ffffff !important;
}

/* ============================================
   GRAVAÇÕES FINALIZADAS - VISUAL DIFERENCIADO
   ============================================ */

/* Gravações finalizadas ficam mais apagadas */
.gravacao-item.status-finalizada {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    opacity: 0.7;
    border-left-color: #6b7280 !important;
}

.gravacao-item.status-finalizada:hover {
    opacity: 0.85;
}

/* Ícone de check para finalizadas */
.gravacao-item.status-finalizada::before {
    content: '✓ ';
    font-weight: bold;
    margin-right: 4px;
}

/* Dark mode para finalizadas */
[data-theme="dark"] .gravacao-item.status-finalizada {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
    opacity: 0.6;
}

[data-theme="dark"] .gravacao-item.status-finalizada:hover {
    opacity: 0.8;
}

/* ============================================
   DARK MODE - KANBAN COMPLETO
   ============================================ */

/* Fundo das colunas do Kanban */
[data-theme="dark"] .kanban-column {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Cards do Kanban - forçar fundo escuro */
[data-theme="dark"] .kanban-card {
    background: #2c2c2c !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e5e5e5;
}

[data-theme="dark"] .kanban-card:hover {
    background: #3c3c3c !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
}

/* Header do Card */
[data-theme="dark"] .card-header-kanban {
    color: #ffffff;
}

/* Título do Card */
[data-theme="dark"] .card-title-kanban {
    color: #ffffff !important;
}

/* Meta informações (prazo, etc) */
[data-theme="dark"] .card-meta {
    color: #999 !important;
}

[data-theme="dark"] .card-meta i {
    color: #666 !important;
}

/* Footer do Card */
[data-theme="dark"] .card-footer-kanban {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card-footer-info {
    color: #cccccc !important;
}

/* Cliente badge no card */
[data-theme="dark"] .card-cliente {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

/* Prioridade badges */
[data-theme="dark"] .prioridade-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .prioridade-badge.urgente {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .prioridade-badge.alta {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.4);
}

[data-theme="dark"] .prioridade-badge.media {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
}

[data-theme="dark"] .prioridade-badge.baixa {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Empty state */
[data-theme="dark"] .empty-column {
    color: #666;
}

[data-theme="dark"] .empty-text {
    color: #888;
}

/* Área de drop quando arrastando */
[data-theme="dark"] .kanban-cards.sortable-over {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.4);
}

/* Card sendo arrastado */
[data-theme="dark"] .sortable-ghost {
    background: #2c2c2c !important;
    opacity: 0.4;
}

[data-theme="dark"] .sortable-drag {
    background: #2c2c2c !important;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2) !important;
}

/* Header das colunas */
[data-theme="dark"] .column-header {
    background: #1c1c1c;
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .column-title {
    color: #ffffff;
}

[data-theme="dark"] .column-count {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
}

/* Backlog específico */
[data-theme="dark"] #backlog .kanban-card {
    background: #1c1c1c !important;
}

[data-theme="dark"] #backlog .kanban-card:hover {
    background: #2c2c2c !important;
}

/* ============================================
   MOBILE ENHANCEMENTS
   ============================================ */

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

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

/* Body when sidebar is open */
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Touch active state */
.touch-active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Prevent text selection during touch */
.btn, .menu-item, .card {
    -webkit-user-select: none;
    user-select: none;
}

/* Mobile scroll improvements */
.kanban-wrapper,
.table-container,
.modal-body,
.sidebar {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Hide scrollbar on mobile but keep functionality */
@media (max-width: 768px) {
    .kanban-wrapper::-webkit-scrollbar,
    .tabs::-webkit-scrollbar {
        height: 4px;
    }

    .kanban-wrapper::-webkit-scrollbar-thumb,
    .tabs::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    [data-theme="dark"] .kanban-wrapper::-webkit-scrollbar-thumb,
    [data-theme="dark"] .tabs::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
    }
}

/* Mobile menu animation */
.mobile-menu-toggle i {
    transition: transform 0.3s ease;
}

body.sidebar-open .mobile-menu-toggle i {
    transform: rotate(90deg);
}

/* Dark mode overlay */
[data-theme="dark"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* VH fix for mobile browsers */
.full-height {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
}

/* ============================================
   CORREÇÕES MOBILE - 25/11/2025
   ============================================ */

/* FIX: Sidebar Mobile z-index e transição */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050 !important;
        background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
    }

    /* Overlay corrigido */
    .sidebar-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Botão menu mobile */
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1060 !important;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: #000;
        color: #fff;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }
}

/* FIX: Scroll horizontal para tabelas e cards */
.table-scroll-wrapper,
.cards-scroll-wrapper,
.scroll-horizontal {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

/* Tabelas responsivas */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
}

.table-responsive table {
    min-width: 600px;
}

/* Cards em linha (próximas gravações, etc) */
.proximas-gravacoes,
.gravacoes-lista,
.cards-horizontal {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    display: flex;
    gap: 16px;
    padding-bottom: 12px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

.proximas-gravacoes > *,
.gravacoes-lista > *,
.cards-horizontal > * {
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* Dashboard widgets scroll */
.widget-content,
.card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* FIX: Qualquer container que corta conteúdo */
@media (max-width: 768px) {
    .card,
    .stat-card,
    .info-card {
        overflow: visible;
    }

    .card-body,
    .card-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Lista de itens horizontal */
    .items-list,
    .eventos-list,
    .gravacoes-proximas {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .items-list > *,
    .eventos-list > *,
    .gravacoes-proximas > * {
        display: inline-block;
        white-space: normal;
        vertical-align: top;
        min-width: 280px;
        max-width: 300px;
    }

    /* Scrollbar estilizado */
    .scroll-horizontal::-webkit-scrollbar,
    .proximas-gravacoes::-webkit-scrollbar,
    .table-responsive::-webkit-scrollbar,
    .cards-horizontal::-webkit-scrollbar {
        height: 6px;
    }

    .scroll-horizontal::-webkit-scrollbar-track,
    .proximas-gravacoes::-webkit-scrollbar-track,
    .table-responsive::-webkit-scrollbar-track,
    .cards-horizontal::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.05);
        border-radius: 3px;
    }

    .scroll-horizontal::-webkit-scrollbar-thumb,
    .proximas-gravacoes::-webkit-scrollbar-thumb,
    .table-responsive::-webkit-scrollbar-thumb,
    .cards-horizontal::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 3px;
    }

    [data-theme="dark"] .scroll-horizontal::-webkit-scrollbar-track,
    [data-theme="dark"] .proximas-gravacoes::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
    }

    [data-theme="dark"] .scroll-horizontal::-webkit-scrollbar-thumb,
    [data-theme="dark"] .proximas-gravacoes::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
    }
}

/* ============================================
   KANBAN MOBILE - SCROLL HORIZONTAL
   ============================================ */

@media (max-width: 768px) {
    /* Container do Kanban */
    .kanban-wrapper,
    .kanban-container-wrapper {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 16px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .kanban-container,
    .kanban-board {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        min-width: max-content;
        padding-bottom: 8px;
    }

    .kanban-column {
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        scroll-snap-align: start;
        height: auto;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    .kanban-column-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: inherit;
    }

    .kanban-cards {
        max-height: none;
        overflow-y: visible;
    }

    /* Scrollbar do Kanban */
    .kanban-wrapper::-webkit-scrollbar,
    .kanban-container-wrapper::-webkit-scrollbar {
        height: 8px;
    }

    .kanban-wrapper::-webkit-scrollbar-track,
    .kanban-container-wrapper::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.05);
        border-radius: 4px;
    }

    .kanban-wrapper::-webkit-scrollbar-thumb,
    .kanban-container-wrapper::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    .kanban-wrapper::-webkit-scrollbar-thumb:hover,
    .kanban-container-wrapper::-webkit-scrollbar-thumb:hover {
        background: rgba(0,0,0,0.3);
    }

    /* Dark mode */
    [data-theme="dark"] .kanban-wrapper::-webkit-scrollbar-track,
    [data-theme="dark"] .kanban-container-wrapper::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
    }

    [data-theme="dark"] .kanban-wrapper::-webkit-scrollbar-thumb,
    [data-theme="dark"] .kanban-container-wrapper::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
    }

    /* Filtros do Kanban */
    .kanban-filters {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .kanban-filters select,
    .kanban-filters input {
        width: 100%;
        min-height: 44px;
    }
}

/* ============================================
   DASHBOARD WIDGETS - SCROLL HORIZONTAL
   ============================================ */

@media (max-width: 768px) {
    /* Próximas Gravações */
    .proximas-gravacoes-container,
    .widget-proximas-gravacoes .card-body,
    .gravacoes-7dias {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px;
    }

    .proximas-gravacoes-lista,
    .gravacoes-lista-horizontal {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        padding-bottom: 8px;
    }

    .gravacao-card,
    .gravacao-item,
    .proxima-gravacao {
        flex: 0 0 280px;
        min-width: 280px;
        max-width: 300px;
    }

    /* Agenda/Calendário compacto */
    .agenda-lista,
    .eventos-semana {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Stats em linha */
    .stats-row,
    .stats-horizontal {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 12px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .stats-row .stat-item,
    .stats-horizontal .stat-card {
        flex: 0 0 auto;
        min-width: 140px;
    }
}

/* ============================================
   TABELAS MOBILE - SCROLL HORIZONTAL
   ============================================ */

@media (max-width: 768px) {
    .table-container,
    .table-wrapper,
    .data-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px 12px;
    }

    table {
        min-width: 100%;
        width: max-content;
    }

    /* Tabela de gravações */
    .gravacoes-table,
    .agenda-table {
        min-width: 700px;
    }

    /* Primeira coluna fixa (opcional) */
    .table-fixed-first th:first-child,
    .table-fixed-first td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 5;
    }
}

/* ============================================
   CALENDÁRIO DE GRAVAÇÕES - MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Calendário em grid */
    .calendario-grid {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .calendario-grid > div {
        display: grid;
        grid-template-columns: repeat(7, minmax(120px, 1fr));
        min-width: 840px;
    }

    /* OU: Visualização vertical para mobile */
    .calendario-vertical .calendario-grid {
        display: flex;
        flex-direction: column;
        min-width: auto;
    }

    .calendario-vertical .calendario-grid > div {
        display: block;
    }

    /* Header do calendário */
    .calendario-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
    }

    .calendario-header .btn-group {
        display: flex;
        justify-content: center;
    }

    .calendario-nav {
        flex-direction: column;
        gap: 10px;
    }

    .calendario-nav h2 {
        font-size: 18px;
        text-align: center;
    }

    /* Cards de gravação */
    .gravacao-card-mini,
    .gravacao-item-card {
        font-size: 12px;
        padding: 6px 8px;
    }

    /* Modal de gravação */
    .modal-gravacao .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .calendario-grid > div {
        grid-template-columns: repeat(7, minmax(100px, 1fr));
        min-width: 700px;
    }

    .dia-calendario {
        padding: 4px;
        min-height: 80px;
    }

    .dia-numero {
        font-size: 12px;
    }

    .gravacao-card-mini {
        font-size: 10px;
        padding: 4px 6px;
    }
}

/* ============================================
   KANBAN FILTROS - MOBILE COMPACTO
   ============================================ */

@media (max-width: 768px) {
    /* Filtros em accordion/collapsible */
    .kanban-filters {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        background: var(--gray-lighter);
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .kanban-filters .filter-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .kanban-filters .filter-group label {
        font-size: 12px;
        color: var(--gray);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .kanban-filters .filter-group select {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
        border: 1px solid var(--gray-light);
        background: white;
        min-height: 44px;
    }

    .kanban-filters .btn {
        width: 100%;
        padding: 10px;
        justify-content: center;
    }

    /* Navegador de mês mais compacto */
    .month-navigator-inline {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px;
        background: white;
        border-radius: 8px;
        border: 1px solid var(--gray-light);
    }

    .month-navigator-inline .nav-arrow {
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }

    .month-navigator-inline .current-month {
        font-size: 14px;
        font-weight: 600;
        min-width: 120px;
        text-align: center;
    }

    /* Header do Kanban */
    .kanban-header,
    .page-header-kanban {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
    }

    .kanban-header h1 {
        font-size: 18px;
    }

    /* Botão toggle filtros mobile */
    .toggle-filters-btn {
        display: flex;
        width: 100%;
        padding: 12px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
    }

    .kanban-filters.collapsed .filter-group,
    .kanban-filters.collapsed .btn,
    .kanban-filters.collapsed .month-navigator-inline {
        display: none;
    }

    .kanban-filters.collapsed .toggle-filters-btn {
        display: flex;
    }

    /* Cliente logo no Kanban */
    .kanban-client-logo {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .kanban-client-logo img {
        max-width: 40px;
        max-height: 40px;
    }

    .kanban-client-logo .client-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .kanban-filters {
        padding: 10px;
    }

    .kanban-filters .filter-group select {
        padding: 8px 10px;
        font-size: 13px;
    }

    .month-navigator-inline .current-month {
        font-size: 13px;
        min-width: 100px;
    }
}

/* ============================================
   MODAL DE DEMANDA - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .modal-demanda,
    .modal-detalhes-demanda {
        padding: 10px;
    }

    .modal-demanda .modal-content,
    .modal-detalhes-demanda .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-demanda .modal-header,
    .modal-detalhes-demanda .modal-header {
        padding: 16px;
        flex-shrink: 0;
        border-bottom: 1px solid var(--gray-light);
    }

    .modal-demanda .modal-body,
    .modal-detalhes-demanda .modal-body {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-demanda .modal-footer,
    .modal-detalhes-demanda .modal-footer {
        padding: 16px;
        flex-shrink: 0;
        border-top: 1px solid var(--gray-light);
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .modal-demanda .modal-footer .btn,
    .modal-detalhes-demanda .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* Formulário dentro do modal */
    .modal-demanda .form-row,
    .modal-detalhes-demanda .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .modal-demanda .form-group,
    .modal-detalhes-demanda .form-group {
        margin-bottom: 16px;
    }

    .modal-demanda input,
    .modal-demanda select,
    .modal-demanda textarea,
    .modal-detalhes-demanda input,
    .modal-detalhes-demanda select,
    .modal-detalhes-demanda textarea {
        font-size: 16px;
        padding: 12px;
        min-height: 44px;
    }

    /* Tabs dentro do modal */
    .modal-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        border-bottom: 1px solid var(--gray-light);
        margin: -16px -16px 16px -16px;
        padding: 0 16px;
    }

    .modal-tabs .tab-btn {
        flex-shrink: 0;
        padding: 12px 16px;
        white-space: nowrap;
    }
}

/* ============================================
   PÁGINA HEADER - MOBILE COMPACTO  
   ============================================ */

@media (max-width: 768px) {
    .page-header,
    .page-header-clean,
    .page-header-with-actions {
        padding: 12px 0;
        gap: 12px;
    }

    .page-header h1,
    .page-header-clean h1 {
        font-size: 18px;
        line-height: 1.3;
    }

    .header-left {
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        flex-shrink: 0;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 13px;
        justify-content: center;
    }

    .header-actions .btn span {
        display: none;
    }

    .header-actions .btn i {
        margin: 0;
    }
}

/* ============================================
   MODAL FIX - Z-INDEX E MOBILE
   ============================================ */

/* Modal base - garantir que funcione */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999 !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.active,
.modal.show {
    display: flex !important;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-lg {
    max-width: 900px;
}

.modal-content.modal-xl {
    max-width: 1200px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* Mobile modal fullscreen */
@media (max-width: 768px) {
    .modal {
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-content.modal-lg,
    .modal-content.modal-xl {
        max-width: 100%;
    }

    .modal-header {
        padding: 16px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-body {
        padding: 16px;
        flex: 1;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        position: sticky;
        bottom: 0;
        background: white;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode modal */
[data-theme="dark"] .modal-content {
    background: #1c1c1c;
    color: #e5e5e5;
}

[data-theme="dark"] .modal-header {
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .modal-footer {
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .modal-close {
    background: #2c2c2c;
    color: #e5e5e5;
}

[data-theme="dark"] .modal-close:hover {
    background: #3c3c3c;
}

/* ============================================
   CORREÇÕES FINAIS - 25/11/2025
   ============================================ */

/* FIX: Overlay deve sumir completamente quando inativo */
.sidebar-overlay {
    pointer-events: none;
}

.sidebar-overlay.active {
    pointer-events: auto;
}

/* FIX: Garantir que overlay não fique visível após fechar */
.sidebar-overlay:not(.active) {
    opacity: 0 !important;
    visibility: hidden !important;
    display: block !important;
    background: transparent !important;
}

/* FIX: Z-index hierarchy correto */
.top-header {
    z-index: 100;
}

.sidebar {
    z-index: 200;
}

.sidebar-overlay {
    z-index: 190;
}

.kanban-filters {
    position: relative;
    z-index: 10;
}

.kanban-wrapper {
    position: relative;
    z-index: 5;
}

/* Modal SEMPRE no topo */
.modal {
    z-index: 10000 !important;
}

.modal-content {
    z-index: 10001 !important;
}


.page-header,
.page-header-clean {
    position: relative;
    z-index: 10;
}

/* FIX: Botão Nova Demanda */
.btn-nova-demanda,
.btn-add-demanda {
    position: relative;
    z-index: 10;
}

/* FIX: Mobile - nada deve ficar na frente do modal */
@media (max-width: 768px) {
    .top-header {
        z-index: 100;
    }

    .sidebar {
        z-index: 1100;
    }

    .sidebar-overlay {
        z-index: 1050;
    }

    .mobile-menu-toggle {
        z-index: 1200;
    }

    /* Modal sempre no topo absoluto */
    .modal {
        z-index: 99999 !important;
    }

    .modal.active {
        z-index: 99999 !important;
    }

    .modal-content {
        z-index: 100000 !important;
    }

    /* Filtros não devem ter z-index alto */
    .kanban-filters {
        position: relative;
        z-index: 1 !important;
    }

    .page-header,
    .page-header-clean,
    .page-header-kanban {
        position: relative;
        z-index: 1 !important;
    }

    /* Main content */
    .main-content {
        position: relative;
        z-index: 1;
    }

    /* Nenhum elemento fixo exceto header e sidebar */
    .kanban-filters,
    .filter-group,
    .month-navigator-inline {
        position: relative !important;
    }
}