:root {
    /* MIGHTY Inspired Palette */
    --primary: #5c3bb0; /* Deep Purple */
    --primary-light: #7c4dff;
    --secondary: #2dd4bf; /* Mint/Teal */
    --bg-main: #effaf8; /* Soft Mint Background */
    --sidebar-bg: #2d1b50; /* Deep Dark Purple */
    --sidebar-active: #402675;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    
    --danger: #ff4d4d;
    --success: #00e676;
    --warning: #ffb300;
    
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --premium-shadow: 0 20px 50px rgba(45, 27, 80, 0.1);
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --border-radius: 24px;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    --bg-main: #0f172a;
    --sidebar-bg: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --white: #1e293b;
    --card-bg: #1e293b;
    --border-color: rgba(255, 255, 255, 0.05);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #1e1135 100%);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 32px 10px;
    height: calc(100vh - 40px);
    margin: 20px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    z-index: 100;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}

.sidebar.minimized {
    width: 80px;
    padding: 32px 0;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar.minimized .sidebar-header {
    justify-content: center;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.logo i {
    color: var(--secondary);
    width: 28px;
    height: 28px;
}

.sidebar-nav-group {
    padding: 16px;
}

.nav-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 12px;
    margin-bottom: 8px;
    display: block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 0 50px 50px 0;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 20px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.minimized .nav-item {
    justify-content: center;
    padding: 14px 0;
    margin-right: 0;
    border-radius: 12px;
    margin: 0 10px;
}

.sidebar.minimized .logo span,
.sidebar.minimized .nav-item span,
.sidebar.minimized .nav-group-label,
.sidebar.minimized .user-info-mini,
.sidebar.minimized .connection-status span:not(.status-dot),
.sidebar.minimized .user-meta {
    display: none;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar.minimized #sidebar-toggle i {
    transform: rotate(180deg);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-item.active {
    background: white;
    color: #2d1b50;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.nav-item.active i {
    color: #2d1b50;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-mini:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-info-mini {
    display: flex;
    flex-direction: column;
}

.user-info-mini .name {
    font-size: 0.875rem;
    font-weight: 700;
}

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

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
}

.status-dot.online {
    background-color: var(--success);
}

/* Main Content */
/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
body.dark-mode ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}
body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, #effaf8 0%, #f9fdfc 100%);
    padding: 40px;
    position: relative;
    transition: background 0.3s ease;
}

body.dark-mode .main-content {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 24px;
}

body.dark-mode .top-header {
    background: rgba(30, 41, 59, 0.7);
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

/* Header Components */
.search-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.5);
}

.search-container i {
    color: var(--text-muted);
    width: 18px;
}

.search-container input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 500;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.4);
    padding: 4px 16px 4px 4px;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    height: 40px;
    transition: all 0.2s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(45, 27, 80, 0.1);
}

body.dark-mode .user-profile {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .user-profile:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-meta .name {
    font-size: 0.85rem;
    font-weight: 700;
}

.user-meta .role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

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

.action-icon {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0;
    font-size: 1rem;
}

.action-icon:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    color: #2d1b50;
    border-color: rgba(45, 27, 80, 0.1);
}

.action-icon i {
    width: 20px;
    height: 20px;
}

