:root {
  --black: #08090b;
  --carbon: #111318;
  --steel: #202329;
  --steel-light: #d8dadd;
  --ferrari: #ef1b24;
  --ferrari-dark: #a90008;
  --ferrari-soft: #fff0f1;
  --white: #ffffff;
  --surface: #f6f6f7;
  --text: #111216;
  --muted: #555860;
  --line: #d6d7da;
  --shadow: 0 14px 34px rgba(8, 9, 11, .1);
  --shadow-red: 0 8px 20px rgba(239, 27, 36, .2);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(8, 9, 11, .025) 50%, transparent 50.2%),
    var(--surface);
  font-family: Bahnschrift, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}
button, input, select, textarea { min-height: 52px; font: inherit; }
input, select, textarea { font-size: 1rem; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

:focus-visible {
  outline: 4px solid var(--ferrari);
  outline-offset: 3px;
}
.skip { position: fixed; z-index: 1000; top: 10px; left: -999px; padding: 12px 18px; color: var(--black); background: var(--white); border: 3px solid var(--ferrari); font-weight: 800; }
.skip:focus { left: 10px; }

.topbar { position: relative; z-index: 20; color: var(--white); background: var(--black); border-bottom: 1px solid #34363c; }
.topbar::after { position: absolute; right: 0; bottom: -2px; left: 0; height: 2px; content: ""; background: linear-gradient(90deg, transparent, var(--ferrari) 18%, var(--ferrari) 82%, transparent); }
.topbar-inner { display: flex; width: min(100% - 36px, 1280px); min-height: 78px; margin: auto; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; min-height: 58px; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: auto; height: 50px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { color: var(--white); font-size: 1.15rem; letter-spacing: .055em; text-transform: uppercase; }
.brand-copy small { margin-top: 7px; color: #c5c6ca; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.logout-form { margin: 0; }
.link-button { gap: 9px; min-width: 110px; color: var(--white); background: #191b20; border: 1px solid #5a5c63; }
.link-button:hover, .link-button:focus-visible { background: var(--ferrari); border-color: var(--ferrari); }

.main-nav { position: relative; z-index: 10; overflow-x: auto; color: var(--white); background: var(--carbon); border-bottom: 1px solid #2b2e34; scrollbar-color: var(--ferrari) var(--carbon); }
.nav-inner { display: flex; width: min(100% - 36px, 1280px); min-width: max-content; min-height: 58px; margin: auto; align-items: stretch; gap: 4px; }
.main-nav a { position: relative; display: flex; min-height: 58px; padding: 11px 19px; align-items: center; color: #dedfe2; font-size: .94rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.main-nav a::after { position: absolute; right: 18px; bottom: 0; left: 18px; height: 3px; content: ""; background: var(--ferrari); transform: scaleX(0); transition: transform .18s ease; }
.main-nav a:hover { color: var(--white); background: #1d2025; }
.main-nav a.active { color: var(--white); background: linear-gradient(180deg, #24262c, #181a1f); }
.main-nav a.active::after, .main-nav a:focus-visible::after { transform: scaleX(1); }

.container { width: min(100% - 44px, 1280px); min-height: calc(100vh - 210px); margin: 0 auto; padding: 44px 0 72px; }
.site-footer { display: flex; min-height: 58px; padding: 16px max(22px, calc((100% - 1280px) / 2)); align-items: center; justify-content: space-between; gap: 20px; color: #bfc1c5; background: var(--black); border-top: 2px solid var(--ferrari); font-size: .78rem; letter-spacing: .04em; }
.site-footer span:first-child { color: var(--white); font-weight: 800; text-transform: uppercase; }

h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: .12em 0 .28em; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; letter-spacing: -.035em; }
h2 { margin: 0 0 .55em; font-size: clamp(1.35rem, 2.5vw, 1.75rem); line-height: 1.15; }
h3 { font-size: 1.05rem; }
.eyebrow { margin: 0 0 8px; color: var(--ferrari-dark); font-size: .75rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: #ff7479; }
.page-intro { max-width: 700px; margin: 0; color: var(--muted); font-size: 1.02rem; }
.page-head { display: flex; margin-bottom: 30px; align-items: flex-end; justify-content: space-between; gap: 28px; }
.dashboard-head { margin-bottom: 34px; }

.button, button {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  padding: 11px 22px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  background: var(--white);
  border: 2px solid var(--steel);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.button::before, button::before { position: absolute; top: -70%; left: -35%; width: 20%; height: 240%; content: ""; pointer-events: none; background: rgba(255, 255, 255, .42); transform: rotate(28deg) translateX(-400%); }
.button:hover::before, .button:focus-visible::before, button:hover::before, button:focus-visible::before { animation: button-shine .65s ease; }
button:hover, .button:hover { transform: translateY(-1px); }
.primary { color: var(--white); background: linear-gradient(145deg, #ff3038 0%, var(--ferrari) 45%, #bc0009 100%); border-color: #9c0007; box-shadow: var(--shadow-red), inset 0 1px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 1px rgba(0, 0, 0, .32); }
.primary:hover { background: linear-gradient(145deg, #ff454c, #e6000b 52%, #9f0007); box-shadow: 0 10px 24px rgba(239, 27, 36, .28); }
.secondary { color: var(--black); background: var(--white); border-color: #34363c; }
.secondary:hover { color: var(--ferrari-dark); border-color: var(--ferrari); background: var(--ferrari-soft); }
.danger { color: #a60008; background: var(--white); border-color: #c30710; }
.danger:hover { color: var(--white); background: #b50009; }
.cta-sale { min-width: 190px; font-size: 1.05rem; }
.cta-sale span { font-size: 1.5rem; font-weight: 400; }

.messages { display: grid; gap: 12px; }
.message { display: flex; min-height: 60px; margin: 0 0 24px; padding: 13px 18px; align-items: center; gap: 14px; color: var(--black); background: var(--white); border: 2px solid var(--black); border-left: 7px solid var(--ferrari); border-radius: 10px; box-shadow: var(--shadow); font-weight: 700; }
.message-icon { display: inline-flex; width: 32px; height: 32px; flex: 0 0 32px; align-items: center; justify-content: center; color: var(--white); background: var(--black); border-radius: 50%; font-weight: 900; }
.message.error { color: #740006; background: var(--ferrari-soft); border-color: var(--ferrari-dark); }
.message.error .message-icon { background: var(--ferrari-dark); }
.errorlist { margin: 6px 0; padding: 10px 14px 10px 34px; color: #840007; background: var(--ferrari-soft); border-left: 4px solid var(--ferrari); font-weight: 700; }

.metrics { display: grid; margin-bottom: 30px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metrics article { position: relative; display: flex; min-width: 0; min-height: 154px; padding: 24px 20px; overflow: hidden; align-items: flex-start; gap: 15px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--black); border-radius: var(--radius); box-shadow: 0 7px 22px rgba(8, 9, 11, .06); }
.metrics article::after { position: absolute; right: -42px; bottom: -54px; width: 115px; height: 115px; content: ""; border: 1px solid rgba(8, 9, 11, .08); border-radius: 50%; }
.metrics article.warning { border-top-color: var(--ferrari); background: linear-gradient(145deg, var(--white), var(--ferrari-soft)); }
.metric-icon { display: inline-flex; width: 46px; height: 46px; flex: 0 0 46px; align-items: center; justify-content: center; color: var(--ferrari); background: #fff3f4; border: 1px solid #ffc5c8; border-radius: 10px; }
.metric-icon svg { width: 27px; height: 27px; stroke-width: 1.7; }
.metrics article > div { min-width: 0; }
.metrics small { display: block; min-height: 2.7em; margin-bottom: 9px; color: var(--muted); font-size: .79rem; font-weight: 700; line-height: 1.3; }
.metrics strong { display: block; font-size: clamp(1.18rem, 2vw, 1.55rem); line-height: 1.1; overflow-wrap: normal; word-break: normal; }

.reconcile { position: relative; display: grid; margin: 30px 0 42px; padding: clamp(25px, 4vw, 42px); overflow: hidden; grid-template-columns: minmax(260px, .85fr) minmax(390px, 1.15fr); gap: clamp(30px, 6vw, 80px); color: var(--white); background: linear-gradient(135deg, #08090b 0%, #17191e 63%, #250002 100%); border: 1px solid #3d4047; border-radius: 18px; box-shadow: 0 20px 45px rgba(8, 9, 11, .22); }
.reconcile::before { position: absolute; top: 0; right: 0; width: 46%; height: 3px; content: ""; background: linear-gradient(90deg, transparent, var(--ferrari)); }
.reconcile::after { position: absolute; top: -100px; right: -80px; width: 300px; height: 300px; content: ""; border: 1px solid rgba(239, 27, 36, .25); border-radius: 50%; box-shadow: 0 0 80px rgba(239, 27, 36, .1); }
.reconcile-copy { position: relative; z-index: 1; }
.reconcile-copy h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.reconcile-copy > p { color: #c7c8cc; }
.reconcile details { margin-top: 28px; color: #d9dade; }
.reconcile summary { min-height: 48px; padding: 11px 0; color: var(--white); cursor: pointer; font-weight: 800; text-decoration: underline; text-decoration-color: var(--ferrari); text-underline-offset: 5px; }
.reconcile details p { color: #c4c5c9; font-size: .88rem; }
.reconcile dl { position: relative; z-index: 1; display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 10px; }
.reconcile dl div { min-width: 0; padding: 16px; background: rgba(255, 255, 255, .055); border: 1px solid #404249; border-radius: 10px; }
.reconcile dt { margin-bottom: 5px; color: #bebfc4; font-size: .76rem; font-weight: 700; }
.reconcile dd { margin: 0; font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.reconcile dl .variation { grid-column: 1 / -1; padding: 21px; background: linear-gradient(100deg, var(--ferrari-dark), var(--ferrari)); border-color: #ff6970; box-shadow: 0 8px 25px rgba(239, 27, 36, .2); }
.reconcile .variation dt { color: var(--white); font-size: .84rem; text-transform: uppercase; }
.reconcile .variation dd { font-size: clamp(1.5rem, 3vw, 2rem); }

.data-section { margin-top: 32px; }
.section-head { display: flex; margin-bottom: 16px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin-bottom: 0; }
.section-head > a { min-height: 48px; padding: 10px 4px; color: var(--ferrari-dark); font-weight: 800; text-underline-offset: 5px; }
.table-wrap { width: 100%; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(8, 9, 11, .07); scrollbar-color: var(--ferrari) #e5e5e6; }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .91rem; }
th, td { padding: 16px 17px; text-align: left; vertical-align: middle; border-bottom: 1px solid #dedfe1; }
th { height: 58px; color: var(--white); background: var(--carbon); border-bottom-color: var(--ferrari); font-size: .73rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f7f7f8; }
tbody tr:hover { background: #fff0f1; }
tbody tr:last-child td { border-bottom: 0; }
.empty-state { padding: 36px; color: var(--muted); text-align: center; }
.consult-table table { min-width: 1450px; }
.table-actions { display: flex; min-width: 190px; flex-wrap: wrap; gap: 8px; }
.table-actions form { margin: 0; }
.table-actions button, .period-action button { min-height: 48px; padding: 8px 12px; font-size: .8rem; }
.badge { display: inline-flex; min-height: 30px; margin: 2px 4px 2px 0; padding: 4px 9px; align-items: center; color: var(--black); background: var(--white); border: 1px solid var(--black); border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.badge-success { border-color: var(--black); background: #ededee; }
.badge-success::before { margin-right: 6px; content: "✓"; color: var(--ferrari-dark); }
.badge-pending { color: #8c0007; background: var(--ferrari-soft); border-color: var(--ferrari); }
.badge-pending::before { margin-right: 6px; content: "○"; }
.badge-manufacturing { color: #624000; background: #fff3cd; border-color: #d49b00; }
.badge-manufacturing::before { margin-right: 6px; content: "◇"; }
.badge-muted { color: #3c3e43; border-color: #989ba1; }
.cell-note { display: block; margin-top: 5px; color: var(--muted); white-space: nowrap; }
.code { padding: 3px 7px; background: #e9e9eb; border-radius: 5px; font-family: Consolas, monospace; font-size: .85rem; }
.filter-bar { display: grid; margin-bottom: 22px; padding: 18px; grid-template-columns: repeat(4, minmax(140px, 1fr)) auto; align-items: end; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-bar button { min-width: 110px; }
.pagination { display: flex; margin-top: 18px; align-items: center; justify-content: center; gap: 18px; font-weight: 800; }
.wholesale-calculator { display: grid; margin-bottom: 24px; grid-template-columns: 1.3fr repeat(4, minmax(120px, .7fr)) 1fr; align-items: end; gap: 14px; }
.wholesale-calculator h2, .wholesale-calculator p { margin-bottom: 0; }
.calculator-result { display: grid; gap: 2px; padding: 10px 14px; color: var(--white); background: var(--carbon); border-radius: 9px; }
.calculator-result small { color: #c5c6ca; }
.calculator-result strong + small { margin-top: 6px; }
.stock-negative { background: #fff9e8 !important; }
.stock-low { background: #fff5e6 !important; }
.target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.target-grid article { padding: 20px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--ferrari); border-radius: var(--radius); box-shadow: 0 7px 22px rgba(8,9,11,.06); }
.target-title { display: flex; margin-bottom: 14px; justify-content: space-between; gap: 12px; }
.target-title span { color: var(--muted); font-size: .78rem; }
.target-grid dl { display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 10px; }
.target-grid dl div:last-child { grid-column: 1 / -1; }
.target-grid dt { color: var(--muted); font-size: .72rem; }
.target-grid dd { margin: 1px 0 0; font-weight: 800; }
.sales-indicators { display: flex; margin-top: 14px; padding: 15px 18px; flex-wrap: wrap; gap: 12px 28px; color: var(--white); background: var(--carbon); border-radius: 10px; }
.detail-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack { display: grid; gap: 18px; }
.wide { width: 100%; }
.transaction-form { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.transaction-form > .form-card { grid-column: 1; }
label { display: grid; min-width: 0; gap: 8px; color: #25272c; font-size: .89rem; font-weight: 800; }
input, select, textarea { width: 100%; max-width: 100%; padding: 10px 13px; color: var(--black); background: var(--white); border: 2px solid #777a81; border-radius: 8px; }
input:hover, select:hover, textarea:hover { border-color: var(--black); }
input:focus, select:focus, textarea:focus { border-color: var(--ferrari); outline: 3px solid rgba(239, 27, 36, .2); }
input::placeholder { color: #666971; opacity: 1; }
input[type="file"] { padding: 7px; }
select { padding-right: 36px; }
.form-card { padding: clamp(22px, 4vw, 34px); background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--black); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-card { display: grid; gap: 24px; }
.step-heading, .form-card-head { display: flex; align-items: flex-start; gap: 15px; }
.step-heading > span, .form-card-icon { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; color: var(--white); background: linear-gradient(145deg, #ff3038, #b50009); border-radius: 9px; box-shadow: 0 5px 12px rgba(239, 27, 36, .22); font-size: 1.2rem; font-weight: 900; }
.step-heading h2, .form-card-head h2 { margin: 0 0 4px; }
.step-heading p, .form-card-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.sale-line { display: grid; padding: 20px; grid-template-columns: 1fr .75fr 1.6fr .58fr .72fr auto; align-items: end; gap: 12px; background: #f3f3f4; border: 1px solid #d4d5d8; border-left: 4px solid var(--ferrari); border-radius: 10px; }
.sale-line + .sale-line { margin-top: 14px; }
.purchase-line { grid-template-columns: minmax(260px, 1.8fr) 1fr 1fr auto; }
.remove-line { padding-inline: 15px; }
.add-button { width: fit-content; }
.add-button span { color: var(--ferrari); font-size: 1.25rem; }
.customer-grid { display: grid; grid-template-columns: minmax(190px, .45fr) minmax(280px, 1.55fr); gap: 16px; }
.payment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.quick-customer { padding: 0 17px 17px; background: #f4f4f5; border: 1px solid var(--line); border-radius: 9px; }
.quick-customer summary, .payroll-create > summary { min-height: 54px; padding: 13px 0; cursor: pointer; color: var(--ferrari-dark); font-weight: 900; }
.quick-customer .payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 12px; }
.required-note { display: inline; margin-left: 5px; padding: 3px 7px; color: #8c0007; background: var(--ferrari-soft); border-radius: 4px; font-size: .7rem; text-transform: uppercase; }
.form-subtitle { margin: 4px 0 -11px; }
.sale-footer { position: sticky; z-index: 8; top: 158px; display: flex; min-height: 196px; padding: 24px 18px; grid-column: 2; grid-row: 1; align-items: stretch; justify-content: space-between; flex-direction: column; gap: 22px; color: var(--white); background: rgba(8, 9, 11, .97); border: 1px solid #3e4147; border-bottom: 4px solid var(--ferrari); border-radius: 13px; box-shadow: 0 15px 35px rgba(8, 9, 11, .3); backdrop-filter: blur(8px); }
.sale-footer p { display: flex; margin: 0; flex-direction: column; }
.sale-footer p span { color: #bfc1c5; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sale-footer strong { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.sale-footer button { width: 100%; min-width: 0; }

.tabs { display: flex; width: 100%; margin: 0 0 25px; padding: 7px; overflow-x: auto; gap: 6px; background: #e5e5e7; border: 1px solid #cacbd0; border-radius: 12px; scrollbar-color: var(--ferrari) #e5e5e7; }
.tabs a { position: relative; display: inline-flex; min-height: 50px; padding: 10px 18px; align-items: center; justify-content: center; color: #37393f; border: 1px solid transparent; border-radius: 8px; font-size: .88rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--black); background: var(--white); }
.tabs a.active { color: var(--white); background: var(--carbon); border-color: var(--black); box-shadow: inset 0 -3px 0 var(--ferrari); }
.movement-form { max-width: 780px; gap: 20px; }
.movement-form > .primary { width: fit-content; min-width: 230px; margin-top: 6px; }

.notice { display: flex; margin: 0 0 25px; padding: 18px 20px; align-items: center; gap: 16px; color: var(--black); background: var(--ferrari-soft); border: 1px solid #ffb2b6; border-left: 6px solid var(--ferrari); border-radius: 9px; }
.notice strong { color: #8d0007; }
.payroll-create { margin-bottom: 30px; padding-top: 14px; }
.payroll-create > summary { font-size: 1.05rem; }
.payroll-create > summary span { display: inline-flex; width: 30px; height: 30px; margin-right: 7px; align-items: center; justify-content: center; color: var(--white); background: var(--ferrari); border-radius: 6px; }
.payroll-create form { max-width: 720px; padding-top: 22px; }
.payroll-create form > div { display: grid; gap: 7px; }
.payroll-data { margin-top: 0; }
.balance { display: block; color: var(--ferrari-dark); font-size: 1.05rem; }
.period-action { margin-top: 9px; }
.pay-inline { display: grid; min-width: 570px; margin-top: 10px; grid-template-columns: 1fr 1fr auto; gap: 7px; }
.pay-inline input, .pay-inline select { min-width: 150px; }
.pay-inline button { min-width: 95px; }

.login-page { color: var(--white); background: var(--black); }
.login-page .topbar { position: absolute; top: 0; right: 0; left: 0; background: rgba(8, 9, 11, .76); backdrop-filter: blur(12px); }
.login-page .brand-copy { display: none; }
.login-page .container { display: flex; width: 100%; max-width: none; min-height: 100vh; padding: 0; align-items: stretch; }
.login-page .site-footer { display: none; }
.login-shell { display: grid; width: 100%; min-height: 100vh; grid-template-columns: minmax(380px, 1.25fr) minmax(430px, .75fr); }
.login-visual { position: relative; display: flex; min-height: 680px; padding: 150px clamp(36px, 7vw, 100px) 70px; overflow: hidden; align-items: center; background:
  linear-gradient(115deg, rgba(8, 9, 11, .7), rgba(8, 9, 11, .93)),
  repeating-linear-gradient(125deg, transparent 0 48px, rgba(255, 255, 255, .04) 49px 50px),
  linear-gradient(145deg, #400004, var(--ferrari) 46%, #08090b 47% 100%);
}
.login-visual::before { position: absolute; top: 14%; right: -170px; width: 520px; height: 520px; content: ""; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255, 255, 255, .025), 0 0 0 90px rgba(239, 27, 36, .05); }
.login-visual::after { position: absolute; right: 0; bottom: 0; left: 0; height: 4px; content: ""; background: linear-gradient(90deg, var(--ferrari), var(--white), transparent); }
.login-visual-content { position: relative; z-index: 1; max-width: 700px; }
.login-visual h1 { margin-bottom: 25px; color: var(--white); font-size: clamp(3rem, 6vw, 5.7rem); line-height: .94; letter-spacing: -.055em; text-transform: uppercase; }
.login-visual h1 span { color: #ff3a43; text-shadow: 0 8px 30px rgba(239, 27, 36, .25); }
.login-visual-content > p:not(.eyebrow) { max-width: 610px; color: #d2d3d6; font-size: 1.15rem; }
.technical-line { display: flex; width: min(100%, 470px); margin-top: 42px; align-items: center; }
.technical-line span { height: 1px; flex: 1; background: #6d6f75; }
.technical-line i { width: 11px; height: 11px; margin: 0 10px; background: var(--ferrari); border: 2px solid var(--white); border-radius: 50%; }
.login-panel { display: flex; padding: 120px clamp(32px, 6vw, 84px) 70px; flex-direction: column; justify-content: center; color: var(--text); background: var(--white); }
.login-logo { width: min(300px, 82%); max-height: 115px; margin-bottom: 36px; object-fit: contain; object-position: left center; }
.login-panel h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.7rem); }
.login-help { margin: 8px 0 27px; color: var(--muted); }
.login-panel .message { margin-bottom: 22px; }
.login-form { gap: 9px; }
.login-form input { margin-bottom: 12px; }
.login-submit { width: 100%; margin-top: 15px; font-size: 1.02rem; }

@keyframes button-shine {
  from { transform: rotate(28deg) translateX(-400%); }
  to { transform: rotate(28deg) translateX(850%); }
}

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reconcile { grid-template-columns: 1fr; }
  .sale-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-line label:nth-child(3) { grid-column: 1 / -1; }
  .purchase-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-line label:first-child { grid-column: 1 / -1; }
  .transaction-form { grid-template-columns: 1fr; }
  .transaction-form > .form-card, .transaction-form > .sale-footer { grid-column: 1; }
  .transaction-form > .sale-footer { position: static; grid-row: auto; min-height: 92px; padding: 15px 18px 15px 24px; align-items: center; flex-direction: row; }
  .transaction-form > .sale-footer button { width: auto; min-width: 210px; }
  .login-shell { grid-template-columns: 1fr 1fr; }
  .login-visual { padding-inline: 42px; }
  .login-panel { padding-inline: 42px; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
  .wholesale-calculator { grid-template-columns: repeat(2, 1fr); }
  .wholesale-calculator > div:first-child, .calculator-result { grid-column: 1 / -1; }
  .target-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .topbar-inner, .nav-inner { width: calc(100% - 24px); }
  .container { width: calc(100% - 24px); padding: 30px 0 55px; }
  .brand img { height: 43px; max-width: 150px; }
  .brand-copy strong { font-size: .92rem; }
  .brand-copy small { font-size: .6rem; }
  .nav-inner { margin-left: 12px; margin-right: 0; }
  .main-nav a { padding-inline: 15px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .button { align-self: stretch; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 130px; }
  .reconcile { padding: 25px 18px; }
  .reconcile dl { grid-template-columns: 1fr; }
  .reconcile dl .variation { grid-column: auto; }
  .payment-grid, .quick-customer .payment-grid, .customer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px 16px; }
  .sale-line, .purchase-line { grid-template-columns: 1fr; padding: 17px 14px; }
  .sale-line label:nth-child(3), .purchase-line label:first-child { grid-column: auto; }
  .remove-line, .add-button { width: 100%; }
  .transaction-form > .sale-footer { padding: 14px; align-items: stretch; flex-direction: column; gap: 12px; }
  .sale-footer p { align-items: center; }
  .transaction-form > .sale-footer button { width: 100%; min-width: 0; }
  .notice { align-items: flex-start; flex-direction: column; gap: 4px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 3px; }
  .login-page .topbar { position: relative; }
  .login-page .container { min-height: auto; }
  .login-shell { min-height: auto; grid-template-columns: 1fr; }
  .login-visual { min-height: 400px; padding: 70px 24px 45px; }
  .login-visual h1 { font-size: clamp(2.7rem, 14vw, 4rem); }
  .login-panel { min-height: 600px; padding: 52px 24px 65px; }
  .filter-bar, .wholesale-calculator, .target-grid { grid-template-columns: 1fr; }
  .wholesale-calculator > div:first-child, .calculator-result { grid-column: auto; }
}

@media (max-width: 470px) {
  html { font-size: 18px; }
  .topbar-inner { min-height: 70px; }
  .brand-copy { display: none; }
  .link-button { min-width: 96px; padding-inline: 14px; }
  .reconcile dl div { padding: 14px 12px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .tabs { border-radius: 8px; }
  .pay-inline { min-width: 520px; }
}

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