:root {
    --bg-primary: #070707;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #101010;
    --bg-card: #141414;
    --text-primary: #DADADA;
    --text-secondary: rgba(218, 218, 218, 0.85);
    --text-tertiary: rgba(218, 218, 218, 0.65);
    --accent-primary: #1a1a1a;
    --accent-secondary: #222222;
    --accent-tertiary: #333333;
    --success: #DADADA;
    --warning: #DADADA;
    --danger: #DADADA;
    --info: #DADADA;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.5);
    --border-light: 1px solid rgba(218, 218, 218, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --header-height: 70px;
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
}

/* Solução abrangente para scrollbar fino em todos os navegadores */

/* 1. Webkit/Blink (Chrome, Safari, Edge moderno, Opera) */
::-webkit-scrollbar {
    width: 3px !important;
    height: 3px !important;
}

::-webkit-scrollbar-track {
    background: #0F0F0F !important;
    border-radius: 3px !important;
}

::-webkit-scrollbar-thumb {
    background: #333333 !important;
    border-radius: 3px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #4facfe !important;
}

/* 2. Scrollbar para Firefox */
* {
    scrollbar-width: thin !important;
    scrollbar-color: #333333 #0F0F0F !important;
}

/* Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    width: 100%;
    position: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style-type: none;
}


button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

/* Layout Structure */
.app-container {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
    min-height: 100vh;
    position: relative;
}

/* Header Styles */
.header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    height: var(--header-height);
    background-color: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1010;
}


.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: var(--transition);
}



.page-title h1 {
    font-size: 1.3rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.93rem;
    transition: var(--transition);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-sm);
}

#btnCriarNovoLink {
    width: 100%;
    margin: 8px auto;
    text-align: center;
    background-color: #292929;
    display: flex;
    flex-direction: row;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    color: white;
}

.header-icons {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 0px;
    padding-right: 0px;
    gap: 4px;
}

.notification-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
}


.header-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    height: 50px;
    border-radius: var(--radius-md);
    padding: 8px 0 !important;
    cursor: pointer;
    transition: var(--transition);
}

.header-profile:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.profile-info {
    display: flex;
    flex-direction: column;
    text-align: start;
    margin-left: 8px;
}


.text-available-revenue {
    font-size: 0.67rem;
    background-color: green;
    color: white !important;
    padding: 3.5px 10px;
    margin: auto 0;
    border-radius: 15px;
    text-align: center;
    font-weight: bold;
    margin: 0;
}

.label_saldo_disponivel {
    font-size: 12px;
    color: #d3d3d3;
    margin: auto 0;
    margin-right: 6px;
}


