@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('colors.css');

/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #121212;
    color: #ffffff;
    line-height: 1.5;
    min-height: 100vh;
}

/* --- Componentes Globais --- */

/* Barra de Navegação */
.nav-bar {
    background-color: #1E1E1E;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2C2C2C;
}

.nav-branding {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo-svg {
    width: 180px;
    height: 24px;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link.active {
    background-color: #2E844A;
}

.nav-link:hover:not(.active) {
    background-color: #2C2C2C;
}

/* Conteúdo Principal */
.main-content {
    padding: 32px;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.page-description {
    color: #A1A1A1;
    font-size: 14px;
}

/* Botões */
.action-button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.action-button.primary {
    background-color: #2E844A;
    color: white;
}

.action-button.primary:hover {
    background-color: #236C3A;
}

.btn-icon {
    background: #2C2C2C;
    border: 1px solid #3C3C3C;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.btn-icon svg {
    stroke: #A1A1A1;
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
}

.btn-icon:hover {
    background-color: #3C3C3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-icon.btn-edit:hover {
    background: linear-gradient(135deg, #2E844A 0%, #236C3A 100%);
    border-color: #1E5A2E;
    box-shadow: 0 4px 16px rgba(46, 132, 74, 0.4);
}

.btn-icon.btn-edit:hover svg {
    stroke: #FFFFFF;
}

.btn-icon.btn-delete:hover {
    background: linear-gradient(135deg, #DC3545 0%, #C82333 100%);
    border-color: #A71E2A;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
}

.btn-icon.btn-delete:hover svg {
    stroke: #FFFFFF;
}

.btn-icon.btn-delete svg {
    stroke: #DC3545;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #FFFFFF;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #2C2C2C;
    border: none;
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #2E844A;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background-color: #1E1E1E;
    border-radius: 8px;
    z-index: 1001;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #2C2C2C;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #2C2C2C;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Classes Utilitárias */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 16px;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}


/* --- Estilos Específicos de Página --- */

/* Página de Login */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    /* background-image: url("../img/background.png"); */
    /* background-size: cover; */
    /* background-position: center; */
    background-color: #393d41;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-subtitle {
    text-align: center;
    color: #A1A1A1;
    font-size: 14px;
    margin-bottom: 30px;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #2E844A;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #236C3A;
}

/* Modalidade Selector */
.modalidade-selector {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.modalidade-label {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
}

/* Páginas com Sidebar (index.html) */
.layout-with-sidebar {
    display: flex;
    gap: 24px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: #1E1E1E;
    border-radius: 8px;
    overflow: hidden;
    max-height: calc(100vh - 180px);
    /* Ajustado para acomodar o dropdown de modalidade */
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    background-color: #2C2C2C;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    overflow-y: auto;
}

.sidebar-menu-item {
    padding: 12px 16px;
    border-bottom: 1px solid #2C2C2C;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-size: 14px;
}

.sidebar-menu-item a {
    color: #FFFFFF;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
}

.sidebar-menu-item:hover {
    background-color: #2C2C2C;
}

.sidebar-menu-item.active {
    background-color: #2E844A;
    font-weight: 500;
    color: #FFFFFF;
}

.content-area {
    flex: 1;
    overflow: hidden;
}

/* Grade de Poker */
.poker-grid-container {
    background-color: #1E1E1E;
    border-radius: 8px;
    padding: 24px;
    overflow: hidden;
}

/* Esconder scrollbars em todos os elementos da tabela */
.poker-grid-container,
.poker-table-grid,
.poker-grid-layout,
.content-area,
.main-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.poker-grid-container::-webkit-scrollbar,
.poker-table-grid::-webkit-scrollbar,
.poker-grid-layout::-webkit-scrollbar,
.content-area::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    display: none; /* WebKit */
}

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

.poker-grid-title {
    font-size: 20px;
    font-weight: 600;
}

.poker-grid-tabs-container {
    margin-bottom: 24px;
    width: 100%;
}

.poker-grid-tabs-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.poker-grid-tab {
    text-decoration: none;
    color: white;
    width: calc(12.5% - 7px);
    /* 8 tabs por linha com gap de 8px */
    height: 37px;
    background-color: #2C2C2C;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 4px;
}

.poker-grid-tab:hover {
    background-color: #3a3a3a;
}

.poker-grid-tab.active {
    background-color: #2E844A;
}


.poker-grid-layout {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
}

.poker-table-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 2px;
    width: 100%;
    max-width: 65%;
}

.poker-hand {
    width: 100%;
    height: 42px;
    aspect-ratio: 1 / 1;
    background-color: #121212;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #FFFFFF;
}

/* Legendas */
.legend-container {
    border-radius: 8px;
    padding: 16px;
    min-width: 280px;
    width: 35%;
    flex-shrink: 0;
    background-color: #1E1E1E;
}

.legend-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-text {
    font-size: 14px;
}

.legend-summary {
    margin-top: 24px;
    color: #A1A1A1;
    font-size: 14px;
}

/* Página de Alunos */
.students-table {
    width: 100%;
    background-color: #1E1E1E;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #2C2C2C;
}

.students-table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr 1fr 1fr 1fr;
    padding: 20px 24px;
    align-items: center;
    background: linear-gradient(135deg, #2C2C2C 0%, #3C3C3C 100%);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #2E844A;
}

.students-table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr 1fr 1fr 1fr;
    padding: 18px 24px;
    align-items: center;
    border-bottom: 1px solid #2C2C2C;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.students-table-row:hover {
    background-color: #252525;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.students-table-row:last-child {
    border-bottom: none;
}

/* Separadores visuais entre colunas */
.students-table-header > div:not(:last-child),
.students-table-row > div:not(:last-child) {
    border-right: 1px solid #3C3C3C;
    padding-right: 16px;
    margin-right: 16px;
}

/* Centralizar especificamente a coluna de dispositivos */
.students-table-row > div:nth-child(6) {
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

/* Centralizar o cabeçalho da coluna de dispositivos */
.students-table-header > div:nth-child(6) {
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

/* Estilo para coluna de ações */
.students-table-row > div:nth-child(7) {
    border-right: none;
    padding-right: 16px;
    margin-right: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* Alinhar cabeçalho da coluna de ações à direita */
.students-table-header > div:nth-child(7) {
    border-right: none;
    padding-right: 16px;
    margin-right: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Melhor espaçamento para texto */
.students-table-row > div:not(:nth-child(6)):not(:nth-child(7)) {
    padding: 4px 0;
    line-height: 1.4;
}

/* Destaque para nomes */
.students-table-row > div:nth-child(1) {
    font-weight: 500;
    color: #FFFFFF;
}

/* Estilo para emails */
.students-table-row > div:nth-child(3) {
    color: #A1A1A1;
    font-size: 13px;
}

/* Estilo para tipos de usuário */
.students-table-row > div:nth-child(4) {
    font-weight: 500;
}

/* Estilo para categorias */
.students-table-row > div:nth-child(5) {
    font-size: 13px;
    color: #B0B0B0;
}

/* Página Criar Tabela */
.dropdown-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.table-dropdown {
    min-width: 200px;
    padding: 10px;
    background-color: #2C2C2C;
    border: none;
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 14px;
}

#tables-list-container {
    margin-top: 32px;
}

.table-list {
    width: 100%;
    background-color: #1E1E1E;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
    border-collapse: collapse;
}

.table-list th,
.table-list td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #2C2C2C;
}

.table-list th {
    background-color: #2C2C2C;
    font-weight: 600;
}

.table-list tr:last-child td {
    border-bottom: none;
}

.table-list .actions-cell {
    width: 150px;
}

#table-editor-screen .poker-grid-container {
    padding: 0;
    background: none;
}

.legend-editor {
    width: 320px;
    background-color: #1E1E1E;
    border-radius: 8px;
    padding: 16px;
}

.legend-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item-editor {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid transparent;
}

.legend-item-editor:hover {
    background-color: #2C2C2C;
}

.legend-item-editor.active {
    background-color: #2C2C2C;
    border-color: #2E844A;
}

.legend-item-editor .legend-item-color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-item-editor .legend-item-details {
    flex: 1;
}

.legend-item-editor .legend-item-description {
    font-size: 12px;
    color: #A1A1A1;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #FFFFFF;
    transform: scale(1.1);
}

/* Botão de borracha */
#eraser-btn.active {
    background-color: #28a745 !important;
    color: white !important;
    box-shadow: 0 0 0 2px #28a745;
}

#eraser-btn:hover {
    background-color: #c82333 !important;
}

#eraser-btn.active:hover {
    background-color: #218838 !important;
}

/* Melhorias para pintura por arraste */
.poker-hand {
    user-select: none;
    /* Prevenir seleção de texto durante o arraste */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.poker-hand:hover {
    transform: scale(1.05);
}

/* Cursor personalizado para modo de arraste */
.poker-table-grid.dragging {
    cursor: crosshair;
}

.poker-table-grid.dragging .poker-hand {
    cursor: crosshair;
}

/* Prevenir seleção de texto durante o arraste */
.no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Modal de porcentagens de legendas */
.percentage-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #2C2C2C;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.percentage-summary.warning {
    background-color: #FF6B6B;
    color: white;
}

.percentage-summary.success {
    background-color: #51CF66;
    color: white;
}

.legend-percentage-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #2C2C2C;
    border-radius: 4px;
    border: 1px solid #3C3C3C;
}

