:root {
  --blue: #4169e1;
  --blue-dark: #3157cf;
  --blue-soft: rgba(65,105,225,.10);
  --blue-soft-hover: rgba(65,105,225,.16);
  --ink: #17233d;
  --muted: #788293;
  --line: #e9edf4;
  --panel: #fff;
  --soft: #f7f9fd;
  --danger: #c43f4c;
  --radius: 13px;
}
*,*::before,*::after { box-sizing: border-box; }
html { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button,input,select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(65,105,225,.32); outline-offset: 2px; }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { font-size: clamp(26px, 3.6vw, 37px); letter-spacing: -.038em; line-height: 1.15; font-weight: 710; margin-bottom: 11px; }
h2 { font-size: 18px; letter-spacing: -.02em; margin: 0; font-weight: 680; }
h3 { font-size: 16px; letter-spacing: -.02em; margin: 0; font-weight: 660; }
h4 { margin: 0; font-size: 14px; font-weight: 650; }
p { margin-bottom: 12px; }
.muted { color: var(--muted); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { font-size: 10px; letter-spacing: .15em; color: var(--blue); font-weight: 800; margin-bottom: 12px; }
.title-dot { color: var(--blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; white-space: nowrap; padding: 10px 19px; font-size: 13px; font-weight: 670; border: 1px solid transparent; border-radius: 100px; transition: background .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: var(--blue); background: var(--blue-soft); }
.btn-secondary:hover { background: var(--blue-soft-hover); }
.btn-wide { width: 100%; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; flex: 0 0 268px; height: 100vh; border-right: 1px solid var(--line); padding: 29px 17px 16px; overflow: auto; background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; color: var(--ink); font-size: 16px; font-weight: 770; letter-spacing: -.035em; }
.brand-mark { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 18px; font-weight: 800; font-style: italic; letter-spacing: -.08em; }
.new-order { margin-top: 42px; margin-bottom: 34px; }
.new-order span { font-size: 18px; font-weight: 400; line-height: 1; }
.sidebar-heading { color: #9ba4b3; font-size: 10px; font-weight: 770; letter-spacing: .14em; padding: 0 14px 12px; }
.order-nav { display: flex; flex-direction: column; gap: 3px; }
.order-nav-link { display: flex; align-items: center; gap: 11px; height: 39px; padding: 0 13px; border-radius: 10px; color: #505e77; font-size: 13px; font-weight: 540; }
.order-nav-link:hover, .order-nav-link.active { background: var(--blue-soft); color: var(--blue-dark); }
.nav-icon { font-size: 17px; line-height: 1; font-weight: 400; color: #96a0b3; }
.order-nav-link.active .nav-icon { color: var(--blue); }
.sidebar-empty { font-size: 12px; color: #adb4c2; padding: 0 14px; }
.sidebar-bottom { margin-top: auto; padding-top: 25px; }
.company-identity { display: flex; align-items: center; gap: 10px; padding: 11px 7px 6px; border-top: 1px solid var(--line); }
.company-avatar { display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 100px; width: 35px; height: 35px; font-weight: 700; flex: none; }
.company-text { display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 1.45; flex: 1; }
.company-text strong { font-size: 12px; font-weight: 675; }
.company-text span { color: var(--muted); font-size: 11px; }
.logout-button { border: 0; background: none; color: #8b95a5; font-size: 11px; margin-left: 47px; padding: 4px 0; }
.logout-button:hover { color: var(--blue); }
.main-column { flex: 1 1 auto; min-width: 0; }
.main-content { width: min(1110px, 100%); padding: 71px clamp(26px, 5.5vw, 82px) 95px; margin: 0 auto; }
.mobile-toolbar { display: none; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 52px; }
.page-heading > .btn { margin-top: 18px; }
.page-heading p { font-size: 14px; }
.compact-heading { margin: 17px 0 35px; }
.compact-heading h1 { margin-bottom: 10px; }
.back-link { display: inline-flex; align-items: center; color: #8a94a4; font-size: 12px; font-weight: 600; }
.back-link:hover { color: var(--blue); }
.content-section { margin-top: 10px; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.subtle-count { color: #9ba5b5; font-size: 11px; white-space: nowrap; }
.section-caption { margin: 5px 0 0; font-size: 12px; }
.order-list { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.order-list-item { display: flex; align-items: center; gap: 16px; padding: 19px 21px; border-top: 1px solid var(--line); transition: background .12s; }
.order-list-item:first-child { border-top: 0; }
.order-list-item:hover { background: var(--soft); }
.list-graphic { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 21px; }
.order-list-text { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.order-list-text strong { font-size: 13px; }
.order-list-text span { font-size: 11px; color: #9fa7b5; }
.list-arrow { color: #97a2b5; font-size: 17px; }
.empty-state { border: 1px dashed #dce4f1; border-radius: 20px; min-height: 280px; padding: 43px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h2 { margin-bottom: 9px; }
.empty-state p { max-width: 355px; font-size: 13px; margin-bottom: 22px; }
.empty-symbol { color: var(--blue); background: var(--blue-soft); border-radius: 14px; font-size: 30px; width: 59px; height: 59px; display: grid; place-items: center; margin-bottom: 20px; }
.form-card { max-width: 630px; padding: 31px; border: 1px solid var(--line); border-radius: 17px; }
.stack-form { display: flex; flex-direction: column; gap: 20px; }
label { display: block; font-weight: 620; color: #4a5870; font-size: 12px; }
input,select { display: block; width: 100%; min-width: 0; border: 1px solid #e0e6ef; background: #fff; color: var(--ink); border-radius: 10px; min-height: 41px; padding: 10px 12px; margin-top: 8px; outline: none; font-size: 13px; font-weight: 480; }
input::placeholder { color: #afb6c2; }
input:focus,select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field-hint { font-weight: 450; color: #adb5c0; padding-left: 3px; }
.required { color: var(--blue); }
.small-note { color: #929bac; font-size: 11px; line-height: 1.6; margin: -6px 0 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.field-row { display: flex; gap: 14px; }
.field-row label { flex: 1; }
.notice { border-radius: 11px; background: #edf5ff; border: 1px solid #d9e7ff; color: #325ba3; padding: 11px 14px; margin-bottom: 24px; font-size: 12px; font-weight: 560; }
.notice.error { background: #fff0f1; border-color: #ffe0e2; color: #a83546; }
.status-chip { display: inline-block; margin-top: 24px; background: #edf6f1; color: #418364; font-size: 10px; font-weight: 730; padding: 7px 13px; border-radius: 100px; white-space: nowrap; }
.plain-link { color: var(--blue); font-weight: 590; }
.gap-after { margin-bottom: 23px; }
.hint-box { border: 1px dashed #dfe7f3; background: #fbfcff; color: #929eaf; border-radius: 12px; padding: 18px; margin-bottom: 22px; font-size: 12px; }
.location-card { border: 1px solid #e6ebf3; border-radius: 17px; padding: 24px 24px 20px; margin-bottom: 18px; }
.location-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 23px; }
.location-heading > div { display: grid; grid-template-columns: 30px 1fr; align-items: center; }
.location-icon { color: var(--blue); background: var(--blue-soft); width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-size: 19px; grid-row: 1 / 3; }
.location-address { grid-column: 2; font-size: 11px; margin: 0; }
.mini-tag { background: #f6f8fb; color: #9da5b2; font-size: 10px; padding: 5px 11px; border-radius: 100px; }
.system-block { border-top: 1px solid #edf0f6; margin-bottom: 17px; padding: 21px 0 1px; }
.system-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.system-label { display: block; color: #a4aebe; font-size: 9px; font-weight: 800; letter-spacing: .12em; margin-bottom: 1px; }
.position-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.position-table th { color: #9ca7b7; font-weight: 670; font-size: 10px; padding: 9px 10px; background: #fafbfe; }
.position-table th:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.position-table th:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.position-table td { padding: 14px 10px; border-bottom: 1px solid #eff2f7; vertical-align: middle; }
.position-table td strong { font-weight: 570; }
.position-table tr:last-child td { border-bottom: none; }
.position-table th:nth-child(1) { width: 46%; }
.position-table th:nth-child(2) { width: 20%; }
.position-table th:nth-child(3) { width: 19%; }
.position-table th:nth-child(4) { width: 15%; }
.bkp-pill { color: var(--blue); background: var(--blue-soft); border-radius: 100px; padding: 5px 10px; font-weight: 675; font-size: 11px; white-space: nowrap; }
.row-actions { white-space: nowrap; }
.small-link { color: var(--blue); font-weight: 625; font-size: 11px; background: transparent; border: 0; padding: 2px; }
.danger-link { font-size: 17px; color: #b9c1cc; margin-left: 10px; vertical-align: middle; }
.danger-link:hover { color: var(--danger); }
.inline-delete { display: inline; }
.no-positions { color: #a0a9b9; font-size: 12px; padding: 12px 0 4px; }
.add-details { padding-top: 12px; }
.add-details summary { list-style: none; cursor: pointer; display: inline-flex; }
.add-details summary::-webkit-details-marker { display: none; }
.text-action { color: var(--blue); font-size: 12px; font-weight: 675; }
.text-action:hover { color: var(--blue-dark); }
.add-details[open] summary { margin-bottom: 14px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 17px; background: #fafbfe; border: 1px solid #edf1f8; border-radius: 13px; }
.inline-form label { flex: 1 1 150px; }
.inline-form label input, .inline-form label select { margin-top: 7px; }
.inline-form .btn { min-height: 41px; flex: 0 0 auto; }
.position-form { gap: 9px; }
.position-form .flex-name { flex: 1 1 210px; }
.position-form .flex-bkp { flex: 1 1 195px; }
.position-form .flex-qty { flex: 0 1 90px; }
.position-form .flex-unit { flex: 0 1 110px; }
.add-system { border-top: 1px solid #eff2f7; margin-top: 12px; }
.short-form label { flex: 1 1 250px; }
.small-empty { font-size: 12px; margin: -8px 0 18px; }
.add-location-card { border: 1px dashed #cddcf2; border-radius: 17px; padding: 25px; margin-top: 26px; }
.add-location-card .section-top { margin-bottom: 17px; }
.new-location-form { border: 0; background: transparent; padding: 0; }
.new-location-form label { flex: 1 1 180px; }
.guest-page { min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 40px 20px; }
.guest-shell { width: min(440px, 100%); }
.guest-brand { justify-content: center; margin-bottom: 31px; padding: 0; }
.auth-card { border: 1px solid var(--line); padding: 39px; border-radius: 19px; box-shadow: 0 24px 65px rgba(29,45,79,.04); }
.auth-card h1 { font-size: 28px; }
.intro { margin-bottom: 28px; font-size: 13px; }
.auth-card .stack-form { gap: 19px; }
.auth-card .stack-form > .btn { margin-top: 5px; }
.form-separator { height: 1px; background: var(--line); margin: 1px 0; }
@media (max-width: 1000px) {
  .sidebar { flex-basis: 238px; }
  .main-content { padding: 55px 30px 75px; }
  .position-form .flex-qty, .position-form .flex-unit { flex: 1 1 100px; }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; z-index: 10; top: 58px; left: 0; width: min(290px,85vw); height: calc(100dvh - 58px); transform: translateX(-102%); transition: transform .18s ease; border-top: 1px solid var(--line); box-shadow: 8px 14px 30px rgba(27,43,82,.04); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar > .brand { display: none; }
  .sidebar > .new-order { margin-top: 5px; }
  .mobile-toolbar { display: flex; align-items: center; justify-content: space-between; height: 58px; border-bottom: 1px solid var(--line); padding: 0 19px; color: var(--ink); font-weight: 730; font-size: 14px; }
  .menu-toggle { background: var(--blue-soft); color: var(--blue); border: 0; border-radius: 100px; padding: 8px 13px; display: inline-flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 660; }
  .main-content { padding: 35px 18px 60px; }
  .page-heading { margin-bottom: 30px; }
  .page-heading > .btn { display: none; }
  .compact-heading { margin-bottom: 28px; }
  .form-card { padding: 21px; }
  .location-card { padding: 19px 16px; }
  .add-location-card { padding: 19px 16px; }
  .inline-form .btn { width: 100%; }
  .position-table { min-width: 530px; }
  .table-scroll { width: 100%; overflow: auto; }
  .guest-page { align-items: flex-start; }
  .auth-card { padding: 26px; }
}
