/* Advantage Log Portal v4.1.1 — Aurora visual polish.
   Safe additive UI layer; never changes backend logic or data.
   Draws only actual collector data, no fabricated alert counts or trends. */
:root {
  --v411-cyan: #16dbfc;
  --v411-cyan-soft: rgba(24, 213, 249, .12);
  --v411-cyan-border: rgba(38, 183, 242, .34);
  --v411-space: clamp(18px, 1.75vw, 30px);
}
body { font-size: 15px; line-height: 1.55; }
body[data-page]:not([data-page="login"]) {
  background-image:radial-gradient(ellipse at 88% -8%,rgba(0,135,234,.14),transparent 36%),
    radial-gradient(ellipse at 15% 117%,rgba(0,162,228,.10),transparent 43%),
    repeating-linear-gradient(0deg,transparent 0px,transparent 63px,rgba(44,128,168,.014) 64px),
    linear-gradient(170deg,#061321,#031322 65%,#03101e);
}
html[data-theme="light"] body[data-page]:not([data-page="login"]) {
  background-image:radial-gradient(ellipse at 90% 0%,rgba(15,165,220,.12),transparent 44%),linear-gradient(145deg,#edf6fa,#f5f9fc);
}
/* Use the WHOLE screen even with unusual browser zoom and ultrawide displays. */
.app-shell { grid-template-columns:258px minmax(0,1fr); }
.main-area { min-width:0;width:100%; }
.container {
  max-width:none!important;
  width:calc(100% - clamp(32px,3.3vw,104px))!important;
  margin:clamp(20px,1.5vw,30px) auto 60px!important;
}
.sidebar {padding:21px 14px 16px;border-right-color:rgba(25,191,250,.33);}
.brand {padding:7px 13px 25px;}
.brand-main {font-size:12px;letter-spacing:.23em;}
.brand-product {font-size:27px;}
.version-badge {font-size:11px;padding:5px 10px;}
.nav-section-title {font-size:10px;margin-top:25px;margin-bottom:10px;}
.nav-link {font-size:14px;min-height:44px;gap:12px;padding:10px 13px;border-radius:10px;}
.nav-icon {height:21px;width:21px;}
.sidebar-bottom {padding:15px 12px;}
.signed-in,.signout-link {font-size:12px;}
.signed-user {font-size:13px;}
.topbar {min-height:96px;padding:17px clamp(21px,2.1vw,44px);gap:17px;}
.topbar::before {content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,transparent 10%,rgba(5,216,251,.54),transparent 80%);pointer-events:none;}
.page-heading {font-size:clamp(24px,1.8vw,36px);letter-spacing:-.04em;}
.page-subtitle {font-size:13px;color:#b1cada;margin-top:6px;}
.v41-global-search {width:clamp(260px,23vw,520px);height:44px;border-radius:11px;}
.v41-global-search input {font-size:13px;}
.v41-icon-button,.theme-button,.v41-avatar,.v411-type-toggle {height:43px;min-width:43px;}
.theme-button,.v411-type-toggle {font-size:12px;}
.v411-type-toggle {display:inline-flex;gap:8px;align-items:center;justify-content:center;white-space:nowrap;padding:0 13px;border:1px solid rgba(65,171,224,.38);border-radius:10px;color:#d9f4ff;background:rgba(4,35,58,.83);font-weight:750;cursor:pointer;}
.v411-type-toggle:hover,.v411-type-toggle[aria-pressed="true"] {border-color:rgba(30,228,253,.7);background:rgba(7,112,161,.3);}
.v411-type-toggle span:first-child {font-weight:900;font-size:15px;letter-spacing:-.06em;color:#27dbf9;}
.v41-avatar {font-size:13px;}
/* Consistent panels and roomier typography across all routes. */
.card,.log-insight,.explorer-context {border-radius:15px;border-color:var(--v411-cyan-border);box-shadow:0 13px 38px rgba(0,7,19,.22),inset 0 1px rgba(143,220,255,.035);}
.card {position:relative;}
.card-header,.explorer-head {min-height:68px;padding:19px 24px;}
.card-title {font-size:17px;font-weight:830;letter-spacing:-.018em;}
.v41-card-subtitle {font-size:12px;}
.v41-card-glyph {font-size:21px;width:28px;height:28px;}
.v41-header-action,.v41-toolbar-button {font-size:13px;}
.card-body {padding:23px 25px;}
.button {font-size:13px;min-height:42px;padding:11px 16px;}
.button.secondary {border-color:rgba(75,165,216,.48);}
label {font-size:12px;letter-spacing:.035em;}
input:not([type="checkbox"]):not([type="radio"]),select,textarea {font-size:13px;min-height:44px;padding:11px 13px;}
.muted {line-height:1.52;}
.flash,.alert,.flash-error,.explorer-banner {font-size:13px;line-height:1.5;}
th {font-size:11px;color:#b5dbf0;background:rgba(30,87,125,.46);letter-spacing:.065em;}
td {font-size:13px;line-height:1.5;}
th,td {padding:13px 15px;}
table {font-variant-numeric:tabular-nums;}
.severity-badge,.health-badge,.device-status,.status {font-size:11px;line-height:1.25;padding:4px 9px;}
/* Dashboard typography, luminous accents, and wider real-data visualizations. */
.v41-page-toolbar {font-size:12px;margin-bottom:21px;}
.v41-eyebrow {font-size:12px;}
.v41-dashboard .stats-grid {gap:15px;margin-bottom:22px;}
.v41-dashboard .stat-card {min-height:161px;padding:23px 21px 20px;background:radial-gradient(circle at 90% 105%,rgba(4,149,228,.12),transparent 67%),linear-gradient(150deg,#12344e,#0b2338 92%);border-color:rgba(27,176,240,.42);}
.v41-dashboard .stat-card::before {content:"";position:absolute;inset:0 0 auto;height:2px;background:linear-gradient(90deg,currentColor,transparent 78%);opacity:.65;}
.v41-dashboard .stat-card::after {width:160px;height:160px;right:-50px;bottom:-77px;opacity:.11;}
.v41-dashboard .stat-label {font-size:11px;font-weight:800;letter-spacing:.06em;color:#b7d7ea;}
.v41-dashboard .stat-value {font-size:clamp(23px,1.66vw,37px);margin-top:14px;letter-spacing:-.045em;}
.v41-kpi-icon {font-size:32px;opacity:.92;}
.v41-kpi-desc {font-size:12px;color:#a2c2d5;margin-top:13px;}
.v41-dash-analytics {grid-template-columns:minmax(0,1.54fr) minmax(355px,1fr);gap:21px;margin-bottom:21px;}
.v41-dash-bottom {grid-template-columns:minmax(330px,.88fr) minmax(0,1.5fr);gap:21px;}
.v41-chart-body {padding:22px 26px 21px;}
.v41-chart-summary {gap:15px;margin-bottom:19px;}
.v41-chart-summary strong {font-size:35px;}
.v41-chart-summary span {font-size:13px;}
.v41-volume-chart {height:250px;min-height:250px;gap:4px;}
.v41-volume-bar {width:min(100%,30px);box-shadow:0 0 14px rgba(19,208,253,.22);}
.v41-volume-axis {font-size:12px;padding-top:12px;}
.v41-severity-body {min-height:346px;gap:24px;padding:27px;}
.v41-donut {width:clamp(155px,11vw,225px);height:clamp(155px,11vw,225px);filter:drop-shadow(0 0 14px rgba(9,176,227,.11));}
.v41-donut-center strong {font-size:clamp(18px,1.3vw,28px);}
.v41-donut-center span {font-size:12px;}
.v41-legend-row {font-size:12px;gap:12px;padding:10px 0;}
.v41-top-sources .source-list {padding:11px 22px 20px;}
.v41-top-sources .source-row {padding:14px 0;gap:17px;}
.v41-source-info .source-title {font-size:13px;}
.v41-source-info .source-ip-link {font-size:12px;}
.v41-progress-track {height:12px;}
.v41-source-progress-info {font-size:11px;margin-top:9px;}
.v41-recent-events .events-table-wrapper {max-height:545px;}
.v41-recent-events table {font-size:13px;min-width:710px;}
.v41-recent-events .v41-time-cell {font-size:12px;}
.v41-recent-events .v41-ip {font-size:12px;}
.v41-recent-events th:nth-child(1) {width:172px;}
.v41-recent-events th:nth-child(2) {width:115px;}
.v41-recent-events th:nth-child(3) {width:182px;}
.v41-event-msg {font-size:12px;}
/* Logs: filters that stay legible, even with deep source names. */
.log-insight-row {gap:17px;margin-bottom:20px;}
.log-insight {min-height:120px;padding:22px 23px;}
.log-insight small {font-size:12px;}
.log-insight strong {font-size:30px;}
.log-insight>span {font-size:12px;}
.explorer-card {margin-bottom:20px;}
.explorer-head h2 {font-size:18px;}
.explorer-form {padding:23px 25px;}
.explorer-grid {gap:17px;}
.explorer-grid label {font-size:12px;}
.explorer-caption {font-size:12px;max-width:1180px;}
.explorer-actions {gap:10px;margin-top:20px;}
.v41-quick-filters {margin-bottom:20px;gap:10px;}
.v41-quick-label {font-size:12px;}
.v41-filter-chip {min-height:37px;padding:8px 15px;font-size:12px;}
.explorer-results .topline {padding:19px 25px;}
.explorer-results h2 {font-size:18px;}
.explorer-table-wrap {max-height:min(76vh,1100px);}
.explorer-table {font-size:13px;}
.explorer-table th {font-size:11px;padding:14px;}
.explorer-table td {font-size:13px;padding:13px 14px;}
.explorer-table .mono {font-size:12px;}
.explorer-table .preview {max-width:none;line-height:1.5;}
.explorer-pager {padding:18px 24px;}
.detail-panel {width:min(760px,100%);}
.detail-head {padding:22px 26px;}
.detail-head h2 {font-size:23px;}
.detail-meta div div {font-size:14px;}
.detail-meta small {font-size:11px;}
.detail-message {font-size:14px;line-height:1.75;}
/* Device and System Health pages: same visual fidelity as the dashboard. */
.sources-grid {gap:20px;}
.source-card {padding:23px;}
.source-card .source-name {font-size:20px;}
.source-card .source-ip {font-size:14px;}
.source-card .metric-label,.statistics-grid .stat-label {font-size:11px;}
.source-card .metric-value,.statistics-grid .stat-value {font-size:clamp(21px,1.55vw,29px);}
.source-card .metric {padding:12px;}
.source-card .source-actions .button {font-size:12px;}
.profile-header {padding:25px 29px;}
.profile-name {font-size:clamp(25px,1.85vw,34px);}
.profile-ip {font-size:15px;}
.statistics-grid {gap:17px;}
.statistics-grid .stat-card {min-height:133px;padding:21px;border-radius:13px;}
.profile-grid>.card {min-width:0;}
.activity-bars {height:205px;min-height:205px;}
.activity-label {font-size:11px;}
.health-summary {gap:17px;margin-bottom:21px;}
.summary-card {min-height:130px;padding:22px;}
.summary-label {font-size:11px;}
.summary-value {font-size:clamp(21px,1.7vw,31px);}
.health-grid {gap:20px;}
.health-card .card-header {min-height:66px;}
.overall-banner {font-size:15px;padding:23px 26px;margin-bottom:23px;border-radius:14px;}
.resource-bar,.severity-track {height:11px;}
/* Retention, alerts and admin pages — forms and routes unmodified. */
.retention-stat {border-radius:12px;}
.retention-stat-value {font-size:clamp(19px,1.4vw,27px);}
.retention-confirm,.retention-info {border-radius:12px;padding:18px;}
.retention-grid {gap:18px;}
.login-card {border-radius:18px;}
.login-button {font-size:15px;}
.portal-clean-footer-inner {max-width:none;width:calc(100% - 60px);}
/* Intentional type-size setting, saved on each browser. */
html.v411-type-large body {font-size:17px;}
html.v411-type-large .nav-link {font-size:16px;}
html.v411-type-large .page-subtitle {font-size:15px;}
html.v411-type-large .card-title {font-size:19px;}
html.v411-type-large .v41-card-subtitle {font-size:14px;}
html.v411-type-large .v41-dashboard .stat-label {font-size:13px;}
html.v411-type-large .v41-dashboard .stat-value {font-size:clamp(26px,1.85vw,42px);}
html.v411-type-large .v41-kpi-desc,html.v411-type-large .v41-source-info .source-title {font-size:14px;}
html.v411-type-large td,html.v411-type-large .explorer-table td {font-size:15px;}
html.v411-type-large th,html.v411-type-large .explorer-table th {font-size:13px;}
html.v411-type-large .button,html.v411-type-large .v41-filter-chip {font-size:15px;}
html.v411-type-large .v41-source-progress-info {font-size:13px;}
html.v411-type-large .v41-recent-events .v41-time-cell,html.v411-type-large .explorer-table .mono {font-size:13px;}
html.v411-type-large .v41-global-search input {font-size:15px;}
html.v411-type-large input:not([type="checkbox"]):not([type="radio"]),html.v411-type-large select,html.v411-type-large textarea {font-size:15px;}
html.v411-type-large .severity-badge {font-size:12px;}
/* Responsive presentation: only break the grid when it truly needs to. */
@media (min-width:2300px) {
  .v41-dashboard .stats-grid {gap:20px;}
  .v41-dashboard .stat-card {min-height:175px;}
  .v41-volume-chart {height:295px;min-height:295px;}
  .v41-recent-events .events-table-wrapper {max-height:680px;}
}
@media (max-width:1600px) {
  .v41-dashboard .stats-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  .v41-dashboard .stat-value {font-size:clamp(22px,2.2vw,35px);}
  .v41-severity-body {flex-direction:column;}
  .v41-donut {width:165px;height:165px;}
  .v41-severity-legend {width:100%;}
}
@media (max-width:1250px) {
  .v41-dash-analytics,.v41-dash-bottom {grid-template-columns:1fr;}
  .v41-severity-body {flex-direction:row;}
  .v41-donut {width:175px;height:175px;}
  .v41-recent-events .events-table-wrapper {max-height:510px;}
  .v41-global-search {width:clamp(190px,23vw,330px);}
  .health-summary {grid-template-columns:repeat(3,minmax(0,1fr));}
  .profile-grid {grid-template-columns:1fr;}
}
@media (max-width:980px) {
  .app-shell {display:block;}
  .sidebar {width:258px;}
  .container {width:calc(100% - 30px)!important;margin:18px auto 40px!important;}
  .topbar {min-height:82px;}
  .health-grid {grid-template-columns:1fr;}
  .sources-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:700px) {
  .container {width:calc(100% - 24px)!important;margin:15px auto 32px!important;}
  .topbar {padding:13px 15px;gap:10px;}
  .top-actions {width:100%;flex-wrap:wrap;}
  .v41-global-search {flex:1 1 170px;width:auto;min-width:0;}
  .v411-type-toggle {min-width:42px;padding:0 9px;}
  .v411-type-caption {display:none;}
  .theme-button {padding:0 9px;}
  .page-heading {font-size:24px;}
  .page-subtitle {font-size:12px;}
  .v41-dashboard .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .v41-dashboard .stat-card {min-height:130px;padding:17px 14px;}
  .v41-dashboard .stat-label {font-size:10px;}
  .v41-dashboard .stat-value {font-size:23px;}
  .v41-kpi-desc {font-size:11px;}
  .v41-kpi-icon {font-size:25px;}
  .card-header,.explorer-head {min-height:60px;padding:15px;}
  .card-title {font-size:15px;}
  .v41-chart-body {padding:17px;}
  .v41-chart-summary strong {font-size:28px;}
  .v41-volume-chart {height:180px;min-height:180px;}
  .v41-severity-body {flex-direction:column;padding:22px 18px;}
  .v41-top-sources .source-row {grid-template-columns:1fr;}
  .v41-top-sources .source-list {padding:10px 15px 16px;}
  .v41-recent-events th:nth-child(1) {width:155px;}
  .v41-recent-events .events-table-wrapper {overflow-x:auto;}
  .log-insight-row {grid-template-columns:repeat(2,minmax(0,1fr));}
  .log-insight:last-child {grid-column:1/-1;}
  .explorer-form {padding:16px;}
  .explorer-grid {grid-template-columns:1fr;}
  .explorer-grid .wide {grid-column:1;}
  .sources-grid {grid-template-columns:1fr;}
  .statistics-grid,.health-summary {grid-template-columns:repeat(2,minmax(0,1fr));}
  .portal-clean-footer-inner {width:calc(100% - 20px);}
}
@media(max-width:420px){.v411-type-toggle {height:38px;min-width:38px;}.top-actions {gap:7px;}}
@media (prefers-reduced-motion: reduce){.nav-link,.button,.v411-type-toggle {transition:none;}}
@media print {.v411-type-toggle {display:none!important;}.container {width:100%!important;margin:0!important;}}
/* Light-mode cards stay readable (the rest of the portal retains the same theme switch). */
html[data-theme="light"] .v41-dashboard .stat-card {
  background:radial-gradient(circle at 105% -5%,rgba(20,175,235,.10),transparent 62%),linear-gradient(145deg,#fff,#f2f9fc);
  border-color:rgba(23,136,192,.29);
}
html[data-theme="light"] .v41-dashboard .stat-label {color:#376783;}
html[data-theme="light"] .v41-dashboard .stat-value {color:#183448;}
html[data-theme="light"] .v41-dashboard .v41-kpi-desc {color:#57798d;}
html[data-theme="light"] .v41-source-info .source-ip-link {color:#006c9f;}
html[data-theme="light"] .v41-chart-summary span {color:#54768a;}
@media(max-width:650px) {
  /* Keep menu and page title together, with controls on the next row. */
  .topbar {display:grid!important;grid-template-columns:44px minmax(0,1fr);gap:10px 12px;align-items:center!important;}
  .v41-mobile-toggle {grid-column:1;grid-row:1;justify-self:start;}
  .v41-heading-group {grid-column:2;grid-row:1;min-width:0;}
  .top-actions {grid-column:1/-1;grid-row:2;width:100%;margin:0;justify-content:space-between;flex-wrap:nowrap;}
  .v41-global-search {flex:1 1 auto;width:auto;min-width:90px;}
  .v41-global-search input {min-width:0;}
  .theme-button {font-size:11px;}
}