.legend-percentage-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-percentage-info {
    flex: 1;
}

.legend-percentage-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.legend-percentage-description {
    font-size: 12px;
    color: #A1A1A1;
}

.legend-percentage-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-percentage-input input {
    width: 80px;
    padding: 6px 8px;
    background-color: #1E1E1E;
    border: 1px solid #3C3C3C;
    border-radius: 4px;
    color: white;
    text-align: center;
    font-size: 14px;
}

.legend-percentage-input input:focus {
    outline: none;
    border-color: #2E844A;
    box-shadow: 0 0 0 2px rgba(46, 132, 74, 0.2);
}

/* Seletor de Cor da Tabela */
.color-picker-container {
    margin-top: 8px;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background-color: #1E1E1E;
    border: 1px solid #3C3C3C;
    border-radius: 6px;
}

.color-picker .color-option {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.color-picker .color-option:hover {
    transform: scale(1.1);
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-picker .color-option.selected {
    border-color: #2E844A;
    box-shadow: 0 0 0 2px rgba(46, 132, 74, 0.3);
    transform: scale(1.1);
}

.color-picker .color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.legend-percentage-input .percentage-symbol {
    color: #A1A1A1;
    font-size: 14px;
}

/* Indicador de cor da tabela na lista */
.table-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 2px solid #3C3C3C;
    display: inline-block;
}

/* Estilos para links da sidebar com quadrado colorido */
.sidebar-link {
    display: block;
    text-decoration: none;
    color: white;
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
    background-color: #2C2C2C;
}

.sidebar-link:hover {
    /* Animação removida - sem transform e box-shadow */
    border-color: rgba(255, 255, 255, 0.3);
    background-color: #3C3C3C;
}

.sidebar-link.active {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
    /* Animação removida - sem transform */
    font-weight: 600;
    background-color: #2E844A;
}

.sidebar-link.active::after {
    content: '▶';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-link-content {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.sidebar-link-content span {
    font-weight: 500;
    color: white;
}

/* Quadrado colorido para as tabelas */
.sidebar-link .table-color-square {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cores para o quadrado colorido */
.table-color-square.color-1 {
    background-color: #D3D3D3 !important;
}

.table-color-square.color-2 {
    background-color: #A9A9A9 !important;
}

.table-color-square.color-3 {
    background-color: #778899 !important;
}

.table-color-square.color-4 {
    background-color: #4682B4 !important;
}

.table-color-square.color-5 {
    background-color: #5F9EA0 !important;
}

.table-color-square.color-6 {
    background-color: #00BFFF !important;
}

.table-color-square.color-7 {
    background-color: #1E90FF !important;
}

.table-color-square.color-8 {
    background-color: #3CB371 !important;
}

.table-color-square.color-9 {
    background-color: #2E8B57 !important;
}

.table-color-square.color-10 {
    background-color: #00FF00 !important;
}

.table-color-square.color-11 {
    background-color: #ADFF2F !important;
}

.table-color-square.color-12 {
    background-color: #FFFF00 !important;
}

.table-color-square.color-13 {
    background-color: #FFD700 !important;
}

.table-color-square.color-14 {
    background-color: #FFA500 !important;
}

.table-color-square.color-15 {
    background-color: #FF6347 !important;
}

.table-color-square.color-16 {
    background-color: #FF0000 !important;
}

.table-color-square.color-17 {
    background-color: #C71585 !important;
}

.table-color-square.color-18 {
    background-color: #FF1493 !important;
}

.table-color-square.color-19 {
    background-color: #9370DB !important;
}

.table-color-square.color-20 {
    background-color: #8A2BE2 !important;
}

/* Efeito de brilho removido para evitar problemas de scroll */


.text-muted {
    color: #A1A1A1;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Estilos para drag and drop */
.draggable-row {
    transition: all 0.2s ease;
    cursor: move;
}

.draggable-row:hover {
    background-color: rgba(46, 132, 74, 0.1);
}

.draggable-row.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.drag-handle {
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: #2E844A !important;
}

.draggable-row:hover .drag-handle {
    color: #2E844A !important;
}

/* Estilos para coluna de dispositivos */
.dispositivos-info {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.dispositivos-count {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 90px;
    transition: all 0.3s ease;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.dispositivos-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.dispositivos-count:hover::before {
    left: 100%;
}

.dispositivos-count.online {
    background: linear-gradient(135deg, #2E844A 0%, #236C3A 100%);
    color: white;
    box-shadow: 0 2px 12px rgba(46, 132, 74, 0.4);
    border: 1px solid #1E5A2E;
}

.dispositivos-count.online:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(46, 132, 74, 0.6);
}

.dispositivos-count.offline {
    background: linear-gradient(135deg, #2C2C2C 0%, #3C3C3C 100%);
    color: #A1A1A1;
    border: 1px solid #4C4C4C;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dispositivos-count.offline:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #3C3C3C 0%, #4C4C4C 100%);
    color: #B0B0B0;
}

.dispositivos-count:hover {
    cursor: help;
}

.dispositivos-count.dispositivos-clickable {
    cursor: pointer;
}

.dispositivos-count.dispositivos-clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(46, 132, 74, 0.6);
}

/* Modal de Dispositivos */
.dispositivos-modal-content {
    max-width: 600px;
    width: 90%;
}

.dispositivo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #2C2C2C;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #3C3C3C;
    transition: all 0.3s ease;
}

.dispositivo-item:hover {
    background-color: #3C3C3C;
    transform: translateX(4px);
}

/* Dispositivo offline */
.dispositivo-item.offline {
    background-color: #1A1A1A;
    border-color: #333333;
    opacity: 0.7;
}

.dispositivo-item.offline:hover {
    background-color: #222222;
}


.dispositivo-info {
    flex: 1;
}

.dispositivo-tipo {
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.dispositivo-detalhes {
    font-size: 13px;
    color: #A1A1A1;
    margin-bottom: 2px;
}

.dispositivo-tempo {
    font-size: 12px;
    color: #2E844A;
    font-weight: 500;
}

.dispositivo-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2E844A;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.dispositivo-ip {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #B0B0B0;
}

/* Botão de perigo */
.action-button.danger {
    background: linear-gradient(135deg, #DC3545 0%, #C82333 100%);
    color: white;
    border: 1px solid #A71E2A;
}

.action-button.danger:hover {
    background: linear-gradient(135deg, #C82333 0%, #A71E2A 100%);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
}

/* Lista vazia */
.dispositivos-vazios {
    text-align: center;
    padding: 40px 20px;
    color: #A1A1A1;
}

.dispositivos-vazios .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}