/* Styled to match bobcatofindy.com: Depot New Condensed headings, Open Sans body,
   #ff3300 orange, #404040 text, gray utility bar, square buttons. */
:root {
  --brand: #ff3300;
  --brand-dark: #d92b00;
  --ink: #404040;
  --ink-2: #555;
  --muted: #828282;
  --line: #dcdcdc;
  --bg: #eeeeee;
  --card: #fff;
  --util: #828282;
  --util-2: #666666;
  --ok: #1f8a4c;
  --warn: #b26a00;
  --err: #c62828;
  --radius: 0px;
  --font: "open-sans", "Open Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "depot-new-condensed-web", "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: #0a0a0a; background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; }

/* ---- utility bar (gray strip, like the site's locations bar) ---- */
.utilbar { background: var(--util); color: #fff; font-size: 12px; }
.utilbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.util-title { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.who { display: flex; align-items: center; gap: 10px; }
.who-name { font-weight: 600; }
.role { text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .06em; opacity: .85; }
.signout { background: var(--util-2); color: #fff; border: 0; padding: 0 16px; min-height: 36px; text-transform: uppercase; font-weight: 700; font-size: 12px; cursor: pointer; }
.signout:hover { background: #555; }

/* ---- main header (white, logo left, uppercase nav right) ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.logo { display: block; line-height: 0; flex: 0 0 auto; }
.logo img { height: 56px; width: auto; }
.logo .logo-light { display: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; text-transform: uppercase; font-weight: 700; font-size: 13px; padding: 30px 14px 27px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--brand); }
.nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.nav .count { display: inline-block; min-width: 20px; padding: 1px 6px; background: var(--ink); color: #fff; font-size: 11px; text-align: center; margin-left: 4px; }
.nav a.active .count { background: var(--brand); }
.nav a.nav-cta { background: var(--brand); color: #fff; padding: 12px 20px; margin-left: 10px; border: 0; }
.nav a.nav-cta:hover, .nav a.nav-cta.active { background: var(--brand-dark); color: #fff; }
.nav-who { display: none; }
.hamburger { display: none; margin-left: auto; width: 46px; height: 46px; background: transparent; border: 0; cursor: pointer; padding: 11px 9px; flex-direction: column; justify-content: space-between; }
.hamburger span { display: block; height: 3px; background: #fff; transition: transform .2s, opacity .2s; }
.hamburger.open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* mobile: orange header, white logo, hamburger menu (like bobcatofindy.com) */
@media (max-width: 900px) {
  .utilbar { display: none; }
  .site-header { background: var(--brand); border-bottom: 0; }
  .site-header .wrap { min-height: 64px; gap: 12px; }
  .logo img { height: 40px; }
  .logo .logo-dark { display: none; }
  .logo .logo-light { display: block; }
  .hamburger { display: flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: #fff; box-shadow: 0 12px 24px rgba(0,0,0,.18); margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 20px; border-bottom: 1px solid #eee; border-left: 4px solid transparent; font-size: 15px; }
  .nav a.active { border-bottom-color: #eee; border-left-color: var(--brand); background: #fff5f2; }
  .nav a.nav-cta { margin: 12px 16px; text-align: center; border-left: 0; }
  .nav-who { display: flex; align-items: center; gap: 10px; background: var(--util); color: #fff; font-size: 13px; padding-left: 20px; }
  .nav-who .signout { margin-left: auto; min-height: 48px; }
}

main { max-width: 1280px; margin: 0 auto; padding: 28px 16px 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 36px; color: var(--ink); }
.page-head .sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }

/* ---- buttons / inputs (square, uppercase like the site) ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c8c8c8; background: #fff; padding: 10px 20px; border-radius: 0; cursor: pointer; font-weight: 600; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.dark { background: var(--util-2); border-color: var(--util-2); color: #fff; }
.btn.dark:hover { background: var(--ink); color: #fff; }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err); }
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font-weight: 600; }

label { display: block; font-weight: 700; font-size: 12px; margin-bottom: 6px; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c8c8c8; border-radius: 0; background: #fff; font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(255,51,0,.3); outline-offset: 0; border-color: var(--brand); }
input[readonly] { background: #f2f2f2; }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field { margin-bottom: 18px; }
.check { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); font-weight: 500; }

/* ---- cards / layout ---- */
.card { background: var(--card); border: 0; border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card h2 { margin: 0 0 6px; font-size: 22px; color: var(--brand); }
.card > .sub { color: var(--ink-2); margin: 0 0 16px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .cols, .grid2, .grid3 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; } }

/* ---- notices / badges ---- */
.notice { padding: 10px 14px; border-radius: 0; font-size: 14px; margin: 8px 0 14px; border: 1px solid; }
.notice.ok { background: #edf7f1; border-color: #bfe2cd; color: #17643a; }
.notice.warn { background: #fff6e8; border-color: #f2d5a6; color: #7a4a00; }
.notice.err { background: #fdeeee; border-color: #f3c3c3; color: #8e1f1f; }
.notice.info { background: #f1f2f5; border-color: var(--line); color: var(--ink-2); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 12px; font-weight: 600; background: #eef0f3; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: #e3f4ea; color: var(--ok); }
.badge.warn { background: #fff0d9; color: var(--warn); }
.badge.err { background: #fde5e5; color: var(--err); }
.badge.brand { background: #ffe6dd; color: var(--brand-dark); }

/* ---- price box ---- */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.price { border: 1px solid var(--line); padding: 10px 12px; background: #f7f7f7; }
.price .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.price .v { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); }
.price.sale { background: var(--brand); border-color: var(--brand); }
.price.sale .k, .price.sale .v { color: #fff; }

/* ---- toolbar / table ---- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 360px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 2px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.chip { text-transform: uppercase; font-size: 12px; font-weight: 700; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.tablewrap { background: #fff; border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); border-radius: var(--radius); overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--ink); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.data td { padding: 10px 12px; border-bottom: 1px solid #eff0f3; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #fff8f5; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pn { font-weight: 700; white-space: nowrap; color: var(--ink); }
.desc2 { color: var(--muted); font-size: 13px; }
.thumb { width: 48px; height: 48px; border-radius: 0; object-fit: cover; background: #eef0f3; display: block; }
.thumb.empty { display: grid; place-items: center; color: #b6bac3; font-size: 11px; }
.empty-state { padding: 48px 16px; text-align: center; color: var(--muted); }

/* mobile: part lists become cards
     [photo] Part #        Sale
     [photo] Description
     [photo] Bin           Qty / sold date */
@media (max-width: 760px) {
  .cards thead { display: none; }
  .cards, .cards tbody { display: block; }
  .cards tr { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "ph pn pr" "ph de de" "ph bi qt"; gap: 4px 12px; padding: 12px; border-bottom: 1px solid var(--line); align-items: center; }
  .cards tr:last-child { border-bottom: 0; }
  .cards td { display: block; border: 0 !important; padding: 0 !important; text-align: left; }
  .cards td:nth-child(1) { grid-area: ph; align-self: start; }
  .cards td:nth-child(2) { grid-area: pn; }
  .cards td:nth-child(3) { grid-area: de; font-size: 14px; }
  .cards td:nth-child(4) { grid-area: bi; }
  .cards td.m-price { grid-area: pr; text-align: right; }
  .cards td.m-qty { grid-area: qt; text-align: right; color: var(--ink-2); font-size: 13px; }
  .cards td.m-qty::before { content: attr(data-label); }
  .cards td.hide-m { display: none; }
  .cards td[colspan] { grid-column: 1 / -1; }

  .page-head .btn.primary { width: 100%; justify-content: center; }
  .prices .v { font-size: 17px; }
}

/* ---- photos ---- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo { position: relative; border-radius: 0; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: #eef0f3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .tag { position: absolute; left: 6px; top: 6px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 0; }
.photo .acts { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.photo .acts button { white-space: nowrap; border: 0; background: rgba(255,255,255,.92); border-radius: 0; font-size: 12px; padding: 2px 6px; cursor: pointer; font-weight: 600; }
.addphoto { border: 2px dashed #cfd2d9; border-radius: 0; aspect-ratio: 1; display: grid; place-content: center; text-align: center; color: var(--ink-2); cursor: pointer; font-weight: 600; font-size: 14px; background: #fafbfc; margin: 0; text-transform: none; letter-spacing: 0; line-height: 1.35; padding: 8px; }
.addphoto:hover { border-color: var(--brand); color: var(--brand); }

.drop { display: block; border: 2px dashed #cfd2d9; border-radius: var(--radius); padding: 24px; text-align: center; background: #fafbfc; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.drop.over, .drop:hover { border-color: var(--brand); background: #fff8f5; }
.progress { height: 6px; background: #eef0f3; border-radius: 2px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* ---- history ---- */
.job { border-top: 1px solid var(--line); padding: 12px 0; }
.job:first-child { border-top: 0; padding-top: 0; }
.job .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.job .when { color: var(--muted); font-size: 13px; margin-left: auto; }
.job .counts { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.job details { margin-top: 6px; font-size: 13px; }
.job details table { font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-all; }
code { background: #f1f2f5; padding: 2px 6px; border-radius: 0; font-size: 13px; word-break: break-all; }

/* ---- login (orange like the site's hero panels) ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(135deg, #ff3300 0%, #e02d00 55%, #b82400 100%); }
.login .card { width: 100%; max-width: 400px; border-top: 0; padding: 32px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-logo { display: block; height: 72px; width: auto; margin: 0 auto 22px; }
.login h1 { margin: 0 0 4px; font-size: 30px; color: var(--ink); text-align: center; }
.login .sub { color: var(--ink-2); margin: 0 0 22px; text-align: center; }

/* ---- toast / modal ---- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--err); }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(30,33,40,.55); }
dialog form { padding: 22px; }
dialog h3 { margin: 0 0 14px; font-size: 24px; color: var(--ink); }
dialog { border-top: 4px solid var(--brand); }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

.mobile-only { display: none !important; }
@media (max-width: 900px) {
  .mobile-only { display: inline-flex !important; }
  .page-head h1 { font-size: 30px; }
}
