html {
    zoom:0,8 ;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0004ff;
    --primary-dark: #1eff00;
    --primary-light: #efff09;
    --brasil-yellow: #FEDD00;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ff0000;
    --gray-status: #6b7280;
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #fcf8f8;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Ocultar elementos quando estiver na página de relatórios */
.hide-on-reports {
    display: flex !important;
}

.reports-active .hide-on-reports {
    display: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.logo {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==== LOGO (fix) ==== */
.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brasil-yellow) 0%, #009739 100%);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    padding: 0;
    flex-shrink: 0;
}

.logo-icon .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.logo-text {
    flex: 1;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.nav-menu {
    flex: 1;
    padding: 16px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    padding: 0 12px;
    margin-bottom: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 4px;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
    color: var(--gray-700);
}

.menu-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.menu-item.active {
    background: linear-gradient( #2178f1) 100%;
    color: white;
    box-shadow: var(--shadow-md);
}

.menu-item.active .menu-icon {
    color: white;
}

.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.menu-item:hover .menu-icon {
    color: var(--primary);
}

.menu-item.active:hover .menu-icon {
    color: white;
}

.menu-text {
    flex: 1;
    font-size: 14px;
}

.notification-badge {
    background: var(--danger);
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.user-profile {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-profile-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.header {
    background: var(--white);
    padding: 20px 32px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    z-index: 5;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.header-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-container {
    display: block;
    position: relative;
}

.search-container.active {
    display: block;
}

.search-input {
    width: 320px;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.search-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

/* Filtros */
.filters-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    background: var(--gray-50);
    color: var(--gray-700);
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

/* PRINCIPAL ALTERAÇÃO: Kanban Board com scroll individual e horizontal */
.kanban-container {
    flex: 1;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kanban-board {
    display: flex;
    gap: 20px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 0;
    padding-bottom: 12px;
    height: 100%;
}

/* Estilização da scrollbar horizontal do kanban board */
.kanban-board::-webkit-scrollbar {
    height: 10px;
}

.kanban-board::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
    margin: 0 24px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

@keyframes pulse-right {
    0%, 70%, 100% {
        transform: translateX(0);
        opacity: 0.7;
    }
    35% {
        transform: translateX(4px);
        opacity: 1;
    }
}

@keyframes pulse-left {
    0%, 70%, 100% {
        transform: translateX(0);
        opacity: 0.7;
    }
    35% {
        transform: translateX(-4px);
        opacity: 1;
    }
}

.column {
    flex: 0 0 320px;
    min-width: 320px;
    max-width: 320px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.column-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 16px 16px 0 0;
    background: rgb(255, 255, 255);
    border-bottom: 2px solid var(--gray-200);
    flex-shrink: 0;
}

.column-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.column-count {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.novo .column-header {
    border-bottom-color: var(--primary);
}

.negociacao .column-header {
    border-bottom-color: var(--warning);
}

.operacao .column-header {
    border-bottom-color: #3b82f6;
}

.aguardando .column-header {
    border-bottom-color: var(--gray-status);
}

.pago .column-header {
    border-bottom-color: var(--success);
}

.cancelado .column-header {
    border-bottom-color: var(--danger);
}

/* NOVA ESTRUTURA: Área de cards com scroll individual */
.cards-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    min-height: 0;
    max-height: 100%;
}

/* Estilização do scrollbar para ficar mais elegante */
.cards-container::-webkit-scrollbar {
    width: 8px;
}

.cards-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
    margin: 4px 0;
}

.cards-container::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.cards-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.card.negociacao::before {
    background: var(--warning);
}

.card.operacao::before {
    background: #3b82f6;
}

.card.aguardando::before {
    background: var(--gray-status);
}

.card.pago::before {
    background: var(--success);
}

.card.cancelado::before {
    background: var(--danger);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.card-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-priority {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-300);
}

.card-priority.high {
    background: var(--danger);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.card-company {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 8px;
}

.card-company-icon {
    width: 14px;
    height: 14px;
    color: var(--gray-400);
}

.card-requester {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
    color: var(--pill-fg, var(--primary));
    background: var(--pill-bg, rgba(0, 4, 255, .10));
    border: 1px solid var(--pill-br, transparent);
}

.card-requester-icon {
    width: 14px;
    height: 14px;
    color: var(--pill-fg, var(--primary));
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-500);
}

.card-meta-icon {
    width: 14px;
    height: 14px;
    color: var(--gray-400);
}

.overdue-badge {
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.overdue-badge.warning {
    background: var(--warning);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.info-section {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.note-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: all 0.2s ease;
}

.note-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.note-button {
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.history-list {
    margin-top: 20px;
}

.history-item {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.history-text {
    font-size: 14px;
    color: var(--gray-900);
    line-height: 1.5;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
}

.status-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.status-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-negociacao {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.btn-operacao {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.btn-aguardando {
    background: linear-gradient(135deg, var(--gray-status) 0%, #4b5563 100%);
    color: white;
}

.btn-pago {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-cancelado {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: #fff;
}

.edit-button,
.save-button,
.cancel-button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-button {
    background: var(--gray-200);
    color: var(--gray-700);
}

.edit-button:hover {
    background: var(--gray-300);
}

.save-button {
    background: var(--success);
    color: white;
}

.save-button:hover {
    background: #059669;
}

.cancel-button {
    background: var(--danger);
    color: white;
}

.cancel-button:hover {
    background: #dc2626;
}

.info-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.info-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    display: none;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.show {
    display: flex;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-icon.success {
    color: var(--success);
}

.toast-icon.error {
    color: var(--danger);
}

.toast-icon.warning {
    color: var(--warning);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--gray-600);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.chip.city {
    background: #eef2ff;
    border-color: #e0e7ff;
    color: #3730a3;
}

.chip.source {
    background: #ecfeff;
    border-color: #cffafe;
    color: #0e7490;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
}

.info-item {
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--gray-50);
}

.info-item .info-label {
    width: auto;
    display: block;
    margin: 0 0 6px 0;
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
}

.info-item .info-value {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 500;
}

.info-item .info-input {
    width: 100%;
}

.site-footer {
    flex-shrink: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 14px 32px;
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.site-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .kanban-board {
        flex-direction: column;
        overflow-y: auto;
    }

    .column {
        min-width: unset;
        max-height: 400px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }
}

/* Pílula base */
.company-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* Cores por empresa */
.company-pill--globalis {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

.company-pill--casa-do-agente {
    background: #F3E8FF;
    border-color: #E9D5FF;
    color: #9333EA;
}

.company-pill--ad-turismo {
    background: #D1FAE5;
    border-color: #A7F3D0;
    color: #059669;
}

.company-pill--unknown {
    background: #F1F5F9;
    border-color: #E2E8F0;
    color: #475569;
}

.company-pill svg {
    width: 14px;
    height: 14px;
    opacity: .9;
}

/* Coluna Operação (azul escuro) */
.operacao .column-header {
    border-bottom-color: #3b82f6;
}

.card.operacao::before {
    background: #3b82f6;
}

.btn-operacao {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

/* Botão do header para alternar a sidebar */
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    cursor: pointer;
    transition: transform .06s ease, filter .15s ease, box-shadow .2s ease;
}

.sidebar-toggle:hover {
    box-shadow: var(--shadow);
}

/* Sidebar colapsada */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .user-info,
.sidebar.collapsed .notification-badge {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
}

.sidebar.collapsed .menu-icon {
    margin-right: 0;
}

.sidebar.collapsed .user-avatar {
    margin: 0 auto;
}

/* ===== Sidebar colapsada: centraliza tudo ===== */
.sidebar.collapsed .logo-wrapper {
    justify-content: center;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 10px 0;
}

.sidebar.collapsed .menu-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .nav-section-title {
    display: none;
}

/* Badge/bolinha sobre o ícone quando colapsado */
.sidebar.collapsed .notification-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    transform: none;
    display: inline-flex;
}

/* opcional: mantém o ícone do app perfeitamente centralizado */
.sidebar.collapsed .app-icon {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .menu-item .notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    transform: none;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 0 0 2px #fff;
}

/* O contêiner do ícone precisa ser relativo para ancorar o badge */
.app-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Badge no canto superior direito do ícone */
.app-icon .notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    transform: none;
    z-index: 2;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 0 0 2px #fff;
}

/* Quando a sidebar estiver colapsada, mantém o badge preso ao canto do ícone */
.sidebar.collapsed .app-icon .notification-badge {
    top: -6px;
    right: -6px;
}

/* Coluna e cards cancelados */
.column.cancelado .column-header {
    border-bottom-color: var(--danger);
}

.card.cancelado {
    opacity: .65;
    filter: grayscale(80%);
    cursor: not-allowed;
    background: #f8fafc;
}

.card.cancelado::before {
    background: var(--danger);
}

.card.cancelado .card-title {
    text-decoration: line-through;
    color: var(--gray-500);
}

/* Botão de status "Cancelar" (no rodapé do modal) */
.btn-cancelado {
    background: linear-gradient(135deg, #ff0000 0%, #ff0000 100%);
    color: #fff;
}

.card {
    position: relative;
}

.card-badge-mini {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
    opacity: .85;
    pointer-events: none;
}

/* Estilos adicionais para o botão de logout */
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: rgb(255, 255, 255);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar.collapsed .logout-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    justify-content: center;
}

.sidebar.collapsed .logout-btn span {
    display: none;
}

.sidebar.collapsed .user-profile {
    flex-direction: column;
    gap: 8px;
}

.company-pill--origem {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-block;
    margin-top: 4px;
}

/* === RELATÓRIOS === */
.reports-container {
    padding: 24px 0 24px 24px;
    max-width: 100%;
    margin: 0;
    overflow-y: auto;
    height: calc(100vh - 140px);
    position: relative;
    width: 100%;
}

.report-header {
    margin-bottom: 24px;
    padding: 0 24px 0 0;
}

.report-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.report-subtitle {
    font-size: 13px;
    color: var(--gray-500);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
    padding-right: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-card.info {
    border-left-color: #3b82f6;
}

.stat-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    padding-right: 24px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    min-height: 380px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
    min-height: 450px;
}

.chart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-container.tall {
    height: 360px;
}

.company-filter-section {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    margin-right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label-report {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.filter-select-report {
    padding: 8px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 13px;
    background: var(--gray-50);
    color: var(--gray-700);
    outline: none;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.2s ease;
}

.filter-select-report:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

@keyframes fadeInReport {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reports-container::-webkit-scrollbar {
    width: 10px;
}

.reports-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 0;
    margin: 0;
}

.reports-container::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 0;
    transition: background 0.2s ease;
}

.reports-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Responsividade para telas menores */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .reports-container {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-container {
        height: 240px;
    }

    .chart-container.tall {
        height: 300px;
    }

    .company-filter-section {
        padding: 12px 16px;
    }
}


/* Barra de rolagem para o campo Extras */
.info-item .info-value {
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Estilização da scrollbar para extras */
.info-item .info-value::-webkit-scrollbar {
    width: 6px;
}

.info-item .info-value::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

.info-item .info-value::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 10px;
}

.info-item .info-value::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Textarea de Extras no modo de edição */
#editExtras {
    min-height: 80px;
    max-height: 120px;
    resize: vertical;
}