
:root {
  --blue: #0b63f6;
  --blue-dark: #0848b8;
  --blue-soft: #edf4ff;
  --ink: #12233f;
  --muted: #66758c;
  --line: #e4eaf2;
  --canvas: #f5f8fc;
  --white: #ffffff;
  --green: #16835b;
  --green-soft: #e9f8f1;
  --amber: #a96700;
  --amber-soft: #fff6df;
  --red: #c53b3b;
  --red-soft: #fff0ef;
  --shadow: 0 12px 36px rgba(34, 66, 112, 0.08);
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }

body { font-family: var(--font-sans); }

button, input, select { font: inherit; }
button { color: inherit; }

.erp-shell { min-height: 100vh; background: var(--canvas); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 244px;
  flex-direction: column;
  border-right: 1px solid #dfe7f2;
  background: #fff;
  padding: 24px 16px 18px;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #0b63f6, #0846b6);
  box-shadow: 0 8px 18px rgba(11, 99, 246, .24);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand span { margin-top: 4px; color: #8592a5; font-size: 11px; }
.mobile-close { display: none; margin-left: auto; border: 0; background: transparent; }

.main-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.nav-caption { padding: 4px 13px 6px; color: #9aa6b7; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.nav-caption-spaced { margin-top: 16px; }
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  padding: 11px 12px;
  color: #536278;
  cursor: pointer;
  font-size: 13px;
  font-weight: 590;
  text-align: left;
}
.nav-item:hover { background: #f6f8fb; }
.nav-item-active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.nav-item-active:hover { background: var(--blue-soft); }
.soon-tag { margin-left: auto; border-radius: 999px; background: #f0f3f7; padding: 3px 6px; color: #98a4b4; font-size: 9px; font-weight: 700; }

.connection-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 2px 14px;
  border: 1px solid #e0e8f4;
  border-radius: 13px;
  background: #f9fbfe;
  padding: 11px;
}
.connection-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; background: #fff0ed; color: #ee4d2d; }
.connection-card > div:last-child { display: flex; flex-direction: column; }
.connection-card strong { font-size: 12px; }
.connection-card span { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #748197; font-size: 10px; }
.connection-card i { width: 6px; height: 6px; border-radius: 50%; background: #25a36f; box-shadow: 0 0 0 3px #ddf5eb; }

.sidebar-user { display: flex; align-items: center; gap: 9px; border-top: 1px solid #edf1f6; padding: 17px 7px 0; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #eaf2ff; color: var(--blue); font-size: 11px; font-weight: 800; }
.sidebar-user > div:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.sidebar-user strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { margin-top: 3px; color: #8b97a8; font-size: 9px; }
.sidebar-user > svg { color: #9ba7b7; }

.content { min-height: 100vh; margin-left: 244px; }
.topbar { display: flex; height: 58px; align-items: center; justify-content: flex-end; border-bottom: 1px solid #e5ebf3; background: rgba(255,255,255,.9); padding: 0 34px; backdrop-filter: blur(12px); }
.prototype-badge { display: flex; align-items: center; gap: 7px; border: 1px solid #dce6f5; border-radius: 999px; background: #fff; padding: 6px 10px; color: #75839a; font-size: 10px; font-weight: 650; }
.prototype-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #e4efff; }
.mobile-menu, .mobile-brand { display: none; }

.page-wrap { width: min(1500px, 100%); margin: 0 auto; padding: 28px 32px 46px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.title-line { display: flex; align-items: center; gap: 13px; }
.page-heading h1 { margin: 0; font-size: 27px; font-weight: 750; letter-spacing: -.04em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.last-update { display: flex; align-items: center; gap: 5px; border-left: 1px solid #dce3ed; padding-left: 13px; color: #78879b; font-size: 10px; font-weight: 560; }
.heading-actions { display: flex; gap: 9px; }
.button { display: inline-flex; height: 38px; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 0 14px; cursor: pointer; font-size: 11px; font-weight: 680; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { border: 1px solid var(--blue); background: var(--blue); box-shadow: 0 7px 16px rgba(11,99,246,.2); color: #fff; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border: 1px solid #dbe3ee; background: #fff; color: #536278; }
.button-secondary:hover { background: #f9fbfd; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 23px; }
.stat-card { display: flex; min-width: 0; align-items: flex-start; gap: 12px; border: 1px solid #e1e8f1; border-radius: 14px; background: #fff; padding: 16px; box-shadow: 0 5px 16px rgba(36,68,111,.035); }
.stat-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.stat-icon-blue { background: #eaf2ff; color: var(--blue); }
.stat-icon-green { background: var(--green-soft); color: var(--green); }
.stat-icon-amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon-red { background: var(--red-soft); color: var(--red); }
.stat-copy { display: flex; min-width: 0; flex-direction: column; }
.stat-copy > span { color: #75839a; font-size: 10px; font-weight: 590; }
.stat-copy > strong { margin-top: 4px; color: #172b4b; font-size: 19px; letter-spacing: -.035em; white-space: nowrap; }
.stat-copy small { margin-top: 4px; color: #8a96a8; font-size: 9px; }
.stat-copy small b { color: var(--green); font-weight: 700; }

.orders-panel { margin-top: 15px; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.panel-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid #e7ecf3; padding: 0 17px; }
.panel-tabs button { position: relative; display: flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 15px 10px 13px; color: #718097; cursor: pointer; font-size: 10px; font-weight: 650; white-space: nowrap; }
.panel-tabs button::after { position: absolute; right: 9px; bottom: -1px; left: 9px; height: 2px; border-radius: 2px; background: transparent; content: ""; }
.panel-tabs button.tab-active { color: var(--blue); }
.panel-tabs button.tab-active::after { background: var(--blue); }
.panel-tabs button span { display: grid; min-width: 19px; height: 18px; place-items: center; border-radius: 999px; background: #f0f3f7; padding: 0 5px; color: #77859a; font-size: 8px; }
.panel-tabs button.tab-active span { background: #e9f1ff; color: var(--blue); }

.filters-row { display: flex; gap: 9px; border-bottom: 1px solid #e8edf3; padding: 13px 17px; }
.search-box { display: flex; height: 36px; min-width: 270px; flex: 1; align-items: center; gap: 8px; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; padding: 0 10px; color: #8794a6; }
.search-box:focus-within { border-color: #9dbff7; box-shadow: 0 0 0 3px #edf4ff; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); font-size: 10px; }
.search-box input::placeholder { color: #9ba7b7; }
.search-box button { display: grid; border: 0; background: transparent; color: #9aa6b6; cursor: pointer; }
.filter-button, .select-filter { display: flex; height: 36px; align-items: center; gap: 7px; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; padding: 0 10px; color: #617086; font-size: 10px; font-weight: 580; white-space: nowrap; }
.filter-button { cursor: pointer; }
.select-filter select { appearance: none; border: 0; outline: 0; background: transparent; color: inherit; cursor: pointer; font-size: inherit; font-weight: inherit; }

.order-list-head, .order-row { display: grid; grid-template-columns: 1.35fr 1.42fr .82fr .78fr .82fr 1.22fr 25px; column-gap: 12px; align-items: center; }
.order-list-head { min-height: 35px; border-bottom: 1px solid #e8edf3; background: #f8fafc; padding: 0 17px; color: #8793a5; font-size: 8px; font-weight: 730; letter-spacing: .045em; text-transform: uppercase; }
.order-row { width: 100%; min-height: 65px; border: 0; border-bottom: 1px solid #edf1f5; background: #fff; padding: 9px 17px; cursor: pointer; text-align: left; transition: background .15s, box-shadow .15s; }
.order-row:hover { position: relative; background: #f8fbff; box-shadow: inset 3px 0 var(--blue); }
.order-row:focus-visible { outline: 3px solid #b9d3fc; outline-offset: -3px; }
.order-row:last-child { border-bottom: 0; }
.order-main, .items-cell, .money-cell { display: flex; min-width: 0; flex-direction: column; }
.order-main strong { overflow: hidden; color: #19345c; font-family: var(--font-geist-mono), monospace; font-size: 10px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.order-main small, .items-cell small, .money-cell small { margin-top: 4px; color: #8a97a9; font-size: 8px; font-weight: 500; }
.items-cell { flex-direction: row; align-items: center; gap: 8px; }
.items-cell > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.items-cell strong { overflow: hidden; color: #354966; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-thumb { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border: 1px solid #dae5f4; border-radius: 8px; background: linear-gradient(145deg, #f8fbff, #e9f2ff); color: #5e80ae; font-size: 8px; font-weight: 800; }
.status-pill { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; border: 1px solid transparent; border-radius: 999px; padding: 5px 8px; overflow: hidden; font-size: 8px; font-weight: 680; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.status-green { border-color: #ccebdd; background: var(--green-soft); color: var(--green); }
.status-amber { border-color: #f4dfac; background: var(--amber-soft); color: var(--amber); }
.status-red { border-color: #f0ccca; background: var(--red-soft); color: var(--red); }
.status-blue { border-color: #cfdef8; background: var(--blue-soft); color: var(--blue); }
.status-slate { border-color: #dfe4ea; background: #f1f3f6; color: #667386; }
.money-cell strong { color: #2f435f; font-size: 9px; font-weight: 690; }
.row-arrow { display: grid; place-items: center; color: #a3adbb; }

.empty-state { display: flex; min-height: 220px; align-items: center; justify-content: center; flex-direction: column; color: #8b98aa; }
.empty-state strong { margin-top: 10px; color: #52637a; font-size: 12px; }
.empty-state span { margin-top: 5px; font-size: 10px; }
.panel-footer { display: flex; min-height: 52px; align-items: center; justify-content: space-between; border-top: 1px solid #e7edf4; padding: 0 17px; color: #8895a7; font-size: 9px; }
.panel-footer > span strong { color: #536278; }
.pagination { display: flex; align-items: center; gap: 3px; }
.pagination button { height: 27px; min-width: 27px; border: 1px solid #e0e6ee; border-radius: 7px; background: #fff; padding: 0 7px; color: #69778b; cursor: pointer; font-size: 8px; }
.pagination button:disabled { cursor: default; opacity: .45; }
.pagination .page-active { border-color: var(--blue); background: var(--blue); color: #fff; }

.drawer-overlay, .nav-overlay { position: fixed; inset: 0; z-index: 60; border: 0; background: rgba(13,27,48,.34); backdrop-filter: blur(2px); }
.order-drawer { position: fixed; inset: 0 0 0 auto; z-index: 70; width: min(480px, 94vw); overflow-y: auto; background: #f7f9fc; box-shadow: -20px 0 55px rgba(19,38,66,.18); animation: slideIn .22s ease-out; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; min-height: 72px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e1e7ef; background: rgba(255,255,255,.95); padding: 14px 20px; backdrop-filter: blur(12px); }
.drawer-head > div { display: flex; flex-direction: column; }
.drawer-head span { color: #8290a3; font-size: 9px; }
.drawer-head h2 { margin: 4px 0 0; color: #19345c; font-family: var(--font-geist-mono), monospace; font-size: 15px; letter-spacing: -.02em; }
.drawer-head button, .modal-head > button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #e1e7ef; border-radius: 9px; background: #fff; color: #718096; cursor: pointer; }
.drawer-body { display: flex; flex-direction: column; gap: 11px; padding: 15px; }
.drawer-summary { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }
.drawer-summary > div { display: flex; min-height: 63px; align-items: flex-start; justify-content: center; flex-direction: column; border: 1px solid #e1e8f1; border-radius: 12px; background: #fff; padding: 11px; }
.drawer-summary > div > span:first-child { margin-bottom: 8px; color: #8794a6; font-size: 9px; font-weight: 600; }
.detail-section { border: 1px solid #e1e8f1; border-radius: 13px; background: #fff; padding: 14px; }
.detail-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: #2e435f; font-size: 11px; font-weight: 720; }
.detail-section h3 span { display: grid; min-width: 17px; height: 17px; place-items: center; border-radius: 999px; background: #eaf2ff; color: var(--blue); font-size: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-grid > div { display: flex; flex-direction: column; }
.detail-grid span { color: #8a97a8; font-size: 8px; }
.detail-grid strong { margin-top: 4px; color: #3b4f69; font-size: 10px; }
.drawer-items { display: flex; flex-direction: column; gap: 8px; }
.drawer-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; border-radius: 10px; background: #f7f9fc; padding: 9px; }
.product-thumb-lg { width: 36px; height: 36px; }
.drawer-item > div { display: flex; flex-direction: column; }
.drawer-item > div:nth-child(2) strong { color: #304762; font-size: 9px; }
.drawer-item > div:nth-child(2) span { margin-top: 4px; color: #8895a7; font-size: 8px; }
.drawer-item > div:last-child { align-items: flex-end; }
.drawer-item > div:last-child span { color: #8a97a8; font-size: 7px; }
.drawer-item > div:last-child strong { margin-top: 4px; color: #2f4663; font-size: 9px; }
.money-line { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px dashed #e7ecf2; padding: 8px 0; }
.money-line:last-child { border-bottom: 0; padding-bottom: 0; }
.money-line span { color: #738198; font-size: 9px; }
.money-line strong { color: #3a4d66; font-size: 9px; }
.money-line-strong { margin-top: 3px; border-top: 1px solid #e2e8f0; border-bottom: 0; padding-top: 11px; }
.money-line-strong span, .money-line-strong strong { color: #172f53; font-size: 10px; font-weight: 750; }
.money-line strong.negative, .negative { color: var(--red); }
.reconciliation-box { border-color: #d8e5f8; background: #fbfdff; }
.reconciliation-result { display: flex; align-items: center; gap: 9px; margin-top: 12px; border-radius: 10px; background: var(--blue-soft); padding: 10px; color: var(--blue); }
.reconciliation-result div { display: flex; flex-direction: column; }
.reconciliation-result span { color: #6b83a7; font-size: 7px; }
.reconciliation-result strong { margin-top: 3px; color: #244d8e; font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(13,27,48,.42); padding: 18px; backdrop-filter: blur(3px); }
.import-modal { width: min(500px, 100%); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 28px 80px rgba(13,31,57,.28); animation: modalIn .18s ease-out; }
@keyframes modalIn { from { transform: translateY(10px) scale(.985); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid #e6ebf2; padding: 16px 18px; }
.modal-icon { display: grid; width: 41px; height: 41px; place-items: center; border-radius: 11px; background: #eaf2ff; color: var(--blue); }
.modal-head > div:nth-child(2) { display: flex; flex-direction: column; }
.modal-head span { color: #8794a6; font-size: 8px; }
.modal-head h2 { margin: 4px 0 0; color: #213a5e; font-size: 14px; letter-spacing: -.02em; }
.modal-body { padding: 17px 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-grid label { display: flex; flex-direction: column; gap: 6px; }
.field-grid label span, fieldset legend { color: #64738a; font-size: 9px; font-weight: 650; }
.field-grid select { height: 38px; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; padding: 0 10px; color: #344a67; outline: 0; font-size: 10px; }
fieldset { display: flex; margin: 17px 0 0; border: 0; padding: 0; flex-direction: column; gap: 7px; }
fieldset legend { margin-bottom: 7px; padding: 0; }
.radio-card { position: relative; display: flex; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card > span { display: grid; width: 100%; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; border: 1px solid #dfe6ef; border-radius: 10px; padding: 10px 11px; color: #718096; }
.radio-card svg { grid-row: 1 / 3; }
.radio-card b { color: #344a67; font-size: 10px; }
.radio-card small { margin-top: 3px; color: #8b97a8; font-size: 8px; }
.radio-card input:checked + span { border-color: #94baf8; background: #f2f7ff; box-shadow: 0 0 0 2px #e5efff; color: var(--blue); }
.radio-card input:checked + span b { color: #1e56ab; }
.modal-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; border-radius: 10px; background: #f7f9fc; padding: 10px; color: #728198; }
.modal-note span { font-size: 8px; line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #e6ebf2; background: #fafbfd; padding: 13px 18px; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .order-list-head, .order-row { grid-template-columns: 1.3fr 1.35fr .8fr .75fr 1.15fr 22px; }
  .order-list-head > span:nth-child(5), .order-row > span:nth-child(5) { display: none; }
}

@media (max-width: 900px) {
  .sidebar { width: 224px; transform: translateX(-105%); transition: transform .22s ease-out; }
  .sidebar-open { transform: translateX(0); }
  .mobile-close { display: grid; place-items: center; cursor: pointer; }
  .content { margin-left: 0; }
  .topbar { justify-content: flex-start; gap: 10px; padding: 0 20px; }
  .mobile-menu { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #dfe6ef; border-radius: 9px; background: #fff; cursor: pointer; }
  .mobile-brand { display: block; flex: 1; font-size: 12px; font-weight: 730; }
  .nav-overlay { z-index: 20; }
  .page-wrap { padding: 24px 20px 38px; }
}

@media (max-width: 720px) {
  .page-heading { flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .stats-grid { grid-template-columns: 1fr; }
  .filters-row { flex-wrap: wrap; }
  .search-box { width: 100%; min-width: 100%; }
  .filter-button, .select-filter { flex: 1; justify-content: center; }
  .order-list-head { display: none; }
  .order-row { grid-template-columns: 1fr 1fr; gap: 14px 12px; align-items: start; padding: 15px; }
  .order-row > span { display: flex !important; min-width: 0; flex-direction: column; align-items: flex-start; }
  .order-row > span::before { margin-bottom: 5px; color: #9aa5b4; content: attr(data-label); font-size: 7px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
  .order-row .items-cell { display: grid !important; grid-template-columns: auto 1fr; flex-direction: row; }
  .order-row .items-cell::before { grid-column: 1 / 3; }
  .order-row .row-arrow { display: none !important; }
  .status-pill { max-width: 100%; }
  .panel-footer { flex-direction: column; gap: 11px; padding: 13px; }
  .pagination button:nth-of-type(4), .pagination button:nth-of-type(5), .pagination span { display: none; }
}

@media (max-width: 460px) {
  .topbar { height: 53px; padding: 0 14px; }
  .prototype-badge { padding: 5px 7px; font-size: 8px; }
  .page-wrap { padding: 19px 13px 30px; }
  .title-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .last-update { border-left: 0; padding-left: 0; }
  .heading-actions { flex-direction: column; }
  .heading-actions .button { width: 100%; }
  .panel-tabs { padding: 0 9px; }
  .filters-row { padding: 11px; }
  .filter-button, .select-filter { width: 100%; flex-basis: 100%; }
  .order-row { grid-template-columns: 1fr; }
  .drawer-summary, .detail-grid, .field-grid { grid-template-columns: 1fr; }
  .drawer-item { grid-template-columns: auto 1fr; }
  .drawer-item > div:last-child { grid-column: 2; align-items: flex-start; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

[x-cloak] { display: none !important; }
a { color: inherit; text-decoration: none; }
.nav-item-disabled { cursor: default; }
.logout-button { border: 0; background: transparent; color: #8a97a8; cursor: pointer; font-size: 9px; font-weight: 700; }
.logout-button:hover { color: var(--red); }
.connection-card i.offline { background: #9aa6b7; box-shadow: 0 0 0 3px #edf0f4; }
.flash-message, .sync-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; border: 1px solid #ccebdd; border-radius: 12px; background: var(--green-soft); padding: 11px 13px; color: var(--green); font-size: 10px; font-weight: 650; }
.sync-banner { justify-content: space-between; border-color: #cfe0fb; background: var(--blue-soft); color: var(--blue); }
.sync-banner > div { display: flex; align-items: center; gap: 9px; }
.sync-banner > div > span { display: flex; flex-direction: column; gap: 3px; color: #5e7598; font-weight: 500; }
.sync-banner > div strong { color: #24549a; }
.sync-banner > span { color: #56749f; font-size: 9px; white-space: nowrap; }
.date-filter { display: flex; height: 36px; align-items: center; gap: 6px; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; padding: 0 9px; color: #617086; font-size: 9px; font-weight: 650; white-space: nowrap; }
.date-filter input { width: 102px; border: 0; outline: 0; background: transparent; color: #3c506c; font-size: 9px; }
.orders-list.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.form-error { border: 1px solid #f0ccca; border-radius: 9px; background: var(--red-soft); padding: 9px 10px; color: var(--red); font-size: 10px; line-height: 1.45; }
.modal-error { margin-top: 12px; }

/* Login */
.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(135deg, #2455ce 0%, #155edf 48%, #0b6cf4 100%);
  color: #182a49;
}

.login-page::before {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.13), transparent 24%),
    radial-gradient(circle at 88% 82%, rgba(0,42,132,.18), transparent 30%);
  content: "";
  pointer-events: none;
}

.login-decoration { position: fixed; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; pointer-events: none; }
.login-decoration-one { top: -160px; right: -110px; width: 430px; height: 430px; }
.login-decoration-two { bottom: -250px; left: -180px; width: 520px; height: 520px; }

.login-viewport {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  padding: 42px 24px 24px;
}

.login-shell {
  display: grid;
  width: min(1080px, 100%);
  min-height: 520px;
  grid-template-columns: minmax(500px, 52%) 1fr;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 48px;
  background: rgba(18,82,212,.2);
  box-shadow: 0 34px 90px rgba(3,35,111,.28);
}

.login-access-panel {
  position: relative;
  z-index: 2;
  display: grid;
  width: calc(100% + 54px);
  place-items: center;
  border-radius: 46px 230px 230px 46px;
  background: #fff;
  padding: 48px 104px 48px 48px;
  box-shadow: 18px 0 45px rgba(4,44,132,.11);
}

.login-access-content { width: min(340px, 100%); }

.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #0b6cf4, #1749c7);
  box-shadow: 0 9px 21px rgba(11,99,246,.24);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -.04em;
}
.login-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.login-brand-copy strong { color: #1749c7; font-size: 21px; font-weight: 800; letter-spacing: -.045em; }
.login-brand-copy small { margin-top: 6px; color: #7a89a1; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

.login-heading { margin-top: 26px; text-align: center; }
.login-heading > span { color: #155edf; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.login-heading h1 { margin: 7px 0 0; color: #192d4e; font-size: 25px; font-weight: 780; letter-spacing: -.045em; }
.login-heading p { margin: 7px 0 0; color: #718098; font-size: 12px; line-height: 1.55; }

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid #efc5c2;
  border-radius: 10px;
  background: #fff3f2;
  padding: 9px 10px;
  color: #b72f2f;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.45;
}
.login-alert svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.login-form { display: flex; margin-top: 20px; flex-direction: column; gap: 13px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field > label { color: #41516b; font-size: 11px; font-weight: 720; }
.login-input-shell {
  display: flex;
  height: 45px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  background: #f8faff;
  box-shadow: 0 1px 2px rgba(23,48,85,.03);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-input-shell:focus-within { border-color: #3c78eb; background: #fff; box-shadow: 0 0 0 3px rgba(21,94,223,.12); }
.login-input-shell.has-error { border-color: #dd7771; background: #fff9f8; }
.login-input-shell > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-left: 13px;
  fill: none;
  stroke: #65748e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.login-input-shell input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: #182b4b;
  font-size: 12px;
}
.login-input-shell input::placeholder { color: #a1adbd; }
.login-input-shell input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f8faff inset; -webkit-text-fill-color: #182b4b; }

.password-toggle {
  display: grid;
  width: 42px;
  height: 100%;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-left: 1px solid #e4e9f1;
  background: #fff;
  color: #61718b;
  cursor: pointer;
}
.password-toggle:hover { background: #f2f6fd; color: #155edf; }
.password-toggle:focus-visible { outline: 3px solid rgba(21,94,223,.22); outline-offset: -3px; }
.password-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.password-toggle .eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.remember-row { display: flex; width: fit-content; align-items: center; gap: 7px; color: #697992; cursor: pointer; font-size: 10px; font-weight: 560; }
.remember-row input { width: 14px; height: 14px; margin: 0; accent-color: #155edf; cursor: pointer; }

.login-submit {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #124bc8;
  border-radius: 10px;
  background: linear-gradient(135deg, #173fd0, #0b67ec);
  box-shadow: 0 10px 22px rgba(20,79,205,.23);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 27px rgba(20,79,205,.29); filter: brightness(1.04); }
.login-submit:active { transform: translateY(0); }
.login-submit:focus-visible { outline: 3px solid rgba(21,94,223,.25); outline-offset: 3px; }
.login-submit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.login-support { margin: 14px 0 0; color: #8996a8; font-size: 10px; text-align: center; }

.login-welcome-panel { display: flex; align-items: center; padding: 52px 58px 52px 100px; color: #fff; }
.login-welcome-content { width: min(390px, 100%); }
.login-environment { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.09); padding: 7px 10px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.login-environment i { width: 6px; height: 6px; border-radius: 50%; background: #7ff3c0; box-shadow: 0 0 0 4px rgba(127,243,192,.12); }
.login-welcome-panel h2 { margin: 22px 0 0; color: #fff; font-size: clamp(26px, 2.4vw, 34px); font-weight: 770; letter-spacing: -.05em; line-height: 1.08; }
.login-welcome-panel p { margin: 15px 0 0; color: rgba(255,255,255,.88); font-size: 13px; line-height: 1.7; }
.login-benefits { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 25px; }
.login-benefits span { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.92); font-size: 11px; font-weight: 620; }
.login-benefits i { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); color: #a8f5d2; font-size: 9px; font-style: normal; }

.login-footer { display: flex; width: min(1080px, 100%); align-items: center; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.78); font-size: 10px; font-weight: 560; }

@media (max-width: 900px) {
  .login-shell { width: min(520px, 100%); min-height: auto; grid-template-columns: 1fr; border-radius: 32px; background: #fff; }
  .login-access-panel { width: 100%; border-radius: 30px; padding: 44px 48px 38px; box-shadow: none; }
  .login-welcome-panel { display: none; }
  .login-footer { width: min(520px, 100%); }
}

@media (max-width: 720px) {
  .date-filter { flex: 1; justify-content: center; }
  .sync-banner { align-items: flex-start; flex-direction: column; }
  .login-viewport { gap: 18px; padding: 24px 16px 18px; }
  .login-footer { justify-content: center; text-align: center; }
  .login-footer span:last-child { display: none; }
}

@media (max-width: 460px) {
  .date-filter { width: 100%; flex-basis: 100%; }
  .date-filter input { flex: 1; }
  .login-shell { border-width: 1px; border-radius: 25px; }
  .login-access-panel { border-radius: 24px; padding: 32px 22px 27px; }
  .login-brand-mark { width: 38px; height: 38px; border-radius: 11px; }
  .login-brand-copy strong { font-size: 19px; }
  .login-heading { margin-top: 22px; }
  .login-heading h1 { font-size: 22px; }
}
