:root {
    --sep-bg: #101412;
    --sep-panel: #181e1b;
    --sep-panel-2: #1f2723;
    --sep-line: rgba(255, 255, 255, 0.08);
    --sep-text: #e8f0ec;
    --sep-muted: #8ea099;
    --sep-accent: #1aa87a;
    --sep-accent-2: #0e7d5a;
    --sep-warn: #e7a15a;
    --sep-danger: #e06a5c;
    --sep-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

html,
body.sep-body {
    margin: 0;
    height: 100%;
    background: var(--sep-bg);
    color: var(--sep-text);
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

button,
input,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

.sep-app {
    height: 100vh;
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr) 148px;
    min-width: 960px;
}

.sep-top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1rem 0 0.85rem;
    border-bottom: 1px solid var(--sep-line);
    background: #141a17;
}

.sep-back {
    color: var(--sep-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
}

.sep-back:hover {
    color: var(--sep-text);
    background: rgba(255, 255, 255, 0.05);
}

.sep-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.sep-mark {
    width: 10px;
    height: 28px;
    border-radius: 3px;
    background: linear-gradient(180deg, #3ddeb0, var(--sep-accent-2));
    box-shadow: 0 0 0 3px rgba(26, 168, 122, 0.16);
}

.sep-kicker {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sep-accent);
}

.sep-brand h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 680;
    letter-spacing: -0.02em;
}

.sep-job {
    margin: 0 auto 0 0.5rem;
    color: var(--sep-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 36vw;
}

.sep-top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sep-btn {
    border: 1px solid var(--sep-line);
    background: var(--sep-panel-2);
    color: var(--sep-text);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 13px;
    font-weight: 650;
}

.sep-btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.18);
}

.sep-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.sep-btn-primary {
    background: var(--sep-accent);
    border-color: transparent;
    color: #06281c;
}

.sep-btn-primary:hover:not(:disabled) {
    background: #25c48d;
}

.sep-workspace {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    min-height: 0;
}

.sep-side,
.sep-inks {
    min-height: 0;
    overflow: auto;
    background: var(--sep-panel);
    padding: 0.9rem 0.9rem 1.2rem;
}

.sep-side {
    border-right: 1px solid var(--sep-line);
}

.sep-inks {
    border-left: 1px solid var(--sep-line);
}

.sep-section + .sep-section {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sep-line);
}

.sep-section h2,
.sep-inks-head h2 {
    margin: 0 0 0.7rem;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sep-muted);
}

.sep-drop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    text-align: left;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 0.9rem 0.85rem;
}

.sep-drop strong {
    font-size: 14px;
}

.sep-drop span,
.sep-help,
.sep-stat dt,
.sep-note {
    color: var(--sep-muted);
}

.sep-drop span,
.sep-help,
.sep-note {
    font-size: 12px;
}

.sep-drop.is-hot {
    border-color: var(--sep-accent);
    background: rgba(26, 168, 122, 0.08);
}

.sep-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.sep-field label,
.sep-check {
    font-size: 13px;
    font-weight: 600;
}

.sep-field input[type="range"] {
    width: 100%;
    accent-color: var(--sep-accent);
}

.sep-range-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--sep-muted);
    font-size: 12px;
}

.sep-range-row strong {
    color: var(--sep-text);
    font-variant-numeric: tabular-nums;
}

.sep-size-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sep-muted);
    font-size: 13px;
}

.sep-size-row input {
    width: 6.2rem;
    box-sizing: border-box;
    border: 1px solid var(--sep-line);
    background: #101412;
    color: var(--sep-text);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    font: inherit;
}

.sep-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.sep-segment button {
    border: 1px solid var(--sep-line);
    background: transparent;
    border-radius: 8px;
    padding: 0.45rem 0.4rem;
    font-weight: 650;
}

.sep-segment button.is-on {
    background: rgba(26, 168, 122, 0.16);
    border-color: rgba(26, 168, 122, 0.55);
    color: #d9fff0;
}

.sep-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.sep-stats {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.sep-stat {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
}

.sep-stat dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.sep-stage {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 80px),
        var(--sep-bg);
}

.sep-stage-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem 0.2rem;
}

.sep-views {
    display: flex;
    gap: 0.3rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.2rem;
    border-radius: 9px;
}

.sep-views button,
.sep-film-mode button {
    border: 0;
    background: transparent;
    color: var(--sep-muted);
    border-radius: 7px;
    padding: 0.32rem 0.65rem;
    font-weight: 650;
    font-size: 12px;
}

