/**
 * Design Tokens & Global Stylesheet
 * Sistema de Gestão de Dano ao Patrimônio
 */

:root {
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
    --primary-corp: #0d6efd;
    --primary-hover: #0b5ed7;
    --bg-surface: #ffffff;
    --bg-body-custom: #f4f6f9;
    --border-color-custom: #e3e6ec;
    --text-muted-custom: #6c757d;
}

[data-bs-theme="dark"] {
    --bg-surface: #1e2227;
    --bg-body-custom: #121417;
    --border-color-custom: #2d3239;
    --text-muted-custom: #8e96a2;
}

body {
    font-family: var(--bs-font-sans-serif);
    background-color: var(--bg-body-custom);
    color: #212529;
    -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] body {
    color: #e9ecef;
}

/* Typography Utilities */
.fs-xs { font-size: 0.785rem !important; }
.fs-xxs { font-size: 0.700rem !important; }
.tracking-wider { letter-spacing: 0.05em; }
.line-height-1 { line-height: 1.15; }

/* Surface Colors */
.bg-surface { background-color: var(--bg-surface) !important; }
.bg-primary-corp { background-color: #0b409c !important; }

/* Custom Badge Colors */
.bg-purple-subtle { background-color: #f3e8ff !important; }
.text-purple { color: #6f42c1 !important; }

/* Pulse Animation for Critical Alerts (e.g. Desligado) */
@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-pulse {
    animation: pulse-red 2s infinite ease-in-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout Utilities */
.page-wrapper {
    min-height: calc(100vh - 110px);
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: -260px;
        z-index: 1040;
    }
    .sidebar.show {
        left: 0;
    }
}

.sidebar .nav-link {
    color: #495057;
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
    border-radius: 0.375rem;
    margin: 0.1rem 0.75rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #ffffff !important;
}

.sidebar .nav-link.active i {
    color: #ffffff !important;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.shadow-xs {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
