/* Shared studio workspace, based on the supplied portal and proofing references. */
:root {
    --ink: #1e293b;
    --muted: #64748b;
    --green: #047857;
    --lime: #a7f3d0;
    --line: #e2e8f0;
    --canvas: #f8fafc;
    --white: #fff;
}
body {
    background: var(--canvas);
    color: var(--ink);
    font:
        14px/1.6 Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
}
h1,
h2,
h3,
.brand {
    font-family: inherit;
}
h1 {
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -1px;
    font-weight: 750;
    margin-bottom: 8px;
}
h2 {
    font-size: 16px;
    letter-spacing: -0.3px;
    margin-bottom: 16px;
}
h3 {
    font-size: 14px;
    letter-spacing: 0;
}
.eyebrow,
.tiny-label {
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
}
.subtext {
    font-size: 13px;
    line-height: 1.6;
}
.field-help,
.optional {
    font-size: 12px;
    color: #64748b;
}
.accent {
    color: #059669;
}
.sidebar {
    width: 248px;
    padding: 20px 14px 16px;
    background: #0a1210;
    border-right: 1px solid #192b26;
    color: #cbd5e1;
}
.sidebar .brand {
    padding: 0 6px 20px;
    margin: 0 0 22px;
    border-bottom: 1px solid #192b26;
    gap: 10px;
}
.sidebar .brand-logo {
    width: 34px;
    height: 34px;
}
.sidebar .brand-copy strong {
    font-size: 18px;
    color: white;
    letter-spacing: -0.5px;
}
.sidebar .brand-copy small {
    color: #6ee7b7;
    font-size: 10px;
}
.sidebar .workspace-label {
    color: #6ee7b7;
    font-size: 10px;
    letter-spacing: 1px;
    margin: 0 10px 12px;
}
.sidebar .nav-item {
    border: 1px solid transparent;
    min-height: 42px;
    padding: 9px 12px;
    margin: 3px 0;
    border-radius: 8px;
    font-size: 13px;
    color: #94a3b8;
    gap: 12px;
}
.sidebar .nav-item.active {
    background: #10362b;
    color: #a7f3d0;
    border-color: #1b5743;
}
.sidebar .nav-item:hover:not(.active) {
    background: #14211c;
    color: white;
}
.sidebar .nav-arrow {
    color: inherit;
}
.sidebar nav[aria-label="Administration"] {
    border-color: #192b26;
    margin-top: 14px;
    padding-top: 14px;
}
.sidebar-note {
    padding: 16px;
    margin-top: 28px;
    border-radius: 10px;
    background: linear-gradient(140deg, #142621, #0c1815);
    border: 1px solid #214334;
}
.sidebar-note .tiny-label {
    color: #6ee7b7;
    font-size: 9px;
}
.sidebar-note p {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
}
.sidebar-note > span:last-child {
    color: #94a3b8;
    font-size: 11px;
}
.sidebar .user-block {
    border-color: #192b26;
    padding-top: 16px;
}
.sidebar .user-block strong {
    color: #f1f5f9;
    font-size: 12px;
}
.sidebar .user-block small,
.sidebar .signout {
    color: #94a3b8;
    font-size: 11px;
}
.sidebar .avatar {
    background: #10b981;
    color: #052e24;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.app-shell {
    margin-left: 248px;
}
.topbar {
    height: 64px;
    padding: 0 28px;
    background: white;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.main-content {
    max-width: 1560px;
    padding: 28px;
}
.page-heading {
    margin-bottom: 24px;
    gap: 20px;
}
.page-heading .eyebrow {
    margin-bottom: 6px;
}
.detail-title {
    font-size: 28px;
    text-align: left;
}
.back-link {
    font-size: 12px;
    margin-bottom: 16px;
}
.job-page-toolbar {
    margin-bottom: 18px;
}
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 3px #0f172a05;
}
.form-panel,
.job-sidebar > .form-panel {
    padding: 20px;
}
.panel-toolbar {
    padding: 18px 20px;
    border-color: var(--line);
}
.stack,
.two-column,
.job-layout {
    gap: 20px;
}
.button,
.job-sidebar .button {
    min-height: 40px;
    padding: 9px 15px;
    font-size: 12px;
    border-radius: 8px;
    gap: 8px;
    font-weight: 650;
}
.primary {
    background: #047857;
    color: white;
    border-color: #047857;
}
.primary:hover {
    background: #065f46;
}
.secondary {
    background: white;
    border-color: #cbd5e1;
    color: #334155;
}
.secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
.button.primary > span {
    background: transparent;
    color: inherit;
}
button:disabled {
    cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid #34d399;
    outline-offset: 3px;
}
label {
    font-size: 12px;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 7px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="color"]
    ),
select,
textarea,
.login-form input:not([type="checkbox"]) {
    background: #f8fafc;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    padding: 10px 12px;
    color: #1e293b;
    font-family: inherit;
    font-size: 13px;
    box-shadow: none;
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #a7f3d0;
    outline-offset: 1px;
    border-color: #059669;
}
input::placeholder,
textarea::placeholder {
    color: #8492a6;
}
input[type="checkbox"],
input[type="radio"] {
    accent-color: #047857;
}
.form-actions {
    gap: 10px;
    padding-top: 18px;
    margin-top: 22px;
    border-color: var(--line);
}
.stat {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    box-shadow: none;
}
.stat:hover {
    transform: none;
    box-shadow: 0 2px 8px #0f172a08;
}
.stat strong {
    font-size: 30px;
    color: #0f172a;
    letter-spacing: -1px;
}
.stat > span {
    font-size: 11px;
    color: #64748b;
}
.stat small {
    font-size: 11px;
    color: #64748b;
}
.stat-complete {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.stats-grid {
    gap: 16px;
    margin-bottom: 24px;
}
.availability-bar,
.job-next-step {
    background: linear-gradient(110deg, #ecfdf5, #fff);
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 16px 20px;
}
.availability-bar .eyebrow {
    color: #047857;
}
.availability-bar strong,
.job-next-step strong {
    font-size: 14px;
}
.job-next-step p {
    font-size: 12px;
    color: #64748b;
}
.availability-bar form {
    gap: 12px;
}
.filters {
    gap: 8px;
}
.filter {
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
    background: transparent;
    color: #64748b;
}
.filter.selected,
.filter.selected:hover {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}
.filter:hover {
    background: #f1f5f9;
}
.job-search {
    padding: 18px;
    gap: 14px;
}
.job-search input,
.job-search select,
.job-search .form-actions .button {
    height: 40px;
    min-height: 40px;
}
.job-search .form-actions {
    min-height: 40px;
}
.job-tabs {
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    gap: 20px;
}
.job-tabs a {
    padding: 12px 0;
    border-radius: 0;
    font-size: 12px;
    color: #64748b;
    border-bottom: 2px solid transparent;
}
.job-tabs a.selected {
    background: transparent;
    color: #047857;
    border-bottom-color: #059669;
    box-shadow: none;
}
.job-tabs a span {
    background: #e2e8f0;
    color: #475569;
}
th {
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    letter-spacing: 0.3px;
}
td {
    font-size: 13px;
}
th,
td {
    padding: 16px 20px;
    border-color: var(--line);
}
tr:hover td {
    background: #f8fafc;
}
.badge,
.badge.large {
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.6;
    font-weight: 600;
}
.badge.completed {
    background: #ecfdf5;
    color: #047857;
}
.queue-position {
    background: #ecfdf5;
    color: #047857;
    border-radius: 5px;
    font-size: 10px;
}
.admin-label {
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    border-radius: 4px;
}
.notice {
    border-radius: 8px;
    font-size: 13px;
}
.notice.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.notice.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}
.quote-amount {
    font-size: 30px;
    letter-spacing: -1px;
}
.delivery-version {
    margin-top: 18px;
    padding-top: 18px;
}
.file-row {
    padding: 14px 0;
    font-size: 13px;
}
.file-actions {
    gap: 12px;
    font-size: 12px;
}
.artwork-approval,
.feedback-card,
.feedback-attachment,
.submission-artwork {
    border-radius: 10px;
    background: #f8fafc;
    border-color: var(--line);
}
.artwork-approval {
    padding: 16px;
}
.upload-area {
    padding: 18px;
    border: 1px dashed #94b9ac;
    border-radius: 10px;
    background: #f7fcfa;
}
.upload-area strong {
    font-size: 13px;
}
.upload-area input[type="file"]::file-selector-button {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
    border-radius: 6px;
}
.upload-area.is-dragging {
    background: #d1fae5;
    border-color: #059669;
}
.structured-brief-fields,
.invoice-recipient,
.backup-guidance,
.sidebar-editor {
    border-color: var(--line);
}
.backup-policy {
    background: #ecfdf5;
    border-color: #a7f3d0;
    border-radius: 10px;
}
.printer-map-card {
    border-radius: 10px;
}
.notification-bell {
    border-radius: 8px;
    font-size: 12px;
}
.notification-panel,
.notification-toast {
    border-radius: 12px;
    border-color: var(--line);
}
.footer {
    padding: 18px 28px;
    background: white;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: #64748b;
}
.login-story {
    background:
        radial-gradient(ellipse at top left, #164735, transparent 70%), #0a1210;
    color: #e2e8f0;
}
.login-story .brand-copy small,
.login-story .eyebrow,
.story-steps span {
    color: #6ee7b7;
}
.story-main h1 {
    font-size: clamp(36px, 4.5vw, 64px);
    letter-spacing: -2px;
}
.story-main h1 em {
    color: #6ee7b7;
}
.login-form-side {
    background: #f8fafc;
}
.login-form h2 {
    font-size: 28px;
}
.login-form .button.primary {
    background: #047857;
}
.login-contact,
.category-motion-toggle {
    color: #a7f3d0;
    border-color: #285640;
}
.category-group li {
    background: #132b22;
    border-color: #285640;
    color: #d1fae5;
}
/* Dark proofing surface keeps the artwork and annotation controls prominent. */
.proofing-page {
    --canvas: #020617;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: #263449;
    --green: #6ee7b7;
    background: #020617;
    color: #e2e8f0;
}
.proofing-page .topbar,
.proofing-page .footer {
    background: #0f172a;
    color: #94a3b8;
    border-color: #263449;
}
.proofing-page .main-content {
    max-width: none;
    padding: 20px;
}
.proofing-page .page-heading {
    margin-bottom: 16px;
}
.proofing-page .detail-title {
    font-size: 20px;
    overflow-wrap: anywhere;
}
.proofing-page .panel {
    background: #0f172a;
    border-color: #263449;
}
.proofing-page .annotation-intro {
    padding: 16px 20px;
}
.proofing-page .annotation-intro h2 {
    font-size: 14px;
}
.proofing-page .annotation-intro p {
    font-size: 12px;
}
.proofing-page .annotation-toolbar {
    background: #111c2e;
    padding: 12px 16px;
    gap: 12px;
}
.proofing-page .tool-button,
.proofing-page .tool-label select,
.proofing-page .secondary {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}
.proofing-page .tool-button.selected,
.proofing-page .primary {
    background: #047857;
    border-color: #059669;
    color: white;
}
.proofing-page .tool-button:hover:not(:disabled) {
    border-color: #6ee7b7;
}
.proofing-page label,
.proofing-page .tool-label {
    color: #cbd5e1;
}
.proofing-page textarea {
    background: #020617;
    border-color: #334155;
    color: #e2e8f0;
}
.proofing-page .editor-hint,
.proofing-page .editor-status {
    padding: 10px 20px;
    font-size: 12px;
}
.proofing-page .editor-status {
    color: #6ee7b7;
}
.proofing-page .editor-status.has-error {
    background: #451a23;
    color: #fda4af;
}
.proofing-page .canvas-stage {
    min-height: 320px;
    background-color: #080d17;
    background-image:
        linear-gradient(45deg, #131c2b 25%, transparent 25%),
        linear-gradient(-45deg, #131c2b 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #131c2b 75%),
        linear-gradient(-45deg, transparent 75%, #131c2b 75%);
    background-size: 24px 24px;
    background-position:
        0 0,
        0 12px,
        12px -12px,
        -12px 0;
    padding: 24px;
}
.proofing-page .annotation-send {
    padding: 16px 20px 20px;
}
.proofing-page .annotation-send label {
    margin-top: 0;
}
.proofing-page .field-help,
.proofing-page .optional {
    color: #94a3b8;
}
.proofing-page .annotation-history .file-row,
.proofing-page .preserve-text {
    color: #cbd5e1;
}
.proofing-page .notification-panel,
.proofing-page .notification-toast {
    color: #1e293b;
    --line: #e2e8f0;
    --muted: #64748b;
    --green: #047857;
}
@media (min-width: 1101px) {
    .job-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}
@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        padding: 12px 18px;
        border-right: 0;
    }
    .sidebar .brand {
        margin: 0;
        padding: 0;
        border: 0;
    }
    .sidebar nav[aria-label="Administration"] {
        margin: 0;
        padding: 0;
        border: 0;
    }
    .sidebar .nav-item {
        min-height: 40px;
        margin: 0;
        padding: 8px 10px;
    }
    .sidebar .workspace-label,
    .sidebar-note {
        display: none;
    }
    .app-shell {
        margin-left: 0;
    }
}
@media (max-width: 700px) {
    .main-content {
        padding: 20px 16px;
    }
    .topbar {
        padding: 0 16px;
        height: 56px;
    }
    h1,
    .detail-title {
        font-size: 25px;
    }
    .page-heading .subtext {
        font-size: 13px;
    }
    .form-panel,
    .job-sidebar > .form-panel {
        padding: 16px;
    }
    .sidebar {
        padding: 12px;
        gap: 10px;
    }
    .sidebar .nav-item {
        font-size: 12px;
    }
    .button,
    .tool-button {
        min-height: 44px;
    }
    .job-tabs {
        gap: 16px;
        overflow-x: auto;
    }
    .job-tabs a {
        white-space: nowrap;
    }
    .stats-grid {
        gap: 10px;
    }
    .stat {
        padding: 16px;
    }
    .stat strong {
        font-size: 25px;
    }
    .footer {
        padding: 16px;
    }
    .proofing-page .main-content {
        padding: 14px 10px;
    }
    .proofing-page .canvas-stage {
        padding: 12px;
        min-height: 220px;
    }
    .proofing-page .annotation-toolbar {
        gap: 8px;
        padding: 12px;
    }
    .proofing-page .annotation-send .button {
        flex: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.helper-card {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 24px;
}
.helper-card h2 {
    font-size: 22px;
}
.helper-card .eyebrow {
    color: #047857;
}
.helper-footer {
    border-color: #a7f3d0;
}
@media (min-width: 901px) {
    .sidebar {
        overflow-y: auto;
    }
}
.workspace-hero {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #1e293b;
    box-shadow: none;
}
.workspace-hero::before,
.workspace-hero::after {
    display: none;
}
.workspace-hero .eyebrow,
.workspace-hero .subtext {
    color: #64748b;
}
.workspace-hero h1 {
    font-size: 30px;
}
.workspace-hero .button.primary {
    background: #047857;
    color: white;
    border-color: #047857;
}
.proofing-page .notification-bell {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}
.proofing-page .tool-label {
    white-space: nowrap;
}
@media print {
    body {
        background: white;
        color: black;
        font-size: 12px;
    }
    .billing-document {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 15px;
    }
    .billing-document th,
    .billing-document td {
        padding: 10px;
        font-size: 12px;
    }
}
.workspace-hero {
    min-height: 0;
}
.workspace-hero .accent {
    color: #059669;
}

.studio-chat {
    overflow: hidden;
}
.studio-chat-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}
.studio-chat-heading h2 {
    margin: 0 0 6px;
}
.studio-chat-heading .field-help {
    margin: 0;
}
.studio-chat-heading > .admin-label {
    flex-shrink: 0;
}
.studio-chat-thread {
    padding: 0 20px 20px;
}
.chat-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #64748b;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.chat-divider::before,
.chat-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.studio-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
}
.chat-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: 0 0 30px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
}
.chat-message-content {
    min-width: 0;
    width: 86%;
}
.chat-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 9px;
    font-size: 10px;
    color: #64748b;
    margin: 0 0 7px;
}
.chat-message-meta strong {
    color: #1e293b;
    font-size: 12px;
}
.chat-bubble {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0 12px 12px 12px;
    padding: 14px;
    font-size: 13px;
}
.chat-bubble .preserve-text {
    margin: 0 0 12px;
    color: #334155;
    line-height: 1.7;
}
.chat-bubble .preserve-text:last-child {
    margin-bottom: 0;
}
.admin-message {
    flex-direction: row-reverse;
}
.admin-message .chat-avatar {
    background: #fffbeb;
    color: #92400e;
}
.admin-message .chat-message-meta {
    justify-content: flex-end;
}
.admin-message .chat-bubble {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-radius: 12px 0 12px 12px;
}
.chat-message-label {
    display: block;
    font-size: 11px;
    color: #0369a1;
    margin-bottom: 8px;
}
.chat-bubble .submission-artwork,
.chat-bubble .feedback-attachment {
    padding: 10px;
    margin: 10px 0 0;
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
}
.chat-bubble .file-row {
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 10px 0 0;
}
.chat-bubble .file-actions {
    margin-left: auto;
    flex-wrap: wrap;
}
.chat-bubble .feedback-source {
    margin: 0 0 10px;
    font-size: 11px;
}
.chat-release {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 10px 14px;
    border-radius: 20px;
    margin: 20px auto;
    width: fit-content;
    font-size: 11px;
}
.chat-composer {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-top: 20px;
    background: #f8fafc;
}
.chat-composer h3 {
    margin: 0 0 12px;
}
.chat-composer textarea {
    background: white;
}
.chat-composer .form-actions {
    margin-top: 14px;
    padding-top: 14px;
    flex-wrap: wrap;
}
.chat-printer-note {
    margin-top: 14px;
    font-size: 12px;
}
.chat-printer-note summary {
    cursor: pointer;
    color: #64748b;
}
.designer-composer {
    margin: 0 20px 20px;
}
.chat-empty {
    padding: 24px 0 0;
    color: #64748b;
}
@media (max-width: 700px) {
    .studio-chat-heading {
        flex-wrap: wrap;
        padding: 16px;
    }
    .studio-chat-thread {
        padding: 0 12px 16px;
    }
    .chat-message-content {
        width: calc(100% - 38px);
    }
    .studio-message {
        gap: 8px;
    }
    .chat-bubble {
        padding: 10px;
    }
    .chat-composer {
        padding: 12px;
    }
    .chat-composer .form-actions .button {
        flex: 1;
    }
    .designer-composer {
        margin: 0 12px 16px;
    }
}
.paste-upload-hint {
    display: block;
    margin-top: 12px;
    color: #64748b;
    font-size: 11px;
}
.upload-area:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 3px;
}

