/* Values from Figma "01_AI-Dashboard" › web-page (2:36) and tank component set (2:44) */
@font-face {
  font-family: "Gmarket Sans";
  font-weight: 700;
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff") format("woff");
  font-display: swap;
}

:root {
  --c-10t: #a80000;
  --c-5t: #0064c8;
  --c-3t: #408008;
  --c-2t: #585858;
  --c-1t: #000000;
  --ink-date: #303030;
  --color-bg-button: #003b64;
  --color-text-button: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #fcfcfc;
  color: #000;
  font-family: "Gmarket Sans", -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-weight: 700;
  line-height: 1.2;
}
button { font: inherit; font-size: 13px; padding: 8px 12px; border: 1px solid rgba(0,0,0,.16); background: var(--color-bg-button); color: var(--color-text-button); border-radius: 8px; cursor: pointer; }

.login { text-align: center; margin-top: 20vh; }
.login input { font: inherit; font-size: 14px; padding: 8px 12px; width: 220px; border: 1px solid rgba(0,0,0,.16); border-radius: 8px; margin-right: 6px; }
.error { color: #b3261e; }

/* Fixed 1728×1277 artboard, scaled to fit the window */
.viewport { overflow: hidden; }
.page { position: relative; width: 1728px; height: 1277px; transform-origin: 0 0; }
.title { position: absolute; left: 160px; top: 80px; margin: 0; font-size: 40px; letter-spacing: -1.6px; }
.updated { position: absolute; left: 160px; top: 140px; margin: 0; font-size: 20px; letter-spacing: -.4px; color: rgba(0,0,0,.8); }
.toolbar { position: absolute; right: 160px; top: 136px; display: flex; gap: 12px; align-items: center; font-size: 13px; color: rgba(0,0,0,.6); }

.board {
  position: absolute; left: 160px; top: 204px; width: 1408px; height: 993px;
  background: #f0f0f0; border: 1px solid rgba(0,0,0,.04); border-radius: 16px;
}
.area { position: absolute; border-radius: 12px; }
.area.building { background: #fff; border: 1px solid rgba(0,0,0,.16); }
.area.room {
  background: #d8d8d8; border: 1px solid rgba(0,0,0,.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; letter-spacing: -.8px; color: rgba(0,0,0,.16);
  writing-mode: vertical-rl; text-orientation: upright;
}

/* Tank */
.tank { position: absolute; display: flex; align-items: center; gap: 8px; cursor: default; --s: 56px; --c: var(--c-5t); }
.tank.cap-10T { --s: 64px; --c: var(--c-10t); width: 144px; height: 64px; }
.tank.cap-5T  { --s: 56px; --c: var(--c-5t);  width: 128px; height: 56px; }
.tank.cap-3T  { --s: 48px; --c: var(--c-3t);  width: 128px; height: 48px; }
.tank.cap-2T  { --c: var(--c-2t); width: 64px; height: 64px; }
.tank.cap-1T  { --c: var(--c-1t); width: 64px; height: 56px; }
.tank.align-left { flex-direction: row-reverse; text-align: right; }
.tank.rotated { transform: rotate(-90deg); }

.shape {
  flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--c); border: 2px dotted transparent;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; letter-spacing: -.4px;
}
/* states=enabled: short number (20). states=hover (web) / selected (mobile): full id (16) + brewed date (12) */
.label { display: flex; flex-direction: column; white-space: nowrap; }
.label .num { font-size: 20px; letter-spacing: -.4px; color: var(--c); }
.label .id { display: none; font-size: 16px; letter-spacing: -.32px; color: var(--c); }
.label .date { display: none; font-size: 12px; letter-spacing: -.24px; color: var(--ink-date); }

/* 1T / 2T: shape on top, label below */
.tank.align-center { flex-direction: column; justify-content: flex-start; gap: 8px; }
.tank.cap-1T .shape { width: 40px; height: 32px; border-radius: 0; font-size: 16px; letter-spacing: -.32px; }
.tank.cap-2T .shape { width: 40px; height: 40px; font-size: 16px; letter-spacing: -.32px; }
.tank.align-center .label { align-items: center; }
.tank.cap-2T.is-hover .label .id { color: #282828; }

/* stock=empty: white fill, 2px dotted outline, capacity text at 50% */
.tank.empty .shape { background: #fff; border-color: var(--c); color: var(--c); }
.tank.empty .shape span { opacity: .5; }
.tank.empty.cap-2T .shape { background: transparent; }
.tank.empty.cap-2T .shape span { opacity: 1; }

/* states=hover */
.tank.is-hover { z-index: 1; }
.tank.is-hover .label .num { display: none; }
.tank.is-hover .label .id,
.tank.is-hover .label .date { display: block; }

[hidden] { display: none !important; }

/* ---------- Mobile (≤440px): Figma "Mobile / …" frames ---------- */
.mobile { display: none; }

@media (max-width: 440px) {
  .page { display: none; }
  .viewport { overflow: visible; }
  .mobile { display: block; min-height: 100vh; background: #f0f0f0; }

  .login { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; margin: 0; padding: 0 24px; gap: 16px; }
  .login h1 { margin: 0; font-size: 24px; letter-spacing: -.96px; }
  .login p { margin: 0; font-size: 14px; letter-spacing: -.28px; color: rgba(0,0,0,.8); }
  .login input { width: 100%; height: 48px; margin: 0; padding: 12px 16px; border-radius: 12px; }
  .login button { width: 100%; height: 48px; padding: 12px 16px; border-radius: 12px; font-size: 14px; letter-spacing: -.28px; }
  .login .error { font-size: 14px; }

  .m-header { background: #fcfcfc; padding-top: 24px; }
  .m-titles { display: flex; flex-direction: column; gap: 8px; padding: 0 24px; }
  .m-title { margin: 0; font-size: 24px; letter-spacing: -.96px; }
  .m-meta { display: flex; justify-content: space-between; align-items: center; }
  .m-updated { margin: 0; font-size: 12px; letter-spacing: -.24px; color: rgba(0,0,0,.8); white-space: pre-line; }
  .m-actions { display: flex; gap: 8px; }
  .icon-button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; background: #fff; border: 1px solid rgba(0,0,0,.16); border-radius: 12px; }
  .m-tabs { display: flex; margin-top: 16px; padding: 0 8px; border-bottom: 1px solid rgba(0,0,0,.04); }
  .m-tab { flex: 1; height: 48px; padding: 0 16px; background: none; border: 0; border-radius: 0; color: rgba(0,0,0,.6); font-size: 16px; letter-spacing: -.32px; }
  .m-tab[aria-selected="true"] { color: #000; box-shadow: inset 0 -2px 0 #000; }
  .m-status { margin: 12px 24px 0; font-size: 12px; color: #b3261e; }

  /* zone fills the width; tanks keep their Figma constraints (see placeMobileTank) */
  .m-content { padding: 40px 24px 32px; overflow-x: hidden; }
  .m-zone { position: relative; }
  .m-zone .area.room { font-size: 40px; }
  .m-zone .tank { cursor: pointer; }

  .m-scrim { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.6); }
  .m-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    padding: 12px 24px 32px; background: #fff; border-radius: 16px 16px 0 0;
  }
  /* handle frame keeps its 40×4 space; the bar itself is hidden in Figma (not used yet) */
  .m-sheet-handle { width: 40px; height: 4px; }
  .m-sheet-header { display: flex; align-items: center; gap: 12px; width: 100%; }
  .m-sheet-tank { position: relative; width: 56px; height: 56px; flex: none; }
  .m-sheet-tank .tank { position: static; width: 56px; }
  .m-sheet-tank .label { display: none; }
  .m-sheet-id { flex: 1; margin: 0; text-align: center; font-size: 24px; letter-spacing: -.96px; }
  .m-sheet-info { display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 0; }
  .m-sheet-info div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.04); }
  .m-sheet-info dt { font-size: 14px; letter-spacing: -.28px; color: rgba(0,0,0,.6); }
  .m-sheet-info dd { margin: 0; font-size: 14px; letter-spacing: -.28px; }
}
