:root {
  color-scheme: light;
  --navy: #071b52;
  --navy-2: #0c286e;
  --blue: #1268f3;
  --blue-2: #3789ff;
  --ink: #101d3c;
  --muted: #657595;
  --line: #e4ebf5;
  --surface: #fff;
  --canvas: #f3f7fc;
  --green: #0ba878;
  --amber: #e89608;
  --red: #d94b57;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); font-size: 15px; line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #064ebc; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #8fc0ff; outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 19px; line-height: 1.3; }
h3 { margin-bottom: 7px; }
small, .muted { color: var(--muted); }
code { padding: 3px 6px; border-radius: 6px; background: #eff4fb; color: #31527f; font-size: .9em; overflow-wrap: anywhere; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 260px; flex-direction: column; color: #eef5ff; background: linear-gradient(168deg, #061944 0%, #0c2d78 58%, #123d9c 100%); box-shadow: 8px 0 30px #0b286b12; }
.side-brand { display: flex; min-height: 100px; align-items: center; gap: 13px; padding: 23px 25px; color: #fff; border-bottom: 1px solid #ffffff15; }
.side-brand:hover { color: #fff; }
.side-brand strong { display: block; font-size: 20px; letter-spacing: -.03em; line-height: 1.15; }
.side-brand small { display: block; margin-top: 4px; color: #c3d8ff; font-size: 12px; }
.brand-mark { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #44a2ff, #0962f4); box-shadow: 0 8px 18px #0663e655; font-size: 20px; font-weight: 900; letter-spacing: 1px; }
.side-nav { display: grid; gap: 6px; padding: 22px 12px; }
.side-nav > a { display: flex; min-height: 49px; align-items: center; gap: 14px; padding: 0 16px; border-radius: 10px; color: #d4e3ff; font-weight: 550; transition: background .16s ease, color .16s ease; }
.side-nav > a span { display: inline-grid; width: 23px; place-items: center; color: #a9c7ff; font-size: 19px; font-weight: 700; }
.side-nav > a:hover { color: #fff; background: #ffffff12; }
.side-nav > a.active { color: #fff; background: linear-gradient(100deg, #0872f7, #075dd8); box-shadow: 0 9px 20px #005ce44b; }
.side-nav > a.active span { color: #fff; }
.side-divider { margin: 16px 12px 2px; padding-top: 18px; border-top: 1px solid #ffffff20; color: #9dbbf1; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.side-bottom { display: grid; gap: 17px; margin-top: auto; padding: 20px 24px 24px; color: #afc7f2; font-size: 12px; }
.connection-pill { display: inline-flex; width: fit-content; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #ffffff20; border-radius: 999px; color: #d8e7ff; background: #ffffff0c; }
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #ffc45c; box-shadow: 0 0 0 4px #ffc45c20; }
.side-copyright { color: #91addc; }

.workspace { min-height: 100vh; margin-left: 260px; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; min-height: 78px; align-items: center; gap: 18px; padding: 12px clamp(20px, 3vw, 44px); border-bottom: 1px solid #e8edf5; background: #ffffffee; backdrop-filter: blur(18px); }
.topbar-spacer { flex: 1; }
.topbar-balance { display: grid; gap: 1px; padding: 7px 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.topbar-balance strong { color: var(--ink); font-size: 15px; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar { display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 50%; color: #095dd2; background: #e1efff; font-size: 16px; font-weight: 800; }
.user-meta { display: grid; min-width: 72px; line-height: 1.3; }
.user-meta strong { color: var(--ink); font-size: 13px; }
.user-meta small { font-size: 11px; }
.menu-toggle { display: none !important; }
.mobile-brand { display: none; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; }
.mobile-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.page-content { width: min(100%, 1600px); min-height: calc(100vh - 78px); margin: auto; padding: clamp(22px, 3vw, 42px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { display: block; margin-bottom: 8px; color: #3478d4; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.admin-tag { padding: 7px 12px; border: 1px solid #b8d7ff; border-radius: 999px; color: #075dce; background: #eaf4ff; font-size: 12px; font-weight: 700; }

.content-card, .card { border: 1px solid #e8eef6; border-radius: 14px; background: var(--surface); box-shadow: 0 8px 26px #17366d08; }
.content-card { padding: 23px; }
.content-card > :last-child { margin-bottom: 0; }
.section-spaced { margin-top: 22px; }
.narrow-card { max-width: 720px; }
.form-card { margin-bottom: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-heading h2 { margin-bottom: 3px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.text-link { font-size: 13px; font-weight: 700; white-space: nowrap; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { display: grid; min-height: 133px; align-content: center; gap: 5px; padding: 21px 23px; border: 1px solid #e7edf6; border-radius: 13px; background: linear-gradient(145deg, #fff, #fbfdff); box-shadow: 0 8px 22px #17366d08; }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-card strong { color: var(--ink); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.035em; }
.metric-card small { font-size: 12px; }
.metric-blue { border-top: 3px solid #2381ff; }
.metric-green { border-top: 3px solid #1bbc8f; }
.metric-amber { border-top: 3px solid #f2ad2e; }
.metric-purple { border-top: 3px solid #9360f5; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); gap: 18px; margin-bottom: 20px; }
.admin-grid > * { min-width: 0; }
.system-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.system-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-top: 1px solid #edf1f7; }
.system-list li:first-child { border-top: 0; }
.system-list b { font-size: 13px; white-space: nowrap; }
.state-ok { color: var(--green); }
.state-wait { color: var(--amber); }
.state-muted { color: #7886a0; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.admin-shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick-card { display: grid; min-height: 116px; align-content: start; gap: 5px; padding: 18px; border: 1px solid #e5ebf5; border-radius: 12px; color: var(--ink); background: #fff; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.quick-card:hover { transform: translateY(-2px); border-color: #b8d3f5; color: var(--ink); box-shadow: 0 12px 24px #143d810f; }
.quick-card strong { margin-top: 4px; font-size: 14px; }
.quick-card small { font-size: 12px; }
.quick-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #0969e8; background: #eaf3ff; font-size: 17px; font-weight: 800; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 750; line-height: 1; transition: transform .14s ease, background .14s ease, box-shadow .14s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(110deg, #1373f8, #075dd6); box-shadow: 0 6px 16px #1268f32b; }
.button-primary:hover { color: #fff; background: linear-gradient(110deg, #0c64e5, #064cb9); box-shadow: 0 8px 20px #1268f33d; }
.button-outline { border-color: #cbd9ed; color: #125ec2; background: #fff; }
.button-outline:hover { border-color: #8cb7ec; color: #084ea9; background: #f6faff; }
.button-quiet { border-color: #e1e9f4; color: #315077; background: #f8fbff; }
.button-quiet:hover { color: #164f9f; background: #edf5ff; }
.button-danger { border-color: #f2d2d5; color: #b72d3b; background: #fff8f8; }
.button-danger:hover { border-color: #e9a9af; background: #fff0f1; }
.button-disabled, .button:disabled { color: #75829b; background: #ebeff5; box-shadow: none; cursor: not-allowed; }
.button:disabled:hover { transform: none; }
.button-small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-wide { width: 100%; }
.icon-button { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid #e4ebf4; border-radius: 10px; color: #315077; background: #fff; cursor: pointer; }
.button-row, .action-row, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.action-row { margin-top: 20px; }

.notice { display: flex; align-items: flex-start; gap: 8px 12px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid; border-radius: 10px; font-size: 13px; }
.notice strong { white-space: nowrap; }
.notice-warning { border-color: #f3dfb3; color: #744a00; background: #fff9eb; }
.notice-success { border-color: #bde9d9; color: #08764f; background: #effbf6; }
.notice-info { border-color: #cae0fb; color: #23548b; background: #f1f7ff; }
.flash-stack { display: grid; gap: 9px; margin-bottom: 18px; }
.flash { padding: 11px 14px; border: 1px solid; border-radius: 9px; font-size: 13px; }
.flash-success { border-color: #bde9d9; color: #08764f; background: #effbf6; }
.flash-warning { border-color: #f3dfb3; color: #744a00; background: #fff9eb; }
.flash-error { border-color: #f0c9cd; color: #a12d37; background: #fff4f5; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid #e8edf5; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
thead { color: #64738f; background: #f7f9fc; font-size: 11px; letter-spacing: .035em; }
th, td { padding: 13px 15px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
th { font-weight: 750; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
td a { font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; color: #52627c; background: #eef2f7; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-ok, .status-active, .status-received, .status-released { color: #078259; background: #e9f8f2; }
.status-failed, .status-release_unknown { color: #b43c47; background: #fff0f1; }
.status-requesting, .status-unknown, .status-releasing { color: #9b6909; background: #fff7e4; }
.status-muted { color: #687894; background: #edf1f6; }
.amount-negative { color: #be3b47; font-weight: 700; }
.amount-positive { color: #078259; font-weight: 700; }
.balance-chip { display: inline-flex; padding: 5px 9px; border-radius: 7px; color: #135db8; background: #edf5ff; font-weight: 750; white-space: nowrap; }
.empty-state { display: grid; min-height: 180px; align-content: center; justify-items: center; gap: 8px; padding: 30px 18px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 15px; }
.empty-state p { max-width: 520px; margin: 0; font-size: 13px; }
.empty-state .button { margin-top: 8px; }
.empty-state.compact { min-height: 130px; }
.empty-icon { display: inline-grid; width: 42px; height: 42px; margin-bottom: 3px; place-items: center; border-radius: 13px; color: #2476e5; background: #edf5ff; font-size: 19px; }

.form-stack, .form-grid { display: grid; gap: 16px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.form-grid .form-actions { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #334564; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #dce5f1; border-radius: 8px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 450; }
textarea { min-height: 92px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a0abc0; }
input:focus, select:focus, textarea:focus { border-color: #74aafa; outline: 3px solid #e0efff; }
.inline-form { display: flex; min-width: 190px; align-items: center; gap: 7px; }
.inline-form input { min-width: 95px; min-height: 34px; padding: 6px 8px; }
.inline-form button { flex: 0 0 auto; }
.wide-field { grid-column: 1 / -1; }
.reconcile-row { background: #f8faff; }
.reconcile-row td { padding: 15px; }
.reconcile-row label { min-width: 130px; }
.reconcile-row .form-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.settings-list { display: grid; gap: 0; margin-top: 22px; border-top: 1px solid var(--line); }
.settings-list div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 2px; border-bottom: 1px solid #edf1f6; color: var(--muted); font-size: 13px; }
.settings-list strong { color: var(--ink); }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.detail-grid > div { display: grid; gap: 6px; padding: 17px 12px; border-bottom: 1px solid #edf1f6; }
.detail-label { color: var(--muted); font-size: 12px; }
.code-value { padding: 15px; border: 1px dashed #cbdcf2; border-radius: 10px; color: #0d5dbf; background: #f3f8ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 27px; letter-spacing: .12em; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card { display: grid; gap: 13px; }
.project-card h2, .project-card p { margin: 0; }
.project-card p { color: var(--muted); font-size: 13px; }
.project-top, .price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.country-mark { display: inline-grid; min-width: 44px; height: 38px; padding: 0 9px; place-items: center; border-radius: 10px; color: #135fb8; background: #edf5ff; font-size: 12px; font-weight: 800; }
.price-row { padding: 12px 0; border-top: 1px solid #edf1f6; color: var(--muted); font-size: 13px; }
.price-row strong { color: var(--ink); font-size: 16px; }
.catalog-search { margin-bottom: 22px; }
.catalog-search .section-heading { margin-bottom: 16px; }
.catalog-search .section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.catalog-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.catalog-search-form input { min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #d6e1f0; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; }
.catalog-search-form input:focus { border-color: #3c82e8; outline: 3px solid #3c82e81c; }
.catalog-search-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.catalog-search-status { min-height: 22px; margin: 13px 0 0; color: #365276; font-size: 13px; line-height: 1.6; }
.search-result-grid { margin-top: 12px; }
.catalog-result-card { display: grid; align-content: start; gap: 14px; }
.catalog-result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.catalog-result-top h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.catalog-result-top code { color: #58708f; font-size: 12px; overflow-wrap: anywhere; }
.catalog-result-badge { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 999px; color: #1b5ea8; background: #eaf3ff; font-size: 11px; font-weight: 750; }
.catalog-result-details { display: grid; gap: 0; margin: 0; border-top: 1px solid #edf1f6; }
.catalog-result-details > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #edf1f6; font-size: 12px; }
.catalog-result-details dt { color: var(--muted); }
.catalog-result-details dd { margin: 0; color: var(--ink); font-weight: 750; text-align: right; }
.catalog-local-note { margin: 0; color: #78601e; font-size: 12px; line-height: 1.6; }
.catalog-result-card.is-selected { border-color: #4d91f2; box-shadow: 0 0 0 3px #2476e512, 0 10px 24px #17366d0a; }
.standard-workbench, .standard-orders-panel { margin-top: 22px; }
.selected-project-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid #d8e8ff; border-radius: 12px; background: linear-gradient(120deg, #f4f9ff, #fff); }
.selected-project-panel > div:first-child { display: grid; gap: 5px; min-width: 0; }
.selected-project-panel .eyebrow { margin: 0; }
.selected-project-panel strong { color: var(--ink); font-size: 17px; overflow-wrap: anywhere; }
.selected-project-panel small { color: var(--muted); font-size: 12px; }
.selected-project-price { display: grid; flex: 0 0 auto; gap: 5px; justify-items: end; color: var(--muted); font-size: 12px; }
.selected-project-price strong { color: #0969e8; font-size: 18px; }
.standard-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.standard-filter-grid input, .standard-filter-grid select { min-width: 0; min-height: 43px; padding: 9px 11px; border: 1px solid #d8e2ef; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; }
.standard-filter-grid input:focus, .standard-filter-grid select:focus { border-color: #3c82e8; outline: 3px solid #3c82e81c; }
.standard-filter-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 3px; }
.standard-filter-actions [role="status"] { flex: 1 1 260px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.standard-filter-actions button:disabled { cursor: not-allowed; opacity: .52; }
.standard-order-list { display: grid; gap: 13px; }
.standard-order-card { display: grid; gap: 12px; padding: 17px; }
.standard-orders-panel .section-heading { margin-bottom: 8px; }
.standard-orders-panel .section-heading h2 { margin: 0; }
.general-acquire-form { margin-top: 8px; }
.general-acquire-form .wide-field { grid-column: 1 / -1; }
.general-acquire-form .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; grid-column: 1 / -1; }
.general-retail-price { color: var(--muted); font-size: 13px; }
.general-retail-price strong { color: var(--ink); }
.general-checkbox { display: flex; min-height: 43px; align-items: center; gap: 9px; }
.general-checkbox input { width: 17px; min-height: 17px; margin: 0; }
.general-orders-panel { margin-top: 22px; }
.general-orders-panel .section-heading { margin-bottom: 8px; }
.general-orders-panel .section-heading h2 { margin: 0; }
.general-orders-panel .section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.general-orders-list { display: grid; gap: 14px; }
.general-order-card { display: grid; gap: 12px; padding: 17px; }
.general-order-card .action-row { margin-top: 0; }
.general-order-card .status { flex: 0 0 auto; }
.standard-order-card, .general-order-card { gap: 14px; padding: clamp(17px, 2.4vw, 24px); border-color: #dce8f7; background: linear-gradient(145deg, #fff 0%, #fbfdff 100%); box-shadow: 0 8px 24px #17417b0a; }
.order-card-heading { align-items: center; }
.order-card-heading > div { min-width: 0; }
.order-card-heading h3 { margin: 0 0 5px; color: #10295e; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.order-card-heading code { color: #637895; font-size: 13px; overflow-wrap: anywhere; }
.order-card-heading .status { padding: 6px 11px; font-size: 12px; }
.order-value-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 17px 19px; border: 1px solid #e0eaf8; border-radius: 13px; }
.order-phone-panel { background: linear-gradient(110deg, #f1f7ff, #f9fbff); }
.order-sms-panel { min-height: 100px; background: linear-gradient(110deg, #f2fbfa, #f7fbff); }
.order-value-copy { display: grid; gap: 6px; min-width: 0; }
.order-field-label { color: #657b9a; font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.order-phone-value { color: #10295e; font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.2; letter-spacing: .045em; overflow-wrap: anywhere; }
.order-sms-value { font-size: clamp(21px, 2.5vw, 27px); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.order-sms-code { color: #08795d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.order-sms-waiting { color: #2865ae; }
.order-field-note { margin: 0; color: #647895; font-size: 13px; line-height: 1.55; }
.order-copy-button { min-height: 40px; padding-inline: 15px; font-size: 14px; }
.order-card-details { border-top: 0; }
.order-card-details > div { padding: 12px 2px; font-size: 14px; }
.order-card-details dt { color: #617795; }
.order-card-details dd { max-width: 70%; color: #10295e; font-size: 14px; overflow-wrap: anywhere; }
.standard-order-card .action-row, .general-order-card .action-row { margin-top: 0; gap: 12px; }
.standard-order-card .action-row .button, .general-order-card .action-row .button { min-height: 42px; padding-inline: 17px; font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.auth-layout { position: relative; display: grid; min-height: min(720px, calc(100vh - 150px)); grid-template-columns: minmax(0, 1fr) minmax(340px, 470px); align-items: center; gap: clamp(26px, 5vw, 80px); overflow: hidden; padding: 36px clamp(5px, 5vw, 70px); }
.auth-art { position: relative; z-index: 1; max-width: 520px; padding: 20px 0; }
.auth-art h1 { max-width: 500px; margin-bottom: 15px; color: #10295e; font-size: clamp(36px, 5vw, 58px); }
.auth-art p { max-width: 420px; color: #617493; font-size: 17px; }
.auth-glow { position: absolute; z-index: -1; top: -100px; left: -75px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, #d8eaff 0, #edf5ff 45%, transparent 70%); }
.auth-card { padding: clamp(25px, 4vw, 38px); }
.auth-card h2 { margin-bottom: 4px; font-size: 24px; }
.auth-card > p { margin-bottom: 24px; }
.auth-switch { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-switch a { font-weight: 750; }
.error-card { max-width: 500px; margin: 10vh auto; text-align: center; }
.error-code { display: block; margin-bottom: 8px; color: #176deb; font-size: 52px; font-weight: 850; letter-spacing: -.05em; }
.faq-list details { padding: 17px 2px; border-bottom: 1px solid #edf1f6; }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { color: var(--ink); cursor: pointer; font-weight: 750; }
.faq-list details p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.public-app { min-height: 100vh; background: #f4f8fe; }
.public-topbar { display: flex; min-height: 76px; align-items: center; gap: 24px; padding: 12px max(24px, calc((100vw - 1320px) / 2)); border-bottom: 1px solid #e8eef6; background: #fff; }
.public-brand { min-height: auto; padding: 0; border: 0; color: var(--ink); }
.public-brand:hover { color: var(--ink); }
.public-brand small { color: var(--muted); }
.public-nav { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2.5vw, 34px); margin: 0 auto; }
.public-nav a { color: #354565; font-size: 13px; font-weight: 650; white-space: nowrap; }
.public-nav a:hover { color: var(--blue); }
.public-actions { display: flex; gap: 9px; }
.public-content { width: min(100% - 40px, 1320px); min-height: calc(100vh - 145px); margin: 0 auto; padding: 40px 0; }
.public-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px max(24px, calc((100vw - 1320px) / 2)); border-top: 1px solid #e5ebf4; color: var(--muted); background: #fff; font-size: 12px; }
.public-footer a { font-weight: 700; }

@media (max-width: 1180px) {
  .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .standard-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-nav { gap: 13px; }
  .public-nav a { font-size: 12px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 12px 0 36px #0619442e; }
  .sidebar.is-open { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .menu-toggle { display: inline-grid !important; }
  .mobile-brand { display: inline-flex; }
  .admin-grid { grid-template-columns: 1fr; }
  .public-topbar { flex-wrap: wrap; padding: 13px 22px; }
  .public-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding: 6px 0 2px; }
  .public-actions { margin-left: auto; }
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(310px, 430px); padding-inline: 12px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { min-height: 66px; gap: 10px; padding: 9px 14px; }
  .topbar-balance { gap: 0; padding: 4px 9px; font-size: 10px; }
  .topbar-balance strong { font-size: 12px; }
  .user-menu { gap: 7px; }
  .user-meta { display: none; }
  .avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .user-menu .button { min-height: 32px; padding-inline: 9px; }
  .mobile-brand { font-size: 13px; }
  .mobile-brand .brand-mark { width: 30px; height: 30px; }
  .page-content { min-height: calc(100vh - 66px); padding: 22px 15px 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .page-heading > .button { width: 100%; }
  .page-heading h1 { font-size: 26px; }
  .content-card { padding: 17px; border-radius: 12px; }
  .metric-grid, .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
  .metric-card { min-height: 108px; padding: 14px; }
  .metric-card strong { font-size: 22px; }
  .metric-card small { font-size: 11px; }
  .admin-shortcuts, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quick-card { min-height: 105px; padding: 14px; }
  .project-grid { grid-template-columns: 1fr; }
  .catalog-search-form { grid-template-columns: 1fr; }
  .catalog-search-form .button { width: 100%; }
  .catalog-result-top { flex-direction: column; }
  .standard-filter-grid { grid-template-columns: 1fr; }
  .standard-filter-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
  .standard-filter-actions .button { width: 100%; }
  .selected-project-panel { align-items: flex-start; flex-direction: column; }
  .selected-project-price { justify-items: start; }
  .standard-orders-panel .section-heading { align-items: flex-start; flex-direction: column; }
  .order-card-heading { flex-direction: row; }
  .order-card-heading h3 { font-size: 17px; }
  .order-card-heading .status { padding: 5px 8px; font-size: 11px; }
  .order-value-panel { align-items: flex-start; padding: 15px; }
  .order-phone-panel { align-items: center; }
  .order-phone-value { font-size: clamp(22px, 7vw, 27px); }
  .order-sms-value { font-size: clamp(20px, 6vw, 24px); }
  .order-field-label, .order-card-details > div, .order-card-details dd { font-size: 14px; }
  .order-card-details > div { align-items: flex-start; }
  .order-card-details dd { max-width: 58%; }
  .standard-order-card .action-row, .general-order-card .action-row { display: flex; }
  .standard-order-card .action-row .button, .general-order-card .action-row .button { flex: 1 1 140px; width: auto; padding-inline: 8px; }
  .general-acquire-form .wide-field, .general-acquire-form .form-actions { grid-column: auto; }
  .general-acquire-form .form-actions { align-items: flex-start; flex-direction: column; }
  .general-orders-panel .section-heading { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .form-actions, .wide-field { grid-column: auto; }
  .reconcile-row .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .notice { flex-direction: column; gap: 3px; }
  .section-heading { align-items: flex-start; }
  .table-wrap { border-radius: 8px; }
  th, td { padding: 11px 12px; }
  .auth-layout { min-height: 0; grid-template-columns: 1fr; gap: 10px; padding: 10px 0 25px; }
  .auth-art { padding: 18px 8px; }
  .auth-art h1 { font-size: 34px; }
  .auth-art p { font-size: 14px; }
  .auth-glow { top: -90px; left: -120px; width: 350px; height: 350px; }
  .auth-card { padding: 23px 18px; }
  .public-topbar { gap: 10px; padding: 12px 15px; }
  .public-brand .brand-mark { width: 35px; height: 35px; }
  .public-brand strong { font-size: 16px; }
  .public-nav { gap: 20px; scrollbar-width: none; }
  .public-nav::-webkit-scrollbar { display: none; }
  .public-actions { gap: 6px; }
  .public-actions .button { min-height: 34px; padding: 0 10px; }
  .public-content { width: calc(100% - 28px); min-height: calc(100vh - 160px); padding: 25px 0; }
  .public-footer { flex-wrap: wrap; padding: 16px; }
}

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

.crypto-recharge-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 28px; align-items: start; }
.crypto-address-card { padding: 20px; border: 1px solid var(--line, #dbe5f3); border-radius: 16px; background: linear-gradient(150deg, #f8fbff, #eef5ff); }
.crypto-address-card h2 { margin-top: 0; }
.crypto-address { display: block; overflow-wrap: anywhere; padding: 12px; border-radius: 10px; background: #fff; color: #11336b; line-height: 1.7; }
.crypto-quote { display: grid; gap: 5px; padding: 14px 16px; border-radius: 12px; background: #f2f7ff; }
.crypto-quote strong { color: #075fe5; font-size: 22px; }
.crypto-quote small, .crypto-order-details span { color: #6b7d98; }
.crypto-order-list { display: grid; gap: 16px; }
.crypto-order-card { padding: 18px; border: 1px solid var(--line, #dbe5f3); border-radius: 16px; background: #fff; }
.crypto-order-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crypto-order-title code { margin-left: 8px; overflow-wrap: anywhere; }
.crypto-order-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.crypto-order-details > div { display: grid; gap: 5px; padding: 10px 12px; border-radius: 10px; background: #f7faff; min-width: 0; }
.crypto-order-details strong { overflow-wrap: anywhere; }
.crypto-payment-instructions { display: flex; align-items: center; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #dbe5f3); }
.crypto-payment-instructions img { flex: 0 0 160px; border: 1px solid #e2eaf5; border-radius: 10px; background: #fff; }
.checkbox-field { display: flex; align-items: center; gap: 10px; }
.checkbox-field input { width: auto; }
@media (max-width: 760px) {
  .crypto-recharge-grid { grid-template-columns: 1fr; }
  .crypto-order-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crypto-payment-instructions { align-items: flex-start; flex-direction: column; }
}
