:root {
    --portal-navy: #0f1b43;
    --portal-navy-2: #172654;
    --portal-ink: #111c42;
    --portal-muted: #66738f;
    --portal-line: #d9e2f0;
    --portal-surface: #fff;
    --portal-soft: #f4f7fc;
    --portal-blue: #0877f9;
    --portal-cyan: #0877f9;
    --portal-green: #18a56d;
    --portal-amber: #e6a11a;
    --portal-red: #c83f4d;
    --portal-sidebar: 220px;
    --portal-topbar: 76px;
    --portal-shadow: 0 10px 28px rgba(28, 57, 105, .07);
}

body.portal-body,
body.portal-body * {
    letter-spacing: 0;
}

body.portal-app-body {
    color: var(--portal-ink);
    background: #f6f8fc;
}

.portal-desktop-header {
    position: fixed;
    z-index: 90;
    inset: 0 0 auto 0;
    display: flex;
    min-height: var(--portal-topbar);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--portal-line);
    padding: 10px 28px;
    background: #fff;
}

.portal-desktop-actions,
.portal-top-help,
.portal-top-messages,
.portal-top-account {
    display: flex;
    align-items: center;
}

.portal-desktop-actions { gap: 20px; }
.portal-desktop-actions form { margin: 0; }
.portal-top-help,
.portal-top-messages { gap: 8px; color: #465573; font-size: 15px; font-weight: 700; }
.portal-top-help svg,
.portal-top-messages svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-top-messages { position: relative; text-decoration: none; }
.portal-top-messages.is-active,
.portal-top-messages:hover { color: var(--portal-blue); }
.portal-top-messages .portal-nav-notification { margin-left: 2px; }
.portal-top-account { min-width: 0; gap: 10px; }
.portal-top-account > span:last-child { min-width: 0; }
.portal-top-account b,
.portal-top-account small { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-top-account b { font-size: 15px; }
.portal-top-account small { margin-top: 2px; color: var(--portal-muted); font-size: 13px; }

.portal-brand { gap: 10px; color: var(--portal-navy); }
.portal-brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 8px;
    color: #fff;
    background: var(--portal-navy);
    box-shadow: none;
}
.portal-brand b { font-size: 16px; }
.portal-brand small { margin-top: 2px; color: var(--portal-blue); font-size: 11px; }
.portal-user-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 50%;
    color: #fff;
    background: var(--portal-navy);
}
.portal-logout-button {
    width: 38px;
    height: 38px;
    border-color: var(--portal-line);
    border-radius: 8px;
    color: #52617e;
    background: #fff;
}
.portal-logout-button:hover { border-color: #aebbd0; color: var(--portal-blue); background: #f4f7fd; }

.portal-sidebar {
    inset: var(--portal-topbar) auto 0 0;
    width: var(--portal-sidebar);
    padding: 22px 14px 18px;
    color: var(--portal-ink);
    background: #fff;
    box-shadow: none;
    border-right: 1px solid var(--portal-line);
}
.portal-sidebar::before { display: none; }
.portal-sidebar-head { display: none; }
.portal-company-card {
    margin: 0 3px 24px;
    border-color: #dbe4f1;
    border-radius: 8px;
    padding: 11px;
    background: #f6f8fc;
}
.portal-company-avatar { border-radius: 8px; color: var(--portal-blue); background: #e5f1ff; }
.portal-company-card small { color: #7a86a0; font-size: 12px; }
.portal-company-card b { color: var(--portal-navy); font-size: 15px; }
.portal-nav { gap: 5px; }
.portal-nav-label { margin: 1px 12px 8px; color: #8b97ad; font-size: 11px; }
.portal-nav-link,
.portal-nav-link-primary {
    min-height: 48px;
    margin-top: 0;
    border: 0;
    border-radius: 6px;
    padding: 10px 12px;
    color: #465573;
    background: transparent;
    box-shadow: none;
    font-size: 15px;
}
.portal-nav-link:hover,
.portal-nav-link-primary:hover { color: var(--portal-blue); background: #f0f6ff; transform: none; }
.portal-nav-link.is-active,
.portal-nav-link-primary.is-active {
    border-color: transparent;
    color: var(--portal-blue);
    background: #eaf3ff;
}
.portal-nav-link.is-active::before {
    inset: 0 auto 0 -14px;
    width: 3px;
    border-radius: 0;
    background: var(--portal-blue);
}
.portal-nav-notification {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    margin-left: auto;
    border-radius: 10px;
    padding: 0 6px;
    color: #fff;
    background: #dc2626;
    font-size: 11px;
    font-weight: 900;
}
.portal-sidebar-help {
    border-color: var(--portal-line);
    border-radius: 8px;
    background: #f6f8fc;
}
.portal-sidebar-help-icon { border-radius: 7px; color: var(--portal-blue); background: #e6f1ff; }
.portal-sidebar-help b { color: var(--portal-navy); }
.portal-sidebar-help small { color: var(--portal-muted); }
.portal-sidebar-account { display: none; }

.portal-main {
    min-height: 100vh;
    margin-left: var(--portal-sidebar);
    padding-top: var(--portal-topbar);
}
.portal-shell {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 30px 30px 54px;
}
.portal-footer {
    width: calc(100% - 60px);
    max-width: 1420px;
    min-height: 60px;
    color: #7c88a0;
}

.portal-btn {
    min-height: 46px;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 15px;
}
.portal-btn:hover:not(:disabled) { transform: none; }
.portal-btn-primary { color: #fff; background: var(--portal-blue); box-shadow: 0 7px 18px rgba(8, 119, 249, .18); }
.portal-btn-primary:hover:not(:disabled) { background: #0069e6; }
.portal-btn-secondary { border-color: #bdd3ef; color: #075fc7; background: #fff; }
.portal-btn-secondary:hover:not(:disabled) { background: #eef6ff; }
.portal-notice { border-radius: 6px; }
.portal-eyebrow { margin-bottom: 7px; color: #0873e9; font-size: 12px; }
.portal-page-head { align-items: center; gap: 24px; margin-bottom: 24px; }
.portal-page-head h1 { font-size: 34px; line-height: 1.12; }
.portal-page-head p { margin-top: 7px; color: var(--portal-muted); font-size: 15px; line-height: 1.5; }
.portal-page-head-compact { align-items: flex-start; }
.portal-back-link { margin-bottom: 15px; color: #53617c; }

.portal-status-cards { gap: 16px; margin-bottom: 28px; }
.portal-status-card {
    min-height: 122px;
    border-radius: 8px;
    padding: 21px 24px;
    box-shadow: var(--portal-shadow);
}
.portal-status-card:hover { transform: none; box-shadow: 0 12px 30px rgba(28, 57, 105, .1); }
.portal-status-card::before { width: 5px; }
.portal-status-card::after { display: none; }
.portal-status-card > span { font-size: 14px; }
.portal-status-card b { margin: 8px 0 2px; font-size: 34px; }
.portal-status-card small { color: #64718c; font-size: 12px; }
.portal-status-card.is-accepted { border-color: #8ed9f1; color: #0b8fb9; background: #eefbff; }
.portal-status-card.is-processing { border-color: #f0c269; color: var(--portal-amber); background: #fff7e3; }
.portal-status-card.is-ready { border-color: #8bd8bb; color: var(--portal-green); background: #eefbf6; }
.portal-status-card.is-accepted > span { color: #08769a; }
.portal-status-card.is-processing > span { color: #8d5a07; }
.portal-status-card.is-ready > span { color: #08734f; }

.portal-orders-section,
.portal-history-card {
    border-color: var(--portal-line);
    border-radius: 8px;
    padding: 22px;
    background: #fff;
    box-shadow: var(--portal-shadow);
}
.portal-section-head { margin-bottom: 17px; }
.portal-section-head h2 { font-size: 21px; }
.portal-section-head p { margin-top: 4px; color: var(--portal-muted); font-size: 14px; }
.portal-section-head > span { border-radius: 20px; color: #0b6fcf; background: #e8f3ff; }
.portal-section-action { color: var(--portal-blue); font-size: 14px; font-weight: 800; text-decoration: none; }
.portal-order-table-head {
    display: grid;
    grid-template-columns: 135px 96px minmax(200px, 1fr) 92px 104px 22px;
    gap: 16px;
    border-bottom: 1px solid var(--portal-line);
    padding: 10px 6px;
    color: #596682;
    background: #f5f7fb;
    font-size: 13px;
    font-weight: 800;
}
.portal-order-row {
    grid-template-columns: 135px 96px minmax(200px, 1fr) 92px 104px 22px;
    gap: 16px;
    padding: 13px 6px;
}
.portal-order-row:hover {
    margin-inline: 0;
    border-radius: 5px;
    padding-inline: 6px;
    background: #f2f7ff;
}
.portal-order-number span { color: #75819a; font-size: 13px; }
.portal-order-number b { color: var(--portal-navy); font-size: 16px; }
.portal-file-stack span { border-radius: 5px; background: #f2f7fd; }
.portal-order-meta { min-width: 0; }
.portal-order-meta b,
.portal-order-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-order-meta b { font-size: 15px; }
.portal-order-meta span { color: var(--portal-muted); font-size: 13px; }
.portal-order-bend span,
.portal-bend-badge { border-radius: 16px; color: #8a5b03; background: #fff0bf; }
.portal-status { min-width: 96px; border-radius: 18px; padding: 7px 11px; font-size: 13px; }
.portal-status-file { min-width: 86px; padding: 6px 9px; font-size: 12px; text-align: center; }
.portal-status-accepted { color: #075db6; background: #dcecff; }
.portal-status-processing { color: #8b5800; background: #ffedba; }
.portal-status-ready { color: #08724e; background: #ccf2e1; }
.portal-row-arrow { color: #6380a5; }
.portal-order-month { margin-top: 8px; border-color: var(--portal-line); color: var(--portal-navy); background: #f4f7fb; }
.portal-order-day { color: #758099; background: #fafbfe; }
.portal-order-filters { gap: 10px; padding-bottom: 18px; }
.portal-employee-filter {
    margin-bottom: 15px;
    border-top: 1px solid var(--portal-line);
    border-bottom: 1px solid var(--portal-line);
    padding: 15px 0;
}
.portal-employee-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 11px;
}
.portal-employee-filter-head h3 { margin: 0; color: var(--portal-navy); font-size: 15px; }
.portal-employee-filter-head p { margin: 3px 0 0; color: var(--portal-muted); font-size: 13px; }
.portal-employee-filter-head > span { color: var(--portal-blue); font-size: 13px; font-weight: 800; }
.portal-employee-options { display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 5px; scrollbar-width: thin; }
.portal-employee-option {
    display: grid;
    min-width: 180px;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    border: 1px solid #cbd8ea;
    border-radius: 7px;
    padding: 9px 11px;
    color: var(--portal-navy);
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.portal-employee-option:hover { border-color: #7db5fa; background: #f7fbff; }
.portal-employee-option.is-active { border-color: var(--portal-blue); background: #eaf4ff; box-shadow: 0 0 0 2px rgba(8,119,249,.09); }
.portal-employee-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #fff; background: var(--portal-blue); font-size: 13px; font-weight: 850; }
.portal-employee-avatar svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-employee-option > span:last-child { min-width: 0; }
.portal-employee-option b,
.portal-employee-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-employee-option b { font-size: 13px; }
.portal-employee-option small { margin-top: 2px; color: var(--portal-muted); font-size: 12px; }
.portal-order-filters {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, .35fr) auto auto;
    border-top: 0;
    padding-top: 0;
}
.portal-order-filters input,
.portal-order-filters select {
    min-height: 43px;
    border-color: #cbd8ea;
    border-radius: 6px;
    background: #fff;
}
.portal-order-filters input:focus,
.portal-order-filters select:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgba(8,119,249,.1); }
.portal-filter-submit,
.portal-filter-reset { min-height: 43px; border-radius: 6px; }
.portal-filter-submit { background: var(--portal-blue); }

.portal-create-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 18px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    box-shadow: var(--portal-shadow);
}
.portal-create-main { display: grid; min-width: 0; gap: 16px; }
.portal-upload-zone {
    min-height: 370px;
    border: 1px dashed #8ebcff;
    border-radius: 7px;
    background: #f7fbff;
}
.portal-upload-zone:hover,
.portal-upload-zone.is-dragging { border-color: var(--portal-blue); background: #edf6ff; }
.portal-upload-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    color: var(--portal-blue);
    background: #e5f1ff;
}
.portal-upload-zone h2 { color: var(--portal-navy); font-size: 21px; }
.portal-upload-zone p { color: var(--portal-muted); }
.portal-upload-zone > small { margin-top: 16px; color: #7a879d; font-size: 12px; }
.portal-selected-files { border-radius: 7px; background: #f8faff; }
.portal-upload-file { border-radius: 6px; background: #fff; }
.portal-submit-bar {
    border-radius: 6px;
    background: #f3f7fd;
}
.portal-how-card {
    border-left: 1px solid var(--portal-line);
    padding: 6px 4px 6px 22px;
}
.portal-how-card h2 { margin: 0 0 20px; font-size: 19px; }
.portal-how-list { display: grid; gap: 22px; }
.portal-how-step { display: grid; grid-template-columns: 38px 1fr; gap: 12px; }
.portal-how-step > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--portal-blue);
    font-size: 14px;
    font-weight: 850;
}
.portal-how-step b { display: block; margin: 1px 0 4px; font-size: 14px; }
.portal-how-step small { display: block; color: var(--portal-muted); font-size: 12px; line-height: 1.45; }

.portal-progress {
    margin-bottom: 16px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    padding: 10px 14px;
    background: #fff;
    box-shadow: var(--portal-shadow);
}
.portal-progress-step { gap: 10px; }
.portal-progress-step > span {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-width: 0;
    color: #6f7d98;
    background: #e8edf5;
    font-size: 12px;
}
.portal-progress-step.is-active > span { color: #fff; background: var(--portal-blue); }
.portal-progress-step::after { top: 12px; right: 10px; left: 46px; background: #dce4f0; }
.portal-progress-step.is-active::after { background: var(--portal-blue); }
.portal-progress-step b { font-size: 13px; }
.portal-progress-step small { font-size: 12px; }

.portal-order-files {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
}
.portal-order-files-head,
.portal-order-file {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 110px 140px;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}
.portal-order-files.is-editable .portal-order-files-head,
.portal-order-files.is-editable .portal-order-file {
    grid-template-columns: 56px minmax(160px, 1.3fr) 280px 100px 168px;
}
.portal-order-files-head {
    color: #596682;
    background: #f5f7fb;
    font-size: 13px;
    font-weight: 800;
}
.portal-order-file { border-top: 1px solid var(--portal-line); }
.portal-order-file:hover { background: #f7faff; }
.portal-order-file-preview {
    display: grid;
    width: 52px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d5e1ee;
    border-radius: 5px;
    padding: 3px;
    background: #f6faff;
    cursor: zoom-in;
}
.portal-order-file-preview img { width: 100%; height: 100%; object-fit: contain; }
.portal-order-file-name { min-width: 0; }
.portal-order-file-name b,
.portal-order-file-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-order-file-name b { color: var(--portal-navy); font-size: 13px; }
.portal-order-file-name small { margin-top: 3px; color: #74829a; font-size: 12px; }
.portal-order-file .portal-file-badges { padding: 5px 0 0; }
.portal-order-files .portal-file-properties {
    grid-template-columns: 1fr 78px;
    gap: 6px;
    border: 0;
    padding: 0;
    background: transparent;
}
.portal-order-files .portal-file-properties input { min-height: 34px; border-radius: 6px; font-size: 13px; }
.portal-order-files .portal-file-properties > label > span { margin-bottom: 3px; font-size: 11px; }
.portal-order-file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.portal-order-file-actions a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #c8d9ee;
    border-radius: 6px;
    padding: 6px 9px;
    color: var(--portal-blue);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.portal-order-file-actions a:hover { border-color: var(--portal-blue); background: #f0f6ff; }
.portal-order-file-actions svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-order-file-actions .portal-link-danger {
    border: 0;
    padding: 0;
    color: var(--portal-red);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
}

@media (max-width: 1080px) {
    .portal-order-files-head,
    .portal-order-file { grid-template-columns: 52px minmax(0, 1fr) 100px 44px; }
    .portal-order-files.is-editable .portal-order-files-head { display: none; }
    .portal-order-files.is-editable .portal-order-file { grid-template-columns: 52px minmax(0, 1fr) auto auto; }
    .portal-order-files.is-editable .portal-file-properties { grid-column: 2 / -1; }
    .portal-order-files-head > span:last-child,
    .portal-order-file-actions a span { display: none; }
    .portal-order-file-actions a { width: 36px; padding: 6px; }
}

@media (max-width: 620px) {
    .portal-progress { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
    .portal-progress-step::after { top: 26px; bottom: -10px; left: 12px; width: 2px; height: auto; }
    .portal-order-files-head { display: none; }
    .portal-order-file,
    .portal-order-files.is-editable .portal-order-file {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 8px 10px;
        padding: 10px 8px;
    }
    .portal-order-file-name { grid-column: 2 / 4; }
    .portal-order-file > .portal-status { grid-column: 2; justify-self: start; }
    .portal-order-file-actions { grid-column: 3; grid-row: 2 / 4; }
    .portal-order-files.is-editable .portal-file-properties { grid-column: 1 / -1; }
}
.portal-add-files { border-radius: 7px; background: #f7faff; }
.portal-history-list > div > span { border-color: #c9e0ff; background: var(--portal-blue); }

.portal-auth-body { background: #f6f8fc; }
.portal-auth-header { border-bottom: 1px solid var(--portal-line); background: #fff; }
.portal-auth-shell { width: min(1180px, calc(100% - 48px)); }
.portal-login-wrap { min-height: 600px; gap: 70px; }
.portal-login-copy h1 { color: var(--portal-navy); font-size: 58px; line-height: 1; }
.portal-login-card { border-radius: 8px; box-shadow: var(--portal-shadow); }
.portal-login-card h2 { font-size: 27px; }
.portal-form input[type="email"],
.portal-form input[type="password"] { border-radius: 6px; background: #fff; }
.portal-form input:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgba(8,119,249,.1); }

@media (min-width: 1281px) {
    :root { --portal-sidebar: 220px; }
    .portal-sidebar { padding: 22px 14px 18px; }
    .portal-company-card { margin: 0 3px 24px; padding: 11px; }
    .portal-company-avatar,
    .portal-user-avatar { flex-basis: 38px; height: 38px; font-size: 14px; }
    .portal-company-card small { font-size: 12px; }
    .portal-company-card b { font-size: 15px; }
    .portal-nav-label { font-size: 11px; }
    .portal-nav { gap: 5px; }
    .portal-nav-link,
    .portal-nav-link-primary { min-height: 48px; gap: 13px; border-radius: 6px; padding: 10px 12px; font-size: 15px; }
    .portal-nav-link svg { width: 20px; flex-basis: 20px; }
    .portal-shell { width: 100%; max-width: 1480px; padding-top: 30px; }
    .portal-footer { width: calc(100% - 60px); max-width: 1420px; font-size: 13px; }
    .portal-btn { min-height: 46px; padding-inline: 18px; font-size: 15px; }
    .portal-eyebrow { font-size: 12px; }
    .portal-page-head { margin-bottom: 24px; }
    .portal-page-head h1 { font-size: 34px; }
    .portal-page-head p { max-width: 760px; font-size: 15px; }
    .portal-back-link { font-size: 13px; }
    .portal-status-cards { gap: 16px; margin-bottom: 28px; }
    .portal-status-card { min-height: 122px; border-radius: 8px; padding: 21px 24px; }
    .portal-status-card > span { font-size: 14px; }
    .portal-status-card b { font-size: 34px; }
    .portal-status-card small { font-size: 12px; }
    .portal-section-head h2 { font-size: 21px; }
    .portal-section-head p { font-size: 14px; }
    .portal-orders-section,
    .portal-history-card { padding: 22px; }
    .portal-dashboard-orders .portal-order-row,
    .portal-order-row { grid-template-columns: 135px 96px minmax(200px,1fr) 92px 104px 22px; gap: 16px; padding-block: 13px; }
    .portal-order-number span { font-size: 13px; }
    .portal-order-number b { font-size: 16px; }
    .portal-file-stack span { width: 40px; height: 40px; }
    .portal-order-meta b { font-size: 15px; }
    .portal-order-meta span { font-size: 13px; }
    .portal-status { min-width: 96px; padding: 7px 11px; font-size: 13px; }
    .portal-status-large { min-width: 118px; padding: 10px 15px; font-size: 14px; }
    .portal-order-filters input,
    .portal-order-filters select,
    .portal-filter-submit,
    .portal-filter-reset { min-height: 43px; font-size: 14px; }
    .portal-upload-zone p,
    .portal-login-card > p { font-size: 14px; }
}

@media (max-width: 1080px) {
    :root { --portal-sidebar: 200px; }
    .portal-shell { padding-inline: 22px; }
    .portal-create-workspace { grid-template-columns: 1fr 280px; }
    .portal-order-table-head,
    .portal-order-row,
    .portal-dashboard-orders .portal-order-row { grid-template-columns: 125px 90px minmax(150px,1fr) 96px 22px; gap: 12px; }
    .portal-order-table-head > span:nth-child(4) { display: none; }
}

@media (max-width: 820px) {
    .portal-desktop-header { display: none; }
    .portal-sidebar {
        inset: 0 auto 0 0;
        width: min(310px, 86vw);
        padding: 18px 14px;
        box-shadow: 12px 0 34px rgba(19, 43, 79, .14);
    }
    .portal-sidebar-head { display: flex; }
    .portal-brand-sidebar { color: var(--portal-navy); }
    .portal-brand-sidebar .portal-brand-mark { box-shadow: none; }
    .portal-nav-close { border-color: var(--portal-line); color: #53617b; background: #fff; }
    .portal-company-card { margin-top: 22px; }
    .portal-sidebar-account { display: flex; border-color: var(--portal-line); }
    .portal-sidebar-user b { color: var(--portal-navy); }
    .portal-sidebar-user small { color: var(--portal-muted); }
    .portal-main { margin-left: 0; padding-top: 0; }
    .portal-mobile-header { min-height: 66px; border-color: var(--portal-line); background: #fff; backdrop-filter: none; }
    .portal-create-workspace { grid-template-columns: 1fr; }
    .portal-how-card { border-top: 1px solid var(--portal-line); border-left: 0; padding: 20px 4px 4px; }
    .portal-how-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .portal-employee-filter-head { display: block; }
    .portal-employee-filter-head > span { display: block; margin-top: 5px; }
    .portal-employee-option { min-width: 165px; }
    .portal-order-filters { grid-template-columns: 1fr 1fr; }
    .portal-filter-search { grid-column: 1 / -1; }
    .portal-filter-submit { grid-column: 1 / -1; }
    .portal-filter-reset { grid-column: 1 / -1; justify-self: center; }
    .portal-shell { width: 100%; padding: 22px 12px 42px; }
    .portal-page-head h1 { font-size: 29px; }
    .portal-status-cards { grid-template-columns: 1fr; gap: 9px; }
    .portal-status-card { min-height: 88px; padding: 15px 18px; }
    .portal-status-card b { display: inline-block; margin: 7px 8px 0 0; font-size: 27px; }
    .portal-status-card small { display: inline; }
    .portal-orders-section,
    .portal-history-card,
    .portal-create-workspace { border-radius: 7px; padding: 14px 12px; }
    .portal-how-list { grid-template-columns: 1fr; gap: 17px; }
    .portal-upload-zone { min-height: 280px; }
    .portal-order-row,
    .portal-dashboard-orders .portal-order-row { grid-template-columns: 1fr auto; padding: 14px 4px; }
    .portal-order-table-head { display: none; }
    .portal-login-copy h1 { font-size: 42px; }
    .portal-login-card { border-radius: 7px; }
}

/* Client order workbench */
.portal-shell {
    max-width: none;
    padding: 20px 22px 42px;
}

.portal-company-card { display: none; }
.portal-nav { margin-top: 3px; }
.portal-sidebar-help { margin-top: auto; }
.portal-workbench-heading { margin-bottom: 16px; }
.portal-workbench-heading h1 { font-size: 32px; }
.portal-workbench-heading p { margin-top: 6px; font-size: 16px; }

.portal-workbench-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: stretch;
    gap: 16px;
}

.portal-compose-card,
.portal-how-card,
.portal-my-orders,
.portal-order-inspector {
    border: 1px solid var(--portal-line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(30, 57, 101, .055);
}

.portal-compose-card { min-width: 0; padding: 14px; }
.portal-compose-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(330px, .9fr);
    min-height: 342px;
}

.portal-workbench-upload {
    min-height: 342px;
    border: 1px dashed #8abaff;
    border-radius: 6px 0 0 6px;
    padding: 24px;
    background: #f8fbff;
    box-shadow: none;
}
.portal-workbench-upload .portal-upload-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 13px;
    color: var(--portal-blue);
    background: transparent;
    box-shadow: none;
}
.portal-workbench-upload .portal-upload-icon svg { width: 52px; stroke-width: 1.7; }
.portal-workbench-upload h2 { font-size: 22px; }
.portal-workbench-upload p { margin: 6px 0 18px; font-size: 15px; }
.portal-workbench-upload > small { margin-top: 18px; font-size: 13px; }
.portal-workbench-upload .portal-btn { min-width: 205px; }

.portal-order-information {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid var(--portal-line);
    border-left: 0;
    border-radius: 0 6px 6px 0;
    padding: 14px 14px 12px;
}
.portal-order-information h2 { margin: 0 0 16px; font-size: 18px; }
.portal-field { display: block; min-width: 0; }
.portal-field + .portal-field { margin-top: 14px; }
.portal-field > span:first-child { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 750; }
.portal-field input,
.portal-field select,
.portal-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd8ea;
    border-radius: 5px;
    padding: 10px 12px;
    color: var(--portal-ink);
    background: #fff;
    outline: none;
    font: inherit;
    font-size: 15px;
}
.portal-field textarea { min-height: 110px; resize: vertical; }
.portal-field input:focus,
.portal-field select:focus,
.portal-field textarea:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgba(8,119,249,.1); }
.portal-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 10px; margin: 12px 0; }
.portal-input-suffix { display: grid !important; grid-template-columns: 1fr auto; margin: 0 !important; }
.portal-input-suffix input { border-radius: 5px 0 0 5px; }
.portal-input-suffix b {
    display: grid;
    min-width: 52px;
    place-items: center;
    border: 1px solid #cbd8ea;
    border-left: 0;
    border-radius: 0 5px 5px 0;
    color: #65728c;
    background: #f6f8fc;
    font-size: 12px;
}
.portal-order-information > .portal-btn { margin-top: auto; min-height: 46px; }
.portal-workbench-selection { margin-top: 12px; border-radius: 6px; padding: 14px; box-shadow: none; }

.portal-how-card { padding: 14px 16px; }
.portal-how-card h2 { margin-bottom: 18px; font-size: 18px; }
.portal-how-list { gap: 18px; }
.portal-how-step { grid-template-columns: 38px minmax(0, 1fr); gap: 11px; }
.portal-how-step > span { width: 38px; height: 38px; font-size: 16px; }
.portal-how-step b { margin: 0 0 3px; font-size: 14px; }
.portal-how-step small { font-size: 13px; line-height: 1.45; }

.portal-workbench-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
    gap: 16px;
    margin-top: 18px;
}
.portal-my-orders { min-width: 0; padding: 0 14px 12px; }
.portal-my-orders-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0 8px;
}
.portal-my-orders-head h2 { margin: 0; font-size: 24px; }
.portal-my-orders-head form { width: min(320px, 42%); }
.portal-inline-search { position: relative; display: block; }
.portal-inline-search svg {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 18px;
    fill: none;
    stroke: #6c7890;
    stroke-width: 1.7;
    transform: translateY(-50%);
}
.portal-inline-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd8ea;
    border-radius: 5px;
    padding: 8px 12px 8px 38px;
    outline: none;
    font-size: 14px;
}
.portal-inline-search input:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgba(8,119,249,.1); }
.portal-order-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--portal-line); }
.portal-order-tabs a {
    position: relative;
    padding: 10px 8px 12px;
    color: #53617e;
    font-size: 14px;
    text-decoration: none;
}
.portal-order-tabs a.is-active { color: var(--portal-blue); font-weight: 800; }
.portal-order-tabs a.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--portal-blue); content: ''; }
.portal-order-tabs a span {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    place-items: center;
    border-radius: 10px;
    padding: 0 6px;
    color: #53617e;
    background: #eef3f8;
    font-size: 12px;
    font-weight: 800;
    vertical-align: middle;
}
.portal-order-tabs a.is-active span { color: var(--portal-blue); background: #e4f0ff; }
.portal-workbench-table { min-width: 0; overflow-x: auto; }
.portal-workbench-table-head,
.portal-workbench-order {
    display: grid;
    min-width: 760px;
    grid-template-columns: 118px minmax(150px, 1fr) minmax(230px, 1.35fr) 110px 110px 72px;
    align-items: center;
    gap: 10px;
}
.portal-workbench-table-head {
    min-height: 40px;
    border-bottom: 1px solid var(--portal-line);
    padding: 8px 10px;
    color: #44516e;
    background: #f6f8fc;
    font-size: 13px;
    font-weight: 800;
}
.portal-workbench-order {
    min-height: 68px;
    border-bottom: 1px solid var(--portal-line);
    padding: 9px 10px;
    font-size: 14px;
}
.portal-workbench-order.is-selected { background: #f2f7ff; }
.portal-workbench-order > b { color: var(--portal-navy); font-size: 14px; }
.portal-unread-pill {
    display: inline-grid;
    min-width: 20px;
    min-height: 20px;
    place-items: center;
    margin-left: 4px;
    border-radius: 10px;
    padding: 2px 6px;
    color: #fff;
    background: #dc2626;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
}
.portal-workbench-order > span:not(.portal-status):not(.portal-workbench-file-cell) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-workbench-order time { color: #5f6d88; white-space: nowrap; }
.portal-workbench-file-cell { position: relative; min-width: 0; }
.portal-workbench-file {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 8px;
    overflow: visible;
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    white-space: normal;
}
button.portal-workbench-file { cursor: pointer; border-radius: 6px; padding: 2px 4px 2px 0; }
button.portal-workbench-file:hover,
.portal-workbench-order.is-files-open button.portal-workbench-file,
.portal-file-group.is-files-open button.portal-workbench-file { background: #eef5ff; }
button.portal-workbench-file:focus { outline: none; }
button.portal-workbench-file:focus-visible { outline: 2px solid var(--portal-blue); outline-offset: 1px; }
.portal-workbench-file > img {
    width: 48px;
    height: 42px;
    flex: 0 0 48px;
    border: 1px solid var(--portal-line);
    border-radius: 4px;
    padding: 3px;
    object-fit: contain;
    background: #f6faff;
}
.portal-workbench-file > span { min-width: 0; flex: 1; }
.portal-workbench-file b,
.portal-workbench-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-workbench-file b { font-size: 13px; }
.portal-workbench-file small { margin-top: 2px; color: #73809a; font-size: 12px; }
.portal-file-caret {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-left: auto;
    fill: none;
    stroke: #73809a;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .16s ease;
}
.portal-workbench-order.is-files-open .portal-file-caret,
.portal-file-group.is-files-open .portal-file-caret { transform: rotate(180deg); }
.portal-workbench-files-menu {
    grid-column: 1 / -1;
    display: grid;
    max-height: 280px;
    gap: 6px;
    overflow-y: auto;
    margin-top: 4px;
    border-top: 1px solid var(--portal-line);
    padding: 10px 2px 4px;
    scrollbar-width: thin;
}
.portal-workbench-files-menu[hidden] { display: none; }
.portal-workbench-files-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--portal-line);
    border-radius: 6px;
    padding: 7px 8px;
    background: #f8faff;
}
.portal-workbench-files-item button {
    display: grid;
    width: 48px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d5e1ee;
    border-radius: 4px;
    padding: 3px;
    background: #fff;
    cursor: zoom-in;
}
.portal-workbench-files-item button img { width: 100%; height: 100%; object-fit: contain; }
.portal-workbench-files-item > span:first-of-type { min-width: 0; }
.portal-workbench-files-item b,
.portal-workbench-files-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-workbench-files-item b { color: var(--portal-navy); font-size: 13px; }
.portal-workbench-files-item small { margin-top: 3px; color: #74829a; font-size: 12px; }
.portal-file-progress { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.portal-file-progress > span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}
.portal-file-progress > .is-ready { color: #08724e; background: #ccf2e1; }
.portal-file-progress > .is-processing { color: #8b5800; background: #ffedba; }
.portal-inspector-summary dd .portal-file-progress { display: inline-flex; margin: 0 0 0 6px; vertical-align: middle; }
.portal-workbench-order .portal-status { min-width: 96px; padding: 7px 10px; font-size: 12px; }
.portal-table-action {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #9ec5fa;
    border-radius: 5px;
    color: var(--portal-blue);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.portal-table-action:hover { background: #edf5ff; }
.portal-all-orders-link { display: block; padding: 12px 5px 0; color: var(--portal-blue); font-size: 13px; font-weight: 800; text-align: right; text-decoration: none; }

.portal-order-inspector { min-width: 0; padding: 0 14px 14px; }
.portal-inspector-head { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 10px; }
.portal-inspector-head h2 { margin: 0; font-size: 18px; }
.portal-inspector-head .portal-status { min-width: 96px; padding: 7px 11px; font-size: 12px; }
.portal-inspector-meta { margin: -4px 0 10px; color: #62708a; font-size: 13px; }
.portal-inspector-progress { margin: 0 0 12px; color: var(--portal-navy); font-size: 14px; font-weight: 700; line-height: 1.45; }
.portal-inspector-note { margin-bottom: 12px; }
.portal-inspector-chat { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.portal-inspector-chat h3 { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 15px; }
.portal-inspector-chat h3 span {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 9px;
    padding: 0 5px;
    color: #426078;
    background: #e8eef6;
    font-size: 11px;
    font-weight: 800;
}
.portal-inspector-chat h3 span.is-unread { color: #fff; background: #dc2626; }
.portal-inspector-chat .portal-message-list { flex: 1; max-height: none; min-height: 200px; }
.portal-inspector-tabs { display: flex; gap: 25px; border-bottom: 1px solid var(--portal-line); }
.portal-inspector-tabs span { padding: 8px 3px 10px; color: #62708a; font-size: 13px; }
.portal-inspector-tabs .is-active { border-bottom: 2px solid var(--portal-blue); color: var(--portal-blue); font-weight: 800; }
.portal-inspector-summary { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; padding: 14px 0; }
.portal-inspector-preview {
    display: grid;
    width: 116px;
    height: 116px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-radius: 5px;
    padding: 7px;
    background: #111827;
    cursor: zoom-in;
}
.portal-inspector-preview img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.portal-preview-empty { color: #9facbf; background: #f4f7fb; cursor: default; font-size: 13px; font-weight: 800; }
.portal-inspector-summary dl { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.portal-inspector-summary dl div { min-width: 0; }
.portal-inspector-summary dt { color: #71809a; font-size: 12px; }
.portal-inspector-summary dd { overflow: hidden; margin: 3px 0 0; color: var(--portal-navy); font-size: 14px; font-weight: 700; text-overflow: ellipsis; }
.portal-inspector-note { border: 1px solid var(--portal-line); border-radius: 5px; padding: 10px 12px; background: #f7f9fd; }
.portal-inspector-note b { font-size: 13px; }
.portal-inspector-note p { margin: 4px 0 0; color: #61708a; font-size: 13px; line-height: 1.45; }
.portal-inspector-content > h3 { margin: 6px 0 10px; font-size: 15px; }
.portal-status-timeline { display: grid; }
.portal-status-timeline > div { position: relative; display: grid; min-height: 37px; grid-template-columns: 27px 1fr; gap: 8px; }
.portal-status-timeline > div::after { position: absolute; top: 22px; bottom: -1px; left: 11px; width: 2px; background: #d2dbea; content: ''; }
.portal-status-timeline > div:last-child::after { display: none; }
.portal-status-timeline > div > span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 2px solid #b6c1d2;
    border-radius: 50%;
    color: #fff;
    background: #fff;
    font-size: 11px;
    font-weight: 900;
}
.portal-status-timeline > div.is-done > span { border-color: #17a868; background: #17a868; }
.portal-status-timeline > div.is-current > span { border-color: var(--portal-blue); background: var(--portal-blue); }
.portal-status-timeline p { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 0 0; }
.portal-status-timeline b { font-size: 13px; }
.portal-status-timeline time { color: #73809a; font-size: 12px; white-space: nowrap; }
.portal-order-inspector > .portal-btn { min-height: 42px; margin-top: 4px; font-size: 14px; }
.portal-inspector-empty { display: grid; min-height: 320px; place-content: center; justify-items: center; padding: 25px; text-align: center; }
.portal-inspector-empty > span { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: var(--portal-blue); background: #e8f2ff; font-size: 11px; font-weight: 850; }
.portal-inspector-empty h2 { margin: 12px 0 3px; font-size: 16px; }
.portal-inspector-empty p { max-width: 250px; margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.45; }

@media (max-width: 1280px) {
    .portal-workbench-form { grid-template-columns: minmax(0, 1fr) 285px; }
    .portal-compose-grid { grid-template-columns: minmax(330px, 1fr) minmax(300px, .9fr); }
    .portal-workbench-bottom { grid-template-columns: minmax(0, 1fr) 340px; }
}

@media (max-width: 1080px) {
    .portal-workbench-form { grid-template-columns: 1fr; }
    .portal-how-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .portal-how-step { grid-template-columns: 34px 1fr; }
    .portal-how-step > span { width: 34px; height: 34px; }
    .portal-workbench-bottom { grid-template-columns: 1fr; }
    .portal-order-inspector { order: -1; }
}

@media (max-width: 820px) {
    .portal-company-card { display: flex; }
    .portal-shell { padding: 18px 14px 38px; }
    .portal-compose-grid { grid-template-columns: 1fr; }
    .portal-workbench-upload { border-radius: 6px 6px 0 0; }
    .portal-order-information { border-top: 0; border-left: 1px solid var(--portal-line); border-radius: 0 0 6px 6px; }
    .portal-how-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .portal-workbench-heading h1 { font-size: 26px; }
    .portal-workbench-form { gap: 12px; }
    .portal-compose-card { padding: 9px; }
    .portal-workbench-upload { min-height: 280px; padding: 20px 12px; }
    .portal-form-row { grid-template-columns: 1fr; }
    .portal-how-list { grid-template-columns: 1fr; }
    .portal-my-orders-head { align-items: stretch; flex-direction: column; gap: 10px; }
    .portal-my-orders-head form { width: 100%; }
    .portal-order-tabs { gap: 12px; overflow-x: auto; }
    .portal-order-tabs a { white-space: nowrap; }
    .portal-order-inspector { padding-inline: 11px; }
}

/* Interactive order inspector */
.portal-workbench-order { cursor: pointer; }
.portal-workbench-order:focus-visible { outline: 2px solid var(--portal-blue); outline-offset: -2px; }
.portal-order-panel { display: flex; min-height: 426px; flex-direction: column; }
.portal-order-panel[hidden],
.portal-inspector-content[hidden] { display: none; }
.portal-inspector-tabs > button {
    min-height: 42px;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 3px 10px;
    color: #62708a;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}
.portal-inspector-tabs > button:hover { color: var(--portal-blue); }
.portal-inspector-tabs > button.is-active { border-bottom-color: var(--portal-blue); color: var(--portal-blue); font-weight: 800; }
.portal-inspector-tabs > button > span {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    margin-left: 3px;
    border-radius: 9px;
    padding: 0 5px;
    color: #426078;
    background: #e8eef6;
    font-size: 11px;
    font-weight: 800;
}
.portal-inspector-tabs > button > span.is-unread { color: #fff; background: #dc2626; }
.portal-order-panel > h3 { margin: 3px 0 9px; font-size: 15px; }
.portal-inspector-content { min-height: 289px; }
.portal-inspector-open { min-height: 42px; margin-top: auto; font-size: 14px; }

.portal-inspector-ready-wrap { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.portal-inspector-ready-wrap h3 { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 15px; }
.portal-inspector-ready-wrap h3 span {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 9px;
    padding: 0 5px;
    color: #426078;
    background: #e8eef6;
    font-size: 11px;
    font-weight: 800;
}
.portal-inspector-ready {
    display: grid;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 1px 8px;
    scrollbar-width: thin;
}
.portal-inspector-ready article {
    display: grid;
    gap: 8px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    padding: 8px;
    background: #f8faff;
}
.portal-inspector-ready-preview {
    display: grid;
    width: 100%;
    height: 168px;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    padding: 14px;
    background: #111827;
    cursor: zoom-in;
}
.portal-inspector-ready-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.portal-inspector-ready-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    gap: 8px;
}
.portal-inspector-ready-meta b,
.portal-inspector-ready-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-inspector-ready-meta b { color: var(--portal-navy); font-size: 13px; }
.portal-inspector-ready-meta small { margin-top: 3px; color: #74829a; font-size: 12px; }
.portal-inspector-ready-meta a {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid #bcd3ef;
    border-radius: 5px;
    color: var(--portal-blue);
    background: #fff;
}
.portal-inspector-ready-meta a:hover { background: #edf5ff; }
.portal-inspector-ready-meta a svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-inspector-messages-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 8px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 9px 12px;
    color: #b91c1c;
    background: #fef2f2;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.portal-inspector-messages-link:hover { background: #fee2e2; }

.portal-inspector-files {
    display: grid;
    max-height: 288px;
    gap: 7px;
    overflow-y: auto;
    padding: 10px 1px;
    scrollbar-width: thin;
}
.portal-inspector-files article {
    display: grid;
    min-width: 0;
    grid-template-columns: 48px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--portal-line);
    border-radius: 5px;
    padding: 6px;
    background: #f8faff;
}
.portal-inspector-files button {
    display: grid;
    width: 48px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d5e1ee;
    border-radius: 4px;
    padding: 3px;
    background: #fff;
    cursor: zoom-in;
}
.portal-inspector-files button img { width: 100%; height: 100%; object-fit: contain; }
.portal-inspector-files article > div { min-width: 0; }
.portal-inspector-files b,
.portal-inspector-files small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-inspector-files b { color: var(--portal-navy); font-size: 13px; }
.portal-inspector-files small { margin-top: 3px; color: #74829a; font-size: 12px; }
.portal-inspector-files .portal-status-file {
    display: inline-flex;
    min-width: 0;
    margin-top: 5px;
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}
.portal-inspector-files article > a {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #bcd3ef;
    border-radius: 5px;
    color: var(--portal-blue);
    background: #fff;
}
.portal-inspector-files article > a:hover { background: #edf5ff; }
.portal-inspector-files article > a svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-inspector-tab-empty { margin: 12px 0; border: 1px dashed #ced9e8; border-radius: 5px; padding: 17px 12px; color: #6b7890; background: #f8faff; font-size: 13px; line-height: 1.45; text-align: center; }

.portal-message-list {
    display: flex;
    max-height: 220px;
    min-height: 196px;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding: 10px 2px;
    scrollbar-width: thin;
}
.portal-message-list article { max-width: 88%; border-radius: 6px; padding: 8px 10px; }
.portal-message-list article.is-factory { align-self: flex-start; border: 1px solid #d7e2ef; background: #f5f8fc; }
.portal-message-list article.is-client { align-self: flex-end; color: #05385d; background: #dfefff; }
.portal-message-list article > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.portal-message-list article b { font-size: 12px; }
.portal-message-list article time { color: #73809a; font-size: 11px; white-space: nowrap; }
.portal-message-list article p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.portal-message-form { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: end; gap: 7px; border-top: 1px solid var(--portal-line); padding-top: 9px; }
.portal-message-form label { min-width: 0; }
.portal-message-form textarea {
    display: block;
    width: 100%;
    min-height: 54px;
    max-height: 110px;
    resize: vertical;
    border: 1px solid #cbd8ea;
    border-radius: 5px;
    padding: 8px 9px;
    outline: none;
    font: inherit;
    font-size: 14px;
}
.portal-message-form textarea:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgba(8,119,249,.1); }
.portal-message-form button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 5px;
    color: #fff;
    background: var(--portal-blue);
    cursor: pointer;
}
.portal-message-form button:hover { background: #086bd7; }
.portal-message-form button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-conversation-card { margin-top: 18px; }
.portal-message-list-large { max-height: 420px; min-height: 90px; padding: 2px 0 14px; }
.portal-message-list-large article { width: min(660px, 82%); max-width: none; padding: 11px 13px; }
.portal-message-list-large article b { font-size: 13px; }
.portal-message-list-large article time { font-size: 12px; }
.portal-message-list-large article p { font-size: 14px; }
.portal-message-form-large { grid-template-columns: minmax(0, 1fr) 44px; }
.portal-message-form-large textarea { min-height: 64px; font-size: 14px; }
.portal-message-form-large button { width: 44px; height: 44px; }

@media (max-width: 620px) {
    .portal-order-panel { min-height: 0; }
    .portal-inspector-content { min-height: 0; }
    .portal-message-list { max-height: 300px; }
    .portal-message-list-large article { width: 94%; }
}

/* Portal file archive */
.portal-file-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 10px;
    border-top: 1px solid var(--portal-line);
    padding: 16px 0 18px;
}
.portal-file-search input {
    width: 100%;
    min-height: 43px;
    border: 1px solid #cbd8ea;
    border-radius: 6px;
    padding: 9px 12px 9px 37px;
    color: var(--portal-ink);
    background: #fff;
    outline: none;
    font-size: 14px;
}
.portal-file-search input:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgba(8,119,249,.1); }
.portal-file-table-head,
.portal-file-order-row {
    display: grid;
    grid-template-columns: minmax(140px, .7fr) minmax(150px, .9fr) minmax(210px, 1.4fr) minmax(130px, .7fr) 110px 44px;
    align-items: center;
    gap: 16px;
}
.portal-file-table-head {
    border-bottom: 1px solid var(--portal-line);
    padding: 10px 8px;
    color: #596682;
    background: #f5f7fb;
    font-size: 13px;
    font-weight: 800;
}
.portal-file-list { display: grid; }
.portal-file-group { min-width: 0; border-bottom: 1px solid var(--portal-line); }
.portal-file-group:last-child { border-bottom: 0; }
.portal-file-group.is-files-open { background: #f7faff; }
.portal-file-order-row { min-width: 0; padding: 12px 8px; }
.portal-file-group:hover .portal-file-order-row { background: #f7faff; }
.portal-file-project,
.portal-file-order,
.portal-file-submitted { min-width: 0; }
.portal-file-project b,
.portal-file-order b,
.portal-file-submitted b,
.portal-file-order span,
.portal-file-submitted span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-file-project b { color: var(--portal-navy); font-size: 14px; }
.portal-file-order span,
.portal-file-submitted span { margin-top: 4px; color: var(--portal-muted); font-size: 13px; }
.portal-file-order { color: var(--portal-blue); text-decoration: none; }
.portal-file-order:hover b { text-decoration: underline; }
.portal-file-order b,
.portal-file-submitted b { color: var(--portal-navy); font-size: 13px; }
.portal-file-order-row .portal-workbench-file { width: 100%; }
.portal-file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.portal-file-actions a,
.portal-file-download {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #c8d9ee;
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--portal-blue);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}
.portal-file-actions a:hover,
.portal-file-download:hover { border-color: var(--portal-blue); background: #f0f6ff; }
.portal-file-actions svg,
.portal-file-download svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-file-actions a { width: 36px; padding: 7px; }
.portal-file-group .portal-workbench-files-menu { max-height: 520px; padding: 4px 8px 12px; }
.portal-file-group .portal-workbench-files-item { grid-template-columns: 48px minmax(0, 1fr) auto auto; }
.portal-file-download { white-space: nowrap; }

@media (max-width: 1080px) {
    .portal-file-table-head,
    .portal-file-order-row { grid-template-columns: minmax(130px, .8fr) minmax(180px, 1.3fr) 110px 44px; gap: 12px; }
    .portal-file-table-head > span:nth-child(2),
    .portal-file-table-head > span:nth-child(4),
    .portal-file-project,
    .portal-file-submitted { display: none; }
}

@media (max-width: 620px) {
    .portal-file-search { grid-template-columns: 1fr 1fr; }
    .portal-file-search .portal-filter-search { grid-column: 1 / -1; }
    .portal-file-search .portal-filter-submit { grid-column: auto; }
    .portal-file-search .portal-filter-reset { grid-column: auto; justify-self: stretch; }
    .portal-file-table-head { display: none; }
    .portal-file-order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; padding: 13px 2px; }
    .portal-file-order { grid-column: 1; }
    .portal-file-order-row .portal-workbench-file { grid-column: 1; }
    .portal-file-order-row > .portal-status { grid-column: 1; justify-self: start; min-width: 86px; }
    .portal-file-actions { grid-row: 1 / 3; grid-column: 2; }
    .portal-file-group .portal-workbench-files-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .portal-file-download span { display: none; }
    .portal-file-download { width: 36px; padding: 7px; }
}

/* Portal navigation destinations */
.portal-top-help,
.portal-top-messages,
.portal-top-account { text-decoration: none; }
.portal-top-account { color: var(--portal-navy); }
.portal-top-help:hover,
.portal-top-messages:hover,
.portal-top-account:hover b { color: var(--portal-blue); }
.portal-nav-link-disabled { opacity: .68; cursor: default; }
.portal-nav-link-disabled:hover { color: #465573; background: transparent; }
.portal-sidebar-account { margin-top: auto; }

.portal-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.portal-profile-password { grid-column: 1 / -1; max-width: 560px; }
.portal-profile-password .portal-form { border-top: 1px solid var(--portal-line); padding-top: 18px; }
.portal-profile-password .portal-btn { justify-self: start; }
.portal-forgot-link {
    color: var(--portal-blue);
    font-size: 13px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}
.portal-forgot-link:hover { text-decoration: underline; }
.portal-info-card {
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    padding: 22px;
    background: #fff;
    box-shadow: var(--portal-shadow);
}
.portal-info-card-head { display: flex; align-items: center; gap: 13px; padding-bottom: 18px; }
.portal-info-card-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 7px;
    color: var(--portal-blue);
    background: #eaf3ff;
}
.portal-info-card-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.portal-info-card h2,
.portal-info-card h3 { margin: 0; color: var(--portal-navy); }
.portal-info-card h2 { font-size: 19px; }
.portal-info-card-head p,
.portal-help-steps p { margin: 4px 0 0; color: var(--portal-muted); font-size: 14px; line-height: 1.5; }
.portal-info-list { margin: 0; border-top: 1px solid var(--portal-line); }
.portal-info-list > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--portal-line); padding: 13px 2px; }
.portal-info-list > div:last-child { border-bottom: 0; }
.portal-info-list dt { color: var(--portal-muted); font-size: 14px; font-weight: 700; }
.portal-info-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--portal-navy); font-size: 15px; font-weight: 800; }
.portal-help-card { max-width: 980px; }
.portal-help-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.portal-help-steps article { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; border: 1px solid var(--portal-line); border-radius: 7px; padding: 16px; background: #f8faff; }
.portal-help-steps article > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: var(--portal-blue); font-size: 14px; font-weight: 900; }
.portal-help-steps h3 { font-size: 16px; }
.portal-help-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--portal-line); margin-top: 18px; padding-top: 18px; }

.portal-inbox {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
    min-height: 620px;
}
.portal-inbox-list,
.portal-inbox-pane {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--portal-shadow);
}
.portal-inbox-toolbar {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--portal-line);
    padding: 14px 16px 0;
}
.portal-inbox-toolbar form { padding-bottom: 14px; }
.portal-inbox-threads { display: grid; min-height: 280px; }
.portal-inbox-thread {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    border-bottom: 1px solid var(--portal-line);
    padding: 13px 14px 13px 10px;
    color: inherit;
    text-decoration: none;
}
.portal-inbox-thread:last-child { border-bottom: 0; }
.portal-inbox-thread:hover { background: #f7faff; }
.portal-inbox-thread.is-selected { background: #f2f7ff; }
.portal-inbox-thread-mark {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: transparent;
}
.portal-inbox-thread.is-unread .portal-inbox-thread-mark { background: var(--portal-blue); }
.portal-inbox-thread-body { min-width: 0; }
.portal-inbox-thread-row,
.portal-inbox-thread-body > span,
.portal-inbox-thread-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-inbox-thread-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.portal-inbox-thread-row b { color: var(--portal-navy); font-size: 15px; }
.portal-inbox-thread-row time { color: #73809a; font-size: 13px; white-space: nowrap; }
.portal-inbox-thread-body > span { margin-top: 3px; color: var(--portal-navy); font-size: 14px; font-weight: 700; }
.portal-inbox-thread.is-unread .portal-inbox-thread-body > span { font-weight: 800; }
.portal-inbox-thread-body small { margin-top: 4px; color: var(--portal-muted); font-size: 13px; }
.portal-inbox-pane { padding: 16px; }
.portal-inbox-pane-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--portal-line);
}
.portal-inbox-pane-head h2 { margin: 0; color: var(--portal-navy); font-size: 18px; }
.portal-inbox-pane-head p { margin: 4px 0 0; color: var(--portal-muted); font-size: 14px; }
.portal-inbox-messages { flex: 1; max-height: 480px; min-height: 280px; padding: 16px 0; overflow: auto; }
.portal-inbox-pane > .portal-btn { margin-top: 14px; }
.portal-mobile-messages { display: none; }

@media (max-width: 1080px) {
    .portal-inbox { grid-template-columns: 1fr; min-height: 0; }
    .portal-inbox-pane { min-height: 420px; }
}

@media (max-width: 820px) {
    .portal-profile-grid { grid-template-columns: 1fr; }
    .portal-mobile-messages {
        position: relative;
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
        border: 1px solid var(--portal-line);
        border-radius: 11px;
        color: var(--portal-navy);
        background: #fff;
        text-decoration: none;
    }
    .portal-mobile-messages svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .portal-mobile-messages.is-active,
    .portal-mobile-messages:hover { color: var(--portal-blue); border-color: #9ec5fa; background: #f0f6ff; }
    .portal-mobile-messages .portal-nav-notification {
        position: absolute;
        top: -6px;
        right: -6px;
        margin: 0;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

@media (max-width: 620px) {
    .portal-info-card { padding: 16px 13px; }
    .portal-info-list > div { grid-template-columns: 1fr; gap: 4px; }
    .portal-help-steps { grid-template-columns: 1fr; }
    .portal-help-actions { align-items: stretch; flex-direction: column; }
    .portal-inbox-pane { padding: 13px; }
    .portal-inbox-messages { min-height: 220px; }
}
