* {
    box-sizing: border-box;
}

html {
    font-family: system-ui, sans-serif;
}

body {
    margin: 0;
}
.table-wrap { overflow:auto; max-width:100%; max-height:540px; }
.table-wrap table { min-width:850px; }
.table-wrap td { overflow-wrap:anywhere; max-width:300px; vertical-align:middle; }
.filters { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin:24px 0; }
.filters label { display:grid; gap:6px; flex:1 1 220px; min-width:0; margin-bottom:0; }
.filters > .btn, .filters > a.btn { align-self:end; height:44px; min-height:44px; margin-bottom:0; }
.filters label:has(textarea) { flex-basis:100%; }
.filters input[type=checkbox] { width:24px; height:24px; min-height:24px; }
.detail-grid { display:grid; grid-template-columns:200px minmax(0,1fr); gap:14px 20px; margin:24px 0; }
.detail-grid dd, .wrap-anywhere { overflow-wrap:anywhere; }
#kt_app_content > .card + .card { margin-top:24px; }
@media(max-width:767px) { .detail-grid { grid-template-columns:minmax(0,1fr); gap:6px; } }
.foundation-footer { margin-top: 32px; }
.siem-foundation .full-logo { width: 132px; height: auto; }
.siem-foundation .sidebar .full-logo { width: 116px; }
.siem-foundation .header { flex-wrap: wrap; height: auto; min-height: 70px; padding-top: 12px; padding-bottom: 12px; }
.siem-foundation .header .btn.theme-toggle { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0 !important; flex: none; }
.siem-foundation .header .theme-toggle svg { display: block; width: 20px; height: 20px; }
.siem-foundation .header .theme-toggle svg[hidden] { display: none; }
.siem-prototype .password-row .form-control { padding-right: 58px; }
.siem-prototype .password-row .password-toggle { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; background: transparent; }
.siem-prototype .password-row .password-toggle:is(:hover,:focus,:active) { background: var(--siem-soft) !important; }
.siem-prototype .password-row .password-toggle svg { display: block; width: 20px; height: 20px; }
.siem-prototype .password-row .password-toggle svg[hidden] { display: none; }
#nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 19; }
@media (max-width:991px) {
  .siem-foundation .sidebar.foundation-nav-open { display:flex; transform: translateX(0); }
  .siem-foundation .header { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .siem-foundation .header .identity { flex: 1 1 180px; }
  .siem-foundation .header .actions { margin-left: auto; }
}

.auth-form{display:grid;gap:12px;margin:20px 0}.auth-key{display:block;overflow-wrap:anywhere;padding:16px;font-size:1.1rem}.auth-help{max-width:560px;margin:16px auto;font-size:12px}.auth-form input[type=checkbox]{width:auto;min-height:0}.auth-qr{display:grid;justify-items:center;gap:8px;margin:16px auto;padding:16px;width:max-content;max-width:100%;border:1px solid var(--border,#dce3ef);border-radius:12px;background:#fff;color:#14213d}.auth-qr img{display:block;width:min(240px,65vw);height:auto;image-rendering:pixelated}.auth-qr span{font-size:.9rem;font-weight:600;text-align:center;overflow-wrap:anywhere}.auth-manual-key{margin:16px 0}.auth-manual-key summary{cursor:pointer;font-weight:600}

.query-filters { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin:20px 0; }
.query-filters label { display:grid; gap:6px; flex:1 1 200px; min-width:0; }
.query-advanced { flex-basis:100%; }
.query-advanced summary { cursor:pointer; padding:12px; }
.query-table { overflow-x:auto; max-width:100%; }
.query-table table { min-width:850px; }
.query-table td { overflow-wrap:anywhere; max-width:300px; }
.query-data dd { overflow-wrap:anywhere; }
.query-context { font-size: 12px; color: var(--siem-muted); }
.context-heading { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; color:var(--bs-gray-900); }
.context-heading .ki-outline { font-size:20px; color:var(--siem-muted); }
.context-heading .badge { margin-left:auto; }
.context-details summary { cursor:pointer; padding:8px 0; color:var(--siem-action); }
.context-details[open] summary { margin-bottom:8px; }
.context-details p:last-child { margin-bottom:0; }
.context-card, .section-actions { margin-top:24px; }
.page-back { margin-bottom:24px; }
.two-col > .card .query-data { grid-template-columns:minmax(140px,.7fr) minmax(0,1fr); }
.query-context + .notice { margin-top:16px; margin-bottom:0; }
.header .identity { flex:1 1 auto; }
.header .actions { order:3; flex:none; }
.siem-foundation .sidebar nav, .siem-foundation .sidebar .bottom { flex-shrink:0; }
.siem-foundation .sidebar .ki-outline { width:21px; flex:none; text-align:center; }
.siem-foundation .sidebar .nav-pending, .siem-foundation .sidebar .nav-logout { display:flex; align-items:center; gap:12px; width:100%; min-height:46px; padding:12px 14px; border:0; border-radius:10px; background:transparent; color:var(--siem-nav-text); font-size:14px; font-weight:400; text-align:left; }
.siem-foundation .sidebar .nav-pending small { margin-left:auto; font-size:10px; white-space:nowrap; }
.siem-foundation .sidebar .nav-pending { color:#b5bfd0; }
.siem-foundation .sidebar .nav-logout:hover { background:var(--siem-nav-hover); }
.siem-foundation .sidebar .nav-logout { justify-content:flex-start; }
.query-filters .form-control { min-width:0; }
.query-filters > label > .form-control, .query-filters > label > .form-select,
.query-filters .period-inputs .form-control { height:44px; min-height:44px; box-sizing:border-box; }
.query-filters > .filter-submit { height:44px; min-height:44px; transform:translateY(-8px); display:inline-flex; align-items:center; justify-content:center; }
.query-filters .filter-actions .btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
.query-table .btn { white-space:nowrap; }
.overview-period label { flex-basis:240px; }
.source-table { table-layout:fixed; white-space:normal; }
.source-table th:nth-child(1) { width:28%; }
.source-table th:nth-child(2) { width:20%; }
.source-table th:nth-child(3) { width:30%; }
.source-table th:nth-child(4) { width:22%; }
.source-table td, .source-table th { padding-inline:8px; overflow-wrap:anywhere; }
.source-table td:first-child, .source-table th:first-child { padding-left:0; }
.source-table td:last-child, .source-table th:last-child { padding-right:0; }
.context-heading .ki-outline:empty { display:none; }
.event-filters { margin:20px 0 0; }
.event-filters .filter-grid { grid-template-columns:minmax(350px,1.7fr) repeat(2,minmax(0,1fr)); align-items:end; }
.event-filters .period-field { order:-1; border:0; margin:0; padding:0; min-width:0; }
.period-field legend { float:none; width:auto; font-size:14px; font-weight:500; margin:0 0 8px; }
.period-inputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.period-inputs label { font-size:12px; margin:0; color:var(--siem-muted); }
.query-advanced { border-top:1px solid var(--siem-surface-edge); margin-top:24px; padding-top:16px; }
.query-advanced summary { color:var(--siem-action); cursor:pointer; padding:10px 0; }
.query-advanced summary .ki-outline { vertical-align:middle; margin:0 6px; font-size:18px; }
.event-filters .advanced-fields { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:16px; }
.filter-actions { align-items:center; }
.event-filters + p { font-size:12px; color:var(--siem-muted); padding-bottom:18px; border-bottom:1px solid var(--siem-surface-edge); overflow-wrap:anywhere; }
.query-table { max-height:540px; overflow:auto; position:relative; margin-top:16px; }
.query-table table { min-width:1050px; margin:0; }
.query-table thead { position:sticky; top:0; z-index:1; background:var(--bs-body-bg); }
.query-table td, .query-table th { padding-inline:14px; }
.query-table td { vertical-align:middle; }
.query-table td:last-child, .query-table th:last-child { text-align:right; }
.query-data { display:grid; grid-template-columns:200px minmax(0,1fr); gap:14px 20px; margin:24px 0; }
.query-data dt { color:var(--siem-muted); font-weight:500; }
.query-data dd { margin:0; overflow-wrap:anywhere; }
.query-data + h2 { padding-top:24px; border-top:1px solid var(--siem-surface-edge); }
nav[aria-label="Paginação"] { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding-top:20px; margin-top:20px; border-top:1px solid var(--siem-surface-edge); }
nav[aria-label="Paginação"] > p { width:100%; font-size:12px; color:var(--siem-muted); margin:0; }
.table-region { max-height:540px; }
@media (max-width:1399px) {
  .event-filters .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .event-filters .period-field { grid-column:1 / -1; }
}
@media (max-width:767px) {
  .siem-foundation .header { flex-wrap:nowrap; }
  .event-filters .filter-grid, .event-filters .advanced-fields { grid-template-columns:minmax(0,1fr); }
  .period-inputs { grid-template-columns:minmax(0,1fr); }
  .query-data { grid-template-columns:minmax(0,1fr); gap:6px; }
  .two-col > .card .query-data { grid-template-columns:minmax(0,1fr); }
  .query-data dd { margin-bottom:14px; }
  .siem-foundation .header .identity { flex:1 1 auto; }
  .header .monitor-summary { display:none; }
  .query-filters > button { width:100%; }
  .query-filters > .filter-submit { transform:none; }
}

.rules-table { min-width:1120px !important; }
.rule-configure { min-width:112px; white-space:nowrap; }
.rule-dialog { width:min(660px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:min(90vh,860px); padding:0; overflow:auto; border:1px solid var(--siem-surface-edge); border-radius:16px; background:var(--bs-body-bg); color:var(--bs-gray-900); box-shadow:0 24px 70px rgba(8,20,45,.28); }
.rule-dialog::backdrop { background:rgba(12,20,35,.56); backdrop-filter:blur(2px); }
.rule-dialog-content { padding:26px; }
.rule-dialog-header { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px; }
.rule-dialog-header h2 { margin:5px 0 4px; }
.rule-dialog-x { width:42px; min-width:42px; height:42px; padding:0; font-size:24px; line-height:1; }
.rule-contract { padding:14px 16px; border:1px solid var(--siem-surface-edge); border-radius:10px; background:var(--siem-soft); color:var(--siem-muted); font-size:13px; }
.rule-modal-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; }
.rule-modal-fields label { display:grid; gap:7px; margin:0; font-size:13px; font-weight:600; }
.rule-dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:26px; padding-top:20px; border-top:1px solid var(--siem-surface-edge); }

.health-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
.health-stat { display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-height:148px; padding:20px 22px; }
.health-stat-label { color:var(--siem-muted); font-size:13px; }
.health-stat-value { color:var(--bs-gray-900); font-size:28px; line-height:1.2; font-variant-numeric:tabular-nums; }
.health-stat-value span { color:var(--siem-muted); font-size:17px; font-weight:500; }
.health-stat-time { color:var(--bs-gray-900); font-size:19px; line-height:1.3; overflow-wrap:anywhere; }
.health-stat small { margin-top:auto; font-size:12px; }
.health-state { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:5px 9px; border-radius:7px; font-size:12px; font-weight:650; white-space:nowrap; }
.health-stat .health-state { font-size:17px; padding:6px 10px; }
.state-ok { background:var(--siem-success-bg); color:var(--siem-success); }
.state-delayed { background:var(--siem-warning-bg); color:var(--siem-warning); }
.state-unavailable { background:var(--siem-danger-bg); color:var(--siem-danger); }
.state-unknown { background:var(--siem-soft); color:var(--siem-muted); }
.health-local { display:flex; align-items:center; gap:14px; margin-bottom:18px; padding:18px 22px; }
.health-local-icon { display:grid; place-items:center; width:44px; min-width:44px; height:44px; border-radius:12px; background:var(--siem-soft); color:var(--siem-action); }
.health-local-icon .ki-outline { font-size:21px; }
.health-local-copy { min-width:0; flex:1; }
.health-local-copy h2 { margin:0 0 5px; font-size:15px; }
.health-local-copy p { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; margin:0; color:var(--siem-muted); font-size:12px; }
.health-local-error { max-width:240px; overflow-wrap:anywhere; color:var(--siem-muted); font-size:12px; text-align:right; }
.health-progress { padding:24px; }
.health-section-head { align-items:flex-start; margin-bottom:14px; }
.health-section-head h2 { margin:0 0 4px; }
.health-section-head p { margin:0; }
.health-table { min-width:1120px !important; }
.health-table td { line-height:1.55; }
.health-empty { display:flex; align-items:center; gap:10px; margin-top:14px; padding:15px; border-radius:10px; background:var(--siem-soft); color:var(--siem-muted); font-size:13px; }
.health-empty .ki-outline { color:var(--siem-action); font-size:19px; }
.health-limits { margin-top:17px; padding-top:14px; border-top:1px solid var(--siem-surface-edge); }
.health-limits summary { color:var(--siem-action); cursor:pointer; font-weight:600; }
.health-limits ul { display:grid; gap:7px; margin:12px 0 0; padding-left:20px; color:var(--siem-muted); font-size:12px; }
.health-provenance { margin:18px 2px 0; color:var(--siem-muted); font-size:11px; }
.health-provenance span { margin:0 5px; }

@media (max-width:1199px) {
  .health-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .health-overview { grid-template-columns:minmax(0,1fr); }
  .health-stat { min-height:126px; }
  .health-local { align-items:flex-start; flex-wrap:wrap; }
  .health-local-copy { flex-basis:calc(100% - 64px); }
  .health-local-error { width:100%; max-width:none; padding-left:58px; text-align:left; }
  .health-section-head { flex-direction:column; }
  .rule-dialog-content { padding:20px; }
  .rule-modal-fields { grid-template-columns:minmax(0,1fr); }
  .rule-dialog-actions > .btn { flex:1 1 100%; }
}

