:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172e3c;
  background: #f4f6f8;
  font-size: 16px;
  --ink: #101e2a;
  --green: #087d66;
  --line: #dde4e9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: inherit;
  border-radius: 9px;
  padding: 11px 16px;
  min-height: 44px;
  font-weight: 600;
}
button:hover {
  border-color: #92a7b4;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #32c8ad;
  outline-offset: 3px;
}
input,
select {
  width: 100%;
  border: 1px solid #bdcbd4;
  border-radius: 8px;
  padding: 12px;
  margin-top: 7px;
  background: white;
}
label {
  display: block;
  margin: 18px 0;
  font-size: 0.9rem;
  font-weight: 600;
}
a {
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.9rem;
  letter-spacing: -1px;
  margin-bottom: 9px;
}
h2 {
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 1rem;
}
.muted,
small {
  color: #637b8a;
}
small {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100dvh;
}
.sidebar {
  background: var(--ink);
  color: #c4d1da;
  padding: 32px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.6px;
  padding: 0 10px 37px;
}
.brand img {
  width: 35px;
  height: 35px;
}
.brand sup {
  font-size: 0.6rem;
  color: #5de2c4;
  letter-spacing: 1px;
}
.sidebar small {
  padding: 0 14px;
  color: #8197a5;
  font-size: 0.72rem;
}
.nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.nav button {
  background: none;
  color: #afc2ce;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 0.92rem;
}
.nav button.active {
  background: #203c46;
  color: #6ce1c8;
}
.nav svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}
.sidebar-foot {
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid #2b3b48;
  font-size: 0.86rem;
  line-height: 1.7;
}
.sidebar-foot button {
  margin-top: 12px;
  background: none;
  color: #b3c8d5;
  border-color: #334854;
  font-size: 0.85rem;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.location {
  font-weight: 600;
}
.location span {
  color: #7a8b96;
  margin-right: 10px;
}
.right {
  display: flex;
  gap: 18px;
  align-items: center;
}
.avatar {
  border-radius: 50%;
  background: #e9eff1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.mode {
  font-size: 0.78rem;
  padding: 7px 10px;
  border: 1px solid #e6cf96;
  background: #fff9e9;
  border-radius: 6px;
  color: #805916;
}
.content {
  padding: 34px;
  max-width: 1600px;
  margin: 0 auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.heading p {
  margin-bottom: 0;
  line-height: 1.6;
}
.primary {
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  box-shadow: 0 3px 5px #0b6b6410;
}
.primary:hover {
  background: #086653;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 21px;
}
.stat .label {
  font-size: 0.85rem;
  color: #617786;
  margin-bottom: 15px;
}
.stat strong {
  font-size: 1.95rem;
  font-weight: 650;
  letter-spacing: -1px;
  display: block;
}
.stat .detail {
  font-size: 0.8rem;
  color: #718390;
  margin-top: 8px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 23px;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  border-color: transparent;
  font-size: 0.85rem;
  padding: 9px 12px;
}
.tabs button.active {
  background: white;
  border-color: var(--line);
  box-shadow: 0 2px 3px #00000004;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.column-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  font-size: 0.87rem;
  font-weight: 650;
}
.count {
  font-size: 0.78rem;
  background: #e3e9ed;
  color: #526976;
  padding: 3px 7px;
  border-radius: 5px;
}
.order-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  border-top: 3px solid #9fb2c0;
}
.order-card.preparing {
  border-top-color: #e2ad48;
}
.order-card.ready {
  border-top-color: #3cae8e;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.order-num {
  font-size: 0.87rem;
  font-weight: 700;
}
.age {
  font-size: 0.8rem;
  color: #718391;
}
.order-title {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 7px;
}
.channel {
  display: inline-block;
  font-size: 0.74rem;
  border-radius: 5px;
  padding: 4px 7px;
  background: #edf1f6;
  color: #536d80;
  margin-bottom: 15px;
}
.channel.delivery {
  background: #f0ebfc;
  color: #7a54ab;
}
.line {
  display: flex;
  gap: 9px;
  font-size: 0.9rem;
  margin: 12px 0;
  color: #405c6b;
}
.qty {
  color: #7e94a0;
  min-width: 22px;
}
.card-foot {
  border-top: 1px solid #edf0f3;
  margin-top: 18px;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-foot button {
  font-size: 0.8rem;
  padding: 9px 10px;
  min-height: 40px;
}
.empty {
  border: 1px dashed #c5d2db;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: #798c98;
  font-size: 0.87rem;
  line-height: 1.6;
}
.notice {
  background: #e9f3f2;
  border: 1px solid #cfe2df;
  padding: 16px 20px;
  border-radius: 10px;
  line-height: 1.6;
  font-size: 0.88rem;
  color: #355d59;
  margin: 25px 0;
}
.notice strong {
  color: #173f38;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.camera-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.camera {
  background: #132631;
  border-radius: 12px;
  overflow: hidden;
  color: #d2dee5;
}
.camera-screen {
  height: 160px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
  background: linear-gradient(135deg, #172f3c, #0b1a24);
}
.camera-screen svg {
  width: 30px;
  height: 30px;
  margin: auto;
  stroke: #557e8e;
  fill: none;
  stroke-width: 1.5;
}
.camera-screen small {
  color: #8aa5b3;
  font-size: 0.75rem;
  letter-spacing: 0;
}
.camera-meta {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.camera-meta span {
  color: #7997a5;
  font-size: 0.75rem;
}
.camera-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.camera-controls input {
  margin: 0;
  max-width: 300px;
}
.camera-controls select {
  margin: 0;
  width: auto;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}
th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #e7edf1;
  font-size: 0.9rem;
}
th {
  color: #637c8a;
  font-weight: 500;
  font-size: 0.8rem;
}
.badge {
  font-size: 0.78rem;
  padding: 5px 8px;
  border-radius: 5px;
  color: #805916;
  background: #fff5de;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.login-brand {
  padding: 9vw 7vw;
  background: #101e2a;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand .brand {
  padding: 0;
  margin-bottom: 70px;
}
.login-brand h1 {
  font-size: 3.5rem;
  line-height: 1.12;
  letter-spacing: -2px;
  max-width: 500px;
}
.login-brand p {
  color: #9fb7c6;
  line-height: 1.8;
  max-width: 440px;
}
.login-brand em {
  color: #5de2c4;
  font-style: normal;
}
.login-form {
  max-width: 420px;
  margin: auto;
  padding: 35px;
  width: 100%;
}
.login-form h2 {
  font-size: 1.8rem;
}
.login-form .primary {
  width: 100%;
  margin: 10px 0 16px;
}
.login-form p {
  font-size: 0.9rem;
  line-height: 1.6;
}
.demo-button {
  width: 100%;
  background: #f2f6f8;
  margin-top: 15px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  width: min(600px, 94vw);
  max-height: 90dvh;
  color: inherit;
}
dialog::backdrop {
  background: #0a1d2bb0;
  backdrop-filter: blur(3px);
}
.icon {
  border: 0;
  font-size: 1.6rem;
  background: none;
  padding: 0 10px;
}
.product-row {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.product-row div {
  flex: 1;
}
.product-row small {
  display: block;
  letter-spacing: 0;
  margin-top: 5px;
}
.product-row input {
  width: 75px;
  margin: 0;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
}
.dialog-footer span {
  font-size: 1.5rem;
  font-weight: 700;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #16372e;
  color: white;
  padding: 15px 24px;
  border-radius: 10px;
  z-index: 100;
  display: none;
  max-width: 90vw;
  box-shadow: 0 8px 25px #0002;
}
#order-error {
  color: #a93939;
  font-size: 0.9rem;
  margin-top: 15px;
}
#login-error {
  color: #a93939;
}
.architecture {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.architecture div {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  line-height: 1.7;
}
.architecture strong {
  display: block;
}
.architecture span {
  font-size: 0.85rem;
  color: #718493;
}
@media (min-width: 1500px) {
  .content {
    padding: 40px 48px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .board {
    gap: 12px;
  }
  .order-card {
    padding: 15px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 1.6rem;
  }
  .camera-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 17px 14px;
  }
  .brand {
    padding: 0 0 14px;
    font-size: 1.25rem;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .sidebar > small,
  .sidebar-foot {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    margin: 0;
    gap: 4px;
  }
  .nav button {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .nav svg {
    width: 16px;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .topbar .muted {
    display: none;
  }
  .right {
    gap: 9px;
  }
  .content {
    padding: 24px 16px;
  }
  .heading {
    align-items: flex-start;
    margin-bottom: 24px;
  }
  .heading h1 {
    font-size: 1.6rem;
  }
  .heading p {
    font-size: 0.86rem;
  }
  .heading .primary {
    padding: 10px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .board {
    display: block;
  }
  .column-head {
    margin-top: 25px;
  }
  .order-card {
    padding: 20px;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar > .muted {
    display: none;
  }
  .camera-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .camera-screen {
    height: 130px;
  }
  .camera-meta {
    font-size: 0.78rem;
    padding: 12px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 40px 30px;
  }
  .login-brand .brand {
    margin-bottom: 30px;
  }
  .login-brand h1 {
    font-size: 2.3rem;
  }
  .login-brand p {
    margin-bottom: 0;
  }
  .login-form {
    padding: 35px 28px;
  }
  .mode {
    font-size: 0.68rem;
  }
  .notice {
    margin-top: 18px;
  }
}

.catalog-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
}
.catalog-table {
  margin-top: 20px;
}
#product-error {
  color: #a93939;
  margin: 14px 0 0;
}
@media (max-width: 1000px) {
  .catalog-fields {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 540px) {
  .catalog-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
