:root {
    --bg: #0b0e16;
    --panel: #171b27;
    --line: #303747;
    --text: #f3f4f7;
    --muted: #a0aabc;
    --orange: #ff962f;
}
html { scroll-behavior: smooth; }
body {
    background:
        radial-gradient(750px 500px at 82% -12%, rgba(255, 137, 37, .12), transparent 70%),
        radial-gradient(600px 450px at 20% 28%, rgba(88, 102, 166, .07), transparent 76%),
        #0b0e16;
}
a, button, input, select, textarea { transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
:focus-visible { outline: 2px solid #ffae58; outline-offset: 3px; }
.sidebar {
    background: linear-gradient(180deg, #151a26 0%, #111621 100%);
    border-right-color: #2a3040;
    box-shadow: 16px 0 52px #05081125;
}
.brand b { letter-spacing: -1.8px; }
.sidebar nav a { border: 1px solid transparent; }
.sidebar nav a:hover { background: #242c3a; border-color: #3a4556; color: #f9f9fb; transform: translateX(3px); }
.sidebar nav a.active, .sidebar nav a.active:hover {
    background: linear-gradient(115deg, #ff8d2a, #ffae52);
    border-color: #ffbd71;
    box-shadow: 0 10px 25px #f6892833;
    color: #1d160f;
    transform: none;
}
.topbar h1 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -1.5px; }
.prototype { background: #ff98200d; }
.panel, .intro, .tile, .printer-card, .table-wrap {
    box-shadow: 0 14px 38px #05081120;
}
.panel { background: linear-gradient(145deg, #1a202d, #151b27 75%); border-color: #343c4d; border-radius: 20px; }
.button { border-radius: 11px; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #05081142; }
.button.primary { background: linear-gradient(115deg, #ff9229, #ffad4d); border-color: #ffc078; box-shadow: 0 8px 20px #ff8c2830; }
.button.primary:hover { background: linear-gradient(115deg, #ffa043, #ffc16d); box-shadow: 0 12px 26px #ff8c2840; }
.tile, .printer-card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tile:hover, .printer-card:hover { transform: translateY(-4px); box-shadow: 0 19px 40px #05081145; }
input:not([type=checkbox]):not([type=color]):not([type=hidden]):focus, select:focus, textarea:focus {
    border-color: #f6a14c;
    box-shadow: 0 0 0 3px #ff9a2d1c;
    outline: none;
}
.login-body { background: radial-gradient(600px 420px at 50% 42%, #2d2420, transparent 75%), #0b0e16; }
.login-card { box-shadow: 0 32px 90px #0008, 0 0 0 1px #ff9b2812; }

/* Dashboard: quiet surfaces and clear quantity hierarchy. */
.dashboard-intro { padding: 27px 30px; background: #1a202b; border-color: #354051; }
.dashboard-intro-copy { min-width: 0; }
.dashboard-intro p { margin: 8px 0 13px; font-size: 17px; font-weight: 650; color: #eef1f6; }
.dashboard-meta { display: flex; flex-wrap: wrap; gap: 8px 17px; align-items: center; color: #9faec0; font-size: 12px; }
.dashboard-state { display: inline-flex; align-items: center; gap: 7px; }
.dashboard-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #d0a06a; box-shadow: 0 0 0 3px #d0a06a22; }
.dashboard-state.is-current::before { background: #78d8a0; box-shadow: 0 0 0 3px #78d8a022; }
.dashboard-intro .total { display: flex; flex-direction: column; justify-content: center; min-width: 140px; padding: 13px 20px; background: #252c38; border-color: #465365; }
.dashboard-intro .total small { color: #afbaca; font-size: 10px; }
.dashboard-intro .total strong { font-size: 36px; line-height: 1.1; letter-spacing: -1.5px; }
.dashboard-intro .total span { color: #92a0b1; font-size: 11px; }
.dashboard-tiles { gap: 15px; }
.dashboard-tiles .tile { display: flex; flex-direction: column; min-width: 0; min-height: 208px; padding: 22px; border: 1px solid #374151; border-radius: 17px; background: #1b222e; box-shadow: 0 11px 30px #05081121; }
.dashboard-tiles .tile:hover { transform: translateY(-3px); border-color: #627080; box-shadow: 0 17px 36px #05081138; }
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile-name { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.tile-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.dashboard-tiles .tile h2 { min-width: 0; margin: 0; font-size: 15px; line-height: 1.4; font-weight: 760; letter-spacing: -.15px; overflow-wrap: anywhere; }
.tile-edit { flex: 0 0 auto; color: #aebccc; font-size: 11px; padding: 2px 0 4px; }
.tile-edit:hover { color: #ffbc72; text-decoration: none; }
.tile-edit span { margin-left: 2px; font-size: 13px; }
.tile-metric { display: flex; align-items: baseline; gap: 9px; margin: 23px 0 20px; }
.tile-metric strong { color: #f5f7fa; font-size: 46px; line-height: 1; font-weight: 760; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.tile-metric span { color: #9aaabd; font-size: 12px; }
.dashboard-tiles .format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.dashboard-tiles .format-grid .format-item { min-width: 0; padding: 9px 10px; border: 1px solid #364253; border-radius: 9px; background: #232c3a; }
.dashboard-tiles .format-grid b { color: #e8edf3; font-size: 12px; overflow-wrap: anywhere; }
.dashboard-tiles .format-grid span { color: #9eafc1; font-size: 11px; }
.tile-no-formats { margin-top: auto; padding-top: 13px; border-top: 1px solid #333e4e; color: #8292a5; font-size: 11px; }

/* Printer overview and queues follow the dashboard card language. */
.printer-intro, .printer-detail-intro { padding: 27px 30px; background: #1a202b; border-color: #354051; }
.printer-intro p, .printer-detail-intro p { margin: 8px 0 3px; font-size: 17px; font-weight: 650; color: #eef1f6; }
.printer-intro small, .printer-detail-intro small { font-size: 12px; }
.printer-intro-summary { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 150px; padding: 11px 18px; border: 1px solid #465365; border-radius: 13px; background: #252c38; }
.printer-intro-summary strong { font-size: 34px; line-height: 1.1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.printer-intro-summary span { color: #aab8c8; font-size: 11px; }
.printer-overview { gap: 15px; }
.printer-overview .printer-card { display: flex; flex-direction: column; min-width: 0; min-height: 190px; padding: 21px 22px; border: 1px solid #374151; border-radius: 17px; background: #1b222e; box-shadow: 0 11px 30px #05081121; }
.printer-overview .printer-card:hover { transform: translateY(-3px); border-color: #627080; background: #202936; box-shadow: 0 17px 36px #05081138; }
.printer-overview .printer-card div { flex-wrap: nowrap; gap: 0; }
.printer-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px !important; }
.printer-card-name { display: flex; align-items: flex-start; gap: 10px !important; min-width: 0; }
.printer-overview .printer-card h2 { min-width: 0; margin: 0; font-size: 15px; line-height: 1.4; font-weight: 760; letter-spacing: -.15px; overflow-wrap: anywhere; }
.printer-overview .printer-card span { padding: 0; border: 0; border-radius: 0; background: transparent; }
.printer-dot, .printer-overview .printer-card .printer-dot { flex: 0 0 auto; display: inline-block; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.printer-card-arrow { color: #aebccc; font-size: 16px !important; line-height: 1; }
.printer-open { display: flex; align-items: baseline; gap: 9px !important; margin: 23px 0 20px; }
.printer-open strong { font-size: 46px; line-height: 1; font-weight: 760; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.printer-overview .printer-card .printer-open span { color: #9aaabd; font-size: 12px; }
.printer-overview .printer-card .printer-stats { display: flex; gap: 17px; margin-top: auto; padding-top: 13px; border-top: 1px solid #333e4e; }
.printer-overview .printer-card .printer-stats span { color: #9eafc1; font-size: 11px; white-space: nowrap; }
.printer-overview .printer-card .printer-stats b { display: inline; margin-right: 3px; color: #e8edf3; font-size: 12px; }
.printer-overview .printer-card .printer-inactive { width: fit-content; margin-top: 10px; color: #e2ba83; font-size: 11px; }
.printer-detail-intro p { display: flex; align-items: center; gap: 10px; }
.printer-detail-intro .printer-dot { margin-top: 0; }
.printer-toolbar { margin-bottom: 16px; }
.printer-toolbar .segmented { flex-wrap: wrap; }
.printer-jobs { border-color: #354051; }
.printer-jobs th { background: #222b39; }
.printer-jobs tbody tr:hover { background: #202938; }
.printer-job-form { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(140px, 1.2fr) auto; gap: 7px; align-items: center; }
.printer-job-form select, .printer-job-form input { min-width: 0; margin: 0; }
.printer-job-form .button { height: 43px; }

/* Settings: an always visible section navigation with one focused pane. */
.settings-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 34px;
    margin-bottom: 22px;
    border: 1px solid #534234;
    border-radius: 24px;
    background: linear-gradient(110deg, #2a241f 0%, #1e232f 60%, #1a1f2c 100%);
    box-shadow: 0 22px 50px #05081136;
}
.settings-hero::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    top: -240px;
    right: -75px;
    border-radius: 50%;
    background: #ff91243b;
    filter: blur(72px);
    pointer-events: none;
}
.settings-hero > * { position: relative; z-index: 1; }
.settings-hero h2 { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.1; letter-spacing: -1.2px; margin: 8px 0 9px; }
.settings-hero p { color: #c4cbd5; margin: 0; max-width: 620px; }
.safety-pill, .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.safety-pill { background: #254033; color: #bff4ce; border: 1px solid #3d7957; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #70e39c; box-shadow: 0 0 0 4px #70e39c22, 0 0 16px #70e39c99; }
.settings-layout { display: grid; grid-template-columns: minmax(215px, 260px) minmax(0, 1fr); align-items: start; gap: 24px; }
.settings-tabs { display: grid; gap: 8px; position: sticky; top: 22px; padding: 8px; background: #171d29; border: 1px solid #303848; border-radius: 18px; }
.settings-tab { display: grid; grid-template-columns: 38px minmax(0, 1fr) 12px; align-items: center; gap: 11px; padding: 12px; color: #d5dbe5; border: 1px solid transparent; border-radius: 12px; }
.settings-tab:hover { background: #232b39; color: #fff; text-decoration: none; transform: translateX(3px); }
.settings-tab.is-active { background: linear-gradient(115deg, #3c2c25, #2c2d37); border-color: #845735; color: #fff; box-shadow: inset 3px 0 #ff9c3c; }
.settings-tab-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #455061; border-radius: 10px; font-size: 20px; color: #ffb969; background: #222a38; }
.settings-tab.is-active .settings-tab-icon { background: #ff9820; color: #241508; border-color: #ffb15a; }
.settings-tab strong, .settings-tab small { display: block; }
.settings-tab strong { font-size: 14px; }
.settings-tab small { color: #96a3b4; font-size: 10px; line-height: 1.3; margin-top: 2px; }
.settings-tab-arrow { color: #9aa5b5; font-size: 21px; }
.settings-content { min-width: 0; animation: appear .28s ease both; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 3px 0 22px; }
.section-heading h2 { font-size: clamp(25px, 2.4vw, 33px); letter-spacing: -1px; margin: 5px 0 1px; }
.section-heading p { color: var(--muted); margin: 0; }
.status-chip { background: #29303e; color: #ced7e4; border: 1px solid #465265; }
.status-chip.ready { background: #203a30; color: #a9ebc3; border-color: #3b7854; }
.settings-card { margin-bottom: 18px; padding: 27px; }
.settings-card h3 { font-size: 21px; letter-spacing: -.35px; margin: 3px 0 16px; }
.card-kicker { color: #f7b66c; font-size: 10px; letter-spacing: 1.8px; font-weight: 850; text-transform: uppercase; }
.setup-steps { list-style: none; padding: 0; margin: 15px 0 0; }
.setup-steps li { display: flex; align-items: flex-start; gap: 15px; margin: 0; padding: 15px 0; border-bottom: 1px solid #343b49; }
.setup-steps li:last-child { border-bottom: none; }
.setup-steps li > span { flex: 0 0 auto; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: #473326; color: #ffbc72; font-weight: 850; font-size: 12px; }
.setup-steps p { margin: 4px 0 0; color: #d2d9e3; }
.setup-details { border: 1px solid #394455; background: #141b27; border-radius: 12px; padding: 13px 16px; margin-top: 12px; color: #c7d1df; }
.setup-details summary { cursor: pointer; font-weight: 750; }
.setup-details p { margin-bottom: 0; }
.settings-card .form-grid { gap: 14px 18px; }
.settings-card label { color: #d3dce8; }
.settings-card input:not([type=checkbox]):not([type=color]):not([type=hidden]), .settings-card textarea { margin-top: 7px; margin-bottom: 0; background: #101722; }
.inline-notice { display: flex; align-items: center; gap: 10px; background: #192e2b; color: #bfe7d8; border: 1px solid #31574c; border-radius: 12px; padding: 13px 15px; margin-top: 20px; font-size: 13px; }
.inline-notice span { color: #8fe0b8; font-size: 19px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.form-actions .button { gap: 12px; }
.settings-card .button.primary { gap: 10px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.microcopy { color: #8996a8; font-size: 12px; margin-bottom: 0; }
.settings-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.settings-item { display: grid; grid-template-columns: 15px 1fr; column-gap: 10px; align-items: center; border: 1px solid #394354; background: #1b2431; border-radius: 12px; padding: 13px; }
.settings-item .item-swatch { grid-row: span 2; height: 27px; width: 5px; border-radius: 999px; background: var(--item-accent); box-shadow: 0 0 16px var(--item-accent); }
.settings-item strong { font-size: 13px; }
.settings-item small { font-size: 11px; }
.settings-item a { grid-column: 2; width: fit-content; color: #ffc17b; font-size: 12px; font-weight: 750; margin-top: 8px; }
.setup-progress { height: 9px; overflow: hidden; border-radius: 999px; background: #303b4b; margin: 16px 0 20px; }
.setup-progress span { display: block; height: 100%; background: linear-gradient(90deg, #ff9731, #79dca7); border-radius: inherit; transition: width .3s ease; }
.progress-list { display: grid; gap: 9px; }
.progress-item { border: 1px solid #3a4657; border-radius: 12px; background: #171f2b; padding: 13px 15px 13px 38px; position: relative; }
.progress-item::before { content: '○'; position: absolute; left: 14px; top: 13px; color: #8999ad; }
.progress-item.is-done { border-color: #3c7058; background: #1b302b; }
.progress-item.is-done::before { content: '✓'; color: #89e4ad; }
.progress-item b, .progress-item small { display: block; }
.progress-item b { font-size: 13px; }
.progress-item small { margin-top: 3px; color: #aab7c6; font-size: 11px; }
.working-status { padding: 12px 14px; border-radius: 10px; border: 1px solid #ae7946; background: #34291f; color: #ffcd98; }
.working-status::before { content: '◌'; display: inline-block; margin-right: 10px; animation: working-spin 1.1s linear infinite; }
.shopify-actions button:disabled { opacity: .55; cursor: wait; }
@keyframes working-spin { to { transform: rotate(360deg); } }
.format-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0 10px; }
.format-heading h4 { margin: 0; font-size: 16px; }
.format-row { padding: 18px; margin: 10px 0; border: 1px solid #425065; border-radius: 13px; background: #131d2a; }
.format-row .remove-format { margin-top: 12px; }
.settings-card label small { display: block; color: #99aabd; font-weight: 400; }
.settings-card .form-actions { gap: 10px; flex-wrap: wrap; }
code { color: #ffca8c; overflow-wrap: anywhere; }
.settings-card p code { font-size: .92em; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) { .settings-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; } }
@media (max-width: 900px) {
    .settings-layout { grid-template-columns: minmax(0, 1fr); min-width: 0; }
    .settings-tabs { display: flex; overflow-x: auto; position: static; scrollbar-width: thin; min-width: 0; max-width: 100%; }
    .settings-tab { min-width: 155px; grid-template-columns: 34px 1fr; }
    .settings-tab-arrow, .settings-tab small { display: none; }
    .settings-tab-icon { width: 34px; height: 34px; }
}
@media (max-width: 620px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    main { min-width: 0; width: 100%; }
    .settings-hero { flex-direction: column; align-items: flex-start; padding: 24px; min-width: 0; width: 100%; }
    .settings-hero > div:first-child { min-width: 0; }
    .settings-card { padding: 21px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .settings-item-grid { grid-template-columns: 1fr; }
    .action-row form, .action-row button, .form-actions .button { width: 100%; }
    .format-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-intro { padding: 22px; }
    .dashboard-intro .total { align-items: flex-start; text-align: left; width: 100%; }
    .dashboard-tiles .tile { min-height: 190px; }
    .printer-intro, .printer-detail-intro { padding: 22px; }
    .printer-intro-summary { width: 100%; align-items: flex-start; }
    .printer-overview .printer-card { min-height: 178px; }
    .printer-job-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
