/* ==========================================================
   ZEUS CLOUD - FIGMA FREE DARK ADMIN DASHBOARD UI THEME
   Fidelidade visual: M. Ali Dark Admin Dashboards (MUI / Tailwind Dark)
   Edição Ultra-Compacta de Alta Densidade (Data-Dense Table)
   ========================================================== */

:root {
    /* Paleta Cósmica / Cyberpunk Neon Purple (Idêntica à Tela de Login) */
    --bg-body: #0a0216;
    --bg-sidebar: #0f031e;
    --bg-card: rgba(26, 7, 48, 0.95);
    --bg-card-hover: rgba(46, 12, 77, 0.85);
    --bg-input: rgba(15, 3, 30, 0.95);
    --border-subtle: rgba(168, 85, 247, 0.18);
    --border-focus: #a855f7;

    /* Cores de Ação & Identidade */
    --primary: #a855f7;
    --primary-hover: #9333ea;
    --primary-glow: rgba(168, 85, 247, 0.35);

    /* Textos & Tipografia */
    --text-primary: #F1F5F9;   /* Slate 100 */
    --text-secondary: #94A3B8; /* Slate 400 */
    --text-muted: #64748B;     /* Slate 500 */

    /* Badges & Indicadores */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #0EA5E9;
    --info-bg: rgba(14, 165, 233, 0.12);

    /* Raios & Sombras */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.2);
    --shadow-popover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Lucide Icons SVG global sizing default fallback */
