:root {
  --charcoal: #101317;
  --ink: #181d24;
  --paper: #f5f1e8;
  --panel: #fff;
  --muted: #68707a;
  --line: rgba(17, 20, 24, .11);
  --amber: #f59e0b;
  --orange: #f97316;
  --green: #18a773;
  --red: #dc5b52;
  --blue: #3d8abf;
  --shadow: 0 18px 55px rgba(16, 19, 23, .09);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Rajdhani, system-ui, sans-serif; font-weight: 600; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.prototype-note { position: fixed; z-index: 100; right: 20px; bottom: 18px; display: flex; gap: 8px; align-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 8px 12px; background: rgba(16,19,23,.92); color: #fff; box-shadow: var(--shadow); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(10px); }
.prototype-note span { color: var(--amber); }
.prototype-note strong { font-weight: 600; opacity: .58; }
.eyebrow, .section-label { color: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

/* Login */
.login-view { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr); }
.login-brand { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 44px clamp(42px, 7vw, 100px) 50px; background: linear-gradient(128deg, rgba(8,10,13,.99), rgba(16,19,23,.94)), url("assets/tiger-system-pattern.svg") center/cover; color: #fff; }
.login-brand::after { position: absolute; width: 560px; height: 560px; right: -250px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(245,158,11,.24), transparent 68%); content: ""; }
.login-brand > img { position: relative; z-index: 1; width: auto; height: 58px; align-self: flex-start; object-fit: contain; }
.login-brand > div { position: relative; z-index: 1; }
.login-brand h1 { margin: 18px 0 22px; font-size: clamp(54px, 6vw, 82px); letter-spacing: -.04em; line-height: .92; }
.login-brand p { max-width: 570px; margin: 0; color: rgba(255,255,255,.67); font-size: 19px; line-height: 1.55; }
.module-strip { display: flex; gap: 38px; border-top: 1px solid rgba(255,255,255,.13); padding-top: 28px; }
.module-strip span { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.module-strip b { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(245,158,11,.42); border-radius: 7px; color: var(--amber); }
.login-form-side { display: grid; min-height: 100vh; place-items: center; padding: 40px clamp(35px, 5vw, 78px); background: radial-gradient(circle at 90% 5%, rgba(245,158,11,.1), transparent 28%), var(--paper); }
.login-card { width: min(100%, 440px); }
.secure-label { display: flex; gap: 10px; align-items: center; color: #875400; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.secure-label i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52,211,153,.13); }
.login-card h2 { margin: 15px 0 5px; font-size: 54px; line-height: 1; }
.login-card > p { margin: 0 0 30px; color: var(--muted); }
.login-card label, .form-grid label { display: grid; gap: 7px; color: #353b42; font-size: 13px; }
.label-line { display: flex; justify-content: space-between; margin-top: 22px; }
.label-line a { color: #8b5a00; font-size: 12px; text-decoration: none; }
.field { display: flex; min-height: 54px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 0 15px; background: rgba(255,255,255,.84); transition: .18s ease; }
.field:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.field > span { color: #828991; font-size: 12px; }
.field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.field button { border: 0; background: transparent; color: #805100; font-size: 12px; }
.checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; margin: 18px 0 24px; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--amber); }
.login-card small { display: block; margin-top: 18px; color: var(--muted); text-align: center; }
.primary-button, .secondary-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 18px; border-radius: 8px; padding: 0 17px; font-weight: 700; }
.primary-button { border: 0; background: var(--charcoal); color: #fff; box-shadow: 0 12px 28px rgba(16,19,23,.14); }
.primary-button span { color: var(--amber); font-size: 20px; }
.login-card > .primary-button, .login-card form > .primary-button { width: 100%; min-height: 56px; justify-content: space-between; padding-inline: 20px; }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }

/* Shell */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 238px 1fr; }
.sidebar { position: sticky; z-index: 30; top: 0; display: flex; height: 100vh; flex-direction: column; background: var(--charcoal); color: #fff; }
.sidebar-brand { display: flex; height: 76px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); padding: 12px 20px; }
.sidebar-brand img { width: auto; height: 47px; }
.close-nav { display: none; border: 0; background: transparent; color: #fff; font-size: 24px; }
.sidebar nav { flex: 1; padding: 24px 13px; }
.sidebar nav p { margin: 24px 13px 9px; color: rgba(255,255,255,.3); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.sidebar nav a { display: flex; min-height: 44px; align-items: center; gap: 12px; border-radius: 7px; padding: 0 13px; color: rgba(255,255,255,.58); font-size: 14px; text-decoration: none; transition: .15s ease; }
.sidebar nav a span { width: 20px; color: rgba(255,255,255,.38); text-align: center; }
.sidebar nav a:hover { color: #fff; }
.sidebar nav a.active { background: rgba(245,158,11,.13); color: #fff; }
.sidebar nav a.active span { color: var(--amber); }
.sidebar-footer { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); padding: 17px; }
.avatar, .business-chip > span { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 8px; background: var(--amber); color: var(--charcoal); font-size: 13px; font-weight: 700; }
.sidebar-footer div:nth-child(2), .business-chip div { display: grid; }
.sidebar-footer strong, .business-chip strong { font-size: 12px; }
.sidebar-footer small, .business-chip small { color: rgba(255,255,255,.42); font-size: 10px; }
.sidebar-footer button { border: 0; background: transparent; color: rgba(255,255,255,.4); }
.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; min-height: 76px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px clamp(20px, 3vw, 42px); background: rgba(245,241,232,.91); backdrop-filter: blur(14px); }
.topbar h1 { margin: 0; font-size: 24px; line-height: 1; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.top-actions, .business-chip { display: flex; align-items: center; }
.top-actions { gap: 13px; }
.business-chip { gap: 9px; border-left: 1px solid var(--line); padding-left: 14px; }
.business-chip > span { width: 36px; height: 36px; }
.business-chip small { color: var(--muted); }
.icon-button, .menu-button { position: relative; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); color: var(--muted); }
.icon-button i { position: absolute; width: 6px; height: 6px; right: 7px; top: 7px; border: 2px solid var(--paper); border-radius: 50%; background: var(--orange); }
.menu-button { display: none; }
.screen { display: none; padding: 34px clamp(20px, 3vw, 42px) 60px; }
.screen.active { display: block; animation: rise .22s ease; }
.dashboard-legacy { display: none !important; }
@keyframes rise { from { transform: translateY(5px); opacity: 0; } }

/* Dashboard + common cards */
.hero-card { display: flex; min-height: 188px; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; border-radius: 14px; padding: 35px 40px; background: linear-gradient(115deg, rgba(16,19,23,.99), rgba(24,29,36,.95)), url("assets/tiger-system-pattern.svg") center/cover; color: #fff; box-shadow: var(--shadow); }
.hero-card h2, .screen-toolbar h2 { margin: 10px 0 4px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.03em; line-height: 1; }
.hero-card p { margin: 0; color: rgba(255,255,255,.58); }
.hero-card .primary-button { background: var(--amber); color: var(--charcoal); box-shadow: none; }
.metrics, .mini-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin: 18px 0; }
.metrics article, .mini-metrics article, .panel, .customer-card { border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.86); box-shadow: 0 8px 30px rgba(16,19,23,.035); }
.metrics article { position: relative; display: grid; min-height: 144px; align-content: center; padding: 22px; }
.metrics article > small, .mini-metrics small { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.metrics article > strong { margin: 3px 0 5px; font-size: 28px; }
em { color: var(--muted); font-size: 11px; font-style: normal; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.metric-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 9px; font-weight: 700; }
.metrics .metric-icon { position: absolute; right: 17px; top: 17px; }
.amber { background: rgba(245,158,11,.14); color: #a76800; }
.green { background: rgba(24,167,115,.13); color: var(--green); }
.blue { background: rgba(61,138,191,.12); color: var(--blue); }
.red { background: rgba(220,91,82,.12); color: var(--red); }
.business-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin: 18px 0; }
.summary-card { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; padding: 19px; background: rgba(255,255,255,.9); box-shadow: 0 8px 30px rgba(16,19,23,.035); }
.summary-head { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.summary-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 9px; font-weight: 700; }
.summary-head > div { display: grid; min-width: 0; }
.summary-head small { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.summary-head strong { overflow: hidden; font-size: 24px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.summary-card dl { display: grid; gap: 9px; margin: 15px 0 0; }
.summary-card dl div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.summary-card dt { color: var(--muted); font-size: 11px; }
.summary-card dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.summary-link { align-self: flex-start; border: 0; margin-top: auto; padding: 15px 0 0; background: transparent; color: #865400; font-size: 11px; font-weight: 700; }
.warning-text { color: #a76800 !important; }
.content-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(290px,.8fr); gap: 18px; margin: 18px 0; }
.panel { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-head h3 { margin: 3px 0 0; font-size: 21px; }
select, .date-chip { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; background: #fff; color: var(--ink); outline: 0; }
.chart { display: grid; height: 220px; grid-template-columns: 32px 1fr; gap: 12px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 25px; color: var(--muted); font-size: 9px; }
.bars { display: grid; grid-template-columns: repeat(7,1fr); gap: clamp(6px,1.5vw,18px); align-items: end; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 48px, rgba(16,19,23,.055) 49px); }
.bars div { display: flex; height: 100%; flex-direction: column; justify-content: flex-end; text-align: center; }
.bars i { height: var(--h); border-radius: 5px 5px 0 0; background: linear-gradient(to top, var(--orange), var(--amber)); opacity: .88; }
.bars span { height: 24px; padding-top: 7px; color: var(--muted); font-size: 9px; }
.attention-list { display: grid; gap: 10px; }
.attention-list button { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 11px; border: 0; border-radius: 8px; padding: 11px; background: #f8f7f2; text-align: left; }
.attention-list b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; }
.attention-list span { display: grid; }
.attention-list strong { font-size: 13px; }
.attention-list small { color: var(--muted); font-size: 10px; }
.attention-list i { color: var(--muted); font-size: 19px; }
.alert-count { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: rgba(220,91,82,.12); color: var(--red); font-size: 11px; }
.text-button { border: 0; background: transparent; color: #865400; font-size: 12px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { border-bottom: 1px solid var(--line); padding: 10px 12px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { border-bottom: 1px solid rgba(17,20,24,.065); padding: 14px 12px; color: #4d555e; font-size: 12px; }
td strong { color: var(--ink); }
.badge { display: inline-flex; min-width: 58px; justify-content: center; border-radius: 999px; padding: 4px 9px; font-size: 9px; font-weight: 700; }
.badge.paid { background: rgba(24,167,115,.12); color: var(--green); }
.badge.pending { background: rgba(245,158,11,.14); color: #9b6100; }
.badge.overdue { background: rgba(220,91,82,.12); color: var(--red); }
.badge.design { background: rgba(61,138,191,.12); color: var(--blue); }
.badge.finishing { background: rgba(135,92,170,.12); color: #7b4fa0; }

.production-panel { margin: 18px 0; }
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 11px; }
.pipeline > i { color: #b0aba2; font-style: normal; }
.pipeline article { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 14px; background: #faf9f5; }
.pipeline article > span { color: var(--amber); font-size: 9px; letter-spacing: .1em; }
.pipeline article > div { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 4px 0 3px; }
.pipeline article small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.pipeline article strong { font-size: 23px; line-height: 1; }
.pipeline article em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-list { display: grid; }
.job-list article { display: grid; grid-template-columns: 55px 4px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); padding: 14px 2px; }
.job-list article:last-child { border-bottom: 0; }
.job-list time { display: grid; font-size: 13px; font-weight: 700; }
.job-list time small { color: var(--muted); font-size: 8px; }
.job-color { width: 4px; height: 34px; border-radius: 9px; background: var(--amber); }
.job-color.urgent { background: var(--red); }
.job-color.normal { background: var(--blue); }
.job-list article > div { display: grid; min-width: 0; }
.job-list article > div strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.job-list article > div small { color: var(--muted); font-size: 10px; }
.job-stage { min-width: 60px; border-radius: 999px; padding: 5px 8px; font-size: 9px; text-align: center; }
.job-stage.printing { background: rgba(245,158,11,.14); color: #956000; }
.job-stage.finishing { background: rgba(135,92,170,.12); color: #7b4fa0; }
.job-stage.ready { background: rgba(24,167,115,.12); color: var(--green); }
.job-stage.design { background: rgba(61,138,191,.12); color: var(--blue); }
.ask-card { display: grid; grid-template-columns: auto minmax(250px,.75fr) minmax(280px,1fr); align-items: center; gap: 18px; border: 1px solid rgba(245,158,11,.26); border-radius: 11px; margin: 18px 0; padding: 20px 22px; background: linear-gradient(110deg, rgba(16,19,23,.98), rgba(30,34,39,.96)); color: #fff; box-shadow: var(--shadow); }
.assistant-mark { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(245,158,11,.42); border-radius: 10px; background: rgba(245,158,11,.12); color: var(--amber); font-weight: 700; }
.ask-card h3 { margin: 3px 0 1px; font-size: 18px; }
.ask-card p { margin: 0; color: rgba(255,255,255,.48); font-size: 10px; }
.ask-input { display: flex; min-height: 43px; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(255,255,255,.07); }
.ask-input input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 0 13px; background: transparent; color: #fff; }
.ask-input input::placeholder { color: rgba(255,255,255,.36); }
.ask-input button { border: 0; padding: 0 15px; background: var(--amber); color: var(--charcoal); font-weight: 700; }

/* Inner screens */
.screen-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 25px; }
.screen-toolbar h2 { color: var(--ink); }
.screen-toolbar p { margin: 0; color: var(--muted); }
.mini-metrics article { display: grid; padding: 18px 20px; }
.mini-metrics strong { font-size: 25px; }
.filter-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search { display: flex; min-height: 40px; min-width: 270px; flex: 1; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; background: #fff; }
.search input { width: 100%; border: 0; outline: 0; }
.customer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.customer-card { padding: 22px; }
.customer-card > div:first-child { display: flex; align-items: center; }
.customer-card > div:first-child span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: var(--charcoal); color: var(--amber); }
.active-dot { width: 8px; height: 8px; margin-left: -4px; margin-top: 31px; border: 2px solid #fff; border-radius: 50%; background: var(--green); }
.customer-card h3 { margin: 17px 0 2px; }
.customer-card p { margin: 0; color: var(--muted); font-size: 12px; }
.customer-card dl { display: grid; grid-template-columns: 1fr auto; gap: 7px; border-block: 1px solid var(--line); margin: 18px 0; padding: 14px 0; font-size: 12px; }
.customer-card dt { color: var(--muted); }
.customer-card dd { margin: 0; font-weight: 700; }
.customer-card button, .report-card button { border: 0; padding: 0; background: transparent; color: #865400; font-size: 12px; font-weight: 700; }
.add-card { display: grid; place-items: center; align-content: center; border-style: dashed; text-align: center; }
.add-card b { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 50%; background: rgba(245,158,11,.14); color: #986000; font-size: 24px; }
.report-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; }
.report-card { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.report-card h3 { margin: 3px 0; font-size: 24px; }
.report-card p { margin: 0; color: var(--muted); font-size: 11px; }
.report-card button { grid-column: 1/3; border-top: 1px solid var(--line); padding-top: 13px; text-align: left; }
.line-chart { position: relative; display: grid; height: 215px; grid-template-columns: repeat(6,1fr); align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 52px, rgba(16,19,23,.055) 53px); }
.line-fill { position: absolute; inset: 30px 0 24px; clip-path: polygon(0 78%,20% 62%,40% 70%,60% 30%,80% 43%,100% 7%,100% 100%,0 100%); background: linear-gradient(to bottom, rgba(245,158,11,.45), rgba(245,158,11,.02)); }
.line-chart span { z-index: 1; padding-bottom: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.progress-list { display: grid; gap: 24px; }
.progress-list label { position: relative; display: flex; justify-content: space-between; padding-bottom: 10px; font-size: 12px; }
.progress-list label::after, .progress-list i { position: absolute; height: 5px; left: 0; bottom: 0; border-radius: 10px; content: ""; }
.progress-list label::after { width: 100%; background: #eceae3; }
.progress-list i { z-index: 1; width: var(--w); background: linear-gradient(90deg,var(--orange),var(--amber)); }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0,700px); gap: 20px; }
.settings-nav { display: grid; align-content: start; gap: 5px; }
.settings-nav button { min-height: 42px; border: 0; border-radius: 7px; padding: 0 13px; background: transparent; color: var(--muted); text-align: left; }
.settings-nav button.active { background: var(--charcoal); color: #fff; }
.logo-upload { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 20px; }
.logo-upload img { width: 50px; height: 50px; border-radius: 9px; object-fit: cover; }
.logo-upload div { display: grid; }
.logo-upload small { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid .full { grid-column: 1/3; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: #fff; color: var(--ink); outline: 0; }
.form-grid textarea { min-height: 82px; resize: vertical; }

/* Orders */
.order-metrics { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; margin-bottom: 17px; }
.order-metrics button { position: relative; display: grid; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 15px; background: rgba(255,255,255,.82); color: var(--ink); text-align: left; }
.order-metrics button::after { position: absolute; height: 3px; right: 14px; bottom: -1px; left: 14px; border-radius: 3px 3px 0 0; background: transparent; content: ""; }
.order-metrics button.active { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.07); }
.order-metrics button.active::after { background: var(--amber); }
.order-metrics small { color: var(--muted); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.order-metrics strong { margin: 3px 0; font-size: 23px; }
.order-metrics em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-panel { padding: 0; overflow: hidden; }
.orders-filter-row { display: flex; gap: 9px; border-bottom: 1px solid var(--line); padding: 17px; }
.orders-table-wrap { min-height: 430px; }
.orders-table th { padding-block: 12px; background: #f8f7f2; }
.orders-table td { vertical-align: middle; }
.orders-table td > strong, .orders-table td > small { display: block; }
.orders-table td > small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.due-soon { color: var(--red) !important; }
.order-stage, .billing-state { display: inline-flex; min-width: 65px; justify-content: center; border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 700; }
.order-stage.new { background: rgba(61,138,191,.12); color: var(--blue); }
.order-stage.design { background: rgba(135,92,170,.12); color: #7b4fa0; }
.order-stage.printing { background: rgba(245,158,11,.14); color: #956000; }
.order-stage.finishing { background: rgba(249,115,22,.12); color: var(--orange); }
.order-stage.ready, .order-stage.delivered { background: rgba(24,167,115,.12); color: var(--green); }
.order-stage.pending { background: rgba(104,112,122,.12); color: var(--muted); }
.billing-state.unbilled { background: rgba(220,91,82,.1); color: var(--red); }
.billing-state.partial { background: rgba(245,158,11,.14); color: #956000; }
.billing-state.invoiced { background: rgba(61,138,191,.12); color: var(--blue); }
.billing-state.paid { background: rgba(24,167,115,.12); color: var(--green); }
.billing-state.non-billable { background: rgba(104,112,122,.12); color: var(--muted); }
.row-actions { display: flex; gap: 4px; }
.row-actions button { min-height: 28px; border: 1px solid var(--line); border-radius: 5px; padding: 0 7px; background: #fff; color: #5f6871; font-size: 8px; font-weight: 700; }
.row-actions button:hover { border-color: var(--amber); color: #865400; }
.row-actions .invoice-action { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.1); color: #865400; }
.row-actions button:disabled { cursor: not-allowed; opacity: .4; }
.empty-orders { display: grid; min-height: 330px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-orders > span { font-size: 30px; }
.empty-orders h3 { margin: 8px 0 1px; color: var(--ink); }
.empty-orders p { margin: 0; font-size: 11px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 13px 17px; color: var(--muted); font-size: 9px; }
.table-footer div { display: flex; gap: 4px; }
.table-footer button, .table-footer b { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 9px; }
.table-footer b { border-color: var(--charcoal); background: var(--charcoal); color: #fff; }

/* Create order */
.order-toolbar { align-items: flex-end; }
.back-link { display: block; border: 0; margin: 0 0 15px; padding: 0; background: transparent; color: #865400; font-size: 11px; font-weight: 700; }
.order-toolbar-actions { display: flex; gap: 9px; }
.order-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; align-items: start; gap: 18px; }
.order-form { display: grid; gap: 16px; }
.order-section { padding: 24px; }
.order-section-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 16px; }
.order-section-head > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 8px; background: var(--charcoal); color: var(--amber); font-size: 10px; letter-spacing: .08em; }
.order-section-head h3 { margin: 0; font-size: 18px; }
.order-section-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.order-section-head > div { flex: 1; }
.remove-module { border: 0; border-radius: 6px; padding: 6px 9px; background: rgba(220,91,82,.08); color: var(--red); font-size: 9px; font-weight: 700; }
.module-picker { padding: 24px; }
.module-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.module-picker-head h3 { margin: 4px 0 2px; font-size: 20px; }
.module-picker-head p { margin: 0; color: var(--muted); font-size: 11px; }
.module-count { flex: 0 0 auto; border-radius: 999px; padding: 7px 11px; background: rgba(245,158,11,.12); color: #865400; font-size: 10px; }
.module-options { display: grid; grid-template-columns: repeat(5,1fr); gap: 9px; }
.module-option { display: grid; min-width: 0; min-height: 126px; grid-template-rows: auto 1fr auto; justify-items: start; border: 1px dashed rgba(17,20,24,.18); border-radius: 9px; padding: 13px; background: #faf9f5; color: var(--ink); text-align: left; transition: .16s ease; }
.module-option > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 7px; background: #eceae3; color: var(--muted); }
.module-option > div { display: grid; align-content: center; min-width: 0; }
.module-option strong { font-size: 11px; }
.module-option small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.module-option em { color: #865400; font-size: 9px; font-style: normal; font-weight: 700; }
.module-option.attached { border-style: solid; border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.065); }
.module-option.attached > span { background: var(--charcoal); color: var(--amber); }
.module-option.attached em { color: var(--red); }
.order-module { border-left: 3px solid var(--amber); }
.order-fields input, .order-fields select, .order-fields textarea { min-height: 46px; background: #fbfaf7; }
.field-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.field-action button { border: 1px solid rgba(245,158,11,.35); border-radius: 7px; padding: 0 13px; background: rgba(245,158,11,.1); color: #865400; font-weight: 700; }
.calculated-field { display: flex; min-height: 46px; align-items: baseline; gap: 6px; border: 1px solid rgba(245,158,11,.3); border-radius: 7px; padding: 8px 12px; background: rgba(245,158,11,.08); }
.calculated-field strong { font-size: 20px; }
.calculated-field span { color: var(--muted); font-size: 11px; }
.quick-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; }
.quick-sizes > span { margin-right: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.quick-sizes button { min-height: 30px; border: 1px solid var(--line); border-radius: 999px; padding: 0 11px; background: #fff; color: var(--muted); font-size: 10px; }
.quick-sizes button:hover { border-color: var(--amber); color: #865400; }
.material-check { display: grid; grid-template-columns: repeat(3,1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; margin: 16px 0; padding: 15px; background: #f8f7f2; }
.material-check > div { display: grid; }
.material-check span { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.material-check strong { margin-top: 3px; font-size: 13px; }
.material-check em { border-radius: 999px; padding: 6px 10px; font-size: 9px; font-weight: 700; }
.material-check .stock-ok { background: rgba(24,167,115,.12); color: var(--green); }
.material-check .stock-short { background: rgba(220,91,82,.12); color: var(--red); }
.finish-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; border: 0; margin: 0 0 16px; padding: 0; }
.finish-options legend { margin-bottom: 10px; color: #353b42; font-size: 12px; }
.finish-options label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.finish-options input { width: 16px; height: 16px; accent-color: var(--amber); }
.standalone-label { display: grid; gap: 7px; color: #353b42; font-size: 13px; }
.standalone-label textarea { min-height: 75px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: #fbfaf7; resize: vertical; }
.artwork-grid { display: grid; grid-template-columns: 210px 1fr; gap: 18px; }
.upload-box { display: grid; min-height: 180px; place-items: center; align-content: center; border: 1px dashed rgba(245,158,11,.5); border-radius: 9px; padding: 18px; background: rgba(245,158,11,.045); color: #865400; text-align: center; cursor: pointer; }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-box > span { font-size: 28px; }
.upload-box strong { margin: 8px 0 2px; font-size: 12px; }
.upload-box small { color: var(--muted); font-size: 9px; }
.job-work-list { display: grid; gap: 10px; }
.job-work-row { display: grid; grid-template-columns: 1.25fr 1fr .8fr .8fr auto; align-items: end; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 13px; background: #faf9f5; }
.job-work-row label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.job-work-row input, .job-work-row select { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; background: #fff; color: var(--ink); text-transform: none; }
.remove-row { width: 32px; height: 38px; border: 0; border-radius: 6px; background: rgba(220,91,82,.09); color: var(--red); font-size: 18px; }
.add-row-button { border: 0; margin: 12px 0 17px; padding: 0; background: transparent; color: #865400; font-size: 10px; font-weight: 700; }
.inventory-mode { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 16px; }
.mode-card { display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 13px; background: #faf9f5; cursor: pointer; }
.mode-card:has(input:checked) { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.07); }
.mode-card input { margin: 2px 0 0; accent-color: var(--amber); }
.mode-card span { display: grid; }
.mode-card strong { font-size: 11px; }
.mode-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.inventory-allocation { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; padding: 13px; background: #faf9f5; }
.inventory-allocation > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.inventory-allocation span { font-size: 11px; font-weight: 700; }
.inventory-allocation strong { font-size: 11px; }
.inventory-allocation em { grid-column: 1/3; color: var(--muted); font-size: 8px; }
.inventory-allocation button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fff; color: #865400; font-size: 9px; font-weight: 700; }
.order-summary { position: sticky; top: 94px; padding: 0; overflow: hidden; }
.summary-sticky { padding: 23px; }
.summary-sticky > h3 { margin: 8px 0 2px; font-size: 22px; }
.summary-sticky > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.summary-spec { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.summary-spec div { display: grid; padding: 11px; background: #faf9f5; }
.summary-spec small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.summary-spec strong { margin-top: 3px; font-size: 12px; }
.attached-summary { border-bottom: 1px solid var(--line); padding: 14px 0; }
.attached-summary > small { color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.attached-summary > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.attached-summary span { border-radius: 999px; padding: 4px 7px; background: rgba(245,158,11,.11); color: #865400; font-size: 8px; }
.price-breakdown { display: grid; gap: 9px; border-bottom: 1px solid var(--line); margin-top: 18px; padding-bottom: 16px; }
.price-breakdown div, .grand-total, .balance-total { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.price-breakdown span, .balance-total span { color: var(--muted); font-size: 10px; }
.price-breakdown strong, .balance-total strong { font-size: 11px; }
.grand-total { align-items: center; padding: 16px 0; }
.grand-total span { font-size: 12px; font-weight: 700; }
.grand-total strong { font-size: 25px; }
.balance-total { border-block: 1px solid var(--line); padding: 14px 0; }
.balance-total strong:last-child { color: var(--red); }
.summary-deadline { display: grid; margin: 16px 0; border-left: 3px solid var(--amber); padding: 8px 10px; background: rgba(245,158,11,.07); }
.summary-deadline span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.summary-deadline strong { margin-top: 2px; font-size: 12px; }
.summary-sticky > .primary-button { width: 100%; }
.prototype-save-note { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; text-align: center; }

/* Modal */
.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,7,9,.65); backdrop-filter: blur(5px); }
.modal { width: min(100%,600px); border-radius: 13px; padding: 27px; background: var(--paper); box-shadow: 0 35px 100px rgba(0,0,0,.35); }
.modal-head { display: flex; align-items: start; justify-content: space-between; margin-bottom: 24px; }
.modal-head h2 { margin: 5px 0 0; font-size: 32px; }
.modal-head button { border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.invoice-total { display: grid; grid-template-columns: 1fr auto; border-block: 1px solid var(--line); margin: 23px 0; padding: 17px 0; }
.invoice-total span { color: var(--muted); font-size: 12px; }
.invoice-total strong { grid-row: 1/3; grid-column: 2; align-self: center; font-size: 26px; }
.invoice-total small { color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; z-index: 120; right: 22px; bottom: 65px; transform: translateY(20px); border-left: 4px solid var(--amber); border-radius: 7px; padding: 13px 18px; background: var(--charcoal); color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { transform: none; opacity: 1; }

@media (max-width: 1050px) {
  .metrics, .mini-metrics, .report-grid, .business-summary { grid-template-columns: repeat(2,1fr); }
  .customer-grid { grid-template-columns: repeat(2,1fr); }
  .pipeline { grid-template-columns: repeat(5,1fr); }
  .pipeline > i { display: none; }
  .ask-card { grid-template-columns: auto 1fr; }
  .ask-input { grid-column: 1/3; }
  .order-layout { grid-template-columns: minmax(0,1fr) 285px; }
  .module-options { grid-template-columns: repeat(3,1fr); }
  .job-work-row { grid-template-columns: repeat(2,1fr) auto; }
  .order-metrics { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 820px) {
  .login-view { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .sidebar { position: fixed; left: -250px; transition: left .22s ease; }
  .sidebar.open { left: 0; box-shadow: 25px 0 80px rgba(0,0,0,.25); }
  .close-nav, .menu-button { display: grid; }
  .app-shell { grid-template-columns: 1fr; }
  .topbar { justify-content: flex-start; gap: 13px; }
  .top-actions { margin-left: auto; }
  .content-grid, .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { grid-template-columns: repeat(3,1fr); }
  .pipeline { grid-template-columns: repeat(3,1fr); }
  .order-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .module-options { grid-template-columns: repeat(3,1fr); }
  .orders-filter-row { flex-wrap: wrap; }
  .orders-filter-row .search { min-width: 100%; }
}
@media (max-width: 600px) {
  .prototype-note { right: 10px; bottom: 10px; }
  .prototype-note strong { display: none; }
  .login-form-side { padding: 28px 20px; }
  .business-chip div, .icon-button { display: none; }
  .screen { padding: 24px 15px 70px; }
  .topbar { padding-inline: 15px; }
  .hero-card, .screen-toolbar { align-items: flex-start; flex-direction: column; }
  .hero-card { padding: 27px 24px; }
  .metrics, .mini-metrics, .report-grid, .customer-grid { grid-template-columns: 1fr 1fr; }
  .metrics article { min-height: 125px; padding: 16px; }
  .metrics article > strong { font-size: 23px; }
  .filter-row { flex-wrap: wrap; }
  .search { min-width: 100%; }
  .customer-grid { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav button { flex: 0 0 auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .pipeline { display: flex; overflow-x: auto; padding-bottom: 5px; }
  .pipeline article { min-width: 145px; }
  .ask-card { grid-template-columns: auto 1fr; }
  .ask-input { grid-column: 1/3; }
  .order-toolbar-actions { width: 100%; }
  .order-toolbar-actions button { flex: 1; }
  .material-check { grid-template-columns: repeat(2,1fr); }
  .finish-options { grid-template-columns: repeat(2,1fr); }
  .artwork-grid { grid-template-columns: 1fr; }
  .upload-box { min-height: 140px; }
  .module-picker-head { align-items: flex-start; flex-direction: column; }
  .module-options { grid-template-columns: repeat(2,1fr); }
  .job-work-row { grid-template-columns: 1fr; }
  .remove-row { width: 100%; }
  .inventory-mode { grid-template-columns: 1fr; }
  .inventory-allocation { grid-template-columns: 1fr; }
  .order-metrics { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 410px) {
  .metrics, .mini-metrics, .report-grid, .business-summary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
