/* Hub Integrações — Design System */

:root {
    --hub-bg: #09090b;
    --hub-surface: rgba(24, 24, 27, 0.7);
    --hub-border: rgba(255, 255, 255, 0.08);
    --hub-accent: #22d3ee;
    --hub-accent-2: #a78bfa;
    --hub-glow: rgba(34, 211, 238, 0.15);
}

* { -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--hub-bg);
}

/* Mesh gradient background */
.hub-mesh {
    background-color: #09090b;
    background-image:
        radial-gradient(at 0% 0%, rgba(34, 211, 238, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(167, 139, 250, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(34, 211, 238, 0.06) 0px, transparent 50%);
}

.hub-grid-bg {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Glass card */
.hub-glass {
    background: var(--hub-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--hub-border);
}

/* Gradient text */
.hub-gradient-text {
    background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient button */
.hub-btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25);
}
.hub-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(34, 211, 238, 0.35);
    filter: brightness(1.05);
}

.hub-btn-ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--hub-border);
    color: #e4e4e7;
    transition: all 0.2s ease;
}
.hub-btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}

/* Sidebar nav */
.hub-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    color: #a1a1aa;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}
.hub-nav-link:hover {
    color: #fafafa;
    background: rgba(255,255,255,0.05);
}
.hub-nav-link.active {
    color: #fafafa;
    background: linear-gradient(135deg, rgba(34,211,238,0.15) 0%, rgba(167,139,250,0.15) 100%);
    border: 1px solid rgba(34,211,238,0.2);
}

/* Form inputs */
.hub-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--hub-border);
    border-radius: 0.75rem;
    color: #fafafa;
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-input::placeholder { color: #52525b; }
.hub-input:focus {
    outline: none;
    border-color: rgba(34,211,238,0.5);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}

.hub-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #d4d4d8;
    margin-bottom: 0.375rem;
}

/* Table */
.hub-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--hub-border);
}
.hub-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #e4e4e7;
    font-size: 0.875rem;
}
.hub-table tbody tr {
    transition: background 0.15s;
}
.hub-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Badges */
.hub-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.hub-badge-success { background: rgba(34,197,94,0.15); color: #4ade80; }
.hub-badge-warning { background: rgba(234,179,8,0.15); color: #facc15; }
.hub-badge-muted   { background: rgba(161,161,170,0.15); color: #a1a1aa; }
.hub-badge-accent  { background: rgba(167,139,250,0.15); color: #c4b5fd; }
.hub-badge-info    { background: rgba(34,211,238,0.15); color: #67e8f9; }

/* Stat cards */
.hub-stat-card {
    position: relative;
}

/* Alerts */
.hub-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.hub-alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); color: #86efac; }
.hub-alert-error   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }

/* Toggle switch */
.hub-switch {
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s;
}
.hub-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 1.125rem; height: 1.125rem;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.hub-switch-input:checked + .hub-switch {
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
}
.hub-switch-input:checked + .hub-switch::after {
    transform: translateX(1.25rem);
}
.hub-switch-input { display: none; }

/* Login split */
.login-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Mobile sidebar overlay */
#sidebar-overlay {
    transition: opacity 0.2s;
}
#sidebar-panel {
    transition: transform 0.25s ease;
}

@media (max-width: 1023px) {
    #sidebar-panel { transform: translateX(-100%); }
    #sidebar-panel.open { transform: translateX(0); }
}
