:root {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: #f6f4fa;
  background: #101117;
  color-scheme: dark;
  --canvas: #101117;
  --surface: #191b23;
  --line: #363842;
  --muted: #b7b8c7;
  --pink: #ff70b4;
  --button: #ff80bc;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ffa5d1; outline-offset: 4px; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); z-index: 5; padding: 12px; background: #fff; color: #111; border-radius: 6px; }
.skip-link:focus { transform: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; min-height: 100vh; padding: 34px 18px 16px; border-right: 1px solid #2b2d37; background: #15161e; }
.brand { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; }
.sidebar .brand { margin-left: 14px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; background: var(--button); border-radius: 10px; transform: rotate(-5deg); }
.brand-mark i { width: 0; height: 0; border-left: 12px solid #371429; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; transform: rotate(5deg); }
.wordmark { color: #fff; font-size: 1.4rem; font-style: italic; font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.wordmark span { margin-left: 3px; }
.workspace-name { display: block; margin: 12px 14px 0; align-self: flex-start; font-size: .875rem; color: var(--muted); }
.primary-nav { margin-top: 43px; display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 12px 15px; min-height: 45px; color: #c0c1ce; border-radius: 9px; font-size: .95rem; font-weight: 550; }
.nav-link:hover { color: #fff; background: #23252f; }
.nav-link.current { background: #3b2233; color: #ffa3d0; }
.nav-icon { position: relative; display: inline-block; width: 18px; height: 18px; flex-shrink: 0; }
.icon-grid::before { content: ""; position: absolute; top: 2px; left: 2px; width: 5px; height: 5px; background: currentColor; border-radius: 1px; box-shadow: 8px 0, 0 8px, 8px 8px; }
.icon-server::before, .icon-server::after { content: ""; position: absolute; left: 1px; width: 14px; height: 4px; border: 1.5px solid; border-radius: 2px; }
.icon-server::before { top: 2px; }.icon-server::after { bottom: 2px; }
.icon-card::before { content: ""; position: absolute; inset: 3px 0; border: 1.5px solid; border-radius: 3px; }
.icon-card::after { content: ""; position: absolute; left: 1px; right: 1px; height: 2px; top: 7px; background: currentColor; }
.icon-users::before { content: ""; position: absolute; left: 6px; top: 1px; width: 5px; height: 5px; border: 1.5px solid; border-radius: 50%; }
.icon-users::after { content: ""; position: absolute; left: 2px; bottom: 1px; width: 13px; height: 6px; border: 1.5px solid; border-radius: 9px 9px 2px 2px; }
.profile { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin-top: auto; padding: 19px 2px 0; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #392d40; color: #ffd0e7; font-size: .875rem; font-weight: 700; }
.profile-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.profile-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .91rem; }
.profile-text span { color: var(--muted); font-size: .8rem; }
.exit-button { border: none; background: transparent; color: var(--muted); padding: 9px 4px; font-size: .875rem; }
.exit-button:hover { color: var(--pink); }
.content { width: 100%; max-width: 1550px; margin: 0 auto; min-width: 0; padding: clamp(28px,4.4vw,76px) clamp(20px,4.5vw,80px); }
.page-heading { display: flex; align-items: flex-end; gap: 20px; justify-content: space-between; margin-bottom: 30px; }
.context-label { margin-bottom: 9px; color: #cfadbF; font-size: .875rem; font-weight: 600; }
h1 { font-size: clamp(2.1rem,4vw,3.35rem); line-height: 1.05; letter-spacing: -.055em; font-weight: 650; }
h2 { font-size: clamp(1.06rem,1.8vw,1.25rem); letter-spacing: -.025em; line-height: 1.3; font-weight: 650; }
h3 { font-size: 1.02rem; line-height: 1.4; font-weight: 620; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 17px; border-radius: 9px; min-height: 44px; line-height: 1.25; text-align: center; font-weight: 700; font-size: .94rem; border: 1px solid transparent; }
.button.primary { color: #2a1020; background: var(--button); border-color: var(--button); }
.button.primary:hover { background: #ffa1cf; border-color: #ffa1cf; }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.secondary:hover { border-color: #866a7d; }
.plus { width: 14px; height: 14px; position: relative; }
.plus::before, .plus::after { content: ""; position: absolute; background: currentColor; border-radius: 2px; }
.plus::before { width: 12px; height: 2px; left: 1px; top: 6px; }.plus::after { width: 2px; height: 12px; left: 6px; top: 1px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; margin-bottom: 25px; }
.metric { overflow: hidden; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 125px; padding: 19px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric span { color: var(--muted); font-size: .91rem; }
.metric strong { font-weight: 580; font-size: 2.4rem; letter-spacing: -.07em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric.featured { border-color: #76415e; background: linear-gradient(125deg,#452237,#2c202e); }
.metric.featured span, .metric.featured strong { color: #ffd2e8; }
.metric.featured::after { content: ""; position: absolute; width: 90px; height: 90px; border: 1px solid #6b3c56; transform: rotate(35deg); border-radius: 18px; bottom: -68px; right: -36px; box-shadow: 0 0 0 7px #3c2637, 0 0 0 8px #59354d; pointer-events: none; }
.panel { align-self: start; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 20px 22px; }
.count { min-width: 28px; padding: 3px 8px; border: 1px solid #454651; border-radius: 20px; color: var(--muted); font-size: .82rem; text-align: center; }
.empty-state { min-height: 210px; padding: 32px 25px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-state p { font-size: .9375rem; color: var(--muted); max-width: 420px; line-height: 1.5; margin-top: 7px; }
.empty-symbol,.service-icon { position: relative; display: grid; place-items: center; width: 41px; height: 41px; flex-shrink: 0; border: 1px solid #48424f; border-radius: 12px; color: #c698af; background: #2b252f; }
.empty-symbol { margin-bottom: 14px; }
.empty-symbol::before,.service-icon i { content: ""; width: 15px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; }
.empty-symbol::after,.service-icon i::after { content: ""; position: absolute; height: 1.5px; width: 12px; border-radius: 2px; background: currentColor; top: 18px; }
.service-icon i::after { left: 14px; }
.offer-row { padding: 18px 22px; }
.offer-row + .offer-row { border-top: 1px solid var(--line); }
.offer-heading,.card-title { display: flex; gap: 12px; align-items: center; }
.offer-heading h3,.card-title>div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.quantity { font-size: .875rem; color: var(--muted); text-align: right; }
.quantity b { color: #fff; }
.offer-details { margin: 14px 0 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.offer-details div { background: #20222b; border-radius: 7px; padding: 9px 12px; display: grid; gap: 3px; }
.offer-details dt { font-size: .8rem; color: var(--muted); }
.offer-details dd { margin: 0; font-size: 1rem; font-weight: 620; }
.split-layout { display: grid; grid-template-columns: minmax(265px,1.25fr) minmax(280px,1fr); gap: 18px; }
.quick-form { display: none; }
.records,.card-records { margin: 0; padding: 0; list-style: none; }
.records li { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.records li + li,.card-records li + li { border-top: 1px solid var(--line); }
.record-text { display: grid; flex: 1; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.record-text strong { font-weight: 600; }
.record-text span,.supplier-name { font-size: .875rem; color: var(--muted); }
.card-records li { padding: 18px 20px; }
.card-title { justify-content: space-between; align-items: flex-start; }
.supplier-name { margin-bottom: 4px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag { background: #292a35; color: #d9d9e4; border: 1px solid #3d3e4b; border-radius: 7px; padding: 3px 7px; font-size: .8rem; }
.card-foot { display: flex; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font-size: .83rem; }
.card-foot b { color: #ebe6f0; font-weight: 550; }
.form-panel { scroll-margin-top: 14px; }
.form-stack { display: grid; gap: 17px; }
.form-panel .form-stack,.form-intro { padding: 20px 22px 24px; }
.form-intro p { color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.form-stack label:not(.check) { display: grid; min-width: 0; gap: 7px; font-weight: 550; font-size: .9rem; }
input:not([type=checkbox]):not([type=hidden]), select { width: 100%; min-width: 0; border: 1px solid #4c4d5b; min-height: 44px; padding: 10px 12px; border-radius: 8px; background: #12141c; color: #f6f3fa; font-weight: 400; font-size: 1rem; }
input::placeholder { color: #9c99aa; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg,transparent 50%,#d0c9d7 50%),linear-gradient(135deg,#d0c9d7 50%,transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card-options { min-width: 0; display: grid; gap: 0; border: 0; border-top: 1px solid var(--line); margin: 0; padding: 6px 0 0; }
.card-options legend { padding-right: 9px; font-size: .9rem; font-weight: 600; }
.check { min-height: 33px; display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: .9rem; }
.check input { accent-color: var(--button); width: 17px; height: 17px; margin: 0; }
.notices { display: grid; gap: 6px; margin-bottom: 16px; }
.notice,.alert-panel { padding: 13px 16px; border-radius: 9px; border: 1px solid; font-size: .94rem; line-height: 1.4; }
.notice.error { color: #ffbfce; background: #38222a; border-color: #815165; }
.notice.success { color: #c8e9c8; background: #1e302a; border-color: #44674d; }
.alert-panel { color: #f0dcaf; border-color: #6b5442; background: #2b2623; margin-bottom: 20px; }
.alert-panel ul { list-style: none; padding: 0; margin: 8px 0 0; }
.alert-panel li { display: flex; flex-wrap: wrap; gap: 6px 15px; justify-content: space-between; padding: 4px 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: clamp(20px,5vw,64px); background: radial-gradient(ellipse at 40% 100%,#262030,transparent 65%), #101117; }
.login-box { width: min(920px,100%); display: grid; grid-template-columns: 43% 57%; border: 1px solid #41404b; overflow: hidden; border-radius: 22px; background: #191a22; }
.login-content { align-self: center; padding: clamp(32px,5vw,72px); }
.login-title { margin: 40px 0 28px; }
.login-title h1 { font-size: clamp(2.1rem,4.1vw,3.15rem); }
.login-content .button { margin-top: 5px; }
.login-art { position: relative; isolation: isolate; overflow: hidden; min-height: 500px; background: linear-gradient(156deg,#40283c 0%,#a0557d 67%,#511c3b 100%); }
.art-grid { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg,transparent 0 35px,#ffd6ed12 35px 36px),repeating-linear-gradient(90deg,transparent 0 35px,#ffd6ed12 35px 36px); }
.signal { position: absolute; top: 50%; left: 50%; width: 70%; aspect-ratio: 1; clip-path: polygon(9% 3%,97% 50%,9% 97%,9% 73%,54% 50%,9% 27%); }
.signal-back { background: #4c2741; transform: translate(-72%,-59%) rotate(-11deg); }
.signal-mid { background: #f189bd; transform: translate(-60%,-53%) rotate(-11deg); }
.signal-front { background: linear-gradient(140deg,#fff0f8,#fcc7e5 60%,#f094c0); transform: translate(-47%,-47%) rotate(-11deg); }
.signal-shadow { position: absolute; width: 78%; height: 32%; left: 14%; top: 48%; background: #361328a1; filter: blur(35px); transform: rotate(-14deg); }
.art-footer { position: absolute; left: 10%; right: 10%; bottom: 8%; display: flex; align-items: center; gap: 4px; }
.art-line { flex: 1; margin-right: 8px; height: 1px; background: #e6b1cf80; }
.art-tick { width: 4px; height: 11px; background: #f3bfd7; transform: skewX(-20deg); }
@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 190px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .content { padding: 36px 24px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 104px; }
}
@media (max-width: 850px) {
  .split-layout { grid-template-columns: 1fr; }
  .quick-form { display: inline-flex; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: static; z-index: 1; min-height: auto; padding: 13px 16px 0; border: none; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 8px; }
  .sidebar .brand { margin-left: 0; align-self: center; gap: 6px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; }.brand-mark i { border-left-width: 9px; border-top-width: 6px; border-bottom-width: 6px; }
  .wordmark { font-size: 1.2rem; }
  .workspace-name { margin: 0; align-self: center; font-size: .8rem; }
  .primary-nav { grid-row: 2; grid-column: 1/-1; display: flex; margin: 0 -3px; gap: 1px; overflow-x: auto; }
  .nav-link { white-space: nowrap; font-size: .85rem; min-height: 41px; padding: 8px 9px; border-radius: 7px 7px 0 0; gap: 6px; }
  .nav-icon { display: none; }
  .profile { grid-column: 3; grid-row: 1; margin: 0; padding: 0; border: 0; gap: 6px; }
  .profile .avatar { display: none; }
  .profile-text { display: none; }
  .content { padding: 26px 16px 44px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 22px; gap: 14px; }
  .context-label { margin-bottom: 7px; }
  .metric { padding: 15px 14px; }
  .metrics { gap: 8px; margin-bottom: 16px; }
  .metric strong { font-size: 2.1rem; }
  .panel-heading,.offer-row { padding: 16px; }
  .offer-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-page { padding: 16px; }
  .login-box { max-width: 440px; grid-template-columns: 1fr; }
  .login-content { padding: 30px 24px; }
  .login-title { margin: 24px 0; }
  .login-art { min-height: 108px; background: linear-gradient(125deg,#4b2940,#ab628b 74%,#4a233c); }
  .signal { top: 46%; width: 160px; left: 60%; }
  .art-footer { bottom: 12px; left: 22px; right: 22px; }
  .form-panel .form-stack,.form-intro { padding: 17px 16px; }
}
@media (forced-colors: active) {
  .nav-link.current { outline: 2px solid currentColor; outline-offset: -2px; }
  .icon-grid::before,.brand-mark { background: CanvasText; }
}
.field-help { color: var(--muted); font-size: .82rem; line-height: 1.4; margin-top: -10px; }
.edit-link { color: var(--pink); margin-left: auto; text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.edit-link:hover { color: #ffd9ed; }
.edit-panel { max-width: 590px; }
.quick-form:focus-visible, .button:focus-visible { outline-offset: 2px; }
