/* --- RESET & CONFIGURAÇÃO GERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #070313;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.07);
    --border-card-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --primary: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.4);
    --accent-pink: #db2777;
    --accent-blue: #2563eb;
    --success: #10b981;
    --error: #ef4444;
    --font-main: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 20%, rgba(124, 58, 237, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(219, 39, 119, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- ELEMENTOS DE BRILHO ABSTRATO --- */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
}

.bg-glow-1 {
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    left: -150px;
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
    background: radial-gradient(circle, var(--accent-pink) 0%, rgba(0,0,0,0) 70%);
    bottom: -150px;
    right: -150px;
    animation: pulseGlow 18s infinite alternate-reverse ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.1; }
    50% { transform: scale(1.15) translate(50px, 30px); opacity: 0.15; }
    100% { transform: scale(0.9) translate(-20px, 80px); opacity: 0.08; }
}

/* --- GLASSMORPHISM CARD --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-card-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* --- TELA DE AUTENTICAÇÃO (LOGIN) --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    text-align: center;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    margin-bottom: 35px;
}

.logo-icon {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.3));
    margin-bottom: 12px;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* --- INPUTS --- */
.input-group {
    margin-bottom: 22px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.input-group label i {
    margin-right: 6px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* --- BOTÕES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    opacity: 0.95;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-block {
    width: 100%;
}

/* --- ALERTAS --- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-top: 15px;
    text-align: left;
    border: 1px solid transparent;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.hidden {
    display: none !important;
}

/* --- PAINEL PRINCIPAL (DASHBOARD) --- */
.dashboard-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- HEADER --- */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    margin-bottom: 25px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon-sm {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-logo h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.header-logo h2 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.domain-badge {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.25);
    color: #a78bfa;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- STATS GRID --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.stat-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 55px;
    height: 55px;
    border-radius: 14px;
    font-size: 1.4rem;
}

.stat-icon.purple {
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.stat-icon.pink {
    background: rgba(219, 39, 119, 0.1);
    color: #f472b6;
    border: 1px solid rgba(219, 39, 119, 0.2);
}

.stat-icon.blue {
    background: rgba(37, 99, 230, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(37, 99, 230, 0.2);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* --- DASHBOARD GRID --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 25px;
    margin-bottom: 25px;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header i {
    font-size: 1.2rem;
    color: #a78bfa;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.creation-section form {
    padding: 24px;
}

/* Input especial para subdomínio com sufixo visual */
.subdomain-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.subdomain-input-wrapper input {
    padding-right: 140px; /* reserva espaço pro sufixo */
}

.subdomain-suffix {
    position: absolute;
    right: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
}

.helper-text {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.optional {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Seção do Gráfico */
.chart-section {
    display: flex;
    flex-direction: column;
}

.chart-container {
    flex-grow: 1;
    padding: 24px;
    min-height: 280px;
    position: relative;
}

.insights-grid {
    grid-template-columns: 1fr 1fr;
}

.insight-section {
    min-height: 240px;
}

.insight-list {
    padding: 14px 24px 22px;
    display: grid;
    gap: 10px;
}

.insight-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.insight-row:last-child {
    border-bottom: 0;
}

.insight-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
}

.insight-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insight-value {
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
}

.insight-empty {
    color: var(--text-muted);
    padding: 24px 0;
    text-align: center;
}

/* --- TABELA DE LINKS --- */
.links-section {
    margin-top: 25px;
}

.list-header {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-wrapper input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.links-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.links-table th {
    padding: 16px 24px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

.links-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.links-table tbody tr {
    transition: var(--transition-smooth);
}

.links-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

/* Colunas de Link */
.subdomain-col {
    font-weight: 600;
    color: #a78bfa;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.subdomain-col:hover {
    color: #c084fc;
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
}

.link-icon {
    font-size: 0.75rem;
}

.link-title-muted {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dest-col {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.dest-col a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.dest-col a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.clicks-col {
    font-weight: 600;
}

.date-col {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Botões de Ações */
.actions-col {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-action:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-action.copy:hover {
    background: rgba(37, 99, 230, 0.15);
    color: #60a5fa;
    border-color: rgba(37, 99, 230, 0.3);
}

.btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-action.clear:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.loading-row {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.empty-row {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.empty-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: block;
    color: var(--text-muted);
}

/* --- TOAST SYSTEM --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    background: rgba(13, 8, 30, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    min-width: 280px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

.toast.toast-out {
    animation: toastOut 0.3s forwards ease-in;
}

@keyframes toastOut {
    to { transform: translateX(100px); opacity: 0; }
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }
.toast.info i { color: var(--accent-blue); }

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsividade Geral */
@media (max-width: 576px) {
    .glass-header {
        flex-direction: column;
        gap: 15px;
        padding: 16px;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .stat-card {
        padding: 18px;
    }
    .links-table th, .links-table td {
        padding: 12px 14px;
    }
    .toast-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
    .toast {
        min-width: unset;
    }
}

/* --- HEADER IP AUDIT BUTTON --- */
.btn-ip-audit {
    background: rgba(124, 58, 237, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    color: #c084fc !important;
}

.btn-ip-audit:hover {
    background: rgba(124, 58, 237, 0.18) !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* --- MODAL IP SEARCH BAR --- */
.modal-ip-search-bar {
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.15);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ip-search-form-row {
    display: flex;
    gap: 12px;
}

.ip-search-form-row input {
    flex-grow: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.ip-search-form-row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ip-search-form-row button {
    padding: 0 20px;
    font-size: 0.95rem;
    height: 46px;
}

/* --- MODAL PLACEHOLDER --- */
.modal-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.5;
    margin-bottom: 20px;
    animation: floatIcon 4s ease-in-out infinite alternate;
}

@keyframes floatIcon {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.modal-placeholder p {
    font-size: 1rem;
    max-width: 420px;
    line-height: 1.6;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
}

/* --- MODAL WRAPPER --- */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 2, 15, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px;
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

/* Modal Stats Row */
.modal-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 576px) {
    .modal-stats-row {
        grid-template-columns: 1fr;
    }
}

.modal-stat-box {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.modal-stat-box .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.modal-stat-box .badge {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-stat-box .badge.badge-yes {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.modal-stat-box .badge.badge-no {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(107, 114, 128, 0.25);
}

/* Modal History Section */
.modal-history-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.modal-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.1);
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.modal-table th {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.modal-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Tornar o IP na tabela de cliques recentes clicável */
.ip-clickable {
    cursor: pointer;
    color: #a78bfa;
    text-decoration: underline;
    transition: var(--transition-smooth);
}

.ip-clickable:hover {
    color: #c084fc;
    text-shadow: 0 0 6px rgba(167, 139, 250, 0.4);
}

/* --- BOTÃO DE AÇÃO TEXTO NO HEADER (VER MAIS) --- */
.list-header-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
}

.list-header-sm .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-action-text {
    background: none;
    border: none;
    color: var(--primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
    padding: 4px 10px;
    border-radius: 6px;
}

.btn-action-text:hover {
    color: #c084fc;
    background: rgba(124, 58, 237, 0.1);
}

/* --- FILTROS DO RELATÓRIO DE CLIQUES --- */
.report-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 20px;
    border-radius: 14px;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .report-filters {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .filter-btn-wrapper {
        text-align: right;
        margin-top: 10px;
    }
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-item input {
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
}

.filter-item input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.filter-btn-wrapper button {
    height: 40px;
    font-size: 0.85rem;
    padding: 0 16px;
}

.report-modal-card {
    max-width: 950px !important;
}

/* --- SISTEMA DE ABAS UNIFICADO DE CLIQUES/INSIGHTS --- */
.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.tabs-buttons {
    display: flex;
    gap: 5px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-pink) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    opacity: 1;
}

.tab-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
}

.btn-action-text.text-danger {
    color: var(--error);
}

.btn-action-text.text-danger:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

/* Animação suave para as abas */
.tab-content {
    animation: fadeInTab 0.3s ease-out forwards;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}
