/* ==========================================================================
   KRONOS ADMIN - Corporate Theme
   Visual corporativo profissional baseado em AdminLTE
   ========================================================================== */

/* ==========================================================================
   CSS Variables - Corporate Colors (Light Theme)
   ========================================================================== */
:root {
    /* Primary Corporate Colors - Green Theme */
    --corporate-primary: #00a443;
    --corporate-primary-dark: #00402a;
    --corporate-primary-light: #26bf64;
    --corporate-secondary: #008f3c;

    /* Neutral Colors */
    --corporate-gray-100: #f4f6f9;
    --corporate-gray-200: #eef3f0;
    --corporate-gray-300: #e2e8e4;
    --corporate-gray-400: #c5d1c9;
    --corporate-gray-500: #8fa196;
    --corporate-gray-600: #666;
    --corporate-gray-700: #41493d;
    --corporate-gray-800: #333;
    --corporate-gray-900: #1a2e1f;

    /* Accent Colors */
    --corporate-success: #00a443;
    --corporate-warning: #ffc107;
    --corporate-danger: #dc3545;
    --corporate-info: #2196f3;

    /* Layout - Updated to match reference */
    --sidebar-width: 220px;
    --header-height: 50px;

    /* Typography */
    --font-family-base: "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Theme-specific colors (Light Mode) */
    --theme-bg: #f4f6f9;
    --theme-bg-secondary: #ffffff;
    --theme-bg-tertiary: #eef3f0;
    --theme-text: #333333;
    --theme-text-secondary: #666666;
    --theme-text-muted: #9ca3af;
    --theme-border: #e5e7eb;
    --theme-border-light: #f3f4f6;
    --theme-card-bg: #ffffff;
    --theme-input-bg: #ffffff;
    --theme-hover-bg: #f3f4f6;
    --theme-shadow: rgba(0, 0, 0, 0.1);

    /* State colors (Light Mode) */
    --theme-warning-bg: #fff7ed;
    --theme-warning-bg-hover: #ffedd5;
    --theme-warning-border: #fb923c;
    --theme-warning-text: #9a3412;
    --theme-info-bg: #dbeafe;
    --theme-info-bg-hover: #bfdbfe;
    --theme-info-border: #3b82f6;
    --theme-info-text: #1e40af;
    --theme-success-bg: #d1fae5;
    --theme-success-bg-hover: #a7f3d0;
    --theme-success-border: #10b981;
    --theme-success-text: #065f46;
    --theme-neutral-bg: #f3f4f6;
    --theme-neutral-bg-hover: #e5e7eb;
    --theme-neutral-border: #d1d5db;
    --theme-neutral-text: #4b5563;
    --theme-pending-bg: #fef3c7;
    --theme-pending-text: #92400e;
    --theme-locked-bg: #e5e7eb;

    /* Typography scale */
    --font-xs: 0.65rem;
    --font-sm: 0.75rem;
    --font-md: 0.875rem;
    --font-lg: 1rem;
}

/* ==========================================================================
   Dracula Dark Theme
   ========================================================================== */
