:root {
    --primary: #FF9900;
    --primary-light: #FFB347;
    --secondary: #2563eb;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-main: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Variáveis de Layout Ultra Slim (Efeito 75% Real) */
    --sidebar-width: 220px;
    /* Reduzido de 280px original */
    --sidebar-collapsed-width: 60px;
    /* Reduzido de 80px original */
    --transition-speed: 0.3s;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.view-btn {
    border: none;
    background: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: var(--primary);
}

.view-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-container {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 1.5rem;
}

.card-actions, .table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.card-actions {
    justify-content: flex-start;
}

.table-actions {
    justify-content: flex-end;
    white-space: nowrap;
}

html {
    font-size: 13px;
    /* Reduzido drasticamente de 16px original */
}

/* Tela de Login */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.login-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicadores de Atraso e Ritmo */
.atividade-card.delayed {
    border-left: 5px solid var(--error) !important;
    background: #fffafa !important;
}

.atividade-card.delayed h4 {
    color: #b91c1c;
}

.unit-cell.delayed {
    border: 2px solid var(--error) !important;
    animation: pulse-red 2s infinite;
}

.unit-cell.delayed-blink {
    border: 2px solid var(--error) !important;
    background: #fee2e2 !important;
    animation: blink-red 1s infinite alternate;
}

@keyframes blink-red {
    from {
        background: #fee2e2;
        border-color: var(--error);
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }

    to {
        background: #ffffff;
        border-color: transparent;
        box-shadow: none;
    }
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.ritmo-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.obra-arquivada {
    opacity: 0.6;
    filter: grayscale(0.85);
    transition: all 0.3s ease;
}

.obra-arquivada:hover {
    opacity: 0.8;
    filter: grayscale(0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-body);
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 1rem 0.5rem;
    /* Ajustado para Ultra Slim */
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
    position: relative;
    transition: all 0.3s ease;
    overflow: visible;
    z-index: 100;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 1rem 0;
    /* Ajustado para Ultra Slim */
    align-items: center;
    overflow: visible !important;
}

.main-content {
    flex-grow: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    /* Compactação agressiva de padding lateral e superior */
    /* Ajustado para consistência */
}

.sidebar-toggle {
    position: absolute;
    top: 20px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle {
    right: -15px;
    z-index: 1001;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    background: #e68a00;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    /* Compactado */
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    /* Reduzido */
    transition: all 0.3s ease;
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar.collapsed .logo {
    justify-content: center;
    padding: 0;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    width: 100%;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    margin: 1px 4px;
    /* Área de navegação ultra compacta */
}

nav a i {
    font-size: 1.25rem;
    width: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
    z-index: 2;
}

nav a span {
    z-index: 2;
    transition: opacity 0.2s ease;
}

nav a:hover,
nav a.active {
    background: transparent;
    color: var(--primary);
    font-weight: 600;
}

nav a.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
    z-index: 10;
}

/* Unificado para evitar redundância */

/* ========================================
   ESTILOS PARA O MENU COLAPSADO (FINAL)
   ======================================== */

/* 1. PROTEÇÃO DE PERMISSÕES: Se o JS escondeu o item, o CSS não desesconde */
.sidebar.collapsed nav a[style*="display: none"],
.sidebar.collapsed nav a[style*="display:none"] {
    display: none !important;
}

.sidebar.collapsed .logo {
    justify-content: center;
    padding: 0;
}

/* 2. CENTRALIZAÇÃO E LAYOUT DO LINK */
.sidebar.collapsed nav a {
    margin: 4px auto;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex !important;
    /* Forçado para centralizar, mas protegido pela regra acima */
    justify-content: center !important;
    align-items: center !important;
    gap: 0;
    border-radius: 10px;
    position: relative;
    overflow: visible;
    font-size: 0 !important;
    /* Estratégia ZERO FONT: Esconde textos mesmo que estejam fora de spans */
}

/* 3. PADRONIZAÇÃO DO ÍCONE (1.25rem FORCE) */
.sidebar.collapsed nav a i {
    margin: 0 !important;
    min-width: unset;
    font-size: 1.25rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 4. OCULTAÇÃO ABSOLUTA DE TEXTOS (SEM VAZAMENTOS) */
.sidebar.collapsed nav a span,
.sidebar.collapsed .logo span,
.sidebar.collapsed .sidebar-footer div,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed span {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
}

/* 5. INDICADOR ATIVO (BARRA LARANJA) PRESA NA BORDA ESQUERDA */
.sidebar.collapsed nav a.active::before {
    left: -9px !important;
    /* (60px sidebar / 2) - (42px item / 2) = 9px para encostar */
    height: 24px !important;
    width: 4px !important;
    background: var(--primary) !important;
    z-index: 50 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 6. BOTÕES DO FOOTER */
.sidebar.collapsed .sidebar-footer button {
    padding: 0;
    width: 42px;
    height: 42px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-footer button i {
    margin: 0 !important;
    font-size: 1.25rem !important;
}


#navMarketplace i {
    color: #2ecc71;
    /* Mantém o ícone verde apenas, mas herda todo o resto */
}

#navMarketplace:hover i,
#navMarketplace.active i {
    color: var(--primary);
    /* No hover/ativo, segue o padrão laranja */
}

.sidebar-footer {
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.1);
    outline: none;
}

.btn-secondary {
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

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

/* Main Content */

/* Tabs System */
.tabs-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* Sub-tabs for specific pages (like Ativos) */
.tabs-sub-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    /* Reduzido de 2rem */
    background: #f1f5f9;
    padding: 0.3rem;
    /* Reduzido de 0.4rem */
    border-radius: 12px;
    width: fit-content;
}

.tab-sub-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.25rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.tab-sub-btn:hover {
    color: var(--text-main);
}

.tab-sub-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notif-badge {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-left: 4px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.search-bar {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 400px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.header-selector {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.header-selector:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

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

.header-selector select {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-weight: 500;
}

/* ========================================
   SINO DE NOTIFICAÇÕES
   ======================================== */
.notification-bell {
    position: relative;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 1rem;
    z-index: 1001;
    /* Maior que o perfil do usuário (que é relativo sem z-index) */
}

.notification-bell:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.notification-bell i {
    pointer-events: none;
}

/* Animação de "chacoalhar" quando há notificações novas */
.notification-bell.has-new i {
    animation: bell-shake 0.5s ease infinite alternate;
    color: var(--primary);
}

@keyframes bell-shake {
    0% {
        transform: rotate(-15deg);
    }

    100% {
        transform: rotate(15deg);
    }
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    pointer-events: none;
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

/* Dropdown de notificações */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: -10px;
    width: 380px;
    max-height: 480px;
    background: white;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    z-index: 10002;
    /* Muito alto para ficar por cima de tudo */
    overflow: hidden;
}

.notification-dropdown.open {
    display: flex;
    animation: dropdown-enter 0.2s ease;
}

@keyframes dropdown-enter {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
}

.btn-link-mini {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-link-mini:hover {
    opacity: 0.7;
}

#notificationList {
    overflow-y: auto;
    max-height: 400px;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.notification-empty i {
    font-size: 2rem;
    color: #22c55e;
    opacity: 0.5;
}

/* Cards de Notificação */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s;
    position: relative;
}

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

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

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

.notification-unread-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

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

.notification-icon.convite {
    background: #dbeafe;
    color: var(--primary);
}

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

.notification-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 0.15rem;
}

.notification-msg {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.7rem;
    color: #94a3b8;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-aceitar {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-aceitar:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-recusar {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-recusar:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Perfil do Usuário e Dropdown */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all 0.3s ease;
    user-select: none;
}

.profile-trigger:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    background: #fff7ed;
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.profile-info-header {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.dropdown-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 5px;
    transition: transform 0.3s ease;
}

#userProfileDropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    z-index: 1000;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#userProfileDropdown.active .profile-dropdown {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-header {
    padding: 0.75rem 1rem;
}

.dropdown-user-email {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-company-name {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 5px 0;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.logout-item {
    color: #ef4444;
}

.logout-item:hover {
    background: #fef2f2;
}

.btn-icon.delete {
    color: #ef4444;
}

.btn-icon.delete:hover {
    background: #fee2e2;
}

/* Estilos para o Triple Panel de Contratos */
.side-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.side-panel-item {
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.side-panel-item:hover {
    border-color: var(--primary);
    background: #f1f5f9;
}

.side-panel-item.active {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.side-panel-item b {
    color: var(--text-main);
    font-size: 0.95rem;
}

.side-panel-item small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.asset-detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.asset-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.asset-detail-info h5 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.asset-detail-info p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}
/* Settings Page Redesign */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.settings-card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.info-group {
    margin-bottom: 1.25rem;
}

.info-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.info-group p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Billing Card Styles */
.plan-status-badge {
    background: #fff7ed;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px dashed var(--primary);
}

.badge-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
}

.plan-status-badge h2 {
    color: var(--primary);
    margin: 5px 0 0;
}

.unidade-cell .ocupante-tag {
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
    background: rgba(37, 99, 235, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Marcador de Comentário Sutil (três pontos) */
.comment-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    line-height: 0.5;
    color: #94a3b8;
    letter-spacing: 2px;
    opacity: 0.5;
    pointer-events: none;
    font-weight: bold;
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1rem;
}

.billing-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.upgrade-btn {
    width: 100%;
}

.members-intro {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 1.6rem;
    /* Mais compacto */
    margin-bottom: 0.15rem;
}

.content-header p {
    color: var(--text-muted);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-card i {
    font-size: 2.2em;
    color: var(--primary);
    background: #fff7ed;
    padding: 15px;
    border-radius: 16px;
}

.stat-card.warning i {
    color: var(--warning);
    background: #fffbeb;
}

.stat-card.danger i {
    color: #ef4444;
    background: #fef2f2;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-card .value {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--text-main);
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}

.item-card.devolved {
    opacity: 0.5;
    transform: scale(0.98);
}

.item-card.devolved:hover {
    opacity: 0.8;
}

.badge-devol {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Inventory Grid */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.item-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.item-id {
    font-size: 0.75rem;
    background: rgba(255, 153, 0, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 10px;
    font-weight: 600;
}

.item-desc {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.ativo-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.75rem;
    border-radius: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item i {
    color: var(--primary);
    margin-right: 4px;
}

.ativo-dates {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.5rem;
}

.date-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.date-item i {
    color: var(--text-muted);
    margin-right: 4px;
}

.ativo-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.croqui-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: stretch;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
}

.pavimento-label {
    background: #f8fafc;
    border-right: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}


.metric-box {
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.metric-box.obra-days {
    background: rgba(50, 152, 220, 0.1);
    color: #209cee;
    border: 1px solid rgba(50, 152, 220, 0.2);
}

.metric-box.paid-days {
    background: rgba(72, 199, 116, 0.1);
    color: #48c774;
    border: 1px solid rgba(72, 199, 116, 0.2);
}

.metric-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.8;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 800;
}

.metric-value small {
    font-size: 0.75rem;
    font-weight: 500;
}

.devolucao-real-row {
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-stock {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-use {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Estilos para Agrupamento por Obra */
.obra-group-header {
    grid-column: 1 / -1;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.5s ease;
}

.obra-group-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.obra-group-count {
    font-size: 0.85rem;
    background: rgba(255, 153, 0, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Modern Table */
.table-container {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.modern-table th {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.modern-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Modal e Forms */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border);
    margin: 2% auto;
    padding: 3rem;
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    border-radius: 32px;
    position: relative;
    box-shadow: 0 25px 70px -12px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-main);
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.modern-input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.modern-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modern-input:read-only {
    background-color: #f1f5f9;
    color: var(--text-muted);
    cursor: not-allowed;
}

.modern-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.modern-input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.croqui-config-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 1rem;
    height: 100%;
}

.floor-config-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 40px 40px;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    margin-bottom: 0.5rem;
    align-items: center;
    transition: all 0.2s ease;
}

.floor-config-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.floor-config-row input[type="text"],
.floor-config-row input[type="number"] {
    padding: 0.5rem 0.75rem !important;
    height: 38px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

.floor-config-row .checkbox-group {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floor-config-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-remove-floor {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-floor:hover {
    background: #ef4444;
    color: white;
}

.btn-replicate-floor {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #e0f2fe;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-replicate-floor:hover {
    background: #0ea5e9;
    color: white;
}

.floors-list-container::-webkit-scrollbar {
    width: 6px;
}

.floors-list-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.floors-list-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.badge-stock {
    background: #ecfdf5;
    color: #059669;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-use {
    background: #fffbeb;
    color: #d97706;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-returned {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Alertas de Atraso */
.delayed-card {
    border: 2px solid #ff4d4d !important;
    position: relative;
    overflow: hidden;
}

.alert-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(255, 77, 77, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 10;
    pointer-events: none;
    border: 3px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.return-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 45px;
    transform: rotate(45deg);
    font-size: 0.65rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Estilos de Botão Pequeno */
.btn-sm {
    padding: 4px 12px !important;
    font-size: 0.82rem !important;
    height: auto !important;
    width: auto !important;
    min-height: unset !important;
    border-radius: 8px !important;
}

/* Mobile Responsiveness */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
        /* Em telas pequenas o menu fica em cima ou some */
    }

    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        width: 280px;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
    }

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

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .search-bar,
    .header-selector {
        width: 100%;
    }

    .user-profile {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr !important;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95% !important;
        margin: 10% auto;
        padding: 1.5rem;
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Estilos para Impressão */
@media print {

    .sidebar,
    header,
    .filters-bar,
    .actions,
    .btn-icon,
    .card-actions,
    #debug-panel,
    .btn-primary,
    .btn-secondary,
    .btn-sm {
        display: none !important;
    }

    .app-container {
        display: block !important;
        width: 100% !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .modern-table {
        box-shadow: none !important;
        border: 1px solid #333 !important;
        width: 100% !important;
    }

    .page {
        display: none !important;
    }

    .page.active {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .badge {
        border: 1px solid #000 !important;
        color: black !important;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }
}

/* Notificações (Toasts) */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 10002;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 5px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: #ff4d4d;
}

.toast.warning {
    border-left-color: #f39c12;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-exit {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

/* Customização do Calendário no Dash */
.fc {
    --fc-border-color: var(--border) !important;
    --fc-button-bg-color: var(--primary) !important;
    --fc-button-border-color: var(--primary) !important;
    --fc-today-bg-color: rgba(255, 153, 0, 0.05) !important;
}

.fc .fc-toolbar-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.fc-event {
    cursor: pointer;
    border: none !important;
    padding: 2px 4px;
    font-size: 0.75rem;
}

.fc .fc-toolbar {
    margin-bottom: 0.5rem !important;
}

.fc .fc-button {
    padding: 2px 8px !important;
    font-size: 0.7rem !important;
    border-radius: 8px !important;
}

.fc-event-title-container {
    font-size: 0.7rem !important;
}

/* Gestão de Equipes */
.equipes-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    /* Sincronizado com min-width da sidebar */
    /* Largura percentual para fluidez total */
    gap: 2rem;
    /* Aumentado para dar respiro entre quadros */
    height: calc(100vh - 180px);
    /* Ganhamos altura com os paddings menores */
    min-height: 400px;
    width: 100%;
    margin-bottom: 0;
}

.equipes-sidebar {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 240px;
    /* Ajustado para bater com o grid */
}

.equipes-board {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    /* Garante que preencha o layout */
}

.card-header-mini {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.card-header-mini h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header-mini p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empreiteiros-container,
.atividades-board-container {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

/* Accordion de Empreiteiros */
.empreiteiro-item {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.empreiteiro-header {
    background: #fff;
    padding: 0.85rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.empreiteiro-name-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empreiteiro-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.empreiteiro-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.meta-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
}

.team-size-badge {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.empreiteiro-header:hover {
    background: #f1f5f9;
}

.colaboradores-list {
    padding: 0.5rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.colaboradores-list.collapsed {
    display: none;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

/* Histórico de OS na Sidebar */
.os-history-section {
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

.os-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    transition: background 0.2s;
}

.os-history-header:hover {
    background: #e2e8f0;
}

.os-history-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.os-history-list.collapsed {
    display: none;
}

.os-item-sidebar {
    background: white;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.os-item-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
}

.os-item-sidebar-title {
    font-weight: 700;
    color: var(--primary);
}

.os-item-sidebar-desc {
    font-size: 0.65rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-item-sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.os-item-sidebar-date {
    font-size: 0.6rem;
    color: #94a3b8;
}

/* Card de Colaborador (Draggable) */
.colaborador-card {
    background: #fff;
    padding: 0.5rem;
    /* Reduzido de 0.75rem */
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reduzido de 10px */
    transition: all 0.2s;
}

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

.colaborador-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.colaborador-card .avatar-mini {
    width: 28px;
    /* Reduzido de 32px */
    height: 28px;
    /* Reduzido de 32px */
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    /* Reduzido de 0.8rem */
    font-weight: 700;
}

.colaborador-info b {
    display: block;
    font-size: 0.8rem;
}

.colaborador-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Atividade Card (Drop Zone) */
/* Kanban Board Gamificado */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    /* Reduzido minmax de 280px */
    /* Minimal width for columns */
    gap: 0.75rem;
    /* Reduzido de 1rem */
    padding: 0.75rem 0.5rem;
    /* Adicionado padding lateral */
    flex: 1;
    /* Ocupa o espaço restante do painel */
    min-height: 0;
    /* Permite encolher sem forçar scroll externo */
    align-items: stretch;
    /* Garante que as colunas tenham a mesma altura */
    overflow-x: auto;
    /* Allow horizontal scroll if columns too wide */
}

.kanban-column {
    background: rgba(248, 250, 252, 0.5);
    border-radius: 20px;
    padding: 1rem 0.65rem;
    /* Reduzido levemente */
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    /* Segue a altura do board stretch */
    min-height: 0;
    /* Removido min-height fixo */
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
    /* Force children to stay within bounds */
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.column-header i {
    font-size: 1.2rem;
}

.column-header span {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* Temas das Colunas */
.column-header.missions {
    color: #3b82f6;
}

.column-header.combat {
    color: #f59e0b;
}

.column-header.victory {
    color: #10b981;
}


.unidade-popover {
    max-height: 90vh !important;
    overflow-y: auto !important;
}

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    /* Proper padding for hover effect WITHOUT negative margins */
    padding: 10px;
    margin: 0;
}


/* Custom Scrollbars para as Colunas */
.column-cards::-webkit-scrollbar {
    width: 6px;
}

.column-cards::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
}

.column-cards::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.column-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Efeito Turbo Mode (Sprint Ativo) */
.atividade-card.turbo-active {
    border: 2px solid transparent;
    background-image: linear-gradient(#fff, #fff), linear-gradient(45deg, #f0abfc, #3b82f6, #06b6d4);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    animation: turbo-pulse 2s infinite ease-in-out;
}

@keyframes turbo-pulse {
    0% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    }

    100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    }
}

.atividade-card.turbo-active .card-body h4::after {
    content: ' 🚀';
    font-size: 0.9em;
}

/* Gamified Card Style */
.atividade-card {
    background: #fff;
    border-radius: 12px;
    padding: 0.6rem;
    /* Reduzido de 0.75rem */
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
    /* Prevent internal clipping */
    cursor: grab;
    height: auto;
    /* Allow growth */
    display: flex;
    flex-direction: column;
}

.atividade-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    z-index: 10;
    /* Bring to front on hover to avoid overlap issues */
}

/* Combat Mode (Em execução) */
.kanban-column#col-progress .atividade-card {
    border-left: 5px solid #f59e0b;
    background: linear-gradient(to right, #ffffff, #fffdfa);
}

.kanban-column#col-progress .atividade-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.05);
    pointer-events: none;
}

/* Victory Mode (Concluído) */
.kanban-column#col-done .atividade-card {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.kanban-column#col-done .atividade-card h4 {
    color: #065f46;
}

/* XP Bar (Gamified Progress) */
.xp-bar-container {
    margin-top: 0.6rem;
    /* Reduzido de 0.75rem */
    background: #f1f5f9;
    height: 6px;
    /* Reduzido de 8px */
    border-radius: 3px;
    /* Ajustado de 4px */
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.xp-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.kanban-column#col-progress .xp-bar-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.kanban-column#col-done .xp-bar-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: xp-shine 2s infinite linear;
}

@keyframes xp-shine {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.atividade-card .card-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.atividade-card:hover .card-actions {
    opacity: 1;
}

.status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pendente {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.em_andamento {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.concluido {
    background: #dcfce7;
    color: #166534;
}

/* Layout do Croqui 2.0 com Sidebar */
/* Layout do Croqui 2.0 com Abas */
.croqui-tabs-wrapper {
    background: #fff;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.croqui-header-tabs {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.croqui-header-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.search-tabs-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    gap: 0.75rem;
    width: 220px;
    flex-shrink: 0;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.search-tabs-box:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-tabs-box i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-tabs-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-main);
}

.croqui-tabs-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    /* Garantir que fiquem em uma linha */
    padding: 0.25rem 0.5rem;
    flex: 1;
    cursor: grab;
    /* Cursor de mão para arraste */
    scrollbar-width: none;
    /* Ocultar scrollbar no Firefox */
    -ms-overflow-style: none;
    /* Ocultar no IE/Edge */
    user-select: none;
    /* Evitar seleção de texto durante arraste */
}

.croqui-tabs-container:active {
    cursor: grabbing;
}

.croqui-tabs-container::-webkit-scrollbar {
    display: none;
    /* Ocultar scrollbar no Chrome/Safari */
}

.croqui-tab-item {
    padding: 0.6rem 1.2rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    /* Impedir que as abas encolham */
}

.croqui-tab-item i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.croqui-tab-item:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.croqui-tab-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.croqui-tab-item.active i {
    opacity: 1;
}

/* Turbo Mode nas Abas */
.croqui-tab-item.turbo-active {
    border-color: #f59e0b;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    /* Texto em branco */
    position: relative;
    overflow: hidden;
}

.croqui-tab-item.turbo-active i {
    color: white;
    /* Ícone em branco */
    opacity: 1;
}

.croqui-layout-full {
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.croqui-main-content {
    flex: 1;
    padding: 1rem;
    overflow: visible;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.loading-placeholder-mini {
    padding: 0.5rem;
    color: var(--primary);
}

/* Removemos .activity-nav-item pois agora usamos abas */

.croqui-container {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: none;
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.croqui-grid-wrapper {
    flex: 1;
    overflow: visible;
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
}

.mini-dropzone {
    margin-top: 0.75rem;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    min-height: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border: 1px dashed rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
    /* Ensure content stays within and expands vertically */
    overflow: visible;
}

.mini-dropzone:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--primary-light);
}

.colaborador-tag.compact {
    padding: 3px 8px;
    /* Slightly more breathe room */
    font-size: 0.65rem;
    border-radius: 6px;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.colaborador-tag.compact .tag-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    /* Allow to grow and be truncated */
    min-width: 0;
}

.colaborador-tag.compact .remove-btn {
    flex-shrink: 0;
    /* Never hide the remove button */
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
}

.colaborador-tag.compact i {
    font-size: 0.6rem;
}

.mini-dropzone .drop-placeholder {
    font-size: 0.6rem;
    padding: 4px;
    opacity: 0.5;
}

/* Animação para novos cards no Kanban */
@keyframes card-entrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.atividade-card {
    animation: card-entrance 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.croqui-container {
    display: grid;
    grid-template-columns: 1fr;
    /* Full width now! */
    gap: 1.5rem;
    height: auto;
    min-height: 500px;
    overflow: visible;
    padding-bottom: 20px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.croqui-toolbar {
    grid-column: 1;
    background: #fff;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.croqui-toolbar .form-group label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

#btnStartPlanning {
    background: linear-gradient(135deg, var(--secondary) 0%, #d97706 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

#btnStartPlanning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.3);
    filter: brightness(1.1);
}

.toolbar-group {
    margin: 0;
    min-width: 180px;
    flex: 1;
    max-width: 350px;
}

.toolbar-group label {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.card-header-mini .btn-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

.croqui-grid-wrapper {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: auto;
    /* Mudamos para auto para suportar croquis largos */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centraliza as rows */
    gap: 0;
    /* As rows já tem padding e border */
    min-height: 400px;
    width: 100%;
}


/* Animação de Celebração (100% concluído) */
@keyframes celebrate-glow {
    0% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(34, 197, 94, 0.8), 0 0 10px rgba(250, 204, 21, 0.5);
    }

    100% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
    }
}

.celebrate-meta {
    animation: celebrate-glow 2s infinite ease-in-out;
    border: 2px solid #22c55e !important;
}

.unidades-container {
    display: grid;
    /* Usa a variável --grid-cols injetada pelo JS ou padrão 4 */
    grid-template-columns: repeat(var(--grid-cols, 4), 80px);
    gap: 12px;
    padding: 10px;
    width: fit-content;
    margin: 0 auto;
}

.croqui-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    /* Largura fixa para o label */
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    transition: background 0.3s ease;
}

.croqui-row:hover {
    background: rgba(248, 250, 252, 0.8);
}

.pavimento-label {
    min-width: 120px;
    text-align: right;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid Livre e Edição */
.croqui-free-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    justify-content: center;
    min-height: 200px;
}

.grid-edit-mode .unidade-cell {
    cursor: move;
    border: 2px dashed #94a3b8;
}

.grid-edit-mode .unidade-cell:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}

.grid-ghost {
    opacity: 0.3;
    background: var(--primary-light) !important;
}

.dragging {
    opacity: 0.5;
}

.croqui-row.special-pav .unidades-container {
    background: rgba(30, 64, 175, 0.05);
    /* Um azul sutil para diferenciar */
    border-radius: 12px;
    padding: 5px;
    width: fit-content;
    margin: 0 auto;
}

.unidade-cell {
    width: 80px;
    /* Reduzido de 100px para caber mais unidades por linha */
    height: 80px;
    /* Reduzido de 100px */
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    /* Ajustado */
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Efeito Bouncy */
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    user-select: none;
}

.unidade-cell:hover {
    border-color: var(--primary);
    background: #fff;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.unidade-cell:active {
    transform: scale(0.95);
}

.unidade-cell.drag-over {
    background: #fffbeb;
    border: 2px dashed #f59e0b;
}

.unidade-cell b {
    font-size: 0.75rem;
}

/* Unidade Especial: Escada / Hall */
.unidade-cell.special-unit {
    background: #f1f5f9;
    width: 70px;
    /* Mais estreito para não atrapalhar o grid */
    border-style: dashed;
    color: #475569;
}

.unidade-cell.special-unit b {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.unidade-cell .ocupante-tag {
    background: var(--primary);
    color: #fff;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    margin-top: 6px;
    max-width: 75px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.unidade-cell .remove-ocupante {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: pointer;
    z-index: 10;
}

.unidade-cell:hover .remove-ocupante {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* --- Estilos para Assinatura e Fotos --- */
.signature-container {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    position: relative;
}

.signature-pad {
    width: 100%;
    height: 150px;
    cursor: crosshair;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    touch-action: none;
}

.signature-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 5px;
}

.photo-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photo-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-item .remove-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 77, 77, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Removido ícone azul (toggle-done-unidade) conforme solicitado para evitar sobreposição */
/* Restaurado ícone de conclusão (toggle-done-unidade) no canto superior esquerdo */
.toggle-done-unidade {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    background: #3b82f6;
    /* Azul vibrante */
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 15;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #fff;
}

.unidade-cell:hover .toggle-done-unidade {
    display: flex;
}

.toggle-done-unidade:hover {
    transform: scale(1.2);
    background: #2563eb;
}

.unidade-cell.concluido {
    background: #f0fdf4;
    border-color: #22c55e;
    animation: success-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes success-pop {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.unidade-cell.ocupado {
    background: #fffbeb;
    border-color: #f59e0b;
    animation: status-change 0.3s ease-out;
}

@keyframes status-change {
    0% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.unidade-cell.concluido .ocupante-tag {
    background: #22c55e;
}

.unidade-cell.concluido .toggle-done-unidade {
    background: #10b981;
    /* Verde ao estar concluído */
    display: flex;
    /* Sempre visível se concluído */
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.unidade-cell:hover .toggle-done-unidade {
    display: flex;
}

/* Estilos para Alocação por Equipe */
.colaborador-card.team-drag-card {
    background: #f0f7ff;
    border: 2px dashed var(--primary);
}

.colaborador-tag.team-tag {
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Estilos para EAP Inteligente e Progresso */
.atividade-progress-section {
    margin: 1rem 0;
}

.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar-fill {
    height: 100%;
    transition: width 0.5s ease-out;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.alert-status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Estilos para Planejamento de Metas (Sprints) */
.planning-banner {
    grid-column: span 2;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 6px solid var(--secondary);
    animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.planning-info h3 {
    margin: 0;
    color: var(--secondary);
    font-size: 1.2rem;
}

.planning-info p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.planning-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.planning-controls .date-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.planning-controls .modern-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Efeito no Mapa em Modo Planejamento */
.planning-active .unidade-cell {
    opacity: 0.5;
    filter: grayscale(0.4);
    transform: scale(0.96);
    transition: all 0.2s;
}

.planning-active .unidade-cell.selected-for-sprint {
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1.08) !important;
    background: #ecfdf5 !important;
    border: 4px solid #10b981 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    z-index: 50;
    color: #065f46;
}

.unidade-cell.in-active-sprint {
    border: 3px solid var(--secondary) !important;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    }

    to {
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.progress-bar {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2.5s infinite linear;
}

/* Celebrate State para Sprint 100% */
.sprint-summary-card.celebrate {
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, #fff 0%, #fffbeb 100%);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
}

.sprint-summary-card.celebrate::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    animation: rotate-glow 10s linear infinite;
    pointer-events: none;
}

@keyframes rotate-glow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.sprint-summary-card.celebrate #executionProgressBar {
    background-color: #fbbf24;
    background-image: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

/* Removido ícone de sprint (::after) conforme solicitado */

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Card de Resumo do Sprint Ativo */
.sprint-summary-card {
    grid-column: span 2;
    /* Ocupar largura total para não empurrar croqui */
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.4s ease-out;
}

.sprint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.sprint-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.sprint-title h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.badge-date {
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}


/* Popover de Unidade (Balão) */
.unidade-popover {
    display: none;
    position: fixed;
    z-index: 10000;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    gap: 12px;
    width: 250px;
    border: 1px solid #e2e8f0;
    animation: popover-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
}

@keyframes popover-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.unidade-popover h5 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unidade-popover .close-popover {
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.unidade-popover .close-popover:hover {
    color: #ef4444;
}

.unidade-popover-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unidade-popover-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.unidade-popover-form select,
.unidade-popover-form textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 8px;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.unidade-popover-form select:focus,
.unidade-popover-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.popover-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.popover-actions button {
    flex: 1;
}

/* Seta do Balão */
.unidade-popover::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg) translateX(-50%);
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.05);
}

.sprint-progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.progress-item .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.modern-progress-bar {
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-fill.execution {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-fill.time {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Efeito de Destaque no Croqui */
.croqui-container.has-active-sprint .unidade-cell:not(.in-active-sprint):not(.concluido) {
    opacity: 0.6;
    /* Menos opaco que antes */
    filter: grayscale(0.5);
    /* Menos cinza que antes */
}

/* Unidades concluídas devem ser bem visíveis mesmo fora do sprint */
.croqui-container.has-active-sprint .unidade-cell.concluido {
    opacity: 1 !important;
    filter: none !important;
}

/* Estilos Histórico de Metas */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-bottom: 15px;
}

.history-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: #cbd5e1;
    background: #fff;
}

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

.history-info strong {
    color: #1e293b;
    font-size: 1rem;
}

.history-info span {
    font-size: 0.8rem;
    color: #64748b;
}

.history-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.badge-ativo {
    background: #dcfce7;
    color: #166534;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-encerrado {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.mini-progress-bar {
    width: 100px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
}

.croqui-container.has-active-sprint .unidade-cell.in-active-sprint {
    opacity: 1;
    filter: none;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
    transform: scale(1.02);
}

/* --- NOVOS ESTILOS POP-OVER E CHECKLIST --- */
.unidade-popover {
    width: 380px;
    /* Largura padrão */
    min-height: auto;
    /* Removido min-height fixo */
    max-height: 85vh;
    /* Garante que cabe na tela verticalmente */
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: fixed;
    z-index: 1000;
    padding: 1.2rem;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.checklist-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.checklist-container {
    flex: 1;
    /* Ocupar espaço disponível */
    max-height: 250px;
    overflow-y: auto;
    margin-top: 12px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Visão Macro: Remover scroll interno para evitar barras duplas */
.unidade-popover.macro-view {
    overflow-y: auto;
}

.unidade-popover.macro-view .checklist-container {
    max-height: none;
    overflow-y: visible;
    background: transparent;
    padding: 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 10px;
    /* Mais fofinho */
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.checklist-item:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.checklist-pill small {
    margin-left: 4px;
    opacity: 0.8;
    font-style: italic;
}

.checklist-item span.done {
    text-decoration: line-through;
    color: #94a3b8;
}

.checklist-item .remove-item {
    margin-left: auto;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
}

.checklist-item .remove-item:hover {
    opacity: 1;
}

/* Estilos de Impressão OS (Checklist) */
.print-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.checklist-pill {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e2e8f0;
}

.checklist-pill.done {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

/* --- ESTILOS DE IMPRESSÃO OS (HIGHLIGHT SPRINTS) --- */
.unit-print.in-scope.in-sprint {
    border: 2px solid #f59e0b !important;
    background: #fffbeb !important;
    position: relative;
}

.sprint-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: #f59e0b;
}

.unit-print.done .sprint-icon {
    color: #10b981;
}

/* Estilos para o CRUD de Empreiteiros */
.btn-edit-equipe {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-equipe:hover {
    color: var(--primary);
    background: rgba(255, 153, 0, 0.1);
    transform: scale(1.1);
}

.empreiteiro-header {
    transition: background 0.2s ease;
}

.empreiteiro-header:hover {
    background: #f8fafc;
}

/* --- MODERN DROPDOWN SYSTEM --- */
.modern-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 180px;
    padding: 0.5rem 0;
    margin: 0.5rem 0 0;
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: fadeInScale 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.75rem 1.25rem;
    clear: both;
    font-weight: 500;
    color: var(--text-main);
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.dropdown-item i {
    width: 16px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.dropdown-item:hover i {
    opacity: 1;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   MODAL DETALHES DA ATIVIDADE
   ======================================== */
.atividade-resumo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 18px 12px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: #fff;
    border-color: var(--primary-light);
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: block;
}

/* Estilos para Itens de OS (Usados no Sidebar e no Modal Detalhes) */
.os-item-sidebar {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.os-item-sidebar:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.os-item-sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.os-item-sidebar-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
}

.os-item-sidebar-desc {
    font-size: 0.75rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
}

.os-item-sidebar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.os-item-sidebar-date {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Estilos de Paginao */
.pagination-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    width: 100%;
}

.btn-load-more {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.btn-load-more:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-load-more i {
    font-size: 0.9rem;
}