* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e8eaf6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

.container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    left: 0;
    top: 0;
}

.logo {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.logo h1 {
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-item a:hover {
    background: rgba(32, 155, 213, 0.08);
    color: #209BD5;
}

.nav-item.active a {
    background: rgba(32, 155, 213, 0.12);
    color: #209BD5;
    font-weight: 600;
}

.nav-item .icon {
    font-size: 1.1rem;
    margin-right: 0.875rem;
    opacity: 0.9;
}

.nav-item .icon-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
}

.nav-item .icon-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.nav-item a:hover .icon-image img,
.nav-item.active a .icon-image img {
    filter: grayscale(0%) brightness(1);
}

/* Content */
.content {
    margin-left: 250px;
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Aplicar gradiente apenas no texto, não nos emojis */
.page-header h2 .title-text {
    background: linear-gradient(135deg, #209BD5 0%, #64b5f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Emojis mantêm cor original */
.page-header h2 .title-emoji {
    font-size: 2rem;
    filter: none !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: inherit !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(32, 155, 213, 0.3);
    border-color: rgba(32, 155, 213, 0.4);
}

.stat-card.blue {
    border-left: 4px solid #209BD5;
}

.stat-card.green {
    border-left: 4px solid #4ade80;
}

.stat-card.yellow {
    border-left: 4px solid #fbbf24;
}

.stat-card.red {
    border-left: 4px solid #f87171;
}

.stat-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 8px rgba(32, 155, 213, 0.5));
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #209BD5 0%, #64b5f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .logo h1,
    .nav-item span:not(.icon) {
        display: none;
    }
    
    .nav-separator span {
        display: none;
    }
    
    .nav-separator {
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .logo img {
        width: 40px !important;
        max-width: 40px !important;
    }

    .content {
        margin-left: 70px;
        padding: 1.5rem;
    }

    .user-details {
        display: none;
    }
    
    .user-info {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
    }
    
    .logo {
        display: none;
    }
    
    .nav-menu {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        padding: 0.5rem 0;
        margin: 0;
    }
    
    .nav-item {
        margin: 0;
        flex: 1;
    }
    
    .nav-item a {
        flex-direction: column;
        padding: 0.75rem 0.5rem;
        gap: 0.25rem;
        justify-content: center;
        align-items: center;
    }
    
    .nav-item .icon {
        margin: 0;
        font-size: 1.5rem;
    }
    
    .nav-item span:not(.icon) {
        display: block;
        font-size: 0.7rem;
    }
    
    .user-info {
        display: none;
    }

    .content {
        margin-left: 0;
        margin-bottom: 80px;
        padding: 1rem;
        padding-bottom: 2rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    /* Tabelas responsivas */
    .data-table-container {
        border-radius: 12px;
        width: 100%;
        overflow-x: auto;
    }
    
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .data-table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .table-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Controles */
    .supabase-controls,
    .client-controls {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .select-wrapper {
        width: 100%;
    }
    
    .btn-refresh,
    .btn-client-link {
        width: 100%;
        padding: 1rem;
    }
    
    /* Paginação */
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .btn-page {
        width: 100%;
    }
    
    /* Modais */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-form {
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-save {
        width: 100%;
    }
    
    /* Cards de usuários */
    .usuarios-container {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .usuario-card {
        padding: 1.5rem;
        width: 100%;
    }
    
    /* Perfil */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    /* Configurações */
    .config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-test,
    .btn-save {
        width: 100%;
    }
    
    /* Date inputs */
    .date-inputs {
        grid-template-columns: 1fr;
    }
    
    /* Client Link Modal */
    .link-input-group {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
    
    .access-info {
        padding: 1rem;
    }
    
    /* Botões de ação na tabela */
    .btn-enviar-conversao {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 0.75rem;
        width: 100%;
        max-width: 100vw;
    }
    
    .page-header {
        margin-bottom: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.25rem;
        word-break: break-word;
    }
    
    .stat-card {
        padding: 1rem;
        width: 100%;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 0.85rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .nav-item span:not(.icon) {
        font-size: 0.65rem;
    }
    
    .nav-item .icon {
        font-size: 1.3rem;
    }
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(13, 13, 13, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .login-header .login-logo {
        width: 200px !important;
        max-width: 200px !important;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .login-logo {
    width: 280px !important;
    height: auto !important;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #209BD5 0%, #64b5f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    color: #e8eaf6;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #209BD5;
    box-shadow: 0 0 0 3px rgba(32, 155, 213, 0.1);
    background: rgba(13, 13, 13, 0.8);
}

.form-group input::placeholder {
    color: #6b7280;
}

.error-message {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    color: #f87171;
    font-size: 0.9rem;
    text-align: center;
}

.btn-login {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 155, 213, 0.4);
    background: linear-gradient(135deg, #1a7fb8 0%, #209BD5 100%);
}

.btn-login:active {
    transform: translateY(0);
}

/* Logout Button */
.logout-btn {
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: #f87171;
}

@media (max-width: 768px) {
    .logout-btn {
        display: none;
    }
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    color: #9ca3af;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Profile Page */
.profile-container {
    max-width: 800px;
}

.profile-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-avatar-container {
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(32, 155, 213, 0.4);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: 3px solid #1a1a1a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.4);
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(32, 155, 213, 0.6);
}

.avatar-upload-btn input {
    display: none;
}

.profile-info h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: #9ca3af;
    font-size: 1rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h4 {
    color: #209BD5;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.info-group {
    margin-bottom: 1.5rem;
}

.info-group label {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.info-value {
    color: #fff;
    font-size: 1rem;
    padding: 0.875rem;
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 0;
}

.btn-save {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 155, 213, 0.4);
}

.success-message {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    color: #4ade80;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* Configurações Page */
.config-container {
    max-width: 900px;
}

.config-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.config-header h3 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
}

.config-description {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Usuários Container */
.usuarios-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.usuario-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.usuario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(32, 155, 213, 0.3);
    border-color: rgba(32, 155, 213, 0.4);
}

.usuario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.usuario-header h3 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
}

.table-badge {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(32, 155, 213, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Client Link Modal Styles */
.client-link-info-card {
    padding: 1.5rem;
}

.client-link-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(32, 155, 213, 0.05);
    border: 1px solid rgba(32, 155, 213, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.client-info {
    flex: 1;
}

.client-info h4 {
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.client-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4ade80;
    font-size: 0.9rem;
    margin: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

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

.link-section {
    margin-bottom: 1.5rem;
}

.link-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.link-label .icon {
    font-size: 1.1rem;
}

.link-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.link-input {
    flex: 1;
    background: rgba(13, 13, 13, 0.8);
    border: 1px solid rgba(32, 155, 213, 0.3);
    border-radius: 10px;
    padding: 0.875rem;
    color: #209BD5;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.btn-copy {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: none;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 155, 213, 0.4);
}

.btn-copy:active {
    transform: translateY(0);
}

.copy-icon {
    font-size: 1rem;
}

.link-hint {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
    font-style: italic;
}

.access-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 155, 213, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.info-label {
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 500;
}

.info-value {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
}

.btn-delete {
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-delete:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: #f87171;
    transform: translateY(-2px);
}

.btn-delete .icon {
    font-size: 1rem;
}

.modal-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ffffff;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.label-hint {
    display: block;
    color: #666;
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

.form-group {
    position: relative;
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.5rem;
    transition: color 0.3s;
}

.btn-toggle-password:hover {
    color: #00d4ff;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-test {
    background: transparent;
    border: 1px solid rgba(32, 155, 213, 0.3);
    color: #209BD5;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-test:hover {
    background: rgba(32, 155, 213, 0.1);
    border-color: #209BD5;
    transform: translateY(-2px);
}

.btn-refresh {
    background: transparent;
    border: 1px solid rgba(32, 155, 213, 0.3);
    color: #209BD5;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-refresh:hover {
    background: rgba(32, 155, 213, 0.1);
    border-color: #209BD5;
}

.btn-page {
    background: transparent;
    border: 1px solid rgba(32, 155, 213, 0.3);
    color: #209BD5;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-page:hover:not(:disabled) {
    background: rgba(32, 155, 213, 0.1);
    border-color: #209BD5;
    transform: translateY(-2px);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #9ca3af;
    padding: 0.875rem;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: rgba(156, 163, 175, 0.1);
    border-color: #9ca3af;
}

.btn-enviar-conversao {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(32, 155, 213, 0.3);
}

.btn-enviar-conversao:hover {
    background: linear-gradient(135deg, #1a7fb8 0%, #209BD5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.4);
}

/* Client Dashboard */
.client-dashboard-container {
    min-height: 100vh;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.client-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.client-logo {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
    max-width: 100%;
}

.client-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #209BD5 0%, #64b5f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .client-dashboard-container {
        padding: 1rem;
    }
    
    .client-header {
        margin-bottom: 2rem;
        padding: 1.5rem 1rem 1rem 1rem;
    }
    
    .client-header .client-logo {
        max-width: 160px;
        height: 60px;
    }
    
    .client-footer .footer-logo {
        max-width: 120px;
        height: 40px;
    }
    
    .client-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .client-dashboard-container {
        padding: 0.75rem;
    }
    
    .client-header {
        margin-bottom: 1.5rem;
        padding: 1rem 0.75rem 0.75rem 0.75rem;
    }
    
    .client-header .client-logo {
        max-width: 140px;
        height: 50px;
    }
    
    .client-footer .footer-logo {
        max-width: 100px;
        height: 35px;
    }
    
    .client-header h1 {
        font-size: 1.25rem;
    }
}

.client-content {
    width: 100%;
}

.client-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: flex-end;
}

.btn-client-link {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: none;
    color: #ffffff;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.btn-client-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 155, 213, 0.4);
}

/* Company Logo Preview */
.company-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.company-logo-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 13, 13, 0.6);
    overflow: hidden;
}

.company-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Client Footer */
.client-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.client-footer p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin: 0;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999 !important;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 100px; /* Acima da bottom navigation (80px + 20px) */
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 95px;
        right: 15px;
        width: 52px;
        height: 52px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}



.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.btn-toggle-password:hover {
    color: #209BD5;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a1a1a;
    transition: 0.4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: #888;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #209BD5, #64b5f6);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
    background-color: #ffffff;
}

/* Info Box */
.info-box {
    background-color: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

.info-box h4 {
    color: #00d4ff;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.info-box ol {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-box ol li {
    margin-bottom: 0.5rem;
}

.info-box strong {
    color: #fff;
}

.info-box a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s;
}

.info-box a:hover {
    color: #00ff88;
}

.info-note {
    color: #ffd700;
    font-size: 0.9rem;
    margin: 0;
    padding: 0.75rem;
    background-color: rgba(255, 215, 0, 0.05);
    border-left: 3px solid #ffd700;
    border-radius: 4px;
}

/* Supabase Data Section */
.supabase-section {
    margin-top: 2rem;
}

.supabase-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.select-wrapper {
    flex: 1;
    position: relative;
}

.select-wrapper select {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 0.875rem;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.select-wrapper select:focus {
    outline: none;
    border-color: #666666;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.select-wrapper select option {
    background-color: #2a2a2a;
    color: #fff;
}

.btn-refresh {
    background-color: transparent;
    border: 1px solid #666666;
    color: #ffffff;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-refresh:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.data-table-container {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table thead {
    background: rgba(32, 155, 213, 0.1);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    color: #209BD5;
    font-weight: 600;
    border-bottom: 2px solid rgba(32, 155, 213, 0.3);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.data-table td {
    padding: 1rem;
    color: #e8eaf6;
    border-bottom: 1px solid rgba(32, 155, 213, 0.1);
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: background-color 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(32, 155, 213, 0.05);
}

.data-table tbody tr.has-conversion {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.15) 0%, rgba(74, 222, 128, 0.05) 100%);
    border-left: 3px solid #4ade80;
}

.data-table tbody tr.has-conversion:hover {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.2) 0%, rgba(74, 222, 128, 0.08) 100%);
}

.data-table tbody tr.is-qualified {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 3px solid #3b82f6;
}

.data-table tbody tr.is-qualified:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 4px;
}

.conversion-badge {
    background: rgba(74, 222, 128, 0.2);
    color: #16a34a;
    border: 1px solid #4ade80;
}

.qualified-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
    border: 1px solid #3b82f6;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px rgba(32, 155, 213, 0.3));
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: #209BD5;
    font-size: 1.1rem;
}

.table-info {
    padding: 1rem;
    background: rgba(13, 13, 13, 0.6);
    border-top: 1px solid rgba(32, 155, 213, 0.2);
    color: #9ca3af;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-info strong {
    color: #209BD5;
}

/* Custom Date Range */
.custom-date-range {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.date-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.date-inputs .form-group {
    margin: 0;
}

.date-inputs input[type="date"] {
    background-color: #000;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 0.875rem;
    color: #fff;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s;
}

.date-inputs input[type="date"]:focus {
    outline: none;
    border-color: #00d4ff;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
}

.btn-page {
    background-color: transparent;
    border: 1px solid #666666;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-page:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

/* Usuários Container */
.usuarios-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.usuario-card {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.usuario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.1);
}

.usuario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #1a1a1a;
}

.usuario-header h3 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
}

.table-badge {
    background: #666666;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.usuario-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.usuario-form .form-group {
    position: relative;
}

.usuario-form .btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 2.5rem;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.5rem;
    transition: color 0.3s;
}

.usuario-form .btn-toggle-password:hover {
    color: #00d4ff;
}

@media (max-width: 768px) {
    .usuarios-container {
        grid-template-columns: 1fr;
    }
    
    .usuario-card {
        padding: 1.5rem;
    }
    
    .usuario-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Conversão Container */
.conversao-container {
    max-width: 800px;
}

.conversao-card {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 2rem;
}

.conversao-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #3a3a3a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #3a3a3a;
}

.modal-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid #666666;
    color: #ffffff;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-enviar-conversao {
    background: #ffffff;
    border: none;
    color: #1c1c1c;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-enviar-conversao:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* Melhorias adicionais para mobile */
@media (max-width: 768px) {
    /* Formulários */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    /* Scrollbar customizada para mobile */
    .table-scroll::-webkit-scrollbar {
        height: 6px;
    }
    
    .table-scroll::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 3px;
    }
    
    .table-scroll::-webkit-scrollbar-thumb {
        background: rgba(32, 155, 213, 0.5);
        border-radius: 3px;
    }
    
    /* Melhor toque em botões */
    .btn-login,
    .btn-save,
    .btn-cancel,
    .btn-refresh,
    .btn-page,
    .btn-client-link,
    .btn-enviar-conversao {
        min-height: 44px; /* Tamanho mínimo recomendado para toque */
        touch-action: manipulation; /* Previne zoom duplo-toque */
    }
    
    /* Cards com melhor espaçamento */
    .stat-card,
    .config-card,
    .usuario-card,
    .profile-card {
        margin-bottom: 1rem;
    }
    
    /* Melhor visualização de selects */
    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1em;
        padding-right: 2.5rem;
    }
    
    /* Melhor visualização de datas */
    input[type="date"] {
        min-height: 44px;
    }
    
    /* Ajuste de espaçamento do footer do cliente */
    .client-footer {
        margin-top: 3rem;
        padding: 1.5rem 0;
    }
    
    .footer-logo {
        width: 100px;
    }
    
    .client-footer p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* Ajustes finos para telas muito pequenas */
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .config-header h3,
    .usuario-header h3 {
        font-size: 1.1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .label-hint {
        font-size: 0.75rem;
    }
    
    /* Melhor visualização de badges */
    .table-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Ajuste de ícones */
    .stat-icon,
    .empty-state-icon {
        font-size: 2rem;
    }
    
    /* Melhor espaçamento em listas */
    .info-box ol {
        font-size: 0.85rem;
        margin-left: 1rem;
    }
    
    /* Ajuste do avatar do perfil */
    .avatar-upload-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Melhor visualização de informações do cliente */
    .client-link-header {
        padding: 1rem;
    }
    
    .client-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .client-info h4 {
        font-size: 1rem;
    }
    
    .info-icon {
        font-size: 1.25rem;
        width: 35px;
        height: 35px;
    }
    
    /* Ajuste de preview de logo */
    .company-logo-preview {
        width: 150px;
        height: 150px;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .sidebar {
        width: 60px;
    }
    
    .content {
        margin-left: 60px;
        margin-bottom: 0;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-item a {
        padding: 0.75rem 0.5rem;
    }
    
    .nav-item .icon {
        font-size: 1.25rem;
    }
    
    .nav-item span:not(.icon) {
        display: none;
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .usuarios-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (já está dark, mas preparado para futuro) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    }
}

/* Print styles */
@media print {
    .sidebar,
    .nav-menu,
    .user-info,
    .btn-refresh,
    .btn-client-link,
    .btn-enviar-conversao,
    .pagination-container,
    .whatsapp-float {
        display: none !important;
    }
    
    .content {
        margin-left: 0;
        margin-bottom: 0;
    }
    
    .data-table {
        font-size: 10pt;
    }
    
    .stat-card {
        break-inside: avoid;
    }
}

/* Ajustes específicos para iOS */
@supports (-webkit-touch-callout: none) {
    /* Previne zoom em inputs no iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }
    
    /* Melhora a aparência de selects no iOS */
    select {
        border-radius: 12px;
    }
    
    /* Remove bounce effect em scroll */
    body {
        overscroll-behavior-y: none;
    }
    
    /* Melhora o toque em botões */
    button,
    .btn-login,
    .btn-save,
    .btn-cancel,
    .btn-refresh,
    .btn-page {
        -webkit-tap-highlight-color: rgba(32, 155, 213, 0.2);
    }
}

/* Ajustes para Android */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
    /* Melhora a renderização de gradientes */
    .stat-card,
    .config-card,
    .usuario-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* Ajustes para telas de alta densidade (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-logo,
    .client-logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Melhorias para touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Aumenta área de toque */
    .nav-item a,
    .btn-login,
    .btn-save,
    .btn-cancel,
    .logout-btn,
    .modal-close {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects em touch devices */
    .stat-card:hover,
    .usuario-card:hover,
    .nav-item a:hover {
        transform: none;
    }
    
    /* Adiciona feedback visual ao toque */
    .stat-card:active,
    .usuario-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    .btn-login:active,
    .btn-save:active,
    .btn-refresh:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
}

/* Ajustes para telas muito largas */
@media (min-width: 1920px) {
    .container {
        max-width: 1920px;
        margin: 0 auto;
    }
    
    .client-dashboard-container {
        max-width: 1600px;
    }
}

/* Ajustes para modo paisagem em tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sidebar {
        width: 70px;
    }
    
    .sidebar .logo h1,
    .nav-item span:not(.icon),
    .user-details {
        display: none;
    }
    
    .content {
        margin-left: 70px;
    }
}

/* Ajustes para notch/safe area em dispositivos modernos */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .sidebar {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
    
    .content {
        padding-bottom: max(1rem, calc(80px + env(safe-area-inset-bottom)));
    }
    
    @media (max-width: 768px) {
        .sidebar {
            padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
        }
    }
}

/* Melhorias de performance para animações */
.stat-card,
.usuario-card,
.nav-item a,
.btn-login,
.btn-save,
.modal {
    will-change: transform;
}

/* Otimização de scroll */
.table-scroll,
.modal-content {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Ajustes para teclado virtual */
@media (max-width: 768px) {
    /* Previne que o layout quebre quando o teclado aparece */
    .modal-content {
        max-height: 85vh;
    }
    
    /* Garante que inputs fiquem visíveis acima do teclado */
    .form-group:focus-within {
        scroll-margin-top: 100px;
    }
}

/* Impersonation Styles */
.impersonation-banner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.impersonation-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 500;
}

.impersonation-icon {
    font-size: 1.2rem;
}

.btn-stop-impersonation {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    color: #000000;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.btn-stop-impersonation:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.impersonate-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    min-width: 0;
}

.impersonate-user-card:hover {
    background: rgba(32, 155, 213, 0.05);
    border-color: rgba(32, 155, 213, 0.3);
}

.impersonate-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.impersonate-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
    overflow: hidden;
}

.impersonate-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.impersonate-user-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.impersonate-user-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.impersonate-user-email {
    color: #9ca3af;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.btn-impersonate {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    border: none;
    color: #ffffff;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(32, 155, 213, 0.3);
    flex-shrink: 0;
}

.btn-impersonate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.4);
}

@media (max-width: 768px) {
    .impersonation-banner {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .impersonation-info {
        font-size: 0.85rem;
    }
    
    .btn-stop-impersonation {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .impersonate-user-card {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1.25rem;
    }
    
    .impersonate-user-info {
        width: 100%;
    }
    
    .impersonate-user-details {
        flex: 1;
    }
    
    .impersonate-user-name,
    .impersonate-user-email {
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
    }
    
    .btn-impersonate {
        width: 100%;
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Avatar clicável no mobile para usuários normais */
    .user-profile[style*="cursor: pointer"] .user-avatar {
        position: relative;
    }
    
    .user-profile[style*="cursor: pointer"] .user-avatar::after {
        content: '👋';
        position: absolute;
        bottom: -2px;
        right: -2px;
        font-size: 0.8rem;
        background: rgba(248, 113, 113, 0.9);
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #1a1a1a;
    }
}

@media (max-width: 480px) {
    .impersonate-user-card {
        padding: 1rem;
    }
    
    .impersonate-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .impersonate-user-name {
        font-size: 0.95rem;
    }
    
    .impersonate-user-email {
        font-size: 0.8rem;
    }
    
    .btn-impersonate {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Modal de Personificação - Melhorias */
#impersonation-modal .modal-content {
    max-width: 600px;
    width: 92%;
}

#impersonation-modal .modal-body {
    padding: 1.5rem;
}

#users-list-impersonate {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar customizada para lista de usuários */
#users-list-impersonate::-webkit-scrollbar {
    width: 8px;
}

#users-list-impersonate::-webkit-scrollbar-track {
    background: rgba(13, 13, 13, 0.6);
    border-radius: 4px;
}

#users-list-impersonate::-webkit-scrollbar-thumb {
    background: rgba(32, 155, 213, 0.5);
    border-radius: 4px;
}

#users-list-impersonate::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 155, 213, 0.7);
}

@media (max-width: 768px) {
    #impersonation-modal .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 85vh;
    }
    
    #impersonation-modal .modal-body {
        padding: 1rem;
    }
    
    #users-list-impersonate {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    #impersonation-modal .modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    #impersonation-modal .modal-header {
        padding: 1rem;
    }
    
    #impersonation-modal .modal-header h3 {
        font-size: 1.1rem;
    }
    
    #impersonation-modal .modal-body {
        padding: 0.75rem;
    }
    
    #impersonation-modal .modal-body p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Admin Panel Styles */
.admin-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-add-user {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    color: #ffffff;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.btn-add-user:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-admin {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-user {
    background: linear-gradient(135deg, rgba(32, 155, 213, 0.2) 0%, rgba(26, 127, 184, 0.2) 100%);
    color: #209BD5;
    border: 1px solid rgba(32, 155, 213, 0.3);
}

.badge-active {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-inactive {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.2) 0%, rgba(239, 68, 68, 0.2) 100%);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action {
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.btn-impersonate-small:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
}

.btn-edit:hover {
    background: rgba(32, 155, 213, 0.2);
    border-color: rgba(32, 155, 213, 0.5);
}

.btn-delete-small:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.5);
}