[data-theme="dark"] {
    /* Dracula Colors */
    --dracula-bg: #282a36;
    --dracula-current: #44475a;
    --dracula-foreground: #f8f8f2;
    --dracula-comment: #6272a4;
    --dracula-cyan: #8be9fd;
    --dracula-green: #50fa7b;
    --dracula-orange: #ffb86c;
    --dracula-pink: #ff79c6;
    --dracula-purple: #bd93f9;
    --dracula-red: #ff5555;
    --dracula-yellow: #f1fa8c;

    /* Override Corporate Colors for Dark Mode */
    --corporate-primary: #50fa7b;
    --corporate-primary-dark: #3ad268;
    --corporate-primary-light: #69ff94;
    --corporate-secondary: #50fa7b;

    /* Override Neutral Colors */
    --corporate-gray-100: #282a36;
    --corporate-gray-200: #343746;
    --corporate-gray-300: #44475a;
    --corporate-gray-400: #6272a4;
    --corporate-gray-500: #8895b3;
    --corporate-gray-600: #a4b1c7;
    --corporate-gray-700: #c8d0e0;
    --corporate-gray-800: #e8ecf4;
    --corporate-gray-900: #f8f8f2;

    /* Override Accent Colors */
    --corporate-success: #50fa7b;
    --corporate-warning: #f1fa8c;
    --corporate-danger: #ff5555;
    --corporate-info: #8be9fd;

    /* Theme-specific colors (Dark Mode) */
    --theme-bg: #282a36;
    --theme-bg-secondary: #343746;
    --theme-bg-tertiary: #44475a;
    --theme-text: #f8f8f2;
    --theme-text-secondary: #c8d0e0;
    --theme-text-muted: #6272a4;
    --theme-border: #44475a;
    --theme-border-light: #3d4051;
    --theme-card-bg: #343746;
    --theme-input-bg: #44475a;
    --theme-hover-bg: #44475a;
    --theme-shadow: rgba(0, 0, 0, 0.3);

    /* State colors (Dark Mode - Dracula-inspired) */
    --theme-warning-bg: #44351a;
    --theme-warning-bg-hover: #5c4722;
    --theme-warning-border: #ffb86c;
    --theme-warning-text: #ffb86c;
    --theme-info-bg: #1e3a5f;
    --theme-info-bg-hover: #264a73;
    --theme-info-border: #8be9fd;
    --theme-info-text: #8be9fd;
    --theme-success-bg: #1a3d28;
    --theme-success-bg-hover: #225235;
    --theme-success-border: #50fa7b;
    --theme-success-text: #50fa7b;
    --theme-neutral-bg: #44475a;
    --theme-neutral-bg-hover: #565973;
    --theme-neutral-border: #6272a4;
    --theme-neutral-text: #c8d0e0;
    --theme-pending-bg: #4a3f1a;
    --theme-pending-text: #f1fa8c;
    --theme-locked-bg: #44475a;
}
/* ==========================================================================
   Loading States - Skeleton & Spinner Animations
   ========================================================================== */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

/* ==========================================================================
   Focus Visible - Accessibility
   ========================================================================== */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--corporate-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--corporate-primary);
    outline-offset: 2px;
}

/* Dark mode focus color */
[data-theme="dark"] :focus-visible {
    outline-color: var(--dracula-green);
}

/* Skip to main content link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--corporate-primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   Base Styles - Font size 14px para melhor legibilidade
   ========================================================================== */
html {
    font-size: 14px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--theme-bg);
    color: var(--theme-text);
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   Main Header Styles
   ========================================================================== */

.header-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.header-toggle:hover {
    background: #f0f0f0;
    color: var(--corporate-primary-dark);
}

/* Header Search */

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Icons (Notifications, Messages) */

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

.notification-content div {
    font-size: 0.9rem;
}

/* ==========================================================================
   Main Content Styles
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 16px;
    padding-bottom: 56px; /* Space for footer */
    min-height: calc(100vh - var(--header-height));
    transition: all 0.3s;
    background: var(--corporate-gray-100);
}

/* ==========================================================================
   Footer Styles (Legacy sidebar layout - kept for reference)
   ========================================================================== */
/* Removed fixed footer styles - now using mega menu layout */

.main-footer a {
    color: var(--corporate-primary);
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}
/* ==========================================================================
   Card Styles
   ========================================================================== */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background: white;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
.form-control:focus {
    border-color: var(--corporate-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 164, 67, 0.15);
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.main-footer {
    background: #fff;
    border-top: 2px solid var(--corporate-gray-200);
    color: var(--corporate-gray-600);
    font-size: 0.85rem;
}

.main-footer a {
    color: var(--corporate-primary);
    font-weight: 600;
}

/* Sobrescrever headers coloridos dos modais Bootstrap para estilo minimalista */

.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Dropdown Styles
   ========================================================================== */
.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background-color: var(--corporate-gray-100);
}

/* ==========================================================================
   Scrollbar Styles
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ==========================================================================
   Blazor Specific Styles
   ========================================================================== */
h1:focus {
    outline: none;
}

.valid.modified:not([type="checkbox"]) {
    outline: 1px solid var(--corporate-success);
}

.invalid {
    outline: 1px solid var(--corporate-danger);
}

.validation-message {
    color: var(--corporate-danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background:
        url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=)
            no-repeat 1rem/1.8rem,
        var(--corporate-danger);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 8px;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro inesperado.";
}

#blazor-error-ui {
    background: linear-gradient(
        135deg,
        var(--corporate-danger) 0%,
        #7f1d1d 100%
    );
    color: #fff;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    display: none;
    text-align: center;
    font-weight: 500;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}

/* ==========================================================================
   Animation Styles
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* login-logo styles moved to Login.razor component */

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991px) {

    .main-content {
        margin-left: 0;
    }
}

