/* "Order a robot" (/freelance) — the same look as the PolyMaria shop: Inter, shop blue, soft cards; light and dark */
@font-face { font-family: AbuInter; src: url('/assets/fonts/Inter-Variable.ttf') format('truetype'); font-style: normal; font-weight: 100 900; font-display: swap; }
:root { --bg: #f4f7fb; --surface: #fff; --surface-2: #f1f5fb; --text: #141a2a; --muted: #5f6b7d; --line: #e3e9f2; --accent: #0068d6; --accent-2: #008dff; --accent-soft: #e8f2ff;
  --on-accent: #fff; --warn-bg: #fff5e3; --warn-text: #7a4f12; --good-bg: #e7f7ee; --good-text: #0f6b3b; --bad: #c0262d; --gold: #e0a100; --shadow: 0 1px 2px rgba(16, 32, 64, .04), 0 8px 24px rgba(16, 32, 64, .06);
  --hero: linear-gradient(135deg, #f7fbff 0%, #eef5ff 55%, #f3f0ff 100%); --radius: 18px; color-scheme: light; }
:root[data-theme="dark"] { --bg: #0b1220; --surface: #121c2e; --surface-2: #17233a; --text: #e6edf8; --muted: #9aaac0; --line: #22324b; --accent: #4d9bff; --accent-2: #3aa0ff; --accent-soft: #15304f;
  --on-accent: #051426; --warn-bg: #3a2c10; --warn-text: #ffd58c; --good-bg: #123624; --good-text: #8fe0b3; --bad: #ffb0aa; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .25);
  --hero: linear-gradient(135deg, #13203a 0%, #122544 55%, #1c1d3d 100%); color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 15px/1.55 AbuInter, Arial, sans-serif; font-synthesis: none; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header (as in the shop) ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; }
.brand-mark { color: var(--accent); border-radius: 11px; }
.wordmark { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); }
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-pill { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.top-pill:hover { border-color: var(--accent-2); }
.top-pill.lang { padding: 0 6px; } .top-pill.lang select { border: 0; background: none; height: 40px; font-weight: 600; cursor: pointer; }
.icon-button { width: 44px; padding: 0; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 700; font-size: 14px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; font-weight: 800; font-size: 14px; }
.who-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- page layout: sidebar + main, like the shop catalog ---------- */
.layout { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 20px 56px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.layout.solo { grid-template-columns: minmax(0, 1fr); }
.app { min-width: 0; }
.side { position: sticky; top: 96px; display: grid; gap: 16px; }
.side-hero { border-radius: var(--radius); padding: 20px; color: #fff; background: linear-gradient(145deg, #1a8cff 0%, #0068d6 60%, #0052b4 100%); box-shadow: 0 10px 30px rgba(0, 104, 214, .25); display: grid; gap: 6px; }
.side-hero .eyebrow { color: rgba(255, 255, 255, .8); }
.side-hero strong { font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.side-hero small { color: rgba(255, 255, 255, .85); font-size: 13px; }
.side-cta { margin-top: 10px; display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45); color: #fff; font-weight: 700; text-decoration: none; }
.side-cta:hover { background: rgba(255, 255, 255, .26); }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.side-title { margin: 2px 10px 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.side-item:hover { background: var(--surface-2); }
.side-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--accent); flex-shrink: 0; }
.side-item[aria-current="page"] .tile { background: var(--accent); color: #fff; }
.side-item .pill { margin-left: auto; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }

/* ---------- page hero (as the shop home) ---------- */
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.page-hero { background: var(--hero); border: 1px solid var(--line); border-radius: 24px; padding: 28px; margin-bottom: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: end; }
.page-hero h1 { margin: 6px 0 6px; }
.page-hero .lead { margin: 0; font-size: 15px; }
.page-hero .actions { margin-top: 16px; }
.stat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr); gap: 10px; margin: 0; }
.stat-tiles div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat-tiles dt { font-size: 12px; color: var(--muted); font-weight: 600; } .stat-tiles dd { margin: 2px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat-tiles .accent dd { color: var(--accent); }

/* ---------- type ---------- */
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: 20px; margin: 24px 0 12px; letter-spacing: -.01em; } h3 { font-size: 16px; margin: 16px 0 8px; }
.hint, small { color: var(--muted); font-size: 13px; }
.lead { font-size: 16px; color: var(--muted); max-width: 680px; }
.accent-line { color: var(--accent-2); }

/* ---------- landing (signed out) ---------- */
.landing { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.hero { background: var(--hero); border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.hero h1 { font-size: clamp(30px, 4vw, 42px); }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0; margin: 20px 0 8px; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-weight: 600; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 8px; }
.narrow { max-width: 460px; }
.landing .narrow { margin-top: 0; }

/* ---------- cards, forms, buttons ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card, section.card + form, form + form.card, .card + section.card { margin-top: 16px; }
.form { display: grid; gap: 14px; }
.form label, .form fieldset { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.form input:not([type="checkbox"]):not([type="radio"]), .form select, .form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.form small { font-weight: 400; }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; }
.primary, .secondary, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 14px; transition: transform .12s, box-shadow .12s, background .12s; }
.primary { background: var(--accent); color: var(--on-accent); border: 0; box-shadow: 0 6px 16px rgba(0, 104, 214, .22); } .primary:hover { background: var(--accent-2); } .primary:disabled { opacity: .6; cursor: wait; }
.secondary { background: var(--surface); border: 1px solid var(--line); color: var(--text); } .secondary:hover { border-color: var(--accent-2); color: var(--accent); }
.ghost { background: none; border: 1px solid transparent; color: var(--muted); } .danger { color: var(--bad); }
.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.upload { justify-self: start; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.error { color: var(--bad); margin: 0; } .error:empty { display: none; }
.banner { padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid color-mix(in srgb, var(--warn-text) 18%, transparent); }
.note { padding: 12px 16px; border-radius: 14px; background: var(--good-bg); color: var(--good-text); border: 1px solid color-mix(in srgb, var(--good-text) 18%, transparent); }
.empty { padding: 40px 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); background: var(--surface); display: grid; justify-items: center; gap: 10px; }
.empty .empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-size: 26px; }
.empty strong { color: var(--text); font-size: 16px; }

/* segmented sub tabs (Open orders / My offers) */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.seg button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: none; font-weight: 700; color: var(--muted); cursor: pointer; box-shadow: none; }
.seg button.primary { background: var(--accent); color: var(--on-accent); }

/* ---------- lists: order cards like the shop's product rows ---------- */
.rows, .offers, .files, .chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.row:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.row > span:first-child { display: grid; gap: 4px; min-width: 0; } .row-side { display: grid; justify-items: end; align-content: start; gap: 6px; flex-shrink: 0; text-align: right; }
.job-card { align-items: stretch; }
.row.job-card > .job-body { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }
.job-icon svg { width: 28px; height: 28px; }
.job-icon { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; background: #fff4de; color: #b86e00; }
.job-icon.k-indicator { background: #e7f7ee; color: #11803f; } .job-icon.k-script { background: #efe9ff; color: #6b3fd6; } .job-icon.k-fix, .job-icon.k-other { background: var(--accent-soft); color: var(--accent); }
.job-icon em { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; white-space: nowrap; }
.job-text { display: grid; gap: 6px; min-width: 0; }
.job-text strong { font-size: 16px; letter-spacing: -.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 2px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chip.blue { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.gold { background: #fff4de; color: #9a5b00; border-color: transparent; }
.price { font-size: 18px; font-weight: 800; letter-spacing: -.02em; } .price small { font-size: 12px; font-weight: 600; }
.go { font-weight: 700; color: var(--accent); font-size: 14px; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.s-open, .s-completed { background: var(--good-bg); color: var(--good-text); } .s-pending, .s-rejected, .s-disputed { background: var(--warn-bg); color: var(--warn-text); }
.s-in_progress, .s-delivered { background: var(--accent-soft); color: var(--accent); }
.count { padding: 1px 8px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; }

/* developers */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dev-card { display: grid; gap: 10px; align-content: start; }
.dev-top { display: flex; gap: 12px; align-items: center; }
.dev-top .avatar { width: 48px; height: 48px; font-size: 18px; border-radius: 14px; }
.dev-top strong { font-size: 16px; display: block; }

/* ---------- details ---------- */
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.facts div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; min-width: 120px; }
.facts dt { color: var(--muted); font-size: 12px; font-weight: 600; } .facts dd { margin: 0; font-weight: 800; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.offer-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.offer.muted { opacity: .6; }
.offer-text { background: var(--surface-2); padding: 10px 12px; border-radius: 12px; }
.files li { overflow-wrap: anywhere; }
.chat { margin: 14px 0; max-height: 55vh; overflow: auto; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.msg.mine { justify-self: end; background: var(--accent-soft); }
.msg p { margin: 2px 0 0; }
details.dispute summary { cursor: pointer; font-weight: 700; color: var(--bad); }
.stars { display: flex; flex-wrap: wrap; gap: 8px 14px; } .stars label { display: flex; gap: 4px; align-items: center; font-weight: 400; color: var(--gold); }
.stars-inline { color: var(--gold); letter-spacing: 1px; }

/* guide */
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .guide-cols .card { display: grid; align-content: start; gap: 8px; margin: 0; }
.steps.guide { grid-template-columns: 1fr; } .steps.guide li { font-weight: 400; box-shadow: none; }
.guide-cols + .card { margin-top: 16px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; background: var(--surface); }
.foot p { max-width: 1240px; margin: 0 auto; padding: 18px 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side-hero { display: none; }
  .side-card { display: flex; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
  .side-title { display: none; }
  .side-item { flex-shrink: 0; padding: 6px 12px 6px 6px; }
  .page-hero { grid-template-columns: minmax(0, 1fr); }
  .stat-tiles { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .landing { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .row3 { grid-template-columns: 1fr 1fr; } .guide-cols { grid-template-columns: 1fr; } .crumb { display: none; } }
@media (max-width: 560px) {
  .top-inner { padding: 10px 16px; gap: 10px; } .wordmark { font-size: 22px; } .shop-link, .who-name { display: none; } .account-chip { padding: 0 6px; }
  .layout { padding: 16px 16px 40px; } .page-hero, .hero { padding: 20px; border-radius: 20px; }
  .steps, .row2, .row3 { grid-template-columns: 1fr; }
  .row { flex-direction: column; } .row-side { justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; justify-content: start; }
  .job-icon { width: 52px; height: 52px; }
}
.card:empty { display: none; }
section.card > a[href^="#"]:first-child { display: inline-flex; font-size: 13px; font-weight: 700; text-decoration: none; margin-bottom: 6px; }
.landing .narrow { max-width: none; }
:root[data-theme="dark"] .job-icon { background: #3a2c10; color: #ffc766; } :root[data-theme="dark"] .job-icon.k-indicator { background: #123624; color: #8fe0b3; }
:root[data-theme="dark"] .job-icon.k-script { background: #2a2050; color: #c3b0ff; } :root[data-theme="dark"] .chip.gold { background: #3a2c10; color: #ffd58c; }
/* the PolyMaria "P" logo (assets/favicon.svg): the SVG carries its own colours, so no tile behind it */
.brand-mark.pm-logo { background: none; border-radius: 0; }