svg.lucide {
    width: 14px;
    height: 14px;
    stroke-width: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body.dark-theme {
    background: radial-gradient(circle at 10% 20%, #2e0854 0%, #15052a 50%, #0a0216 100%) fixed;
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Layout Estrutural */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Estilo Figma Compacta */
.sidebar {
    width: 220px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 20;
}

.sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.brand-logo {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.brand-logo i {
    width: 14px;
    height: 14px;
}

.brand-details h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-primary);
    line-height: 1.1;
}

.brand-details h2 span {
    color: var(--primary);
}

.badge-version {
    font-size: 8px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    display: inline-block;
    letter-spacing: 0.4px;
}

.nav-container {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

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

.nav-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    padding: 0 8px 4px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.12s ease-in-out;
}

.nav-link i {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: color 0.12s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-link:hover i {
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.sidebar-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(15, 3, 30, 0.7);
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-indicator {
    position: relative;
    width: 6px;
    height: 6px;
}

.pulse-indicator .dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
}

.pulse-indicator .ring {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: ripple 2s infinite ease-out;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.8); opacity: 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.tool-action-btn:hover {
    border-color: var(--primary) !important;
    background: rgba(45, 30, 80, 0.8) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

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

@keyframes pulseAlert {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

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

.network-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.network-meta {
    font-size: 9px;
    color: var(--text-muted);
}

/* Área Principal */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, #2e0854 0%, #15052a 50%, #0a0216 100%) fixed;
}

/* Topbar Superior Compacta */
.topbar {
    height: 52px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar .search-icon {
    position: absolute;
    left: 10px;
    width: 13px;
    height: 13px;
    color: var(--text-muted);
}

.search-bar input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 6px 36px 6px 30px;
    border-radius: var(--radius-sm);
    width: 280px;
    font-size: 11px;
    outline: none;
    transition: all 0.15s;
}

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

.shortcut-key {
    position: absolute;
    right: 8px;
    background: var(--border-subtle);
    color: var(--text-muted);
    font-size: 9px;
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.divider-v {
    width: 1px;
    height: 20px;
    background-color: var(--border-subtle);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.profile-card:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.avatar-box {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    border: 1px solid var(--border-subtle);
}

.profile-details {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
}

.profile-role {
    font-size: 9px;
    color: var(--text-muted);
}

/* Botões Padronizados - Delicados e Profissionais */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    line-height: 1;
}

.btn i {
    width: 12px;
    height: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--border-subtle);
}

.btn-sm {
    padding: 3px 7px;
    font-size: 10px;
    border-radius: var(--radius-xs);
    height: 24px;
}

.btn-sm i {
    width: 11px;
    height: 11px;
}

/* Scroll do Conteúdo */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.page-title-bar h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.page-title-bar .subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.live-tag .blink {
    width: 5px;
    height: 5px;
    background: var(--success);
    border-radius: 50%;
}

/* CARDS DE ESTATÍSTICA (Data-Dense) */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(46, 12, 77, 0.45) 0%, rgba(26, 7, 48, 0.65) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.22);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stat-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-icon-wrapper {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper i {
    width: 13px;
    height: 13px;
}

.stat-icon-wrapper.blue { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.stat-icon-wrapper.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.stat-icon-wrapper.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.stat-icon-wrapper.amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }

.stat-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 6px;
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1;
}

.stat-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.stat-badge.positive {
    background: var(--success-bg);
    color: var(--success);
}

.stat-badge.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.stat-progress-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
}

.progress-fill.blue { background-color: var(--primary); }
.progress-fill.purple { background-color: #A855F7; }
.progress-fill.green { background-color: var(--success); }
.progress-fill.amber { background-color: var(--warning); }

/* Grid de Painéis Duplos */
.panels-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.panel-box {
    background: linear-gradient(135deg, rgba(46, 12, 77, 0.45) 0%, rgba(26, 7, 48, 0.65) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.22);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.panel-header {
    padding: 10px 14px;
    background: rgba(26, 7, 48, 0.4);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* TABELAS ULTRA COMPACTAS DE ALTO VOLUME (1000+ CANAIS) */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.figma-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 11px;
    line-height: 1.2;
    table-layout: fixed; /* Força respeito rigoroso às larguras definidas */
}

.figma-table th {
    background-color: rgba(15, 3, 30, 0.7);
    color: #c084fc;
    font-weight: 600;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.figma-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
    height: 38px;
    white-space: nowrap;
}

.figma-table tr:hover {
    background-color: rgba(255, 255, 255, 0.025);
}

.code-ip {
    font-family: var(--font-mono);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    padding: 2px 5px;
    border-radius: var(--radius-xs);
    font-size: 10px;
    color: #60A5FA;
}

/* BARRA DE FILTROS ESTILO XUI.ONE COMPACTA */
.xui-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 3, 30, 0.65);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    flex-wrap: wrap;
}

.xui-filter-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 190px;
    flex: 1;
    max-width: 260px;
}

.xui-filter-input-wrap i,
.xui-filter-input-wrap svg {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px !important;
    height: 13px !important;
    max-width: 13px;
    max-height: 13px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.xui-filter-input {
    width: 100%;
    height: 28px;
    padding: 4px 8px 4px 28px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: #fff;
    font-size: 11px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.xui-filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.xui-filter-select {
    height: 28px;
    padding: 4px 24px 4px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: #cbd5e1;
    font-size: 11px;
    outline: none;
    cursor: pointer;
    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='%2394a3b8' 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 6px center;
    background-size: 12px;
    min-width: 130px;
    box-sizing: border-box;
}

.xui-filter-select:focus {
    border-color: var(--primary);
}

.xui-filter-count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
}

.status-pill.online, .status-pill.active {
    background: var(--success-bg);
    color: var(--success);
}

.status-pill.standby {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-pill.expired, .status-pill.failed, .status-pill.offline, .status-pill.stopped {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-pill.ondemand {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-pill.direct {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-pill.starting {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stream-uptime-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 108px;
    height: 24px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    box-sizing: border-box;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.3px;
}

.badge-usage {
    position: relative;
    background: #090e17;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    min-width: 100px; width: 100%; max-width: 145px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
    z-index: 1;
}

.badge-usage-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 3px;
    transition: width 0.4s ease;
    z-index: 0;
    opacity: 0.35;
}

.badge-usage-text {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.badge-usage-bar.green {
    background: linear-gradient(90deg, #059669, #10b981);
}

.badge-usage-bar.yellow {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.badge-usage-bar.red {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.badge-usage.badge-green {
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-usage.badge-yellow {
    border-color: rgba(245, 158, 11, 0.35);
}

.badge-usage.badge-red {
    border-color: rgba(239, 68, 68, 0.45);
}

/* Painel de Blindagem */
.security-list {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sec-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sec-icon-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sec-icon-circle i {
    width: 11px;
    height: 11px;
}

.sec-icon-circle.green { background: var(--success-bg); color: var(--success); }
.sec-icon-circle.blue { background: var(--primary-glow); color: var(--primary); }
.sec-icon-circle.purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }

.sec-text strong {
    font-size: 11px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 1px;
}

.sec-text p {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Modais de Ação e Abas XUI */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 1000;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: linear-gradient(135deg, rgba(35, 9, 61, 0.98) 0%, rgba(18, 4, 33, 0.99) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-md);
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.2);
    overflow: hidden;
}

.modal-dialog.modal-large {
    width: 720px;
    max-width: 95vw;
}

.modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(15, 3, 30, 0.5);
}

.modal-header h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ABAS ESTILO XUI ADVANCED */
.modal-tabs {
    display: flex;
    background-color: rgba(15, 3, 30, 0.6);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.modal-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.modal-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 9px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-tab-btn i {
    width: 13px;
    height: 13px;
}

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

.modal-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* TOGGLES SWITCH ESTILO XUI */
.toggles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.toggle-card {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-info strong {
    font-size: 11px;
    color: var(--text-primary);
    display: block;
}

.toggle-info small {
    font-size: 9px;
    color: var(--text-muted);
}

/* Switch Switcher */
.switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-subtle);
    transition: .2s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-close i {
    width: 16px;
    height: 16px;
}

form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

input, select, textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    outline: none;
    transition: all 0.15s;
    font-family: var(--font-sans);
}

textarea {
    resize: vertical;
    font-family: var(--font-mono);
    line-height: 1.35;
    font-size: 11px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.notice-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.35;
}

.notice-box i {
    width: 13px;
    height: 13px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

/* TOAST NOTIFICATION MODERNO CENTRALIZADO */
.zeus-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.zeus-toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    pointer-events: auto;
    animation: toastSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 280px;
    max-width: 90vw;
}

.zeus-toast.success {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.2);
}

.zeus-toast.error {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.2);
}

.zeus-toast.info {
    border-color: rgba(59, 130, 246, 0.4);
}

.zeus-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.zeus-toast-icon i {
    width: 16px;
    height: 16px;
}

.zeus-toast.success .zeus-toast-icon { color: var(--accent-green); }
.zeus-toast.error .zeus-toast-icon { color: var(--danger); }
.zeus-toast.info .zeus-toast-icon { color: var(--primary); }

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }
}

/* Responsividade */
@media (max-width: 1024px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   TELA DE LOGIN MODERNA & ELEGANTE (FIGMA PURPLE / GLASSMORPHISM)
   Inspirado na referência de alto padrão fornecida pelo usuário
   ========================================================== */

.zeus-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 10% 20%, #2e0854 0%, #15052a 50%, #0a0216 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.zeus-login-wrapper {
    width: 100%;
    max-width: 960px;
    min-height: 520px;
    background: linear-gradient(135deg, rgba(46, 12, 77, 0.85) 0%, rgba(26, 7, 48, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(168, 85, 247, 0.15);
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Elementos gráficos de fundo da tela de login (estilo Figma) */
.zeus-login-wrapper::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.18) 0%, rgba(147, 51, 234, 0) 70%);
    top: -80px;
    right: 200px;
    border-radius: 50%;
    pointer-events: none;
}

.zeus-login-wrapper::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 60px;
    background: rgba(168, 85, 247, 0.12);
    border-radius: 40px;
    transform: rotate(-35deg);
    top: 60px;
    right: 40px;
    pointer-events: none;
    border: 1px solid rgba(192, 132, 252, 0.2);
}

/* Painel Esquerdo: Welcome */
.zeus-login-left {
    flex: 1.1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-logo-box {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.login-brand-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.login-brand-text span {
    color: #c084fc;
    font-weight: 400;
}

.login-welcome-content {
    margin: 40px 0;
}

.login-headline {
    font-size: 44px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.login-headline-line {
    width: 48px;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
    margin: 18px 0 22px 0;
}

.login-description {
    font-size: 13px;
    color: rgba(241, 245, 249, 0.7);
    line-height: 1.6;
    max-width: 360px;
}

.login-badge-cloud {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 8px 14px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #e9d5ff;
}

.login-footer-tag {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

/* Painel Direito: Glass Card de Sign in */
.zeus-login-right {
    flex: 0.9;
    padding: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.login-card-glass {
    width: 100%;
    max-width: 340px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.login-card-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.login-card-header h2 span {
    border-bottom: 3px solid #ff5757;
    padding-bottom: 2px;
}

.login-card-header p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 22px;
}

.login-field-group {
    margin-bottom: 16px;
}

.login-field-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrap i {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.4);
    width: 14px;
    height: 14px;
}

.login-input-wrap input {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0 14px 0 34px;
    color: #ffffff;
    font-size: 12px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.login-input-wrap input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.login-alert-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 6px;
    color: #fca5a5;
    font-size: 11px;
    margin-bottom: 16px;
}

.login-btn-submit {
    width: 100%;
    height: 42px;
    background: linear-gradient(90deg, #f97316 0%, #ec4899 100%);
    border: none;
    border-radius: 22px;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
    transition: all 0.2s ease;
}

.login-btn-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.6);
    box-shadow: none;
}

/* SLIDER DE VERIFICAÇÃO HUMANA ANTI-BOT */
.login-slider-container {
    margin-bottom: 18px;
    user-select: none;
    -webkit-user-select: none;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 42px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    transition: border-color 0.2s, background 0.2s;
}

.slider-track:active {
    cursor: grabbing;
}

.slider-track.verified {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    cursor: default;
}

.slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.35) 0%, rgba(236, 72, 153, 0.45) 100%);
    pointer-events: none;
    border-radius: 21px 0 0 21px;
}

.slider-track.verified .slider-fill {
    width: 100% !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.4) 100%);
}

.slider-text {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
}

.slider-text i {
    width: 13px;
    height: 13px;
    animation: bounceRight 1.5s infinite;
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

.slider-thumb {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: grab;
    z-index: 2;
    transition: transform 0.05s ease-out, background-color 0.2s, box-shadow 0.2s;
}

.slider-thumb:active {
    cursor: grabbing;
}

.slider-thumb i {
    width: 16px;
    height: 16px;
    color: #1e1b4b;
    transition: transform 0.2s, color 0.2s;
}

.slider-track.verified .slider-thumb {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.slider-track.verified .slider-thumb i {
    color: #ffffff;
}

/* SELETOR DE IDIOMA ULTRA MODERNO (I18N) */
.lang-selector-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 3px 8px;
    transition: all 0.2s ease;
}

.lang-selector-wrap:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.lang-selector-wrap i {
    width: 14px;
    height: 14px;
    color: var(--primary, #a855f7);
}

.header-lang-wrap {
    margin-right: 6px;
}

.zeus-lang-selector {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    padding-right: 4px;
}

.zeus-lang-selector option {
    background: #181126;
    color: #ffffff;
    font-size: 11px;
    padding: 6px;
}
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.login-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
    filter: brightness(1.08);
}

.login-security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

/* Tela 404 de Acesso Bloqueado */
.zeus-blocked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
}

.blocked-card {
    text-align: center;
    padding: 40px;
    max-width: 380px;
}

.blocked-icon-box {
    width: 56px;
    height: 56px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    margin-bottom: 16px;
}

.blocked-icon-box i {
    width: 28px;
    height: 28px;
}

.blocked-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.blocked-card p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .zeus-login-wrapper {
        flex-direction: column;
    }
    .zeus-login-left {
        padding: 30px 25px;
    }
    .zeus-login-right {
        padding: 25px;
    }
}


/* MODAL DE CONFIRMAÇÃO MODERNO (SUBSTITUI CONFIRM/ALERT NATIVOS) */
.modal-confirm-dialog {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 25px rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    width: 440px;
    max-width: 92vw;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    animation: confirmPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes confirmPop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-confirm-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

.modal-confirm-icon-box.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.modal-confirm-icon-box.danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.modal-confirm-icon-box.success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.modal-confirm-icon-box i {
    width: 26px;
    height: 26px;
}

.modal-confirm-title {
    font-size: 17px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
}

.modal-confirm-message {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 22px;
    word-break: break-word;
}

.modal-confirm-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.modal-confirm-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}


.badge-pkg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    min-width: 60px;
    box-sizing: border-box;
}