.theme-toggle {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 8px 12px;
    font: 600 12px/1.5 inherit;
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
}
.topbar .theme-toggle {
    margin-left: auto;
    margin-right: 12px;
}
.login-form-side {
    position: relative;
}
.login-theme-toggle {
    position: absolute;
    top: 20px;
    right: 24px;
}
html[data-theme="dark"] body {
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --green: #6ee7b7;
    --line: #334155;
    --canvas: #0b1220;
    --white: #111c2e;
    background: #0b1220;
    color: #e2e8f0;
}
html[data-theme="dark"]
    :is(
        .panel,
        .stat,
        .topbar,
        .footer,
        .login-form-side,
        .notification-panel,
        .notification-toast
    ) {
    background: #111c2e;
    border-color: #334155;
    color: #e2e8f0;
}
html[data-theme="dark"]
    :is(h1, h2, h3, .stat strong, .chat-message-meta strong, .workspace-hero) {
    color: #f1f5f9;
}
html[data-theme="dark"]
    :is(
        .subtext,
        .field-help,
        .optional,
        .muted,
        .stat small,
        .stat > span,
        .workspace-hero .subtext
    ) {
    color: #a7b5c9;
}
html[data-theme="dark"]
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="color"]
    ),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #0b1220;
    border-color: #475569;
    color: #e2e8f0;
    color-scheme: dark;
}
html[data-theme="dark"]
    :is(.secondary, .theme-toggle, .notification-bell, .filter) {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}
html[data-theme="dark"]
    :is(
        .primary,
        .workspace-hero .button.primary,
        .login-form .button.primary
    ) {
    background: #047857;
    color: white;
    border-color: #059669;
}
html[data-theme="dark"]
    :is(
        .availability-bar,
        .job-next-step,
        .helper-card,
        .stat-complete,
        .backup-policy,
        .notice.success,
        .chat-release
    ) {
    background: #10362b;
    color: #a7f3d0;
    border-color: #23654c;
}
html[data-theme="dark"]
    :is(
        th,
        .artwork-approval,
        .feedback-card,
        .feedback-attachment,
        .submission-artwork,
        .chat-bubble,
        .chat-composer,
        .notification-settings,
        .notification-foot
    ) {
    background: #172337;
    color: #cbd5e1;
    border-color: #334155;
}
html[data-theme="dark"] tr:hover td {
    background: #1e293b;
}
html[data-theme="dark"]
    :is(
        .upload-area,
        .brief-fields,
        .structured-brief-fields,
        .backup-guidance pre
    ) {
    background: #101f2c;
    border-color: #486572;
}
html[data-theme="dark"] .upload-area.is-dragging {
    background: #164e3b;
}
html[data-theme="dark"]
    :is(
        .admin-message .chat-bubble,
        .chat-bubble .submission-artwork,
        .chat-bubble .feedback-attachment
    ) {
    background: #142c3b;
    border-color: #28516c;
}
html[data-theme="dark"]
    :is(
        .preserve-text,
        .chat-bubble .preserve-text,
        .file-info strong,
        .text-link,
        .footer-contact,
        .helper-card,
        .notification-panel a
    ) {
    color: #d4e4ee;
}
html[data-theme="dark"] :is(.admin-label, .previous-version, .file-type) {
    background: #28384b;
    color: #cbd5e1;
}
html[data-theme="dark"] .notice.error {
    background: #451a23;
    color: #fecdd3;
}
html[data-theme="dark"] #request-revision .notice {
    background: #142c25;
    color: #d1fae5;
}
html[data-theme="dark"] .studio-chat .chat-message-label {
    color: #7dd3fc;
}
html[data-theme="dark"] .proofing-page .notification-panel {
    --muted: #94a3b8;
    --line: #334155;
    color: #e2e8f0;
}
html[data-theme="light"] .proofing-page {
    --ink: #1e293b;
    --muted: #64748b;
    --green: #047857;
    --line: #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
}
html[data-theme="light"]
    .proofing-page
    :is(.topbar, .footer, .panel, .annotation-toolbar) {
    background: white;
    color: #334155;
    border-color: #e2e8f0;
}
html[data-theme="light"]
    .proofing-page
    :is(.secondary, .tool-button, .tool-label select, .notification-bell) {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}
html[data-theme="light"] .proofing-page :is(.primary, .tool-button.selected) {
    background: #047857;
    color: white;
}
html[data-theme="light"] .proofing-page textarea {
    background: white;
    color: #1e293b;
    border-color: #cbd5e1;
}
html[data-theme="light"]
    .proofing-page
    :is(label, .tool-label, .preserve-text) {
    color: #334155;
}
html[data-theme="light"] .proofing-page :is(.field-help, .optional) {
    color: #64748b;
}
html[data-theme="light"] .proofing-page .editor-status {
    color: #047857;
}
@media (max-width: 600px) {
    .topbar {
        gap: 8px;
    }
    .topbar .theme-toggle {
        margin-right: 0;
        padding: 8px;
        font-size: 11px;
    }
    .topbar > span {
        font-size: 11px;
    }
}
@media print {
    html[data-theme] body,
    html[data-theme] .billing-document {
        background: white;
        color: black;
    }
    html[data-theme]
        .billing-document
        :is(h1, h2, h3, p, td, th, strong, span) {
        color: black;
        background: white;
    }
    .theme-toggle {
        display: none !important;
    }
}

/* ========================================================================== */
/* Legacy portal visual alignment                                              */
/* Keeps the newer studio/proofing/chat functionality while restoring the      */
/* softer white + deep-green visual language from portal.css.                  */
/* ========================================================================== */

:root {
    --ink: #202d2a;
    --muted: #737c78;
    --green: #234c40;
    --lime: #e5ee81;
    --line: #e1e6e2;
    --canvas: #f5f7f5;
    --white: #fff;
}

