:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --muted: #f2f6fa;
    --soft: #e6edf5;
    --text: #003366;
    --text-dim: #335577;
    --accent: #003366;
    --accent-2: #0055aa;
    --ok: #22c55e;
    --warn: #f59e0b;
    --bad: #ef4444;
    --blue: #003366;
    --radius: 16px;
    --shadow: 0 6px 18px rgba(0, 51, 102, 0.15);
}

* { box-sizing: border-box; }


body {
  background-image: url("../../assets/Background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100%;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  color: white;
  padding: 20px 10px;
  position: relative;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center; /* centers content */
  position: relative;
}

.header-top h1 {
  margin: 0;
  font-size: 24px;
  flex: 1;
  text-align: center;
}

.back-link {
  position: absolute;
  right: 0;
  text-decoration: none;
  background-color: #ffffff;
  color: #003366;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
}

.back-link:hover {
  background-color: #cce0ff;
}

main {
  margin: 30px;
  padding: 30px;
  border-radius: 12px;
  /* background-color: #ffffff; */
}

.wrap { max-width: 100%; margin: 0 auto; padding: 18px 20px; }


.row { display: grid; grid-template-columns: 1fr; gap: 16px; }

@media (min-width: 900px) {
    .row-2 { grid-template-columns: 1.6fr .9fr; }
    .row-3 { grid-template-columns: repeat(3, 1fr); }
}

h1 { font-size: 22px; margin: 0; letter-spacing: .2px; }
.sub { color: var(--text-dim); font-size: 13px; }

.bar { display: flex; gap: 12px; align-items: center; margin-top: 12px; }

.chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--muted);
    color: var(--text-dim);
    border: 1px solid rgba(0, 51, 102, .15);
    cursor: pointer;
}
.chip.active {
    color: #fff;
    border-color: rgba(0, 51, 102, .45);
    background: linear-gradient(180deg, #003366, #002244);
}

.search { flex: 1; min-width: 160px; }
.search input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 999px;
    background: var(--muted);
    border: 1px solid rgba(0, 51, 102, .15);
    color: var(--text);
}

.panel {
    background: #fff;
    border: 1px solid rgba(0, 51, 102, .15);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.panel .head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 51, 102, .15);
}
.panel .head h3 { font-size: 14px; margin: 0; letter-spacing: .25px; color: var(--text); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

.kpi {
    padding: 14px;
    border-radius: 14px;
    background: var(--muted);
    border: 1px solid rgba(0, 51, 102, .15);
}
.k-title { color: var(--text-dim); font-size: 12px; }
.k-value { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--text); }
.trend { font-size: 12px; margin-top: 6px; }

.grid { width: 100%; border-collapse: collapse; }
.grid thead th {
    text-align: left;
    font-size: 12px;
    color: var(--text-dim);
    padding: 10px 10px;
    border-bottom: 1px solid rgba(0, 51, 102, .15);
    cursor: pointer;
}
.grid tbody td {
    font-size: 14px;
    padding-left: 20px;
    border-bottom: 1px solid rgba(0, 51, 102, .1);
    color: var(--text);
    word-wrap: break-word;
    white-space: normal;
}
#grid th[data-col="eqmodel"],
#grid td[data-col="eqmodel"] {
    width: 20px;
    white-space: normal;
    word-wrap: break-word;
}

.tag {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid;
}
.tag.ok { color: var(--ok); border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .1); }
.tag.warn { color: var(--warn); border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .1); }
.tag.bad { color: var(--bad); border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .1); }

.alert {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 51, 102, .15);
    background: var(--muted);
    align-items: start;
}
.alert .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.alert time { color: var(--text-dim); font-size: 12px; }

.progress {
    height: 8px;
    width: 100%;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0, 51, 102, .15);
}
.progress>i { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 51, 102, .3);
    background: linear-gradient(180deg, #003366, #002244);
    color: #fff;
    cursor: pointer;
}
.btn:hover { border-color: rgba(0, 51, 102, .6); }

.spark { height: 28px; width: 120px; display: inline-block; vertical-align: middle; opacity: .9; }

.drawer { position: fixed; inset: 0; display: none; }
.drawer.open { display: block; }
.drawer .backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); }
.drawer .panel {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: min(520px, 100%);
    border-left: 1px solid rgba(0, 51, 102, .2);
    border-radius: 0;
    background: #fff;
}

.file {
    display: inline-grid;
    grid-template-columns: 24px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px dashed rgba(0, 51, 102, .25);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    padding: 32px 0;
}