/* ==========================================================================
   Portfolio — minimal design system
   Off-white canvas, dark type, one accent colour (configurable in settings).
   ========================================================================== */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #3d3d3a;
  --muted: #76746e;
  --line: #e7e5e0;
  --line-2: #d9d6cf;
  --accent: #ff5a1f;
  --accent-ink: #ffffff;
  --ok: #1f7a4d;
  --warn: #9a6200;
  --bad: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 820px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section-sm { padding: clamp(32px, 5vw, 56px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 14px; display: flex; width: fit-content; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,246,243,.86); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { font-weight: 700; font-size: 1.08rem; text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; color: var(--ink-2); transition: background .15s, color .15s; }
.nav-links a:hover, .nav-links a.active { background: rgba(17,17,17,.06); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; top: 72px; left: 0; right: 0; height: calc(100vh - 72px); height: calc(100dvh - 72px); border-top: 1px solid var(--line); background: var(--bg); padding: 24px var(--gutter); display: none; flex-direction: column; align-items: stretch; gap: 20px; overflow-y: auto; }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; }
  .nav-links a { display: block; font-size: 1.4rem; padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-links a:hover { background: none; }
  .nav-actions { flex-direction: column; align-items: stretch; }
}
@media (min-width: 901px) { .nav-menu { display: flex; align-items: center; gap: 20px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s, box-shadow .15s, opacity .15s; line-height: 1.2; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(17,17,17,.14); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--bad); border-color: #f0c4bf; }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); box-shadow: none; }
.btn-wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.link-btn.danger { color: var(--bad); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 130px) 0 clamp(40px, 6vw, 80px); }
.hero h1 { font-size: clamp(2.6rem, 7.2vw, 6rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; margin-bottom: .35em; }
.hero h1 .display { font-size: 1.05em; }
.hero-intro { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 46ch; margin-bottom: 32px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Media ---------- */
.ratio { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #e9e7e2; }
.ratio iframe, .ratio video, .ratio img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.showreel { border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow); }

/* ---------- Project grid ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.masonry { columns: 3 320px; column-gap: clamp(16px, 2.4vw, 28px); }
.masonry > * { break-inside: avoid; margin-bottom: clamp(16px, 2.4vw, 28px); }

.project-card { display: block; text-decoration: none; color: inherit; }
.project-card .thumb { position: relative; overflow: hidden; border-radius: var(--radius); background: #e9e7e2; aspect-ratio: 4 / 3; }
.masonry .project-card .thumb { aspect-ratio: auto; }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project-card:hover .thumb img { transform: scale(1.035); }
.project-card .thumb .play { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; }
.project-card .meta { padding: 14px 2px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.project-card .title { font-weight: 600; letter-spacing: -0.01em; }
.project-card .cat { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.project-card .summary { color: var(--muted); font-size: .92rem; margin: 4px 2px 0; }
.placeholder-thumb { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .9rem; min-height: 180px; background: repeating-linear-gradient(45deg, #ece9e3, #ece9e3 10px, #e6e3dc 10px, #e6e3dc 20px); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 32px; }
.chip { display: inline-flex; align-items: center; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: .9rem; text-decoration: none; color: var(--ink-2); transition: all .15s; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-input { margin-left: auto; min-width: 220px; }
@media (max-width: 640px) { .search-input { margin-left: 0; width: 100%; } }

/* ---------- Service / product cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: clamp(18px, 2.4vw, 28px); }
.offer-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; height: 100%; }
.offer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.offer-card .thumb { aspect-ratio: 16 / 10; background: #ece9e3; overflow: hidden; }
.offer-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.offer-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.offer-card .cat { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.offer-card h3 { font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.offer-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.offer-card .foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); font-size: .9rem; }
.price { font-weight: 700; }
.price del { color: var(--muted); font-weight: 400; margin-right: 6px; }
.price .from { font-weight: 400; color: var(--muted); font-size: .85em; }

/* ---------- Detail pages ---------- */
.detail-hero { padding: clamp(40px, 7vw, 88px) 0 32px; }
.detail-hero h1 { max-width: 20ch; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 28px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 28px 0 40px; }
.detail-meta div { min-width: 120px; }
.detail-meta dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.detail-meta dd { margin: 0; }
.gallery { display: flex; flex-direction: column; gap: clamp(12px, 2vw, 24px); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: var(--radius); background: #ece9e3; }
.gallery figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.prose { font-size: 1.05rem; color: var(--ink-2); max-width: 68ch; }
.prose h3 { margin-top: 1.6em; color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--ink); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 92px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: #ecebe6; color: var(--ink-2); }

/* Packages */
.packages { display: grid; gap: 12px; }
.package { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; display: block; }
.package:hover { border-color: var(--line-2); }
.package input { margin-right: 8px; accent-color: var(--ink); }
.package.selected, .package:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.package .p-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.package .p-meta { font-size: .85rem; color: var(--muted); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.package .p-desc { font-size: .9rem; color: var(--ink-2); margin-top: 8px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.portrait { border-radius: calc(var(--radius) + 6px); overflow: hidden; background: #ece9e3; aspect-ratio: 1 / 1; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-lines li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.field .error, .error-text { font-size: .85rem; color: var(--bad); margin-top: 6px; }
.req { color: var(--accent); }
.input, input:not([type]), .select, .textarea, input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date], input[type=search], input[type=color], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: inherit; font-size: .97rem; transition: border-color .15s, box-shadow .15s; }
input[type=color] { padding: 4px; height: 44px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--bad); }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--ink); width: 16px; height: 16px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.auth-box { max-width: 440px; margin: clamp(32px, 8vw, 80px) auto; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .95rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: #eef8f2; border-color: #c8e8d6; color: #13502f; }
.alert-error { background: #fdf0ee; border-color: #f4cdc7; color: #8a1c12; }
.alert-info { background: #f1f2f6; border-color: #dcdfe8; color: #2f3442; }
.alert-warn { background: #fdf6e7; border-color: #f0dfb4; color: #6b4a00; }
.flash-stack { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.flash-stack .alert { box-shadow: var(--shadow); margin: 0; animation: slideUp .3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #ecebe6; color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-pending, .badge-unpaid, .badge-draft, .badge-new { background: #fdf3e3; color: #8a5a00; }
.badge-accepted, .badge-in_progress, .badge-open { background: #eaf1fd; color: #1e4fa8; }
.badge-delivered { background: #f1ecfd; color: #5b33b0; }
.badge-revision_requested { background: #fdeee5; color: #a8461e; }
.badge-completed, .badge-paid, .badge-published, .badge-active, .badge-read, .badge-replied, .badge-resolved { background: #e8f6ee; color: #17663e; }
.badge-cancelled, .badge-refunded, .badge-inactive, .badge-unpublished, .badge-archived, .badge-spam, .badge-closed { background: #f0efec; color: #6b6963; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-cta { font-size: clamp(1.6rem, 3.6vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 20px; font-weight: 600; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(31,168,85,.35); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfbf9; white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.unread td { background: #fffbf3; }
.table .thumb-sm { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: #ece9e3; display: block; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.table a.row-link:hover { text-decoration: underline; }

/* ---------- Account / admin shell ---------- */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { padding: 4px 10px 18px; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; padding: 14px 10px 6px; }
.side-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .93rem; }
.side-link:hover { background: #f3f2ef; color: var(--ink); }
.side-link.active { background: var(--ink); color: #fff; }
.side-link .count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; font-weight: 700; }
.app-main { padding: clamp(20px, 3vw, 36px); min-width: 0; }
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.app-top h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 55; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .num { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat .lbl { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-size: .93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 26px); margin-bottom: 20px; }
.panel h2 { font-size: 1.1rem; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }

/* Repeater rows (packages, add-ons, fields, FAQ) */
.repeater { display: grid; gap: 12px; }
.rep-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: #fcfcfa; position: relative; }
.rep-row .rep-remove { position: absolute; top: 10px; right: 12px; }
.rep-grid { display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .rep-grid { grid-template-columns: 1fr 1fr; } }

/* Sortable media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; cursor: grab; position: relative; }
.media-item.dragging { opacity: .4; }
.media-item.drag-over { outline: 2px dashed var(--ink); outline-offset: 2px; }
.media-item .m-thumb { aspect-ratio: 4 / 3; background: #ece9e3; display: grid; place-items: center; overflow: hidden; font-size: .8rem; color: var(--muted); }
.media-item .m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-item .m-actions { padding: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .8rem; }
.sortable-list .sort-row { cursor: grab; }
.sortable-list .sort-row.dragging { opacity: .4; }
.drag-handle { cursor: grab; color: var(--muted); user-select: none; padding: 0 4px; }

/* ---------- Order workspace ---------- */
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .ws-grid { grid-template-columns: 1fr; } }
.chat { display: flex; flex-direction: column; gap: 14px; max-height: 560px; overflow-y: auto; padding: 4px; }
.msg { max-width: 82%; }
.msg.mine { align-self: flex-end; }
.msg .bubble { padding: 12px 14px; border-radius: 14px; background: #f3f2ef; white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.msg.mine .bubble { background: var(--ink); color: #fff; }
.msg.mine .bubble a { color: #fff; }
.msg .m-meta { font-size: .76rem; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; }
.msg.mine .m-meta { justify-content: flex-end; }
.msg .files { display: grid; gap: 6px; margin-top: 8px; }
.file-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-size: .88rem; color: var(--ink); max-width: 100%; }
.file-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pill:hover { border-color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline .t-time { color: var(--muted); font-size: .78rem; }
.delivery { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; background: #fcfcfa; }
.progress { height: 6px; border-radius: 999px; background: #ecebe6; overflow: hidden; display: none; margin-top: 10px; }
.progress.show { display: block; }
.progress > div { height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: .9rem; background: #fff; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Modal confirm ---------- */
dialog.confirm { border: 0; border-radius: var(--radius); padding: 24px; max-width: 420px; width: calc(100% - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
dialog.confirm::backdrop { background: rgba(17,17,17,.4); }

/* Repeater rows: stacked labels, remove link clear of the fields */
.rep-row { padding-top: 34px; }
.rep-row label { display: block; font-weight: 600; font-size: .82rem; color: var(--ink-2); }
.rep-row label > input:not([type=checkbox]), .rep-row label > select, .rep-row label > textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.rep-row label.check { display: flex; }

/* ==========================================================================
   Orange theme: white background, orange buttons, dark hero banner
   ========================================================================== */
body.theme-orange { --bg: #ffffff; --surface: #ffffff; --line: #ece9e4; --line-2: #dedad3; --accent: #ff7a00; --accent-ink: #ffffff; background: #ffffff; }
.theme-orange .site-header { background: rgba(255,255,255,.9); }
.theme-orange .btn { background: linear-gradient(135deg,#ff9a2e,#ff7a00); border-color: transparent; color: #fff; }
.theme-orange .btn:hover { box-shadow: 0 8px 24px rgba(255,122,0,.35); }
.theme-orange .btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.theme-orange .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.theme-orange .btn-wa { background: #1fa855; color: #fff; }
.theme-orange .chip.active, .theme-orange .pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.theme-orange .hero h1 .display, .theme-orange .accent-text { background: linear-gradient(90deg,#ffb35c,#ff7a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-orange .portrait { box-shadow: 0 18px 50px rgba(255,122,0,.18); }
.theme-orange a:hover { text-decoration-color: var(--accent); }

/* Hero banner (dark image, light text) */
.theme-orange .hero.hero-img { position: relative; color: #f5f3ef; background: linear-gradient(90deg, rgba(18,17,22,.96) 0%, rgba(18,17,22,.84) 45%, rgba(18,17,22,.1) 78%), url(../uploads/branding/hero-bg.jpg) right center / cover no-repeat, #121116; min-height: min(82vh, 720px); display: flex; align-items: center; }
.theme-orange .hero.hero-img .wrap { width: 100%; }
.theme-orange .hero.hero-img .eyebrow { color: #c9c5bd; }
.theme-orange .hero.hero-img .hero-intro { color: #d6d2ca; }
.theme-orange .hero.hero-img .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.35); }
.theme-orange .hero.hero-img .btn-ghost:hover { border-color: #ff9a2e; color: #ffb35c; }
@media (max-width: 800px) {
  .theme-orange .hero.hero-img { background: linear-gradient(180deg, rgba(18,17,22,.72), rgba(18,17,22,.95)), url(../uploads/branding/hero-bg.jpg) 72% center / cover no-repeat, #121116; min-height: auto; }
  .theme-orange .hero.hero-img .row { flex-wrap: wrap; }
}

/* Even, aligned portfolio grid (instead of masonry) */
.theme-orange .masonry { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); align-items: start; }
.theme-orange .masonry > * { margin: 0; }
.theme-orange .masonry .project-card .thumb, .theme-orange .project-card .thumb { aspect-ratio: 1 / 1; }
.theme-orange .project-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1000px) { .theme-orange .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .theme-orange .masonry { grid-template-columns: 1fr; } }

/* Search */
.nav-search { display: flex; align-items: center; background: #f4f2ee; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 14px; }
.nav-search input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 7px 0 !important; width: 150px; font: inherit; font-size: .9rem; outline: none; color: var(--ink); }
.nav-search button { border: 0; background: var(--accent); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,0,.15); }
@media (max-width: 1100px) and (min-width: 901px) { .nav-search input { width: 100px; } }
@media (max-width: 900px) { .nav-search { width: 100%; } .nav-search input { width: 100%; font-size: 1rem; } }
.search-big { display: flex; gap: 10px; max-width: 640px; margin-top: 18px; }
.search-big input { flex: 1; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line-2); font: inherit; font-size: 1rem; }
.search-big input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,0,.15); }
.mb-4 { margin-bottom: 40px; }

/* Hero slider (auto-rotating background images, same overlay/text) */
.theme-orange .hero.hero-img { background: #121116; position: relative; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: heroSlideFade 16s infinite; }
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 8s; }
@keyframes heroSlideFade { 0% { opacity: 0; } 6% { opacity: 1; } 44% { opacity: 1; } 52% { opacity: 0; } 100% { opacity: 0; } }
.hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(18,17,22,.97) 0%, rgba(18,17,22,.93) 50%, rgba(18,17,22,.6) 100%); }
.hero.hero-img .wrap { position: relative; z-index: 2; }
@media (max-width: 800px) {
  .hero-overlay { background: linear-gradient(180deg, rgba(18,17,22,.72), rgba(18,17,22,.95)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; }
  .hero-slide:first-child { opacity: 1; }
}
.hero-slide-single { animation: none !important; opacity: 1 !important; }
