/*
 * The devCommand window, recreated in HTML.
 * Drawn at real size — never scaled down with a transform — so no text inside
 * it ever drops below 12px. Narrow screens lose columns instead of shrinking.
 */

.aw {
    --aw-bg: #1b1b1f;
    --aw-panel: rgba(255, 255, 255, 0.045);
    --aw-line: rgba(255, 255, 255, 0.08);
    --aw-text: #ececf1;
    --aw-muted: #9a9aa6;
    --aw-faint: #6e6e7a;
    --aw-tint: #7c3aed;
    --aw-ok: #4ade80;
    --aw-warn: #fb923c;
    --aw-bad: #f87171;
    --aw-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 540px;
    background: var(--aw-bg);
    color: var(--aw-text);
    border-radius: 14px;
    overflow: hidden;
    font: 500 13px/1.35 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    text-align: left;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 40px 80px -20px rgba(0, 0, 0, 0.55),
        0 18px 36px -18px rgba(0, 0, 0, 0.5);
    isolation: isolate;
}

.aw * { box-sizing: border-box; }

/* Title bar ---------------------------------------------------------- */

.aw-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--aw-line);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.aw-lights { display: inline-flex; gap: 8px; margin-right: 10px; }
.aw-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.aw-lights i:nth-child(2) { background: #febc2e; }
.aw-lights i:nth-child(3) { background: #28c840; }

.aw-project { font-size: 14px; font-weight: 700; }
.aw-badge {
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--aw-kind, #ef4538) 30%, transparent);
    color: color-mix(in srgb, var(--aw-kind, #ef4538) 30%, white);
}
.aw-branch, .aw-chip { font-size: 12px; color: var(--aw-muted); display: inline-flex; align-items: center; gap: 4px; }
.aw-path { margin-left: auto; font-size: 12px; color: var(--aw-faint); }

.aw--laravel { --aw-kind: #ef4538; }
.aw--wordpress { --aw-kind: #3b82c4; }
.aw--flutter { --aw-kind: #54b8f5; }
.aw--swift { --aw-kind: #fa733d; }

/* Body --------------------------------------------------------------- */

.aw-body {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: 200px 232px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    min-height: 0;
}

.aw--compact .aw-body { grid-template-columns: 232px minmax(0, 1fr); }

/* The wash: soft light behind the two left columns, never the terminal. */
.aw-wash {
    position: absolute;
    inset: 0 auto 0 0;
    width: 60%;
    z-index: -1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent);
    mask-image: linear-gradient(90deg, #000 55%, transparent);
}
.aw-wash i {
    position: absolute;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--aw-tint);
    filter: blur(70px);
    opacity: 0.45;
    animation: aw-drift 18s ease-in-out infinite alternate;
}
.aw-wash i:nth-child(1) { left: -20%; top: -10%; }
.aw-wash i:nth-child(2) { left: 20%; top: 45%; opacity: 0.3; background: color-mix(in srgb, var(--aw-tint) 60%, #ec4899); animation-duration: 23s; }
.aw-wash i:nth-child(3) { left: -10%; top: 75%; opacity: 0.35; animation-duration: 29s; }

@keyframes aw-drift {
    to { transform: translate(12%, -10%) scale(1.15); }
}

.aw-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 10px;
    background: var(--aw-panel);
    box-shadow: 0 0 0 1px var(--aw-line) inset;
    overflow: hidden;
}

.aw-col-title { padding: 12px 12px 8px; font-weight: 700; font-size: 13px; }

.aw-projects ul { list-style: none; margin: 0; padding: 0 6px; flex: 1; }
.aw-projects li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.aw-projects li + li { margin-top: 1px; }
.aw-projects li.is-active { background: rgba(255, 255, 255, 0.09); }
.aw-proj-text { display: flex; flex-direction: column; min-width: 0; }
.aw-proj-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-proj-text small { font-size: 12px; color: var(--aw-faint); }
.aw-live {
    position: absolute;
    left: 17px;
    top: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aw-ok);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: aw-breathe 2.4s ease-in-out infinite;
}
@keyframes aw-breathe {
    50% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}
.aw-projects-foot { display: grid; gap: 2px; padding: 8px 14px 12px; border-top: 1px solid var(--aw-line); color: var(--aw-muted); }
.aw-projects-foot span { padding: 4px 0; }

.aw-commands { padding: 10px 10px 0; overflow: hidden; }
.aw-filter, .aw-search {
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 1px var(--aw-line) inset;
    color: var(--aw-faint);
    margin-bottom: 8px;
}
.aw-group { margin-top: 8px; }
.aw-group-title { font-size: 12px; font-weight: 700; color: var(--aw-muted); padding: 4px 2px; }
.aw-cmd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid var(--aw-line);
    transition: background 0.2s, color 0.2s;
}
.aw-cmd::after { content: "›"; color: var(--aw-faint); }
.aw-cmd.is-hot { background: rgba(255, 255, 255, 0.07); border-radius: 6px; }
.aw-running {
    font-style: normal;
    font-size: 12px;
    padding: 1px 7px;
    border-radius: 5px;
    color: var(--aw-ok);
    background: rgba(74, 222, 128, 0.12);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35) inset;
    margin-left: auto;
    margin-right: 6px;
}
.aw-commands-foot { margin-top: auto; display: grid; gap: 6px; padding: 10px 0; }
.aw-health, .aw-foot-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 1px var(--aw-line) inset;
}
.aw-health { background: rgba(251, 146, 60, 0.12); box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.4) inset; }
.aw-health i { width: 7px; height: 7px; border-radius: 50%; background: var(--aw-warn); }
.aw-foot-btn kbd { margin-left: auto; font: inherit; font-size: 12px; color: var(--aw-muted); }

/* Main column -------------------------------------------------------- */

.aw-main {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 2px 4px;
    background: var(--aw-bg);
    border-radius: 10px;
    overflow: hidden;
}

.aw-tabs { display: flex; gap: 6px; padding: 4px 0 10px; }
.aw-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 7px;
    color: var(--aw-muted);
    box-shadow: 0 0 0 1px var(--aw-line) inset;
    white-space: nowrap;
}
.aw-tab.is-active { color: var(--aw-text); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 1px color-mix(in srgb, var(--aw-tint) 70%, transparent) inset; }
.aw-tab i { width: 6px; height: 6px; border-radius: 50%; background: var(--aw-faint); }
.aw-tab i.is-live { background: var(--aw-ok); }

.aw-session { display: flex; align-items: center; gap: 10px; padding: 4px 2px 10px; border-bottom: 1px solid var(--aw-line); white-space: nowrap; }
.aw-session code { font: 12px var(--aw-mono); color: var(--aw-muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.aw-btn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    white-space: nowrap;
}
.aw-btn.is-on { background: color-mix(in srgb, var(--aw-tint) 55%, transparent); }
.aw-btn.is-danger { background: #dc2626; }
.aw-btn.is-disabled { opacity: 0.45; }

.aw-term { padding: 14px 4px; font: 13px/1.7 var(--aw-mono); color: #d7d7df; }
.aw-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-term b { color: #fff; }
.t-badge { padding: 1px 8px; border-radius: 3px; }
.t-badge--info { background: #4338ca; color: #fff; }
.t-dim { color: var(--aw-faint); }
.t-ok { color: var(--aw-ok); }
.t-run { color: #facc15; }
.t-accent { color: color-mix(in srgb, var(--aw-tint) 50%, white); }
.t-dots { display: inline-block; width: 90px; border-bottom: 1px dotted var(--aw-faint); margin: 0 6px; transform: translateY(-4px); }
.aw-cursor { display: inline-block; width: 8px; height: 16px; border: 1px solid var(--aw-muted); vertical-align: middle; animation: aw-blink 1.1s steps(1) infinite; }
.aw-caret { display: inline-block; width: 2px; height: 15px; background: var(--aw-text); vertical-align: middle; margin-left: 1px; animation: aw-blink 1.1s steps(1) infinite; }
@keyframes aw-blink { 50% { opacity: 0; } }

/* Lines print in order once the window scrolls into view. */
.js .aw .aw-line { opacity: 0; transform: translateY(4px); transition: opacity 0.4s, transform 0.4s; transition-delay: calc(0.35s + var(--i) * 0.22s); }
.js .aw.is-in .aw-line { opacity: 1; transform: none; }

.aw-pane-head { display: flex; align-items: baseline; gap: 10px; padding: 6px 2px 10px; }
.aw-pane-head strong { font-size: 14px; }
.aw-pane-head small { font-size: 12px; color: var(--aw-faint); }
.aw-pane-head .aw-btn { margin-left: auto; }
.aw-search.is-typing { color: var(--aw-text); }
.aw-search-mode { float: right; color: var(--aw-muted); font-size: 12px; }

.aw-file { display: flex; align-items: center; justify-content: space-between; padding: 9px 4px 5px; border-top: 1px solid var(--aw-line); margin-top: 4px; }
.aw-test { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; color: #d4d4dc; }
.aw-test i { width: 8px; height: 8px; border-radius: 50%; background: var(--aw-ok); flex: none; }
.aw-test.is-fail i { background: var(--aw-bad); }
.aw-test.is-fail { color: #fecaca; }
.aw-tag { margin-left: auto; font-size: 12px; padding: 1px 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--aw-muted); }

.aw-logs { display: grid; gap: 4px; font-size: 13px; }
.aw-log { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; background: rgba(255, 255, 255, 0.03); }
.aw-lvl { font-size: 12px; padding: 1px 7px; border-radius: 4px; background: #3730a3; color: #e0e7ff; min-width: 58px; text-align: center; }
.aw-log.is-error .aw-lvl { background: #991b1b; color: #fee2e2; }
.aw-log.is-warning .aw-lvl { background: #9a3412; color: #ffedd5; }
.aw-time { font: 12px var(--aw-mono); color: var(--aw-faint); }
.aw-count { margin-left: auto; font-size: 12px; color: var(--aw-warn); }
.aw-trace { font: 12px/1.7 var(--aw-mono); color: var(--aw-muted); padding: 2px 10px 6px 86px; }
.aw-trace u { color: color-mix(in srgb, var(--aw-tint) 45%, white); text-underline-offset: 2px; }

.aw-pal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 10px; border-radius: 8px; }
.aw-pal strong { font: 600 13px var(--aw-mono); }
.aw-pal small { flex-basis: 100%; font-size: 12px; color: var(--aw-muted); }
.aw-pal .aw-tag { margin-left: auto; }
.aw-pal.is-hot { background: color-mix(in srgb, var(--aw-tint) 28%, transparent); }

.aw-empty {
    margin: auto;
    display: grid;
    gap: 6px;
    max-width: 300px;
    padding: 18px 22px;
    text-align: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--aw-muted);
}
.aw-empty strong { color: var(--aw-text); font-size: 15px; }

.aw-modal-scrim {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(10, 10, 14, 0.55);
    backdrop-filter: blur(3px);
    padding: 16px;
}
.aw-modal {
    display: grid;
    gap: 10px;
    width: min(380px, 100%);
    padding: 20px;
    border-radius: 12px;
    background: #26262c;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 20px 50px rgba(0, 0, 0, 0.5);
}
.aw-modal strong { font-size: 15px; }
.aw-modal p { margin: 0; color: var(--aw-muted); white-space: normal; }
.aw-modal code { font: 12px var(--aw-mono); padding: 8px 10px; border-radius: 7px; background: rgba(0, 0, 0, 0.35); color: #fca5a5; }
.aw-modal label { font-size: 12px; color: var(--aw-muted); }
.aw-input { padding: 7px 10px; border-radius: 7px; background: rgba(0, 0, 0, 0.3); box-shadow: 0 0 0 1px #f87171 inset; font-family: var(--aw-mono); }
.aw-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }


/* Queue profiles, custom commands, sequences, health, forms, scan ---- */

.aw-sub { padding: 12px 2px 6px; }
.aw-mono { font-family: var(--aw-mono); font-size: 12px; }
.aw-mono mark { background: color-mix(in srgb, var(--aw-tint) 40%, transparent); color: #fff; border-radius: 4px; padding: 0 3px; }

.aw-qrow { padding: 10px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--aw-line) inset; margin-bottom: 8px; }
.aw-qrow.is-live { box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35) inset; }
.aw-qrow-top { display: flex; align-items: center; gap: 10px; }
.aw-qrow-top .aw-tag { margin-left: 0; }
.aw-qrow-top .aw-running { margin-right: 0; }
.aw-qrow-queues { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--aw-muted); font: 12px var(--aw-mono); }
.aw-qrow-queues i { font-style: normal; color: var(--aw-faint); }

.aw-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.aw-fields--form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aw-field { display: grid; gap: 3px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--aw-line) inset; min-width: 0; }
.aw-field small { font-size: 12px; color: var(--aw-faint); }
.aw-field span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-field.is-wide { grid-column: 1 / -1; }
.aw-field.is-focus { box-shadow: 0 0 0 1px color-mix(in srgb, var(--aw-tint) 80%, transparent) inset, 0 0 0 3px color-mix(in srgb, var(--aw-tint) 25%, transparent); }
.aw-flag { display: flex; align-items: center; gap: 10px; }
.aw-preview { display: block; font: 12px/1.6 var(--aw-mono); padding: 9px 11px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); color: #c7d2fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-nudge { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: rgba(251, 146, 60, 0.1); box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.35) inset; font-size: 12px; }
.aw-nudge i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--aw-warn); }
.aw-nudge .aw-btn { margin-left: auto; }

.aw-toggle { display: inline-block; width: 28px; height: 16px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); position: relative; flex: none; }
.aw-toggle::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 0.3s; }
.aw-toggle.is-on { background: var(--aw-tint); }
.aw-toggle.is-on::after { transform: translateX(12px); }
.aw-check { display: inline-block; width: 15px; height: 15px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset; flex: none; position: relative; }
.aw-check.is-on { background: var(--aw-tint); box-shadow: none; }
.aw-check.is-on::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.aw kbd { font: 600 12px var(--aw-mono); padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); }

.aw-ask { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; margin-bottom: 6px; }
.aw-ask > span:first-child { font: 12px var(--aw-mono); color: var(--aw-muted); }
.aw-input.is-quiet { box-shadow: 0 0 0 1px var(--aw-line) inset; }
.aw-ask .aw-input { box-shadow: 0 0 0 1px color-mix(in srgb, var(--aw-tint) 70%, transparent) inset; }
.aw-ask .aw-input.is-quiet { box-shadow: 0 0 0 1px var(--aw-line) inset; }

.aw-switch-row { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; color: var(--aw-muted); }
.aw-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--aw-line) inset; margin-bottom: 8px; position: relative; }
.aw-step b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; background: rgba(255, 255, 255, 0.08); flex: none; }
.aw-step code { font: 12px var(--aw-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aw-step .aw-tag { margin-left: 0; }
.aw-step-state { margin-left: auto; font-size: 12px; color: var(--aw-faint); white-space: nowrap; }
.aw-step.is-done b { background: rgba(74, 222, 128, 0.2); color: var(--aw-ok); }
.aw-step.is-done .aw-step-state { color: var(--aw-ok); }
.aw-step.is-running { box-shadow: 0 0 0 1px color-mix(in srgb, var(--aw-tint) 70%, transparent) inset; }
.aw-step.is-running b { background: var(--aw-tint); }
.aw-step.is-running .aw-step-state { color: #facc15; }
.aw-step.is-waiting { opacity: 0.6; }
.aw-add { padding: 9px 12px; border-radius: 9px; border: 1px dashed rgba(255, 255, 255, 0.18); color: var(--aw-muted); }

.aw-finding { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--aw-line) inset; margin-bottom: 8px; }
.aw-finding > i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--aw-warn); }
.aw-finding.is-bad > i { background: var(--aw-bad); }
.aw-finding.is-ok > i { background: var(--aw-ok); }
.aw-finding.is-ok { opacity: 0.7; }
.aw-finding > div { display: grid; gap: 2px; min-width: 0; }
.aw-finding small { font-size: 12px; color: var(--aw-muted); white-space: normal; }
.aw-finding .aw-btn { margin-left: auto; }

.aw-scan { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--aw-line); }
.aw-scan .aw-tag { margin-left: auto; }

@media (max-width: 620px) {
    .aw-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aw-fields--form { grid-template-columns: minmax(0, 1fr); }
    .aw-nudge { flex-wrap: wrap; }
    .aw-nudge .aw-btn { margin-left: 0; }
    .aw-finding { flex-wrap: wrap; }
}

/* Narrow screens lose columns rather than shrinking text. */
@media (max-width: 960px) {
    .aw-body, .aw--compact .aw-body { grid-template-columns: 232px minmax(0, 1fr); }
    .aw-projects { display: none; }
    .aw-chip:nth-of-type(n + 3) { display: none; }
}
@media (max-width: 620px) {
    .aw { min-height: 420px; }
    .aw-body, .aw--compact .aw-body { grid-template-columns: minmax(0, 1fr); }
    .aw-commands { display: none; }
    .aw-chip, .aw-path, .aw-branch { display: none; }
    .aw-session code { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .aw-wash i, .aw-live, .aw-cursor, .aw-caret { animation: none; }
    .js .aw .aw-line { opacity: 1; transform: none; }
}
