@font-face {
  font-family: Vazirmatn;
  src: url("/assets/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url("/assets/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --bg: #f4f1ea;
  --panel: #fffdfa;
  --panel2: #f2f6f4;
  --raised: #e8f2f0;
  --line: #d5dedc;
  --text: #202d38;
  --muted: #6f7d83;
  --cyan: #0fa3a8;
  --blue: #177f88;
  --green: #2aa879;
  --amber: #d69a2d;
  --red: #d6505f;
  --violet: #64748b;
  --shadow: 0 22px 55px rgba(32, 45, 56, 0.13);
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  font-feature-settings: "tnum" 1;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 75% -15%, #d8eeeb 0, transparent 36%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.wide {
  width: 100%;
}
.muted {
  color: var(--muted);
}
.mono,
[dir="ltr"],
.number,
.sensor-value {
  font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  direction: ltr;
  text-align: right;
  letter-spacing: 0.15em;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
}
.bare {
  border: 0;
  background: transparent;
  color: inherit;
}
.button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 15px;
  color: var(--text);
  background: var(--raised);
}
.button:hover {
  border-color: #42617f;
}
.button.primary {
  background: linear-gradient(135deg, #0b8f94, #17b5b0);
  border: 0;
  color: #fff;
  font-weight: 800;
}
.button.secondary {
  background: #17283a;
}
.button.danger {
  border-color: #693745;
  background: #3a2029;
  color: #ffc2c9;
}
.button.small {
  padding: 6px 10px;
  font-size: 12px;
}
.danger-text {
  color: #ff99a5 !important;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  overflow: hidden;
}
.login-visual {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(125deg, rgba(5, 15, 25, 0.1), rgba(5, 15, 25, 0.8)),
    repeating-linear-gradient(
      90deg,
      transparent 0 59px,
      rgba(39, 211, 237, 0.035) 60px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 59px,
      rgba(39, 211, 237, 0.035) 60px
    );
  display: grid;
  place-items: center;
}
.radar-ring {
  position: absolute;
  border: 1px solid rgba(39, 211, 237, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(39, 211, 237, 0.05) inset;
}
.r1 {
  width: 180px;
  height: 180px;
}
.r2 {
  width: 370px;
  height: 370px;
}
.r3 {
  width: 650px;
  height: 650px;
}
.r2:after {
  content: "";
  position: absolute;
  inset: 50% 50%;
  width: 48%;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform-origin: left;
  animation: sweep 7s linear infinite;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
.login-wordmark {
  z-index: 2;
  text-align: center;
}
.login-wordmark b {
  display: block;
  font-size: 72px;
  letter-spacing: -0.08em;
}
.login-wordmark span {
  display: block;
  color: var(--muted);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 11px;
}
.login-card {
  align-self: center;
  margin: 48px;
  width: min(410px, calc(100% - 48px));
  padding: 38px;
  background: rgba(13, 25, 38, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.login-card h1 {
  margin: 12px 0 8px;
  font-size: 27px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.9;
  margin: 0 0 30px;
}
.form-error {
  min-height: 22px;
  color: var(--red);
  font-size: 12px;
  margin-top: 12px;
}
label {
  display: grid;
  gap: 7px;
  color: #b9c7d7;
  font-size: 13px;
  margin-bottom: 14px;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a1521;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(39, 211, 237, 0.08);
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--cyan);
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(7, 16, 26, 0.94);
  border-left: 1px solid var(--line);
  overflow: hidden;
}
.brand {
  height: 82px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand-symbol {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
  color: #04111c;
  border-radius: 10px;
  font:
    900 23px "IBM Plex Mono",
    monospace;
}
.brand strong {
  display: block;
  font-size: 20px;
}
.brand small {
  display: block;
  color: #61778d;
  font:
    8px "IBM Plex Mono",
    monospace;
  letter-spacing: 0.13em;
  margin-top: 3px;
}
.main-nav {
  padding: 12px;
  display: grid;
  gap: 4px;
}
.nav-button {
  border: 0;
  background: transparent;
  color: #91a3b6;
  text-align: right;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-button i {
  font-style: normal;
  width: 20px;
  text-align: center;
  color: #57728c;
}
.nav-button:hover,
.nav-button.active {
  background: #132337;
  color: #eaf7ff;
}
.nav-button.active i {
  color: var(--cyan);
}
.tree-head {
  padding: 12px 18px 8px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #668098;
  font-size: 11px;
}
.tree-head button {
  font-size: 18px;
}
.asset-tree {
  flex: 1;
  overflow: auto;
  padding: 5px 11px 18px;
}
.tree-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  color: #91a4b7;
  font-size: 12px;
  cursor: pointer;
}
.tree-label:hover {
  background: #122234;
  color: #fff;
}
.tree-label.department {
  color: #d6e1ed;
  font-weight: 700;
}
.tree-child {
  margin-right: 13px;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.tree-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.tree-dot.normal,
.tree-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.tree-dot.warning {
  background: var(--amber);
}
.tree-dot.critical,
.tree-dot.offline {
  background: var(--red);
}
.sidebar-footer {
  padding: 14px 17px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-footer strong,
.sidebar-footer small {
  display: block;
}
.sidebar-footer small {
  color: #61788f;
  font-size: 10px;
  margin-top: 2px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 25px;
  background: rgba(8, 17, 28, 0.82);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.topbar h1 {
  font-size: 20px;
  margin: 4px 0 0;
}
.breadcrumb {
  color: #668098;
  font-size: 10px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.search-box {
  position: relative;
  width: min(380px, 32vw);
}
.search-box > span {
  position: absolute;
  right: 12px;
  top: 8px;
  color: #6f849b;
  font-size: 19px;
}
.search-box input {
  padding-right: 38px;
  background: #0b1724;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 60;
  background: #101e2c;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 380px;
  overflow: auto;
}
.search-result {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.search-result:hover {
  background: #17283a;
}
.search-result small {
  display: block;
  color: var(--muted);
}
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1a28;
  color: #bcd0e3;
  position: relative;
}
.badge {
  position: absolute;
  top: -5px;
  left: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font: 10px monospace;
  display: grid;
  place-items: center;
}
.live-indicator {
  display: flex;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 10px;
  font-size: 10px;
  color: var(--muted);
}
.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}
.live-indicator.online i {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.live-indicator.online {
  color: #bcebd9;
}
.content {
  padding: 23px;
  max-width: 1700px;
  margin: auto;
}
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #10263a, #0b1a28 63%, #122d3a);
  border: 1px solid #274157;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 18px;
}
.hero:after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border: 35px solid rgba(39, 211, 237, 0.045);
  border-radius: 50%;
  left: -45px;
  top: -110px;
}
.hero-row,
.section-head,
.machine-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.hero h2,
.section-head h2,
.machine-head h2 {
  margin: 0;
}
.hero p {
  color: #90a4b8;
  margin: 8px 0 0;
}
.hero-actions {
  display: flex;
  gap: 8px;
  z-index: 1;
}
.grid {
  display: grid;
  gap: 14px;
}
.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.card {
  background: linear-gradient(145deg, var(--panel), #0b1723);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
}
.kpi {
  min-height: 112px;
  position: relative;
  overflow: hidden;
}
.kpi:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent, var(--blue));
}
.kpi small {
  color: #6f849a;
}
.kpi .number {
  font-size: 28px;
  font-weight: 750;
  margin-top: 18px;
  direction: ltr;
  text-align: right;
}
.kpi .delta {
  font-size: 10px;
  color: var(--muted);
  margin-right: 7px;
}
.section-head {
  margin: 25px 0 12px;
}
.section-head h2 {
  font-size: 16px;
}
.department-card {
  cursor: pointer;
  transition: 0.16s;
}
.department-card:hover,
.machine-card:hover {
  transform: translateY(-2px);
  border-color: #3a5874;
}
.health-bar {
  height: 6px;
  background: #1b2b3b;
  border-radius: 3px;
  display: flex;
  overflow: hidden;
  margin: 16px 0 12px;
}
.health-bar span {
  height: 100%;
}
.health-bar .normal {
  background: var(--green);
}
.health-bar .warning {
  background: var(--amber);
}
.health-bar .critical {
  background: var(--red);
}
.health-bar .offline { background:#7a8791; }
.department-stats,
.machine-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.department-stats b,
.machine-meta b {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
}
.machine-card {
  cursor: pointer;
}
.machine-card h3 {
  margin: 0;
  font-size: 15px;
}
.machine-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 14px;
}
.mini-reading {
  background: #101f2e;
  border-radius: 8px;
  padding: 8px;
}
.mini-reading small {
  font-size: 9px;
  color: #71879c;
  display: block;
}
.mini-reading b {
  font:
    12px "IBM Plex Mono",
    monospace;
  direction: ltr;
  display: block;
  margin-top: 3px;
}
.section-empty {
  text-align: center;
  color: var(--muted);
  padding: 35px;
  border: 1px dashed #294055;
  border-radius: 12px;
}
.unassigned {
  border-color: #594d2d;
  background: linear-gradient(145deg, #191c20, #171a21);
}
.status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 14px;
  font-size: 10px;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.status.normal:before,
.status.online:before,
.status.good:before {
  background: var(--green);
}
.status.warning:before,
.status.pending:before,
.status.shelved:before {
  background: var(--amber);
}
.status.critical:before,
.status.active:before,
.status.bad:before {
  background: var(--red);
}
.status.offline:before {
  background: #758292;
}
.status.maintenance:before {
  background: var(--violet);
}
.machine-head {
  padding: 4px 0 20px;
}
.machine-title small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.machine-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.asset-visual {
  min-height: 260px;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle, #162d41, transparent 55%);
}
.asset-orbit {
  width: 165px;
  height: 165px;
  border-radius: 50%;
  border: 1px solid #34546e;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 0 45px rgba(39, 211, 237, 0.08);
}
.asset-orbit:before,
.asset-orbit:after {
  content: "";
  position: absolute;
  border: 1px dashed #263e55;
  border-radius: 50%;
  inset: -27px;
}
.asset-orbit:after {
  inset: -58px;
}
.asset-icon {
  font-size: 54px;
  color: var(--cyan);
}
.asset-condition {
  text-align: center;
  margin-top: 12px;
}
.sensor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.sensor-card {
  background: #101e2c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
}
.sensor-card:hover {
  border-color: #3a607d;
}
.sensor-value {
  font-size: 22px;
  margin: 14px 0 4px;
  direction: ltr;
  text-align: right;
}
.sensor-card small {
  color: var(--muted);
}
.quality-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin: 24px 0 15px;
}
.tab {
  border: 0;
  background: transparent;
  color: #70869c;
  padding: 11px 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab.active {
  color: var(--cyan);
  border-color: var(--cyan);
}
.chart-card {
  padding: 0;
  overflow: hidden;
}
.chart-toolbar {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.timeframes {
  display: flex;
  gap: 4px;
  direction: ltr;
}
.timeframe {
  border: 1px solid var(--line);
  background: #0c1926;
  color: #8196a9;
  border-radius: 7px;
  padding: 6px 9px;
  font:
    10px "IBM Plex Mono",
    monospace;
}
.timeframe.active {
  background: #17384b;
  color: var(--cyan);
  border-color: #2a6077;
}
.chart-shell {
  height: 330px;
  padding: 12px;
  position: relative;
}
.chart-shell canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10px;
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 3px;
  margin-left: 4px;
}
.timeline {
  position: relative;
}
.timeline-item {
  padding: 5px 24px 18px 0;
  position: relative;
  border-right: 1px solid var(--line);
}
.timeline-item:before {
  content: "";
  position: absolute;
  right: -4px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.timeline-item strong {
  font-size: 12px;
}
.timeline-item p {
  color: var(--muted);
  font-size: 11px;
  margin: 4px 0;
}
.timeline-item time {
  font:
    9px "IBM Plex Mono",
    monospace;
  color: #60788e;
}
.data-health {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.data-health > div {
  background: #101e2c;
  border-radius: 8px;
  padding: 10px;
}
.data-health small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.data-health b {
  font:
    18px "IBM Plex Mono",
    monospace;
  display: block;
  margin-top: 5px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #0c1825;
}
th,
td {
  text-align: right;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  white-space: nowrap;
}
th {
  background: #101f2e;
  color: #71869a;
  font-size: 10px;
  position: sticky;
  top: 0;
}
tr:hover td {
  background: #102033;
}
.row-actions {
  display: flex;
  gap: 5px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.check-list {
  max-height: 230px;
  overflow: auto;
  background: #091521;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
}
.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin: 0;
  border-bottom: 1px solid #1e3042;
}
.check-row:last-child {
  border: 0;
}
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.notice {
  background: #192235;
  border: 1px solid #3c4660;
  border-right: 3px solid var(--amber);
  border-radius: 8px;
  padding: 11px 13px;
  color: #bdc9d5;
  font-size: 12px;
  margin-bottom: 13px;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(2, 8, 14, 0.78);
  padding: 20px;
  backdrop-filter: blur(5px);
}
.modal {
  position: relative;
  width: min(790px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #0d1a28;
  border: 1px solid #2b4157;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow);
}
.modal h2 {
  margin: 8px 0 22px;
}
.close {
  border: 0;
  background: transparent;
  color: #7f93a8;
  font-size: 28px;
  padding: 0;
}
.modal > .close {
  position: absolute;
  left: 17px;
  top: 12px;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 80;
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(480px, 100%);
  background: #0c1825;
  border-right: 1px solid var(--line);
  z-index: 90;
  transform: translateX(-105%);
  transition: 0.24s;
  overflow: auto;
  padding: 22px;
}
.drawer.open {
  transform: none;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 18px;
}
.drawer h2 {
  margin: 6px 0;
}
.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 200;
  background: #16283a;
  border: 1px solid #34516b;
  border-right: 3px solid var(--cyan);
  padding: 12px 15px;
  border-radius: 9px;
  box-shadow: var(--shadow);
  max-width: 420px;
  font-size: 12px;
}

/* VibroTik visual system — logo teal, charcoal and warm industrial neutrals */
.button {
  color: var(--text);
  box-shadow: 0 1px 1px rgba(32, 45, 56, 0.04);
  transition: 0.16s ease;
}
.button:hover:not(:disabled) {
  border-color: var(--cyan);
  transform: translateY(-1px);
}
.button:disabled,
.button.loading {
  cursor: wait;
  opacity: 0.65;
}
.button.secondary {
  background: #fff;
}
.button.danger {
  border-color: #e6b6bc;
  background: #fff2f3;
  color: #a52f3d;
}
.login-shell {
  background: var(--bg);
}
.login-visual {
  background:
    linear-gradient(135deg, rgba(15, 163, 168, 0.94), rgba(15, 128, 136, 0.98)),
    repeating-linear-gradient(
      90deg,
      transparent 0 59px,
      rgba(255, 255, 255, 0.08) 60px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 59px,
      rgba(255, 255, 255, 0.08) 60px
    );
}
.radar-ring {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 70px rgba(255, 255, 255, 0.08) inset;
}
.r2:after {
  background: linear-gradient(90deg, #fff, transparent);
}
.login-wordmark {
  direction: ltr;
  color: #fff;
}
.login-wordmark b {
  display: inline-block;
  font-family: "IBM Plex Mono", sans-serif;
  font-size: 58px;
  letter-spacing: -0.08em;
}
.login-wordmark b span,
.brand strong span {
  font-weight: 400;
}
.login-wordmark b span {
  display: inline;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: inherit;
  font-size: inherit;
}
.login-wordmark small {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.74);
  letter-spacing: 0.23em;
  text-transform: uppercase;
}
.login-logo-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 17px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 17px;
  color: #fff;
  font:
    800 43px "IBM Plex Mono",
    monospace;
  box-shadow: 0 16px 40px rgba(20, 50, 56, 0.18);
}
.login-card {
  background: rgba(255, 253, 250, 0.96);
}
label,
.field-label {
  color: #4d5c64;
}
input,
select,
textarea {
  background: #fff;
  color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(15, 163, 168, 0.12);
}
.sidebar {
  background: #202d38;
  border-left-color: #34424d;
  color: #f5f7f6;
}
.brand {
  border-color: #34424d;
}
.brand-symbol {
  background: var(--cyan);
  color: #fff;
}
.brand strong {
  direction: ltr;
  font-family: "IBM Plex Mono", sans-serif;
}
.brand strong span {
  color: #c8d2d4;
}
.nav-button:hover,
.nav-button.active,
.tree-label:hover {
  background: #2b3c48;
}
.nav-button.active {
  color: #fff;
  box-shadow: inset -3px 0 var(--cyan);
}
.topbar {
  background: rgba(255, 253, 250, 0.89);
}
.breadcrumb,
.kpi small,
.mini-reading small,
th {
  color: var(--muted);
}
.search-box input,
.icon-button,
.search-results,
.card,
.check-list,
.mini-reading,
.sensor-card,
.data-health > div,
.timeframe,
table,
th,
.modal,
.drawer {
  background: #fffdfa;
}
.search-result:hover,
tr:hover td {
  background: #eef7f5;
}
.hero {
  background: linear-gradient(120deg, #ffffff, #f1f7f5 62%, #e1f1ee);
  border-color: #c7dedb;
  box-shadow: 0 12px 34px rgba(32, 45, 56, 0.06);
}
.hero:after {
  border-color: rgba(15, 163, 168, 0.08);
}
.hero p {
  color: var(--muted);
}
.card {
  box-shadow: 0 7px 24px rgba(32, 45, 56, 0.045);
}
.department-card:hover,
.machine-card:hover,
.sensor-card:hover {
  border-color: #75bebb;
  box-shadow: 0 14px 34px rgba(15, 163, 168, 0.11);
}
.health-bar {
  background: #e6ecea;
}
.section-empty {
  border-color: #cdd9d7;
}
.entity-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.entity-heading h3 {
  margin: 0;
}
.entity-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #c8e3df;
  border-radius: 12px;
  background: #eaf7f5;
  color: #087f83;
}
.entity-icon.machine {
  color: #202d38;
  background: #f0f3f2;
  border-color: #dce3e1;
}
.entity-icon.large {
  width: 54px;
  height: 54px;
}
.entity-icon .asset-svg {
  width: 25px;
  height: 25px;
}
.hero-entity .entity-icon {
  width: 58px;
  height: 58px;
}
.asset-svg {
  width: 24px;
  height: 24px;
}
.asset-svg-xl {
  width: 68px;
  height: 68px;
}
.asset-visual {
  background: radial-gradient(circle, #dff2ef, transparent 60%);
}
.asset-orbit {
  border-color: #8fc9c5;
  box-shadow: 0 0 45px rgba(15, 163, 168, 0.12);
}
.asset-orbit:before,
.asset-orbit:after {
  border-color: #bbd9d6;
}
.timeframe.active {
  background: #def1ee;
  color: #087d81;
  border-color: #91cbc7;
}
.tab {
  color: var(--muted);
}
.table-wrap {
  background: #fff;
}
.check-row {
  border-bottom-color: var(--line);
}
.notice {
  background: #fff8e9;
  border-color: #ead9ae;
  color: #6a5a36;
}
.modal {
  border-color: var(--line);
}
.drawer {
  border-right-color: var(--line);
}
.toast {
  background: #202d38;
  border-color: #354958;
  color: #fff;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}
.field-label {
  font-size: 13px;
}
.live-pulse {
  animation: livePulse 0.55s ease-out;
}

/* VibroTik 3.0 scalable factory overview */
.kpi-button {
  width: 100%;
  text-align: right;
  color: inherit;
  font: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kpi-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 35px rgba(32, 45, 56, 0.13);
}
.kpi-button span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}
.dashboard-subset {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel2);
}
.health-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.7);
}
.health-map.sparse { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.health-map.medium { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.health-map.dense { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }
.health-cell {
  min-height: 92px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--muted);
  border-radius: 13px;
  background: var(--panel);
  color: var(--text);
  padding: 10px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 3px;
  text-align: right;
  overflow: hidden;
}
.health-map.sparse .health-cell { min-height: 140px; padding: 18px; }
.health-cell:hover { border-color: var(--cyan); box-shadow: 0 8px 24px rgba(15,163,168,.12); }
.health-cell.normal { border-right-color: var(--green); }
.health-cell.warning { border-right-color: var(--amber); background: #fffaf0; }
.health-cell.critical { border-right-color: var(--red); background: #fff4f5; }
.health-cell.offline { border-right-color: #7a8791; opacity: .72; }
.health-cell.stopped { border-right-color: #435b70; background: #edf1f4; }
.health-cell b { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.health-cell small { font-size: 9px; color: var(--muted); }
.health-machine-icon { color: var(--cyan); width: 25px; height: 25px; }
.health-machine-icon svg { width: 100%; height: 100%; }
.map-legend { display:flex; gap:8px; flex-wrap:wrap; align-items:center; color:var(--muted); font-size:11px; }
.map-legend i { width:9px; height:9px; border-radius:50%; background:#7a8791; }
.map-legend i.normal { background:var(--green); }.map-legend i.warning { background:var(--amber); }
.map-legend i.critical { background:var(--red); }.map-legend i.offline { background:#7a8791; }
.gateway-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:12px; }
.gateway-card { border:1px solid var(--line); border-radius:16px; background:var(--panel); color:var(--text); padding:16px; text-align:right; }
.gateway-card:hover { border-color:var(--cyan); box-shadow:0 10px 30px rgba(15,163,168,.11); }
.gateway-card.offline { opacity:.72; }
.gateway-top { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; }
.gateway-top div { display:grid; gap:2px; }.gateway-top small { color:var(--muted); font-size:10px; }
.gateway-symbol { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font:700 12px "IBM Plex Mono"; background:var(--raised); color:var(--cyan); }
.gateway-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:14px; }
.gateway-metrics span { display:grid; font-size:10px; color:var(--muted); }.gateway-metrics b { color:var(--text); font:600 15px "IBM Plex Mono"; }
.gateway-progress { height:4px; border-radius:4px; background:var(--line); margin-top:12px; overflow:hidden; }.gateway-progress i { display:block; height:100%; background:var(--cyan); }
.compact-machine-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:7px; max-height:480px; overflow:auto; }
.compact-machine-list button { border:1px solid var(--line); border-radius:11px; background:var(--panel); color:var(--text); padding:9px; display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; text-align:right; }
.compact-machine-list button:hover { border-color:var(--cyan); }.compact-machine-list span { display:grid; }.compact-machine-list small { color:var(--muted); font-size:9px; }
.compact-icon { width:30px; height:30px; padding:5px; border-radius:9px; color:var(--green); background:var(--raised); }.compact-icon svg { width:100%; height:100%; }.compact-icon.warning{color:var(--amber)}.compact-icon.critical{color:var(--red)}.compact-icon.offline{color:#7a8791}

/* Operational views introduced in 3.1 */
.no-scroll { overflow: hidden; }
.fullscreen-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #eef3f2;
  color: var(--text);
}
.fullscreen-head {
  min-height: 54px;
  padding: 8px clamp(12px, 2vw, 28px);
  background: #10263a;
  color: #f5fbfb;
  border-bottom: 3px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.fullscreen-head h2 { margin: 1px 0 0; font-size:15px; }
.fullscreen-head .eyebrow { font-size:8px; }
.fullscreen-head .button { padding:6px 10px; font-size:11px; }
.fullscreen-body { overflow: auto; padding: 9px clamp(9px, 1.5vw, 20px) 18px; }
.fullscreen-map { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.health-groups { display:grid; grid-template-columns:repeat(auto-fit,minmax(420px,1fr)); gap:8px; align-items:start; }
.health-group {
  border: 1px solid #d4dedc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}
.health-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: #172f43;
  color: #fff;
}
.health-group-head h3 { margin: 0; font-size:11px; }
.health-group-head small { color:#95b1bd; font-size:7px; }
.health-group-head > span { font:600 9px "IBM Plex Mono"; }
.health-group .health-map { border:0; border-radius:0; padding:6px; gap:4px; background:#f4f7f6; }
.health-cell.expanded {
  min-height: 58px;
  border: 0;
  border-right: 3px solid #788792;
  border-radius:6px;
  padding:5px;
  gap:1px;
  box-shadow:none;
  transition: transform .14s, box-shadow .14s;
}
.health-cell.expanded:hover { transform:translateY(-1px); box-shadow:0 5px 12px rgba(32,45,56,.13); }
.health-cell.expanded.normal { background: #dff6ec; border-right-color: #168a60; color: #0f513b; }
.health-cell.expanded.warning { background: #fff0c9; border-right-color: #d18a00; color: #684500; }
.health-cell.expanded.critical { background: #ffdfe3; border-right-color: #cf3346; color: #761f2b; }
.health-cell.expanded.offline { background: #e4e9ec; border-right-color: #677780; color: #33444c; opacity: 1; }
.health-cell.expanded.stopped { background: #e3eaf0; border-right-color: #435b70; color: #263d51; }
.health-cell.expanded .health-machine-icon { width:16px; height:16px; }
.health-cell.expanded b { font-size:9px; }
.health-cell.expanded small { font-size:7px; }
.health-cell.expanded .health-state { font-weight:800; font-size:7px; margin-top:1px; }
.health-group .health-map.sparse .health-cell.expanded,
.health-group .health-map.medium .health-cell.expanded,
.health-group .health-map.dense .health-cell.expanded { min-height:58px; padding:5px; }
.collection-summary { display:flex; gap:10px; align-items:baseline; margin-bottom:15px; }
.collection-summary b { font:700 30px "IBM Plex Mono"; color:var(--cyan); }
.collection-summary span { color:var(--muted); }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:10px; margin:20px 0; }
.kpi-button { color:var(--text); text-align:right; }
.kpi-button span { display:block; color:var(--muted); font-size:9px; margin-top:9px; }
.priority-head { border-right:4px solid var(--cyan); padding-right:12px; }
.dashboard-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0 8px; }
.visual-action {
  border:1px solid #bdd4d1;
  border-radius:16px;
  background:linear-gradient(135deg,#dff3ef,#fff);
  color:var(--text);
  padding:18px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:13px;
  align-items:center;
  text-align:right;
}
.visual-action.secondary { background:linear-gradient(135deg,#e8edf2,#fff); }
.visual-action:hover { border-color:var(--cyan); box-shadow:0 12px 30px rgba(15,163,168,.12); }
.visual-action span { display:grid; gap:3px; }
.visual-action small { color:var(--muted); }
.visual-action > i { font:700 20px "IBM Plex Mono"; color:var(--cyan); }
.visual-action-icon { width:48px; height:48px; padding:11px; border-radius:14px; background:#fff; color:var(--cyan); }
.visual-action-icon svg { width:100%; height:100%; }
.back-button {
  border:0;
  background:transparent;
  color:var(--blue);
  font-weight:700;
  padding:4px 0 14px;
}
.back-button:hover { color:var(--cyan); }
.status.stopped:before,.status.paused:before { background:#435b70; }
.overview-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.overview-metrics article { min-height:92px; display:grid; align-content:space-between; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.overview-metrics small { color:var(--muted); }
.overview-metrics b { font-size:18px; }
.chart-tooltip {
  position:absolute;
  z-index:5;
  pointer-events:none;
  width:168px;
  padding:9px 10px;
  border-radius:9px;
  background:rgba(16,38,58,.96);
  color:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,.2);
  display:grid;
  gap:3px;
  direction:rtl;
}
.chart-tooltip span { font-size:10px; color:#c7d8df; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chart-tooltip span i { display:inline-block; width:8px; height:8px; border-radius:50%; margin-left:5px; }
.chart-tooltip b { direction:ltr; text-align:left; font-size:14px; }
.chart-tooltip small { color:#91aeb9; font:9px "IBM Plex Mono"; direction:ltr; }
.threshold-legend { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.threshold-legend span { display:inline-flex; align-items:center; gap:4px; padding:3px 6px; border-radius:10px; background:var(--panel2); color:var(--muted); font-size:8px; }
.threshold-legend i { width:13px; height:0; border-top:2px dashed var(--amber); }
.threshold-legend .critical i { border-color:var(--red); }
.threshold-legend .warning b { color:#9b6b0d; }.threshold-legend .critical b { color:var(--red); }
.notification-tools { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; color:var(--muted); }
.audit-list { display:grid; gap:10px; }
.audit-card { display:grid; grid-template-columns:12px 1fr; gap:10px; border:1px solid var(--line); border-radius:14px; background:var(--panel); padding:15px; }
.audit-marker { width:10px; height:10px; margin-top:5px; border-radius:50%; background:var(--cyan); box-shadow:0 0 0 5px rgba(15,163,168,.1); }
.audit-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.audit-head strong,.audit-head small { display:block; }
.audit-head small,.audit-head time { color:var(--muted); font-size:10px; }
.audit-content p { margin:10px 0; line-height:1.8; }
.audit-changes { display:grid; gap:5px; }
.audit-changes > div { display:grid; grid-template-columns:minmax(90px,.5fr) 1fr auto 1fr; gap:7px; align-items:center; padding:7px 9px; border-radius:8px; background:var(--panel2); font-size:11px; }
.audit-changes span { font-weight:700; }.audit-changes del { color:#9b5360; }.audit-changes ins { color:#167452; text-decoration:none; }.audit-changes i { color:var(--muted); }

/* Contrast fixes for the light industrial workspace */
.workspace .card { background:var(--panel); }
.workspace .mini-reading,.workspace .sensor-card,.workspace .data-health > div { background:var(--panel2); }
.workspace .button.secondary { background:#fff; color:var(--text); }
.workspace .button.danger { background:#fff1f3; color:#a52f40; border-color:#efb9c1; }
.workspace .timeframe { background:#fff; color:var(--muted); }
.workspace .timeframe.active { background:#dff3ef; color:#087b80; border-color:#8bc9c6; }
@keyframes livePulse {
  45% {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(15, 163, 168, 0.12);
  }
}
@media (max-width: 1250px) {
  .overview-metrics { grid-template-columns:repeat(3,1fr); }
  .cols-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .sensor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 850px) {
  .dashboard-actions,.overview-metrics { grid-template-columns:1fr; }
  .health-groups { grid-template-columns:1fr; }
  .fullscreen-head { align-items:flex-start; }
  .audit-head { flex-direction:column; }
  .audit-changes > div { grid-template-columns:1fr; }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .login-card {
    justify-self: center;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    max-height: 390px;
  }
  .topbar {
    position: relative;
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .top-actions {
    flex-wrap: wrap;
  }
  .search-box {
    width: 100%;
    order: 2;
  }
  .content {
    padding: 14px;
  }
  .cols-2,
  .cols-3,
  .cols-4,
  .cols-6,
  .sensor-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .hero-row,
  .machine-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .chart-shell {
    height: 270px;
  }
}