html:not([data-theme="dark"]) body {
    background: var(--canvas);
    color: var(--ink);
    font:
        16px/1.55 "DM Sans",
        Arial,
        sans-serif;
}

html:not([data-theme="dark"]) h1,
html:not([data-theme="dark"]) h2,
html:not([data-theme="dark"]) h3,
html:not([data-theme="dark"]) .brand {
    font-family: Manrope, Arial, sans-serif;
}

html:not([data-theme="dark"]) h1 {
    font-size: 2.75rem;
    letter-spacing: -1.8px;
    line-height: 1.18;
    margin-bottom: 12px;
    font-weight: 750;
}

html:not([data-theme="dark"]) h2 {
    font-size: 1.2rem;
    letter-spacing: -0.4px;
    margin-bottom: 18px;
}

html:not([data-theme="dark"]) h3 {
    font-size: 1.02rem;
}

html:not([data-theme="dark"]) .accent {
    color: #639369;
}
html:not([data-theme="dark"]) .subtext {
    font-size: 1rem;
    line-height: 1.55;
}
html:not([data-theme="dark"]) .field-help,
html:not([data-theme="dark"]) .optional {
    font-size: 0.75rem;
    color: var(--muted);
}
html:not([data-theme="dark"]) .eyebrow,
html:not([data-theme="dark"]) .tiny-label {
    font-size: 0.75rem;
    letter-spacing: 1.7px;
}

/* Sidebar: restore the light old-portal treatment. */
html:not([data-theme="dark"]) .sidebar {
    width: 248px;
    padding: 33px 22px 22px;
    background: var(--white);
    border-right: 1px solid var(--line);
    color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .brand {
    padding: 0;
    margin: 0;
    border-bottom: 0;
    gap: 0;
    font-size: 1.2rem;
    color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .brand-logo {
    width: 32px;
    height: 34px;
}

html:not([data-theme="dark"]) .sidebar .brand-copy strong {
    font-size: inherit;
    color: var(--ink);
    letter-spacing: -0.6px;
}

html:not([data-theme="dark"]) .sidebar .brand-copy small {
    color: var(--muted);
    font-size: 0.7rem;
}

html:not([data-theme="dark"]) .sidebar .workspace-label {
    color: #89918b;
    font-size: 0.75rem;
    letter-spacing: 1.3px;
    margin: 51px 12px 16px;
}

html:not([data-theme="dark"]) .sidebar .nav-item {
    border: 1px solid transparent;
    min-height: 0;
    padding: 13px 14px;
    margin: 0 0 7px;
    border-radius: 7px;
    font-size: 0.94rem;
    color: #69716c;
    gap: 12px;
}

html:not([data-theme="dark"]) .sidebar .nav-item.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

html:not([data-theme="dark"]) .sidebar .nav-item:hover:not(.active) {
    background: var(--canvas);
    color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .nav-arrow {
    color: var(--lime);
}

html:not([data-theme="dark"]) .sidebar nav[aria-label="Administration"] {
    border-color: var(--line);
}

html:not([data-theme="dark"]) .sidebar-note {
    margin: auto 7px 32px;
    padding: 65px 0 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

html:not([data-theme="dark"]) .sidebar-note .tiny-label {
    color: #78837a;
    font-size: 0.75rem;
}

html:not([data-theme="dark"]) .sidebar-note p {
    color: var(--ink);
    font-family: Manrope, Arial, sans-serif;
    font-size: 1.15rem;
    line-height: 1.5;
    margin: 8px 0 9px;
}

html:not([data-theme="dark"]) .sidebar-note > span:last-child {
    color: var(--muted);
    font-size: 0.8125rem;
}
html:not([data-theme="dark"]) .sidebar .user-block {
    border-color: var(--line);
    padding-top: 22px;
}
html:not([data-theme="dark"]) .sidebar .user-block strong {
    color: var(--ink);
    font-size: 0.875rem;
}
html:not([data-theme="dark"]) .sidebar .user-block small,
html:not([data-theme="dark"]) .sidebar .signout {
    color: var(--muted);
    font-size: 0.75rem;
}
html:not([data-theme="dark"]) .sidebar .avatar {
    width: 38px;
    height: 38px;
    background: #edf1e8;
    color: #48644c;
    border: 1px solid #d9e1d3;
}

/* Page spacing and surfaces. */
html:not([data-theme="dark"]) .topbar {
    height: 81px;
    padding: 0 44px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    font-size: 0.875rem;
}

html:not([data-theme="dark"]) .main-content {
    max-width: 1550px;
    padding: 44px;
}

html:not([data-theme="dark"]) .page-heading {
    margin-bottom: 34px;
    gap: 24px;
}
html:not([data-theme="dark"]) .page-heading .eyebrow {
    margin-bottom: 11px;
}
html:not([data-theme="dark"]) .detail-title {
    font-size: 2.25rem;
}
html:not([data-theme="dark"]) .back-link {
    font-size: 0.875rem;
    margin-bottom: 24px;
}

html:not([data-theme="dark"]) .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: none;
}

html:not([data-theme="dark"]) .form-panel,
html:not([data-theme="dark"]) .job-sidebar > .form-panel {
    padding: 28px;
}
html:not([data-theme="dark"]) .panel-toolbar {
    padding: 23px 26px 18px;
}
html:not([data-theme="dark"]) .stack,
html:not([data-theme="dark"]) .two-column,
html:not([data-theme="dark"]) .job-layout {
    gap: 25px;
}

/* Buttons and fields. */
html:not([data-theme="dark"]) .button,
html:not([data-theme="dark"]) .job-sidebar .button {
    min-height: 46px;
    padding: 12px 20px;
    font-size: 0.875rem;
    border-radius: 6px;
    gap: 16px;
    font-weight: 600;
}

html:not([data-theme="dark"]) .primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
html:not([data-theme="dark"]) .primary:hover {
    background: #153b30;
}
html:not([data-theme="dark"]) .secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}
html:not([data-theme="dark"]) .secondary:hover {
    background: #f1f4ef;
    border-color: var(--line);
}
html:not([data-theme="dark"]) .button.primary > span {
    color: var(--lime);
}

html:not([data-theme="dark"]) a:focus-visible,
html:not([data-theme="dark"]) button:focus-visible,
html:not([data-theme="dark"]) summary:focus-visible {
    outline: 3px solid #6e9f89;
    outline-offset: 4px;
}

html:not([data-theme="dark"]) label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 23px;
    margin-bottom: 8px;
}

html:not([data-theme="dark"])
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="color"]
    ),
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) textarea,
html:not([data-theme="dark"]) .login-form input:not([type="checkbox"]) {
    background: #fff;
    border: 1px solid #d7dfd8;
    border-radius: 5px;
    padding: 12px 13px;
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 0.875rem;
    box-shadow: none;
}

html:not([data-theme="dark"]) input:focus,
html:not([data-theme="dark"]) select:focus,
html:not([data-theme="dark"]) textarea:focus {
    outline: none;
    border-color: #56806c;
    box-shadow: 0 0 0 3px #e9f0e7;
}

html:not([data-theme="dark"]) input::placeholder,
html:not([data-theme="dark"]) textarea::placeholder {
    color: #9a9f99;
}
html:not([data-theme="dark"]) input[type="checkbox"],
html:not([data-theme="dark"]) input[type="radio"] {
    accent-color: var(--green);
}

/* Cards, filters, tabs and tables. */
html:not([data-theme="dark"]) .stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 22px 23px;
    box-shadow: none;
}
html:not([data-theme="dark"]) .stat strong {
    font-size: 2.5rem;
    color: var(--ink);
    font-family: Manrope, Arial, sans-serif;
    font-weight: 600;
}
html:not([data-theme="dark"]) .stat > span {
    font-size: 0.875rem;
    color: var(--ink);
}
html:not([data-theme="dark"]) .stat small {
    font-size: 0.75rem;
    color: var(--muted);
}
html:not([data-theme="dark"]) .stat-complete {
    background: #edf2e7;
    border-color: #dce6d0;
}
html:not([data-theme="dark"]) .stats-grid {
    gap: 17px;
    margin-bottom: 32px;
}

html:not([data-theme="dark"]) .availability-bar,
html:not([data-theme="dark"]) .job-next-step {
    background: #f2f5ec;
    border: 1px solid #dbe4ce;
    border-radius: 8px;
    color: var(--ink);
}
html:not([data-theme="dark"]) .availability-bar .eyebrow {
    color: #718459;
}
html:not([data-theme="dark"]) .job-next-step p {
    color: var(--muted);
}

html:not([data-theme="dark"]) .filter {
    border-radius: 5px;
    padding: 7px 13px;
    font-size: 0.8125rem;
    color: var(--muted);
}
html:not([data-theme="dark"]) .filter.selected,
html:not([data-theme="dark"]) .filter.selected:hover {
    border-color: #d9e2d8;
    background: #eff4ec;
    color: var(--green);
}
html:not([data-theme="dark"]) .filter:hover {
    background: #f3f5f2;
}

html:not([data-theme="dark"]) .job-tabs a {
    font-size: 0.8125rem;
    color: var(--muted);
}
html:not([data-theme="dark"]) .job-tabs a.selected {
    color: var(--green);
    border-bottom-color: var(--green);
}
html:not([data-theme="dark"]) .job-tabs a span {
    background: #edf1e8;
    color: #647268;
}

html:not([data-theme="dark"]) th {
    background: #fafbf9;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0;
}
html:not([data-theme="dark"]) td {
    font-size: 0.875rem;
}
html:not([data-theme="dark"]) th {
    padding: 14px 25px;
}
html:not([data-theme="dark"]) td {
    padding: 22px 25px;
}
html:not([data-theme="dark"]) tr:hover td {
    background: #fafbf9;
}

html:not([data-theme="dark"]) .badge,
html:not([data-theme="dark"]) .badge.large {
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 550;
}
html:not([data-theme="dark"]) .badge.completed {
    background: #e8f3e8;
    color: #35694b;
}
html:not([data-theme="dark"]) .queue-position {
    background: #edf2e7;
    color: #48644c;
}
html:not([data-theme="dark"]) .admin-label {
    background: #eef1ec;
    color: #69716c;
}

html:not([data-theme="dark"]) .artwork-approval,
html:not([data-theme="dark"]) .feedback-card,
html:not([data-theme="dark"]) .feedback-attachment,
html:not([data-theme="dark"]) .submission-artwork {
    background: #f6f8f3;
    border-color: var(--line);
    border-radius: 9px;
}

html:not([data-theme="dark"]) .upload-area {
    border-color: #cbd8c6;
    border-radius: 8px;
    background: #f8faf6;
}
html:not([data-theme="dark"])
    .upload-area
    input[type="file"]::file-selector-button {
    background: #fff;
    color: var(--green);
    border-color: #cbd8c6;
    border-radius: 4px;
}
html:not([data-theme="dark"]) .upload-area.is-dragging {
    background: #eef4e9;
    border-color: #70907d;
}

html:not([data-theme="dark"]) .notice.success,
html:not([data-theme="dark"]) .backup-policy {
    background: #edf2e7;
    border-color: #dce6d0;
    color: #35694b;
}

html:not([data-theme="dark"]) .footer {
    padding: 22px 44px;
    background: transparent;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    color: #939a94;
}

/* Keep the latest helper/chat features, but let them belong to the old palette. */
html:not([data-theme="dark"]) .helper-card {
    background: #eaf0df;
    border-color: #dbe4ce;
    border-radius: 8px;
    padding: 28px;
}
html:not([data-theme="dark"]) .helper-card h2 {
    font-size: 1.6rem;
}
html:not([data-theme="dark"]) .helper-card .eyebrow {
    color: #718459;
}
html:not([data-theme="dark"]) .helper-footer {
    border-color: #d0dbc3;
}