.sep-views button.is-on,
.sep-film-mode button.is-on {
    background: var(--sep-panel-2);
    color: var(--sep-text);
}

.sep-stage-frame {
    min-height: 0;
    margin: 0.55rem 0.9rem 0.4rem;
    border-radius: 14px;
    border: 1px solid var(--sep-line);
    background:
        linear-gradient(45deg, #1a211e 25%, transparent 25%),
        linear-gradient(-45deg, #1a211e 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a211e 75%),
        linear-gradient(-45deg, transparent 75%, #1a211e 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
    background-color: #141a17;
    position: relative;
    overflow: hidden;
    box-shadow: var(--sep-shadow);
}

.sep-canvases {
    position: absolute;
    inset: 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
}

.sep-canvases.is-split {
    grid-template-columns: 1fr 1fr;
}

.sep-pane {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
}

.sep-pane span {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sep-muted);
}

.sep-pane canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0c100e;
    border-radius: 8px;
}

.sep-empty[hidden] {
    display: none !important;
}

.sep-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--sep-muted);
    padding: 2rem;
}

.sep-empty strong {
    display: block;
    color: var(--sep-text);
    font-size: 18px;
    margin-bottom: 0.35rem;
}

.sep-progress {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    background: rgba(12, 16, 14, 0.92);
    border: 1px solid var(--sep-line);
    border-radius: 10px;
    padding: 0.55rem 0.7rem 0.65rem;
}

.sep-progress[hidden] {
    display: none;
}

.sep-progress p {
    margin: 0 0 0.4rem;
    font-size: 12px;
    font-weight: 650;
}

.sep-progress-track {
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.sep-progress-bar {
    height: 100%;
    width: 0;
    background: var(--sep-accent);
}

.sep-status {
    margin: 0;
    padding: 0 1rem 0.7rem;
    min-height: 1.2rem;
    color: var(--sep-muted);
    font-size: 12px;
}

.sep-status.is-warn {
    color: var(--sep-warn);
}

.sep-status.is-error {
    color: var(--sep-danger);
}

.sep-inks-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.sep-inks-head p {
    margin: 0 0 0.7rem;
    color: var(--sep-accent);
    font-size: 12px;
    font-weight: 700;
}

.sep-ink-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sep-ink {
    display: grid;
    grid-template-columns: auto 16px minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem 0.45rem;
    border-radius: 10px;
    border: 1px solid var(--sep-line);
    background: rgba(255, 255, 255, 0.02);
}

.sep-ink.is-off {
    opacity: 0.45;
}

.sep-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.sep-ink-name {
    min-width: 0;
}

.sep-ink-name strong,
.sep-ink-name span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sep-ink-name span {
    color: var(--sep-muted);
    font-size: 11px;
}

.sep-ink-meta {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--sep-muted);
}

.sep-add {
    position: relative;
    margin-top: 0.8rem;
}

.sep-add input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sep-line);
    background: #101412;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
}

.sep-add input:focus {
    outline: 2px solid rgba(26, 168, 122, 0.45);
    border-color: transparent;
}

.sep-suggest {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 0.25rem;
    list-style: none;
    background: #222a26;
    border: 1px solid var(--sep-line);
    border-radius: 10px;
    box-shadow: var(--sep-shadow);
    max-height: 220px;
    overflow: auto;
}

.sep-suggest button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 7px;
    padding: 0.35rem 0.4rem;
}

.sep-suggest button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sep-films {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0.85rem 0.75rem;
    border-top: 1px solid var(--sep-line);
    background: #141a17;
    min-height: 0;
}

.sep-films-label p {
    margin: 0.2rem 0 0;
    color: var(--sep-muted);
    font-size: 12px;
}

.sep-films-label strong {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sep-film-mode {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.45rem;
}

.sep-film-strip {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    min-height: 0;
    height: 100%;
    padding-bottom: 0.15rem;
}

.sep-film {
    flex: 0 0 118px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid var(--sep-line);
    background: #101412;
    border-radius: 10px;
    padding: 0.35rem;
    text-align: left;
    min-height: 0;
}

.sep-film.is-on {
    border-color: var(--sep-accent);
    box-shadow: 0 0 0 1px var(--sep-accent);
}

.sep-film canvas {
    width: 100%;
    height: 72px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}

.sep-film b,
.sep-film small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sep-film b {
    font-size: 11px;
}

.sep-film small {
    color: var(--sep-muted);
    font-size: 10px;
}

.sep-muted-block {
    color: var(--sep-muted);
    font-size: 13px;
    margin: 0;
}