.status-badge-header {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

body.dark-mode .action-icon {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

body.dark-mode .action-icon:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .status-badge-header {
    border-color: #1e293b;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.welcome-text h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.time-stamp {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.view-controls {
    display: flex;
    gap: 12px;
}

.ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Stat Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle.purple { background: rgba(124, 77, 255, 0.1); color: #7c4dff; }
.icon-circle.teal { background: rgba(45, 212, 191, 0.1); color: #2dd4bf; }
.icon-circle.orange { background: rgba(251, 146, 60, 0.1); color: #fb923c; }
.icon-circle.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }

.stat-info .label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-info .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-card-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 60px;
}

.mini-chart-container {
    flex: 1;
    max-width: 140px;
    height: 100%;
}

.trend {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

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

.trend.down { 
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger); 
}

.trend.neutral { 
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted); 
}

.more-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

#dashboard-view,
#tickets-view,
#teams-view,
#finance-view {
    padding: 32px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 24px;
    margin: 0 32px 32px 32px;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.filter-group {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 6px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    flex: 1;
    min-width: 160px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

body.dark-mode .filter-group {
    background: rgba(30, 41, 59, 0.5);
}

.filter-group label {
    display: none; /* Hide labels for cleaner look as planned */
}

.filter-select {
    padding: 8px 0;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
}

body.dark-mode .filter-select {
    background-color: var(--card-bg);
}

.glass-card {
    background-color: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.glass-card-inner {
    transition: all 0.2s ease;
}

.glass-card-inner:hover {
    background-color: rgba(19, 91, 236, 0.05) !important;
    border-color: rgba(19, 91, 236, 0.2) !important;
    transform: translateX(4px);
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

.add-data-card {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.add-data-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(19, 91, 236, 0.05);
}

/* Charts & Tables */
.chart-header {
    margin-bottom: 24px;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-light);
}

body.dark-mode .search-box {
    background-color: var(--card-bg);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--text-main);
}

.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 16px 12px;
    border-bottom: 2px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode th {
    background-color: rgba(255, 255, 255, 0.02);
}

td {
    padding: 16px 12px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover td {
    background-color: rgba(19, 91, 236, 0.04);
}

body.dark-mode tbody tr:hover td {
    background-color: rgba(19, 91, 236, 0.1);
}

/* Emphasize the Title and ID */
td strong {
    color: var(--primary);
    font-weight: 600;
}

tbody tr:hover td strong {
    color: #0c43b3;
}

body.dark-mode tbody tr:hover td strong {
    color: #3b82f6;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Matching app.js getStatusClass */
.status-badge.status-aberto {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.status-badge.status-pendente {
    background: #fef9c3;
    color: #ca8a04;
    border: 1px solid #fde047;
}

.status-badge.status-fechado {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

body.dark-mode .status-badge.status-aberto {
    background: rgba(2, 132, 199, 0.2);
    border-color: rgba(2, 132, 199, 0.3);
    color: #38bdf8;
}

body.dark-mode .status-badge.status-pendente {
    background: rgba(202, 138, 4, 0.2);
    border-color: rgba(202, 138, 4, 0.3);
    color: #facc15;
}

body.dark-mode .status-badge.status-fechado {
    background: rgba(22, 163, 74, 0.2);
    border-color: rgba(22, 163, 74, 0.3);
    color: #4ade80;
}

/* Priorities */
.prio-high {
    color: var(--danger);
    font-weight: 700;
}

.prio-high::before {
    content: "🔴 ";
    font-size: 0.7rem;
}

.prio-medium {
    color: var(--warning);
    font-weight: 600;
}

.prio-medium::before {
    content: "🟡 ";
    font-size: 0.7rem;
}

.prio-low {
    color: var(--success);
    font-weight: 600;
}

.prio-low::before {
    content: "🟢 ";
    font-size: 0.7rem;
}

/* Teams Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.team-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Adding hover similar to other glass cards */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    border-color: rgba(19, 91, 236, 0.3);
    /* Primary color glow */
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(19, 91, 236, 0.1) 0%, rgba(19, 91, 236, 0.05) 100%);
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(19, 91, 236, 0.1) inset;
    transition: all 0.3s ease;
}

body.dark-mode .team-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #3b82f6;
}

.team-card:hover .team-icon {
    transform: scale(1.05) rotate(-5deg);
    background-color: rgba(19, 91, 236, 0.15);
}

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

.team-card-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.team-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.team-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.team-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-stat-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.team-stat-item .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Label flex layout to hold both label and value */
.team-stat-item>span:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.progress-bar {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}

body.dark-mode .progress-bar {
    background-color: rgba(255, 255, 255, 0.05);
}

.progress {
    height: 100%;
    border-radius: 999px;
    transition: width 1s ease-in-out;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Modals & other */
/* Map Styles */
.custom-cluster-icon {
    background: transparent;
    border: none;
}

.map-cluster-bubble {
    background: rgba(19, 91, 236, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-weight: 800;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(19, 91, 236, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-cluster-bubble:hover {
    transform: scale(1.1);
    background: rgba(19, 91, 236, 1);
}

.custom-marker-icon {
    background: transparent;
    border: none;
}

.map-marker-bubble {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.map-marker-bubble:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Dark mode map styling */
body.dark-mode .leaflet-layer,
body.dark-mode .leaflet-control-zoom-in,
body.dark-mode .leaflet-control-zoom-out,
body.dark-mode .leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    width: 90%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

/* ─── Finance Specific ─────────────────────────────────────────── */

.fin-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.fin-chart-container {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    height: 350px;
    position: relative;
}

.fin-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.fin-table-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-top: 32px;
}

.fin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.pg-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.pg-btn:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Adjustments for dark mode */
body.dark-mode .fin-chart-container,
body.dark-mode .fin-table-card {
    background: var(--card-bg);
}

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.chart-container-large {
    width: 100%;
}

/* Utilities */
.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* Base Hamburger Menu inside Top Header (Hidden on Desktop) */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 50;
        transition: left 0.3s ease;
        background: var(--sidebar-bg);
    }

    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    }

    .hamburger-menu {
        display: block;
    }

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

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

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .chart-container-large {
        height: 300px !important;
    }

    #tickets-view .table-responsive,
    #dashboard-view .table-responsive {
        max-width: 100vw;
    }
}
/* --- Equipamentos Page --- */

.eq-tabs {
    display: flex;
    gap: 4px;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
}

.eq-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.eq-tab:hover {
    background: rgba(19, 91, 236, 0.07);
    color: var(--primary);
}

.eq-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

body.dark-mode .eq-tab.active {
    background: var(--card-bg);
}

body.dark-mode .eq-tabs {
    background: var(--background-dark);
}

.eq-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.eq-badge-ativo {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.eq-badge-inativo {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

body.dark-mode .eq-badge-ativo {
    background: rgba(22, 163, 74, 0.2);
    border-color: rgba(22, 163, 74, 0.3);
    color: #4ade80;
}

body.dark-mode .eq-badge-inativo {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
    color: #f87171;
}

/* --- Premium Loading Screen --- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a; /* Fallback matching dark mode bg */
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.loader-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #135bec; /* Fallback matching --primary */
    color: var(--primary);
    animation: logo-pulse 2s infinite ease-in-out;
}

.loader-logo i {
    width: 36px;
    height: 36px;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(19, 91, 236, 0.1);
    border-top: 3px solid #135bec;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
}

.loader-content p {
    font-family: 'Inter', sans-serif;
    color: #94a3b8; /* Fallback matching --text-muted */
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}
