/* Miccor Flooring website editor. Styles taken from the approved preview (8 October 2026), with additions at the end
   for the real thing: messages, uploads in progress, the sign-in-again box, recent saves and server warnings. */
@font-face { font-family: "Boska"; src: url("/assets/fonts/boska-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Boska"; src: url("/assets/fonts/boska-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --bg: #f4f3f0; --panel: #ffffff; --wall: #eeedea; --ink: #111111; --mute: #5c5b58; --faint: #8a8984;
  --rule: rgba(17,17,17,.12); --rule-2: rgba(17,17,17,.2);
  --red: #c8202f; --red-deep: #a51a26; --blue: #2f78a2; --blue-soft: rgba(47,120,162,.1); --green: #2f7d4f;
  --sans: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --serif: "Boska", "Iowan Old Style", "Times New Roman", serif;
  --r: 4px; --side: 268px; --top: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--panel); font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn--solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn--solid:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: rgba(17,17,17,.05); border-color: transparent; }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r); background: transparent; color: var(--mute); }
.icon-btn:hover { background: rgba(17,17,17,.06); color: var(--ink); }
.icon-btn svg, .btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; background: var(--wall); }
.signin__card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 36px 32px 28px; box-shadow: 0 24px 60px -32px rgba(0,0,0,.35); }
.signin__logo { display: block; width: 132px; height: auto; margin: 0 0 26px; }
.signin h1 { font: 500 30px/1.1 var(--serif); margin: 0 0 6px; }
.signin__sub { color: var(--mute); margin: 0 0 24px; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin: 0 0 6px; }
.field input, .field select, .input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: var(--r); background: #fff; }
.field input:focus, .field select:focus, .input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 6px; }
.signin .btn--solid { width: 100%; min-height: 46px; margin-top: 6px; font-size: 15px; }
.signin__forgot { display: block; text-align: center; margin: 16px 0 0; font-size: 13.5px; color: var(--mute); }
.signin__foot { margin: 22px 0 0; text-align: center; color: var(--faint); font-size: 12px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; height: 100dvh; }
.side { display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--rule); min-height: 0; }
.side__head { padding: 18px 20px 14px; border-bottom: 1px solid var(--rule); }
.side__head img { display: block; width: 104px; height: auto; }
.side__head p { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; background: #fdf3d8; color: #7a5a12; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.side__scroll { flex: 1; overflow: auto; padding: 8px 10px 16px; }
.side h2 { margin: 18px 10px 6px; color: var(--faint); font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; text-align: left; font-size: 14px; color: var(--ink); }
.nav button:hover { background: rgba(17,17,17,.05); }
.nav button[aria-current="true"] { background: var(--wall); font-weight: 500; }
.nav button svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.nav .sub button { padding-left: 36px; font-size: 13.5px; color: var(--mute); min-height: 32px; }
.nav .sub button[aria-current="true"] { color: var(--ink); }
.side__foot { border-top: 1px solid var(--rule); padding: 12px 10px; display: grid; gap: 2px; }
.side__foot a, .side__foot button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; font-size: 13.5px; color: var(--mute); text-decoration: none; text-align: left; }
.side__foot a:hover, .side__foot button:hover { background: rgba(17,17,17,.05); color: var(--ink); }
.side__foot svg { width: 16px; height: 16px; flex: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.top { display: flex; align-items: center; gap: 12px; height: var(--top); padding: 0 16px 0 24px; background: var(--panel); border-bottom: 1px solid var(--rule); flex: none; }
.top__menu { display: none; }
.top__title { min-width: 0; flex: 1; }
.top__title b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__title span { display: block; color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--wall); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: var(--r); background: none; color: var(--mute); font-size: 13px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg svg { width: 15px; height: 15px; }

/* unsaved changes bar (Shopify pattern) */
.savebar { position: absolute; left: 50%; top: 10px; z-index: 30; transform: translate(-50%, -140%); opacity: 0; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 8px; background: #1b1f24; color: #fff; box-shadow: 0 16px 40px -16px rgba(0,0,0,.5); transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s; pointer-events: none; white-space: nowrap; }
.savebar.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.savebar.is-shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translate(calc(-50% - 6px), 0); } 75% { transform: translate(calc(-50% + 6px), 0); } }
.savebar span { font-size: 13.5px; margin-right: 8px; }
.savebar .btn { min-height: 32px; font-size: 13px; }
.savebar .btn--ghost { color: #fff; }
.savebar .btn--ghost:hover { background: rgba(255,255,255,.1); }
.savebar .btn--save { background: #fff; color: var(--ink); border-color: #fff; }

.stage { flex: 1; min-height: 0; position: relative; }
.frame-wrap { position: absolute; inset: 0; display: flex; justify-content: center; background: var(--bg); }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .3s cubic-bezier(.2,.8,.2,1); }
.frame-wrap.is-phone { padding: 20px 0; }
.frame-wrap.is-phone iframe { width: 390px; border-radius: 18px; box-shadow: 0 0 0 1px var(--rule), 0 30px 60px -30px rgba(0,0,0,.4); }
.view { position: absolute; inset: 0; overflow: auto; padding: 32px clamp(16px, 4vw, 48px) 80px; }
.view__in { max-width: 860px; margin: 0 auto; }
.view h1 { font: 500 30px/1.1 var(--serif); margin: 0 0 6px; }
.view__lede { color: var(--mute); margin: 0 0 24px; max-width: 62ch; }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; margin: 0 0 20px; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--rule); }
.card__head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.card__head p { margin: 2px 0 0; color: var(--mute); font-size: 13.5px; }
.card__body { padding: 8px 20px 20px; }

