/* ASG web console - the same look as the desktop dashboard (colours are the app's own Dark / Light theme values). */
:root, [data-theme="dark"] {
  --bg: #131d34; --card: #1e293b; --text: #f1f5f9; --sub: #94a3b8; --primary: #695eff; --primary-h: #5b4fe0; --border: #334155; --hover: #273449; --input: #2a3b52; --selected: #1b4649;
  --sb-bg: #0f172a; --sb-border: #1e293b; --sb-text: #94a3b8; --sb-hover: #1d2537; --ok: #10b981; --warn: #f59e0b; --bad: #ef4444;
}
[data-theme="light"] {
  --bg: #f4f7fc; --card: #ffffff; --text: #1e293b; --sub: #64748b; --primary: #7c3aed; --primary-h: #6d28d9; --border: #e2e8f0; --hover: #eff6ff; --input: #f1f5f9; --selected: #d1fae5;
  --sb-bg: #0f172a; --sb-border: #1e293b; --sb-text: #94a3b8; --sb-hover: #1d2537;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
#app { height: 100%; }
body { font-family: "Roboto", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- sign-in */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, rgba(105,94,255,.18), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(239,68,68,.10), transparent 55%), var(--bg); }
.login { width: 400px; max-width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 34px 32px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login img { display: block; width: 190px; margin: 0 auto 22px; }
.login h1 { font-size: 20px; margin: 0 0 4px; text-align: center; }
.login p.sub { margin: 0 0 22px; text-align: center; color: var(--sub); font-size: 12.5px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.field input { width: 100%; height: 42px; border-radius: 8px; border: 1px solid transparent; background: var(--input); padding: 0 14px; outline: none; font-size: 14px; }
.field input:focus { border-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--primary-h); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.block { width: 100%; height: 44px; font-size: 14px; margin-top: 6px; }
.btn.ghost { background: var(--input); color: var(--text); }
.btn.ghost:hover { background: var(--hover); }
.err { min-height: 18px; margin-top: 12px; color: var(--bad); font-size: 12.5px; text-align: center; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 260px 1fr; height: 100%; }
.sidebar { background: var(--sb-bg); border-right: 1px solid var(--sb-border); display: flex; flex-direction: column; padding: 0 0 14px; min-height: 0; overflow-y: auto; }
.sidebar .brand { padding: 22px 22px 18px; }
.sidebar .brand img { width: 172px; display: block; }
.nav { display: flex; flex-direction: column; padding: 4px 15px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 38px; margin: 5px 0; padding: 0 14px; border-radius: 8px; color: var(--sb-text); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.nav a:hover { background: var(--sb-hover); }
.nav a.active { background: var(--primary); color: #fff; }
.nav .group { margin: 18px 14px 4px; font-size: 10.5px; letter-spacing: .08em; color: #64748b; font-weight: 700; text-transform: uppercase; }
.sidebar .grow { flex: 1; }
.sidebar .foot { padding: 0 15px; }
.sidebar .foot a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: 8px; color: var(--sb-text); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.sidebar .foot a:hover { background: var(--sb-hover); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 18px 28px 6px; }
.topbar .title { flex: 0 1 auto; min-width: 0; }
.crumb { color: var(--sub); font-size: 12px; }
.greet { font-size: 26px; font-weight: 700; margin: 2px 0 0; white-space: nowrap; }
.search { margin-left: 12px; flex: 1 1 340px; max-width: 470px; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--card); border: 1px solid var(--border); color: var(--sub); }
.search input { flex: 1; border: 0; background: transparent; outline: none; color: var(--text); min-width: 0; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.round { width: 52px; height: 36px; border-radius: 18px; border: 1px solid var(--border); background: var(--card); display: grid; place-items: center; color: var(--text); cursor: pointer; }
.round:hover { background: var(--hover); }
.me { display: flex; align-items: center; gap: 10px; margin-left: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.me .n { font-weight: 700; font-size: 13px; line-height: 1.15; } .me .r { color: var(--sub); font-size: 11.5px; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 14px 28px 26px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 9px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--sub); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 2s infinite; }
.live.off i { background: var(--bad); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

/* ---------------------------------------------------------------- tables: flat grid, continuous 1px lines, header cells like the app */
.tablecard { padding: 15px 15px 10px; }
.tbl { width: 100%; border-collapse: collapse; table-layout: auto; }
.tbl th { background: var(--hover); color: var(--sub); font-weight: 700; font-size: 12.5px; padding: 0 10px; height: 36px; border: 1px solid var(--border); text-align: center; white-space: nowrap; }
.tbl td { border: 1px solid var(--border); padding: 0 10px; height: 40px; text-align: center; background: var(--card); }
.tbl tr:nth-child(even) td { background: var(--hover); }
.tbl td.l { text-align: left; }
.tbl tbody tr:hover td { background: var(--selected); }
.pill { display: inline-block; min-width: 96px; padding: 4px 12px; border-radius: 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.empty { padding: 50px; text-align: center; color: var(--sub); }
.hint { color: var(--sub); }
.soon { display: grid; place-items: center; height: 320px; color: var(--sub); text-align: center; }
.soon b { display: block; font-size: 16px; color: var(--text); margin-bottom: 6px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 8px; align-items: center; border-right: 0; border-bottom: 1px solid var(--sb-border); }
  .sidebar .brand, .nav .group, .sidebar .grow, .sidebar .foot { display: none; }
  .nav { flex-direction: row; padding: 0; } .nav a { margin: 0 4px; white-space: nowrap; }
  .topbar { flex-wrap: wrap; padding: 12px 14px 4px; } .search { order: 3; flex-basis: 100%; max-width: none; margin: 4px 0 0; }
  .content { padding: 10px 14px 20px; } .greet { font-size: 20px; } .me .n, .me .r { display: none; }
}

/* ---------------------------------------------------------------- Track My Order + Order Form */
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; } a.btn { text-decoration: none; }
.nowtop { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.kicker { color: var(--sub); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.nowmain { font-size: 22px; font-weight: 700; margin-top: 4px; } .nowsub { color: var(--sub); margin-top: 4px; font-size: 13px; }
.nowbtns { display: flex; gap: 10px; flex-wrap: wrap; }
.card.now { padding: 20px 22px 16px; }
.warn { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 12.5px; background: var(--input); }
.warn.alert { background: rgba(239,68,68,.14); color: #fca5a5; } .warn.warn { background: rgba(245,158,11,.14); color: #fcd34d; } .warn.info { color: var(--sub); }
[data-theme="light"] .warn.alert { color: #b91c1c; } [data-theme="light"] .warn.warn { color: #b45309; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.facts div span { display: block; color: var(--sub); font-size: 11px; font-weight: 700; } .facts div b { font-size: 13px; }
.card.stages { margin-top: 16px; padding: 22px 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.stage { position: relative; padding-right: 14px; }
.stage .node { position: relative; height: 34px; } .stage .rail { position: absolute; left: 42px; right: 8px; top: 16px; height: 2px; background: var(--border); }
.stage.done .rail { background: #22c55e; }
.stage .sbody { margin-top: 12px; } .st { font-weight: 700; font-size: 13px; } .sh { margin-top: 5px; font-size: 12.5px; line-height: 1.35; }
.sd { margin-top: 5px; color: var(--sub); font-size: 11.5px; line-height: 1.35; word-break: break-word; } .sw { margin-top: 6px; color: var(--sub); font-size: 11.5px; font-weight: 700; }
.stage.skip .sh, .stage.skip .st { color: var(--sub); } .stage.missing .sh { color: #f87171; }
.trail { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; } .trail span { background: var(--input); border-radius: 10px; padding: 2px 8px; font-size: 10.5px; color: var(--sub); }
.grid2 { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.4fr); gap: 16px; margin-top: 16px; align-items: start; }
.sec-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; } .file { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); } .file:first-of-type { border-top: 0; }
.file .fn { flex: 1; min-width: 0; } .file .fn b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file .fn span { color: var(--sub); font-size: 11.5px; }
.tbl td.sec { background: var(--input); font-weight: 700; }
@media (max-width: 1100px) { .card.stages { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; } .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .card.stages { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- list pages (Production / Shipping / DTF) */
.hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.tile { border-radius: 9px; padding: 12px 16px; cursor: pointer; display: flex; flex-direction: column; border: 2px solid transparent; }
.tile b { font-size: 26px; line-height: 1.1; } .tile span { font-size: 12px; font-weight: 700; } .tile.on { border-color: var(--text); }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 18px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); font-weight: 700; cursor: pointer; color: var(--sub); }
.tabs a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabs a i { font-style: normal; background: #ef4444; color: #fff; border-radius: 10px; min-width: 20px; padding: 0 6px; text-align: center; font-size: 11px; line-height: 20px; }
.tbl tr.hold td { background: rgba(245,158,11,.16); } .tbl tr.part td { background: rgba(59,130,246,.16); }
.tbl tr.cm { cursor: pointer; } .tbl tr.cmt { display: none; } .tbl tr.cmt.open { display: table-row; } .tbl tr.cmt td { height: auto; padding: 10px 14px; color: var(--sub); }
@media (max-width: 700px) { .hud { grid-template-columns: 1fr 1fr; } .tablecard { overflow-x: auto; } }
.hero { margin-bottom: 16px; } .hero h1 { margin: 0 0 4px; font-size: 22px; } .hero p { margin: 0; color: var(--sub); } .hero a { color: var(--primary); cursor: pointer; font-weight: 700; }
.listpage .grid2 { margin-top: 0; }
.homepage { min-height: calc(100vh - 150px); display: flex; flex-direction: column; } .homehero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 6vh; }
.hdate { color: var(--sub); font-size: 12px; } .homehero h1 { margin: 16px 0 30px; font-size: 26px; } .q1 { font-weight: 300; } .q2 { font-weight: 500; }
.pillsearch { width: min(720px, 100%); height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-radius: 26px; background: var(--card); border: 1.5px solid var(--primary); color: var(--sub); }
.pillsearch input { flex: 1; border: 0; background: transparent; outline: none; color: var(--text); font-size: 15px; min-width: 0; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); cursor: pointer; } .chip:hover { border-color: var(--primary); }
.chip i { width: 8px; height: 8px; border-radius: 50%; } .chip b { color: var(--text); } .chip span { color: var(--sub); }
.homefoot { text-align: center; color: #64748b; font-size: 10px; padding: 12px 0 0; }
