@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #ecefec;
  --bg-deep: #e2e6e3;
  --paper: #f6f7f6;
  --paper-strong: #ffffff;
  --ink: #121816;
  --muted: #5a635e;
  --line: #d2d7d3;
  --line-strong: #aeb6b1;
  --forest: #1a3328;
  --forest-deep: #0e1f18;
  --forest-mid: #2a4638;
  --leaf: #2f5a44;
  --mint: #eef1ef;
  --mint-strong: #e3e8e4;
  --brass: #6d7570;
  --brass-soft: #eef1ef;
  --good: #1f6b45;
  --good-bg: #e5f0ea;
  --warn: #7a5c1d;
  --warn-bg: #f3eee3;
  --bad: #8b3030;
  --bad-bg: #f4e6e6;
  --info: #2a4f66;
  --info-bg: #e8eef2;
  --shadow: 0 8px 24px rgba(14, 31, 24, 0.08);
  --radius: 8px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: linear-gradient(180deg, #f2f4f2 0%, var(--bg) 48%, var(--bg-deep) 100%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; font-size: 16px; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: minmax(100vh, auto);
  overflow: hidden;
}
/* Safety: overlapping login renders must not stack another full screen */
.login > *:nth-child(n + 3) {
  display: none !important;
}
.login-story {
  background: linear-gradient(165deg, #163328 0%, var(--forest-deep) 100%);
  color: #e8eeea;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.login-story h1 {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  margin: 12px 0;
  letter-spacing: 0.08em;
  color: #f2f4f2;
  text-transform: uppercase;
}
.login-story p { max-width: 460px; color: #b7c4bc; font-size: 16px; line-height: 1.5; }
.kicker {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
  color: #8fa397;
  margin: 0;
  font-weight: 600;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 40px;
  background: #f4f5f4;
}
.card {
  width: min(460px, 100%);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h2 {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 650;
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--forest-deep);
}
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 90, 68, 0.14);
}