.profile-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Sidebar Styles */
.sidebar {
    grid-area: sidebar;
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: var(--border-light);
    transition: var(--transition);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    margin-left: 10px;
    transition: var(--transition);
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 5px;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-header {
    padding: 0 15px;
    margin-bottom: 15px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.sidebar.collapsed .nav-header {
    opacity: 0;
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    font-weight: 500;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(50, 50, 50, 0.2);
    color: var(--text-primary);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #aaa;
    border-radius: 0 3px 3px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
    z-index: -1;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


.nav-icon {
    min-width: 22px;
    text-align: center;
    font-size: 1.2rem;
    margin-right: 10px;
    transition: var(--transition);
}

.nav-text {
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    padding: 12px;
    justify-content: center;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
    font-size: 1.4rem;
}

.sidebar-footer {
    padding: 15px;
    border-top: var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-footer {
    justify-content: center;
}

.sidebar.collapsed .footer-text {
    display: none;
}

.sidebar-footer-icon {
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-footer-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(180deg);
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Main Content */
.main-content {
    grid-area: main;
    width: 100vw;
    padding: 2% 1% 2% 7%;
    height: 100%;
    /* Ajuste conforme necessário */
    overflow-y: auto;
    /* Permite rolagem apenas no conteúdo principal */
    transition: margin-left 0.3s ease;
    /* Para animar quando o drawer recolher */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    /* Previne o bounce effect */
    transform: translateZ(0);
    /* Ativa GPU */
    backface-visibility: hidden;
    /* Otimiza renderização 3D */
    will-change: transform, opacity;
    /* Prepara browser para mudanças */
}


/* Dashboard Grid Layout */
.dashboard-grid {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 22px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* Permite quebra em telas menores */
}

/* Estilo base para os cards */
.dashboard-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 22px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    flex-grow: 1;
    /* Permite que os cards cresçam */
}

/* Card de Performance ocupando dois terços em telas grandes */
.card-col-8 {
    flex-basis: calc(66.6666% - 11px);
    /* 2/3 do espaço menos metade do gap */
}

/* Card de Atividade Recente ocupando um terço em telas grandes */
.card-col-4 {
    flex-basis: calc(33.3333% - 11px);
    /* 1/3 do espaço menos metade do gap */
}

/* Media query para dispositivos móveis */
@media screen and (max-width: 768px) {
    .dashboard-grid {
        flex-direction: column;
        /* Muda para layout vertical */
    }

    /* Em telas pequenas, cada card ocupa 100% da largura */
    .card-col-8,
    .card-col-4 {
        flex-basis: 100%;
    }
}



.dashboard-card::before {
    /*content: '';*/
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Card Sizes */
.card-col-3 {
    grid-column: span 3;
}

.card-col-4 {
    grid-column: span 4;
}

.card-col-6 {
    grid-column: span 6;
}

.card-col-8 {
    grid-column: span 8;
}

.card-col-9 {
    grid-column: span 9;
}

.card-col-12 {
    grid-column: span 12;
}

.card-row-1 {
    grid-row: span 1;
}

.card-row-2 {
    grid-row: span 2;
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;

    grid-template-columns: 1fr 1fr;

    gap: 18px;
    margin-bottom: 22px;
    position: relative;
}

.filterBTN {
    width: auto;
    gap: 6px;
    height: 30px;
    position: absolute;
    right: 10px;
    top: -8px;
    padding: 4px 8px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: fit-content;
    font-size: 11px;
    background-color: #333333;
    border-radius: 10px;
}

.stat-card {
    margin-top: 40px;
    background: #141414;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}



.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.15);
}


.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.stat-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding-left: 10px;
}

.stat-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 15px;
    background: #aaa;
    border-radius: 3px;
}

.stat-icon {
    width: 42px;
    text-align: center;
    height: 42px;
    border-radius: 50%;
    position: absolute;
    right: 5px;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.5sease;
    padding-top: 7px;
    right: 10px;
}

.stat-card:hover .stat-icon {
    transform: rotate(360deg);
}

.stat-card.primary .stat-icon {
    color: #ddd;
}

.stat-card.success .stat-icon {
    color: var(--success);
}

.stat-card.warning .stat-icon {
    color: var(--warning);
}

.stat-card.danger .stat-icon {
    color: var(--danger);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 5px 0;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 300;
}

@media screen and (max-width:768px) {
    .stat-trend {
        font-size: 0.75rem;
    } 
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

.trend-neutral {
    color: var(--text-tertiary);
}

.stat-card-footer {
    margin-top: auto;
    font-size: 0.8rem;
    display: none;
    color: var(--text-tertiary);
}

/* Chart Card */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    padding-left: 12px;
}

.card-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: #555;
    border-radius: 4px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}


.card-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(15deg);
}

.card-action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.card-action-btn:hover::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

.chart-container {
    width: 100%;
    height: 300px;
    position: relative;
}

/* Table Card */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    white-space: nowrap;
    border-collapse: collapse;
}

.data-table th {
    font-weight: 500;
    text-align: left;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: var(--border-light);
    font-size: 0.85rem;
    position: relative;
}

.data-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    width: calc(100% - 32px);
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
}