html:not([data-theme="dark"]) .workspace-hero {
    background:
        radial-gradient(ellipse at 85% 80%, #50753275, transparent 42%),
        radial-gradient(ellipse at 60% 0%, #216c4970, transparent 55%), #112f26;
    border: 0;
    border-radius: 24px;
    padding: 36px 40px;
    min-height: 200px;
    color: #f5f9f0;
    box-shadow: none;
}
html:not([data-theme="dark"]) .workspace-hero::before {
    display: none;
}
html:not([data-theme="dark"]) .workspace-hero::after {
    display: block;
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -70px;
    top: -85px;
    border: 1px solid #bbe68335;
    border-radius: 50%;
    box-shadow:
        0 0 0 38px #bbe68309,
        0 0 0 76px #bbe68306;
    z-index: 0;
}
html:not([data-theme="dark"]) .workspace-hero .eyebrow {
    color: #c3e79a;
}
html:not([data-theme="dark"]) .workspace-hero .subtext {
    color: #c6d7cc;
}
html:not([data-theme="dark"]) .workspace-hero h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    color: #f5f9f0;
}
html:not([data-theme="dark"]) .workspace-hero .accent {
    color: var(--lime);
}
html:not([data-theme="dark"]) .workspace-hero .button.primary {
    background: var(--lime);
    color: #203524;
    border-color: var(--lime);
}

html:not([data-theme="dark"]) .studio-chat-heading {
    padding: 23px 26px 18px;
}
html:not([data-theme="dark"]) .chat-divider {
    color: var(--muted);
}
html:not([data-theme="dark"]) .chat-avatar {
    background: #edf2e7;
    color: #48644c;
}
html:not([data-theme="dark"]) .chat-message-meta {
    color: var(--muted);
}
html:not([data-theme="dark"]) .chat-message-meta strong {
    color: var(--ink);
}
html:not([data-theme="dark"]) .chat-bubble {
    background: #f7f9f5;
    border-color: var(--line);
    color: var(--ink);
}
html:not([data-theme="dark"]) .chat-bubble .preserve-text {
    color: #435148;
}
html:not([data-theme="dark"]) .admin-message .chat-avatar {
    background: #faf2df;
    color: #8a6b2d;
}
html:not([data-theme="dark"]) .admin-message .chat-bubble {
    background: #eef4ec;
    border-color: #d5e2d3;
}
html:not([data-theme="dark"]) .chat-message-label {
    color: #4d7357;
}
html:not([data-theme="dark"]) .chat-release {
    background: #edf2e7;
    color: #35694b;
    border-color: #dce6d0;
}
html:not([data-theme="dark"]) .chat-composer {
    background: #f7f9f5;
    border-color: var(--line);
}

html:not([data-theme="dark"]) .theme-toggle {
    border-color: #d8e1d3;
    background: #fff;
    color: #284732;
    min-height: 40px;
}

/* Preserve the latest compact mobile behavior while using old-theme colors. */
@media (max-width: 900px) {
    html:not([data-theme="dark"]) .sidebar {
        padding: 12px 18px;
        background: #fff;
        border-bottom: 1px solid var(--line);
    }
    html:not([data-theme="dark"]) .sidebar .brand {
        padding: 0;
        margin: 0;
        border: 0;
    }
    html:not([data-theme="dark"]) .sidebar .nav-item {
        margin: 0;
        padding: 8px 10px;
    }
}

@media (max-width: 700px) {
    html:not([data-theme="dark"]) .main-content {
        padding: 20px 16px;
    }
    html:not([data-theme="dark"]) .topbar {
        padding: 0 16px;
        height: 56px;
    }
    html:not([data-theme="dark"]) h1,
    html:not([data-theme="dark"]) .detail-title {
        font-size: 25px;
    }
    html:not([data-theme="dark"]) .form-panel,
    html:not([data-theme="dark"]) .job-sidebar > .form-panel {
        padding: 16px;
    }
    html:not([data-theme="dark"]) .workspace-hero {
        border-radius: 16px;
        padding: 24px 20px;
        min-height: 0;
    }
    html:not([data-theme="dark"]) .footer {
        padding: 16px;
    }
}

/* ==========================================================================
   Typography consistency
   Light and dark modes must use exactly the same font families.
   ========================================================================== */

html,
body,
button,
input,
select,
textarea {
    font-family: "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.detail-title,
.workspace-hero h1 {
    font-family:
        Manrope, "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
}

/* Explicit dark-mode guard: colors may change, typography must not. */
html[data-theme="dark"] body,
html[data-theme="dark"] button,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    font-family: "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="dark"]
    :is(h1, h2, h3, h4, h5, h6, .brand, .detail-title, .workspace-hero h1) {
    font-family:
        Manrope, "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
}

/* ========================================================================== */
/* THEME-STABLE GEOMETRY                                                      */
/* Light and dark modes must use identical typography, dimensions, spacing,   */
/* radii and layout. Theme switching changes colours only.                    */
/* ========================================================================== */

/* Global typography — identical in both themes */
html,
body {
    font-family: "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

button,
input,
select,
textarea {
    font-family: "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.detail-title,
.workspace-hero h1 {
    font-family:
        Manrope, "DM Sans", Arial, ui-sans-serif, system-ui, sans-serif;
}

h1 {
    font-size: 2.75rem;
    line-height: 1.18;
    letter-spacing: -1.8px;
    font-weight: 750;
    margin-bottom: 12px;
}

h2 {
    font-size: 1.2rem;
    line-height: 1.3;
    letter-spacing: -0.4px;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.02rem;
    line-height: 1.4;
}

.eyebrow,
.tiny-label {
    font-size: 0.75rem;
    letter-spacing: 1.7px;
    font-weight: 700;
}

.subtext {
    font-size: 1rem;
    line-height: 1.55;
}

.field-help,
.optional {
    font-size: 0.75rem;
}

/* Sidebar geometry — identical in both themes */
.sidebar {
    width: 248px;
    padding: 33px 22px 22px;
}

.sidebar .brand {
    padding: 0;
    margin: 0;
    border-bottom-width: 0;
    gap: 0;
    font-size: 1.2rem;
}

.sidebar .brand-logo {
    width: 32px;
    height: 34px;
}

.sidebar .brand-copy strong {
    font-size: inherit;
    letter-spacing: -0.6px;
}

.sidebar .brand-copy small {
    font-size: 0.7rem;
}

.sidebar .workspace-label {
    font-size: 0.75rem;
    letter-spacing: 1.3px;
    margin: 51px 12px 16px;
}

.sidebar .nav-item {
    min-height: 0;
    padding: 13px 14px;
    margin: 0 0 7px;
    border-radius: 7px;
    font-size: 0.94rem;
    gap: 12px;
}

.sidebar nav[aria-label="Administration"] {
    margin-top: 14px;
    padding-top: 14px;
}

.sidebar-note .tiny-label {
    font-size: 0.75rem;
}

.sidebar-note p {
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 1.15rem;
    line-height: 1.5;
    margin: 8px 0 9px;
}

.sidebar-note > span:last-child {
    font-size: 0.8125rem;
}

.sidebar .user-block {
    padding-top: 22px;
}

.sidebar .user-block strong {
    font-size: 0.875rem;
}

.sidebar .user-block small,
.sidebar .signout {
    font-size: 0.75rem;
}

.sidebar .avatar {
    width: 38px;
    height: 38px;
}

/* Main application shell */
.app-shell {
    margin-left: 248px;
}

.topbar {
    height: 81px;
    padding: 0 44px;
    font-size: 0.875rem;
}

.main-content {
    max-width: 1550px;
    padding: 44px;
}

.page-heading {
    margin-bottom: 34px;
    gap: 24px;
}

.page-heading .eyebrow {
    margin-bottom: 11px;
}

.detail-title {
    font-size: 2.25rem;
}

.back-link {
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.job-page-toolbar {
    margin-bottom: 18px;
}

/* Cards, panels and layout spacing */
.panel {
    border-radius: 9px;
    box-shadow: none;
}

.form-panel,
.job-sidebar > .form-panel {
    padding: 28px;
}

.panel-toolbar {
    padding: 23px 26px 18px;
}

.stack,
.two-column,
.job-layout {
    gap: 25px;
}

/* Buttons — identical hit area and typography */
.button,
.job-sidebar .button {
    min-height: 46px;
    padding: 12px 20px;
    font-size: 0.875rem;
    border-radius: 6px;
    gap: 16px;
    font-weight: 600;
}

/* Forms — identical geometry */
label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 23px;
    margin-bottom: 8px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="color"]
    ),
select,
textarea,
.login-form input:not([type="checkbox"]) {
    border-radius: 5px;
    padding: 12px 13px;
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: none;
}

.form-actions {
    gap: 10px;
    padding-top: 18px;
    margin-top: 22px;
}

/* Stats */
.stat {
    border-radius: 9px;
    padding: 22px 23px;
    box-shadow: none;
}

.stat strong {
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
    font-weight: 600;
}

.stat > span {
    font-size: 0.875rem;
}

.stat small {
    font-size: 0.75rem;
}

.stats-grid {
    gap: 17px;
    margin-bottom: 32px;
}

/* Availability / next-step panels */
.availability-bar,
.job-next-step {
    border-radius: 8px;
    padding: 16px 20px;
}

.availability-bar strong,
.job-next-step strong {
    font-size: 0.875rem;
}

.job-next-step p {
    font-size: 0.75rem;
}

.availability-bar form {
    gap: 12px;
}

/* Filters and tabs */
.filters {
    gap: 8px;
}

.filter {
    border-radius: 5px;
    padding: 7px 13px;
    font-size: 0.8125rem;
}

.job-search {
    padding: 18px;
    gap: 14px;
}

.job-search input,
.job-search select,
.job-search .form-actions .button {
    height: 40px;
    min-height: 40px;
}

.job-search .form-actions {
    min-height: 40px;
}

.job-tabs {
    padding: 0;
    border-radius: 0;
    gap: 20px;
}

.job-tabs a {
    padding: 12px 0;
    border-radius: 0;
    font-size: 0.8125rem;
}

/* Tables — the same row height in both themes */
th {
    font-size: 0.75rem;
    letter-spacing: 0;
    padding: 14px 25px;
}

td {
    font-size: 0.875rem;
    padding: 22px 25px;
}

/* Badges / notices */
.badge,
.badge.large {
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 0.75rem;
    line-height: 1.6;
    font-weight: 550;
}

.queue-position {
    border-radius: 5px;
    font-size: 10px;
}

.admin-label {
    font-size: 10px;
    border-radius: 4px;
}

.notice {
    border-radius: 8px;
    font-size: 0.8125rem;
}

.quote-amount {
    font-size: 30px;
    letter-spacing: -1px;
}

.delivery-version {
    margin-top: 18px;
    padding-top: 18px;
}

.file-row {
    padding: 14px 0;
    font-size: 0.8125rem;
}

.file-actions {
    gap: 12px;
    font-size: 0.75rem;
}

/* Artwork / upload surfaces */
.artwork-approval,
.feedback-card,
.feedback-attachment,
.submission-artwork {
    border-radius: 9px;
}

.artwork-approval {
    padding: 16px;
}

.upload-area {
    padding: 18px;
    border-radius: 8px;
}

.upload-area strong {
    font-size: 0.8125rem;
}

.upload-area input[type="file"]::file-selector-button {
    border-radius: 4px;
}

.backup-policy,
.printer-map-card {
    border-radius: 9px;
}

.notification-bell {
    border-radius: 8px;
    font-size: 0.75rem;
}

.notification-panel,
.notification-toast {
    border-radius: 12px;
}

/* Footer */
.footer {
    padding: 22px 44px;
    font-size: 0.75rem;
}

/* Helper cards */
.helper-card {
    border-radius: 8px;
    padding: 28px;
}

.helper-card h2 {
    font-size: 1.6rem;
}

/* Workspace hero geometry */
.workspace-hero {
    border-radius: 24px;
    padding: 36px 40px;
    min-height: 200px;
}

.workspace-hero h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

/* Studio chat geometry */
.studio-chat-heading {
    padding: 23px 26px 18px;
}

.studio-chat-thread {
    padding: 0 20px 20px;
}

.chat-divider {
    gap: 12px;
    margin: 24px 0;
    font-size: 10px;
    letter-spacing: 0.6px;
}

.studio-message {
    gap: 10px;
    margin: 18px 0;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 11px;
}

.chat-message-content {
    width: 86%;
}

.chat-message-meta {
    gap: 5px 9px;
    font-size: 10px;
    margin-bottom: 7px;
}

.chat-message-meta strong {
    font-size: 12px;
}

.chat-bubble {
    padding: 14px;
    font-size: 13px;
}

.chat-bubble .preserve-text {
    line-height: 1.7;
}

.chat-message-label {
    font-size: 11px;
    margin-bottom: 8px;
}

.chat-bubble .submission-artwork,
.chat-bubble .feedback-attachment {
    padding: 10px;
    margin-top: 10px;
    border-radius: 8px;
}

.chat-release {
    padding: 10px 14px;
    border-radius: 20px;
    margin: 20px auto;
    font-size: 11px;
}

.chat-composer {
    padding: 16px;
    border-radius: 10px;
    margin-top: 20px;
}

.designer-composer {
    margin: 0 20px 20px;
}

/* Theme toggle itself must not resize */
.theme-toggle {
    border-radius: 6px;
    padding: 8px 12px;
    min-height: 40px;
    font-size: 12px;
    line-height: 1.5;
}

/* Desktop sidebar scroll behaviour */
@media (min-width: 901px) {
    .sidebar {
        overflow-y: auto;
    }
}

/* Mobile geometry is also identical across themes */
@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        padding: 12px 18px;
        border-right: 0;
    }

    .sidebar .brand {
        margin: 0;
        padding: 0;
        border: 0;
    }

    .sidebar nav[aria-label="Administration"] {
        margin: 0;
        padding: 0;
        border: 0;
    }

    .sidebar .nav-item {
        min-height: 40px;
        margin: 0;
        padding: 8px 10px;
    }

    .sidebar .workspace-label,
    .sidebar-note {
        display: none;
    }

    .app-shell {
        margin-left: 0;
    }
}

@media (max-width: 700px) {
    .main-content {
        padding: 20px 16px;
    }

    .topbar {
        height: 56px;
        padding: 0 16px;
    }

    h1,
    .detail-title {
        font-size: 25px;
    }

    .page-heading .subtext {
        font-size: 13px;
    }

    .form-panel,
    .job-sidebar > .form-panel {
        padding: 16px;
    }

    .sidebar {
        padding: 12px;
        gap: 10px;
    }

    .sidebar .nav-item {
        font-size: 12px;
    }

    .button,
    .tool-button {
        min-height: 44px;
    }

    .job-tabs {
        gap: 16px;
        overflow-x: auto;
    }

    .job-tabs a {
        white-space: nowrap;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat {
        padding: 16px;
    }

    .stat strong {
        font-size: 25px;
    }

    .footer {
        padding: 16px;
    }

    .workspace-hero {
        border-radius: 16px;
        padding: 24px 20px;
        min-height: 0;
    }

    .studio-chat-heading {
        flex-wrap: wrap;
        padding: 16px;
    }

    .studio-chat-thread {
        padding: 0 12px 16px;
    }

    .chat-message-content {
        width: calc(100% - 38px);
    }

    .studio-message {
        gap: 8px;
    }

    .chat-bubble {
        padding: 10px;
    }

    .chat-composer {
        padding: 12px;
    }

    .designer-composer {
        margin: 0 12px 16px;
    }
}

/*
 * Dark mode: geometry above is shared.
 * The rules below intentionally contain COLOR ONLY.
 */
html[data-theme="dark"] body {
    --ink: #edf3ef;
    --muted: #98aaa1;
    --green: #64c99a;
    --lime: #9ee7bd;
    --line: #283a32;
    --canvas: #0b110f;
    --white: #111a17;

    background-color: var(--canvas);
    color: var(--ink);
}

html[data-theme="dark"]
    :is(
        .panel,
        .stat,
        .topbar,
        .login-form-side,
        .notification-panel,
        .notification-toast
    ) {
    background-color: #111a17;
    border-color: #283a32;
    color: #edf3ef;
}

html[data-theme="dark"] .footer {
    background-color: transparent;
    border-color: #283a32;
    color: #98aaa1;
}

html[data-theme="dark"]
    :is(
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        .detail-title,
        .stat strong,
        .chat-message-meta strong
    ) {
    color: #f2f6f3;
}

html[data-theme="dark"]
    :is(.subtext, .field-help, .optional, .muted, .stat small, .stat > span) {
    color: #98aaa1;
}

html[data-theme="dark"]
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="color"]
    ),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .login-form input:not([type="checkbox"]) {
    background-color: #0e1713;
    border-color: #31463c;
    color: #e8f0eb;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #71847a;
}