.btn {
  border: 0;
  background: var(--forest);
  color: #f3f5f4;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { background: var(--forest-deep); }
.btn.secondary {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--line-strong);
}
.btn.secondary:hover { background: var(--mint); }
.btn.good { background: var(--good); }
.btn.warn { background: var(--warn); color: #fff; }
.btn.bad { background: var(--bad); }
.btn.small { padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.demo-grid button { text-align: left; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.side {
  background: linear-gradient(180deg, #152a21 0%, var(--forest-deep) 100%);
  color: #e4ebe6;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 18px; }
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
  background: #ffffff;
}
.brand-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
}
.label-logo {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
}
.brand strong {
  display: block;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 18px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #f2f4f2;
  text-transform: uppercase;
}
.brand em { font-style: normal; color: #8fa397; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.login-logo {
  width: min(200px, 52vw);
  height: auto;
  border-radius: 8px;
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  display: block;
  background: #ffffff;
}
.mark {
  width: 40px; height: 40px; border-radius: 6px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.2);
  color: #e8eeea;
  background: #0e1f18;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex: 0 0 auto;
}
.ico svg { display: block; }
.ico-sm { font-size: 14px; }
.nav-ico {
  width: 1.25em;
  font-size: 1.05em;
  color: #9aada2;
  flex: 0 0 auto;
}
.nav-txt { min-width: 0; }
.quick-ico {
  display: inline-flex;
  margin-right: 8px;
  font-size: 16px;
  color: var(--forest-mid);
  vertical-align: -0.15em;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}
.pill .ico { margin-right: 4px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side button, .tabbar button {
  background: transparent;
  color: inherit;
  border: 0;
  text-align: left;
  border-radius: 6px;
  padding: 9px 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 10px;
}
.lang-switch .lang-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 2px;
}
.side-foot .lang-switch .lang-label { color: #a8c4b3; }
.login-panel .lang-switch { margin-bottom: 14px; }
.btn.active-lang {
  background: var(--forest) !important;
  color: #f4faf6 !important;
  border-color: var(--forest) !important;
}
.top-actions .lang-switch { margin: 0; }
.side button:hover { background: rgba(255,255,255,0.05); }
.side button.active, .tabbar button.active {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  box-shadow: inset 2px 0 0 #c9d2cd;
}
.side button.active .nav-ico, .tabbar button.active .nav-ico { color: #e8eeea; }
.side-foot { margin-top: auto; color: #8fa397; font-size: 13px; padding: 12px 8px 0; }
.side-foot .credit-mini {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(143, 163, 151, 0.55);
}

.workspace { padding: 22px 22px 40px; min-width: 0; }
.view-loading {
  padding: 28px 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.nest-maps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.nest-map {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #0f1f18;
}
.nest-map-head {
  margin-bottom: 8px;
  color: #d5ddd8;
}
.nest-map-svg {
  width: 100%;
  height: auto;
  display: block;
  background: #0c1812;
  border-radius: 6px;
}
.cut-table .cut-edge {
  text-align: center;
  width: 36px;
}
.cut-table .cut-edge input {
  width: auto;
}
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
}
h1 {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 650;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--forest-deep);
}
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat, .panel {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: none;
}
.stat:nth-child(n) {
  background: var(--paper-strong);
  border-color: var(--line);
}
.stat b {
  display: block;
  font-size: 26px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 650;
  margin-top: 4px;
  color: var(--forest-deep);
  letter-spacing: -0.02em;
}
.stat span, .panel h3 {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}
.chart-svg {
  width: 100%;
  min-width: 420px;
  height: auto;
  display: block;
}
.hbar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.hbar-row { display: grid; gap: 4px; }
.hbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
}
.hbar-meta strong {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}
.hbar-meta span {
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.hbar-track {
  height: 10px;
  border-radius: 999px;
  background: #e6ebe8;
  overflow: hidden;
}
.hbar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}
.hbar-row.warn .hbar-meta strong { color: #6d2a2a; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 12px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }

.column {
  border-radius: 8px;
  padding: 10px;
  min-height: 140px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: none;
}
.column h3 {
  margin: 4px 6px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.column-new { border-top: 2px solid #5a7d92; }
.column-new h3 { color: #2a4f66; }
.column-cutting { border-top: 2px solid #9a7b3a; }
.column-cutting h3 { color: #7a5c1d; }
.column-drilling { border-top: 2px solid #4f7460; }
.column-drilling h3 { color: #2a4638; }
.column-ready { border-top: 2px solid #3f7a58; }
.column-ready h3 { color: #1f6b45; }

.job {
  display: block; width: 100%; text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.job:hover {
  border-color: var(--line-strong);
  background: var(--mint);
}
.job strong { display: block; color: var(--forest-deep); }
.job small { color: var(--muted); }
.job.active-job {
  border-color: var(--leaf);
  background: var(--mint);
  box-shadow: inset 2px 0 0 var(--leaf);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; }
.pill {
  display: inline-flex; align-items: center; border-radius: 4px;
  padding: 3px 8px; font-size: 12px; font-weight: 600;
  background: var(--mint); color: var(--forest);
  gap: 2px;
}
.st-new { background: #e4eef5; color: #1f5f86; }
.st-cutting { background: var(--warn-bg); color: var(--warn); }
.st-drilling { background: #dff0e6; color: #1f4d36; }
.st-ready { background: var(--good-bg); color: var(--good); }
.st-done { background: #e5ebe7; color: #445248; }
.st-cancelled { background: var(--bad-bg); color: var(--bad); }
.thumb {
  width: 42px; height: 42px; object-fit: cover; border-radius: 8px;
  vertical-align: middle; margin-right: 8px; border: 1px solid var(--line);
}
.thumb.empty {
  display: inline-grid; place-items: center; background: var(--mint); color: var(--muted); font-size: 12px;
}
.photo-preview { display: flex; gap: 10px; align-items: center; }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.order-file { display: grid; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-file:last-child { border-bottom: 0; }
.order-photo {
  display: block;
  width: min(100%, 420px);
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f2a20;
}
.low { color: var(--bad); font-weight: 700; }
.banner {
  background: var(--warn-bg);
  border: 1px solid #d8c9a4;
  color: #5f4a1c;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.address-box {
  background: var(--forest-deep);
  color: #e8eeea;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0;
}
.address-box code { font-size: 15px; color: #c5d0c9; }

.lines { display: flex; flex-direction: column; gap: 8px; }
.line {
  display: grid;
  grid-template-columns: 1.4fr 90px 120px 110px 36px;
  gap: 8px;
  align-items: center;
}
.suggest { position: relative; width: 100%; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); max-height: 240px; overflow: auto;
}
.suggest-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  text-align: left; border: 0; background: transparent; padding: 10px 12px;
}
.suggest-item:hover, .suggest-item:focus { background: var(--mint); }
.suggest-item.create { color: var(--forest); font-weight: 700; }
.quick-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px;
}
.quick {
  text-align: left; border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px; padding: 12px;
  transition: border-color 0.15s ease, background 0.12s ease;
}
.quick:hover {
  border-color: var(--line-strong);
  background: var(--mint);
}
.quick strong {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  color: var(--forest-deep);
  font-weight: 650;
}
.part-line {
  display: grid;
  grid-template-columns: 1.3fr 100px 100px 80px 36px;
  gap: 8px;
  align-items: center;
}
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
  border-left: 2px solid var(--leaf);
  padding: 8px 0 8px 12px;
  background: var(--mint);
  border-radius: 0 6px 6px 0;
}
.modal-back {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(10, 18, 14, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px;
}
.modal {
  width: min(920px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  background: var(--paper-strong);
  border-radius: 10px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.modal h2 {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 650;
  margin: 0;
  color: var(--forest-deep);
  letter-spacing: -0.01em;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.span-2 { grid-column: span 2; }
.total {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 26px;
  margin: 0;
  color: var(--forest-deep);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: var(--forest-deep); color: #e8f3ec;
  gap: 4px; padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  overflow-x: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.tabbar button {
  color: #e8f3ec;
  white-space: nowrap;
  flex-direction: column;
  gap: 2px;
  padding: 8px 6px;
  font-size: 11px;
  text-align: center;
  min-width: 64px;
}
.tabbar .nav-ico { font-size: 1.15em; width: auto; }

.app-credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 12;
  margin: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(31, 77, 54, 0.45);
  pointer-events: none;
  user-select: none;
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--forest-deep); color: #fff; padding: 12px 16px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: 0.2s ease; z-index: 50; max-width: min(520px, calc(100% - 24px));
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(14, 31, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.app-loader.boot {
  background: #0e1f18;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.app-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding: 20px;
}
.app-loader-orbit {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
}
.app-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ffffff;
  border-right-color: rgba(201, 210, 205, 0.85);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04);
  animation: tabriz-spin 1.1s linear infinite;
}
.app-loader-logo {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 18px;
  background: #ffffff;
  border: 2px solid #ffffff;
  box-shadow:
    0 0 0 4px rgba(14, 31, 24, 0.55),
    0 16px 40px rgba(0, 0, 0, 0.45);
  animation: tabriz-logo-pulse 1.8s ease-in-out infinite;
}
.app-loader-by {
  margin: 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  animation: tabriz-by-pulse 1.8s ease-in-out infinite;
}
.app-loader-by span { display: inline-block; }
@keyframes tabriz-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes tabriz-logo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes tabriz-by-pulse {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .app-loader-ring { animation: none; }
  .app-loader-logo,
  .app-loader-by {
    animation: tabriz-logo-pulse 1.8s ease-in-out infinite;
  }
}
#print-root { display: none; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mint);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
}
.check-row input {
  width: auto;
  margin-top: 2px;
  flex: 0 0 auto;
}
.face-url {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(227, 240, 231, 0.7);
}
.face-url code {
  flex: 1 1 220px;
  font-size: 12px;
  word-break: break-all;
}
.access-box { margin-top: 14px; }
.access-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.access-link.online {
  border-color: rgba(31, 107, 69, 0.35);
  background: var(--good-bg);
}
.access-link code {
  font-size: 12px;
  word-break: break-all;
}
.cut-table-wrap { overflow-x: auto; }
.cut-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cut-table th, .cut-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; vertical-align: middle; }
.cut-table input[type="number"], .cut-table input[type="text"], .cut-table .suggest input {
  width: 100%; min-width: 0; font-size: 13px; padding: 6px 8px;
}
.cut-table .cut-mat { min-width: 140px; }
.cut-table .cut-edge { width: 36px; text-align: center; }
.edge-check {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--muted);
}
.edge-check input { width: auto; }

.shop-label {
  width: 100mm;
  min-height: 70mm;
  padding: 6px 8px;
  border: 1px solid #111;
  color: #111;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.25;
}
.label-head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #111; padding-bottom: 4px; margin-bottom: 6px;
}
.label-brand { display: flex; align-items: center; gap: 6px; }
.label-brand strong { font-size: 14px; letter-spacing: 0.04em; }
.label-mark {
  width: 22px; height: 22px; border: 1.5px solid #111; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.label-academy { font-size: 9px; letter-spacing: 0.08em; text-align: right; max-width: 42%; }
.label-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px; }
.label-meta div { margin-bottom: 2px; }
.label-size-block { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.label-size-row { display: flex; align-items: center; gap: 6px; }
.label-size { font-size: 22px; font-weight: 700; white-space: nowrap; }
.edge-tag {
  border: 1px solid #333; border-radius: 4px; padding: 2px 6px;
  font-size: 10px; background: #f3f3f3; max-width: 90px; text-align: center;
}
.edge-tag.ghost { border: 0; background: transparent; min-width: 48px; min-height: 16px; }
.label-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 6px; gap: 8px;
}
.label-qr-wrap { text-align: center; }
.label-qr { width: 78px; height: 78px; image-rendering: pixelated; }
.label-code { font-size: 10px; font-weight: 700; margin-top: 2px; word-break: break-all; }
.label-date { font-size: 9px; margin-top: 2px; }

@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-story { min-height: 240px; padding: 28px 22px; }
  .login-story h1 { font-size: 46px; }
  .shell { display: block; }
  .side { position: relative; height: auto; }
  .side nav, .side-foot { display: none; }
  .workspace { padding: 16px 14px 96px; }
  .stats, .grid-2, .form-grid, .quick-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  h1 { font-size: 28px; }
  .tabbar { display: flex; }
  .line, .part-line { grid-template-columns: 1fr; }
  .top { align-items: flex-start; flex-direction: column; }
  .app-credit {
    bottom: calc(52px + env(safe-area-inset-bottom));
    color: rgba(232, 243, 236, 0.4);
  }
}
@media (min-width: 981px) {
  .modal-back { align-items: center; }
}

@media print {
  body * { visibility: hidden; }
  #print-root, #print-root * { visibility: visible; }
  #print-root { display: block; position: absolute; inset: 0; padding: 0; color: #000; background: #fff; }
  #print-root table { width: 100%; border-collapse: collapse; }
  #print-root td, #print-root th { border-bottom: 1px solid #ccc; padding: 6px 4px; text-align: left; }
  .app-credit { display: none !important; }
  .label-sheet, .shop-label { width: 100mm; padding: 4mm; border: 0; }
  .label-sheet h1 { font-size: 22px; margin: 6px 0; }
}