.data-table td {
    padding: 12px 16px;
    border-bottom: var(--border-light);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr {
    transition: var(--transition);
    position: relative;
}

.data-table tbody tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    width: calc(100% - 32px);
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.data-table tbody tr:last-child::after {
    display: none;
}

.data-table tbody tr:hover::after {
    opacity: 1;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.link-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.link-title {
    font-weight: 500;
    color: var(--text-primary);
}

.link-url {
    font-size: 0.8rem;
    color: #888;
}

.link-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-high .progress-bar {
    background: linear-gradient(to right, #444, #666);
}

.progress-medium .progress-bar {
    background: linear-gradient(to right, #555, #777);
}

.progress-low .progress-bar {
    background: linear-gradient(to right, #666, #888);
}


.table-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-value {
    font-weight: 600;
}

.stats-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.table-actions {
    display: flex;
    gap: 5px;
}

.table-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.table-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.table-btn:hover::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

.table-btn:hover {
    transform: translateY(-2px);
}

.table-btn.copy:hover {
    background: rgba(204, 204, 204, 0.1);
    color: var(--info);
}

.table-btn.edit:hover {
    background: rgba(229, 229, 229, 0.1);
    color: var(--warning);
}

.table-btn.delete:hover {
    background: rgba(184, 184, 184, 0.1);
    color: var(--danger);
}

/* Activity Component */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: var(--border-light);
    transition: transform 0.3s ease;
}

.activity-item:hover {
    transform: translateX(5px);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.icon-views {
    background: linear-gradient(135deg, #333, #555);
}

.icon-clicks {
    background: linear-gradient(135deg, #444, #666);
}

.icon-conversion {
    background: linear-gradient(135deg, #555, #777);
}

.icon-payment {
    background: linear-gradient(135deg, #666, #888);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Floating Stats Bar */
.floating-stats {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 12px 18px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
}



.floating-stats:hover {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(-50%) translateY(-5px);
}


.profile-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
}


.float-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-col-3,
    .card-col-4 {
        grid-column: span 6;
    }

    .card-col-8 {
        grid-column: span 12;
    }
}

@media (max-width: 992px) {
    .app-container {
        grid-template-areas:
            "header header"
            "sidebar main";
    }

    .sidebar {
        position: fixed;
        left: 0;
        bottom: 0;
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
        transform: translateX(-100%);
        z-index: 30;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: 25;
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        padding: 20px;
    }

    .stat-cards {
        grid-template-columns: 1fr;
        margin-bottom: 20px;
    }

    .dashboard-grid {
        gap: 20px;
    }

    .card-col-6 {
        grid-column: span 12;
    }
}


@media (max-width: 768px) {
    .header {
        padding: 0 !important;
    }

    .header-profile {
        padding: 8px 9px;
    }

    .header-profile .profile-info {
        display: flex;
    }

    .floating-stats {
        width: 95%;
    }

    .main-content {
        padding: 8px;
    }

    .dashboard-card {
        padding: 8px;
    }


    .card-title {
        font-size: 1rem;
    }

    .drawer {
        width: 250px;
        transform: translateX(-100%);
        position: fixed;
        z-index: 100;
        height: 100vh;
    }

    .drawer.open {
        transform: translateX(0);
    }

    .drawer {
        width: 250px;
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1001;
        /* z-index aumentado para garantir que fique acima do overlay */
        background-color: var(--bg-secondary);
        /* Garante que o fundo seja visível */
        transition: transform 0.3s ease;
        visibility: visible;
        /* Garante visibilidade */
        overflow-y: auto;
        /* Permite rolagem se o conteúdo for muito grande */
    }

    .drawer.open {
        transform: translateX(0);
    }

    /* Estilo do overlay */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: 999;
        /* Menor que o drawer (1000) */
        transition: opacity 0.3s ease;
    }

    .overlay.active {
        display: block;
        opacity: 1;
    }

    /* Impede rolagem do body quando o menu está aberto */
    body.no-scroll {
        overflow: hidden;
    }

    .drawer {
        width: 280px !important;
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1001;
        /* Aumentado para garantir prioridade */
        background-color: var(--bg-secondary);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        visibility: visible;
        overflow-y: auto;
    }

    .drawer.open {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
        /* Adiciona sombra para destaque */
    }

    .overlay {
        z-index: 1001;
        /* Mantém abaixo do drawer */
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(3px);
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 0px;
    }

    .toggle-sidebar {
        margin-left: 4px;
    }

    .avatar-img {
        width: 34px !important;
        height: 34px !important;
        object-fit: cover;
    }

    .profile-name {
        font-size: 0.75rem;
        color: var(--text-primary);
        font-weight: bold;
        margin-bottom: 1px;
    }

    .text-available-revenue {
        font-size: 0.6rem;
        padding: 3px 9px;
    }

    .icon-btn {
        margin-right: 8px;
    }

    .filterBTN {
        top: 0px;
    }

    .stat-cards {
        gap: 0px !important;
        margin-bottom: 10px;
        position: relative;
        gap: 16px !important;
        grid-auto-columns: 1fr;
        /* Força colunas iguais */
        min-width: 0;
        /* Corrige overflow no grid */
    }

    .stat-title {
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 1.2rem;
        font-weight: 700;
        margin: 5px 0;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: .9rem;
    }

    .stat-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 0px;
    }

    .stat-card {
        margin-top: 0px;
        padding: 15px;
    }

    .stat_card_top {
        margin-top: 40px;

    }

    .dashboard-grid {
        margin-top: 20px;
    }

    .progress-container {
        display: none;
    }

    .medal-icon img {
        width: 30px;
        height: 30px;
        margin-right: 10px;

    }
}


/* Animation Styles */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(50, 50, 50, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(50, 50, 50, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(50, 50, 50, 0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

.slide-up-delay-1 {
    animation: slideUp 0.5s ease 0.1s forwards;
    opacity: 0;
}

.slide-up-delay-2 {
    animation: slideUp 0.5s ease 0.2s forwards;
    opacity: 0;
}

.slide-up-delay-3 {
    animation: slideUp 0.5s ease 0.3s forwards;
    opacity: 0;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Background Gradients */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.gradient-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.gradient-shape-1 {
    top: -10%;
    left: -5%;
    width: 50%;
    height: 40%;
    background: rgba(80, 80, 80, 0.2);
    animation: float 15s ease-in-out infinite alternate;
}

.gradient-shape-2 {
    bottom: -10%;
    right: -5%;
    width: 40%;
    height: 50%;
    background: rgba(110, 110, 110, 0.15);
    animation: float 20s ease-in-out 2s infinite alternate;
}

.gradient-shape-3 {
    top: 40%;
    right: 20%;
    width: 20%;
    height: 20%;
    background: rgba(150, 150, 150, 0.1);
    animation: float 12s ease-in-out 1s infinite alternate;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-3%, 5%) rotate(5deg);
    }

    100% {
        transform: translate(5%, -3%) rotate(-5deg);
    }
}

.header {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Efeito vidro para os botões e elementos do header */
.glass-effect {
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.glass-effect:hover {
    background: rgba(40, 40, 40, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Estilo destacado para o botão Novo Link */
.btn-highlight {
    color: #000000;
    font-weight: 600;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

@keyframes highlight-border {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Ajustes no título */
.page-title h1 {
    font-weight: 700;
    letter-spacing: -0.03em;
}


.profile-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Ajustes nos botões de ícones */
.icon-btn {
    position: relative;
    transition: all 0.3s ease;
}

.notification-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
    top: 7px;
    right: 7px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #1a1a1a;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-sidebar {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.page-title h1 {
    margin: 0;
    font-size: 1.5rem;
}

.text-gradient {
    background: linear-gradient(45deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.saldo-container {
    display: flex;
    flex-direction: row;
    border-radius: 8px;
    margin-right: 10px;
}

.icon-btn {
    position: relative;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: none;
    color: #fff;
    cursor: pointer;
}


.profile-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.profile-rank {
    display: flex;
    align-items: center;
    gap: 8px;
}

.medal-icon img {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.progress-container {
    width: 70px;
    height: 7.5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-right: 10px;
}


.progress-bar {
    height: 100%;
    width: 70%;
    background: #fff;
    border-radius: 3px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Efeito Glass */
.glass-effect {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.trend-up {
    color: #22c55e;
}

.trend-down {
    color: #ef4444;
}

.fa-arrow-up {
    color: #22c55e;
}

.fa-arrow-down {
    color: #ef4444;
}



/* Estilos para o Sidebar com Menu Expansível */
.sidebar {
    background-color: #141414;
    color: #ffffff;
    transition: all 0.3s ease;
}

.sidebar-content {
    padding-top: 10px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-header {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    margin-bottom: 5px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 8px;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.nav-icon {
    width: 18px;
    text-align: center;
    margin-right: 12px;
    font-size: 16px;
}


/* Adjustments for collapsed sidebar */
.sidebar.collapsed .nav-text,
.sidebar.collapsed .submenu-arrow,
.sidebar.collapsed .sidebar-footer-text {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.sidebar.collapsed .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    border-radius: 0 6px 6px 0;
    box-shadow: 5px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    background-color: #1A1A1A;
}

.sidebar.collapsed .submenu-link {
    padding: 10px 15px;
}


/* Estilos modernos para o gráfico de distribuição por dispositivo */

.me-2 {
    margin-right: 0.5rem;
}

/* Dispositivo Stats */
.device-stats-container {
    padding-top: 0.5rem;
}

.device-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.device-stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.device-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 20px;
}

.device-stat-info {
    flex: 1;
}

.device-stat-label {
    font-weight: 500;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.device-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.device-stat-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.device-stat-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
    animation: progressBarFill 1.5s ease-out forwards;
}

/* Resumo de estatísticas */
.device-stat-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item {
    text-align: center;
    flex: 1;
}

.summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.summary-value small {
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 2px;
    opacity: 0.8;
}

.summary-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Animação para os gráficos */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container {
    animation: chartFadeIn 1s ease-out forwards;
}

.sidebar {
    width: 250px;
    height: 100vh;
    color: #fff;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
}



/* Indicador vertical para item ativo */
.vertical-indicator {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: transparent;
    border-radius: 0 3px 3px 0;
}


/* Ícones */
.nav-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Estilo para o ícone de seta à esquerda */
.submenu-arrow-left {
    font-size: 10px;
    margin-right: 5px;
    transition: transform 0.3s ease;
}

/* Rotação da seta quando o submenu está aberto */
.nav-item.open .submenu-arrow-left {
    transform: rotate(90deg);
}

/* Estilo dos submenus */
.submenu {
    display: none;
    list-style: none;
    padding-left: 45px;
    margin-top: 5px;
}

.nav-item.open .submenu {
    display: block;
}

.submenu-link {
    display: block;
    padding: 8px 0;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.submenu-link:hover {
    color: #fff;
}

/* Botão de "Novo Link" */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    padding: 10px 15px;
    background-color: #1A73E8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 85%;
}

.action-btn:hover {
    background-color: #1558b3;
}

/* Remover padding e margin desnecessários */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}


.sidebar {
    width: 250px;
    height: 100vh;
    color: #fff;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    background-color: #0F0F0F;
}



/* Ícones */
.nav-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Estilo para o ícone de seta à esquerda */
.submenu-arrow-left {
    font-size: 10px;
    margin-right: 5px;
    transition: transform 0.3s ease;
}

/* Rotação da seta quando o submenu está aberto */
.nav-item.open .submenu-arrow-left {
    transform: rotate(90deg);
}

/* Estilo dos submenus */
.submenu {
    display: none;
    list-style: none;
    padding-left: 45px;
    margin-top: 5px;
}

.nav-item.open .submenu {
    display: block;
}

.submenu-link {
    display: block;
    padding: 8px 0;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.submenu-link:hover {
    color: #fff;
}

/* Botão de "Novo Link" */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    padding: 10px 15px;
    background-color: #292929;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 85%;
}

.action-btn:hover {
    background-color: #1558b3;
}

/* Remover padding e margin desnecessários */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    gap: 10px;
}

/* Adicione estas regras */
.drawer {
    width: 280px;
    /* Largura padrão */
    transition: all 0.3s ease;
}

.drawer.collapsed {
    width: 80px;
    /* Largura recolhida */
}

.drawer.collapsed .menu-text,
.drawer.collapsed .triangle,
.drawer.collapsed .triangle-placeholder,
.drawer.collapsed .submenu {
    display: none !important;
}

.drawer.collapsed .menu-item {
    justify-content: center;
    padding: 12px 0;
    margin-left: -5px;
}

.drawer.collapsed .icon {
    margin: 0 auto;
}

.drawer.collapsed .action-btn span {
    display: none;
}

.drawer.collapsed .action-btn .icon {
    margin-right: 0;
}

/* Adicione estas regras */
.drawer.collapsed .menu-item .triangle,
.drawer.collapsed .menu-item .triangle-placeholder {
    display: none !important;
}

.drawer.collapsed .menu-item .icon {
    margin-left: auto;
    margin-right: auto;
}


.drawer.collapsed .menu-item {
    justify-content: center;
    padding: 12px 0;
}

.drawer.collapsed .menu-text {
    display: none;
}

.menu-item,
.action-btn,
.submenu {
    transition: all 0.3s ease;
}

/* Ajuste da margem quando recolhido */
.drawer.collapsed .menu-item {
    margin-left: 10px;
    padding-left: 18%;
    justify-content: flex-start !important;
}

/* Ajuste fino na posição dos ícones */
.drawer.collapsed .menu-item .icon {
    margin-left: 0;
    margin-right: auto;
}

/* Garante alinhamento dos subitens */
.drawer.collapsed .submenu {
    margin-left: 8px;
}


/* Ajustes específicos para o botão Novo Link recolhido */
.drawer.collapsed .action-btn {
    width: 55px;
    margin: 8px auto;
    padding: 8px !important;
    justify-content: center;
}

.drawer.collapsed .action-btn .icon {
    margin: 0;
    transform: scale(1.1);
}

/* Alinhamento vertical dos ícones */
.drawer.collapsed .menu-item,
.drawer.collapsed .action-btn {
    padding-left: 18% !important;
    margin-left: 8px;
    justify-content: flex-start !important;
}

/* Garantir que os ícones fiquem alinhados */
.drawer.collapsed .menu-item .icon,
.drawer.collapsed .action-btn .icon {
    margin-left: 0;
    margin-right: auto;
}


/* Correção para iOS - Scroll com elementos absolutos */
.stat-cards {
    -webkit-overflow-scrolling: touch;
    overflow: visible;
    transform: translateZ(0);
}

.filterBTN {
    z-index: 50;
    background: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
    /* Força aceleração gráfica */
}


/* Ajuste fino para posicionamento em mobile */
@media screen and (max-width: 768px) {
    .stat-cards {
        padding-top: 15px;
        /* Espaço para o botão flutuante */
    }

    .filterBTN {
        top: 10px !important;
        right: 15px !important;
        padding: 8px 12px;
    }
}