html[data-theme="dark"]
    :is(.secondary, .theme-toggle, .notification-bell, .filter) {
    background-color: #16211d;
    color: #d9e5df;
    border-color: #31463c;
}

html[data-theme="dark"]
    :is(
        .primary,
        .workspace-hero .button.primary,
        .login-form .button.primary
    ) {
    background-color: #1f6f53;
    color: #fff;
    border-color: #2b8766;
}

html[data-theme="dark"]
    :is(
        .availability-bar,
        .job-next-step,
        .helper-card,
        .stat-complete,
        .backup-policy,
        .notice.success,
        .chat-release
    ) {
    background-color: #11291f;
    border-color: #24523f;
    color: #b8f2d1;
}

html[data-theme="dark"] th {
    background-color: #101815;
    color: #93a69c;
    border-color: #283a32;
}

html[data-theme="dark"] td {
    border-color: #283a32;
}

html[data-theme="dark"] tr:hover td {
    background-color: #16211d;
}

html[data-theme="dark"]
    :is(
        .artwork-approval,
        .feedback-card,
        .feedback-attachment,
        .submission-artwork,
        .chat-bubble,
        .chat-composer,
        .notification-settings,
        .notification-foot
    ) {
    background-color: #16211d;
    color: #d3dfd8;
    border-color: #2a3d34;
}

html[data-theme="dark"]
    :is(
        .upload-area,
        .brief-fields,
        .structured-brief-fields,
        .backup-guidance pre
    ) {
    background-color: #102019;
    border-color: #345343;
}

html[data-theme="dark"] .sidebar {
    background-color: #080e0c;
    border-color: #1d2b25;
}

html[data-theme="dark"] .sidebar .nav-item {
    color: #97aaa0;
}

html[data-theme="dark"] .sidebar .nav-item.active {
    background-color: #17382d;
    border-color: #285845;
    color: #b8f2d1;
}

html[data-theme="dark"] .sidebar .nav-item:hover:not(.active) {
    background-color: #121d18;
    color: #edf3ef;
}

/* ==========================================================================
   End theme-stable geometry
   ========================================================================== */

/* DARK PALETTE V2 · GRAPHITE + EMERALD
   Colour-only overrides. Geometry remains untouched.
   ========================================================================== */

html[data-theme="dark"] body {
    --ink: #e8eeea;
    --muted: #9aa7a0;
    --green: #5cc59a;
    --lime: #a7e7c7;
    --line: #2b3530;
    --canvas: #0e1311;
    --white: #161c19;

    background-color: #0e1311;
    color: #e8eeea;
}

/* Main surfaces */
html[data-theme="dark"]
    :is(
        .panel,
        .stat,
        .login-form-side,
        .notification-panel,
        .notification-toast
    ) {
    background-color: #161c19;
    border-color: #2b3530;
    color: #e8eeea;
}

html[data-theme="dark"] :is(.topbar, .footer) {
    background-color: #121714;
    border-color: #28312d;
    color: #9aa7a0;
}

html[data-theme="dark"]
    :is(
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        .detail-title,
        .stat strong,
        .chat-message-meta strong
    ) {
    color: #f1f5f2;
}

html[data-theme="dark"]
    :is(.subtext, .field-help, .optional, .muted, .stat small, .stat > span) {
    color: #9aa7a0;
}

/* Inputs */
html[data-theme="dark"]
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="color"]
    ),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .login-form input:not([type="checkbox"]) {
    background-color: #111613;
    border-color: #36423c;
    color: #e7ece9;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #708078;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: #5cc59a;
    box-shadow: 0 0 0 3px rgba(92, 197, 154, 0.18);
}

/* Buttons */
html[data-theme="dark"]
    :is(.secondary, .theme-toggle, .notification-bell, .filter) {
    background-color: #1b221e;
    color: #dce5df;
    border-color: #36423c;
}

html[data-theme="dark"]
    :is(
        .secondary:hover,
        .theme-toggle:hover,
        .notification-bell:hover,
        .filter:hover
    ) {
    background-color: #232c27;
    border-color: #46554d;
    color: #f4f7f5;
}

html[data-theme="dark"]
    :is(
        .primary,
        .workspace-hero .button.primary,
        .login-form .button.primary
    ) {
    background-color: #237a59;
    border-color: #2c8c68;
    color: #ffffff;
}

html[data-theme="dark"]
    :is(
        .primary:hover,
        .workspace-hero .button.primary:hover,
        .login-form .button.primary:hover
    ) {
    background-color: #2b8b65;
    border-color: #389b75;
}

/* Sidebar */
html[data-theme="dark"] .sidebar {
    background-color: #0a0f0d;
    border-color: #222b27;
    color: #a0ada6;
}

html[data-theme="dark"] .sidebar .brand-copy strong,
html[data-theme="dark"] .sidebar .user-block strong {
    color: #f1f5f2;
}

html[data-theme="dark"] .sidebar .brand-copy small,
html[data-theme="dark"] .sidebar .workspace-label,
html[data-theme="dark"] .sidebar .user-block small,
html[data-theme="dark"] .sidebar .signout {
    color: #7f8e86;
}

html[data-theme="dark"] .sidebar .nav-item {
    color: #99a69f;
}

html[data-theme="dark"] .sidebar .nav-item:hover:not(.active) {
    background-color: #151b18;
    color: #eef3ef;
}

html[data-theme="dark"] .sidebar .nav-item.active {
    background-color: #173c2e;
    border-color: #275a46;
    color: #c0f0d8;
}

html[data-theme="dark"] .sidebar .avatar {
    background-color: #1a3d30;
    border-color: #2d664f;
    color: #c2f3da;
}

html[data-theme="dark"] .sidebar-note {
    background: linear-gradient(145deg, #121916, #0d1310);
    border-color: #25352e;
}

html[data-theme="dark"] .sidebar-note .tiny-label {
    color: #70c9a2;
}

html[data-theme="dark"] .sidebar-note p {
    color: #dce5df;
}

/* Positive / status surfaces */
html[data-theme="dark"]
    :is(
        .availability-bar,
        .job-next-step,
        .helper-card,
        .stat-complete,
        .backup-policy,
        .notice.success,
        .chat-release
    ) {
    background-color: #14271f;
    border-color: #29533f;
    color: #b9e8d0;
}

html[data-theme="dark"] .availability-bar .eyebrow,
html[data-theme="dark"] .helper-card .eyebrow {
    color: #77d0a9;
}

/* Tables */
html[data-theme="dark"] th {
    background-color: #131816;
    border-color: #2b3530;
    color: #95a29b;
}

html[data-theme="dark"] td {
    border-color: #2b3530;
}

html[data-theme="dark"] tr:hover td {
    background-color: #1b221e;
}

/* Nested neutral surfaces */
html[data-theme="dark"]
    :is(
        .artwork-approval,
        .feedback-card,
        .feedback-attachment,
        .submission-artwork,
        .chat-bubble,
        .chat-composer,
        .notification-settings,
        .notification-foot
    ) {
    background-color: #1a211d;
    color: #d6dfda;
    border-color: #303c36;
}

/* Upload / specification panels */
html[data-theme="dark"]
    :is(
        .upload-area,
        .brief-fields,
        .structured-brief-fields,
        .backup-guidance pre
    ) {
    background-color: #131b17;
    border-color: #3a4a42;
}

html[data-theme="dark"] .upload-area.is-dragging {
    background-color: #183328;
    border-color: #5cc59a;
}

html[data-theme="dark"] .upload-area input[type="file"]::file-selector-button {
    background-color: #1b251f;
    color: #bcebd4;
    border-color: #3d5a4c;
}

/* Chat differentiation */
html[data-theme="dark"] .chat-avatar {
    background-color: #1b4234;
    color: #c0efd8;
}

html[data-theme="dark"] .admin-message .chat-avatar {
    background-color: #44381f;
    color: #f2d78e;
}

html[data-theme="dark"] .admin-message .chat-bubble {
    background-color: #17251f;
    border-color: #345244;
}

html[data-theme="dark"]
    :is(.chat-bubble .submission-artwork, .chat-bubble .feedback-attachment) {
    background-color: #131a17;
    border-color: #2e3b35;
}

html[data-theme="dark"]
    :is(
        .preserve-text,
        .chat-bubble .preserve-text,
        .file-info strong,
        .text-link,
        .footer-contact,
        .helper-card,
        .notification-panel a
    ) {
    color: #d8e2dc;
}

html[data-theme="dark"] .studio-chat .chat-message-label {
    color: #82d4ae;
}

/* Neutral chips */
html[data-theme="dark"] :is(.admin-label, .previous-version, .file-type) {
    background-color: #202923;
    color: #bac6bf;
}

/* Errors / warnings */
html[data-theme="dark"] .notice.error {
    background-color: #33181d;
    border-color: #64323a;
    color: #f3bdc5;
}

html[data-theme="dark"] #request-revision .notice {
    background-color: #15251e;
    border-color: #315141;
    color: #c9ead9;
}

