@font-face {
  font-family: 'Helve';
  src: url('./assets/fonts/UTM Helve.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HelveBold';
  src: url('./assets/fonts/UTM HelveBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
* {
  box-sizing: border-box;
  font-family: 'Helve'}

body {
  margin: 0;
  background: #ffffff;
  color: #020202;
}
h1, h2, h3, h4, h5, h6 {
  margin: 0;    
  color: #020202;
}
.app {
  display: flex;
  height: 100vh;
}

/* CONTENT */
.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* SIDEBAR LEFT */
.sidebar-left {
    width: 240px;
    background: #ffffff;
    padding: 20px;
    border-right: 1px solid #bac7db;
    border-radius: 12px;
    
}

.sidebar-left ul {
    list-style: none;
    padding: 0;
}

.sidebar-left li {
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
}

.sidebar-left li:hover {
    background: #1e293b;
}

/* PAGE CONTROL */
.page {
  display: none;
}

.page.active {
  display: block;
}
/* DASHBOARD SECTION */


/* DASHBOARD GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  font-size: 16px;
  border: #bac7db 1px solid;
}

.card b {
  font-size: 24px;
}

.card.large {
    grid-column: span 2;
    grid-row: span 4;
}

.card.wide {
  grid-column: span 2;
  grid-row: span 1;
}

/* TABLE */


th, td {
  padding: 8px;
  border-bottom: 1px solid #334155;
}
.hidden {
  display: none;
}
.detect-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.detect-title {
  font-size: 1.0rem;
  margin: 0;
  color: #000;
}

#anomalyScoreTooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: rgba(255,255,255,0.25);
  border: 1px solid #38bdf8;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 0.8rem;
  min-width: 180px;
  max-width: 320px;
  pointer-events: none;
  color: #222;
  line-height: 1.5;
  white-space: pre-line;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.detect-header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px 32px;
  border-radius: 16px;
}
/* ===== TABLE ===== */
.ml-detect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}
.overview,
.chart {
  min-height: 320px;
}
.overview {
  grid-column: 1 / 2;
  grid-row: 1/2;

}

.chart {
  grid-column: 2 / 5;
}

.table {
  grid-column: 1 / 5;
}
#ml-anomaly-table {
  max-height: 420px;
  overflow: auto;
}
#ml-detect-overview div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: #334155;
}
.card.overview {
  background: #90daff;
}
.card.chart {
  background: #fffeec;
  padding: 10px 16px 16px 16px;
}
#ml-detect-overview strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
}
/* ===== CHART ===== */
.chart-wrap {
  width: 100%;
  height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 40px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side,#656464 90%,#0000);
  background: 
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 50%;
  animation: l3 1s infinite linear;
}
@keyframes l3 {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}

.section .detect .button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
/* BUTTONS DETECT HEADER */
.detect-header-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-refresh {
  background: #000000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: 500;
  min-width: 120px;
  min-height: 40px;
  box-shadow: 0 2px 8px rgba(255,152,0,0.08);
  transition: background 0.2s;
}
.btn-refresh:hover {
  background: #fb8c00;
}
.btn-export {
  background: #dac400;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: 500;
  min-width: 120px;
  min-height: 40px;
  box-shadow: 0 2px 8px rgba(33,150,243,0.08);
  transition: background 0.2s;
}
.btn-export:hover {
  background: #ff9500;
}
.btn-share {
  background: #fff;
  color: #222;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 0;
  transition: border 0.2s;
}
.btn-share:hover {
  border: 1.5px solid #2196f3;
}