/* ==========================================================================
   Carteira de Obras - Row Colors by Status (Kronos style)
   ========================================================================== */
.row-energizada {
    background-color: #f0fdf4 !important; /* bg-green-50 */
    transition: background-color 0.15s ease;
}

.row-energizada:hover {
    background-color: #dcfce7 !important; /* bg-green-100 */
}

.row-programado {
    background-color: #eff6ff !important; /* bg-blue-50 */
    transition: background-color 0.15s ease;
}

.row-programado:hover {
    background-color: #dbeafe !important; /* bg-blue-100 */
}

.row-reprogramar {
    background-color: #fff7ed !important; /* bg-orange-50 */
    transition: background-color 0.15s ease;
}

.row-reprogramar:hover {
    background-color: #ffedd5 !important; /* bg-orange-100 */
}

.row-pendente {
    background-color: #f9fafb !important; /* bg-gray-50 */
    transition: background-color 0.15s ease;
}

.row-pendente:hover {
    background-color: #f3f4f6 !important; /* bg-gray-100 */
}

.row-cancelada {
    background-color: #fef2f2 !important; /* bg-red-50 */
    transition: background-color 0.15s ease;
}

.row-cancelada:hover {
    background-color: #fee2e2 !important; /* bg-red-100 */
}
/* ==========================================================================
   Mega Menu Layout - New Horizontal Layout
   ========================================================================== */
.main-content-mega {
    margin-top: 60px;
    flex: 1;
    background: var(--corporate-gray-100);
    display: flex;
    flex-direction: column;
}

.page-container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-body {
    width: 100%;
    margin: 0;
    padding: 25px 30px 30px;
    flex: 1;
}

/* Páginas full-width sem padding (ex: Programar) */
.page-body:has(.programar-container) {
    padding: 0.5rem;
}

/* Update footer for new layout */
.main-footer {
    background: white;
    border-top: 1px solid var(--corporate-gray-200);
    margin-top: auto;
    flex-shrink: 0;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: static;
    left: 0;
    right: 0;
}

.footer-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-size: 0.875rem;
}