/* Focus / selection / scrollbars */
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] summary:focus-visible {
    outline-color: #5cc59a;
}

html[data-theme="dark"] ::selection {
    background-color: #2d6d52;
    color: #f7fffb;
}

html[data-theme="dark"] {
    scrollbar-color: #43534b #0e1311;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0e1311;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #3b4942;
    border-color: #0e1311;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #4d5f56;
}

/* Mobile */
@media (max-width: 900px) {
    html[data-theme="dark"] .sidebar {
        background-color: #0d1210;
        border-bottom-color: #28312d;
    }
}

/* SIDEBAR PALETTE · #395743 → #102c24
   Colour-only override. Layout/geometry remains unchanged.
   ========================================================================== */

.sidebar,
html[data-theme="dark"] .sidebar,
html:not([data-theme="dark"]) .sidebar {
    background: linear-gradient(180deg, #395743 0%, #2d4938 38%, #102c24 100%);
    border-right-color: #294737;
    color: #dfe9e2;
}

/* Brand */
.sidebar .brand,
html[data-theme="dark"] .sidebar .brand,
html:not([data-theme="dark"]) .sidebar .brand {
    border-color: rgba(222, 236, 226, 0.14);
    color: #ffffff;
}

.sidebar .brand-copy strong,
html[data-theme="dark"] .sidebar .brand-copy strong,
html:not([data-theme="dark"]) .sidebar .brand-copy strong {
    color: #ffffff;
}

.sidebar .brand-copy small,
html[data-theme="dark"] .sidebar .brand-copy small,
html:not([data-theme="dark"]) .sidebar .brand-copy small {
    color: #bfd2c5;
}

/* Workspace label */
.sidebar .workspace-label,
html[data-theme="dark"] .sidebar .workspace-label,
html:not([data-theme="dark"]) .sidebar .workspace-label {
    color: #b8cdbf;
}

/* Navigation */
.sidebar .nav-item,
html[data-theme="dark"] .sidebar .nav-item,
html:not([data-theme="dark"]) .sidebar .nav-item {
    color: #d2ded6;
    border-color: transparent;
}

.sidebar .nav-item:hover:not(.active),
html[data-theme="dark"] .sidebar .nav-item:hover:not(.active),
html:not([data-theme="dark"]) .sidebar .nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar .nav-item.active,
html[data-theme="dark"] .sidebar .nav-item.active,
html:not([data-theme="dark"]) .sidebar .nav-item.active {
    background: rgba(9, 36, 28, 0.52);
    border-color: rgba(198, 229, 207, 0.24);
    color: #ffffff;
    /* box-shadow: inset 3px 0 0 #9fc6aa; */
}

.sidebar .nav-item.active .nav-icon,
html[data-theme="dark"] .sidebar .nav-item.active .nav-icon,
html:not([data-theme="dark"]) .sidebar .nav-item.active .nav-icon {
    color: #c8ead2;
}

.sidebar .nav-arrow,
html[data-theme="dark"] .sidebar .nav-arrow,
html:not([data-theme="dark"]) .sidebar .nav-arrow {
    color: #a8cfb4;
}

.sidebar nav[aria-label="Administration"],
html[data-theme="dark"] .sidebar nav[aria-label="Administration"],
html:not([data-theme="dark"]) .sidebar nav[aria-label="Administration"] {
    border-color: rgba(218, 233, 222, 0.14);
}

/* Sidebar promotional note */
.sidebar-note,
html[data-theme="dark"] .sidebar-note,
html:not([data-theme="dark"]) .sidebar-note {
    /* background: rgba(7, 30, 23, 0.18); */
    border-color: rgba(211, 231, 216, 0.12);
}

.sidebar-note .tiny-label,
html[data-theme="dark"] .sidebar-note .tiny-label,
html:not([data-theme="dark"]) .sidebar-note .tiny-label {
    color: #a9c9b2;
}

.sidebar-note p,
html[data-theme="dark"] .sidebar-note p,
html:not([data-theme="dark"]) .sidebar-note p {
    color: #f1f6f2;
}

.sidebar-note > span:last-child,
html[data-theme="dark"] .sidebar-note > span:last-child,
html:not([data-theme="dark"]) .sidebar-note > span:last-child {
    color: #adbbb1;
}

/* User block */
.sidebar .user-block,
html[data-theme="dark"] .sidebar .user-block,
html:not([data-theme="dark"]) .sidebar .user-block {
    border-color: rgba(218, 233, 222, 0.14);
}

.sidebar .user-block strong,
html[data-theme="dark"] .sidebar .user-block strong,
html:not([data-theme="dark"]) .sidebar .user-block strong {
    color: #ffffff;
}

.sidebar .user-block small,
html[data-theme="dark"] .sidebar .user-block small,
html:not([data-theme="dark"]) .sidebar .user-block small {
    color: #b8c7bd;
}

.sidebar .avatar,
html[data-theme="dark"] .sidebar .avatar,
html:not([data-theme="dark"]) .sidebar .avatar {
    background: #dce9df;
    border-color: rgba(255, 255, 255, 0.34);
    color: #234838;
}

/* Sign out */
.sidebar .signout,
html[data-theme="dark"] .sidebar .signout,
html:not([data-theme="dark"]) .sidebar .signout {
    color: #c5d3ca;
}

.sidebar .signout:hover,
html[data-theme="dark"] .sidebar .signout:hover,
html:not([data-theme="dark"]) .sidebar .signout:hover {
    color: #ffffff;
}

/* Mobile keeps the same branded gradient instead of reverting. */
@media (max-width: 900px) {
    .sidebar,
    html[data-theme="dark"] .sidebar,
    html:not([data-theme="dark"]) .sidebar {
        background: linear-gradient(90deg, #395743 0%, #102c24 100%);
        border-bottom-color: #294737;
    }
}

/* TOPBAR THEME ICON · RIGHTMOST
   Keeps theme-mode.js compatible: the real text may change, while the
   visible moon/sun icon is rendered by CSS and cannot be overwritten.
   ========================================================================== */

.topbar .notification-center {
    margin-left: auto;
}

/* Override the old .topbar .theme-toggle auto margins. */
.topbar .theme-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 42px;

    margin-left: 10px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border-radius: 9px;
    font-size: 0 !important;
    line-height: 0;
    cursor: pointer;
}

/* Bold icon body */
.topbar .theme-toggle::before {
    content: "";
    display: block;
    width: 28px;
    height: 28px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 21px 21px;
    mask-size: 21px 21px;
}

/* Light mode -> show bold moon (action: switch to dark). */
html:not([data-theme="dark"]) .topbar .theme-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.7 15.1A8.25 8.25 0 0 1 8.9 3.3a9.25 9.25 0 1 0 11.8 11.8Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.7 15.1A8.25 8.25 0 0 1 8.9 3.3a9.25 9.25 0 1 0 11.8 11.8Z'/%3E%3C/svg%3E");
}

/* Dark mode -> show bold sun (action: switch to light). */
html[data-theme="dark"] .topbar .theme-toggle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='black'%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M11 1h2v4h-2zM11 19h2v4h-2zM19 11h4v2h-4zM1 11h4v2H1zM17.66 4.93l1.41 1.41-2.83 2.83-1.41-1.41zM4.93 17.66l1.41 1.41 2.83-2.83-1.41-1.41zM17.66 19.07l1.41-1.41-2.83-2.83-1.41 1.41zM4.93 6.34l1.41-1.41 2.83 2.83-1.41 1.41z'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='black'%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M11 1h2v4h-2zM11 19h2v4h-2zM19 11h4v2h-4zM1 11h4v2H1zM17.66 4.93l1.41 1.41-2.83 2.83-1.41-1.41zM4.93 17.66l1.41 1.41 2.83-2.83-1.41-1.41zM17.66 19.07l1.41-1.41-2.83-2.83-1.41 1.41zM4.93 6.34l1.41-1.41 2.83 2.83-1.41 1.41z'/%3E%3C/g%3E%3C/svg%3E");
}

html:not([data-theme="dark"]) .topbar .theme-toggle {
    background: #ffffff;
    border-color: #d8e1d3;
    color: #284732;
}

html:not([data-theme="dark"]) .topbar .theme-toggle:hover {
    background: #f1f4ef;
    border-color: #bfcdbf;
    color: #173c2e;
}

html[data-theme="dark"] .topbar .theme-toggle {
    background: #1b221e;
    border-color: #36423c;
    color: #bfe8d3;
}

html[data-theme="dark"] .topbar .theme-toggle:hover {
    background: #232c27;
    border-color: #4a5d53;
    color: #ffffff;
}

/* Compact topbar: notification remains usable; icon stays rightmost. */
@media (max-width: 600px) {
    .topbar .theme-toggle {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        margin-left: 7px !important;
        padding: 0 !important;
    }

    .topbar .theme-toggle::before {
        width: 19px;
        height: 19px;
        -webkit-mask-size: 19px 19px;
        mask-size: 19px 19px;
    }
}

/* RESPONSIVE SIDEBAR FIX · MOBILE HEADER
   portal.css changes the sidebar into a horizontal row below 900px.
   This final override makes the current sidebar a stable two-level mobile
   header: brand first, navigation beneath it, with safe horizontal scrolling.
   Desktop geometry and theme colours remain unchanged.
   ========================================================================== */

