:root {
  --orange: #ff5a16;
  --orange-dark: #e84b0f;
  --ink: #111827;
  --muted: #64748b;
  --line: #dfe4ea;
  --soft: #f5f7fa;
  --green: #07883a;
  --sidebar: #07111d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f3f5f7;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button, input, select { font: inherit; }

button {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

input, select {
  width: 100%;
  min-height: 39px;
  margin-top: 6px;
  border: 1px solid #d4dae3;
  border-radius: 5px;
  background: #fff;
  padding: 8px 11px;
  color: var(--ink);
}

label {
  display: block;
  color: #4b5563;
  font-size: 12px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  height: 100vh;
  background: radial-gradient(circle at 50% 0, #182838, var(--sidebar) 48%, #030914);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.sidebar-logo {
  flex: 0 0 auto;
  height: 138px;
  display: grid;
  place-items: center;
}

.logo-ring {
  width: 96px;
  height: 96px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 0 22px rgba(255, 90, 22, .23) inset;
}

.side-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 10px;
  scrollbar-gutter: stable;
}

.side-nav::-webkit-scrollbar { width: 8px; }
.side-nav::-webkit-scrollbar-track { background: rgba(255,255,255,.06); }
.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.28);
  border-radius: 999px;
}
.side-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.42); }

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 24px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.side-nav a.active {
  background: linear-gradient(90deg, var(--orange), #ff6a22);
}

.side-nav a:not(.active):hover { background: rgba(255,255,255,.07); }
.side-nav a span { width: 18px; text-align: center; color: #fff; }
.side-nav a.sub { min-height: 31px; padding-left: 55px; font-size: 13px; font-weight: 500; color: #e5e7eb; }
.side-nav hr { width: calc(100% - 48px); border: 0; border-top: 1px solid rgba(255,255,255,.16); margin: 14px auto; }
.sidebar small {
  flex: 0 0 auto;
  margin: 10px 0 16px 36px;
  color: #c9d1db;
  font-size: 12px;
}

.app-main {
  margin-left: 218px;
  min-height: 100vh;
}

.topbar {
  height: 116px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px 0 26px;
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.topbar h1 span { color: var(--orange); }
.topbar p { margin: 10px 0 0; color: #111827; }

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile b, .profile span { display: block; }
.profile span { color: #4b5563; }
.profile > a {
  margin-left: 18px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  color: #ff2c22;
  text-decoration: none;
}

.cart-top-wrap {
  position: relative;
}

.cart-top {
  min-width: 48px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #111827;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
}

.cart-top b {
  min-width: 20px;
  min-height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
}

.cart-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(420px, calc(100vw - 32px));
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

.cart-top-wrap.is-open .cart-popover {
  display: block;
}

.cart-popover-head,
.cart-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.cart-popover-head {
  border-bottom: 1px solid var(--line);
}

.cart-popover-head span {
  color: var(--muted);
  font-size: 12px;
}

.cart-popover-items {
  max-height: 320px;
  overflow: auto;
}

.cart-popover-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 30px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
}

.cart-popover-item b {
  display: block;
  max-height: 38px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
}

.cart-popover-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.cart-popover-item span {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.cart-popover-item button,
.cart-popover-qty button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #94a3b8;
  font-size: 18px;
}

.cart-popover-item button:hover,
.cart-popover-qty button:hover {
  border-color: #ffb4ac;
  color: #ff2c22;
}

.cart-popover-qty {
  display: grid;
  grid-template-columns: 30px 32px 30px;
  align-items: center;
  gap: 4px;
}

.cart-popover-qty span {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid #eef2f6;
  border-radius: 5px;
  font-weight: 700;
}

.cart-popover-empty {
  padding: 22px 12px;
  color: var(--muted);
  text-align: center;
}

.cart-popover-foot {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.cart-popover-foot strong {
  color: var(--green);
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(#e8edf4, #cbd3dd);
  border: 1px solid #c9d2dd;
}

.chevron { font-size: 22px; }

.page { padding: 14px; }

.request-card, .search-card, .table-card, .print-card, .cart-panel, .ad-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.request-card { padding: 18px 20px; margin-bottom: 12px; }
.request-grid {
  display: grid;
  grid-template-columns: 1.5fr .78fr .85fr .7fr;
  gap: 12px 26px;
  max-width: 1130px;
}
.span-2 { grid-column: span 2; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 508px;
  gap: 12px;
  align-items: start;
}

.content-grid.main-only {
  grid-template-columns: minmax(760px, 1fr);
}

.left-column { display: grid; gap: 12px; }

.search-card { padding: 18px 20px 16px; }
.search-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 102px 220px;
  gap: 12px;
  align-items: start;
}

.search-input { font-size: 15px; }
.primary {
  background: linear-gradient(180deg, #ff6a22, #ff4d13);
  color: #fff;
  font-weight: 700;
}
.ghost, .clear, .quick-add {
  background: #fff;
  border: 1px solid #d4dae3;
  color: #111827;
}

.filters-row {
  display: grid;
  grid-template-columns: 220px 220px 220px 180px 132px;
  gap: 18px 28px;
  align-items: end;
  margin-top: 14px;
}

.filters-row.is-collapsed { display: none; }

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  color: #111827;
  font-size: 14px;
}
.checkline input { width: 16px; min-height: 16px; margin: 0; }

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 8px 14px;
  align-items: start;
}

.user-permissions {
  display: grid;
  gap: 14px;
}

.compact-grid {
  grid-template-columns: 220px 160px;
}

.active-check {
  align-self: end;
}

.table-card { padding: 14px 14px 10px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px 4px;
}
.section-head h2, .print-card h2, .cart-head h2 {
  margin: 0;
  font-size: 18px;
}
.section-head span {
  padding: 5px 11px;
  border-radius: 14px;
  background: #eef1f5;
  color: #374151;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f3f5f7;
  font-weight: 700;
  color: #111827;
}

.table-global-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px;
  gap: 12px;
  align-items: end;
  margin: 0 0 10px;
}

.table-global-filter label {
  font-size: 12px;
  color: var(--muted);
}

.column-filters th {
  padding: 6px;
  background: #fff;
}

.column-filters input {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #d4dae3;
  border-radius: 5px;
  font-size: 12px;
}

.price-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  min-width: 120px;
}

.sort-head {
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.sort-head:hover {
  color: var(--orange);
}

td input[type="checkbox"], th input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--orange);
}

tbody tr:hover { background: #fff7f1; }
.green { color: var(--green); font-weight: 800; }
.empty-row td { text-align: center; color: var(--muted); padding: 32px; }

.table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px 0;
}

.pager { display: flex; align-items: center; gap: 8px; }
.pager button, .pager b {
  min-width: 29px;
  min-height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #d4dae3;
  border-radius: 5px;
  background: #fff;
  color: #475569;
  padding: 0;
}
.pager button:disabled {
  opacity: .45;
  cursor: default;
}
.pager b { background: var(--orange); color: #fff; border-color: var(--orange); }
.table-foot label { display: flex; align-items: center; gap: 8px; color: #111827; font-size: 14px; }
.table-foot select { width: 78px; margin: 0; }

.print-card { padding: 16px 18px 20px; }
.print-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.single-print {
  grid-template-columns: 260px 1fr;
  align-items: center;
}

.print-link {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.print-all-only {
  display: none;
}
.print-grid button {
  min-height: 62px;
  background: #fff;
  border: 1px solid #d4dae3;
  color: #111827;
  text-align: left;
  padding: 10px 12px;
}
.print-grid button:disabled { color: #111827; opacity: 1; }

.favorite-btn {
  min-width: 28px;
  min-height: 28px;
  background: transparent;
  color: var(--orange);
  padding: 0;
  font-size: 20px;
}

.product-tools {
  display: flex;
  gap: 4px;
  align-items: center;
}

.info-btn {
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #334155;
  font-weight: 800;
  line-height: 1;
}

.info-btn:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.product-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .28);
}

.product-info-modal {
  width: min(620px, 96vw);
  max-height: min(680px, 88vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.product-info-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.product-info-head button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  background: transparent;
  color: #64748b;
}

.product-info-body {
  display: grid;
  gap: 12px;
  padding: 16px;
  color: var(--ink);
  line-height: 1.45;
}

.product-info-body p {
  margin: 0;
  white-space: pre-wrap;
}

.product-info-image {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.copy-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  padding: 11px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
  font-weight: 700;
}

.product-link {
  justify-self: start;
}

.right-column { display: grid; gap: 12px; }
.cart-panel { padding: 18px; }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.link-danger {
  min-height: auto;
  background: transparent;
  color: #ef231d;
  padding: 0;
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.row-actions form {
  margin: 0;
}

.mini-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.mini-link:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.device-list {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.device-head {
  margin-bottom: 12px;
}

.device-list h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.device-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.device-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, .8fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.device-card.device-online {
  border-color: #9fe7b6;
  background: #f6fff8;
}

.device-card.device-blocked {
  border-color: #ffc5c0;
  background: #fff8f8;
}

.device-card-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
}

.device-icon {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #101820;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  font-size: 14px;
}

.device-icon.phone,
.device-icon.tablet {
  background: var(--orange);
}

.device-title label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.device-title input {
  min-height: 36px;
}

.device-user {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.device-user b {
  font-size: 15px;
}

.device-user span {
  color: var(--muted);
  font-size: 12px;
}

.cart-readonly-price {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-weight: 700;
  color: var(--green);
}

.device-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.device-meta b {
  font-size: 14px;
}

.device-meta span,
.device-status span,
.device-status small {
  color: var(--muted);
}

.device-status {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.status-pill {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
}

.status-pill.online {
  background: #e7f8ed;
  color: #078b37;
}

.status-pill.offline {
  background: #eef2f7;
  color: #64748b;
}

.status-pill.blocked {
  background: #ffeceb;
  color: #d72519;
}

.device-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.device-actions .mini-link {
  min-width: 94px;
}

.danger-button {
  border-color: #ffd0cc;
  color: #d72519;
}

.danger-button:hover {
  border-color: #d72519;
  color: #d72519;
}

.device-row small {
  color: var(--muted);
}

.price-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.price-arrow,
.price-change b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-weight: 800;
}

.price-down,
.price-change-down b {
  background: #e7f8ed;
  color: #078b37;
}

.price-up,
.price-change-up b {
  background: #ffeceb;
  color: #d72519;
}

.price-same,
.price-change-same b {
  background: #eef2f7;
  color: #64748b;
}

.price-unknown,
.price-change-unknown b {
  background: #fff6df;
  color: #b66a00;
}

.price-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 700;
}

.price-change-down {
  color: #078b37;
}

.price-change-up {
  color: #d72519;
}

.price-change-same,
.price-change-unknown {
  color: #64748b;
}

.block {
  display: block;
  margin-top: 4px;
}

.login-check {
  margin: 10px 0;
}

.login-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  text-decoration: none;
}

.captcha-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: var(--ink);
  font-size: 14px;
}

.captcha-line span {
  min-height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  font-weight: 700;
}

.captcha-line input {
  margin-top: 0;
}

.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: var(--orange);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(255, 93, 24, .32);
}

.support-fab:hover {
  background: var(--orange-dark);
}

.support-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  background: rgba(15, 23, 42, .24);
}

.support-overlay.is-open {
  display: flex;
}

.support-modal {
  width: min(440px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .24);
}

.support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.support-head h2 {
  margin: 0;
  font-size: 20px;
}

.support-head span,
.support-actions span {
  color: var(--muted);
  font-size: 13px;
}

.support-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 22px;
  line-height: 1;
}

.support-modal label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.support-modal select,
.support-modal textarea {
  margin-top: 6px;
}

.support-modal textarea {
  resize: vertical;
  min-height: 128px;
}

.support-check {
  display: flex !important;
  color: var(--ink) !important;
}

.support-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.support-actions .primary {
  min-width: 130px;
}

.support-actions .primary:disabled {
  opacity: .6;
  cursor: wait;
}

.cart-labels {
  display: grid;
  grid-template-columns: 1fr 72px 88px 88px;
  gap: 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}
.cart-items { min-height: 310px; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr 72px 88px 88px 20px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item b { display: block; font-size: 13px; line-height: 1.25; }
.cart-item small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.cart-item input {
  min-height: 31px;
  margin: 0;
  padding: 5px 7px;
  text-align: center;
}
.cart-item button {
  min-height: auto;
  background: transparent;
  color: #94a3b8;
  padding: 0;
  font-size: 18px;
}
.quick-add { width: 100%; margin: 14px 0; text-align: left; padding: 0 13px; }
.cart-summary {
  display: grid;
  gap: 10px;
  padding: 16px 0 12px;
  border-top: 1px solid var(--line);
}
.cart-summary div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-summary strong { font-size: 20px; }
.cart-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.doc-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #ff5a14;
  border-radius: 6px;
  background: #ff5a14;
  color: #fff;
  font-weight: 750;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 1px 2px rgba(255, 90, 20, .18);
}
.doc-button:hover {
  background: #f04d12;
}
.cart-actions form {
  margin: 0;
}

.empty-cart {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
}

.muted {
  color: var(--muted);
}

.info-box {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
}

.info-box.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.simple-page {
  padding: 24px;
}

.simple-page h2 {
  margin-top: 0;
}

.ad-preview {
  margin: 14px 0 18px;
  max-width: 620px;
}

.ad-panel { padding: 14px; }
.ad-panel select { margin-bottom: 12px; }
.ad-banner {
  min-height: 100px;
  display: grid;
  grid-template-columns: 88px 1fr 64px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, #070b10, #111827 58%, #ff5a16 59%, #111827 72%);
  color: #fff;
}
.ad-logo {
  width: 74px;
  height: 74px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-weight: 800;
}
.ad-banner span, .ad-banner strong { display: block; font-size: 12px; margin-top: 4px; }
.qr {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111827;
  font-weight: 800;
}

.page-foot {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px 4px;
}

.cart-page {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 430px;
  gap: 12px;
  align-items: start;
}

.cart-page-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
}