.footer-left a {
    color: var(--corporate-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-left a:hover {
    text-decoration: underline;
}

.footer-right {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-body {
        padding: 15px;
    }

    .footer-container {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        width: 100%;
    }
}

/* ==========================================================================
   Mega Menu - Remove default link styles globally
   ========================================================================== */
.mega-dropdown-content a,
.mega-dropdown-content a:link,
.mega-dropdown-content a:visited,
.mega-dropdown-content a:hover,
.mega-dropdown-content a:active {
    text-decoration: none !important;
    color: #374151 !important;
}

.mega-dropdown-content a:hover {
    color: #111827 !important;
}

.mega-dropdown-content a strong,
.mega-dropdown-content a small {
    text-decoration: none !important;
}

.mega-dropdown-item strong {
    color: inherit !important;
}

.mega-dropdown-item small {
    color: #6b7280 !important;
}

/* Remove blue color from all links in mega menu */
nav.mega-menu a {
    color: inherit !important;
    text-decoration: none !important;
}

nav.mega-menu a:hover {
    text-decoration: none !important;
}
/* ==========================================================================
   Dark Mode (Dracula Theme) Styles
   ========================================================================== */

/* Main Content Dark Mode */
[data-theme="dark"] .main-content-mega {
    background: var(--theme-bg);
}

/* Mega Menu Dark Mode */
[data-theme="dark"] .mega-menu {
    background: var(--theme-bg-secondary) !important;
    border-bottom-color: var(--theme-border) !important;
}

[data-theme="dark"] nav.mega-menu {
    background: var(--theme-bg-secondary) !important;
}

[data-theme="dark"] .mega-menu-container {
    background: var(--theme-bg-secondary) !important;
}

[data-theme="dark"] .mega-menu-brand h1 {
    color: var(--dracula-green);
}

[data-theme="dark"] .mega-menu-item {
    color: var(--theme-text-secondary);
}

[data-theme="dark"] .mega-menu-item:hover {
    background: var(--theme-hover-bg);
    color: var(--dracula-green);
}

[data-theme="dark"] .mega-menu-item.active {
    background: rgba(80, 250, 123, 0.15);
    color: var(--dracula-green);
}

[data-theme="dark"] .mega-dropdown-content {
    background: var(--theme-bg-secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mega-dropdown-header {
    color: var(--theme-text-muted);
    border-bottom-color: var(--theme-border);
}

[data-theme="dark"] .mega-dropdown-item {
    color: var(--theme-text) !important;
}

[data-theme="dark"] .mega-dropdown-item:hover {
    background: var(--theme-hover-bg);
}

[data-theme="dark"] .mega-dropdown-item strong {
    color: var(--theme-text) !important;
}

[data-theme="dark"] .mega-dropdown-item small {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .mega-dropdown-item i {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .mega-dropdown-item:hover i {
    color: var(--dracula-green);
}

/* Search Dark Mode */
[data-theme="dark"] .search-toggle,
[data-theme="dark"] .icon-button {
    border-color: var(--theme-border);
    color: var(--theme-text-secondary);
}

[data-theme="dark"] .search-toggle:hover,
[data-theme="dark"] .icon-button:hover {
    background: var(--theme-hover-bg);
    border-color: var(--dracula-green);
    color: var(--dracula-green);
}

[data-theme="dark"] .search-dropdown {
    background: var(--theme-bg-secondary);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .search-dropdown .form-control {
    background: var(--theme-input-bg);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

[data-theme="dark"] .search-dropdown .form-control::placeholder {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .search-results {
    border-top-color: var(--theme-border);
}

[data-theme="dark"] .search-result-item {
    color: var(--theme-text) !important;
}

[data-theme="dark"] .search-result-item:hover {
    background: var(--theme-hover-bg);
}

[data-theme="dark"] .search-result-icon {
    background: rgba(80, 250, 123, 0.15);
    color: var(--dracula-green);
}

[data-theme="dark"] .search-result-content strong {
    color: var(--theme-text) !important;
}

[data-theme="dark"] .search-result-content small {
    color: var(--theme-text-muted) !important;
}

/* User Button Dark Mode */
[data-theme="dark"] .user-button {
    border-color: var(--theme-border);
    color: var(--theme-text);
}

[data-theme="dark"] .user-button:hover {
    background: var(--theme-hover-bg);
    border-color: var(--dracula-green);
}

[data-theme="dark"] .user-avatar {
    background: var(--dracula-purple);
}

[data-theme="dark"] .user-name {
    color: var(--theme-text);
}

[data-theme="dark"] .user-role {
    color: var(--theme-text-muted);
}

/* Notifications Dark Mode */
[data-theme="dark"] .notification-menu {
    background: var(--theme-bg-secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .notification-header {
    border-bottom-color: var(--theme-border);
}

[data-theme="dark"] .notification-header strong {
    color: var(--theme-text);
}

[data-theme="dark"] .notification-content strong {
    color: var(--theme-text);
}

[data-theme="dark"] .notification-content small {
    color: var(--theme-text-muted);
}
/* Cards Dark Mode */
[data-theme="dark"] .card {
    background: var(--theme-card-bg) !important;
    box-shadow: 0 2px 10px var(--theme-shadow) !important;
    border-color: var(--theme-border) !important;
}

/* Tables Dark Mode */
[data-theme="dark"] .table {
    color: var(--theme-text) !important;
    background: var(--theme-card-bg) !important;
    --bs-table-bg: var(--theme-card-bg) !important;
    --bs-table-color: var(--theme-text) !important;
}

[data-theme="dark"] .table th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .table td {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .table tbody tr {
    background: var(--theme-card-bg) !important;
    --bs-table-bg-state: var(--theme-card-bg) !important;
}

/* Row Status Colors Dark Mode */
[data-theme="dark"] .row-energizada {
    background-color: rgba(80, 250, 123, 0.1) !important;
}

[data-theme="dark"] .row-energizada:hover {
    background-color: rgba(80, 250, 123, 0.2) !important;
}

[data-theme="dark"] .row-programado {
    background-color: rgba(139, 233, 253, 0.1) !important;
}

[data-theme="dark"] .row-programado:hover {
    background-color: rgba(139, 233, 253, 0.2) !important;
}

[data-theme="dark"] .row-reprogramar {
    background-color: rgba(255, 184, 108, 0.1) !important;
}

[data-theme="dark"] .row-reprogramar:hover {
    background-color: rgba(255, 184, 108, 0.2) !important;
}

[data-theme="dark"] .row-pendente {
    background-color: rgba(98, 114, 164, 0.1) !important;
}

[data-theme="dark"] .row-pendente:hover {
    background-color: rgba(98, 114, 164, 0.2) !important;
}

[data-theme="dark"] .row-cancelada {
    background-color: rgba(255, 85, 85, 0.1) !important;
}

[data-theme="dark"] .row-cancelada:hover {
    background-color: rgba(255, 85, 85, 0.2) !important;
}

/* Form Controls Dark Mode */
[data-theme="dark"] .form-control {
    background: var(--theme-input-bg);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

[data-theme="dark"] .form-control:focus {
    background: var(--theme-input-bg);
    border-color: var(--dracula-purple);
    color: var(--theme-text);
    box-shadow: 0 0 0 0.25rem rgba(189, 147, 249, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--theme-text-muted);
}

/* Footer Dark Mode */
[data-theme="dark"] .main-footer {
    background: var(--theme-bg-secondary);
    border-top-color: var(--theme-border);
    color: var(--theme-text-secondary);
}

[data-theme="dark"] .footer-left a {
    color: var(--dracula-green);
}

[data-theme="dark"] .footer-right {
    color: var(--theme-text-muted);
}

/* Mobile Menu Dark Mode */
[data-theme="dark"] .mobile-menu {
    background: var(--theme-bg-secondary);
}

[data-theme="dark"] .mobile-menu-header {
    background: var(--theme-bg-tertiary);
    color: var(--theme-text);
    border-bottom-color: var(--theme-border);
}

[data-theme="dark"] .mobile-menu-header h2 {
    color: var(--dracula-green);
}

[data-theme="dark"] .mobile-menu-header button {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .mobile-menu-section {
    color: var(--theme-text-muted);
}

[data-theme="dark"] .mobile-menu-item {
    color: var(--theme-text);
}

[data-theme="dark"] .mobile-menu-item:hover {
    background: var(--theme-hover-bg);
}

[data-theme="dark"] .mobile-menu-item.active {
    background: rgba(80, 250, 123, 0.15);
    color: var(--dracula-green);
}

/* Modal Dark Mode */
[data-theme="dark"] .modal-content {
    background: var(--theme-bg-secondary);
    color: var(--theme-text);
}

/* Alert Dark Mode */

[data-theme="dark"] .alert-warning {
    background: rgba(241, 250, 140, 0.15);
    border-color: rgba(241, 250, 140, 0.3);
    color: var(--dracula-yellow);
}

/* Text Classes Dark Mode */
[data-theme="dark"] .text-muted {
    color: var(--theme-text-muted) !important;
}

/* Badge Dark Mode */
[data-theme="dark"] .badge.bg-success {
    background: var(--dracula-green) !important;
    color: #282a36 !important;
}

[data-theme="dark"] .badge.bg-info {
    background: var(--dracula-cyan) !important;
    color: #282a36 !important;
}

[data-theme="dark"] .badge.bg-warning {
    background: var(--dracula-yellow) !important;
    color: #282a36 !important;
}

[data-theme="dark"] .badge.bg-danger {
    background: var(--dracula-red) !important;
    color: #282a36 !important;
}

[data-theme="dark"] .badge.bg-secondary {
    background: var(--dracula-comment) !important;
    color: var(--theme-text) !important;
}

/* Scrollbar Dark Mode */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--theme-bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--theme-bg-tertiary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--dracula-comment);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--theme-border);
    color: var(--theme-text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--theme-hover-bg);
    border-color: var(--corporate-primary);
    color: var(--corporate-primary);
}

[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--dracula-purple);
    color: var(--dracula-purple);
}

.theme-toggle i {
    font-size: 1rem;
}
/* ==========================================================================
   Dark Mode - Additional Component Fixes
   ========================================================================== */

/* Dashboard Stat Cards */
[data-theme="dark"] [class*="stat-"] {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
}

/* All Cards comprehensive fix */
[data-theme="dark"] .card {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

/* Tables comprehensive fix */
[data-theme="dark"] .table,
[data-theme="dark"] table {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
}

[data-theme="dark"] .table thead th,
[data-theme="dark"] table thead th {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .table tbody td,
[data-theme="dark"] table tbody td,
[data-theme="dark"] .table tbody tr,
[data-theme="dark"] table tbody tr {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

/* Progress bars */
[data-theme="dark"] .progress {
    background: var(--theme-bg-tertiary) !important;
}

/* List groups */
[data-theme="dark"] .list-group-item {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .list-group-item:hover {
    background: var(--theme-hover-bg) !important;
}

/* Generic containers and sections */
[data-theme="dark"] .container,
[data-theme="dark"] .section,
[data-theme="dark"] .box {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
}

/* Page headers and titles */
[data-theme="dark"] .page-header {
    color: var(--theme-text) !important;
}

[data-theme="dark"] .page-header h1,
[data-theme="dark"] .page-header h2 {
    color: var(--dracula-green) !important;
}

[data-theme="dark"] .page-header p {
    color: var(--theme-text-muted) !important;
}

/* Fix any remaining borders */
[data-theme="dark"] .border,
[data-theme="dark"] .border-top {
    border-color: var(--theme-border) !important;
}

/* Fix specific Blazor component backgrounds */
[data-theme="dark"] [class*="component-"] {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
}

/* Fix rounded cards with shadows */
[data-theme="dark"] [class*="rounded"],
[data-theme="dark"] [class*="shadow"] {
    background-color: var(--theme-card-bg);
}

/* Ensure all direct children of main content use dark bg */
[data-theme="dark"] .page-body > div,
[data-theme="dark"] .main-content > div,
[data-theme="dark"] .main-content-mega > div {
    color: var(--theme-text);
}

/* Fix dropdown menus that might still be white */
[data-theme="dark"] .dropdown-menu {
    background: var(--theme-card-bg) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--theme-text) !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: var(--theme-hover-bg) !important;
    color: var(--theme-text) !important;
}

/* Fix any inline styles with white background using CSS specificity */
[data-theme="dark"] *[style*="background: white"],
[data-theme="dark"] *[style*="background-color: white"],
[data-theme="dark"] *[style*="background:#fff"],
[data-theme="dark"] *[style*="background-color:#fff"],
[data-theme="dark"] *[style*="background: #fff"],
[data-theme="dark"] *[style*="background-color: #fff"] {
    background: var(--theme-card-bg) !important;
}
/* ==========================================================================
   Cell Tooltip (Gantt Global Tooltip)
   ========================================================================== */
.cell-tooltip-global {
    position: fixed;
    width: 300px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    box-shadow:
        0 16px 64px rgba(0, 0, 0, 0.35),
        0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
    pointer-events: none;
}

.cell-tooltip-global.visible {
    opacity: 1;
    visibility: visible;
}

.cell-tooltip-global .tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(
        135deg,
        var(--theme-bg-secondary),
        var(--theme-card-bg)
    );
    border-bottom: 1px solid var(--theme-border);
    border-radius: 12px 12px 0 0;
}

.cell-tooltip-global .tooltip-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--theme-text);
}

.cell-tooltip-global .tooltip-meta {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.cell-tooltip-global .tooltip-meta.meta-ok {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.cell-tooltip-global .tooltip-meta.meta-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.cell-tooltip-global .tooltip-body {
    padding: 0.75rem 1rem;
}

.cell-tooltip-global .tooltip-section {
    margin-bottom: 0.75rem;
}

.cell-tooltip-global .tooltip-section:last-child {
    margin-bottom: 0;
}

.cell-tooltip-global .tooltip-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px dashed var(--theme-border);
}

/* Lista de serviços no tooltip */
.cell-tooltip-global .tooltip-servicos-list {
    max-height: 140px;
    overflow-y: auto;
}

.cell-tooltip-global .tooltip-servico-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.72rem;
    border-bottom: 1px solid var(--theme-border-light, rgba(0, 0, 0, 0.05));
}

.cell-tooltip-global .tooltip-servico-item:last-child {
    border-bottom: none;
}

.cell-tooltip-global .servico-desc {
    flex: 1;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-tooltip-global .servico-qtd {
    font-weight: 600;
    color: var(--theme-primary);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* Tooltip Badges - PES e Energização */
.cell-tooltip-global .tooltip-badges-section {
    padding: 0.5rem 0;
}

.cell-tooltip-global .tooltip-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cell-tooltip-global .tooltip-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Badge - Desligamento (vermelho) */
.cell-tooltip-global .badge-desligamento {
    background-color: #dc3545;
    color: #ffffff;
}

/* Badge - Linha Viva (laranja) */
.cell-tooltip-global .badge-linha-viva {
    background-color: #fd7e14;
    color: #ffffff;
}

/* Badge - Sem Interrupção (verde) */
.cell-tooltip-global .badge-sem-interrupcao {
    background-color: #28a745;
    color: #ffffff;
}

/* Badge - Manobra (roxo) */
.cell-tooltip-global .badge-manobra {
    background-color: #6f42c1;
    color: #ffffff;
}

/* Badge - Serviço Livre (cinza) */
.cell-tooltip-global .badge-servico-livre {
    background-color: #6c757d;
    color: #ffffff;
}

/* Badge - Energização (amarelo/dourado) */
.cell-tooltip-global .badge-energizacao {
    background-color: #ffc107;
    color: #212529;
}

.cell-tooltip-global .tooltip-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.cell-tooltip-global .tooltip-label {
    color: var(--theme-text-secondary);
    min-width: 100px;
}

.cell-tooltip-global .tooltip-value {
    font-weight: 600;
    color: var(--theme-text);
}

.cell-tooltip-global .tooltip-value.highlight {
    color: #6366f1;
    font-size: 0.9rem;
}

.cell-tooltip-global .tooltip-value.available {
    color: #10b981;
}

.cell-tooltip-global .tooltip-sub {
    font-size: 0.7rem;
    color: var(--theme-text-muted);
}

.cell-tooltip-global .tooltip-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--theme-border);
    margin-top: 0.5rem;
}

.cell-tooltip-global .tooltip-progress {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cell-tooltip-global .progress-bar {
    height: 6px;
    background: var(--theme-bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.cell-tooltip-global .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #22c55e);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.cell-tooltip-global .progress-fill.complete {
    background: linear-gradient(90deg, #059669, #10b981);
}

.cell-tooltip-global .progress-label {
    font-size: 0.7rem;
    color: var(--theme-text-muted);
    text-align: center;
}
/* ==========================================================================
   Projeto Detalhes Page
   ========================================================================== */
.projeto-detalhes-page {
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Weather Badges - Previsão do Tempo */
.weather-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.weather-badge.weather-good {
    background: #ecfdf5;
    color: #059669;
}

.weather-badge.weather-warning {
    background: #fffbeb;
    color: #d97706;
}

.weather-badge.weather-danger {
    background: #fef2f2;
    color: #dc2626;
}

/* ==========================================================================
   Mapa de Localizacao e Obras Proximas (Projeto Detalhes)
   ========================================================================== */
.mapa-localizacao-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .mapa-localizacao-section {
        grid-template-columns: 1fr;
    }
}

.mapa-container-card {
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    overflow: hidden;
}

.mapa-container-card {
    display: flex;
    flex-direction: column;
}

.mapa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--theme-border);
}

.mapa-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text);
    margin: 0;
}

.mapa-info-badges {
    display: flex;
    gap: 0.5rem;
}

.mapa-info-badges .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.mapa-leaflet {
    height: 400px;
    width: 100%;
    background: var(--theme-bg-tertiary);
    position: relative;
    z-index: 1;
}

/* Fix Leaflet tiles rendering */
.mapa-leaflet .leaflet-tile-pane {
    z-index: 1;
}

.mapa-leaflet .leaflet-marker-pane,
.mapa-leaflet .leaflet-overlay-pane {
    z-index: 2;
}

.mapa-sem-coords {
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--theme-text-muted);
}

.mapa-sem-coords i {
    font-size: 2.5rem;
    opacity: 0.5;
}

.mapa-sem-coords p {
    margin: 0;
    font-size: 0.9rem;
}

/* Obras Proximas Card */

.obras-proximas-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.obra-proxima-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--theme-border-light);
    cursor: pointer;
    transition: all 0.15s ease;
}

.obra-proxima-item:hover {
    background: var(--theme-hover-bg);
}

.obra-proxima-item:last-child {
    border-bottom: none;
}

.obra-proxima-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.obra-proxima-projeto {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-text);
}

.obra-proxima-titulo {
    font-size: 0.8rem;
    color: var(--theme-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obra-proxima-municipio {
    font-size: 0.75rem;
    color: var(--theme-text-muted);
}

.obra-proxima-distancia {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 1rem;
    flex-shrink: 0;
}
/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.leaflet-popup-content strong {
    color: var(--theme-text);
}

.leaflet-popup-content small {
    color: var(--theme-text-muted);
}

.leaflet-popup-content hr {
    border: none;
    border-top: 1px solid var(--theme-border);
    margin: 0.5rem 0;
}

.leaflet-popup-content .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Map no-coords message */
.map-no-coords {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--theme-text-muted);
    padding: 2rem;
    text-align: center;
}

.map-no-coords i {
    font-size: 3rem;
    opacity: 0.4;
}

.map-no-coords p {
    margin: 0;
    font-size: 0.9rem;
}

/* Previsão de Conclusão */
.previsao-conclusao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.previsao-conclusao .previsao-label {
    font-size: 0.8rem;
    color: var(--theme-text-secondary);
}

.previsao-conclusao .previsao-data {
    font-size: 0.9rem;
    font-weight: 600;
    color: #059669;
}

/* Tabs Container */

.tabs-content {
    padding: 1.5rem;
}

/* Mini Gantt */

.gantt-dia .dia-programacao.status-Nao\ Executado {
    color: #f59e0b;
}

/* Status Badge Small */
.status-badge-sm {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge-sm.status-planejado {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge-sm.status-em_execucao,
.status-badge-sm.status-em-execucao {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.status-badge-sm.status-concluido {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.status-badge-sm.status-cancelado {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.status-badge-sm.status-pendente {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.status-badge-sm.status-separado {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge-sm.status-entregue {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* Timeline Historico */

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--theme-border);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
/* ==========================================================================
   INDICADORES ORGANIZADOS - TEMPO REAL
   ========================================================================== */

.indicador-conteudo {
    display: flex;
    gap: 0.4rem;
    flex: 1;
    align-items: stretch;
}

/* Responsive - Indicadores */

@media (max-width: 768px) {
    .indicador-conteudo {
        gap: 0.5rem;
    }
}

/* ==========================================================================
   MAPA TEMPO REAL - Estilos dos Marcadores
   ========================================================================== */

/* Container do marcador - remove estilos padrão do Leaflet */
.equipe-marker-container {
    background: transparent !important;
    border: none !important;
}

/* Marcador da equipe */
.equipe-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Ícone do marcador com imagem */
.marker-icon-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--status-color, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.marker-icon-img img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Ícone do marcador com FontAwesome (fallback) */
.marker-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--status-color, #64748b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Label do nome da equipe */
.marker-label {
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin-top: 4px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--status-color, #e5e7eb);
}

/* Animação de pulso para ocorrências */
.equipe-marker.pulse .marker-icon-img,
.equipe-marker.pulse .marker-icon {
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Popup da equipe */
.equipe-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
}

.equipe-popup .leaflet-popup-content {
    margin: 0;
}

.equipe-popup-content {
    min-width: 200px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--corporate-gray-100);
    border-bottom: 1px solid var(--theme-border);
    border-radius: 12px 12px 0 0;
}

.popup-header strong {
    font-size: 14px;
    color: var(--theme-text);
}

.popup-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.popup-badge.status-na-base {
    background: #e2e8f0;
    color: #64748b;
}

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

.popup-badge.status-execucao {
    background: #d1fae5;
    color: #065f46;
}

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

.popup-body {
    padding: 12px 15px;
}

.popup-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--theme-text-secondary);
    margin-bottom: 6px;
}

.popup-info:last-child {
    margin-bottom: 0;
}

.popup-info i {
    width: 14px;
    color: var(--corporate-primary);
}

.popup-obra {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--theme-border);
    font-size: 12px;
    color: var(--theme-text);
}

/* Seções do popup de tempo real */
.popup-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--theme-border);
}

.popup-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--corporate-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-section-title i {
    margin-right: 6px;
}

.popup-section .popup-info {
    margin-bottom: 4px;
}

.popup-tempos {
    background: var(--corporate-gray-50);
    margin: 10px -15px -12px;
    padding: 10px 15px 12px;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid var(--theme-border);
}

.popup-tempo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 4px 0;
}

.tempo-label {
    color: var(--theme-text-secondary);
}

.tempo-value {
    font-weight: 600;
    color: var(--theme-text);
}

.tempo-value.tempo-execucao {
    color: var(--corporate-success);
}

.popup-update {
    margin-top: 8px;
    font-size: 11px;
}

/* ==========================================================================
   MAPA TEMPO REAL - Modo Tela Cheia
   ========================================================================== */

.mapa-card {
    transition: all 0.3s ease;
}

.mapa-card.mapa-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: var(--theme-card-bg);
}

.mapa-card.mapa-fullscreen .mapa-legenda {
    flex-shrink: 0;
}

.mapa-card.mapa-fullscreen #mapaTempoReal {
    flex: 1;
    height: 100% !important;
    min-height: calc(100vh - 180px);
}

/* Container do mapa normal */
#mapaTempoReal {
    height: 450px;
    border-radius: 8px;
    transition: height 0.3s ease;
}