@media (max-width: 900px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .sidebar,
    html[data-theme="dark"] .sidebar,
    html:not([data-theme="dark"]) .sidebar {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        height: auto !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0 !important;

        padding: 13px 16px 11px !important;
        overflow: hidden !important;

        border-right: 0 !important;
        border-bottom: 1px solid #294737;
        box-sizing: border-box;
    }

    /* Brand occupies its own row and can never collide with navigation. */
    .sidebar .brand,
    html[data-theme="dark"] .sidebar .brand,
    html:not([data-theme="dark"]) .sidebar .brand {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        margin: 0 0 11px !important;
        padding: 0 !important;
        border: 0 !important;
        gap: 9px !important;
    }

    .sidebar .brand-logo {
        flex: 0 0 auto !important;
        width: 34px !important;
        height: 34px !important;
    }

    .sidebar .brand-copy {
        min-width: 0 !important;
        max-width: calc(100% - 44px) !important;
        overflow: hidden !important;
    }

    .sidebar .brand-copy strong {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 1.1rem !important;
        line-height: 1.15 !important;
    }

    .sidebar .brand-copy small {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 0.68rem !important;
    }

    /*
     * Every nav section gets its own scrollable row.
     * This keeps all existing routes available without a new hamburger/JS.
     */
    .sidebar > nav,
    .sidebar nav[aria-label="Main navigation"],
    .sidebar nav[aria-label="Printer account"],
    .sidebar nav[aria-label="Administration"] {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 0 2px !important;
        gap: 6px !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .sidebar > nav::-webkit-scrollbar,
    .sidebar nav[aria-label="Main navigation"]::-webkit-scrollbar,
    .sidebar nav[aria-label="Printer account"]::-webkit-scrollbar,
    .sidebar nav[aria-label="Administration"]::-webkit-scrollbar {
        display: none;
    }

    .sidebar > nav + nav {
        margin-top: 6px !important;
    }

    .sidebar .nav-item,
    html[data-theme="dark"] .sidebar .nav-item,
    html:not([data-theme="dark"]) .sidebar .nav-item {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;

        width: auto !important;
        min-width: max-content !important;
        min-height: 38px !important;

        margin: 0 !important;
        padding: 8px 11px !important;
        border-radius: 8px !important;

        font-size: 0.78rem !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    .sidebar .nav-item .nav-icon {
        flex: 0 0 auto !important;
        width: 16px !important;
        height: 16px !important;
    }

    /* The external-link arrow wastes useful mobile width. */
    .sidebar .nav-arrow {
        display: none !important;
    }

    /*
     * Desktop-only sidebar information is hidden on the compact header.
     * Sign out remains available at the right of the brand row.
     */
    .sidebar .workspace-label,
    .sidebar-note,
    .sidebar .user-block {
        display: none !important;
    }

    .sidebar > form {
        position: absolute !important;
        top: 13px !important;
        right: 16px !important;
        z-index: 3 !important;
        margin: 0 !important;
    }

    .sidebar > form .signout {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        min-height: 34px !important;
        margin: 0 !important;
        padding: 6px 10px !important;

        border: 1px solid rgba(225, 239, 229, 0.18) !important;
        border-radius: 7px !important;
        background: rgba(8, 31, 24, 0.22) !important;

        color: #d9e7dd !important;
        font-size: 0.72rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .sidebar > form .signout:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }

    .sidebar > form .signout span {
        display: none !important;
    }

    /* Leave room for the sign-out button so brand text cannot run under it. */
    .sidebar .brand {
        padding-right: 76px !important;
    }

    .app-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* Phone */
@media (max-width: 600px) {
    .sidebar,
    html[data-theme="dark"] .sidebar,
    html:not([data-theme="dark"]) .sidebar {
        padding: 11px 12px 10px !important;
    }

    .sidebar .brand {
        margin-bottom: 9px !important;
        padding-right: 68px !important;
        gap: 8px !important;
    }

    .sidebar .brand-logo {
        width: 31px !important;
        height: 31px !important;
    }

    .sidebar .brand-copy strong {
        font-size: 1rem !important;
    }

    .sidebar .brand-copy small {
        font-size: 0.62rem !important;
    }

    .sidebar > form {
        top: 11px !important;
        right: 12px !important;
    }

    .sidebar > form .signout {
        min-height: 31px !important;
        padding: 5px 8px !important;
        font-size: 0.68rem !important;
    }

    .sidebar .nav-item,
    html[data-theme="dark"] .sidebar .nav-item,
    html:not([data-theme="dark"]) .sidebar .nav-item {
        min-height: 35px !important;
        padding: 7px 9px !important;
        font-size: 0.73rem !important;
    }

    .sidebar .nav-item .nav-icon {
        width: 15px !important;
        height: 15px !important;
    }
}

/* Very narrow phones: keep only the brand name, not its subtitle. */
@media (max-width: 390px) {
    .sidebar .brand-copy small {
        display: none !important;
    }

    .sidebar .brand {
        min-height: 32px !important;
    }
}

/* MOBILE SIDEBAR DRAWER · OVERLAY
   Final responsive authority for the workspace sidebar.
   Desktop sidebar remains unchanged.
   ========================================================================== */

/* Drawer controls are mobile-only. */
.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    body.sidebar-open {
        overflow: hidden !important;
        touch-action: none;
    }

    /* Topbar toggle */
    .topbar {
        position: relative;
        z-index: 80;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .sidebar-toggle {
        display: inline-grid !important;
        place-items: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        padding: 0;
        margin: 0;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: var(--white);
        color: var(--ink);
        cursor: pointer;
    }

    .sidebar-toggle:hover {
        background: #f1f4ef;
    }

    html[data-theme="dark"] .sidebar-toggle {
        background: #1b221e;
        border-color: #36423c;
        color: #dce5df;
    }

    html[data-theme="dark"] .sidebar-toggle:hover {
        background: #232c27;
        color: #fff;
    }

    .topbar-breadcrumb {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Sidebar becomes an off-canvas drawer. */
    .sidebar,
    html[data-theme="dark"] .sidebar,
    html:not([data-theme="dark"]) .sidebar {
        position: fixed !important;
        z-index: 1200 !important;
        inset: 0 auto 0 0 !important;

        width: min(320px, 88vw) !important;
        max-width: 88vw !important;
        height: 100dvh !important;
        min-height: 100vh !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;

        padding: 22px 18px 18px !important;
        gap: 0 !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;

        border-right: 1px solid #294737 !important;
        border-bottom: 0 !important;

        transform: translate3d(-104%, 0, 0) !important;
        visibility: hidden;
        pointer-events: none;

        box-shadow: 18px 0 46px rgba(5, 18, 14, 0.28);
        transition:
            transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
            visibility 220ms;
    }

    body.sidebar-open .sidebar {
        transform: translate3d(0, 0, 0) !important;
        visibility: visible;
        pointer-events: auto;
    }

    /* Brand */
    .sidebar .brand,
    html[data-theme="dark"] .sidebar .brand,
    html:not([data-theme="dark"]) .sidebar .brand {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 0 28px !important;
        padding: 0 46px 0 0 !important;
        border: 0 !important;
        gap: 10px !important;
    }

    .sidebar .brand-logo {
        flex: 0 0 34px !important;
        width: 34px !important;
        height: 34px !important;
    }

    .sidebar .brand-copy {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .sidebar .brand-copy strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Close button */
    .sidebar-close {
        position: absolute;
        z-index: 2;
        top: 18px;
        right: 16px;

        display: inline-grid !important;
        place-items: center;

        width: 38px;
        height: 38px;
        padding: 0;

        border: 1px solid rgba(226, 239, 229, 0.18);
        border-radius: 9px;
        background: rgba(7, 29, 22, 0.2);
        color: #f1f6f2;
        cursor: pointer;
    }

    .sidebar-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* Restore real vertical navigation inside drawer. */
    .sidebar .workspace-label {
        display: block !important;
        margin: 0 10px 12px !important;
    }

    .sidebar > nav,
    .sidebar nav[aria-label="Main navigation"],
    .sidebar nav[aria-label="Printer account"],
    .sidebar nav[aria-label="Administration"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
        white-space: normal !important;
    }

    .sidebar nav[aria-label="Administration"] {
        margin-top: 14px !important;
        padding-top: 14px !important;
        border-top: 1px solid rgba(218, 233, 222, 0.14) !important;
    }

    .sidebar .nav-item,
    html[data-theme="dark"] .sidebar .nav-item,
    html:not([data-theme="dark"]) .sidebar .nav-item {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;

        margin: 0 0 7px !important;
        padding: 11px 12px !important;
        border-radius: 8px !important;

        font-size: 0.86rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .sidebar .nav-item .nav-icon {
        flex: 0 0 auto !important;
        width: 18px !important;
        height: 18px !important;
    }

    .sidebar .nav-arrow {
        display: inline !important;
        margin-left: auto;
    }

    /* Keep the drawer compact but useful. */
    .sidebar-note {
        display: none !important;
    }

    .sidebar .user-block {
        display: flex !important;
        align-items: center !important;
        margin-top: auto !important;
        padding-top: 18px !important;
        border-top: 1px solid rgba(218, 233, 222, 0.14) !important;
    }

    .sidebar > form {
        position: static !important;
        margin: 10px 0 0 !important;
    }

    .sidebar > form .signout {
        display: flex !important;
        width: 100% !important;
        min-height: 40px !important;
        align-items: center !important;
        justify-content: space-between !important;

        padding: 9px 11px !important;
        border: 1px solid rgba(225, 239, 229, 0.16) !important;
        border-radius: 8px !important;
        background: rgba(7, 29, 22, 0.16) !important;
        color: #d7e4da !important;
    }

    .sidebar > form .signout span {
        display: inline !important;
    }

    /* Backdrop */
    .sidebar-backdrop {
        position: fixed;
        z-index: 1100;
        inset: 0;

        display: block !important;
        width: 100%;
        height: 100%;

        padding: 0;
        border: 0;
        background: rgba(5, 12, 9, 0.54);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);

        transition:
            opacity 180ms ease,
            visibility 180ms ease;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Main page never reserves sidebar width on mobile. */
    .app-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }
}

/* Narrow phone topbar */
@media (max-width: 600px) {
    .topbar {
        gap: 7px;
    }

    .sidebar-toggle {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .topbar-breadcrumb {
        font-size: 11px !important;
    }

    /* Save topbar width: bell icon only. */
    .notification-bell {
        display: inline-grid !important;
        place-items: center !important;
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 !important;
    }

    .notification-bell > span {
        display: none !important;
    }

    .sidebar,
    html[data-theme="dark"] .sidebar,
    html:not([data-theme="dark"]) .sidebar {
        width: min(300px, 90vw) !important;
        max-width: 90vw !important;
        padding: 18px 15px 15px !important;
    }

    .sidebar-close {
        top: 14px;
        right: 13px;
        width: 36px;
        height: 36px;
    }

    .sidebar .brand {
        margin-bottom: 24px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-backdrop {
        transition: none !important;
    }
}

/* Shared studio status in the workspace topbar. */
.topbar .studio-status {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
}

.topbar:has(.studio-status) .notification-center {
    margin-left: 0;
}

.studio-status-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1px solid #f5d68b;
    border-radius: 999px;
    background: #fffbeb;
    color: #a3490d;
    font-size: 13px;
    line-height: 1.5;
    list-style: none;
    cursor: pointer;
}

.studio-status-pill::-webkit-details-marker {
    display: none;
}

.studio-status-pill:focus-visible {
    outline: 2px solid #56806c;
    outline-offset: 3px;
}

.studio-status-label {
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}

.studio-status-count {
    color: inherit;
    white-space: nowrap;
}

.studio-status-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-radius: 50%;
    background: #f59e0b;
}

.studio-status-dot.is-available {
    background: #10b981;
}

.studio-status-pill.is-available {
    border-color: #b7e8d2;
    background: #ecfdf5;
    color: #047857;
}
.topbar-contact {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    margin-left: auto;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--muted) 3%, var(--white));
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.topbar-contact svg {
    color: var(--green);
}
.topbar-contact:hover {
    border-color: var(--green);
    color: var(--ink);
}
.topbar-contact:focus-visible {
    outline: 2px solid #56806c;
    outline-offset: 3px;
}
.topbar:has(.studio-status) .topbar-contact {
    margin-left: 0;
}
.topbar:has(.topbar-contact) .notification-center {
    margin-left: 0;
}
@media (min-width: 901px) {
    .topbar:has(.studio-status) .topbar-contact {
        margin-left: 14px;
    }
    .topbar:has(.topbar-contact) .notification-center {
        margin-left: 8px;
    }
}
.topbar .notification-bell {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
}
.topbar .notification-bell > span {
    display: none;
}
.topbar .notification-bell svg {
    width: 23px;
    height: 23px;
}
.topbar .notification-bell b {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 9px;
    height: 9px;
    min-width: 0;
    padding: 0;
    border-radius: 50%;
    background: #ef4444;
    color: transparent;
    font-size: 0;
    box-shadow: 0 0 0 2px var(--white);
}
html[data-theme="dark"] .studio-status-pill {
    border-color: #70562f;
    background: #322816;
    color: #f3cb83;
}
html[data-theme="dark"] .studio-status-pill.is-available {
    border-color: #265e4c;
    background: #123c2d;
    color: #8ce7be;
}

@media (max-width: 600px) {
    .topbar-contact {
        width: 36px;
        height: 36px;
        min-height: 36px;
        padding: 0;
        justify-content: center;
    }
    .topbar-contact > span {
        display: none;
    }
}

.studio-status-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 100;
    width: min(440px, calc(100vw - 32px));
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 12px 32px rgb(0 0 0 / 14%);
    font-size: 13px;
}

@media (max-width: 900px) {
    html .topbar:has(.studio-status) {
        flex-wrap: wrap;
        height: auto;
        min-height: 68px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .topbar .studio-status {
        order: 5;
        flex-basis: 100%;
        margin-left: 0;
    }

    .studio-status-pill {
        width: fit-content;
        max-width: 100%;
        flex-wrap: wrap;
    }

    .studio-status-popover {
        right: auto;
        left: 0;
    }
}
/* Jobs overview banner. */
.jobs-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 128px;
    padding: 24px 26px;
    border: 1px solid #155340;
    border-radius: 16px;
    background: #03291f;
    box-shadow: 0 3px 6px rgb(0 0 0 / 12%);
    color: #fff;
}

.jobs-banner-icon {
    display: grid;
    place-items: center;
    flex: 0 0 60px;
    height: 60px;
    border: 1px solid #17654e;
    border-radius: 11px;
    background: #06382b;
    color: #0ce3a1;
}

.jobs-banner-copy {
    flex: 1 1 270px;
    min-width: 0;
}

.jobs-banner-meta,
.jobs-banner-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.jobs-banner-meta {
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.jobs-banner-eyebrow {
    color: #02df9a;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
}

.jobs-banner-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px;
    border: 1px solid #19755a;
    border-radius: 999px;
    background: #073e30;
    color: #20e1ae;
    font-size: 12px;
    white-space: nowrap;
}

.jobs-banner h1 {
    flex-shrink: 0;
    margin: 0 !important;
    color: #fff !important;
    font-size: 27px !important;
    line-height: 1.2;
    letter-spacing: -0.8px;
    text-transform: uppercase;
}

.jobs-banner-heading p {
    overflow: hidden;
    margin: 0;
    color: #84bdc0;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jobs-banner-stats {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 1px solid #12533f;
    border-radius: 11px;
    background: #022219;
}

.jobs-banner-stats a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 5px;
    color: #95c8c9;
    font-size: 12px;
    white-space: nowrap;
}

.jobs-banner-stats a:hover {
    background: #0c4435;
    color: #fff;
}

.jobs-banner-stats strong {
    color: #fff;
}

.jobs-banner-stats .jobs-banner-total {
    border: 1px solid #185841;
    background: #083a2d;
}

.jobs-banner-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.jobs-banner-dot.is-submitted {
    background: #fbbf24;
}
.jobs-banner-dot.is-progress {
    background: #38bdf8;
}
.jobs-banner-dot.is-completed {
    background: #10c99a;
}
.jobs-banner-dot.is-revisions {
    background: #c084fc;
}

.jobs-banner-action {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 10px;
    background: #0dcc91;
    color: #00291f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.jobs-banner-action:hover {
    background: #36e4ae;
}
.jobs-banner-action span {
    font-size: 23px;
    line-height: 1;
}
.jobs-banner a:focus-visible {
    outline: 2px solid #67e8b9;
    outline-offset: 3px;
}

.job-price {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.job-price-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.job-price-summary::-webkit-details-marker {
    display: none;
}
.job-price-summary:hover {
    background: color-mix(in srgb, var(--green) 4%, var(--white));
}
.job-price-summary:focus-visible {
    outline: 3px solid #6e9f89;
    outline-offset: -3px;
}

.job-price-icon {
    display: grid;
    flex: 0 0 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--green) 7%, var(--white));
    color: var(--green);
    font-size: 21px;
    font-weight: 600;
}

.job-price-heading {
    flex: 1;
    min-width: 0;
}
.job-price-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}
.job-price-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.job-price-overview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.job-price-amount {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.4px;
    white-space: nowrap;
}