/* opening hours */
.hours-row { display: grid; grid-template-columns: 120px 120px 1fr; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.hours-row:last-of-type { border-bottom: 0; }
.hours-row b { font-weight: 500; }
.hours-times { display: flex; align-items: center; gap: 8px; color: var(--mute); }
.hours-times input { width: 112px; height: 38px; padding: 0 10px; border: 1px solid var(--rule-2); border-radius: var(--r); }
.hours-times input:disabled { opacity: .4; }
.hours-closed { color: var(--faint); font-size: 13.5px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #cfcdc8; transition: background .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.summary { margin: 0; padding: 14px 16px; border-radius: var(--r); background: var(--wall); }
.summary p { margin: 0 0 8px; color: var(--mute); font-size: 13px; }
.summary ul { list-style: none; margin: 0; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; max-width: 360px; }
.linkish { border: 0; background: none; padding: 0; color: var(--blue); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }

/* project photos and logos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding-top: 12px; }
.tile { position: relative; margin: 0; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; overflow: hidden; cursor: grab; }
.tile.is-drag { opacity: .4; }
.tile.is-over { box-shadow: 0 0 0 2px var(--blue); }
.tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wall); }
.tile figcaption { padding: 8px 10px 10px; font-size: 12.5px; line-height: 1.35; }
.tile figcaption b { display: block; font-weight: 500; }
.tile figcaption span { color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.tile__acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile__acts, .tile:focus-within .tile__acts { opacity: 1; }
.tile__acts button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r); background: rgba(255,255,255,.94); box-shadow: 0 1px 3px rgba(0,0,0,.2); color: var(--ink); }
.tile__acts svg { width: 14px; height: 14px; }
.tile--add { display: grid; place-items: center; min-height: 150px; border: 1.5px dashed var(--rule-2); background: transparent; color: var(--mute); cursor: pointer; text-align: center; padding: 16px; font-size: 13.5px; }
.tile--add:hover { border-color: var(--blue); color: var(--blue); }
.tile--add svg { width: 22px; height: 22px; display: block; margin: 0 auto 6px; }
.logo-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.logo-grid .tile img { aspect-ratio: 16 / 9; object-fit: contain; padding: 14px 18px; background: #fff; }
.logo-grid .tile figcaption { border-top: 1px solid var(--rule); }
.logo-grid .tile input { width: 100%; height: 30px; border: 1px solid var(--rule-2); border-radius: var(--r); padding: 0 8px; font-size: 12.5px; }
.tip { display: flex; gap: 10px; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--blue-soft); color: #234f69; font-size: 13.5px; }
.tip svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* jobs list */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 24px 92px 1fr 170px 72px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); background: #fff; }
.job:last-child { border-bottom: 0; }
.job.is-drag { opacity: .4; }
.job.is-over { box-shadow: 0 -2px 0 var(--blue); }
.job__grip { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.job__grip svg { width: 16px; height: 16px; }
.job__d { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.job__w { color: var(--mute); font-size: 13.5px; }
.job__acts { display: flex; justify-content: flex-end; gap: 2px; }
.job input { width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--rule-2); border-radius: var(--r); font-size: 13.5px; }
.job.is-edit .job__acts .icon-btn--ok { color: var(--green); }

/* team */
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.person:last-child { border-bottom: 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--wall); font-weight: 600; font-size: 13px; flex: none; }
.person div { flex: 1; min-width: 0; }
.person b { display: block; font-weight: 500; }
.person small { color: var(--mute); font-size: 12.5px; }
.badge { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); border: 1px solid var(--rule-2); border-radius: 999px; padding: 2px 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }

/* side drawer (photo) */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(17,17,17,.32); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(420px, 100%); background: #fff; box-shadow: -20px 0 50px -20px rgba(0,0,0,.35); transform: translateX(104%); transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.drawer.is-on { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.drawer__head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer__body { flex: 1; overflow: auto; padding: 20px; }
.drawer__img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r); background: var(--wall); margin: 0 0 12px; }
.drawer__foot { display: flex; gap: 10px; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--rule); }
.drawer__foot .right { display: flex; gap: 10px; margin-left: auto; }
.btn--danger { color: var(--red); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; padding: 12px 16px; border-radius: 8px; background: #1b1f24; color: #fff; font-size: 13.5px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.5); transition: transform .25s, opacity .2s; pointer-events: none; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 16px; height: 16px; color: #7fd49e; flex: none; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .3s cubic-bezier(.2,.8,.2,1); box-shadow: 20px 0 50px -20px rgba(0,0,0,.35); }
  .app.menu-open .side { transform: none; }
  .app.menu-open .scrim--menu { opacity: 1; pointer-events: auto; }
  .top { padding: 0 8px 0 4px; gap: 6px; }
  .top__menu { display: inline-grid; width: 44px; height: 44px; }
  .top__menu svg { width: 20px; height: 20px; }
  .seg { display: none; }
  .top .btn span { display: none; }
  .savebar { top: auto; bottom: 16px; transform: translate(-50%, 160%); }
  .savebar.is-on { transform: translate(-50%, 0); }
  .view { padding: 24px 16px 96px; }
  .view h1 { font-size: 26px; }
  .card__head { padding: 16px 16px 12px; flex-wrap: wrap; }
  .card__body { padding: 6px 16px 16px; }
  .hours-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .hours-row .hours-times, .hours-row .hours-closed { grid-column: 1 / -1; }
  .job { grid-template-columns: 20px 1fr 64px; gap: 4px 10px; }
  .job__d { grid-column: 2; grid-row: 1; }
  .job__t { grid-column: 2; }
  .job__w { grid-column: 2; }
  .job__grip { grid-row: 1 / span 3; }
  .job__acts { grid-column: 3; grid-row: 1 / span 3; }
  .tile__acts { opacity: 1; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .toast { bottom: 84px; }
}

/* ---------- additions for the real editor ---------- */
.notice { margin: 0 0 18px; padding: 10px 12px; border-radius: var(--r); background: var(--blue-soft); color: #234f69; font-size: 13.5px; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r); background: rgba(200,32,47,.08); color: var(--red-deep); font-size: 13.5px; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(17,17,17,.15); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.frame-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(244,243,240,.6); }
.drawer__pic { position: relative; }
.drawer__busy { position: absolute; inset: 0 0 12px; display: flex; gap: 10px; align-items: center; justify-content: center; border-radius: var(--r); background: rgba(255,255,255,.82); font-size: 13.5px; }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(17,17,17,.45); }
.modal .signin__card { width: 100%; max-width: 400px; background: var(--panel); border-radius: 6px; padding: 28px 28px 22px; box-shadow: 0 24px 60px -32px rgba(0,0,0,.45); }
.modal h1 { font: 500 26px/1.1 var(--serif); margin: 0 0 6px; }
.modal .btn--solid { width: 100%; min-height: 44px; }
.badge--wait { color: #7a5a12; border-color: #e9d7a6; background: #fdf3d8; }
.person .icon-btn--text { width: auto; padding: 0 8px; font-size: 12.5px; color: var(--blue); }
.linkbox { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--wall); }
.linkbox p { margin: 0 0 8px; font-size: 13.5px; color: var(--mute); }
.linkbox__row { display: flex; gap: 8px; }
.linkbox__row input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--rule-2); border-radius: var(--r); font-family: var(--mono); font-size: 11.5px; background: #fff; }
.saves { list-style: none; margin: 0; padding: 0; }
.saves li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.saves li:last-child { border-bottom: 0; }
.saves li div { flex: 1; min-width: 0; }
.saves b { display: block; font-weight: 500; font-size: 14px; }
.saves small { color: var(--mute); font-size: 12.5px; }
.saves .muted { color: var(--faint); font-size: 13.5px; padding: 8px 0; }
.card--warn { border-color: #e9d7a6; background: #fffbf0; }
.warn-list { margin: 8px 0 0; padding-left: 18px; color: #5a4310; font-size: 13.5px; }
.warn-list li { margin: 0 0 6px; }
.tile .tile__warn { display: block; color: var(--red); font-size: 11.5px; margin-top: 2px; }
.tile--busy { display: grid; place-items: center; min-height: 150px; border-style: dashed; cursor: default; }

/* show or hide a password while typing (Bianca, 13 October 2026) */
.field > span.pw { display: block; position: relative; margin: 0; font-size: inherit; font-weight: inherit; }
.pw input { padding-right: 46px; }
.pw input::-ms-reveal { display: none; }
.pw__toggle { position: absolute; top: 0; right: 0; width: 44px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--mute); border-radius: var(--r); }
.pw__toggle:hover { color: var(--ink); }
.pw__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: -5px; }
.pw__toggle svg { width: 19px; height: 19px; }