.form-select {
    background: rgba(13, 13, 13, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem;
    color: #fff;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #209BD5;
    box-shadow: 0 0 0 3px rgba(32, 155, 213, 0.1);
    background: rgba(13, 13, 13, 0.8);
}

.form-select option {
    background: #1a1a1a;
    color: #fff;
}

/* Responsivo Admin */
@media (max-width: 768px) {
    .admin-controls {
        flex-direction: column;
    }
    
    .btn-add-user,
    .btn-refresh {
        width: 100%;
        justify-content: center;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .user-avatar-small {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .action-buttons {
        gap: 0.25rem;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        padding: 0.375rem;
    }
}

@media (max-width: 480px) {
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.375rem 0.125rem;
    }
    
    .user-avatar-small {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

/* Toggle Switch Styles */
.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-label > span:first-child {
    color: #e8eaf6;
    font-size: 0.9rem;
    font-weight: 500;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(156, 163, 175, 0.3);
    border: 2px solid rgba(156, 163, 175, 0.4);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #9ca3af;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, rgba(32, 155, 213, 0.3) 0%, rgba(26, 127, 184, 0.3) 100%);
    border-color: rgba(32, 155, 213, 0.6);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%);
    box-shadow: 0 2px 8px rgba(32, 155, 213, 0.5);
}

.toggle-status {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 60px;
    transition: color 0.3s ease;
}

/* Modal Body Padding Fix */
.modal-body {
    padding: 2rem !important;
}

.modal-header {
    padding: 1.5rem 2rem !important;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .modal-body {
        padding: 1.5rem !important;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem !important;
    }
    
    .form-actions {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .toggle-switch-container {
        gap: 0.75rem;
    }
    
    .toggle-switch {
        width: 52px;
        height: 28px;
    }
    
    .toggle-slider:before {
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 1.25rem !important;
    }
    
    .modal-header {
        padding: 1rem 1.25rem !important;
    }
    
    .toggle-switch {
        width: 48px;
        height: 26px;
    }
    
    .toggle-slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(22px);
    }
    
    .toggle-slider {
        width: 18px;
        height: 18px;
    }
    
    .toggle-input:checked + .toggle-switch .toggle-slider {
        transform: translateX(22px);
    }
}


/* WhatsApp Instances Grid */
.instances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.instance-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(13, 13, 13, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.instance-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(32, 155, 213, 0.3);
}

.instance-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.instance-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.instance-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instance-info {
    flex: 1;
    min-width: 0;
}

.instance-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #e8eaf6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instance-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.instance-status.connected {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.instance-status.disconnected {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.instance-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #9ca3af;
    font-size: 0.9rem;
}

.detail-value {
    color: #e8eaf6;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.instance-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-connect {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    flex: 1;
    min-width: 120px;
    border: none !important;
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-share {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%) !important;
    color: white !important;
    flex: 1;
    min-width: 120px;
    border: none !important;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.3);
}

.btn-delete-small {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
    color: white !important;
    padding: 0.625rem 1rem;
    border: none !important;
}

.btn-delete-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

.loading-message,
.error-message,
.empty-message {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
    font-size: 1.1rem;
}

.error-message {
    color: #f87171;
}

/* Responsivo */
@media (max-width: 768px) {
    .instances-grid {
        grid-template-columns: 1fr;
    }
    
    .instance-actions {
        flex-direction: column;
    }
    
    .btn-connect,
    .btn-share,
    .btn-delete-small {
        width: 100%;
        min-width: auto;
    }
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(13, 13, 13, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.toast.success {
    border-left: 4px solid #25D366;
}

.toast.error {
    border-left: 4px solid #f87171;
}

.toast.info {
    border-left: 4px solid #209BD5;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #e8eaf6;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.toast-message {
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e8eaf6;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ============================================
   WhatsApp Page Styles
   ============================================ */

.instances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.instance-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.instance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.instance-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.instance-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.instance-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instance-info {
    flex: 1;
    min-width: 0;
}

.instance-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instance-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.instance-status.connected {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.instance-status.disconnected {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.instance-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instance-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    min-width: 120px;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-connect {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-connect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-share {
    background: linear-gradient(135deg, #209BD5 0%, #1976D2 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 155, 213, 0.4);
}

.btn-delete-small {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.3) !important;
    flex: 0 0 auto;
    min-width: auto;
    padding: 0.65rem;
    font-size: 1.1rem;
}

.btn-delete-small:hover {
    background: rgba(248, 113, 113, 0.25) !important;
    transform: translateY(-1px);
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.loading-message,
.error-message,
.empty-message {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    grid-column: 1 / -1;
}

.error-message {
    color: #f87171;
}

/* Responsive */
@media (max-width: 768px) {
    .instances-grid {
        grid-template-columns: 1fr;
    }
    
    .instance-actions {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        min-width: 0;
    }
    
    .btn-delete-small {
        width: 100%;
    }
}

/* UAZAPI Instances Styles */
.instances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.instance-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.instance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.instance-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.instance-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.instance-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
}

.instance-info {
    flex: 1;
    min-width: 0;
}

.instance-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.instance-id {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.instance-type {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.instance-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-green .status-dot {
    background: #22c55e;
}

.status-yellow {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.status-yellow .status-dot {
    background: #eab308;
}

.status-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-red .status-dot {
    background: #ef4444;
}

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

.instance-details {
    margin: 1rem 0;
}

.instance-details p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.instance-details strong {
    color: var(--text-primary);
}

.instance-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.instance-actions button {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-connect {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-connect:hover {
    background: linear-gradient(135deg, #1fb855 0%, #0f7a6e 100%) !important;
    transform: translateY(-1px);
}

.btn-webhook {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-webhook:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    transform: translateY(-1px);
}

.btn-status {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.btn-status:hover {
    background: var(--bg-secondary) !important;
    transform: translateY(-1px);
}

.btn-renew {
    background: linear-gradient(135deg, #209BD5 0%, #1a7fb8 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-renew:hover {
    background: linear-gradient(135deg, #1a7fb8 0%, #1565a0 100%) !important;
    transform: translateY(-1px);
}

/* Estilos para botões dentro do card de instância */
.instance-card .btn-action {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    width: auto;
    height: auto;
}

.instance-card .btn-delete-small {
    flex: 0;
    min-width: auto;
    padding: 0.75rem 1rem;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

.qrcode-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
}

.qrcode-box img {
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .instances-grid {
        grid-template-columns: 1fr;
    }
    
    .instance-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .instance-status {
        width: 100%;
        justify-content: center;
    }
    
    .instance-actions {
        flex-direction: column;
    }
    
    .instance-actions button {
        width: 100%;
    }
}

/* Botão de upgrade hover */
#btn-upgrade:hover {
    background: #78350f !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(146, 64, 14, 0.5) !important;
}

/* Estilos para tabela de ofertas */
.status-active {
    color: #10b981;
    font-weight: 600;
}

.status-inactive {
    color: #ef4444;
    font-weight: 600;
}

.info-banner {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Separador Admin na Navbar */
.nav-separator {
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.nav-separator span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ========================================
   NAVBAR BADGES
   ======================================== */

.nav-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.55rem;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    line-height: 1.2;
}

.nav-badge-red {
    color: #dc2626;
    border: 1px solid #dc2626;
    background: transparent;
}

/* Tema claro - ajustar cores para melhor visibilidade */
:root[data-theme="light"] .nav-badge-red {
    color: #dc2626;
    border: 1px solid #dc2626;
    background: transparent;
}

/* Hover state */
.nav-item a:hover .nav-badge-red {
    background: rgba(220, 38, 38, 0.08);
}

/* Active state */
.nav-item.active a .nav-badge-red {
    background: rgba(220, 38, 38, 0.12);
}

/* Responsivo - esconder badge em telas pequenas */
@media (max-width: 1024px) {
    .nav-badge {
        display: none;
    }
}
