/* erp.css: 통관정보통합ERP pages (/customs-erp/, /customs-erp/en), loaded after site.css.
   The two interactive demos ONLY: .tour (screen tour tabs) and .dl (deadline example).
   Every other component on these pages comes from site.css. Uses the shared tokens.
   Both read without JS: the tour lists every screen, the deadline example is a static timeline. */

/* ---------------------------------------------------------------- screen tour */
.tour__bar { margin-bottom: var(--s-5); }
.tour__tabs {
  display: flex; gap: var(--s-2); min-width: 0; overflow-x: auto; overscroll-behavior-x: contain;
  padding: var(--s-1); margin: calc(-1 * var(--s-1));
}
.tour__tab {
  flex: none; min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer;
}
.tour__tab:hover { border-color: var(--ink); color: var(--ink); }
.tour__tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tour__panel { scroll-margin-top: var(--s-9); }
.tour__panel + .tour__panel { margin-top: var(--s-7); padding-top: var(--s-7); border-top: 1px solid var(--line); }
.tour.is-live .tour__panel + .tour__panel { margin-top: 0; padding-top: 0; border-top: 0; }
.tour.is-live .tour__panel:focus-visible { outline-offset: var(--s-2); }
.tour.is-live .tour__panel.is-entering { animation: fade .3s ease; }
.tour__grid { display: grid; gap: var(--s-5) var(--s-7); align-items: start; }
@media (min-width: 60rem) { .tour__grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.tour__grid > figure { min-width: 0; }
.tour__list { list-style: none; padding: 0; margin: var(--s-4) 0 0; border-top: 1px solid var(--line); }
.tour__list li { display: flex; gap: var(--s-3); align-items: flex-start; margin: 0; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.tour__list .icon { color: var(--accent); margin-top: .25em; }
.tour__nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-6); }
.tour__count { color: var(--mute); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.tour__note { margin-top: var(--s-6); }

/* ---------------------------------------------------------------- deadline example */
.dl { display: grid; gap: var(--s-7); }
@media (min-width: 60rem) {
  .dl.is-live { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: var(--s-8); }
  .dl__panel { position: sticky; top: calc(var(--header-h) + var(--s-4)); }
}
.dl__panel { min-width: 0; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
@media (min-width: 60rem) { .dl__panel { padding: var(--s-6); } }
.dl__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.dl__label { margin: 0; color: var(--mute); font-size: var(--fs-sm); font-weight: 600; line-height: var(--lh-sm); }
.dl__date { margin: 0; font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-head); font-variant-numeric: tabular-nums; }

.dl__steps { display: flex; gap: var(--s-1); list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.dl__steps li { flex: 1 1 0; min-width: 0; margin: 0; padding-top: var(--s-3); position: relative; text-align: center; color: var(--mute); font-size: var(--fs-sm); line-height: 1.3; overflow-wrap: anywhere; }
.dl__steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: var(--r-control); background: var(--line); }
.dl__steps li.is-done::before { background: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.dl__steps li.is-now::before { background: var(--accent); }
.dl__steps li.is-now { color: var(--ink); font-weight: 700; }
/* narrow panels: show only the current step's name */
@media (max-width: 30rem) {
  .dl__steps li:not(.is-now) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* the chart is aria-hidden; the alert list below says the same in words */
.dl__gantt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-2) var(--s-3); align-items: center; margin: var(--s-6) 0 0; font-size: var(--fs-sm); line-height: 1.3; }
.dl__glabel { color: var(--mute); white-space: nowrap; }
.dl__gtrack { position: relative; height: 14px; border-radius: var(--r-control); background: var(--line); }
.dl__gbar { position: absolute; top: 0; bottom: 0; border-radius: var(--r-control); background: var(--warn); }
.dl__gbar--high { background: var(--danger); }
.dl__gdot { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); }
.dl__gcursor { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }

.dl__range { display: block; margin: var(--s-4) 0 0; }
.dl__range input { display: block; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.dl__ends { display: flex; justify-content: space-between; max-width: none; margin: 0; color: var(--mute); font-size: var(--fs-sm); }
.dl__nav { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.dl__nav .btn { flex: 1 1 8rem; }

.dl__atitle { margin: var(--s-6) 0 var(--s-3); font-weight: 700; }
.dl__alerts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.dl__alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--s-3); align-items: center; margin: 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-control); background: var(--paper); }
.dl__alert.is-high { border-color: color-mix(in oklab, var(--danger) 45%, var(--line)); }
.dl__amsg { font-weight: 600; color: var(--ink); }
.dl__atype { color: var(--ink-2); font-weight: 400; }
.dl__adue { grid-column: 2; color: var(--mute); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.dl__none { margin: 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-control); color: var(--ink-2); }

/* app severity labels (the app's own status colours; used in the static timeline too) */
.dl__sev { display: inline-block; padding: 0 var(--s-2); border: 1px solid currentColor; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; line-height: 1.6; white-space: nowrap; }
.dl__sev--high { color: var(--danger); }
.dl__sev--mid { color: var(--warn); }

.dl.is-live .dl__timeline > li.is-future h3 { color: var(--ink-2); }
.dl.is-live .dl__timeline > li.is-past::before { background: var(--accent); }
.dl.is-live .dl__timeline > li.is-now::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent); }
.dl.is-live .dl__timeline > li.is-now h3 { color: var(--accent); }
.dl__foot { margin-top: var(--s-6); }
