/* ==================== LAYOUT 3 COLUNAS ==================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ==================== SIDEBARS (ESQUERDA E DIREITA) ==================== */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.sidebar-left {
    border-right: 1px solid var(--border);
    border-left: none;
}

.sidebar-right {
    border-left: 1px solid var(--border);
    border-right: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(124, 58, 237, 0.1);
}

.sidebar-header .sidebar-icon {
    font-size: 1.25rem;
}

.sidebar-header h2 {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ==================== USER CARD (SIDEBAR ESQUERDA) ==================== */
.current-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.current-user-card .user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.current-user-card .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.current-user-card .user-role {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    width: fit-content;
}

/* ==================== STAFF FORM ==================== */
.staff-form-section {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 0.75rem;
    border: 1px solid var(--border);
}

.staff-form-section h3 {
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
}

.staff-form-section form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.staff-form-section input,
.staff-form-section select {
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.staff-form-section input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==================== USERS LIST ==================== */
.users-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.users-list-section h3 {
    font-size: 0.75rem;
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.users-list {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.35rem;
}

.user-item .user-role {
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
}

.user-item .user-item-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-hours {
    font-size: 0.65rem;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

.user-item .icon-btn {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.user-item:hover .icon-btn,
.user-item:hover .dropdown-trigger {
    opacity: 1;
}

/* ==================== DROPDOWN MENU ==================== */
.dropdown-menu {
    position: relative;
}

.dropdown-trigger {
    opacity: 0;
    transition: opacity 0.2s;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==================== ACCOUNTS LIST (SIDEBAR DIREITA) ==================== */
.accounts-list {
    flex: 1;
    overflow-y: auto;
}

.empty-list {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
}

.empty-list span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 60px;
}

.account-item:hover {
    border-color: var(--accent);
    background: rgba(124, 58, 237, 0.1);
}

.account-item.active {
    border-color: var(--accent);
    background: rgba(124, 58, 237, 0.15);
}

.account-item.online::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--success);
    border-radius: 2px;
}

.account-item.selected {
    box-shadow: 0 0 0 2px #3b82f6;
}

.account-item-avatar {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 6px;
    flex-shrink: 0;
}

.account-item-info {
    flex: 1;
    min-width: 60px;
    overflow: hidden;
}

.account-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.account-item-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.account-item-money {
    color: #fbbf24;
}

.account-item-status {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Botões de ação nos itens de conta */
.account-item-actions {
    display: flex;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.account-item:hover .account-item-actions {
    opacity: 1;
}

.account-item-actions .action-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 5px;
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.account-item-actions .action-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.account-item-actions .action-btn.connect {
    background: rgba(16, 185, 129, 0.2);
}

.account-item-actions .action-btn.connect:hover {
    background: var(--success);
}

.account-item-actions .action-btn.disconnect {
    background: rgba(239, 68, 68, 0.2);
}

.account-item-actions .action-btn.disconnect:hover {
    background: var(--danger);
}

.account-item-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.15);
}

.account-item-actions .action-btn.delete:hover {
    background: var(--danger);
}

.account-item-status.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.account-item-status.offline {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.account-item-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
}

.account-item-check.visible {
    display: flex;
}

.account-item.selected .account-item-check {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Money Total Footer */
.money-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    font-weight: 600;
    color: #fbbf24;
}

/* ==================== ÁREA CENTRAL ==================== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-center .logo-icon {
    font-size: 1.5rem;
}

.header-center h1 {
    font-size: 1.1rem;
    margin: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.console-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    overflow-y: auto;
}

/* ==================== STATS BAR ==================== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-item .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-item.online .stat-value {
    color: var(--success);
}

.stat-item.money .stat-value {
    color: #fbbf24;
}

/* ==================== SELECTED ACCOUNT BAR ==================== */
.selected-account-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--accent);
    border-radius: 10px;
}

.selected-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selected-icon {
    font-size: 1.5rem;
}

.selected-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.selected-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.selected-status.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.selected-status.offline {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.selected-status.reconnecting {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
    animation: pulse-status 1.5s infinite;
}

.selected-status.connecting {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.selected-status.kicked,
.selected-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

@keyframes pulse-status {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.selected-server,
.selected-money {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.selected-money {
    color: #fbbf24;
}

.selected-actions {
    display: flex;
    gap: 0.4rem;
}

/* ==================== CONSOLE ==================== */
.console-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    max-height: 350px;
}

.console {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    max-height: 250px;
}

.console-input-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.console-input-bar input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
}

.console-input-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==================== BULK SECTION ==================== */
.bulk-section {
    background: linear-gradient(135deg, #1a2332 0%, #243447 100%);
    border: 1px solid #3b82f6;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bulk-header h3 {
    margin: 0;
    font-size: 0.85rem;
    color: #60a5fa;
}

.bulk-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-btn {
    padding: 0.2rem 0.4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.65rem;
    cursor: pointer;
}

.mini-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

#selected-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.bulk-input {
    display: flex;
    gap: 0.5rem;
}

.bulk-input input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.bulk-input input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ==================== ICON BTN ==================== */
.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.icon-btn.small {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.icon-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
}

.icon-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.icon-btn.danger:hover {
    background: var(--danger);
}

.icon-btn.macro-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
    border-color: rgba(245, 158, 11, 0.5);
}

.icon-btn.macro-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Tooltip */
.icon-btn[title]::after {
    content: attr(title);
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.15s;
    pointer-events: none;
    z-index: 100;
}

.icon-btn[title]:hover::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Tooltip global melhorado para elementos com title */
[title] {
    position: relative;
}

/* Tooltip para user-role badges */
.user-role[title] {
    cursor: help;
}

/* Tooltip para nomes truncados */
.account-item-name[title],
.user-info span[title] {
    cursor: default;
}

/* ==================== QUICK BTNS ==================== */
.quick-btns {
    display: flex;
    gap: 0.4rem;
    margin: 0.5rem 0;
}

/* ==================== BTN FULL WIDTH ==================== */
.btn.full-width {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
        min-width: 220px;
    }
}

/* Regras responsivas removidas aqui - Centralizadas no style.css para evitar conflitos */

/* ==================== GROUP SECTION ==================== */
.group-section {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 0.75rem;
    border: 1px solid var(--border);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.group-header h3 {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-secondary);
}

.group-select {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.group-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.quick-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem;
}

.quick-actions .btn span {
    font-size: 1rem;
}

/* ==================== GROUPS LIST ==================== */
.groups-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.groups-form {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
}

.groups-form h4 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.groups-form form {
    display: flex;
    gap: 0.5rem;
}

.groups-form input {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
}

.groups-list {
    max-height: 400px;
    overflow-y: auto;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

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

.group-name {
    font-weight: 600;
    color: var(--text-primary);
}

.group-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.group-actions {
    display: flex;
    gap: 0.25rem;
}

/* ==================== HOURS CALENDAR ==================== */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav span {
    min-width: 150px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.hours-calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.hours-calendar-table th,
.hours-calendar-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.hours-calendar-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.hours-calendar-table tr:hover {
    background: rgba(124, 58, 237, 0.05);
}

.hours-calendar-table tr.paid {
    background: rgba(16, 185, 129, 0.05);
}

.hours-calendar-table tr.pending {
    background: rgba(251, 191, 36, 0.05);
}

.status-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.status-btn.paid {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-btn.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-btn:hover {
    transform: scale(1.05);
}

.badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge.add {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge.remove {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* ==================== LOGS CONTAINER ==================== */
.logs-container {
    max-height: 500px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.log-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
}

.log-user {
    font-weight: 600;
    color: var(--accent-light);
    min-width: 80px;
}

.log-action {
    color: var(--text-secondary);
}

.log-details {
    color: var(--text-primary);
    flex: 1;
}

/* ==================== MODAL INFO ==================== */
.modal-info {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ==================== BTN DANGER ==================== */
.btn.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn.btn-danger:hover {
    background: #dc2626;
}

/* ==================== UNGROUPED USERS SECTION ==================== */
.ungrouped-users-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-radius: 10px;
    padding: 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.ungrouped-users-section h3 {
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
    color: #fbbf24;
}

.ungrouped-users-list {
    max-height: 250px;
    overflow-y: auto;
}

/* Scrollbar estilizada */
.ungrouped-users-list::-webkit-scrollbar {
    width: 6px;
}

.ungrouped-users-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.ungrouped-users-list::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 3px;
}

.ungrouped-user-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    border-left: 3px solid #fbbf24;
}

.ungrouped-user-item .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.ungrouped-user-item .user-info .user-role {
    flex-shrink: 0;
}

.ungrouped-user-item .user-info span:last-of-type:not(.user-role):not(.user-hours) {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.ungrouped-user-item .user-hours {
    font-size: 0.7rem;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: auto;
}

.ungrouped-user-item .user-actions {
    display: flex;
    gap: 0.35rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ungrouped-user-item .user-actions button {
    flex: 1;
    background: rgba(251, 191, 36, 0.15);
    border: none;
    border-radius: 4px;
    padding: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.ungrouped-user-item .user-actions button:hover {
    background: #fbbf24;
    color: #000;
    transform: scale(1.05);
}

.ungrouped-user-item .user-actions button.danger {
    background: rgba(239, 68, 68, 0.15);
}

.ungrouped-user-item .user-actions button.danger:hover {
    background: var(--danger);
    color: white;
}

.ungrouped-user-item .user-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.ungrouped-user-item .user-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==================== GROUP TREE ==================== */
.group-tree-item {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.group-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.group-tree-header:hover {
    background: rgba(124, 58, 237, 0.1);
}

.group-tree-header .group-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.group-tree-header .group-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(124, 58, 237, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.group-tree-users {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0.5rem;
}

.group-tree-item.expanded .group-tree-users {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    padding-top: 0;
}

/* Scrollbar estilizada para lista de usuários */
.group-tree-users::-webkit-scrollbar {
    width: 6px;
}

.group-tree-users::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.group-tree-users::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.group-tree-user {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-card);
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.group-tree-user .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.group-tree-user .user-info .user-role {
    flex-shrink: 0;
}

.group-tree-user .user-info span:last-child {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.group-tree-user .user-hours {
    font-size: 0.7rem;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: auto;
}

.group-tree-user .user-actions {
    display: flex;
    gap: 0.35rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.group-tree-user .user-actions button {
    flex: 1;
    background: rgba(124, 58, 237, 0.15);
    border: none;
    border-radius: 4px;
    padding: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.group-tree-user .user-actions button:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.group-tree-user .user-actions button.danger {
    background: rgba(239, 68, 68, 0.15);
}

.group-tree-user .user-actions button.danger:hover {
    background: var(--danger);
}

.group-tree-user .user-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.group-tree-user .user-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.group-tree-user .user-actions button.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ==================== CONSUMPTION LOGS ==================== */
.consumption-filter {
    display: flex;
    gap: 0.5rem;
}

.consumption-filter select {
    padding: 0.5rem;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
}

.consumption-summary {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.consumption-logs-container {
    overflow-x: auto;
    max-height: 450px;
    overflow-y: auto;
}

.consumption-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.consumption-logs-table th,
.consumption-logs-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.consumption-logs-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    position: sticky;
    top: 0;
}

.consumption-logs-table tr:hover {
    background: rgba(124, 58, 237, 0.05);
}

.consumption-value {
    font-weight: 600;
    color: var(--warning);
}

/* ==================== BOT LIMITS ==================== */
.bot-limits-info {
    padding: 1rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.bot-limits-info p {
    margin: 0;
    font-size: 0.9rem;
}

.bot-limits-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.bot-limits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.bot-limits-table th,
.bot-limits-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.bot-limits-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    position: sticky;
    top: 0;
}

.bot-limits-table tr:hover {
    background: rgba(124, 58, 237, 0.05);
}

.bot-limits-table tr.limit-reached {
    background: rgba(239, 68, 68, 0.1);
}

.extra-limit {
    color: var(--text-secondary);
}

.extra-limit.has-extra {
    color: var(--success);
    font-weight: 600;
}

.online-count {
    color: var(--success);
    font-weight: 600;
}

.bot-limits-table .btn-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

/* ==================== MODAL CENTRALIZADO (LOGS E CALENDÁRIO) ==================== */
/* Forçar centralização dos modais grandes - sobrescrever style.css */
#modal-consumption-logs.modal-large,
#modal-hours-calendar.modal-large,
#modal-bot-limits.modal-large,
#modal-group-logs.modal-large,
#modal-proxies.modal-large {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000 !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: none !important;
    width: 100% !important;
}

#modal-consumption-logs.modal-large.active,
#modal-hours-calendar.modal-large.active,
#modal-bot-limits.modal-large.active,
#modal-group-logs.modal-large.active,
#modal-proxies.modal-large.active {
    display: flex !important;
}

#modal-consumption-logs .modal-content-large,
#modal-hours-calendar .modal-content-large,
#modal-bot-limits .modal-content-large,
#modal-group-logs .modal-content-large,
#modal-proxies .modal-content-large {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 950px !important;
    width: 95% !important;
    max-height: 85vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

#modal-consumption-logs .modal-header,
#modal-hours-calendar .modal-header,
#modal-bot-limits .modal-header,
#modal-group-logs .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
    flex-shrink: 0;
}

#modal-consumption-logs .modal-header h3,
#modal-hours-calendar .modal-header h3,
#modal-bot-limits .modal-header h3,
#modal-group-logs .modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Container de conteúdo com scroll */
.consumption-logs-container,
.hours-calendar-container,
.bot-limits-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Tabelas dentro dos modais */
.consumption-logs-table,
.hours-calendar-table,
.bot-limits-table {
    width: 100%;
    border-collapse: collapse;
}

.consumption-logs-table th,
.consumption-logs-table td,
.hours-calendar-table th,
.hours-calendar-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.consumption-logs-table th,
.hours-calendar-table th {
    background: var(--bg-card);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Summary de consumo */
.consumption-summary {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.consumption-summary .summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.consumption-summary .summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.consumption-summary .summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Container específico do calendário de horas */
.hours-calendar-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Navegação do calendário */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav span {
    min-width: 150px;
    text-align: center;
    font-weight: 600;
}

/* ==================== DISPLAY DE HORAS MELHORADO ==================== */
.hours-display-formatted {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-weight: 600;
}

.hours-display-formatted .hours-value {
    font-size: 1.2em;
    color: var(--accent);
}

.hours-display-formatted .hours-unit {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-right: 4px;
}

.hours-display-formatted .minutes-value {
    font-size: 1.1em;
    color: var(--accent-light);
}

.hours-display-formatted .minutes-unit {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Horas grandes na sidebar */
.hours-balance-large {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.hours-balance-large .hours-part {
    color: var(--accent);
}

.hours-balance-large .minutes-part {
    color: var(--accent-light);
    font-size: 1.4rem;
}

.hours-balance-large .time-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==================== LOGS DE CONSUMO MELHORADOS ==================== */
.consumption-log-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

.consumption-log-card:hover {
    background: rgba(124, 58, 237, 0.1);
}

.log-info-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-info-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.log-info-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.log-info-value.highlight {
    color: var(--warning);
    font-weight: 600;
}

.log-info-value.success {
    color: var(--success);
}

.log-bots-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(124, 58, 237, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.log-bots-badge .bot-count {
    font-weight: 600;
    color: var(--accent);
}

/* Botão de logs para usuário */
.btn-my-logs {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-my-logs:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Status badge para status de pagamento (read-only para staff) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.paid {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.pending {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}