.job-price-status {
    padding: 4px 9px;
    border: 1px solid #efdcae;
    border-radius: 999px;
    background: #faf2df;
    color: #8a6b2d;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.job-price-status.is-accepted {
    border-color: #b7e8d2;
    background: #ecfdf5;
    color: #047857;
}

.job-detail-page .job-price-summary {
    gap: 10px;
    padding: 14px 18px;
}
.job-detail-page .job-price-icon {
    flex-basis: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 18px;
}
.job-detail-page .job-price-context {
    padding: 12px 18px;
}
.job-brief-summary {
    cursor: pointer;
    list-style: none;
}
.job-brief-summary::-webkit-details-marker {
    display: none;
}
.job-brief-summary:hover {
    background: color-mix(in srgb, var(--green) 4%, var(--white));
}
.job-brief-summary:focus-visible {
    outline: 3px solid #6e9f89;
    outline-offset: -3px;
}
.job-brief-chevron {
    color: var(--muted);
}
.job-brief[open] > .job-brief-summary {
    border-bottom: 1px solid var(--line);
}
.job-brief[open] .job-brief-chevron {
    transform: rotate(180deg);
}
.job-detail-page .job-price-discussion {
    margin: 0 14px 14px;
}
.job-detail-page .job-price-discussion article {
    padding-top: 12px;
    padding-bottom: 12px;
}
.job-detail-page .job-detail-next-step {
    padding-top: 12px;
    padding-bottom: 12px;
}
.job-detail-page .panel {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    box-shadow: none;
}
.job-detail-page .section-heading {
    margin-bottom: 12px;
    gap: 10px;
}
.job-detail-page .job-detail-sidebar h2 {
    margin: 0;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.6;
    text-transform: uppercase;
    color: var(--muted);
}
.job-detail-page .job-detail-sidebar .job-partner-name {
    font-size: 15px !important;
    letter-spacing: -0.2px;
    text-transform: none;
    color: var(--ink);
}

.artwork-release-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
}
.artwork-release-heading .artwork-release-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.artwork-release-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.5px;
}
.artwork-release-eyebrow > span:first-child {
    padding: 4px 7px;
    border-radius: 4px;
    background: var(--green);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
}
.artwork-release-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.artwork-release-status {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green);
    font-size: 11px;
    font-weight: 600;
}
.job-detail-page .latest-artwork > .artwork-delivery {
    margin: 0;
    padding: 0;
    border: 0;
}
.artwork-release-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--green) 4%, var(--white));
    color: var(--muted);
}
.artwork-release-notice.is-approved {
    background: color-mix(in srgb, var(--green) 8%, var(--white));
    color: var(--green);
}
.artwork-release-notice > span {
    font-size: 17px;
    line-height: 1.3;
}
.artwork-release-notice p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}
.artwork-delivery-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.artwork-version-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.artwork-version-line h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}
.artwork-delivery-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}
.artwork-delivery-meta p strong {
    color: var(--ink);
    font-weight: 600;
}
.artwork-zip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 7px;
    background: var(--green);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
}
.artwork-zip:hover {
    filter: brightness(1.12);
}
.artwork-zip:focus-visible {
    outline: 3px solid #6e9f89;
    outline-offset: 3px;
}
.artwork-delivery-content {
    padding: 16px 18px;
}
.artwork-delivery-note {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
}
.artwork-files {
    display: grid;
    gap: 10px;
}
.artwork-file {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--green) 2%, var(--white));
}
.artwork-signoff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--green) 25%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--green) 7%, var(--white));
}
.artwork-signoff-icon {
    display: grid;
    flex: 0 0 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
}
.artwork-signoff > div {
    flex: 1;
    min-width: 0;
}
.artwork-signoff strong {
    font-size: 12px;
    line-height: 1.6;
}
.artwork-signoff p {
    margin: 3px 0 0;
    color: var(--green);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.artwork-signoff-label {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--green);
    font-size: 10px;
}
.artwork-specifications {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.artwork-specifications-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 12px;
}
.artwork-specifications-heading h3 {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.artwork-specifications-heading span {
    color: var(--muted);
    font-size: 10px;
}
.artwork-specifications dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 0;
}
.artwork-specifications dl > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: color-mix(in srgb, var(--green) 3%, var(--white));
}
.artwork-specifications dt {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}
.artwork-specifications dd {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.job-detail-page .consent-row input[type="checkbox"] {
    width: auto;
}

@media (max-width: 600px) {
    .artwork-release-heading,
    .artwork-delivery-meta,
    .artwork-delivery-content {
        padding: 14px;
    }
    .artwork-zip {
        width: 100%;
    }
    .artwork-release-status {
        max-width: 100%;
    }
    .artwork-signoff-label {
        margin-left: 36px;
    }
}
.job-detail-page .job-detail-sidebar p {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.6;
}
.job-detail-page .sidebar-editor {
    margin-top: 12px;
    padding-top: 12px;
}
.job-detail-page .file-row {
    gap: 12px;
    margin: 0;
    padding: 2px 0;
    border: 0;
}
.job-detail-page .file-thumbnail {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
}
.job-detail-page .file-info {
    min-width: 0;
}
.job-detail-page .file-info strong {
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.job-detail-page .file-info small {
    margin-top: 3px;
    font-size: 11px;
}
.job-detail-page .file-actions {
    gap: 8px;
}
.job-detail-page .file-actions a {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
}
.job-detail-page .file-actions .file-preview-link {
    border: 1px solid var(--line);
    color: var(--muted);
}
.job-detail-page .file-actions .download-label {
    background: var(--green);
    color: var(--white);
}
.job-detail-page .studio-chat {
    padding: 0;
}
.job-detail-page .studio-chat-heading {
    padding: 16px 18px;
    gap: 10px;
}
.job-detail-page .studio-chat-heading h2 {
    margin: 0 0 4px;
    font-size: 16px;
}
.job-detail-page .studio-chat-heading .field-help {
    font-size: 12px;
    line-height: 1.5;
}
.job-detail-page .studio-chat-thread {
    padding: 14px 18px;
}
.job-detail-page .chat-empty {
    margin: 0;
    padding: 20px 16px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--green) 2%, var(--white));
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}
.job-detail-page .job-cancelled-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 12px;
}
.job-cancelled-icon {
    display: grid;
    flex: 0 0 32px;
    height: 32px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
}
.job-cancelled-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.job-cancelled-meta strong {
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.job-cancelled-meta time {
    padding: 2px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, currentColor 8%, transparent);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.job-detail-page .job-cancelled-notice p {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.job-cancellation-controls details {
    margin-top: 12px;
}
.job-cancellation-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #f0b9bc;
    border-radius: 7px;
    color: #b42335;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.job-cancellation-toggle::-webkit-details-marker {
    display: none;
}
.job-cancellation-toggle:hover {
    background: #fff1f2;
}
.job-cancellation-toggle:focus-visible {
    outline: 3px solid #e6a2ab;
    outline-offset: 3px;
}
html[data-theme="dark"] .job-cancellation-toggle {
    border-color: #753c46;
    color: #fda4af;
}
html[data-theme="dark"] .job-cancellation-toggle:hover {
    background: #3c1d26;
}

@media (max-width: 600px) {
    .job-detail-page .job-price-heading {
        flex-basis: calc(100% - 74px);
    }
    .job-detail-page .job-price-overview {
        padding-left: 44px;
    }
    .job-detail-page .file-row {
        flex-wrap: wrap;
    }
    .job-detail-page .file-info {
        flex: 1 1 calc(100% - 54px);
    }
    .job-detail-page .file-actions {
        margin-left: 54px;
    }
    .job-detail-page .job-cancelled-notice {
        padding: 12px;
    }
}
.job-price-toggle {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}
.job-price-hide,
.job-price[open] .job-price-show {
    display: none;
}
.job-price[open] .job-price-hide {
    display: inline;
}
.job-price[open] .job-price-toggle svg {
    transform: rotate(180deg);
}
.job-price-body {
    border-top: 1px solid var(--line);
}
.job-price-context {
    margin: 0;
    padding: 18px 24px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.job-price-discussion {
    margin: 0 20px 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--green) 2%, var(--white));
}
html[data-theme="dark"] .job-price-status {
    border-color: #70562f;
    background: #322816;
    color: #f3cb83;
}
html[data-theme="dark"] .job-price-status.is-accepted {
    border-color: #265e4c;
    background: #123c2d;
    color: #8ce7be;
}

@media (max-width: 600px) {
    .job-price-summary {
        flex-wrap: wrap;
        gap: 10px;
        padding: 16px;
    }
    .job-price-heading {
        flex-basis: calc(100% - 90px);
    }
    .job-price-overview {
        justify-content: flex-start;
        padding-left: 52px;
    }
    .job-price-toggle {
        margin-left: auto;
    }
    .job-price-toggle > span {
        display: none !important;
    }
    .job-price-context {
        padding: 16px;
    }
    .job-price-discussion {
        margin: 0 12px 16px;
    }
}

@media (max-width: 1400px) {
    .jobs-banner {
        flex-wrap: wrap;
    }
    .jobs-banner-copy {
        flex-basis: calc(100% - 90px);
    }
    .jobs-banner-stats {
        flex: 1 1 auto;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .jobs-banner {
        gap: 14px;
        padding: 18px 16px;
    }
    .jobs-banner-icon {
        flex-basis: 42px;
        height: 42px;
    }
    .jobs-banner-copy {
        flex-basis: calc(100% - 60px);
    }
    .jobs-banner-heading {
        display: block;
    }
    .jobs-banner h1 {
        font-size: 22px !important;
    }
    .jobs-banner-heading p {
        margin-top: 5px;
        white-space: normal;
    }
    .jobs-banner-eyebrow {
        font-size: 10px;
    }
    .jobs-banner-meta {
        gap: 6px;
    }
    .jobs-banner-stats {
        width: 100%;
    }
    .jobs-banner-action {
        width: 100%;
    }
}
