:root {
    /* Color Palette from Image (Bogdan Style) */
    --bg-main: #050505;
    --bg-side: #0a0a0a;
    --bg-card: #111111;
    --accent-lime: #bef264;
    --accent-orange: #fb923c;
    --accent-purple: #bef264;
    --accent-yellow: #fb923c;
    --accent-pink: #fb923c;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --border: rgba(255, 255, 255, 0.08);

    /* Risk Colors synchronized with theme */
    --risk-low: #bef264;
    --risk-medium: #fb923c;
    --risk-high: #ff4d4d;

    /* Spacing & Borders */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Layout Structure */
.app-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 90px;
    background: var(--bg-side);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 0;
    gap: 2.5rem;
}

.logo-container {
    padding: 0 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.main-logo {
    width: 60px;
    height: auto;
    transition: var(--transition);
}

.main-logo:hover {
    transform: scale(1.05);
}

.sidebar-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-icon:hover,
.sidebar-icon.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.sidebar-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.search-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 350px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 6px 16px 6px 6px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.admin-avatar-container {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}


.user-profile img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Stats Area */
.stats-section h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    height: 320px;
}

/* Ongoing Cards */
.sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.status-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: rgba(190, 242, 100, 0.2);
}

.profile-sm {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.profile-sm img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Right Panel */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel-section h3 {
    margin-bottom: 1.2rem;
    font-size: 1.25rem;
}

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compact-item {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
}

.compact-item img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

/* Filter Buttons */
.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background: var(--accent-purple);
    color: white;
}

.filter-btn:hover:not(.active) {
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: var(--transition);
    color-scheme: dark;
    font-size: 16px; /* Impede o zoom automático no Mobile */
}


input:focus,
select:focus {
    border-color: var(--accent-purple);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-lime), var(--accent-orange));
    color: #000;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(190, 242, 100, 0.15);
}

.btn-action-lime {
    background: var(--accent-lime);
    color: #000;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(190, 242, 100, 0.3);
}

.btn-action-lime:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 30px rgba(190, 242, 100, 0.5);
    filter: brightness(1.1);
}

.btn-action-lime:active {
    transform: translateY(0) scale(0.98);
}

.view-section {
    display: none;
}

/* Risk Colors & Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

td {
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--border);
}

/* Dots */
.dot-row {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-purple {
    background: var(--accent-purple);
}

.dot-yellow {
    background: var(--accent-yellow);
}

.dot-empty {
    background: rgba(255, 255, 255, 0.05);
}

.text-mute {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-side);
    border-top: 1px solid var(--border);
    padding: 10px 0;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.65rem; /* Leve redução para caber 6 itens */
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 0;
    text-align: center;
}


.mobile-nav-item i {
    width: 22px;
    height: 22px;
}

.mobile-nav-item.active {
    color: var(--accent-purple);
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .sidebar {
        display: none !important;
    }

    .mobile-nav {
        display: flex;
    }

    .main-content {
        padding: 1.5rem 1rem 80px 1rem;
        width: 100vw;
    }

    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .search-bar {
        width: 100%;
        padding: 8px 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 280px;
        padding: 1rem;
    }

    .sub-grid {
        grid-template-columns: 1fr;
    }

    /* Table Responsiveness */
    .status-card {
        padding: 1rem;
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    .action-btn-circle {
        width: 40px;
        height: 40px;
    }

    /* Modal Mobile Adjustments */
    .status-card[style*="max-width: 400px"] {
        width: 95% !important;
        margin: 0 auto;
    }
}

.avatar-letter {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-purple);
    font-size: 1.2rem;
    text-transform: uppercase;
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background: #25D366;
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.action-btn-circle {
    background: rgba(251, 146, 60, 0.1);
    color: var(--accent-orange);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-btn-circle:hover {
    background: var(--accent-orange);
    color: #000;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(251, 146, 60, 0.3);
}

.btn-danger-circle {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.btn-danger-circle:hover {
    background: #ff4d4d !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(255, 77, 77, 0.4) !important;
}

/* Toggle Switch Design */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-purple);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Light Mode Support */
body.light-mode {
    --bg-main: #f5f5f5;
    --bg-side: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #111111;
    --text-secondary: #666666;
    --border: rgba(0, 0, 0, 0.08);
}

body.light-mode input, 
body.light-mode select {
    background: #eeeeee;
    color: #000;
}

body.light-mode .admin-avatar-container,
body.light-mode .avatar-letter {
    background: #eeeeee;
}