:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --background: #f5f7fa;
    --surface: #ffffff;
    --surface-light: #f8f9fc;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --sidebar-width: 280px;
    --header-height: 64px;
    --transition: all 0.3s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--background); color: var(--text); min-height: 100vh; }
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100; overflow-y: auto; }
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 24px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-badge { background: var(--primary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-list { list-style: none; }
.nav-item > a { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--text-secondary); text-decoration: none; transition: var(--transition); font-size: 14px; }
.nav-item > a i:first-child { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover > a, .nav-item.active > a { color: var(--text); background: var(--surface-light); }
.nav-item.active > a { border-left: 3px solid var(--primary); background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent); }

/* Submenu */
.has-submenu > a { justify-content: space-between; }
.toggle-icon { font-size: 10px; transition: transform 0.3s ease; margin-left: auto; }
.has-submenu.open > a .toggle-icon { transform: rotate(180deg); }
.submenu { display: none; list-style: none; background: rgba(0, 0, 0, 0.15); }
.has-submenu.open > .submenu { display: block; }
.submenu .nav-item > a { padding: 9px 20px 9px 48px; font-size: 13px; }
.submenu .submenu .nav-item > a { padding-left: 64px; font-size: 12px; }
.submenu .has-submenu > a { padding-left: 48px; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: 500; font-size: 14px; }
.user-role { font-size: 11px; color: var(--text-muted); }
.btn-logout { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 8px; border-radius: 8px; transition: var(--transition); }
.btn-logout:hover { background: var(--surface-light); color: var(--danger); }

/* Main Content */
.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.main-header { height: var(--header-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.header-left { display: flex; align-items: center; gap: 16px; }
.btn-toggle-sidebar { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.page-title { font-size: 18px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; }
.status-indicator.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.btn-notifications { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; position: relative; padding: 8px; }
.notification-badge { position: absolute; top: 0; right: 0; background: var(--danger); color: white; font-size: 10px; padding: 2px 6px; border-radius: 10px; }
.page-content { padding: 24px; flex: 1; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: 12px; padding: 20px; display: flex; justify-content: space-between; align-items: flex-start; border: 1px solid var(--border); }
.stat-info h3 { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.stat-change { font-size: 12px; color: var(--text-secondary); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-icon.primary { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.stat-icon.info { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.stat-icon.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

/* Panel */
.panel { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); margin-bottom: 24px; }
.panel-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.panel-title { font-size: 15px; font-weight: 600; }
.panel-body { padding: 20px; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover { background: var(--surface-light); }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.badge.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge.info { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.badge.primary { background: rgba(99, 102, 241, 0.2); color: var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--transition); border: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface-light); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-secondary); }
.form-group input, .form-group select { width: 100%; padding: 12px; background: var(--surface-light); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 16px; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
textarea { width: 100%; padding: 12px; background: var(--surface-light); border: 1px solid var(--border); border-radius: 8px; color: var(--text); resize: vertical; font-family: inherit; font-size: 14px; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--surface); border-radius: 16px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-footer { padding: 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.btn-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }

/* Login */
.login-modal { max-width: 400px; }
.login-header { text-align: center; padding: 40px 20px 20px; }
.login-logo { font-size: 32px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.login-header h2 { font-size: 16px; color: var(--text-secondary); font-weight: 400; }
.login-modal form { padding: 20px 30px 30px; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; }

/* Events */
.events-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.event-stat-value { font-size: 32px; font-weight: 700; }
.event-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Text */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--surface-light); border-radius: 22px; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
input:checked + .slider { background: var(--success); }
input:checked + .slider:before { transform: translateX(18px); }

/* Risk Badge */
.risk-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.risk-badge.critical { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.risk-badge.high { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.risk-badge.medium { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.risk-badge.low { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

/* Action Badge */
.action-badge { padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.action-badge.block { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.action-badge.alert { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.action-badge.mask { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.action-badge.review { background: rgba(234, 179, 8, 0.15); color: #eab308; }

/* Policy Card */
.policy-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; transition: var(--transition); cursor: pointer; }
.policy-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15); }
.policy-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.policy-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.policy-description { font-size: 12px; color: var(--text-muted); }
.policy-meta { display: flex; gap: 16px; margin-top: 12px; }
.policy-meta-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }

/* Template */
.template-item { padding: 16px; background: var(--surface-light); border-radius: 8px; margin-bottom: 12px; cursor: pointer; transition: var(--transition); }
.template-item:hover { background: var(--border); }

/* Utilities */
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.small { font-size: 12px; }
.loading { text-align: center; padding: 60px; color: var(--text-muted); }
.loading i { font-size: 32px; margin-bottom: 16px; }
.error-message { padding: 20px; background: rgba(239, 68, 68, 0.1); border-radius: 8px; color: var(--danger); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: var(--transition); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .btn-toggle-sidebar { display: block; }
    .stats-grid { grid-template-columns: 1fr; }
    .events-breakdown { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   CLIENT SWITCHER
   ======================================== */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.client-switcher {
    position: relative;
}

.client-switcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.client-switcher-btn:hover {
    border-color: var(--primary);
}

.client-switcher-btn i:first-child {
    color: var(--primary);
}

.client-switcher-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 300px;
    max-height: 400px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.client-switcher-dropdown.show {
    display: block;
}

.client-search {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.client-search input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.client-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.client-list {
    max-height: 300px;
    overflow-y: auto;
}

.client-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

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

.client-item:hover {
    background: var(--surface-light);
}

.client-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.client-item i {
    width: 20px;
    text-align: center;
}

.client-item .client-plan {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--surface-light);
}

/* Context Badge */
.context-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 16px;
}

.context-badge i {
    font-size: 10px;
}

/* Log Detail Modal */
.log-detail {
    background: var(--surface-light);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.log-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.log-detail-label {
    color: var(--text-muted);
    font-size: 12px;
}

.log-detail-value {
    font-weight: 500;
}

.violations-list {
    margin-top: 12px;
}

.violation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
}

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

/* Clickable row */
.data-table tr.clickable {
    cursor: pointer;
}

.data-table tr.clickable:hover {
    background: var(--surface-light);
}

/* Usage Stats */
.usage-bar {
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.usage-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-bar-fill.warning {
    background: var(--warning);
}

.usage-bar-fill.danger {
    background: var(--danger);
}

/* ========================================
   CLIENT SWITCHER
   ======================================== */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.client-switcher {
    position: relative;
}

.client-switcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.client-switcher-btn:hover {
    border-color: var(--primary);
}

.client-switcher-btn i:first-child {
    color: var(--primary);
}

.client-switcher-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 300px;
    max-height: 400px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.client-switcher-dropdown.show {
    display: block;
}

.client-search {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.client-search input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.client-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.client-list {
    max-height: 300px;
    overflow-y: auto;
}

.client-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

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

.client-item:hover {
    background: var(--surface-light);
}

.client-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.client-item i {
    width: 20px;
    text-align: center;
}

.client-item .client-plan {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Context Badge */
.context-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Usage Bar */
.usage-bar {
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.usage-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.usage-bar-fill.warning { background: var(--warning); }
.usage-bar-fill.danger { background: var(--danger); }

/* Violations List */
.violations-list { margin-top: 12px; }

.violation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
}

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

/* Template Item */
.template-item {
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.template-item:hover {
    background: var(--surface);
    border: 1px solid var(--primary);
}

/* Clickable rows */
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: var(--surface-light); }

/* Button block */
.btn-block { width: 100%; }

/* Margin left */
.ml-2 { margin-left: 8px; }

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

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

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

.tab-content {
    display: none;
    padding-top: 16px;
}

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

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Section Title */
.section-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.section-title i {
    margin-right: 8px;
    color: var(--primary);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Form Control improvements */
.form-control {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    cursor: pointer;
}

/* ========================================
   SOC COMMAND CENTER - VISÃO GERAL
   ======================================== */

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-banner.danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-banner .btn {
    margin-left: auto;
}

/* Stats Grid 5 columns */
.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .stats-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Stat Card Colors */
.stat-card.danger .stat-icon { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-card.success .stat-icon { background: rgba(34, 197, 94, 0.15); color: var(--success); }

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Section Grid 2 columns */
.section-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .section-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Risk Map */
.risk-map {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.risk-map-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface-light);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.risk-map-item:hover {
    background: var(--surface);
}

.risk-map-item.critical { border-left: 3px solid var(--danger); }
.risk-map-item.critical i { color: var(--danger); }
.risk-map-item.high { border-left: 3px solid var(--warning); }
.risk-map-item.high i { color: var(--warning); }
.risk-map-item.medium { border-left: 3px solid var(--info); }
.risk-map-item.medium i { color: var(--info); }
.risk-map-item.low { border-left: 3px solid var(--success); }
.risk-map-item.low i { color: var(--success); }

.risk-map-name {
    flex: 1;
    font-weight: 500;
}

.risk-map-score {
    font-size: 12px;
    color: var(--text-muted);
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 6px;
}

.status-item i {
    width: 20px;
    text-align: center;
}

.status-item span:first-of-type {
    flex: 1;
}

/* Events Breakdown Enhanced */
.events-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.event-stat {
    text-align: center;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

.event-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.event-stat-icon.success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.event-stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.event-stat-icon.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.event-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.event-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Progress Stacked */
.progress-stacked {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface-light);
}

.progress-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-segment.success { background: var(--success); }
.progress-segment.warning { background: var(--warning); }
.progress-segment.danger { background: var(--danger); }

/* Incident List */
.incident-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.incident-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--surface-light);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.incident-item:hover {
    background: var(--surface);
}

.incident-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.incident-icon.critical { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.incident-icon.high { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.incident-icon.medium { background: rgba(99, 102, 241, 0.2); color: var(--info); }
.incident-icon.low { background: rgba(34, 197, 94, 0.2); color: var(--success); }

.incident-info {
    flex: 1;
}

.incident-title {
    font-weight: 500;
}

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

.incident-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Finance Highlight */
.finance-highlight {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 197, 94, 0.1));
    border-radius: 12px;
}

.finance-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--success);
}

.finance-label {
    font-size: 14px;
    color: var(--text-muted);
}

.finance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.finance-item {
    text-align: center;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

.finance-item-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.finance-item-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Compact Table */
.data-table.compact th,
.data-table.compact td {
    padding: 8px 12px;
    font-size: 13px;
}

/* ========================================
   PERFIL DO CLIENTE
   ======================================== */

.client-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.client-profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.client-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.client-details h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.client-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.client-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-lg {
    padding: 8px 16px;
    font-size: 14px;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.profile-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-size: 14px;
}

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

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

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* Usage Display */
.usage-display {
    text-align: center;
    padding: 20px;
}

.usage-numbers {
    font-size: 32px;
    font-weight: 700;
}

.usage-current {
    color: var(--primary);
}

.usage-separator {
    color: var(--text-muted);
    margin: 0 4px;
}

.usage-limit {
    color: var(--text-muted);
}

.usage-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.usage-bar-lg {
    height: 12px;
    background: var(--surface-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-bar-lg .usage-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.usage-bar-lg .usage-bar-fill.warning {
    background: var(--warning);
}

.usage-bar-lg .usage-bar-fill.danger {
    background: var(--danger);
}

.usage-pct {
    font-size: 14px;
    color: var(--text-muted);
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
    opacity: 0.6;
}

.module-item.active {
    opacity: 1;
    border: 1px solid var(--success);
}

.module-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.module-item span:first-of-type {
    flex: 1;
}

/* Policies Mini List */
.policies-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.policy-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface-light);
    border-radius: 6px;
}

.policy-mini-name {
    flex: 1;
    font-weight: 500;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-item span {
    font-size: 14px;
}

/* Alert Box */
.alert-box {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-box.warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-box a {
    color: inherit;
    text-decoration: underline;
}

/* Base Legal */
.base-legal {
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
    font-size: 16px;
}

/* Badge Secondary */
.badge.secondary {
    background: var(--surface-light);
    color: var(--text-muted);
}

/* Alert Banner com Ações */
.alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.alert-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-banner-actions {
    display: flex;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

/* Risk Map Melhorado */
.risk-map-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.risk-map-indicator.critical { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.risk-map-indicator.high { background: var(--warning); }
.risk-map-indicator.medium { background: var(--info); }
.risk-map-indicator.low { background: var(--success); }

.risk-map-trend {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.risk-map-trend.up { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.risk-map-trend.down { color: var(--success); background: rgba(34, 197, 94, 0.1); }

.risk-map-score {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Status Details */
.status-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.status-detail {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* Event Stat com % */
.event-stat-pct {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -4px;
}

/* Incident Status */
.incident-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.incident-sla {
    font-size: 11px;
    color: var(--warning);
}

/* Finance Alert */
.finance-alert {
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 6px;
    color: var(--danger);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Clickable */
.clickable {
    cursor: pointer;
    transition: var(--transition);
}

.clickable:hover {
    transform: translateY(-2px);
}

.stat-card.clickable:hover {
    border-color: var(--primary);
}

.event-stat.clickable:hover {
    background: var(--surface);
}

/* Quick Actions Bar */
.quick-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.quick-actions-bar .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

/* Timeline Bar */
.timeline-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: var(--surface-light);
    border-radius: 8px;
    margin-bottom: 20px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.timeline-item i {
    width: 16px;
}

.timeline-item span {
    color: var(--text-muted);
}

.timeline-item strong {
    color: var(--text);
}

/* Playbook List */
.playbook-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playbook-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.playbook-item:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.playbook-item i {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

/* Playbooks Grid */
.playbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.playbook-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.playbook-card:hover {
    border-color: var(--primary);
}

.playbook-card.inactive {
    opacity: 0.6;
}

.playbook-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.playbook-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.playbook-info {
    flex: 1;
}

.playbook-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.playbook-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.playbook-card-body {
    padding: 16px;
}

.playbook-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.playbook-detail .label {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 70px;
}

.action-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.action-tag {
    font-size: 11px;
    padding: 4px 8px;
    background: var(--surface-light);
    border-radius: 4px;
}

.playbook-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
}

.executions {
    font-size: 13px;
    color: var(--text-muted);
}

.playbook-actions {
    display: flex;
    gap: 6px;
}

/* Schedule List */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-light);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.schedule-info {
    flex: 1;
}

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

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Baseline Grid */
.baseline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
}

.baseline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.baseline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.baseline-client {
    display: flex;
    flex-direction: column;
}

.baseline-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.baseline-score.good { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.baseline-score.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.baseline-score.bad { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.baseline-card-body {
    padding: 16px;
}

/* Baseline Metrics */
.baseline-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.baseline-metric {
    display: flex;
    align-items: center;
    gap: 12px;
}

.baseline-metric .label {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 100px;
}

.baseline-metric .value {
    font-size: 13px;
    min-width: 100px;
    text-align: right;
}

.metric-bar {
    flex: 1;
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

.metric-current {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.metric-current.over {
    background: var(--danger);
}

.metric-baseline {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 16px;
    background: var(--warning);
    border-radius: 1px;
}

/* Anomalies */
.baseline-anomalies {
    margin-top: 16px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: 8px;
}

.anomaly-alert {
    font-weight: 500;
    margin-bottom: 8px;
}

.anomaly-detail {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 20px;
}

.baseline-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
}

.baseline-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.baseline-info .trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.baseline-actions {
    display: flex;
    gap: 6px;
}

/* Changes List */
.changes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.change-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface-light);
    border-radius: 6px;
    border-left: 3px solid;
}

.change-item.warning { border-color: var(--warning); }
.change-item.danger { border-color: var(--danger); }
.change-item.success { border-color: var(--success); }
.change-item.info { border-color: var(--info); }

.change-item i { width: 20px; }
.change-item span:first-of-type { flex: 1; }
.change-time { font-size: 12px; color: var(--text-muted); }

/* Baseline Detail Modal */
.baseline-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.baseline-detail-card {
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.baseline-detail-card h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.baseline-detail-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.baseline-detail-card li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.baseline-detail-card li:last-child {
    border-bottom: none;
}

/* Recommendations */
.recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.recommendation:hover {
    background: var(--surface);
    border: 1px solid var(--primary);
}

/* Relatório de Inteligência */
.relatorio-intel {
    background: white;
    color: #1a1a2e;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.relatorio-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.relatorio-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.relatorio-logo i {
    margin-right: 8px;
    color: #6366f1;
}

.relatorio-title h1 {
    font-size: 24px;
    margin: 0 0 8px 0;
}

.relatorio-title h2 {
    font-size: 18px;
    font-weight: 400;
    margin: 0 0 8px 0;
    opacity: 0.9;
}

.relatorio-title p {
    font-size: 14px;
    opacity: 0.7;
    margin: 0;
}

.relatorio-section {
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
}

.relatorio-section h3 {
    font-size: 16px;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.relatorio-section h3 i {
    color: #6366f1;
}

/* Executive Summary */
.exec-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.exec-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
}

.exec-item.good { border-left: 4px solid #22c55e; }
.exec-item.warning { border-left: 4px solid #f59e0b; }
.exec-item.info { border-left: 4px solid #6366f1; }

.exec-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
}

.exec-label {
    font-size: 12px;
    color: #666;
    margin: 4px 0;
}

.exec-trend {
    font-size: 12px;
    color: #22c55e;
}

.exec-item.warning .exec-trend { color: #22c55e; }

/* Comportamento Grid */
.comportamento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.comportamento-card {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.comportamento-card h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #1a1a2e;
}

.comportamento-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comportamento-card li {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.comportamento-card li:last-child {
    border-bottom: none;
}

/* Relatório Table */
.relatorio-table {
    width: 100%;
    border-collapse: collapse;
}

.relatorio-table th,
.relatorio-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.relatorio-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a1a2e;
}

.relatorio-table .badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.relatorio-table .badge.success { background: #dcfce7; color: #166534; }
.relatorio-table .badge.warning { background: #fef3c7; color: #92400e; }
.relatorio-table .badge.danger { background: #fee2e2; color: #991b1b; }

/* Incidentes Resumo */
.incidentes-resumo {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.incidente-stat {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.incidente-stat .num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}

.incidente-stat .num.text-success { color: #22c55e; }
.incidente-stat .num.text-warning { color: #f59e0b; }

.incidente-stat .label {
    font-size: 11px;
    color: #666;
}

/* Recomendações */
.recomendacoes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recomendacao-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid;
}

.recomendacao-item.alta { border-color: #ef4444; }
.recomendacao-item.media { border-color: #f59e0b; }
.recomendacao-item.baixa { border-color: #22c55e; }

.recomendacao-item .prioridade {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    height: fit-content;
}

.recomendacao-item.alta .prioridade { background: #fee2e2; color: #991b1b; }
.recomendacao-item.media .prioridade { background: #fef3c7; color: #92400e; }
.recomendacao-item.baixa .prioridade { background: #dcfce7; color: #166534; }

.recomendacao-content strong {
    display: block;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.recomendacao-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Maturidade */
.maturidade-display {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: center;
}

.maturidade-score {
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.score-circle span {
    font-size: 42px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 14px;
    color: #666;
}

.maturidade-breakdown h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.score-item span:first-child {
    min-width: 150px;
    font-size: 13px;
}

.score-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

.score-item span:last-child {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    font-size: 13px;
}

/* Footer */
.relatorio-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    text-align: center;
}

.relatorio-footer p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.relatorio-footer .small {
    font-size: 11px;
    color: #999;
}

/* Loading */
.loading-report {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.loading-report i {
    margin-bottom: 16px;
}

/* Relatório Melhorado */
.relatorio-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    color: white;
    margin-bottom: 16px;
}

/* Resumo para Diretoria */
.resumo-diretoria {
    background: #f0f9ff !important;
    border-left: 4px solid #6366f1;
}

.resumo-box {
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
}

.resumo-box .text-success { color: #22c55e; }

/* Impacto Box */
.impacto-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.impacto-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.impacto-item i { width: 20px; }
.impacto-item.success i { color: #22c55e; }
.impacto-item.warning i { color: #f59e0b; }

/* Legal Reference */
.legal-ref {
    font-size: 12px;
    color: #666;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 16px;
}

.legal-ref i { margin-right: 8px; color: #6366f1; }

/* Highlight Row */
.highlight-row {
    background: #fef3c7 !important;
}

/* Comportamento Alert */
.comportamento-card.alert {
    border-left: 3px solid #f59e0b;
}

/* Recomendações Melhoradas */
.recomendacao-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.recomendacao-desc {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #666;
}

.recomendacao-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #444;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.recomendacao-cta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recomendacao-cta i { color: #6366f1; }

/* Score Explicação */
.score-explicacao {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.score-nivel {
    margin-top: 8px;
    font-size: 14px;
}

.score-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Footer Melhorado */
.footer-brand {
    font-size: 16px;
    margin-bottom: 4px !important;
}

.footer-module {
    font-size: 12px;
    color: #888 !important;
    margin-bottom: 8px !important;
}

.footer-disclaimer {
    font-size: 10px;
    color: #aaa !important;
    font-style: italic;
}

/* Seção de Usuários no Relatório */
.section-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.relatorio-table small {
    font-size: 11px;
}

.usuarios-insight {
    padding: 12px 16px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
}

.usuarios-insight i {
    margin-right: 6px;
}

/* Webhooks Layout Fix */
.webhooks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.webhook-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.webhook-card.healthy { border-left: 4px solid var(--success); }
.webhook-card.warning { border-left: 4px solid var(--warning); }
.webhook-card.inactive { border-left: 4px solid var(--text-muted); opacity: 0.7; }

.webhook-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.webhook-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.webhook-status.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.webhook-status.degraded { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.webhook-status.offline { background: var(--text-muted); }

.webhook-info {
    flex: 1;
}

.webhook-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.webhook-info code {
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    padding: 0;
}

.webhook-body {
    padding: 16px;
}

.webhook-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.webhook-metrics .metric {
    text-align: center;
}

.webhook-metrics .metric .value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.webhook-metrics .metric .label {
    font-size: 11px;
    color: var(--text-muted);
}

.webhook-alert {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--warning);
    border-radius: 6px;
    font-size: 13px;
    color: var(--warning);
}

.webhook-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
}

.last-delivery {
    font-size: 13px;
    color: var(--text-muted);
}

.webhook-actions {
    display: flex;
    gap: 8px;
}

/* Feature Flags */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.flags-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flag-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.flag-card:hover {
    border-color: var(--primary);
}

.flag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.flag-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-info code {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 4px;
}

.switch-lg {
    transform: scale(1.2);
}

.flag-body {
    padding: 16px;
}

.flag-desc {
    margin: 0 0 16px 0;
    color: var(--text-muted);
}

.flag-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.flag-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-detail .label {
    font-size: 12px;
    color: var(--text-muted);
}

.flag-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
}

.flag-actions {
    display: flex;
    gap: 8px;
}

/* Clients Checklist */
.clients-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.client-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-light);
    border-radius: 6px;
    cursor: pointer;
}

.client-check:hover {
    background: var(--surface);
}

/* Status Page Preview */
.status-page-preview {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    color: #1a1a2e;
}

.sp-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 40px;
    text-align: center;
}

.sp-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.sp-header h1 {
    font-size: 28px;
    margin: 0 0 20px 0;
}

.sp-overall {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 18px;
}

.sp-overall.operational {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.sp-section {
    padding: 24px 40px;
    border-bottom: 1px solid #e5e7eb;
}

.sp-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #1a1a2e;
}

.sp-components {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sp-component {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sp-comp-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.sp-comp-status.operational { color: #22c55e; }
.sp-comp-status.degraded { color: #f59e0b; }
.sp-comp-status.outage { color: #ef4444; }

/* Uptime Bars */
.sp-uptime-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-uptime-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sp-uptime-name {
    min-width: 150px;
    font-size: 14px;
}

.sp-uptime-bar {
    flex: 1;
}

.sp-uptime-pct {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    color: #22c55e;
}

.uptime-days {
    display: flex;
    gap: 2px;
}

.uptime-day {
    width: 6px;
    height: 24px;
    border-radius: 2px;
}

.uptime-day.up { background: #22c55e; }
.uptime-day.down { background: #ef4444; }

/* Incidents */
.sp-incidents {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-incident {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sp-incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sp-incident-title {
    font-weight: 600;
    color: #1a1a2e;
}

.sp-incident-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.sp-incident-status.resolved { background: #dcfce7; color: #166534; }
.sp-incident-status.investigating { background: #fef3c7; color: #92400e; }
.sp-incident-status.maintenance { background: #e0e7ff; color: #3730a3; }

.sp-incident-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.sp-incident-updates {
    border-left: 2px solid #e5e7eb;
    padding-left: 16px;
}

.sp-update {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

/* Subscribe */
.sp-subscribe {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.sp-subscribe p {
    margin: 0 0 16px 0;
    color: #666;
}

.sp-subscribe-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.sp-subscribe-form input {
    flex: 1;
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.config-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

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

.config-value code {
    padding: 6px 12px;
    background: var(--surface-light);
    border-radius: 4px;
}


/* === TEMA CLARO COM DETALHES ROXOS === */

/* Sidebar escura para contraste */
.sidebar {
    background: #1e1b4b !important;
    border-right: none !important;
}

.sidebar .nav-item > a {
    color: #c4b5fd !important;
}

.sidebar .nav-item:hover > a,
.sidebar .nav-item.active > a {
    color: #ffffff !important;
    background: rgba(139, 92, 246, 0.3) !important;
}

.sidebar .nav-item.active > a {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed) !important;
    border-left: none !important;
    border-radius: 8px;
    margin: 0 8px;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.sidebar-footer {
    background: rgba(0,0,0,0.2) !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.sidebar-footer .user-name {
    color: #ffffff !important;
}

.sidebar-footer .user-role {
    color: #a5b4fc !important;
}

.submenu {
    background: rgba(0,0,0,0.15) !important;
}

/* Header clara */
.main-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.page-title {
    color: #1f2937 !important;
}

/* Cards com sombra */
.stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    transition: all 0.2s ease !important;
}

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

/* Painéis */
.panel {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

.panel-header {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Tabelas */
.data-table th {
    background: #f9fafb !important;
    color: #6b7280 !important;
}

.data-table td {
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.data-table tr:hover {
    background: #f9fafb !important;
}

/* Badges coloridos */
.badge.success {
    background: #dcfce7 !important;
    color: #16a34a !important;
}

.badge.warning {
    background: #fef3c7 !important;
    color: #d97706 !important;
}

.badge.danger {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.badge.info {
    background: #dbeafe !important;
    color: #2563eb !important;
}

/* Botões */
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3) !important;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

/* Inputs */
.form-control {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
}

.form-control:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

/* Status indicators */
.stat-icon.primary, .stat-icon.blue {
    background: rgba(139, 92, 246, 0.1) !important;
    color: #8b5cf6 !important;
}

.stat-icon.success, .stat-icon.green {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #22c55e !important;
}

.stat-icon.warning, .stat-icon.orange, .stat-icon.yellow {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

.stat-icon.danger, .stat-icon.red {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Alertas */
.alert-success {
    background: #dcfce7 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
}

.alert-warning {
    background: #fef3c7 !important;
    border: 1px solid #fcd34d !important;
    color: #92400e !important;
}

.alert-danger {
    background: #fee2e2 !important;
    border: 1px solid #fca5a5 !important;
    color: #991b1b !important;
}

/* Loading */
.loading {
    color: #6b7280 !important;
}

.loading i {
    color: #8b5cf6 !important;
}

/* Client switcher */
.client-switcher-btn {
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}

.client-dropdown {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Header status */
.header-status {
    background: #dcfce7 !important;
    color: #166534 !important;
}

/* Code blocks */
code {
    background: #f3f4f6 !important;
    color: #7c3aed !important;
}

/* Login modal */
.login-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

.login-card h2 {
    color: #1f2937 !important;
}

.login-card p {
    color: #6b7280 !important;
}

/* ============================================
   FATURAMENTO - Estilo React
   ============================================ */

.faturamento-container {
    max-width: 100%;
}

.fat-tabs {
    display: flex;
    gap: 8px;
    background: var(--surface);
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.fat-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.fat-tab:hover {
    background: var(--surface-light);
    color: var(--text);
}

.fat-tab.active {
    background: var(--primary);
    color: #ffffff;
}

/* KPIs */
.fat-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fat-kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.fat-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.fat-kpi.green::before { background: var(--success); }
.fat-kpi.blue::before { background: var(--info); }
.fat-kpi.purple::before { background: var(--primary); }
.fat-kpi.yellow::before { background: var(--warning); }

.fat-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.fat-kpi-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.fat-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.fat-kpi-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.fat-kpi-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.fat-kpi-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--primary); }
.fat-kpi-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.fat-kpi-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.fat-kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.fat-kpi-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fat-kpi-trend.positive { color: var(--success); }
.fat-kpi-trend.negative { color: var(--danger); }

/* Charts Row */
.fat-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.fat-chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.fat-chart-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fat-chart-header i {
    color: var(--text-muted);
}

.fat-chart-body {
    padding: 20px;
}

/* Bar Chart */
.fat-bar-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 220px;
    gap: 12px;
}

.fat-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fat-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 6px 6px 0 0;
    transition: all 0.3s;
}

.fat-bar:hover {
    opacity: 0.8;
}

.fat-bar-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.fat-bar-value {
    font-size: 12px;
    font-weight: 600;
}

/* Clients List */
.fat-clients-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fat-client-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fat-client-rank {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.fat-client-info {
    flex: 1;
}

.fat-client-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.fat-client-bar {
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.fat-client-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
}

.fat-client-value {
    font-weight: 600;
    font-size: 14px;
    min-width: 80px;
    text-align: right;
}

.fat-client-percent {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 40px;
}

/* Bottom Stats */
.fat-bottom-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.fat-stat-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.fat-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.fat-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.fat-stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Summary Cards (Faturas) */
.fat-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.fat-summary-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.fat-summary-card:hover {
    border-color: var(--primary);
}

.fat-summary-card.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.fat-summary-card.green.active { border-color: var(--success); background: rgba(16, 185, 129, 0.05); }
.fat-summary-card.yellow.active { border-color: var(--warning); background: rgba(245, 158, 11, 0.05); }
.fat-summary-card.red.active { border-color: var(--danger); background: rgba(239, 68, 68, 0.05); }

.fat-sum-label {
    font-size: 13px;
    color: var(--text-muted);
}

.fat-summary-card.green .fat-sum-label { color: var(--success); }
.fat-summary-card.yellow .fat-sum-label { color: var(--warning); }
.fat-summary-card.red .fat-sum-label { color: var(--danger); }

.fat-sum-value {
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0;
}

.fat-summary-card.green .fat-sum-value { color: var(--success); }
.fat-summary-card.yellow .fat-sum-value { color: var(--warning); }
.fat-summary-card.red .fat-sum-value { color: var(--danger); }

.fat-sum-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* Filters */
.fat-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.fat-filters-left {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fat-filters-right {
    display: flex;
    gap: 8px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    padding-left: 36px;
    width: 200px;
}

.fat-actions {
    display: flex;
    gap: 4px;
}

/* Overdue Card */
.fat-overdue-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.fat-overdue-name {
    font-weight: 60r);
    opacity: 0.8;
}

.fat-overdue-details {
    font-size: 13px;
    margin-top: 8px;
}

.fat-overdue-contact {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.fat-overdue-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Rules */
.fat-rules {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fat-rule {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface-light);
    border-radius: 10px;
}

.fat-rule-badge {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.fat-rule-info {
    flex: 1;
}

.fat-rule-action {
    font-weight: 500;
}

.fat-rule-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Toggle Switch */
.fat-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.fat-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-light);
    border-radius: 24px;
    transition: 0.3s;
}

.fat-toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

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

.fat-toggle input:checked + .fat-toggle-slider::before {
    transform: translateX(20px);
}

/* ============================================
   WIZARD DE CADASTRO
   ============================================ */

.wizard-modal {
    background: var(--surface);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.wizard-title h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.wizard-step-label {
    font-size: 13px;
    color: var(--text-muted);
}

.wizard-progress {
    height: 4px;
    background: var(--border);
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s ease;
}

.wizard-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.wizard-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-light);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
    position: relative;
}

.wizard-step-dot::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    width: 36px;
    height: 2px;
    background: var(--border);
    transform: translateY(-50%);
}

.wizard-step-dot:last-child::before {
    display: none;
}

.wizard-step-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wizard-step-dot.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.wizard-step-dot.completed::before {
    background: var(--success);
}

.wizard-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.wizard-step-content {
    animation: fadeIn 0.3s ease;
}

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

.wizard-step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.wizard-step-header.success .wizard-step-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.wizard-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wizard-step-header h3 {
    margin: 0;
    font-size: 18px;
}

.wizard-step-header p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.wizard-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface-light);
}

/* Plans */
.wizard-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.wizard-plan-card {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.wizard-plan-card:hover {
    border-color: var(--primary);
}

.wizard-plan-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.plan-header {
    margin-bottom: 16px;
}

.plan-name {
    font-weight: 700;
    font-size: 14px;
}

.plan-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.plan-price {
    margin-bottom: 16px;
}

.plan-currency {
    font-size: 14px;
    color: var(--text-muted);
}

.plan-value {
    font-size: 32px;
    font-weight: 700;
}

.plan-period {
    font-size: 13px;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    text-align: left;
}

.plan-features li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-features li i {
    color: var(--success);
    margin-right: 8px;
}

.plan-select {
    color: var(--text-muted);
    font-size: 24px;
}

.wizard-plan-card.selected .plan-select {
    color: var(--primary);
}

/* Addons */
.wizard-addons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wizard-addon-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wizard-addon-card:hover {
    border-color: var(--primary);
}

.wizard-addon-card.selected {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.05);
}

.addon-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}

.addon-info {
    flex: 1;
}

.addon-info h4 {
    margin: 0;
    font-size: 14px;
}

.addon-info p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.addon-price {
    font-weight: 600;
    color: var(--text-secondary);
}

.addon-toggle {
    font-size: 28px;
    color: var(--text-muted);
}

.wizard-addon-card.selected .addon-toggle {
    color: var(--success);
}

/* Política */
.wizard-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.mode-btn {
    flex: 1;
    padding: 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.mode-btn i {
    font-size: 24px;
    color: var(--text-muted);
}

.mode-btn:hover {
    border-color: var(--primary);
}

.mode-btn.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.mode-btn.active i {
    color: var(--primary);
}

.form-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

/* Review */
.wizard-review {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.review-section {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 16px;
}

.review-section h4 {
    font-size: 14px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-section h4 i {
    color: var(--text-muted);
}

.review-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.review-label {
    color: var(--text-muted);
}

.review-value {
    font-weight: 500;
}

.review-total {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.review-total-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.review-total-sub {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 8px;
}

.review-total-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

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

/* ============================================
   REVISÃO DO CADASTRO
   ============================================ */

.review-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.review-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.review-card-header {
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-card-header i {
    color: var(--primary);
}

.review-card-body {
    padding: 16px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.review-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.review-label {
    color: var(--text-muted);
}

.review-value {
    font-weight: 500;
    text-align: right;
}

.review-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.15));
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px 24px;
}

.review-total-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
}

.review-total-sub {
    font-size: 12px;
    color: var(--primary);
}

.review-total-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

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

/* ============================================
   REVISÃO DO CADASTRO
   ============================================ */

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.review-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.review-card-header {
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-card-header i {
    color: var(--primary);
}

.review-card-body {
    padding: 16px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.review-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.review-label {
    color: var(--text-muted);
}

.review-value {
    font-weight: 500;
    text-align: right;
}

.review-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.15));
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px 24px;
}

.review-total-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
}

.review-total-sub {
    font-size: 12px;
    color: var(--primary);
}

.review-total-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.mt-3 { margin-top: 16px; }

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

/* ============================================
   PAGE TABS (Estilo React)
   ============================================ */

.page-header-section {
    margin-bottom: 24px;
}

.page-header-section h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.page-tabs {
    display: flex;
    gap: 8px;
    background: var(--surface);
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.page-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-tab:hover {
    background: var(--surface-light);
    color: var(--text);
}

.page-tab.active {
    background: var(--primary);
    color: #ffffff;
}

/* Report Cards */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.report-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.report-card-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.report-card-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--primary); }
.report-card-icon.green { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.report-card-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.report-card-icon.gray { background: rgba(107, 114, 128, 0.15); color: var(--text-muted); }
.report-card-icon.teal { background: rgba(20, 184, 166, 0.15); color: #14b8a6; }

.report-card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
}

.report-card-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.report-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--primary);
    margin-top: 10px;
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--info);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }

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

/* Integration List */
.integration-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.integration-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.integration-item.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.integration-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.integration-icon.blue { background: var(--info); }
.integration-icon.yellow { background: var(--warning); }
.integration-icon.red { background: var(--danger); }
.integration-icon.green { background: var(--success); }

.integration-info {
    flex: 1;
}

.integration-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.integration-url {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.integration-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.integration-stats {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

.integration-actions {
    display: flex;
    gap: 4px;
}

/* Chart Bars */
.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 200px;
    gap: 12px;
    padding: 20px 0;
}

.chart-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 6px 6px 0 0;
    transition: all 0.3s;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.chart-bar-value {
    font-size: 12px;
    font-weight: 600;
}

/* Client Revenue Row */
.client-revenue-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.client-revenue-row:last-child {
    border-bottom: none;
}

.client-rank {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.client-info {
    flex: 1;
}

.client-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.client-bar {
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.client-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
}

.client-value {
    font-weight: 600;
    font-size: 14px;
    min-width: 100px;
    text-align: right;
}

.client-percent {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 50px;
    text-align: right;
}

/* Integration Card */
.integration-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.integration-card.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.integration-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.integration-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.integration-dot.online {
    background: var(--success);
}

.integration-dot.offline {
    backgr   margin-bottom: 8px;
}

.integration-error {
    color: var(--danger);
    font-size: 12px;
    margin-bottom: 8px;
}

.integration-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.integration-actions {
    display: flex;
    gap: 8px;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-light);
    border-radius: 24px;
    transition: 0.3s;
}

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

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

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

/* Sub-tabs */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sub-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
      background: var(--surface-light);
    color: var(--text);
}

.sub-tab.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 500;
}

/* Pipeline Flow */
.pipeline-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.pipeline-stage {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: var(--surface-light);
    border-radius: 12px;
    max-width: 150px;
}

.stage-icon {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
}

.stage-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.stage-metric {
    font-size: 12px;
    color: var(--text-muted);
}

.pipeline-arrow {
    color: var(--text-muted);
    padding: 0 8px;
}

/* Baseline Grid */
.baseline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.baseline-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.baseline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.baseline-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.baseline-score.good {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.baseline-score.warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.baseline-score.bad {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.baseline-card-body {
    padding: 16px;
}

.baseline-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.baseline-metric {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.baseline-metric .label {
    color: var(--text-muted);
}

.baseline-anomalies {
    background: rgba(234, 179, 8, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.anomaly-alert {
    font-weight: 500;
    margin-bottom: 8px;
}

.anomaly-detail {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 20px;
}

.baseline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.trend {
    font-size: 13px;
    font-weight: 500;
}

.trend.success { color: var(--success); }
.trend.warning { color: var(--warning); }
.trend.danger { color: var(--danger); }
.trend.info { color: var(--info); }

.baseline-actions {
    display: flex;
    gap: 8px;
}

/* Log Viewer */
.log-viewer {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.log-line {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.log-time {
    color: #888;
    min-width: 140px;
}

.log-level {
    min-width: 50px;
    font-weight: 600;
}

.log-level.info { color: #3b82f6; }
.log-level.warn { color: #eab308; }
.log-level.error { color: #ef4444; }
.log-level.debug { color: #888; }

.log-service {
    color: #a855f7;
    min-width: 60px;
}

.log-msg {
    color: #e5e5e5;
}

/* Resource Bar */
.resource-bar {
    height: 12px;
    background: var(--surface-light);
    border-radius: 6px;
    overflow: hidden;
    margin: 8px 0;
}

.resource-fill {
    height: 100%;
    background: var(--success);
    border-radius: 6px;
    transition: width 0.3s;
}

.resource-fill.warning {
    background: var(--warning);
}

.resource-fill.danger {
    background: var(--danger);
}

/* Enrollment Queue */
.enrollment-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enrollment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

/* Config Card */
.config-card {
    background: var(--surface-light);
    border-radius: 10px;
    padding: 16px;
}

.config-card h4 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Permissions Grid */
.permissions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.permission-item {
    padding: 6px 12px;
    background: var(--surface-light);
    border-radius: 6px;
    font-size: 12px;
}

/* Status Overview */
.status-all-systems {
    font-size: 18px;
    font-weight: 500;
    padding: 20px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 10px;
    text-align: center;
}

/* Incident Item */
.incident-item {
    padding: 16px;
    background: var(--surface-light);
    border-radius: 10px;
    margin-bottom: 12px;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.incident-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.incident-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Menu - Letras brancas */
.sidebar .nav-item > a,
.sidebar .nav-item > a span,
.sidebar .submenu-toggle,
.sidebar .submenu-toggle span,
.sidebar .submenu .nav-item > a,
.sidebar .submenu .nav-item > a span {
    color: #ffffff !important;
}

.sidebar .nav-item > a:hover,
.sidebar .submenu-toggle:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item.active > a {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.sidebar .text-muted,
.sidebar .nav-item i {
    color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar .nav-item:hover i {
    color: #ffffff !important;
}

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

.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: var(--surface-light);
    transition: .3s;
    border-radius: 24px;
}

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

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

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Jailbreak List */
.jailbreak-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jailbreak-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

.jailbreak-phrase {
    flex: 1;
    font-size: 13px;
}

/* MITRE Grid */
.mitre-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.mitre-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.mitre-item.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.action-icon.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.action-icon.warning { background: rgba(234, 179, 8, 0.15); color: var(--warning); }
.action-icon.success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.action-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--info); }

/* Risk Panel */
.risk-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.risk-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.risk-icon {
    width: 36px;
    height: 36px;
    background: var(--surface-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.risk-label {
    font-size: 12px;
    color: var(--text-muted);
}

.risk-value {
    font-size: 24px;
    font-weight: 700;
}

.risk-pct {
    font-size: 12px;
    color: var(--text-muted);
}

/* Summary Banner */
.summary-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
}

.summary-icon {
    font-size: 32px;
    color: var(--success);
}

.summary-content p {
    margin: 4px 0 0 0;
    font-size: 14px;
}

/* Status Item */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

/* Rate Panel */
.rate-panel {
    background: linear-gradient(135deg, var(--primary), #4f46e5) !important;
    color: white;
}

.rate-label {
    font-size: 14px;
    opacity: 0.8;
}

.rate-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin: 8px 0;
}

.rate-sub {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 12px;
}

.rate-bar {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
}

/* Config Table */
.config-table td {
    vertical-align: middle;
}

.btn-ghost {
    background: transparent;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
}

.btn-ghost:hover {
    background: var(--surface-light);
    border-radius: 4px;
}

/* Logo ARCANE maior e branco */
.sidebar-header .logo {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: 2px;
}

.sidebar-header .logo-text {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

/* Badge ADMIN */
.sidebar-header .badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Backup info */
.backup-info {
    background: var(--surface-light);
    padding: 16px;
    border-radius: 8px;
}

.backup-info h4 {
    margin: 0 0 12px 0;
}

.backup-info p {
    margin: 4px 0;
    font-size: 14px;
}

/* Platform Status melhorado */
.platform-status .status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.platform-status .status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-light);
    border-radius: 8px;
    border: none;
}

.platform-status .status-item i {
    color: var(--text-muted);
    width: 20px;
}

.platform-status .status-item span:first-of-type {
    flex: 1;
}

.platform-status .status-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.platform-status .status-footer div {
    display: flex;
    gap: 6px;
}

/* Garantir texto branco no sidebar */
.sidebar,
.sidebar *,
.sidebar a,
.sidebar span,
.sidebar .nav-item a,
.sidebar .nav-item span {
    color: rgba(255, 255, 255, 0.85) !important;
}

.sidebar .nav-item.active > a,
.sidebar .nav-item.active > a * {
    color: #ffffff !important;
}

.sidebar .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.sidebar-header span:first-child {
    color: #ffffff !important;
    font-size: 26px !important;
    font-weight: 800 !important;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
}

/* MRR Chart - Estilo React */
.mrr-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    padding: 20px 10px 0;
}

.mrr-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    position: relative;
}

.mrr-bar {
    width: 50px;
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 8px 8px 0 0;
    position: absolute;
    bottom: 50px;
    transition: height 0.3s ease;
    min-height: 20px;
}

.mrr-bar:hover {
    background: linear-gradient(180deg, #a78bfa 0%, #818cf8 100%);
    transform: scaleX(1.05);
}

.mrr-label {
    position: absolute;
    bottom: 25px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.mrr-value {
    position: absolute;
    bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.mrr-chart-panel .panel-body {
    padding-bottom: 10px;
}

/* Platform Status Grid */
.platform-status .status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.platform-status .status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-light);
    border-radius: 6px;
}

.platform-status .status-item i {
    color: var(--text-muted);
    width: 16px;
}

.platform-status .status-item span:nth-child(2) {
    flex: 1;
    font-size: 13px;
}

.platform-status .status-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.platform-status .status-footer div {
    display: flex;
    gap: 4px;
}

/* MRR Chart Large */
.mrr-chart-large {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 280px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border);
}

.mrr-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    position: relative;
    max-width: 120px;
}

.mrr-bar-large {
    width: 70px;
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 10px 10px 0 0;
    position: absolute;
    bottom: 60px;
    transition: all 0.3s ease;
    min-height: 30px;
}

.mrr-bar-large:hover {
    background: linear-gradient(180deg, #a78bfa 0%, #818cf8 100%);
    transform: scaleX(1.05);
    box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.3);
}

.mrr-month {
    position: absolute;
    bottom: 30px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.mrr-amount {
    position: absolute;
    bottom: 5px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

/* Plan Revenue */
.plan-revenue {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

.plan-color {
    width: 12px;
    height: 40px;
    border-radius: 4px;
}

.plan-color.enterprise { background: var(--primary); }
.plan-color.professional { background: var(--info); }
.plan-color.starter { background: var(--secondary); }

.plan-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plan-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.plan-pct {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.plan-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.plan-card.starter { border-color: var(--secondary); }
.plan-card.professional { border-color: var(--info); }
.plan-card.enterprise { border-color: var(--primary); }

.plan-header h3 {
    margin: 0 0 8px 0;
}

.plan-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-features {
    margin: 24px 0;
    text-align: left;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features i {
    color: var(--success);
    margin-right: 8px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.closing {
    animation: fadeOut 0.2s ease;
}

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

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

.modal-container {
    background: var(--surface);
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--surface-light);
    color: var(--text);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface-light);
}

/* Mode Options */
.mode-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-option:hover {
    border-color: var(--primary);
}

.mode-option.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.mode-option .mode-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mode-option .mode-icon.success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.mode-option .mode-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.mode-option .mode-icon.warning { background: rgba(234, 179, 8, 0.15); color: var(--warning); }

.mode-option .mode-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mode-option .mode-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.mode-option input[type="radio"] {
    width: 20px;
    height: 20px;
}

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

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    min-width: 280px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-success i { color: var(--success); }

.toast-error { border-left: 4px solid var(--danger); }
.toast-error i { color: var(--danger); }

.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning i { color: var(--warning); }

.toast-info { border-left: 4px solid var(--info); }
.toast-info i { color: var(--info); }

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

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

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

/* Emergency Mode */
body.emergency-mode {
    border: 4px solid var(--danger);
}

body.emergency-mode::before {
    content: '🚨 MODO EMERGÊNCIA ATIVO';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    color: white;
    padding: 8px 24px;
    font-weight: 700;
    z-index: 99999;
    border-radius: 0 0 8px 8px;
}

/* Alert improvements */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #b45309;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

/* Lista de Isolados */
.isolated-list {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.isolated-list ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.isolated-list li {
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-xs {
    padding: 2px 8px;
    font-size: 11px;
}

/* Fix modal overlay */
.modal-overlay {
    transition: opacity 0.2s ease;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
}

.page-header p {
    margin: 0;
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

.config-item label {
    margin: 0;
    color: var(--text-muted);
}

/* File Types Grid */
.file-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.file-type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
    border: 2px solid var(--border);
}

.file-type-item.active {
    border-color: var(--success);
}

.file-type-item.warning {
    border-color: var(--warning);
}

.file-type-item i {
    font-size: 24px;
    color: var(--primary);
}

/* Integrations Grid */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.integration-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.integration-card.active {
    border-color: var(--success);
}

.integration-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.integration-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.integration-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Simulador Result */
.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

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

.result-item label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.badge.large {
    font-size: 18px;
    padding: 12px 24px;
}

.score-display {
    font-size: 48px;
    font-weight: 800;
}

.score-display.success { color: var(--success); }
.score-display.warning { color: var(--warning); }
.score-display.danger { color: var(--danger); }

.prompt-preview {
    background: var(--surface-light);
    border-radius: 8px;
    padding: 16px;
}

.prompt-preview label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.prompt-preview pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.simulador-container {
    max-width: 800px;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 4px;
    margin: -16px -24px 16px -24px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-light);
}

.modal-tab {
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

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

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

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.modal-tab-content h4 {
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Large */
.modal-lg .modal-container {
    max-width: 800px;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Page Header with Button */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header-left h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-left p {
    margin: 4px 0 0 0;
}

/* Client Name Cell */
.client-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Requests Cell with Mini Progress */
.requests-cell {
    font-size: 13px;
}

.progress-mini {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.progress-mini .progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

/* Actions Cell */
.actions-cell {
    white-space: nowrap;
}

/* Panel Actions */
.panel-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ML spacing */
.ml-2 {
    margin-left: 8px;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-item span {
    font-size: 14px;
}

/* Download Options */
.download-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.download-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.download-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.download-option i {
    font-size: 32px;
    color: var(--primary);
}

.download-option small {
    color: var(--text-muted);
}

/* Revisao */
.revisao-container h4 {
    margin: 16px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.revisao-container h4:first-child {
    margin-top: 0;
}

.revisao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.revisao-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.revisao-item label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Perfil Cliente */
.perfil-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.perfil-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.perfil-info h2 {
    margin: 0 0 8px 0;
}

.perfil-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.perfil-section h4 {
    margin: 0 0 12px 0;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.perfil-section p {
    margin: 4px 0;
}

.mr-1 {
    margin-right: 4px;
}

.mt-3 {
    margin-top: 16px;
}

/* Users List in Modal */
.users-list {
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================
   PERFIL DO CLIENTE - ESTILOS
   ============================================ */

.client-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.client-profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.client-avatar {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #1a4fd0));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.client-details h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.client-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.client-meta span {
    color: var(--text-muted);
    font-size: 14px;
}

.client-meta i {
    margin-right: 6px;
    color: var(--primary);
}

.client-profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-lg {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
}

/* Ações Rápidas */
.quick-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.quick-actions-bar .btn {
    flex: 1;
    min-width: 140px;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-outline-warning {
    background: transparent;
    border: 1px solid var(--warning);
    color: var(--warning);
}
.btn-outline-warning:hover {
    background: var(--warning);
    color: #000;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}
.btn-outline-secondary:hover {
    background: var(--text-muted);
    color: white;
}

.btn-outline-info {
    background: transparent;
    border: 1px solid var(--info);
    color: var(--info);
}
.btn-outline-info:hover {
    background: var(--info);
    color: white;
}

/* Timeline Bar */
.timeline-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.timeline-item i {
    font-size: 16px;
    color: var(--text-muted);
}

.timeline-item span {
    color: var(--text-muted);
}

.timeline-item strong {
    color: var(--text);
}

/* Grid 2 colunas */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

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

/* Usage Display */
.usage-display {
    text-align: center;
    padding: 20px;
}

.usage-numbers {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.usage-current {
    color: var(--primary);
}

.usage-separator {
    color: var(--text-muted);
    margin: 0 8px;
}

.usage-limit {
    color: var(--text-muted);
}

.usage-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.usage-pct {
    font-size: 14px;
    color: var(--text-muted);
}

/* Progress Bar */
.progress {
    height: 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-bar.warning {
    background: var(--warning);
}

.progress-bar.danger {
    background: var(--danger);
}

.progress-bar.success {
    background: var(--success);
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.module-item.active {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.module-item i {
    font-size: 20px;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
}

.module-item.active i {
    color: var(--success);
}

.module-item span:first-of-type {
    flex: 1;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-item span {
    font-size: 14px;
}

/* ============================================
   REVISÃO DE CLIENTE - ESTILOS
   ============================================ */

.revisao-container {
    padding: 0;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.wizard-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.wizard-step:last-child::after {
    display: none;
}

.wizard-step span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 1;
    margin-bottom: 8px;
}

.wizard-step.completed span {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.wizard-step.active span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wizard-step label {
    font-size: 12px;
    color: var(--text-muted);
}

.wizard-step.completed label,
.wizard-step.active label {
    color: var(--text);
}

.revisao-header {
    text-align: center;
    margin-bottom: 30px;
}

.revisao-header h3 {
    margin: 16px 0 8px;
}

.revisao-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

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

.revisao-section {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.revisao-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.revisao-section h4 i {
    color: var(--primary);
}

.revisao-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.revisao-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.revisao-item label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.revisao-item span {
    font-size: 14px;
    font-weight: 500;
}

.revisao-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #1a4fd0));
    border-radius: 12px;
    color: white;
}

.revisao-total span:first-child {
    font-size: 16px;
}

.revisao-total .valor {
    font-size: 28px;
    font-weight: 700;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.plan-card {
    padding: 20px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-card:hover {
    border-color: var(--primary);
}

.plan-card.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.plan-card h4 {
    margin: 0 0 8px 0;
}

.plan-card .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
}

/* Utilitários */
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }

.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

/* Alert boxes */
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning a {
    color: var(--warning);
    text-decoration: underline;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
}


/* ============================================
   REVISÃO MELHORADA - MODAL GRANDE
   ============================================ */

.modal-xl {
    max-width: 900px !important;
    width: 95% !important;
}

.revisao-container-lg {
    padding: 0;
}

/* Wizard Progress Melhorado */
.wizard-progress-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-dark);
    border-radius: 12px;
}

.wizard-progress-lg .wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wizard-progress-lg .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.wizard-progress-lg .wizard-step.completed .step-number {
    background: var(--success);
    color: white;
}

.wizard-progress-lg .wizard-step.active .step-number {
    background: var(--primary);
    color: white;
}

.wizard-progress-lg .step-label {
    font-size: 12px;
    color: var(--text-muted);
}

.wizard-progress-lg .wizard-step.completed .step-label,
.wizard-progress-lg .wizard-step.active .step-label {
    color: var(--text);
    font-weight: 500;
}

.wizard-connector {
    width: 60px;
    height: 3px;
    background: var(--border);
    margin: 0 10px 20px;
}

.wizard-connector.completed,
.wizard-connector.active {
    background: var(--success);
}

/* Header da Revisão */
.revisao-header-lg {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.revisao-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--success), #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.revisao-title h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
}

.revisao-title p {
    margin: 0;
    color: var(--text-muted);
}

/* Content Grid */
.revisao-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .revisao-content {
        grid-template-columns: 1fr;
    }
}

.revisao-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards de Revisão */
.revisao-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.revisao-card.highlight {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.revisao-card-header {
    padding: 14px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.revisao-card-header i {
    color: var(--primary);
}

.revisao-card-body {
    padding: 16px 20px;
}

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

.revisao-row:last-child {
    border-bottom: none;
}

.revisao-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--primary);
    border-bottom: none;
}

.revisao-row.total .revisao-label,
.revisao-row.total .revisao-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.revisao-label {
    color: var(--text-muted);
    font-size: 14px;
}

.revisao-value {
    font-weight: 500;
    text-align: right;
}

.revisao-value code {
    background: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.revisao-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* Plan Badge */
.revisao-plan-badge {
    text-align: center;
    padding: 16px 0;
}

.badge-xl {
    padding: 12px 32px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Módulos */
.revisao-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.revisao-module {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.revisao-module.active {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.revisao-module i:first-child {
    font-size: 18px;
    color: var(--text-muted);
    width: 24px;
}

.revisao-module.active i:first-child {
    color: var(--success);
}

.revisao-module span {
    flex: 1;
    font-size: 13px;
}

/* Footer */
.revisao-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.revisao-total-lg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    border-radius: 16px;
    color: white;
}

.total-label {
    font-size: 18px;
    font-weight: 500;
}

.total-value {
    font-size: 36px;
    font-weight: 700;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

/* Modal Tabs para Edição */
.modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.modal-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

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

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

.edit-tab-content {
    display: none;
}

.edit-tab-content.active {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   TIMELINE DE AUDITORIA
   ============================================ */

.timeline-audit {
    position: relative;
    padding-left: 30px;
}

.timeline-audit::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-audit-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-audit-item:last-child {
    padding-bottom: 0;
}

.timeline-audit-marker {
    position: absolute;
    left: -30px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.timeline-audit-content {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.timeline-audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.timeline-audit-date {
    font-size: 12px;
    color: var(--text-muted);
}

.timeline-audit-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-change {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
}

.audit-field {
    font-weight: 500;
    min-width: 120px;
    color: var(--text-muted);
}

.audit-old {
    color: var(--danger);
    text-decoration: line-through;
    opacity: 0.7;
}

.audit-change i {
    color: var(--text-muted);
    font-size: 10px;
}

.audit-new {
    color: var(--success);
    font-weight: 500;
}


/* ============================================
   AGENT DETAIL
   ============================================ */

.agent-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.agent-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.agent-icon.success { background: var(--success); }
.agent-icon.danger { background: var(--danger); }
.agent-icon.warning { background: var(--warning); }

.agent-info h3 {
    margin: 0 0 4px 0;
}

/* Stats Mini */
.stats-mini {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-dark);
    border-radius: 8px;
}

.stat-mini {
    flex: 1;
    text-align: center;
}

.stat-mini-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-mini-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Download Agent */
.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-option:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.download-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.download-info {
    flex: 1;
}

.download-info h4 {
    margin: 0 0 4px 0;
}

.download-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.download-size {
    font-size: 12px;
    color: var(--primary);
}

.download-option > i:last-child {
    font-size: 20px;
    color: var(--primary);
}

.download-instructions {
    padding: 16px;
    background: var(--bg-dark);
    border-radius: 8px;
}

.download-instructions h5 {
    margin: 0 0 12px 0;
}

.download-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.download-instructions li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Users List Modal */
.users-list-modal {
    max-height: 400px;
    overflow-y: auto;
}

.py-4 {
    padding-top: 24px;
    padding-bottom: 24px;
}


/* ============================================
   DOWNLOAD AGENT - LAYOUT MELHORADO
   ============================================ */

.download-agent-improved {
    padding: 10px 0;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.download-card:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.download-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}

.download-card h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.download-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.download-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
}

.download-info-box i {
    font-size: 20px;
}

/* Users List Container */
.users-list-container {
    min-height: 200px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state p {
    margin: 0;
}

/* Modal Large ajustes */
.modal-xl .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}


/* ============================================
   CLIENT SWITCHER - SELETOR DE CLIENTES
   ============================================ */

.client-switcher {
    position: relative;
}

.client-switcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.client-switcher-btn:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.client-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.client-switcher-dropdown.active {
    display: block;
}

.client-search {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.client-search input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}

.client-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.client-list {
    max-height: 300px;
    overflow-y: auto;
}

.client-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.client-item:hover {
    background: rgba(37, 99, 235, 0.1);
}

.client-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.client-status-dot.success { background: var(--success); }
.client-status-dot.warning { background: var(--warning); }
.client-status-dot.danger { background: var(--danger); }

.client-item span:nth-child(2) {
    flex: 1;
}

.client-tier {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
}

.loading-mini {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.p-2 {
    padding: 8px;
}


/* ============================================
   DOWNLOAD AGENT - TOKEN
   ============================================ */

.selected-client-info {
    padding: 12px 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
}

.selected-client-info i {
    margin-right: 8px;
}

.step-success {
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    text-align: center;
    font-size: 18px;
}

.step-success i {
    margin-right: 8px;
}

.token-display {
    margin-top: 16px;
}

.token-display label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.token-value {
    display: flex;
    gap: 8px;
    align-items: center;
}

.token-value code {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: monospace;
    word-break: break-all;
}

.command-box {
    padding: 12px 16px;
    background: #1e1e1e;
    border-radius: 8px;
    color: #4ec9b0;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
}

.token-info {
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
}

.token-info p {
    margin: 4px 0;
    color: var(--text-muted);
}

.token-info i {
    width: 20px;
    color: var(--primary);
}

.installation-steps h5 {
    margin-bottom: 12px;
}


/* ============================================
   MÓDULO AGENTS - FASE 1
   ============================================ */

.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header-flex h1 {
    margin: 0 0 4px 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.stats-grid.stats-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
    .stats-grid.stats-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grisor: pointer;
    transition: all 0.2s ease;
}

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

.stat-card.active {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.panel-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.platform-card:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.platform-card.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.platform-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 16px;
}

.platform-card h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.platform-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Selected Item */
.selected-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    border-radius: 12px;
}

.selected-item i {
    font-size: 24px;
    color: var(--primary);
}

.selected-item span {
    flex: 1;
    font-weight: 600;
}

/* Installation Summary */
.installation-summary {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span {
    color: var(--text-muted);
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Agent Actions Grid */
.agent-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-item:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.action-icon.primary { background: var(--primary); }
.action-icon.success { background: var(--success); }
.action-icon.warning { background: var(--warning); }
.action-icon.danger { background: var(--danger); }
.action-icon.info { background: var(--info); }
.action-icon.secondary { background: var(--text-muted); }

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

.action-info strong {
    font-size: 14px;
}

.action-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Wizard Container */
.wizard-container {
    padding: 0;
}

.wizard-content {
    padding: 20px 0;
}

.wizard-content h3 {
    margin-top: 0;
}

/* Reboot Confirm */
.reboot-confirm .alert {
    margin-bottom: 20px;
}


/* ============================================
   WIZARD - TELA DE REVISÃO
   ============================================ */

.review-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
}

.review-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.review-section:last-of-type {
    border-bottom: none;
}

.review-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.review-content {
    flex: 1;
}

.review-content label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.review-content strong {
    font-size: 18px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-item.full-width {
    grid-column: span 2;
}

.review-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.review-item span {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
    .review-item.full-width {
        grid-column: span 1;
    }
}


/* ============================================
   AGENT DETALHE - FASE 2
   ============================================ */

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

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

.detail-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.detail-icon.success { background: var(--success); }
.detail-icon.warning { background: var(--warning); }
.detail-icon.danger { background: var(--danger); }
.detail-icon.secondary { background: var(--text-muted); }

.detail-title h2 {
    margin: 0 0 4px 0;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-header-actions {
    display: flex;
    gap: 8px;
}

.detail-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
}

.chip i {
    color: var(--primary);
}

.detail-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.detail-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s;
}

.detail-tab:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

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

.detail-tab i {
    margin-right: 8px;
}

.detail-content {
    animation: fadeIn 0.3s ease;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row span:first-child {
    color: var(--text-muted);
}

.stats-grid.stats-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .stats-grid.stats-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Postura Cards */
.postura-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .postura-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.postura-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--border);
}

.postura-card.success { border-left-color: var(--success); }
.postura-card.warning { border-left-color: var(--warning); }
.postura-card.danger { border-left-color: var(--danger); }

.postura-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.postura-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
}

.postura-status i {
    font-size: 20px;
}

.postura-card.success .postura-status i { color: var(--success); }
.postura-card.warning .postura-status i { color: var(--warning); }
.postura-card.danger .postura-status i { color: var(--danger); }

.postura-card-body h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.postura-value {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.postura-detail {
    font-size: 12px;
    color: var(--text-muted);
}

.integrity-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.integrity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
}

/* Ações Remotas */
.acoes-categorias {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.acao-categoria h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.acao-categoria h4 i {
    margin-right: 8px;
    color: var(--primary);
}

.acoes-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.acao-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.acao-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.acao-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.acao-icon.primary { background: var(--primary); }
.acao-icon.success { background: var(--success); }
.acao-icon.warning { background: var(--warning); }
.acao-icon.danger { background: var(--danger); }
.acao-icon.info { background: var(--info); }
.acao-icon.secondary { background: var(--text-muted); }

.acao-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.acao-info strong {
    font-size: 14px;
}

.acao-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Logs Timeline */
.logs-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
    border-left: 3px solid var(--border);
}

.log-entry.info { border-left-color: var(--info); }
.log-entry.warning { border-left-color: var(--warning); }
.log-entry.danger { border-left-color: var(--danger); }

.log-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 140px;
}

.log-icon {
    font-size: 14px;
}

.log-entry.info .log-icon { color: var(--info); }
.log-entry.warning .log-icon { color: var(--warning); }
.log-entry.danger .log-icon { color: var(--danger); }

.log-message {
    flex: 1;
    font-size: 13px;
}

.command-output {
    background: #1e1e1e;
    color: #4ec9b0;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
}


/* ============================================
   MODAL AÇÕES - MELHORADO
   ============================================ */

.agent-actions-grid-improved {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-card-improved {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.action-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.action-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.action-card-content strong {
    font-size: 14px;
    font-weight: 600;
}

.action-card-content span {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 500px) {
    .agent-actions-grid-improved {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   AGENT - NOVOS ELEMENTOS
   ============================================ */

.risk-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    color: white;
}

.risk-score.success { background: var(--success); }
.risk-score.warning { background: var(--warning); color: #000; }
.risk-score.danger { background: var(--danger); }

.last-action {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Drawer lateral para postura */
.postura-drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.postura-drawer.open {
    right: 0;
}

.postura-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.postura-drawer-body {
    padding: 20px;
}

.postura-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.postura-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--text-muted);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch.active {
    background: var(--success);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
}

.toggle-switch.active::after {
    left: 26px;
}


/* ============================================
   POLICY STUDIO - ESTILOS
   ============================================ */

/* Status Bar */
.policy-status-bar {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.status-value {
    font-size: 14px;
    color: var(--text);
}

/* Policy Tabs */
.policy-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: var(--surface);
    padding: 8px;
    border-radius: 8px;
}

.policy-tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.policy-tab:hover {
    background: var(--bg);
    color: var(--text);
}

.policy-tab.active {
    background: var(--primary);
    color: white;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.overview-card .card-header {
    padding: 16px 20px;
    background: rgba(139, 92, 246, 0.1);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.overview-card .card-body {
    padding: 20px;
}

.big-stat {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 12px;
}

.big-stat.warning {
    color: var(--warning);
}

.stat-details p {
    margin: 4px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 16px;
}

/* Overview Sections */
.overview-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.overview-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Version Timeline */
.timeline {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 10px 0;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    cursor: pointer;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
}

.timeline-item.active .timeline-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-content {
    text-align: center;
    font-size: 12px;
}

.timeline-content strong {
    display: block;
    font-size: 14px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    width: 140px;
    font-size: 13px;
    color: var(--text-muted);
}

.bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar-fill {
    height: 24px;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-value {
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
}

/* Editor Layout */
.editor-layout {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 20px;
    min-height: 500px;
}

.editor-sidebar {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 14px;
}

.sidebar-list {
    max-height: 500px;
    overflow-y: auto;
}

.sidebar-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

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

.sidebar-item.selected {
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid var(--primary);
}

.sidebar-item.disabled {
    opacity: 0.5;
}

.item-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.item-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.item-count {
    color: var(--text-muted);
}

.item-pattern {
    font-size: 11px;
    margin-top: 4px;
}

.item-pattern code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Editor Main */
.editor-main {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.editor-title {
    font-weight: 600;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.editor-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Editor Preview */
.editor-preview {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.preview-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.preview-header h4 {
    margin: 0;
    font-size: 14px;
}

.preview-body {
    padding: 16px;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
}

.form-section h5 {
    margin: 0 0 12px 0;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* Tags Input */
.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.tags-input input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    min-width: 150px;
    padding: 4px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.tag i {
    cursor: pointer;
    opacity: 0.7;
}

.tag i:hover {
    opacity: 1;
}

/* PII Catalog */
.pii-catalog {
    padding: 20px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pii-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pii-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.pii-card.builtin {
    border-color: var(--border);
}

.pii-card.custom {
    border-color: var(--primary);
}

.pii-card-header {
    padding: 16px;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pii-card-header h4 {
    margin: 0;
    font-size: 16px;
}

.pii-card-body {
    padding: 16px;
}

.pii-card-body p {
    margin: 8px 0;
    font-size: 13px;
}

.pii-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* Scoring Layout */
.scoring-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.scoring-panel {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
}

.scoring-panel.full-width {
    grid-column: 1 / -1;
}

.scoring-panel h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weights-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.weight-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weight-label {
    width: 150px;
    font-size: 13px;
}

.weight-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.weight-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: var(--bg);
    border-radius: 4px;
}

.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.weight-input {
    width: 60px;
    text-align: center;
}

/* Thresholds */
.threshold-bar {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.threshold-zone {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.threshold-zone.allow {
    background: var(--success);
    color: white;
}

.threshold-zone.review {
    background: var(--warning);
    color: #000;
}

.threshold-zone.block {
    background: var(--danger);
    color: white;
}

.threshold-inputs {
    display: flex;
    gap: 20px;
}

/* Distribution Preview */
.distribution-preview {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.dist-item {
    text-align: center;
    padding: 20px 30px;
    border-radius: 8px;
    min-width: 120px;
}

.dist-item.allow {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.dist-item.review {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.dist-item.block {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dist-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.dist-item small {
    font-size: 11px;
    opacity: 0.7;
}

/* Simulator */
.simulator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.simulator-input,
.simulator-results {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
}

.simulator-options {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.simulator-options .form-group {
    flex: 1;
}

/* Simulation Result */
.simulation-result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-decision {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
}

.result-decision.success {
    background: rgba(16, 185, 129, 0.1);
}

.result-decision.warning {
    background: rgba(245, 158, 11, 0.1);
}

.result-decision.danger {
    background: rgba(239, 68, 68, 0.1);
}

.decision-badge {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-decision.success .decision-badge { color: var(--success); }
.result-decision.warning .decision-badge { color: var(--warning); }
.result-decision.danger .decision-badge { color: var(--danger); }

.result-section {
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
}

.result-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.violations-table {
    width: 100%;
    font-size: 13px;
}

.violations-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.violations-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.matched-rules .badge {
    margin-right: 8px;
    margin-bottom: 8px;
}

.sanitized-output {
    background: var(--surface);
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Audit Log */
.audit-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.audit-filters {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border-radius: 8px;
}

.audit-filters .form-group {
    margin: 0;
}

.audit-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-entry {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: 8px;
}

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

.audit-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.audit-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.audit-icon.info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.audit-content {
    flex: 1;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.audit-time {
    font-size: 12px;
    color: var(--text-muted);
}

.audit-details {
    font-size: 13px;
    color: var(--text-muted);
}

.audit-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.audit-id {
    font-family: monospace;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Actions Layout */
.actions-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.actions-panel {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
}

.actions-panel h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.decision-matrix {
    width: 100%;
    border-collapse: collapse;
}

.decision-matrix th,
.decision-matrix td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.decision-matrix th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.masking-options {
    display: flex;
    gap: 20px;
}

.masking-options .form-group {
    flex: 1;
}

/* Rollouts */
.rollouts-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rollout-current,
.rollout-history {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
}

/* Versions List */
.versions-list {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
}

.versions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.versions-header h3 {
    margin: 0;
}

.versions-actions {
    display: flex;
    gap: 8px;
}

/* Responsive */
@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 200px 1fr;
    }
    .editor-preview {
        display: none;
    }
}

@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    .simulator-layout {
        grid-template-columns: 1fr;
    }
    .scoring-layout {
        grid-template-columns: 1fr;
    }
}


/* Policy Product Selector */
.policy-product-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border-radius: 8px;
}

.product-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.product-tab {
    padding: 10px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.product-tab:hover {
    border-color: var(--primary);
}

.product-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pack-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pack-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.pack-btn {
    padding: 6px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.pack-btn:hover {
    border-color: var(--primary);
}

.pack-btn.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Built-in Rules */
.builtin-rules {
    padding: 20px;
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rules-filters {
    display: flex;
    gap: 12px;
}

.rules-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-category {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: var(--bg);
    font-weight: 600;
}

.category-header:hover {
    background: rgba(139, 92, 246, 0.05);
}

.category-header .toggle-icon {
    margin-left: auto;
    transition: transform 0.2s;
}

.category-rules {
    padding: 16px;
}

/* Custom Rules */
.custom-rules {
    padding: 20px;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.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);
    transition: 0.3s;
    border-radius: 22px;
}

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

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

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

/* Data table compact */
.data-table.compact td,
.data-table.compact th {
    padding: 8px 12px;
    font-size: 13px;
}

/* Overview card full width */
.overview-card.full-width {
    grid-column: 1 / -1;
}

/* Simulator header */
.result-header {
    margin-bottom: 12px;
}


/* ============================================
   RELATORIO EXECUTIVO - MODAL VISUAL
   ============================================ */

.modal-executive {
    max-width: 800px;
    max-height: 90vh;
}

.modal-executive .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0;
}

.relatorio-executivo {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.exec-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 20px 24px;
}

.exec-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.exec-header p {
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
}

.exec-header .exec-status {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.exec-section {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.exec-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exec-section h4 i {
    font-size: 16px;
}

/* Cards de metricas */
.exec-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.exec-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.exec-card-label {
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.exec-card-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.exec-conclusion {
    margin-top: 15px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 13px;
    color: #166534;
    border-left: 3px solid #10b981;
}

/* Duas colunas */
.exec-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.exec-col h4 {
    margin-bottom: 12px;
}

/* Checklists */
.exec-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exec-checklist li {
    padding: 6px 0;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exec-checklist li i {
    font-size: 12px;
}

/* Modulos */
.exec-modules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exec-modules li {
    padding: 6px 0;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exec-modules li small {
    color: #9ca3af;
    font-size: 11px;
}

.module-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.module-status.active {
    background: #10b981;
}

.module-status.inactive {
    background: #d1d5db;
}

/* Risco */
.exec-risk {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.exec-risk-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
}

.exec-risk-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.exec-risk-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.exec-risk-fill.low {
    background: #10b981;
}

.exec-risk-fill.medium {
    background: #f59e0b;
}

.exec-risk-fill.high {
    background: #ef4444;
}

/* Compliance */
.exec-compliance-status {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.exec-note {
    margin-top: 10px;
    color: #6b7280;
}

/* Recomendacoes */
.exec-recommendations {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exec-recommendations li {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #fffbeb;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exec-recommendations li i {
    color: #f59e0b;
}

/* Cores de texto */
.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }
.text-primary { color: #6366f1 !important; }
.text-info { color: #06b6d4 !important; }

/* Responsive */
@media (max-width: 768px) {
    .exec-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .exec-two-cols {
        grid-template-columns: 1fr;
    }
    .modal-executive {
        max-width: 95%;
    }
}

/* Relatorio Executivo v3.0 - Ajustes Premium */
.exec-actions {
    margin-top: 15px;
    padding: 10px 15px;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 13px;
    border-left: 3px solid #10b981;
}

.exec-optional-title {
    font-size: 11px;
    color: #6b7280;
    margin: 10px 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exec-risk-note {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Relatorio Executivo v3.5 - Modo Compacto/Expandido */
.exec-compliance-checks {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.exec-compliance-checks span {
    font-size: 12px;
    color: #374151;
}

.exec-compliance-checks i {
    margin-right: 4px;
    font-size: 11px;
}

.exec-toggle-section {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #eee;
}

.exec-toggle-btn {
    font-size: 12px;
    padding: 6px 16px;
}

.exec-toggle-btn i {
    margin-right: 5px;
}

.exec-expanded {
    animation: fadeIn 0.3s ease;
}

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

.exec-ambiente-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.exec-ambiente-grid span {
    font-size: 12px;
    color: #374151;
}

.exec-ambiente-grid i {
    margin-right: 5px;
    font-size: 10px;
}

.exec-capacidades-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exec-cap-item {
    font-size: 11px;
    padding: 4px 10px;
    background: #f0fdf4;
    border-radius: 12px;
    color: #166534;
}

.exec-cap-item i {
    margin-right: 4px;
    font-size: 10px;
}

/* Opcionais - discreto */
.exec-opcionais {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.exec-opcionais-label {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exec-opcional-item {
    font-size: 11px;
    color: #9ca3af;
}

.exec-conclusao {
    text-align: center;
    padding: 10px 20px;
    background: #f9fafb;
    border-top: 1px solid #eee;
}

.exec-conclusao small {
    font-size: 11px;
}

/* Hierarquia de botoes */
.modal-footer .btn-light {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #6b7280;
}

.modal-footer .btn-light:hover {
    background: #e5e7eb;
}

/* ============================================
   COMPLIANCE MODULE v2.0 - Organização Comercial
   ============================================ */

.compliance-section {
    margin-bottom: 30px;
}

.compliance-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.compliance-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compliance-section-header .badge {
    font-size: 10px;
    padding: 4px 10px;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* Report Cards */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.report-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.report-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.report-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.report-card-icon.green { background: #dcfce7; color: #166534; }
.report-card-icon.blue { background: #dbeafe; color: #1e40af; }
.report-card-icon.purple { background: #ede9fe; color: #5b21b6; }
.report-card-icon.orange { background: #ffedd5; color: #c2410c; }
.report-card-icon.teal { background: #ccfbf1; color: #0d9488; }
.report-card-icon.gray { background: #f3f4f6; color: #4b5563; }

.report-card-info h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.report-card-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.report-card-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #4b5563;
}

.report-card-badge.success {
    background: #dcfce7;
    color: #166534;
}

.report-card-badge.premium {
    background: #ede9fe;
    color: #5b21b6;
}

/* Premium Cards */
.report-card-premium {
    opacity: 0.85;
    position: relative;
}

.report-card-premium:hover {
    opacity: 1;
}

.report-card-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #9ca3af;
}

/* Premium Sections */
.compliance-premium {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.compliance-intelligence {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

/* CTA Upgrade */
.compliance-cta {
    margin-top: 30px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 12px;
    padding: 25px;
}

.compliance-cta-content {
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.compliance-cta-content > i {
    font-size: 40px;
    color: #a5b4fc;
}

.compliance-cta-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.compliance-cta-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

.compliance-cta-content .btn {
    margin-left: auto;
    white-space: nowrap;
}

/* Agendamentos */
.agendamento-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 15px;
}

.agendamento-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.agendamento-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.agendamento-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.agendamento-status {
    margin-left: auto;
}

.agendamento-empty {
    text-align: center;
    padding: 30px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

.agendamento-empty p {
    margin: 10px 0;
    color: #6b7280;
    font-size: 13px;
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.config-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border-radius: 8px;
}

.config-status i {
    font-size: 20px;
    margin-top: 2px;
}

.config-status-warning {
    background: #fef3c7;
    color: #92400e;
}

.config-status-warning i {
    color: #f59e0b;
}

.config-status strong {
    display: block;
    margin-bottom: 3px;
}

.config-status p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

/* Premium Features in Modal */
.premium-features {
    text-align: left;
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
}

.premium-features p {
    margin: 8px 0;
    font-size: 13px;
}

.premium-features i {
    margin-right: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
}

/* ========================================
   SEGURANÇA / mTLS - Estilos
   ======================================== */

/* Overview Card */
.security-overview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.security-overview.status-ok {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.security-overview.status-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.overview-icon {
    font-size: 3rem;
}

.overview-text h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.overview-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.security-overview .btn-outline {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
}

.security-overview .btn-outline:hover {
    background: rgba(255,255,255,0.3);
}

/* Security Cards Grid */
.security-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.security-card {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border-left: 4px solid transparent;
}

.security-card.card-ok {
    border-left-color: #10b981;
}

.security-card.card-error {
    border-left-color: #ef4444;
}

.security-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--header-bg, #f9fafb);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.security-card .card-icon {
    font-size: 1.25rem;
}

.security-card .card-title {
    font-weight: 600;
    flex: 1;
}

.security-card .card-body {
    padding: 1rem;
}

.security-card .card-footer {
    padding: 0.75rem 1rem;
    background: var(--header-bg, #f9fafb);
    border-top: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-muted, #6b7280);
    font-size: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-muted, #6b7280);
    font-size: 0.875rem;
}

.info-row .value {
    font-weight: 500;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #7c3aed);
}

.stat-label {
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-total {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}

/* Security Section */
.security-section {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.security-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary, #111827);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #6b7280);
}

.empty-state p {
    margin: 0 0 0.5rem 0;
}

/* Architecture Diagram */
.architecture-diagram {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.architecture-diagram pre {
    margin: 0;
    color: #cdd6f4;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Device Type Badge */
.device-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.device-type.agent {
    background: #dbeafe;
    color: #1d4ed8;
}

.device-type.appliance {
    background: #fef3c7;
    color: #92400e;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
    .security-overview {
        flex-direction: column;
        text-align: center;
    }
    
    .security-overview .btn-outline {
        margin-left: 0;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
}

/* Security Banner */
.security-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.security-banner.banner-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.security-banner.banner-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.security-banner .banner-icon {
    font-size: 2.5rem;
}

.security-banner .banner-content {
    flex: 1;
}

.security-banner .banner-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
}

.security-banner .banner-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.security-banner .btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
}

.security-banner .btn:hover {
    background: rgba(255,255,255,0.3);
}

.stat-card.card-error {
    border-left: 4px solid var(--danger, #ef4444);
}

.architecture-box pre {
    white-space: pre;
    overflow-x: auto;
}

/* Diagrama de Arquitetura - Versão Moderna */
.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d3f 100%);
    border-radius: 12px;
    color: #cdd6f4;
}

.arch-server {
    background: #313244;
    border: 2px solid #45475a;
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.arch-server-title {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #cba6f7;
}

.arch-ports {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.arch-port {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.arch-port-number {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.arch-port-number.https { color: #a6e3a1; }
.arch-port-number.mtls { color: #89b4fa; }

.arch-port-status {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.arch-port-items {
    font-size: 0.75rem;
    color: #a6adc8;
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.arch-port-items li {
    padding: 0.25rem 0;
}

.arch-arrows {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 500px;
}

.arch-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6c7086;
}

.arch-arrow-line {
    width: 2px;
    height: 30px;
    background: #6c7086;
}

.arch-arrow-head {
    font-size: 1.25rem;
}

.arch-clients {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 500px;
}

.arch-client {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arch-client-icon {
    font-size: 2rem;
}

.arch-client-label {
    font-size: 0.875rem;
    color: #a6adc8;
}