.cart-page-head h2 {
  margin: 0;
  font-size: 22px;
}

.cart-page-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.back-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 700;
}

.cart-panel-full .cart-items {
  min-height: 360px;
}

.document-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}

.document-fields button {
  min-height: 39px;
}

.cart-ad {
  position: sticky;
  top: 130px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #182838, #07111d);
}
.login-card {
  width: 360px;
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}
.login-card .logo-ring { margin: 0 auto 18px; }
.login-card h1 { margin: 0; font-size: 30px; }
.login-card h1 span { color: var(--orange); }
.login-card p { color: var(--muted); }
.login-card button { width: 100%; margin-top: 12px; background: var(--orange); color: #fff; font-weight: 800; }
.err { margin: 12px 0; background: #fee2e2; color: #991b1b; padding: 10px; border-radius: 5px; }

.settings { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px; }

.source-form {
  align-items: end;
  margin-top: 14px;
}

.source-form button {
  min-height: 42px;
}

.source-edit-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  margin-bottom: 14px;
}

.source-help summary {
  cursor: pointer;
  font-weight: 800;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.help-grid div {
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff;
}

.help-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.help-grid p {
  margin: 5px 0;
}

@media (max-width: 1280px) {
  .content-grid { grid-template-columns: 1fr; }
  .cart-page { grid-template-columns: 1fr; }
  .request-grid, .filters-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .print-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; min-height: auto; }
  .sidebar-logo { height: 96px; }
  .side-nav { grid-template-columns: repeat(2, 1fr); padding-bottom: 12px; }
  .side-nav hr, .sidebar small { display: none; }
  .app-main { margin-left: 0; }
  .topbar { height: auto; padding: 18px; align-items: flex-start; gap: 16px; flex-direction: column; }
  .page { padding: 10px; }
  .request-grid, .filters-row, .search-row { grid-template-columns: 1fr; }
  .permission-grid, .compact-grid { grid-template-columns: 1fr; }
  .document-fields { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .cart-labels { display: none; }
  .cart-item { grid-template-columns: 1fr; }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .no-print,
  .request-card,
  .search-card,
  .print-card,
  .page-foot,
  .no-print,
  .cart-page-head,
  .ad-panel,
  .quick-add,
  .cart-actions,
  .link-danger {
    display: none !important;
  }

  .app-main {
    margin: 0;
  }

  .page {
    padding: 0;
  }

  .table-card,
  .cart-panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
  }

  .screen-results {
    display: none;
  }

  .print-all-only {
    display: block;
  }

  table {
    min-width: 0;
    font-size: 11px;
  }

  th,
  td {
    padding: 6px;
  }

  .cart-page {
    display: block;
  }
}
