:root {
    color-scheme: light;
    --ink: #172c29;
    --muted: #536864;
    --line: #dce8e3;
    --surface: #fff;
    --background: #f2f7f5;
    --accent: #075e4b;
    --accent-dark: #064739;
    --focus: #15836c;
    font: 100%/1.55 "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
button, input { font: inherit; }

.top {
    min-height: 72px;
    padding: 0.8rem max(1.25rem, calc((100vw - 980px) / 2));
    background: #123a31;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .72rem;
    white-space: nowrap;
    font-size: 1.06rem;
    letter-spacing: .015em;
}

.mark {
    width: 2rem;
    height: 2rem;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid #91d8bd;
    border-radius: .58rem;
    color: #b4ebd4;
    background:
        linear-gradient(90deg, transparent 46%, currentColor 46%, currentColor 54%, transparent 54%) center / 1.3rem 1.3rem no-repeat,
        linear-gradient(0deg, transparent 46%, currentColor 46%, currentColor 54%, transparent 54%) center / 1.3rem 1.3rem no-repeat;
}

.mark > span {
    width: .65rem;
    height: .65rem;
    background: #123a31;
    border: 2px solid currentColor;
    border-radius: 50%;
}

main { width: min(980px, calc(100% - 2.5rem)); margin-inline: auto; }
.workspace { margin-block: 3.4rem 5rem; }
.signin { display: grid; place-items: start center; margin-top: clamp(4rem, 12vh, 8rem); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; }
.entry, .queue, .login { padding: clamp(1.2rem, 4vw, 2rem); }
.queue { margin-top: 1.15rem; }
.login { width: min(440px, 100%); box-shadow: 0 8px 35px #163d2910; }

.heading { margin-bottom: 1.9rem; }
h1, h2 { line-height: 1.18; letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(2.35rem, 6vw, 3.55rem); }
h2 { font-size: 1.35rem; }
.login h1 { font-size: clamp(2rem, 6vw, 2.7rem); margin-bottom: 1.5rem; }
.heading p { margin: .85rem 0 0; color: var(--muted); max-width: 42rem; }

form { margin: 0; }
.parcel-form {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr auto;
    align-items: end;
    gap: .9rem;
}

label { display: grid; gap: .45rem; font-size: .9rem; font-weight: 650; }
input {
    min-width: 0;
    width: 100%;
    height: 3.05rem;
    background: #f8fbf9;
    border: 1px solid #becfc7;
    border-radius: .55rem;
    padding: .6rem .8rem;
    color: var(--ink);
    font-weight: 400;
    font-size: 1rem;
}

input::placeholder { color: #5c706a; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.top :focus-visible { outline-color: #b4ebd4; }

.primary, .logout {
    min-height: 3.05rem;
    border-radius: .55rem;
    border: 1px solid transparent;
    padding: .55rem 1rem;
    font-weight: 650;
    cursor: pointer;
}

.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); }
.logout { background: transparent; color: #fff; border-color: #8aa9a0; font-size: .87rem; min-height: 2.55rem; }
.logout:hover { background: #ffffff16; }
.login .primary { width: 100%; margin-top: 1rem; }

.notice { margin: 1rem 0; padding: .75rem 1rem; border-radius: .55rem; }
.notice.error { color: #812c29; background: #fcf0ed; }
.notice.success { color: #205744; background: #e8f6ee; }
.queue-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; }
.worker { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.worker::before { content: ""; display: inline-block; width: .55rem; height: .55rem; background: #768881; border-radius: 50%; margin-inline-end: .45rem; }
.worker.online { color: #0c6952; }
.worker.online::before { background: #18876b; }
.queue-note, .empty { color: var(--muted); margin: .85rem 0 0; }
.empty { padding-top: .7rem; border-top: 1px solid var(--line); }
.jobs-list { margin: .85rem 0 0; padding: 0; list-style: none; }
.job { display: flex; justify-content: space-between; gap: .8rem; align-items: start; padding: .85rem 0; border-top: 1px solid var(--line); }
.job:last-child { padding-bottom: 0; }
.job-name { display: block; font-weight: 650; overflow-wrap: anywhere; }
.job-id { margin-inline-start: .2rem; white-space: nowrap; }
.job-detail { display: block; margin-top: .15rem; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.job-state { flex: none; display: grid; justify-items: end; gap: .35rem; }
time { font-size: .77rem; color: var(--muted); }
.badge { display: inline-block; color: #405953; background: #e8eeeb; border-radius: 999px; padding: .16rem .57rem; font-size: .81rem; font-weight: 650; }
.badge.running { color: #3c5088; background: #eff1ff; }
.badge.completed { color: #17624a; background: #ddf4e8; }
.badge.failed { color: #8b2e2b; background: #fcebea; }

@media (max-width: 760px) {
    .workspace { margin-top: 2.6rem; }
    .parcel-form { grid-template-columns: 1fr 1fr; }
    .parcel-form label:first-of-type, .parcel-form .primary { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .top { padding-inline: 1rem; gap: .6rem; }
    main { width: calc(100% - 2rem); }
    .job { flex-direction: column; gap: .5rem; }
    .job-state { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; }
}
