﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #f5f6fa;
}

.auth-card {
    width: min(480px, 100%);
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
}

.auth-card h1 {
    margin-bottom: 0.75rem;
    font-size: 1.875rem;
    font-weight: 600;
}

.auth-description {
    margin-bottom: 1.75rem;
    color: #5c5f6a;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.form-field label {
    font-weight: 600;
    color: #141823;
}

.form-field input,
.form-field select {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #c7ccd6;
    font-size: 1rem;
    background: #fff;
}

.form-field textarea {
    min-height: 8rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #c7ccd6;
    font-size: 1rem;
    resize: vertical;
}

.form-field input[readonly] {
    background: #f6f8fa;
    color: #57606a;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
}

.form-field.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.form-field.checkbox-field input {
    width: 1rem;
    height: 1rem;
    padding: 0;
    flex: 0 0 auto;
}

.form-field.checkbox-field label {
    margin: 0;
    font-weight: 500;
}

.inline-control {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-control input {
    flex: 1 1 auto;
}

.version-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
}

.helper-text {
    font-size: 0.85rem;
    color: #61646f;
}

.status-message {
    margin-top: 1.5rem;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.status-message.success {
    background: #ecfdf3;
    color: #05603a;
    border: 1px solid #82d3a2;
}

.status-message.error {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #f5a29a;
}

.status-message.inline-status {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.required-note {
    margin-top: -0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #8a8d98;
}

.required-mark {
    color: #d14343;
    font-weight: 700;
    margin-left: 0.125rem;
}

/* Global button baseline for desktop layouts */
button {
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    border: 1px solid transparent;
    background-color: #f3f4f6;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: background-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

button:hover:not(:disabled) {
    background-color: #e5e7eb;
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.button-row {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.primary-button,
.secondary-button {
    flex: 0 0 auto;
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    font-weight: 600;
    border-width: 1px;
    border-style: solid;
    cursor: pointer;
    transition: background-color 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}

.primary-button {
    background: linear-gradient(135deg, #1f6feb, #3b82f6);
    color: #ffffff;
    border-color: #1f6feb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.secondary-button {
    background: #f6f8fa;
    color: #24292f;
    border-color: #d0d7de;
}

.primary-button:active,
.secondary-button:active {
    transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled {
    opacity: 0.6;
    box-shadow: none;
}

.button-row > .primary-button,
.button-row > .secondary-button {
    min-width: 120px;
}

.danger-button {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.danger-button:hover:not(:disabled) {
    background: #fee2e2;
    border-color: #fecaca;
}

.help-text {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #5c5f6a;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Workspace pages */
.workspace-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    background: radial-gradient(circle at 10% 20%, #eef2ff 0, #f8fbff 35%, #ffffff 70%);
    border-radius: 18px;
    border: 1px solid #e1e4ec;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    margin-bottom: 1.5rem;
}

.workspace-hero h1 {
    margin: 0.2rem 0 0.6rem;
    font-size: 1.75rem;
}

.workspace-hero .subtitle {
    margin: 0;
    color: #5b6070;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.primary-button.ghost {
    background: #fff;
    color: #1f6feb;
    border: 1px solid #c6d4ff;
    box-shadow: none;
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.compact-section-header {
    margin-bottom: 0.75rem;
}

.item-template-select {
    min-width: 180px;
}

.item-template-block {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.item-template-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.item-template-field-grid {
    align-items: start;
}

.item-template-field-table {
    min-width: 1080px;
    table-layout: fixed;
}

.item-template-field-name-col {
    width: 16%;
}

.item-template-field-key-col {
    width: 16%;
}

.item-template-field-type-col {
    width: 8.5rem;
}

.item-template-field-unit-col {
    width: 11%;
}

.item-template-field-help-col {
    width: auto;
}

.item-template-field-required-col {
    width: 5rem;
}

.item-template-field-action-col {
    width: 5.5rem;
}

.item-template-field-input,
.item-template-field-options {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    box-sizing: border-box;
    font: inherit;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    width: 100%;
}

.item-template-field-input:focus,
.item-template-field-options:focus {
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.12);
    outline: none;
}

.item-template-field-help-stack {
    display: grid;
    gap: 0.45rem;
}

.item-template-field-options {
    min-height: 2.75rem;
    resize: vertical;
}

.item-template-tag-picker {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-template-tag-option {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d8dee8;
    border-radius: 999px;
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
}

.item-template-tag-option input {
    margin: 0;
}

.attribute-picker-modal {
    width: min(820px, 96vw);
    max-width: 820px;
}

.attribute-picker-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
    gap: 0.75rem;
}

.attribute-picker-filter-grid .form-field {
    margin-bottom: 0;
}

.attribute-picker-results {
    max-height: 520px;
}

.attribute-picker-option code {
    color: #1f2937;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.attribute-picker-tags {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

@media (max-width: 720px) {
    .attribute-picker-filter-grid {
        grid-template-columns: 1fr;
    }
}

.name-value-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(18rem, 1fr));
    gap: 0.75rem 1rem;
    align-items: start;
}

.name-value-form .form-field {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.name-value-form .form-field label {
    position: relative;
    padding-right: 0.75rem;
    text-align: right;
    color: #374151;
}

.name-value-form .form-field label::after {
    content: ":";
    position: absolute;
    right: 0;
}

.name-value-form .form-field input,
.name-value-form .form-field select,
.name-value-form .form-field textarea {
    min-width: 0;
    width: 100%;
}

.name-value-form .form-field.wide-field {
    grid-column: 1 / -1;
}

.name-value-form .form-field.textarea-field {
    align-items: start;
}

.name-value-form .form-field.textarea-field label {
    padding-top: 0.65rem;
}

.item-readonly-form .form-field {
    align-items: start;
}

.item-readonly-value {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #111827;
    min-height: 2.45rem;
    overflow-wrap: anywhere;
    padding: 0.6rem 0.7rem;
    white-space: pre-wrap;
    width: 100%;
}

.item-readonly-multiline {
    min-height: 4rem;
}

.item-template-readonly-value {
    min-height: 2.4rem;
}

.item-file-group-manager {
    margin-bottom: 0.85rem;
}

.supplier-admin-list,
.item-supplier-list {
    display: grid;
    gap: 1rem;
}

.supplier-admin-module,
.item-supplier-block {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.supplier-admin-module:first-child,
.item-supplier-block:first-child {
    border-top: 0;
    padding-top: 0;
}

.supplier-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}

.supplier-oauth-panel {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    margin-bottom: 0.85rem;
    padding: 0.75rem;
}

.supplier-oauth-panel code {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .supplier-oauth-panel {
        align-items: stretch;
        grid-template-columns: 1fr;
    }
}

.item-supplier-select {
    min-width: 12rem;
}

.supplier-link-options {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.supplier-link-options .form-field {
    width: 8rem;
}

.item-supplier-field-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.supplier-field-card {
    background: #f8fafc;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.75rem;
}

.supplier-field-card.wide {
    grid-column: 1 / -1;
}

.supplier-field-title-row {
    align-items: baseline;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    min-width: 0;
}

.supplier-field-title-row label {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 700;
}

.supplier-field-title-row code {
    color: #64748b;
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supplier-field-card input,
.supplier-field-card textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #111827;
    font: inherit;
    min-width: 0;
    padding: 0.58rem 0.65rem;
    width: 100%;
}

.supplier-field-card input[type="checkbox"] {
    width: auto;
}

.supplier-field-card textarea {
    resize: vertical;
}

.supplier-field-card input:focus,
.supplier-field-card textarea:focus {
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: 0;
}

.supplier-field-check {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    min-height: 2.4rem;
}

.supplier-field-readonly {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    min-height: 2.4rem;
    overflow-wrap: anywhere;
    padding: 0.58rem 0.65rem;
}

.item-supplier-field-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.item-supplier-field-table th,
.item-supplier-field-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: middle;
}

.item-supplier-field-table th:first-child,
.item-supplier-field-table td:first-child {
    width: 12rem;
}

.item-supplier-field-table th:last-child,
.item-supplier-field-table td:last-child {
    color: #6b7280;
    width: 45%;
}

.item-supplier-field-table input {
    width: 100%;
}

.item-supplier-field-table input[type="checkbox"] {
    width: auto;
}

.item-supplier-copy-box {
    display: grid;
    gap: 0.75rem;
}

.item-supplier-copy-toolbar {
    margin: 0;
}

.supplier-copy-selected {
    background: #f8fafc;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding: 0.65rem 0.75rem;
}

.supplier-copy-result-table {
    max-height: 18rem;
    overflow: auto;
}

.modal-card.supplier-fetch-modal {
    max-height: min(86vh, 900px);
    max-width: min(1120px, calc(100vw - 2rem));
    overflow: auto;
    width: min(1120px, calc(100vw - 2rem));
}

.supplier-fetch-candidate-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.supplier-fetch-candidate {
    background: #ffffff;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    padding: 0.75rem;
}

.supplier-fetch-candidate-header {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.supplier-fetch-candidate-header input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.supplier-fetch-candidate-title {
    color: #111827;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.supplier-fetch-values {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.supplier-fetch-value {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-width: 0;
    padding: 0.6rem 0.7rem;
}

.supplier-fetch-value span {
    color: #6b7280;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.supplier-fetch-value strong {
    color: #111827;
    display: block;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.supplier-fetch-photo-link {
    display: inline-block;
    margin-top: 0.35rem;
}

.supplier-fetch-photo {
    background: #f8fafc;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    display: block;
    height: 96px;
    object-fit: contain;
    padding: 5px;
    width: 96px;
}

@media (max-width: 720px) {
    .modal-card.supplier-fetch-modal {
        border-radius: 10px;
        max-height: calc(100vh - 0.5rem);
        max-width: calc(100vw - 0.5rem);
        padding: 1rem;
        width: calc(100vw - 0.5rem);
    }

    .supplier-fetch-values {
        grid-template-columns: 1fr;
    }
}

.supplier-fetch-json-block {
    margin-top: 1rem;
}

.supplier-fetch-json-block summary {
    color: #111827;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
}

.supplier-fetch-json-block pre {
    background: #0f172a;
    border-radius: 6px;
    color: #e5e7eb;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
    max-height: 420px;
    overflow: auto;
    padding: 0.85rem;
    white-space: pre;
}

.supplier-attribute-json-actions {
    align-items: flex-end;
    align-self: end;
}

.supplier-attribute-json-result {
    margin-top: 1rem;
}

.supplier-attribute-json-table table {
    min-width: 720px;
}

.supplier-attribute-json-table td {
    vertical-align: top;
}

.supplier-attribute-json-table code {
    white-space: nowrap;
}

.supplier-attribute-json-table td:nth-child(2),
.supplier-attribute-json-table td:nth-child(3) {
    word-break: break-word;
}

.modal-card.supplier-attribute-prep-modal {
    max-height: calc(100vh - 3rem);
    max-width: 1320px;
    overflow: auto;
    width: min(1320px, calc(100vw - 3rem));
}

.supplier-attribute-prep-page {
    overflow: visible;
}

.supplier-attribute-prep-inputs {
    grid-template-columns: 180px 220px minmax(360px, 1fr);
}

.supplier-attribute-prep-parts textarea {
    min-height: 7.5rem;
    resize: vertical;
}

.supplier-attribute-prep-tags {
    gap: 0.45rem;
}

.supplier-attribute-prep-tag-option {
    cursor: pointer;
}

.supplier-attribute-prep-tag-option input {
    margin: 0;
}

.supplier-attribute-prep-actions {
    margin: 0.75rem 0;
}

.supplier-attribute-prep-summary {
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.85rem;
    gap: 0.7rem;
    margin: 0.75rem 0;
}

.supplier-attribute-prep-part-table table {
    min-width: 860px;
}

.supplier-attribute-prep-table-wrap {
    max-height: 58vh;
}

.supplier-attribute-prep-page .supplier-attribute-prep-table-wrap {
    max-height: none;
}

.supplier-attribute-prep-table {
    table-layout: fixed;
    width: 100%;
}

.supplier-attribute-prep-table .prep-select-col {
    width: 3.1rem;
}

.supplier-attribute-prep-table .prep-raw-col {
    width: 19%;
}

.supplier-attribute-prep-table .prep-sample-col {
    width: 17%;
}

.supplier-attribute-prep-table .prep-count-col {
    width: 4.4rem;
}

.supplier-attribute-prep-table .prep-action-col {
    width: 8.7rem;
}

.supplier-attribute-prep-table .prep-data-col {
    width: 27%;
}

.supplier-attribute-prep-table .prep-type-col {
    width: 16%;
}

.supplier-attribute-prep-table .prep-status-col {
    width: 10rem;
}

.supplier-attribute-prep-table th,
.supplier-attribute-prep-table td {
    overflow: hidden;
    padding: 0.45rem 0.55rem;
    vertical-align: top;
}

.supplier-attribute-prep-table select,
.supplier-attribute-prep-table input {
    box-sizing: border-box;
    font-size: 0.86rem;
    min-height: 1.9rem;
    max-width: 100%;
    min-width: 0;
    padding: 0.22rem 0.35rem;
    width: 100%;
}

.supplier-attribute-prep-data-cell,
.supplier-attribute-prep-type-cell {
    display: grid;
    gap: 0.28rem;
}

.supplier-attribute-prep-data-grid {
    display: grid;
    gap: 0.28rem;
    grid-template-columns: minmax(10rem, 1.1fr) minmax(8rem, 0.9fr);
}

.supplier-attribute-prep-type-grid {
    display: grid;
    gap: 0.28rem;
    grid-template-columns: minmax(5.5rem, 0.9fr) minmax(4.5rem, 0.7fr) minmax(4.5rem, 0.7fr);
}

.supplier-attribute-prep-table .prep-attribute-select {
    font-weight: 600;
}

.supplier-attribute-prep-table code,
.supplier-attribute-prep-table .tile-desc {
    overflow-wrap: anywhere;
    white-space: normal;
}

.supplier-attribute-prep-table .muted-row {
    background: #f8fafc;
    color: #64748b;
}

.supplier-attribute-prep-table .needs-action-row {
    background: #fffaf0;
}

.digikey-batch-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.digikey-batch-input textarea {
    min-height: 16rem;
    resize: vertical;
    width: 100%;
}

.digikey-batch-side {
    align-self: start;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem;
}

.digikey-batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.digikey-batch-summary {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.digikey-batch-summary div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
}

.digikey-batch-summary span {
    color: #6b7280;
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.digikey-batch-summary strong {
    color: #111827;
    font-size: 1.1rem;
}

.digikey-batch-table {
    min-width: 1380px;
}

.digikey-batch-table td {
    vertical-align: top;
}

.digikey-batch-photo-cell {
    min-width: 82px;
}

.digikey-batch-photo {
    background: #f8fafc;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    display: block;
    height: 60px;
    object-fit: contain;
    padding: 4px;
    width: 60px;
}

.digikey-template-preview {
    margin-top: 0.35rem;
}

.digikey-template-preview summary {
    color: #2563eb;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
}

.digikey-template-field-list {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.digikey-template-field-list div {
    border-left: 3px solid #d8dee8;
    padding-left: 0.45rem;
}

.digikey-template-field-list span {
    color: #6b7280;
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
}

.digikey-template-field-list strong {
    color: #111827;
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .digikey-batch-grid {
        grid-template-columns: 1fr;
    }

    .digikey-batch-side {
        width: 100%;
    }
}

.entity-picker-control {
    display: flex;
    min-width: 0;
    gap: 0.5rem;
}

.entity-picker-button {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-picker-button.empty {
    color: #6b7280;
    font-weight: 500;
}

.entity-picker-clear {
    min-width: 0;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.entity-picker-toolbar {
    display: flex;
    justify-content: flex-end;
}

.entity-picker-empty {
    margin: 0;
    padding: 0.5rem 0;
}

.workspace-panel {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e6ed;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.workspace-panel.surface {
    background: linear-gradient(180deg, #fbfcff 0%, #ffffff 30%);
}

.workspace-panel.span-2 {
    grid-column: span 2;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card.modern {
    border: 1px solid #e7ebf3;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    background: #ffffff;
}

.card.modern.danger {
    border-color: #f3d1d1;
    background: #fff8f8;
}

.group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.chip-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.compact-input {
    max-width: 220px;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cdd4e3;
    border-radius: 6px;
}

.inline-form .inline-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    align-items: center;
}

.inline-form input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid #cdd4e3;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    border: 1px solid #e3e7f1;
    background: #f7f9ff;
    color: #1c274c;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.chip .mono {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #6b7280;
}

.muted {
    color: #7a7f8c;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #6c7390;
    margin: 0;
}

.eyebrow.small {
    font-size: 0.7rem;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.6rem;
}

.home-project-panel {
    margin-bottom: 1rem;
}

.project-tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.tile {
    text-align: left;
    border: 1px solid #e3e8f2;
    background: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.08);
    border-color: #cdd8ff;
}

.group-tile {
    cursor: default;
}

.project-list-tile {
    cursor: default;
    gap: 0.6rem;
}

.project-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.tile-link-button {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    padding: 0;
    text-align: left;
}

.interest-toggle {
    min-width: 5.5rem;
}

.interest-toggle.active {
    background: #fff8c5;
    border-color: #f0c36d;
    color: #7d4e00;
}

.project-group-membership {
    align-items: center;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.project-group-chip {
    padding: 0.35rem 0.65rem;
}

.ops-hub-panel {
    padding: 1rem 1.25rem;
}

.ops-hub-header {
    align-items: flex-end;
    border-bottom: 1px solid #d8dee4;
    margin-bottom: 0;
    padding-bottom: 0.75rem;
}

.ops-hub-header h2 {
    margin-bottom: 0.1rem;
}

.ops-hub-header .muted {
    margin: 0;
}

.ops-module-list {
    background: #ffffff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    overflow: hidden;
}

.ops-module-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) 7rem 4.5rem;
    gap: 1rem;
    align-items: center;
    min-height: 4.25rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #d8dee4;
}

.ops-module-row:first-child {
    border-top: 0;
}

.ops-module-row:hover {
    background: #f6f8fa;
}

.ops-module-row.disabled {
    background: #f6f8fa;
    color: #6e7781;
}

.ops-module-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.1rem;
    padding: 0.18rem 0.45rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #f6f8fa;
    color: #57606a;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 700;
}

.ops-module-main {
    min-width: 0;
}

.ops-module-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

.ops-module-title-row strong {
    font-size: 1rem;
}

.ops-module-group {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: #fff8c5;
    color: #7d4e00;
    font-size: 0.74rem;
    font-weight: 700;
}

.ops-module-state {
    display: flex;
    justify-content: flex-start;
}

.ops-module-action {
    display: flex;
    justify-content: flex-end;
}

.ops-module-action .secondary-button.small {
    min-width: 3.75rem;
}

.group-create-form {
    margin-bottom: 1rem;
}

.group-create-form .inline-fields {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.group-create-form input {
    width: 18rem;
    max-width: 100%;
}

.group-create-form .primary-button {
    min-width: 6.5rem;
    width: auto;
}

.home-group-card {
    box-shadow: none;
}

.group-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.group-project-panel {
    width: 100%;
}

.group-project-toolbar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.group-project-search {
    flex: 1 1 24rem;
    margin-bottom: 0;
    max-width: 36rem;
}

.group-project-table-wrap {
    margin-top: 0.75rem;
}

.group-project-table {
    min-width: 760px;
}

.group-project-table th:first-child,
.group-project-table td:first-child {
    width: 10rem;
    white-space: nowrap;
}

.group-project-table th:nth-child(2),
.group-project-table td:nth-child(2) {
    min-width: 14rem;
}

.group-project-table .customer-table-actions {
    white-space: nowrap;
}

.group-project-table .customer-table-actions > * + * {
    margin-left: 0.4rem;
}

.group-project-footer {
    align-items: center;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.85rem;
}

@media (max-width: 900px) {
    .group-project-search {
        max-width: none;
    }

    .group-project-footer {
        justify-content: flex-start;
    }
}

.chip-action {
    padding: 0 0.3rem;
}

.tile-key {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    color: #5a6478;
}

.tile-title {
    font-weight: 600;
}

.tile-desc {
    font-size: 0.9rem;
    color: #6b7285;
}

.chip button,
.tile button {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
}

.tab-header {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e6e9f2;
    padding-bottom: 0.35rem;
}

.tab-button {
    border: none;
    background: none;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    color: #6b7285;
    border-radius: 999px;
    cursor: pointer;
}

.tab-button.active {
    background: #eef2ff;
    color: #1f6feb;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.issue-total-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.15rem;
}

.issue-state-count-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.issue-state-badge.issue-state-count {
    min-width: auto;
    gap: 0.25rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.74rem;
}

.issue-state-count-filter {
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    border-width: 1px;
    transition: opacity 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.issue-state-count-filter.selected {
    opacity: 1;
    border-style: solid;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.issue-state-count-filter:not(.selected) {
    opacity: 0.45;
    border-style: dashed;
    background: #ffffff;
    border-color: #d0d7de;
    color: #6b7280;
}

.issue-state-count-filter:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.issue-state-count-filter.selected:hover {
    opacity: 1;
}

.issue-state-badge.issue-state-count strong {
    font-size: 0.78rem;
    font-weight: 800;
}

.issue-state-badge.issue-state-count.state-open {
    background: rgba(218, 251, 225, 0.7);
}

.issue-state-badge.issue-state-count.state-assigned {
    background: rgba(221, 244, 255, 0.7);
}

.issue-state-badge.issue-state-count.state-progress {
    background: rgba(234, 230, 255, 0.7);
}

.issue-state-badge.issue-state-count.state-review {
    background: rgba(255, 248, 197, 0.7);
}

.issue-state-badge.issue-state-count.state-resolved {
    background: rgba(215, 245, 239, 0.7);
}

.issue-state-badge.issue-state-count.state-needs-info {
    background: rgba(255, 235, 233, 0.7);
}

.issue-state-badge.issue-state-count.state-closed {
    background: rgba(246, 248, 250, 0.7);
}

.issue-item {
    border: 1px solid #e7ebf3;
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    margin-bottom: 0.6rem;
    background: #fff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.issue-item:hover {
    border-color: #cfdaf5;
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.06);
}

.issue-item.compact {
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
}

.issue-item.state-closed .badge.issue-id,
.issue-item.state-closed .issue-header strong,
.issue-item.state-closed .issue-meta,
.issue-item.state-closed .issue-meta.muted {
    color: var(--closed-issue-text-color, #4B5563);
}

.issue-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 0.65rem;
}

.issue-row.clickable {
    cursor: pointer;
}

.issue-row .badge.issue-id {
    margin-right: 0;
}

.issue-content {
    min-width: 0;
}

.issue-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.issue-header.clickable {
    cursor: pointer;
}

.assigned-issue-item {
    cursor: pointer;
}

.assigned-issue-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.status-history-card {
    padding-bottom: 1rem;
}

.status-history-list {
    list-style: none;
    padding-left: 0;
    margin: 0.35rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.status-history-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding: 0.35rem 0;
    border-top: 1px solid #edf0f5;
    font-size: 0.88rem;
}

.status-history-item:first-child {
    border-top: 0;
}

.status-history-time {
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.status-history-user {
    font-weight: 600;
    color: #111827;
}

.status-history-arrow {
    color: #6b7280;
    font-weight: 700;
}

.notification-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    width: 100%;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.7rem 0.85rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}

.notification-item:hover {
    border-color: #cfdaf5;
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.06);
}

.notification-item.unread {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.notification-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.notification-title {
    color: #111827;
    font-weight: 700;
}

.notification-body {
    color: #4b5563;
    font-size: 0.9rem;
}

.notification-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.82rem;
    white-space: nowrap;
}

.watch-list-card {
    margin-top: 1rem;
}

.watch-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.watch-list-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.watch-list-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.watch-list-title {
    color: #111827;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watch-list-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.82rem;
}

.watch-list-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.watch-remove-button {
    min-width: 2rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

@media (max-width: 640px) {
    .watch-list-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .watch-list-title {
        white-space: normal;
    }

    .watch-list-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.issue-link-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.activity-group-list {
    gap: 0.5rem;
}

.activity-page-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.activity-filter-bar {
    align-items: flex-end;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
}

.activity-filter-field {
    flex: 0 0 11rem;
    margin-bottom: 0;
}

.activity-filter-field.compact {
    flex-basis: 8rem;
}

.activity-filter-search {
    flex: 1 1 16rem;
    margin-bottom: 0;
    min-width: 12rem;
}

.activity-filter-button {
    min-height: 2.45rem;
}

.activity-group-item {
    border-bottom: 1px solid #edf0f5;
    padding: 0.35rem 0 0.5rem;
}

.activity-group-item:last-child {
    border-bottom: 0;
}

.activity-group-main {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.activity-group-meta {
    color: #6b7280;
    font-size: 0.82rem;
    margin: 0.15rem 0 0 0.1rem;
}

.activity-group-details {
    color: #4b5563;
    font-size: 0.84rem;
    margin-top: 0.25rem;
    padding-left: 0.1rem;
}

.activity-group-details summary {
    cursor: pointer;
    font-weight: 600;
}

.activity-group-details ul {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
}

.activity-group-details li {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.release-issue-list {
    list-style: none;
    padding-left: 0;
    margin: 0.4rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.release-issue-row {
    width: 100%;
    min-height: 44px;
    border: 1px solid #dfe5f4;
    border-radius: 8px;
    background: #f8faff;
    color: #1c2541;
    padding: 0.58rem 0.7rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.release-issue-row.static {
    cursor: default;
    background: #ffffff;
}

button.release-issue-row:hover {
    border-color: #c7d2fe;
    background: #f3f6ff;
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.05);
}

button.release-issue-row:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.release-issue-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    height: 1.55rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #e8eefc;
    color: #1f4f95;
    font-size: 0.86rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.release-issue-title {
    min-width: 0;
    color: #111827;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.release-issue-state {
    justify-self: end;
    color: #6b7280;
    font-size: 0.82rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .release-issue-row {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 0.4rem 0.55rem;
    }

    .release-issue-state {
        grid-column: 2;
        justify-self: start;
    }
}

.link-chip {
    border: 1px solid #dfe5f4;
    background: #f8faff;
    color: #1c2541;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.relation-issue-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    margin-right: 0;
    padding: 0.1rem 0.5rem;
    background: #e7edf3;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    color: #24292f;
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.relation-search-modal {
    max-width: 560px;
}

.relation-search-control input {
    min-width: 0;
    max-width: 360px;
}

.relation-search-list {
    margin-top: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
}

.issue-search-panel {
    margin-bottom: 0.85rem;
    padding: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.issue-search-grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr));
    gap: 0.65rem 0.75rem;
    align-items: end;
}

.issue-search-grid .form-field {
    margin-bottom: 0;
}

.issue-search-basic-grid {
    grid-template-columns: minmax(320px, 1fr) auto;
    align-items: end;
}

.issue-search-query {
    grid-column: span 2;
}

.issue-search-basic-grid .issue-search-query {
    grid-column: auto;
}

.issue-search-advanced-panel {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #eef2f7;
}

.issue-search-advanced-grid {
    grid-template-columns: minmax(140px, 0.75fr) minmax(140px, 0.75fr) minmax(150px, 1fr) minmax(150px, 1fr);
}

.issue-date-start {
    grid-column: 3;
}

.issue-date-end {
    grid-column: 4;
}

.issue-search-actions {
    justify-self: end;
    justify-content: flex-end;
    align-self: end;
    gap: 0.4rem;
    margin-top: 0;
    white-space: nowrap;
}

.issue-search-actions > .primary-button,
.issue-search-actions > .secondary-button {
    flex: 0 0 auto;
    height: 2.55rem;
    padding: 0.48rem 0.7rem;
    min-width: 0;
}

.issue-search-actions > .primary-button {
    min-width: 4rem;
}

.issue-search-actions > .secondary-button {
    min-width: 5.25rem;
}

.issue-search-advanced-actions {
    justify-content: flex-end;
    margin-top: 0;
    margin-bottom: 0.65rem;
}

.issue-search-advanced-actions > .secondary-button {
    height: 2.55rem;
    min-width: 4.75rem;
    padding: 0.48rem 0.75rem;
}

.issue-filter-summary {
    margin-top: 0.35rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid #dbe3f0;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 0.84rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .issue-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .issue-search-basic-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .issue-search-advanced-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .issue-search-query {
        grid-column: 1 / -1;
    }

    .issue-search-basic-grid .issue-search-query {
        grid-column: 1 / -1;
    }

    .issue-date-start,
    .issue-date-end {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .issue-search-grid {
        grid-template-columns: 1fr;
    }

    .issue-search-basic-grid {
        grid-template-columns: 1fr;
    }

    .issue-search-query {
        grid-column: auto;
    }

    .issue-search-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .issue-search-actions > .primary-button,
    .issue-search-actions > .secondary-button,
    .issue-search-advanced-actions > .secondary-button {
        min-width: 0;
    }
}

.active-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #f6f8fa;
}

.tag-create-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}

.tag-create-grid .form-field {
    margin-bottom: 0;
}

.tag-create-action {
    display: flex;
    align-items: end;
}

.tag-stat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tag-stat-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    background: #ffffff;
}

.tag-stat-main,
.tag-stat-counts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-stat-link {
    min-width: 0;
}

.tag-edit-panel {
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.tag-transfer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.modal-card.tag-transfer-modal {
    width: min(680px, calc(100vw - 2rem));
    max-width: 680px;
}

.tag-transfer-toolbar,
.tag-import-source-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.tag-import-source-actions {
    justify-content: flex-start;
}

.tag-import-file-button {
    display: inline-flex;
    align-items: center;
}

.tag-transfer-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 360px;
    overflow: auto;
    padding-right: 0.2rem;
}

.tag-transfer-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(90px, auto);
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.tag-transfer-row.disabled {
    background: #f6f8fa;
    color: #6b7280;
}

.tag-transfer-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.tag-transfer-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.tag-transfer-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tag-transfer-color {
    color: #4b5563;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.84rem;
    text-align: right;
    overflow-wrap: anywhere;
}

.tag-transfer-status {
    margin-top: 0.75rem;
}

.agent-token-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px);
    gap: 0.75rem;
    align-items: end;
}

.compact-header {
    margin-bottom: 0.5rem;
}

.agent-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem;
}

.agent-project-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.agent-token-created {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
    border: 1px solid #82d3a2;
    border-radius: 8px;
    background: #ecfdf3;
}

.agent-token-created input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid #82d3a2;
    border-radius: 6px;
    background: #ffffff;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
}

.agent-token-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-token-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.agent-token-row.editing {
    align-items: flex-start;
    flex-wrap: wrap;
}

.agent-token-main {
    min-width: 0;
}

.agent-token-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.agent-token-editor {
    flex: 1 1 100%;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.agent-token-editor .button-row {
    margin-top: 0.75rem;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .tag-create-grid,
    .tag-stat-row,
    .tag-transfer-row,
    .agent-token-form {
        grid-template-columns: 1fr;
    }

    .tag-transfer-actions,
    .tag-transfer-toolbar {
        justify-content: flex-start;
    }

    .tag-create-action {
        align-items: stretch;
    }

    .agent-token-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.badge.on-light {
    background: #1f6feb;
    color: #fff;
}
.issue-actions .small,
.secondary-button.small,
.primary-button.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

.form-select.small {
    padding: 0.45rem 0.6rem;
    font-size: 0.95rem;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .name-value-form {
        grid-template-columns: 1fr;
    }

    .workspace-panel.span-2 {
        grid-column: span 1;
    }

    .group-header {
        flex-direction: column;
    }

    .ops-module-row {
        grid-template-columns: 4.5rem minmax(0, 1fr);
        gap: 0.6rem 0.8rem;
    }

    .ops-module-state {
        grid-column: 2;
    }

    .ops-module-action {
        grid-column: 2;
        justify-content: flex-start;
    }
}

/* Top navigation */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #f6f8fa;
    color: #24292f;
    border-bottom: 1px solid #d0d7de;
}

.top-links {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.top-links .nav-link {
    color: #24292f;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.top-links .nav-link.active {
    color: #24292f;
    border-bottom: 2px solid #0969da;
    padding-bottom: 0.2rem;
}

/* GitHub-like overrides */
body {
    background: #f6f8fa;
    color: #24292f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: #0969da;
}

.primary-button {
    background: #2da44e;
    border: 1px solid #2da44e;
    box-shadow: 0 4px 8px rgba(45, 164, 78, 0.15);
    color: #fff;
}

.secondary-button {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    color: #24292f;
}

.workspace-panel,
.card {
    border: 1px solid #d0d7de;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    margin-bottom: 1rem;
}

.card {
    padding: 1rem 1.25rem;
    background: #ffffff;
}

.card.modern {
    padding: 1.1rem 1.25rem;
}

.card h3 {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #24292f;
}

.content {
    padding-top: 1.5rem;
}

.tile {
    border: 1px solid #d0d7de;
}

.tile:hover {
    border-color: #afb8c1;
}

/* Link-style buttons (e.g., 홈 내 그룹 리스트) */
.link-button {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #0969da;
    cursor: pointer;
}

.link-button:hover {
    text-decoration: underline;
}

/* Make hero buttons less bulky */
.hero-actions .primary-button {
    flex: 0;
    padding: 0.35rem 0.75rem;
    box-shadow: none;
}

.muted.small {
    font-size: 0.8rem;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    max-width: 1800px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1.5rem 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #57606a;
    margin-bottom: 0.75rem;
}

.breadcrumb a,
.breadcrumb button.link-button {
    color: #0969da;
    text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb button.link-button:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #8c939f;
}

.breadcrumb-current {
    color: #24292f;
    font-weight: 500;
}

.issue-number-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: copy;
    user-select: none;
}

.copy-feedback {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    background: #dafbe1;
    border: 1px solid #aceebb;
    color: #116329;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}

.badge.issue-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.1rem 0.5rem;
    margin-right: 0.4rem;
    background: #e7edf3;
    color: #24292f;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.issue-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.8rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.issue-state-badge.state-open {
    background: #dafbe1;
    border-color: #aceebb;
    color: #116329;
}

.issue-state-badge.state-assigned {
    background: #ddf4ff;
    border-color: #b6e3ff;
    color: #0550ae;
}

.issue-state-badge.state-progress {
    background: #eae6ff;
    border-color: #d8ceff;
    color: #5a32a3;
}

.issue-state-badge.state-review {
    background: #fff8c5;
    border-color: #f0d98c;
    color: #7d4e00;
}

.issue-state-badge.state-resolved {
    background: #d7f5ef;
    border-color: #9ee6d4;
    color: #0f766e;
}

.issue-state-badge.state-needs-info {
    background: #ffebe9;
    border-color: #ffcecb;
    color: #a40e26;
}

.issue-state-badge.state-closed {
    background: #f6f8fa;
    border-color: #d0d7de;
    color: #57606a;
}

.issue-header strong {
    font-size: 1.05rem;
}

.issue-meta {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.meta {
    font-size: 0.85rem;
    color: #6e7781;
}

.meta.small {
    font-size: 0.8rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    font-size: 0.8rem;
    color: #57606a;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #111827;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.activity-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #fff8c5;
    border: 1px solid #f0d98c;
    color: #7d4e00;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.section-subtitle {
    margin: 1rem 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    font-size: 0.8rem;
    color: #374151;
}

.priority-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.13rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #ffffff;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.priority-chip.priority-urgent {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.priority-chip.priority-high {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.priority-chip.priority-low {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.priority-chip.priority-trivial {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.assignee-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 600;
}

.assignee-selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 0.75rem;
}

.assignee-option {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr);
    gap: 0.35rem 0.5rem;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.assignee-option input {
    grid-row: span 2;
}

.assignee-option-name {
    font-weight: 600;
    color: #111827;
}

.assignee-option-email {
    color: #6b7280;
    font-size: 0.82rem;
}

.label-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
}

.issue-meta-table {
    width: auto;
    border-collapse: collapse;
    margin: 0.5rem 0 1rem;
    font-size: 0.88rem;
}

.issue-meta-table th {
    text-align: left;
    padding: 0.25rem 0.5rem 0.25rem 0;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
}

.issue-meta-table td {
    padding: 0.25rem 0;
    color: #111827;
}

.admin-user-table-wrapper {
    margin-top: 0.75rem;
    overflow-x: auto;
}

.issue-meta-table.admin-user-table {
    width: 100%;
    border: 1px solid #d0d7de;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 0.75rem 0 1rem;
}

.admin-user-table th,
.admin-user-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.admin-user-table th:not(:last-child),
.admin-user-table td:not(:last-child) {
    border-right: 1px solid #edf0f5;
}

.admin-user-table th {
    background: #f6f8fa;
    color: #374151;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.admin-user-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-user-name {
    font-weight: 700;
}

.admin-user-email {
    color: #374151;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.84rem;
}

.admin-user-actions-header {
    text-align: right !important;
}

.admin-user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    white-space: nowrap;
}

.admin-user-groups {
    max-width: 18rem;
}

.admin-user-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-project-table-wrapper {
    margin-top: 0.75rem;
    overflow-x: auto;
}

.issue-meta-table.admin-project-table {
    width: 100%;
    border: 1px solid #d0d7de;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 0.75rem 0 1rem;
}

.admin-project-table th,
.admin-project-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.admin-project-table th:not(:last-child),
.admin-project-table td:not(:last-child) {
    border-right: 1px solid #edf0f5;
}

.admin-project-table th {
    background: #f6f8fa;
    color: #374151;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.admin-project-table tbody tr:last-child td {
    border-bottom: 0;
}

.item-kind-table th:nth-child(1) {
    width: 8rem;
}

.item-kind-table th:nth-child(3),
.item-kind-table th:nth-child(4),
.item-kind-table td:nth-child(3),
.item-kind-table td:nth-child(4) {
    text-align: center;
    width: 6rem;
}

.item-kind-table th:nth-child(5) {
    width: 12rem;
}

.item-kind-table input[type="text"] {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    max-width: 26rem;
    padding: 0.42rem 0.5rem;
    width: 100%;
}

.item-kind-table input[type="checkbox"] {
    height: 1rem;
    width: 1rem;
}

.item-kind-table .button-row {
    gap: 0.4rem;
    justify-content: flex-start;
    margin-top: 0;
}

.item-kind-table .button-row > .primary-button,
.item-kind-table .button-row > .secondary-button {
    min-width: 0;
}

.item-kind-table .empty-cell {
    color: #6b7280;
    padding: 1rem 0.75rem;
    text-align: center;
}

.item-kind-add-block {
    background: #f8fafc;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    margin-top: 1rem;
    max-width: 680px;
    padding: 0.9rem 1rem 1rem;
}

.item-kind-add-block h3 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.item-kind-add-row {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.item-kind-add-name {
    flex: 1 1 20rem;
    margin-bottom: 0;
    max-width: 28rem;
}

.item-kind-add-name label {
    font-size: 0.9rem;
}

.item-kind-add-name input {
    height: 2.45rem;
}

.item-kind-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    color: #374151;
    display: inline-flex;
    font-weight: 600;
    gap: 0.4rem;
    height: 2.45rem;
    padding: 0 0.75rem;
}

.item-kind-toggle input {
    height: 1rem;
    width: 1rem;
}

.item-kind-add-submit {
    height: 2.45rem;
    min-width: 5rem;
}

.admin-project-name {
    font-weight: 700;
}

.admin-project-key {
    color: #374151;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.84rem;
    white-space: nowrap;
}

.admin-project-description {
    color: #4b5563;
    max-width: 28rem;
    overflow-wrap: anywhere;
}

.admin-project-actions-header {
    text-align: right !important;
}

.admin-project-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem;
    white-space: nowrap;
}

.admin-project-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-project-chip {
    gap: 0.35rem;
    padding-right: 0.25rem;
}

.secondary-button.small.admin-project-chip-action {
    padding: 0.1rem 0.35rem;
    font-size: 0.78rem;
}

.admin-project-add-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-project-select {
    min-width: 14rem;
    max-width: 22rem;
}

.appearance-settings-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
}

.appearance-settings-form {
    max-width: 34rem;
}

.color-input-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.color-picker-input {
    border: 1px solid #c7ccd6;
    border-radius: 8px;
    cursor: pointer;
    height: 2.45rem;
    padding: 0.15rem;
    width: 3.25rem;
}

.color-text-input {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    max-width: 14rem;
    min-width: 9rem;
}

.appearance-settings-actions {
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.appearance-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.appearance-preview .issue-item {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .appearance-settings-grid {
        grid-template-columns: 1fr;
    }
}

.user-state-badge,
.admin-role-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.user-state-badge.active {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.user-state-badge.inactive {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}

.admin-role-badge {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.confirm-user-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    margin: 0.85rem 0 0;
}

.confirm-user-summary dt {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
}

.confirm-user-summary dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.user-action-modal {
    max-width: 460px;
}

.permission-user-card {
    margin-bottom: 1rem;
}

.permission-page-header,
.permission-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.permission-page-header h3,
.permission-section-header h3 {
    margin: 0;
}

.permission-table-wrapper {
    margin-top: 0.75rem;
    overflow-x: auto;
}

.permission-add-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.permission-add-select {
    min-width: 14rem;
    max-width: 24rem;
}

.issue-meta-table.permission-table {
    width: 100%;
    border: 1px solid #d0d7de;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 0.75rem 0 1rem;
}

.permission-table th,
.permission-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.permission-table th:not(:last-child),
.permission-table td:not(:last-child) {
    border-right: 1px solid #edf0f5;
}

.permission-table th {
    background: #f6f8fa;
    color: #374151;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.permission-table tbody tr:last-child td {
    border-bottom: 0;
}

.permission-actions-header {
    text-align: right !important;
}

.permission-target-name {
    font-weight: 700;
}

.permission-project-title,
.permission-role-list,
.permission-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.permission-project-title {
    min-width: 12rem;
}

.permission-actions {
    justify-content: flex-end;
    white-space: nowrap;
}

.permission-role-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.permission-role-badge.manager {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.permission-role-badge.member {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.permission-role-badge.archived {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}

.patch-file-table {
    width: 100%;
}

.patch-file-table th,
.patch-file-table td {
    padding: 0.45rem 0.6rem 0.45rem 0;
    vertical-align: top;
}

.patch-file-list-table th,
.patch-file-list-table td {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    vertical-align: middle;
    line-height: 1.25;
}

.patch-file-list-table th:nth-child(1),
.patch-file-list-table td:nth-child(1) {
    width: 4.5rem;
    white-space: nowrap;
}

.patch-file-list-table th:nth-child(2),
.patch-file-list-table td:nth-child(2) {
    min-width: 20rem;
}

.patch-file-list-table th:nth-child(3),
.patch-file-list-table td:nth-child(3),
.patch-file-list-table th:nth-child(5),
.patch-file-list-table td:nth-child(5),
.patch-file-list-table th:nth-child(6),
.patch-file-list-table td:nth-child(6),
.patch-file-list-table th:nth-child(7),
.patch-file-list-table td:nth-child(7),
.patch-file-list-table th:nth-child(8),
.patch-file-list-table td:nth-child(8),
.patch-file-list-table th:nth-child(9),
.patch-file-list-table td:nth-child(9) {
    text-align: right;
    white-space: nowrap;
}

.patch-file-list-table th:nth-child(4),
.patch-file-list-table td:nth-child(4) {
    text-align: left;
    white-space: nowrap;
    width: 12rem;
}

.patch-file-list-table th:nth-child(8),
.patch-file-list-table td:nth-child(8) {
    width: 9rem;
}

.patch-file-path {
    display: block;
    margin-top: 0.05rem;
    line-height: 1.2;
}

.patch-sha-cell {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patch-file-list-table .secondary-button.small {
    padding: 0.25rem 0.55rem;
    border-radius: 7px;
    font-size: 0.82rem;
    line-height: 1.2;
}

.modal-card.patch-overwrite-modal {
    max-width: min(560px, calc(100vw - 2rem));
    width: min(560px, calc(100vw - 2rem));
}

.patch-overwrite-list {
    max-height: 18rem;
    margin: 0.75rem 0 1rem;
    padding: 0.65rem 0.75rem;
    overflow: auto;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #f6f8fa;
    list-style: none;
}

.patch-overwrite-list li + li {
    margin-top: 0.35rem;
}

.patch-overwrite-actions {
    justify-content: flex-end;
}

.modal-card.patch-confirm-modal {
    max-width: min(440px, calc(100vw - 2rem));
    width: min(440px, calc(100vw - 2rem));
}

.patch-confirm-actions {
    justify-content: flex-end;
    margin-top: 1rem;
}

.mono-cell {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}

.list-table,
.nested-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.list-table th,
.list-table td,
.nested-info-table th,
.nested-info-table td {
    border: 1px solid #d7dde6;
    padding: 0.45rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.list-table th,
.nested-info-table th {
    background: #f3f6fa;
    color: #374151;
    font-weight: 600;
}

.compact-table th,
.compact-table td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.release-assignment-table {
    max-width: 920px;
}

.release-target-filter {
    max-width: 320px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    min-width: 280px;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.modal-card.item-supplier-copy-modal {
    max-height: min(820px, 92vh);
    max-width: min(960px, calc(100vw - 2rem)) !important;
    overflow: auto;
    width: min(960px, calc(100vw - 2rem)) !important;
}

.cs-status-modal {
    max-width: min(500px, calc(100vw - 2rem));
    width: min(500px, calc(100vw - 2rem));
}

.bom-target-button {
    width: 100%;
    max-width: 26rem;
    justify-content: flex-start;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bom-target-button.empty {
    color: #6b7280;
}

.bom-structure-code {
    min-width: 6.5rem;
    white-space: nowrap;
}

.bom-cell-link {
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}

.bom-cell-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.bom-group-row td {
    background: #f8fafc;
    font-weight: 600;
}

.bom-group-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bom-change-target-button {
    min-width: 3.5rem;
}

.bom-editor-toolbar {
    flex-wrap: wrap;
}

.bom-editor-toolbar > .primary-button,
.bom-editor-toolbar > .secondary-button {
    min-width: auto;
}

.bom-move-mode.active {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #075985;
}

.bom-line-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 0;
}

.bom-line-actions .secondary-button {
    min-width: 0;
}

.bom-line-action {
    width: 2rem;
    padding: 0.35rem 0;
}

.bom-line-delete {
    min-width: 3rem;
    padding: 0.35rem 0.5rem;
}

.bom-picker-backdrop {
    padding: 1rem;
}

.bom-picker-modal {
    width: min(720px, 96vw);
    max-width: 720px;
    max-height: min(760px, 92vh);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bom-picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.bom-picker-header h3 {
    margin: 0;
}

.bom-picker-search {
    margin-bottom: 0;
}

.bom-picker-search input {
    width: 100%;
}

.bom-picker-results {
    display: grid;
    gap: 0.45rem;
    max-height: 430px;
    overflow: auto;
    padding-right: 0.2rem;
}

.bom-picker-option {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.15rem;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
}

.bom-picker-option strong {
    color: #111827;
}

.bom-picker-option span {
    color: #5f6878;
    font-size: 0.9rem;
}

.bom-confirm-modal {
    max-width: 520px;
}

.bom-import-modal {
    max-height: min(780px, 92vh);
    max-width: 980px;
    overflow: auto;
    width: min(980px, 96vw);
}

.bom-purchase-candidate-modal {
    max-height: min(820px, 94vh);
    max-width: 1100px;
    overflow: auto;
    width: min(1100px, 96vw);
}

.purchase-manual-line-modal {
    max-height: min(720px, 92vh);
    max-width: 920px;
    overflow: auto;
    width: min(920px, 96vw);
}

.quote-form-meta-table.purchase-manual-line-table th {
    width: 8rem;
}

.quote-form-meta-table.purchase-manual-line-table td {
    width: calc((100% - 16rem) / 2);
}

.quote-form-meta-table.purchase-manual-line-table .purchase-manual-quantity-cell {
    width: 10rem;
}

.quote-form-meta-table.purchase-manual-line-table .purchase-manual-unit-label {
    width: 5rem;
}

.quote-form-meta-table.purchase-manual-line-table .purchase-manual-unit-cell {
    width: 7rem;
}

.purchase-manual-line-table .purchase-manual-unit-cell input {
    max-width: 5rem;
}

.purchase-manual-line-table textarea {
    min-height: 5rem;
    width: 100%;
}

.item-tag-modal {
    width: min(760px, 96vw);
    max-width: 760px;
    max-height: min(760px, 92vh);
    overflow: auto;
}

.item-tag-select-box {
    display: grid;
    gap: 0.65rem;
}

.item-tag-select-box > .secondary-button {
    justify-self: start;
}

.item-selected-tag {
    padding-right: 0.25rem;
}

.item-selected-tag-remove {
    align-items: center;
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    height: 1.15rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1.15rem;
}

.item-selected-tag-remove:hover {
    color: #b91c1c;
}

.item-tag-picker-list {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.75rem;
    max-height: 360px;
    overflow: auto;
}

.item-tag-picker-option {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    gap: 0.45rem;
    justify-content: flex-start;
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.item-tag-picker-option:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.item-tag-color-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-tag-color-input {
    max-width: 9rem;
    min-width: 7rem;
}

.item-tag-color-preview {
    min-width: 6.5rem;
}

.item-tag-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.item-tag-color-swatch {
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    height: 1.45rem;
    padding: 0;
    width: 1.45rem;
}

.item-tag-color-swatch:hover {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2563eb;
}

.bom-import-warning-list {
    margin: 0.75rem 0 0;
    max-height: 220px;
    overflow: auto;
    padding-left: 1.2rem;
}

.bom-import-warning-list li + li {
    margin-top: 0.25rem;
}

.bom-import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.bom-import-summary span {
    background: #f1f5f9;
    border: 1px solid #d8dee8;
    border-radius: 999px;
    color: #334155;
    font-size: 0.9rem;
    padding: 0.25rem 0.65rem;
}

.bom-import-table-wrap {
    border: 1px solid #d8dee8;
    border-radius: 8px;
    max-height: 340px;
    overflow: auto;
}

.bom-import-table {
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 720px;
    width: 100%;
}

.bom-import-table th,
.bom-import-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.45rem 0.55rem;
    vertical-align: top;
}

.bom-import-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bom-import-warning-panel {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    margin-top: 0.9rem;
    padding: 0.75rem 0.9rem;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.file-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.file-list-main {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.file-list-main a,
.file-name-link {
    word-break: break-all;
}

.file-name-link {
    background: transparent;
    border: 0;
    color: #0969da;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
    text-decoration: underline;
}

.file-name-link:active {
    transform: none;
}

.file-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.image-preview-backdrop {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.68);
}

.image-preview-modal {
    width: min(1120px, 96vw);
    height: min(780px, 92vh);
    max-width: none;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 8px;
}

.image-preview-modal-fullscreen {
    width: calc(100vw - 2rem);
    height: calc(100vh - 2rem);
    max-height: calc(100vh - 2rem);
}

.image-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}

.image-preview-title {
    min-width: 0;
}

.image-preview-title h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-all;
}

.image-preview-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.image-preview-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #111827;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.image-preview-stage.is-panning {
    cursor: grabbing;
}

.image-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    user-select: none;
}

.image-full-page {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #111827;
    color: #f9fafb;
}

.image-full-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #d0d7de;
    background: #ffffff;
    color: #24292f;
}

.image-full-title {
    min-width: 0;
}

.image-full-title h1 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-all;
}

.image-full-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.image-full-actions .secondary-button {
    white-space: nowrap;
}

.image-full-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #111827;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.image-full-stage.is-panning {
    cursor: grabbing;
}

.image-full-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    user-select: none;
}

.image-full-message {
    margin: 2rem;
}

@media (max-width: 700px) {
    .file-list-item,
    .image-preview-header,
    .image-full-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-list-actions,
    .image-preview-actions,
    .image-full-actions {
        justify-content: flex-start;
    }
}

.detail-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    overflow-x: auto;
}

.detail-tab-button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
}

.detail-tab-button.active {
    border-bottom-color: #2563eb;
    color: #111827;
}

.task-document {
    margin-top: 0.5rem;
}

.task-document-meta {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
}

.comment-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.comment-item {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #111827;
}

.comment-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.comment-body {
    margin-top: 0.25rem;
}

.comment-attachment-list {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: flex-start;
}

.comment-pending-list {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.comment-attachment-item {
    align-items: stretch;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    flex: 0 0 180px;
    flex-direction: column;
    gap: 0.45rem;
    justify-content: flex-start;
    min-width: 0;
    padding: 0.5rem;
    width: 180px;
}

.comment-pending-item {
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    gap: 0.55rem;
    justify-content: space-between;
    padding: 0.45rem 0.55rem;
}

.comment-attachment-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.comment-pending-main {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.comment-attachment-main a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-attachment-main .meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-attachment-item > .secondary-button.small {
    align-self: flex-start;
}

.comment-pending-name {
    overflow-wrap: anywhere;
}

.comment-thumbnail-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    height: 150px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.comment-thumbnail-button:active {
    transform: none;
}

.comment-thumbnail-image {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.badge.soft {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.45rem;
    white-space: nowrap;
}

.comment-new {
    margin-top: 1rem;
}

.comment-textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    resize: vertical;
}

.pager {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.issue-list-pager {
    justify-content: center;
}

.pager .secondary-button {
    padding: 0.35rem 0.6rem;
    min-width: auto;
}

.form-field textarea.tall-textarea {
    min-height: 20rem;
}

.knowledge-form-grid {
    display: grid;
    grid-template-columns: minmax(14rem, 1.6fr) minmax(10rem, 1fr) minmax(10rem, 1fr);
    gap: 0.75rem;
}

.knowledge-form-grid.compact {
    grid-template-columns: minmax(12rem, 16rem) minmax(14rem, 1fr);
    align-items: end;
}

.knowledge-attachment-toggle {
    min-height: 2.4rem;
}

.knowledge-list {
    display: grid;
    gap: 0.5rem;
}

.knowledge-upload-panel {
    margin: 1rem 0;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.knowledge-file-upload-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.knowledge-group-manager {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.knowledge-group-manager .knowledge-file-upload-controls {
    justify-content: flex-start;
}

.knowledge-file-group-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.knowledge-file-group-field > span {
    color: #475569;
    font-size: 0.82rem;
    white-space: nowrap;
}

.knowledge-file-group-input,
.knowledge-file-group-select {
    width: min(220px, 100%);
    min-height: 2rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.knowledge-file-group-select {
    width: min(180px, 100%);
}

.knowledge-file-group {
    display: grid;
    gap: 0.4rem;
}

.knowledge-file-group + .knowledge-file-group {
    margin-top: 0.9rem;
}

.knowledge-file-group-list + .knowledge-file-group {
    margin-top: 0.9rem;
}

.knowledge-file-group-header {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid #e5e7eb;
}

.knowledge-file-group-list {
    gap: 0.4rem;
}

.knowledge-file-main {
    flex-direction: column;
    align-items: flex-start;
}

.knowledge-file-key {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    overflow-wrap: anywhere;
}

.knowledge-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.35rem 0 0.75rem;
}

.knowledge-body-rich-text {
    margin-top: 0.75rem;
}

.overview-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
}

.overview-summary-section {
    min-width: 0;
}

@media (max-width: 760px) {
    .knowledge-form-grid {
        grid-template-columns: 1fr;
    }
}


.release-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.release-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.release-group-card {
    background: #f8fafc;
}

.release-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.release-group-item {
    align-items: center;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 7px;
    color: #24292f;
    cursor: pointer;
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
}

.release-group-item:hover {
    background: #f6f8fa;
}

.release-card {
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.release-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.release-heading {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.release-version-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.release-version {
    font-weight: 600;
    color: #24292f;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: #e7edf3;
    border: 1px solid #d0d7de;
}

.release-build {
    font-weight: 600;
    color: #24292f;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
}

.release-title {
    color: #24292f;
    line-height: 1.3;
}

.release-list-issue-summary {
    border-left: 2px solid #dfe5f4;
    color: #57606a;
    display: flex;
    flex-direction: column;
    font-size: 0.84rem;
    gap: 0.35rem;
    margin-top: 0.1rem;
    padding-left: 0.75rem;
}

.release-list-issue-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.release-list-issue-label {
    color: #3f4a5f;
    font-weight: 600;
}

.release-list-issue-items {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.release-list-issue-item {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.release-list-issue-number {
    color: #4b5563;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    margin-right: 0.25rem;
}

.detail-version-row {
    margin: 0.2rem 0 0.45rem;
}

.release-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: #57606a;
}

.release-body {
    margin-bottom: 0.4rem;
}

.release-body-rich-text {
    color: #61646f;
    font-size: 0.9rem;
    margin: 0.35rem 0 0;
}

.release-card-body-text {
    color: #6b7280;
    font-size: 0.9rem;
}

.release-publish-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.release-publish-row .form-field {
    margin-bottom: 0;
}

.release-publish-row .release-state-field {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.release-publish-row .release-state-field label {
    margin: 0;
    font-weight: 500;
}

.release-publish-row .release-state-field select {
    width: auto;
    min-width: 108px;
    max-width: 132px;
    padding: 0.3rem 1.9rem 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 1rem;
}

.file-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #f6f8fa;
    color: #0969da;
    font-size: 0.9rem;
}

.rich-text {
    color: #24292f;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.rich-text > :first-child {
    margin-top: 0;
}

.rich-text > :last-child {
    margin-bottom: 0;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    color: #24292f;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.65rem 0 0.35rem;
}

.rich-text h1 {
    font-size: 1.28em;
}

.rich-text h2 {
    font-size: 1.18em;
}

.rich-text h3 {
    font-size: 1.1em;
}

.rich-text h4,
.rich-text h5,
.rich-text h6 {
    font-size: 1.02em;
}

.rich-text p,
.rich-text ul,
.rich-text ol,
.rich-text blockquote,
.rich-text pre,
.rich-text table {
    margin: 0.45rem 0;
}

.rich-text ul,
.rich-text ol {
    padding-left: 1.35rem;
}

.rich-text li {
    margin: 0.12rem 0;
}

.rich-text blockquote {
    border-left: 3px solid #d8dee8;
    color: #57606a;
    padding-left: 0.75rem;
}

.rich-text code {
    background: #f6f8fa;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    padding: 0.08rem 0.28rem;
}

.rich-text pre {
    background: #f6f8fa;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    overflow-x: auto;
    padding: 0.65rem 0.75rem;
}

.rich-text pre code {
    background: transparent;
    border-radius: 0;
    color: #24292f;
    padding: 0;
}

.rich-text .wiki-code-block {
    background: #f6f8fa;
    border-color: #d0d7de;
}

.rich-text .wiki-code-keyword {
    color: #cf222e;
    font-weight: 600;
}

.rich-text .wiki-code-string {
    color: #116329;
}

.rich-text .wiki-code-comment {
    color: #6e7781;
    font-style: italic;
}

.rich-text .wiki-code-number {
    color: #8250df;
}

.rich-text .wiki-code-macro {
    color: #0550ae;
    font-weight: 600;
}

.rich-text table {
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    width: max-content;
    max-width: 100%;
}

.rich-text th,
.rich-text td {
    border: 1px solid #d8dee8;
    padding: 0.35rem 0.55rem;
}

.rich-text th {
    background: #f6f8fa;
}

.rich-text a {
    color: #0969da;
}

.rich-text .wiki-link {
    font-weight: 600;
    text-decoration: none;
}

.rich-text .wiki-link:hover {
    text-decoration: underline;
}

.rich-text .wiki-file-token {
    background: #f6f8fa;
    border: 1px solid #d8dee8;
    border-radius: 4px;
    color: #57606a;
    display: inline-block;
    font-size: 0.92em;
    padding: 0.05rem 0.35rem;
}

.rich-text .wiki-toc {
    background: #f6f8fa;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    margin: 0.75rem 0 1rem;
    padding: 0.65rem 0.85rem;
}

.rich-text .wiki-toc ol {
    margin: 0;
    padding-left: 1.25rem;
}

.rich-text .wiki-toc-level-3 {
    margin-left: 1rem;
}

.rich-text .wiki-toc-level-4,
.rich-text .wiki-toc-level-5,
.rich-text .wiki-toc-level-6 {
    margin-left: 2rem;
}

.rich-text .wiki-toc-link {
    background: transparent;
    border: 0;
    color: #0969da;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
}

.rich-text .wiki-toc-link:hover {
    text-decoration: underline;
}

.rich-text .wiki-clipboard-button {
    background: #f6f8fa;
    border: 1px solid #d8dee8;
    border-radius: 4px;
    color: #0969da;
    cursor: pointer;
    font: inherit;
    padding: 0.05rem 0.4rem;
}

.rich-text .wiki-clipboard-button.copied {
    border-color: #2da44e;
    color: #1a7f37;
}

.rich-text .wiki-clipboard-button.copy-failed {
    border-color: #cf222e;
    color: #cf222e;
}

.rich-text .wiki-image {
    display: block;
    height: auto;
    margin: 0.75rem 0;
    max-width: 100%;
}

.rich-text .wiki-invalid-token {
    color: #cf222e;
}

.rich-text .wiki-footnotes {
    border-top: 1px solid #d8dee8;
    color: #57606a;
    font-size: 0.92em;
    margin-top: 1rem;
    padding-top: 0.5rem;
}

.rich-text .wiki-footnote-ref {
    font-size: 0.8em;
    margin-left: 0.1rem;
}

.rich-text .wiki-footnote-link,
.rich-text .wiki-footnote-backref {
    background: transparent;
    border: 0;
    color: #0969da;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.rich-text .wiki-footnote-link:hover,
.rich-text .wiki-footnote-backref:hover {
    text-decoration: underline;
}

.rich-text .wiki-footnote-backref {
    font-size: 0.9em;
}

.rich-text input[type="checkbox"] {
    margin-right: 0.35rem;
}

.task-document-body {
    margin-top: 0.35rem;
}

.pre-line {
    white-space: pre-line;
}

.upload-button {
    position: relative;
    overflow: hidden;
}

.hidden-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.compact-btn {
    padding: 0.3rem 0.45rem;
    min-width: auto;
}
.button-row.right-align {
    justify-content: flex-end;
}

.full-row-button {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
    text-align: left;
    width: 100%;
}

.full-row-button:hover:not(:disabled) {
    background: transparent;
}

.cs-state-filter {
    flex: 0 1 150px;
    margin-bottom: 0;
}

.cs-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.cs-timeline li {
    border-left: 3px solid #d8dee8;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0.75rem;
}

.cs-timeline li.active-record {
    border-left-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
    padding-bottom: 0.5rem;
    padding-top: 0.5rem;
}

.customer-toolbar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.customer-toolbar .form-field {
    margin-bottom: 0;
}

.customer-search-field {
    flex: 1 1 260px;
}

.customer-list-toolbar {
    align-items: center;
}

.customer-list-toolbar .customer-search-field {
    align-items: center;
    flex-direction: row;
    flex: 1 1 420px;
    gap: 0.6rem;
}

.customer-list-toolbar .customer-search-field label {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.customer-list-toolbar .customer-search-field input {
    flex: 1 1 auto;
    min-width: 0;
}

.customer-list-toolbar .customer-tag-filter {
    flex: 0 0 130px;
}

.customer-list-toolbar .customer-tag-filter select {
    width: 100%;
}

.customer-check {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    min-height: 2.5rem;
}

.customer-check input {
    height: 1rem;
    width: 1rem;
}

.customer-tile .tile-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.customer-state {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.45rem;
}

.customer-state.active {
    background: #ecfdf3;
    color: #05603a;
}

.customer-state.archived {
    background: #f3f4f6;
    color: #4b5563;
}

.customer-tab-content {
    padding-top: 0.5rem;
}

.customer-summary-grid,
.customer-edit-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.customer-edit-meta-table {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-collapse: separate;
    border-radius: 8px;
    border-spacing: 0;
    margin: 0 0 1rem;
    overflow: hidden;
    width: 100%;
}

.customer-edit-meta-table th,
.customer-edit-meta-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.customer-edit-meta-table th {
    background: #f6f8fa;
    color: #141823;
    font-size: 0.86rem;
    font-weight: 700;
    width: 10rem;
    white-space: nowrap;
}

.customer-edit-meta-table td {
    background: #ffffff;
}

.customer-edit-meta-table tr:last-child th,
.customer-edit-meta-table tr:last-child td {
    border-bottom: 0;
}

.customer-edit-meta-table td {
    width: calc((100% - 20rem) / 2);
}

.customer-edit-meta-table input,
.customer-edit-meta-table textarea {
    background: #fff;
    border: 1px solid #c7ccd6;
    border-radius: 8px;
    font: inherit;
    padding: 0.65rem 0.75rem;
    width: 100%;
}

.customer-edit-meta-table input:focus,
.customer-edit-meta-table textarea:focus {
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
    outline: none;
}

.customer-edit-address {
    min-width: min(100%, 42rem);
}

.customer-edit-memo {
    min-height: 8rem;
    resize: vertical;
}

.customer-edit-grid .span-2 {
    grid-column: 1 / -1;
}

.receipt-edit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.receipt-edit-grid .span-4 {
    grid-column: 1 / -1;
}

.receipt-file-group {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.625rem;
    margin-top: 0.75rem;
    padding: 0.85rem;
}

.receipt-file-group .compact-header,
.cs-linked-project-section .compact-header {
    margin-bottom: 0.55rem;
}

.receipt-file-group .compact-header h4,
.cs-linked-project-section .compact-header h4 {
    font-size: 1rem;
    margin: 0;
}

.receipt-file-empty {
    margin: 0;
}

.cs-linked-project-section {
    margin-top: 0.85rem;
}

.cs-linked-project-section .customer-table-wrap,
.receipt-file-group .customer-table-wrap {
    margin-top: 0;
}

.cs-linked-project-table,
.cs-file-table {
    min-width: 620px;
}

.cs-linked-project-table th:first-child,
.cs-linked-project-table td:first-child {
    width: 10rem;
    white-space: nowrap;
}

.cs-file-table th:nth-child(2),
.cs-file-table td:nth-child(2),
.cs-file-table th:nth-child(4),
.cs-file-table td:nth-child(4) {
    white-space: nowrap;
    width: 6rem;
}

.cs-file-table th:nth-child(3),
.cs-file-table td:nth-child(3) {
    white-space: nowrap;
    width: 10rem;
}

.cs-file-memo-input {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.35rem 0.45rem;
    width: 100%;
}

.cs-summary-sections {
    display: grid;
    gap: 0.75rem;
}

.cs-summary-card {
    background: #fff;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    overflow: hidden;
}

.cs-summary-card h4 {
    background: #f3f6fb;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    font-size: 1rem;
    margin: 0;
    padding: 0.55rem 0.75rem;
}

.cs-summary-card-body {
    min-height: 3rem;
    padding: 0.75rem;
}

.cs-summary-card-body > .muted {
    margin: 0;
}

.cs-summary-rich-text {
    overflow-wrap: anywhere;
}

.cs-record-form-table {
    border: 1px solid #e5e7eb;
    border-collapse: collapse;
    margin-top: 0.75rem;
    table-layout: fixed;
    width: 100%;
}

.cs-record-label-col {
    width: 8.5rem;
}

.cs-record-value-col {
    width: calc((100% - 17rem) / 2);
}

.cs-record-form-table th,
.cs-record-form-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.45rem 0.55rem;
    text-align: left;
    vertical-align: middle;
}

.cs-record-form-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.cs-record-form-table tr:last-child th,
.cs-record-form-table tr:last-child td {
    border-bottom: 0;
}

.cs-record-form-table input,
.cs-record-form-table select,
.cs-record-form-table textarea {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.35rem 0.45rem;
    width: 100%;
}

.cs-record-form-table textarea {
    min-height: 5rem;
    resize: vertical;
}

.cs-record-detail-list {
    display: grid;
    gap: 0.35rem 0.75rem;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    margin: 0.55rem 0 0;
}

.cs-record-detail-list dt {
    color: #6b7280;
    font-weight: 700;
}

.cs-record-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.form-section-title {
    border-bottom: 1px solid #e5e7eb;
    color: #334155;
    font-size: 0.9rem;
    letter-spacing: 0;
    margin: 0.25rem 0 0;
    padding-bottom: 0.35rem;
}

@media (max-width: 980px) {
    .receipt-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .receipt-edit-grid {
        grid-template-columns: 1fr;
    }
}

.customer-meta-list {
    display: grid;
    gap: 0.55rem 1rem;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 0;
}

.customer-meta-list dt {
    color: #6b7280;
    font-weight: 700;
}

.customer-meta-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.customer-stat-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.customer-stat-grid div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
}

.customer-stat-grid strong {
    display: block;
    font-size: 1.35rem;
}

.customer-stat-grid span {
    color: #6b7280;
    font-size: 0.85rem;
}

.customer-memo {
    background: #fbfbfd;
    border-left: 3px solid #cbd5e1;
    margin-top: 1rem;
    padding: 0.75rem;
    white-space: pre-line;
}

.customer-edit-block {
    border-top: 1px solid #e5e7eb;
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.customer-link-form {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.customer-link-form .form-field {
    flex: 1 1 260px;
    margin-bottom: 0;
}

.customer-project-picker-modal {
    max-width: min(720px, calc(100vw - 2rem));
    width: min(720px, calc(100vw - 2rem));
}

.cs-issue-picker-modal {
    max-width: min(640px, calc(100vw - 2rem));
    width: min(640px, calc(100vw - 2rem));
}

.cs-issue-picker-button {
    background: #fff;
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    color: #111827;
    cursor: pointer;
    font: inherit;
    min-height: 2.25rem;
    overflow: hidden;
    padding: 0.35rem 0.55rem;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.cs-issue-picker-button.empty {
    color: #6b7280;
}

.cs-issue-picker-button:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.cs-issue-picker-search {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.cs-issue-picker-search input {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    flex: 1 1 auto;
    font: inherit;
    min-width: 0;
    padding: 0.35rem 0.55rem;
}

.cs-issue-picker-results {
    margin-top: 0.75rem;
}

.cs-issue-picker-results li {
    text-align: left;
}

.cs-issue-picker-results .link-chip {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

.cs-linked-issue-memo-input {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.35rem 0.45rem;
    width: 100%;
}

.cs-linked-issue-button {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
}

.cs-linked-issue-button:hover {
    text-decoration: underline;
}

.cs-confirm-modal {
    max-width: min(420px, calc(100vw - 2rem));
    width: min(420px, calc(100vw - 2rem));
}

.cs-delete-confirm-input {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.35rem 0.45rem;
    width: 100%;
}

.customer-contact-modal {
    max-width: min(700px, calc(100vw - 2rem));
    width: min(700px, calc(100vw - 2rem));
}

.customer-project-picker-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    margin: 0.75rem 0;
    max-height: 24rem;
    overflow-y: auto;
}

.customer-picker-row {
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
}

.customer-picker-row:last-child {
    border-bottom: 0;
}

.customer-picker-row:hover {
    background: #f8fafc;
}

.customer-contact-form-table {
    border: 1px solid #e5e7eb;
    border-collapse: collapse;
    margin-top: 0.75rem;
    table-layout: fixed;
    width: 100%;
}

.customer-contact-form-table th,
.customer-contact-form-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.32rem 0.5rem;
    text-align: left;
    vertical-align: middle;
}

.customer-contact-form-label-col {
    width: 5rem;
}

.customer-contact-form-value-col {
    width: calc((100% - 10rem) / 2);
}

.customer-contact-form-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.84rem;
    font-weight: 700;
    padding-right: 15px;
    white-space: nowrap;
}

.customer-contact-form-table tr:last-child th,
.customer-contact-form-table tr:last-child td {
    border-bottom: 0;
}

.customer-contact-form-table input,
.customer-contact-form-table textarea {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.34rem 0.45rem;
    width: 100%;
}

.customer-contact-form-table textarea {
    min-height: 4.25rem;
    resize: vertical;
}

.admin-company-form-table {
    border: 1px solid #d9dee8;
    border-collapse: collapse;
    margin-top: 0.75rem;
    table-layout: fixed;
    width: 100%;
}

.admin-company-label-col {
    width: 11rem;
}

.admin-company-form-table th,
.admin-company-form-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: middle;
}

.admin-company-form-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-company-form-table tr:last-child th,
.admin-company-form-table tr:last-child td {
    border-bottom: 0;
}

.admin-company-form-table input,
.admin-company-form-table textarea {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.4rem 0.5rem;
    width: 100%;
}

.admin-company-address-input {
    min-height: 4rem;
    resize: vertical;
}

.admin-company-footer-input {
    min-height: 7rem;
    resize: vertical;
}

.admin-company-stamp-field {
    display: grid;
    gap: 0.6rem;
}

.admin-company-stamp-preview {
    border: 1px solid #d9dee8;
    border-radius: 6px;
    height: 4.5rem;
    object-fit: contain;
    padding: 0.35rem;
    width: 8rem;
}

.admin-company-stamp-field .button-row {
    justify-content: flex-start;
    margin-top: 0;
}

.admin-company-stamp-field .helper-text,
.admin-company-stamp-field .muted {
    margin: 0;
}

.cs-file-memo-field {
    margin: 0.4rem 0 0;
    max-width: 28rem;
}

@media (max-width: 700px) {
    .customer-contact-form-table,
    .admin-company-form-table,
    .customer-contact-form-table tbody,
    .admin-company-form-table tbody,
    .customer-contact-form-table tr,
    .admin-company-form-table tr,
    .customer-contact-form-table th,
    .admin-company-form-table th,
    .admin-company-form-table td,
    .customer-contact-form-table td {
        display: block;
        width: 100%;
    }

    .customer-contact-form-table th,
    .admin-company-form-table th {
        border-bottom: 0;
        padding-bottom: 0.25rem;
    }

    .customer-contact-form-table td,
    .admin-company-form-table td {
        padding-top: 0.25rem;
    }
}

.customer-table-wrap {
    border: 1px solid #d9dee8;
    border-radius: 8px;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.customer-table {
    border-collapse: collapse;
    min-width: 820px;
    width: 100%;
}

.customer-table.cs-linked-project-table,
.customer-table.cs-file-table {
    min-width: 620px;
}

.customer-table th,
.customer-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: middle;
}

.customer-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.customer-table tbody tr:last-child td {
    border-bottom: 0;
}

.customer-table td {
    overflow-wrap: anywhere;
}

.customer-table .center-cell {
    text-align: center;
}

.customer-table-link {
    color: inherit;
    font-weight: 400;
    text-align: left;
}

.customer-project-table th:first-child,
.customer-project-table td:first-child {
    width: 10rem;
    white-space: nowrap;
}

.customer-project-table th:nth-child(2),
.customer-project-table td:nth-child(2) {
    min-width: 14rem;
}

.customer-contact-table th:first-child,
.customer-contact-table td:first-child,
.customer-contact-table th:nth-child(2),
.customer-contact-table td:nth-child(2),
.customer-contact-table th:nth-child(3),
.customer-contact-table td:nth-child(3) {
    white-space: nowrap;
}

.customer-table-actions {
    text-align: center;
    white-space: nowrap;
}

.customer-project-list,
.customer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.customer-row {
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.customer-row-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.customer-row-main span,
.customer-row-main strong {
    overflow-wrap: anywhere;
}

.customer-row-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .customer-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-row-actions {
        justify-content: flex-start;
    }
}

.quote-line-table-wrap {
    border: 1px solid #d9dee8;
    border-radius: 8px;
    margin-top: 0.75rem;
    overflow-x: auto;
    background: #ffffff;
}

.quote-list-table-wrap {
    border: 1px solid #d9dee8;
    border-radius: 8px;
    overflow-x: auto;
    background: #ffffff;
}

.quote-list-table {
    border-collapse: collapse;
    min-width: 980px;
    width: 100%;
}

.quote-list-table th,
.quote-list-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.quote-list-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-list-table tbody tr:last-child td {
    border-bottom: 0;
}

.quote-list-row {
    cursor: pointer;
}

.quote-list-row:hover,
.quote-list-row:focus {
    background: #f8fafc;
    outline: none;
}

.quote-list-row:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 119, 255, 0.22);
}

.quote-list-no-col {
    color: #64748b;
    width: 3rem;
    white-space: nowrap;
}

.quote-list-number {
    white-space: nowrap;
}

.quote-list-title {
    min-width: 18rem;
}

.quote-list-table .number-cell {
    text-align: right;
    white-space: nowrap;
}

.quote-list-table .center-cell {
    text-align: center;
    white-space: nowrap;
}

.quote-form-meta-table {
    border: 1px solid #d9dee8;
    border-collapse: collapse;
    margin: 0 0 1rem;
    width: 100%;
}

.quote-form-meta-table th,
.quote-form-meta-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.quote-form-meta-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.86rem;
    font-weight: 700;
    width: 10rem;
    white-space: nowrap;
}

.quote-form-meta-table td {
    width: calc((100% - 20rem) / 2);
}

.quote-form-meta-table input,
.quote-form-meta-table select {
    width: 100%;
}

.sales-order-form-table th {
    width: 10rem;
}

.sales-order-form-table td {
    width: auto;
}

.sales-order-form-table input,
.sales-order-form-table select,
.sales-order-form-table textarea {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.42rem 0.5rem;
    width: 100%;
}

.sales-order-form-table textarea {
    min-height: 4rem;
    resize: vertical;
}

.sales-order-form-table .sales-order-round-input {
    width: 5.5rem;
}

.sales-order-form-table .sales-order-currency-input {
    width: 7rem;
}

.sales-order-form-table .sales-order-po-input {
    max-width: 100%;
    width: 22rem;
}

.sales-order-form-table .sales-order-date-input {
    width: 12rem;
}

.item-form-table .item-kind-input,
.item-form-table .item-procurement-input {
    width: 12rem;
}

.item-form-table .item-role-input,
.item-form-table .item-inventory-policy-input {
    width: 14rem;
}

.item-form-table .item-unit-input,
.item-form-table .item-revision-input {
    width: 8rem;
}

.item-inline-check {
    margin: 0;
}

.item-alias-header {
    margin-top: 1rem;
}

.item-alias-table input,
.item-alias-table select {
    width: 100%;
}

.item-alias-table th:nth-child(1) {
    width: 32%;
}

.item-alias-table th:nth-child(2) {
    width: 12rem;
}

.item-alias-table th:nth-child(3) {
    width: 5rem;
}

.item-alias-table th:nth-child(5) {
    width: 5rem;
}

.item-alternative-list {
    display: grid;
    gap: 0.85rem;
}

.item-alternative-block {
    border: 1px solid #d9dee8;
    border-radius: 6px;
    padding: 0.85rem;
}

.item-alternative-group-grid {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 2fr) auto auto;
    margin-bottom: 0.75rem;
}

.item-alternative-table input,
.item-alternative-table select {
    width: 100%;
}

.item-alternative-table th:nth-child(3),
.item-alternative-table th:nth-child(4) {
    width: 6rem;
}

.item-alternative-table th:last-child {
    width: 5rem;
}

.item-alternative-picker-modal {
    max-width: min(760px, 94vw);
}

.item-alternative-picker-results {
    max-height: 52vh;
}

.item-photo-editor,
.item-photo-readonly {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.item-photo-preview-box,
.item-list-thumbnail-placeholder {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    color: #6b7280;
    display: inline-flex;
    justify-content: center;
}

.item-photo-preview-box {
    height: 88px;
    width: 88px;
}

.item-photo-preview-box img,
.item-photo-readonly img {
    border-radius: 6px;
    display: block;
    max-height: 88px;
    max-width: 88px;
    object-fit: contain;
}

.item-thumbnail-column {
    width: 72px;
}

.item-system-code-column {
    min-width: 6.5rem;
    white-space: nowrap;
}

.item-system-code-button {
    display: inline-flex;
    flex: 0 0 auto;
    white-space: nowrap;
}

.item-list-tag-column {
    min-width: 12rem;
}

.item-list-tag-column .label-chip {
    white-space: nowrap;
}

.item-list-thumbnail,
.item-list-thumbnail-placeholder {
    height: 48px;
    width: 48px;
}

.item-list-thumbnail {
    border: 1px solid #d9dee8;
    border-radius: 6px;
    display: inline-block;
    object-fit: contain;
}

.item-template-value-table input:not([type="checkbox"]),
.item-template-value-table select {
    min-width: 12rem;
    width: 100%;
}

.item-template-value-table .item-template-field-name {
    min-width: 12rem;
}

.sales-order-form-table .button-row {
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0;
    gap: 0.5rem;
}

.sales-order-form-table .button-row > .primary-button,
.sales-order-form-table .button-row > .secondary-button,
.sales-order-form-table td > .secondary-button {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-detail-meta-table td {
    width: auto;
}

.sales-order-detail-meta-table {
    margin-bottom: 0.85rem;
}

.sales-order-detail-meta-table th {
    width: 9rem;
}

.sales-order-detail-meta-table .secondary-button {
    min-width: 0;
}

.delivery-statement-action-row {
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0;
}

.delivery-statement-action-row > .primary-button,
.delivery-statement-action-row > .secondary-button {
    min-width: 0;
    padding-left: 0.62rem;
    padding-right: 0.62rem;
    white-space: nowrap;
}

.sales-order-memo-box,
.sales-order-internal-memo-box {
    margin-top: 0.85rem;
}

.sales-order-fulfillment-form-table {
    margin-bottom: 1rem;
}

.sales-order-fulfillment-form-table th {
    width: 8rem;
}

.sales-order-fulfillment-form-table .primary-button {
    min-width: 0;
}

.sales-order-fulfillment-qty-input {
    max-width: 8rem;
    text-align: right;
}

.sales-order-fulfillment-state-input {
    max-width: 9rem;
}

.sales-order-fulfillment-table {
    min-width: 1040px;
}

.quote-internal-summary-box {
    border: 1px solid #d9dee8;
    border-radius: 8px;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem 1rem;
}

.quote-internal-summary-box legend {
    color: #374151;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0 0.35rem;
}

.quote-internal-summary-box div {
    color: #141823;
    line-height: 1.55;
    white-space: pre-wrap;
}

.quote-action-row,
.quote-revision-actions {
    justify-content: flex-start;
    margin-top: 0.75rem;
}

.quote-action-row > .secondary-button,
.quote-revision-actions > .secondary-button {
    min-width: 0;
}

.quote-revision-panel {
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.quote-revision-panel .section-header {
    margin-bottom: 0.35rem;
}

.quote-state-modal {
    width: min(420px, calc(100vw - 2rem));
}

.item-batch-lookup-modal {
    display: flex;
    flex-direction: column;
    max-height: min(820px, calc(100vh - 2rem));
    max-width: min(1180px, calc(100vw - 2rem));
    width: min(1180px, calc(100vw - 2rem));
}

.item-batch-lookup-body {
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.item-batch-lookup-input {
    min-height: 150px;
    resize: vertical;
    width: 100%;
}

.item-batch-lookup-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}

.item-batch-lookup-summary span {
    background: #f8fafc;
    border: 1px solid #d8e0ec;
    border-radius: 999px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
}

.item-batch-lookup-table-wrap {
    max-height: min(360px, 42vh);
    overflow: auto;
}

.item-batch-lookup-copy-field {
    margin: 0.35rem 0 0.75rem;
}

.item-batch-lookup-copy-text {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.45;
    min-height: 5.8rem;
    resize: vertical;
    width: 100%;
}

.item-batch-lookup-missing-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.item-batch-lookup-modal .quote-dialog-actions {
    flex: 0 0 auto;
    margin-top: 1rem;
}

.broken-item-cleanup-modal {
    display: flex;
    flex-direction: column;
    max-height: min(760px, calc(100vh - 2rem));
    max-width: min(900px, calc(100vw - 2rem));
    width: min(900px, calc(100vw - 2rem));
}

.broken-item-cleanup-body {
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.broken-item-cleanup-table-wrap {
    max-height: min(420px, 50vh);
    overflow: auto;
}

.broken-item-cleanup-modal .quote-dialog-actions {
    flex: 0 0 auto;
    margin-top: 1rem;
}

.quote-state-options {
    display: grid;
    gap: 0.45rem;
    margin: 0.85rem 0 0;
}

.quote-state-option {
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
    width: 100%;
}

.quote-state-option.active {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #075985;
}

.quote-dialog-actions {
    margin-top: 1rem;
}

.quote-history-table-wrap {
    overflow-x: auto;
}

.quote-history-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.quote-history-table th,
.quote-history-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: middle;
}

.quote-history-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-history-table tbody tr:last-child td {
    border-bottom: 0;
}

.quote-history-table td:first-child,
.quote-history-table td:nth-child(2),
.quote-history-table td:last-child {
    white-space: nowrap;
}

.quote-duration-field {
    align-items: center;
    display: flex;
    gap: 0.45rem;
}

.quote-duration-field input {
    max-width: 7rem;
}

.quote-special-notes-field {
    margin-top: 1rem;
}

.quote-special-notes-field textarea {
    min-height: 7rem;
}

.quote-line-table {
    border-collapse: collapse;
    min-width: 960px;
    width: 100%;
}

.quote-line-table th,
.quote-line-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: middle;
}

.quote-line-table th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-line-table tbody tr:last-child td {
    border-bottom: 0;
}

.quote-line-table .number-cell {
    text-align: right;
    white-space: nowrap;
}

.quote-line-table .center-cell {
    text-align: center;
    white-space: nowrap;
}

.quote-line-table .nowrap-cell {
    white-space: nowrap;
}

.sales-order-line-edit-table {
    min-width: 1260px;
    table-layout: fixed;
}

.sales-order-line-name-col {
    width: 20%;
}

.sales-order-line-item-col {
    width: 12rem;
}

.sales-order-line-po-col {
    width: 4.75rem;
}

.sales-order-line-qty-col {
    width: 5.5rem;
}

.sales-order-line-unit-col {
    width: 5rem;
}

.sales-order-line-price-col {
    width: 8rem;
}

.sales-order-line-amount-col,
.sales-order-line-vat-col,
.sales-order-line-total-col {
    width: 8rem;
}

.sales-order-line-tax-col {
    width: 5.5rem;
}

.sales-order-line-action-col {
    width: 5.5rem;
}

.sales-order-line-edit-table .secondary-button {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.sales-order-line-edit-table th {
    text-align: center;
}

.sales-order-line-edit-table .number-cell input {
    text-align: right;
}

.quote-line-edit-table input,
.quote-line-edit-table textarea {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    padding: 0.42rem 0.5rem;
    width: 100%;
}

.quote-line-edit-table textarea {
    min-height: 2.4rem;
    resize: vertical;
}

.purchase-order-line-edit-table {
    min-width: 1180px;
    table-layout: fixed;
}

col.purchase-line-kind-col {
    width: 7.25rem;
}

col.purchase-line-item-col {
    width: 36%;
}

col.purchase-line-qty-col {
    width: 10rem;
}

col.purchase-line-price-col {
    width: 9rem;
}

col.purchase-line-vat-col {
    width: 4.75rem;
}

col.purchase-line-subtotal-col {
    width: 9rem;
}

col.purchase-line-memo-col {
    width: 16%;
}

col.purchase-line-action-col {
    width: 5.5rem;
}

.purchase-order-line-edit-table th {
    text-align: center;
}

.purchase-order-line-edit-table select {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    width: 100%;
}

.purchase-order-line-edit-table .number-cell input {
    text-align: right;
}

.purchase-order-line-edit-table .purchase-line-money-input {
    font-variant-numeric: tabular-nums;
}

.purchase-order-line-edit-table .purchase-line-subtotal {
    color: #111827;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.purchase-order-line-edit-table .purchase-line-quantity-unit {
    grid-template-columns: minmax(4rem, 1fr) 3.75rem;
}

.inline-checkbox {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    white-space: nowrap;
}

.inline-checkbox input {
    margin: 0;
    width: auto;
}

.quote-line-edit-table input[type="checkbox"] {
    width: auto;
}

.purchase-vat-picker-checkbox {
    align-self: end;
    min-height: 2.35rem;
}

.purchase-line-quantity-unit {
    align-items: center;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(5rem, 1fr) 4.5rem;
}

.quote-line-edit-table .purchase-line-quantity-unit input {
    min-width: 0;
}

.quote-line-edit-table .purchase-line-quantity-unit input:last-child {
    text-align: left;
}

.purchase-order-line-detail-table {
    min-width: 1180px;
    table-layout: fixed;
}

col.purchase-detail-item-col {
    width: 34%;
}

col.purchase-detail-qty-col {
    width: 8.5rem;
}

col.purchase-detail-price-col {
    width: 8.5rem;
}

col.purchase-detail-vat-col {
    width: 4.75rem;
}

col.purchase-detail-amount-col {
    width: 9rem;
}

col.purchase-detail-memo-col {
    width: 18%;
}

col.purchase-detail-action-col {
    width: 5.5rem;
}

.purchase-order-line-detail-table th {
    text-align: center;
}

.quote-line-input {
    min-width: 10rem;
}

.quote-line-item-wide {
    min-width: 24rem;
}

.quote-line-detail-action-col {
    width: 5.5rem;
}

.quote-line-detail-button.has-detail {
    border-color: #8cc4a1;
    color: #166534;
    font-weight: 700;
}

.quote-line-description-modal {
    width: min(760px, calc(100vw - 2rem));
}

.quote-line-description-editor {
    border: 1px solid #cdd4e3;
    border-radius: 6px;
    font: inherit;
    min-height: 14rem;
    padding: 0.65rem 0.75rem;
    resize: vertical;
    width: 100%;
}

.quote-line-detail-cell {
    min-width: 24rem;
    vertical-align: top !important;
}

.quote-line-description-rich-text {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.42;
    margin-top: 0.35rem;
}

.quote-line-description-rich-text p,
.quote-line-description-rich-text ul,
.quote-line-description-rich-text ol {
    margin: 0.15rem 0;
}

.quote-line-description-rich-text p {
    white-space: pre-wrap;
}

.quote-line-description-rich-text ul,
.quote-line-description-rich-text ol {
    padding-left: 1.1rem;
}

.quote-line-textarea {
    min-width: 16rem;
}

.quote-line-internal-data {
    min-width: 20rem;
}

.quote-line-number {
    min-width: 5.5rem;
    text-align: right;
}

.quote-line-unit {
    min-width: 4.5rem;
}

.quote-line-money {
    min-width: 8rem;
    text-align: right;
}

.quote-additional-cost-header {
    margin-top: 1rem;
}

.quote-additional-cost-table {
    min-width: 720px;
    table-layout: fixed;
}

.quote-additional-cost-item-col {
    width: auto;
}

.quote-additional-cost-quantity-col {
    width: 12rem;
}

.quote-additional-cost-money-col {
    width: 14rem;
}

.quote-additional-cost-total-col {
    width: 12rem;
}

.quote-additional-cost-action-col {
    width: 5rem;
}

.quote-additional-cost-item {
    min-width: 0;
}

.quote-additional-cost-number {
    min-width: 0;
}

.quote-tax-check {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: center;
    white-space: nowrap;
}

.quote-tax-check input {
    width: auto;
}

.quote-total-summary {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.quote-billing-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-internal-cost-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quote-summary-cell {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    display: grid;
    gap: 0.2rem 0.75rem;
    grid-template-columns: max-content minmax(0, 1fr);
    min-height: 3.25rem;
    padding: 0.7rem 0.85rem;
}

.quote-summary-label {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-summary-value {
    color: #111827;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.quote-summary-note {
    color: #047857;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    grid-column: 2;
    text-align: right;
    white-space: nowrap;
}

.quote-summary-cell-primary {
    background: #f1f7ff;
    border-color: #bdd7f3;
}

.quote-summary-cell-profit {
    background: #f2fbf7;
    border-color: #b9e2cf;
}

.quote-summary-cell-profit .quote-summary-value,
.quote-summary-cell-profit .quote-summary-note {
    color: #047857;
}

.quote-summary-cell-negative {
    background: #fff5f5;
    border-color: #fecaca;
}

.quote-summary-cell-negative .quote-summary-value,
.quote-summary-cell-negative .quote-summary-note {
    color: #b91c1c;
}

@media (max-width: 900px) {
    .quote-billing-summary,
    .quote-internal-cost-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .quote-billing-summary,
    .quote-internal-cost-summary {
        grid-template-columns: 1fr;
    }
}

.quote-total-header {
    margin-top: 1rem;
}

.quote-total-table-wrap {
    margin-top: 0.85rem;
    overflow-x: auto;
}

.quote-total-table {
    border-collapse: collapse;
    min-width: 880px;
    width: 100%;
}

.quote-total-table th,
.quote-total-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.55rem 0.65rem;
    text-align: left;
    vertical-align: middle;
}

.quote-total-table thead th {
    background: #f3f6fb;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-total-table tbody th {
    color: #374151;
    font-weight: 700;
    width: 10rem;
    white-space: nowrap;
}

.quote-total-table tbody td {
    color: #64748b;
}

.quote-total-table .number-cell {
    color: #111827;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    width: 12rem;
}

.quote-total-table .muted-cell {
    color: #94a3b8;
    font-weight: 400;
}

.quote-total-emphasis-row th,
.quote-total-emphasis-row td {
    background: #f8fafc;
}

.quote-total-table .quote-profit-cell,
.quote-total-table .quote-profit-note {
    color: #047857;
}

.icon-button.small {
    min-width: auto;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.quote-print-shell {
    background: #eef2f7;
    min-height: 100vh;
    padding: 1.5rem;
}

.quote-print-toolbar {
    margin: 0 auto 1rem;
    max-width: 210mm;
}

.quote-print-toolbar-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.quote-print-toolbar-status {
    margin: 0;
}

.quote-print-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.quote-print-actions > .secondary-button.small {
    min-width: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.quote-print-toolbar-note {
    margin: 0.5rem 0 0;
}

.quote-print-page {
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
    color: #111827;
    margin: 0 auto;
    min-height: 297mm;
    padding: 16mm;
    width: 210mm;
}

.quote-print-page + .quote-print-page {
    margin-top: 8mm;
}

.quote-print-header {
    align-items: flex-start;
    border-bottom: 2px solid #111827;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    padding-bottom: 1rem;
}

.quote-print-header h1 {
    font-size: 2rem;
    letter-spacing: 0;
    margin: 0;
}

.quote-print-meta {
    border-collapse: collapse;
    min-width: 14rem;
}

.quote-print-meta th,
.quote-print-meta td {
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    padding: 0.35rem 0.5rem;
}

.quote-print-meta th {
    background: #f3f4f6;
    text-align: left;
    white-space: nowrap;
}

.quote-print-party-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.quote-print-party-grid h2,
.quote-print-summary h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.quote-print-party-grid dl {
    border: 1px solid #d1d5db;
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    margin: 0;
}

.quote-print-party-grid dt,
.quote-print-party-grid dd {
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    margin: 0;
    min-height: 2rem;
    padding: 0.4rem 0.5rem;
    white-space: pre-line;
}

.quote-print-party-grid dt {
    background: #f8fafc;
    font-weight: 700;
}

.quote-print-party-grid dt:last-of-type,
.quote-print-party-grid dd:last-of-type {
    border-bottom: 0;
}

.quote-print-summary {
    margin-top: 1.25rem;
}

.quote-print-summary p {
    margin: 0.35rem 0 0;
    white-space: pre-line;
}

.quote-print-terms {
    border: 1px solid #d1d5db;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.75rem;
}

.quote-print-terms span {
    border-right: 1px solid #e5e7eb;
    font-size: 0.86rem;
    padding: 0.45rem 0.55rem;
}

.quote-print-terms span:last-child {
    border-right: 0;
}

.quote-print-line-table {
    border-collapse: collapse;
    margin-top: 1.25rem;
    width: 100%;
}

.quote-print-line-table th,
.quote-print-line-table td {
    border: 1px solid #d1d5db;
    font-size: 0.86rem;
    padding: 0.45rem 0.5rem;
    text-align: left;
    vertical-align: top;
    white-space: pre-line;
}

.quote-print-line-table th {
    background: #f3f4f6;
    font-weight: 700;
}

.quote-print-line-table .number-cell {
    text-align: right;
    white-space: nowrap;
}

.quote-print-totals {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-left: auto;
    margin-top: 1rem;
    max-width: 28rem;
}

.quote-print-totals div {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.65rem;
    text-align: right;
}

.quote-print-totals span {
    color: #4b5563;
    display: block;
    font-size: 0.78rem;
}

.quote-print-totals strong {
    display: block;
    font-size: 1rem;
    margin-top: 0.15rem;
}

.quote-print-footer {
    border-top: 1px solid #d1d5db;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    white-space: pre-line;
}

@media (max-width: 900px) {
    .quote-print-shell {
        padding: 0.75rem;
    }

    .quote-print-page {
        min-height: auto;
        padding: 1rem;
        width: 100%;
    }

    .quote-print-header,
    .quote-print-party-grid {
        grid-template-columns: 1fr;
    }

    .quote-print-header {
        display: block;
    }

    .quote-print-meta {
        margin-top: 1rem;
        width: 100%;
    }
}

@media print {
    @page {
        margin: 12mm;
        size: A4;
    }

    body {
        background: #ffffff;
    }

    .quote-print-toolbar,
    #blazor-error-ui {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .quote-print-shell {
        background: #ffffff;
        min-height: auto;
        padding: 0;
    }

    .quote-print-page {
        box-shadow: none;
        margin: 0;
        min-height: auto;
        padding: 0;
        width: auto;
    }
}

.quote-document-page {
    break-after: page;
    color: #000000;
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.25;
    min-height: 282mm;
    padding: 10mm 11mm 12mm;
    page-break-after: always;
}

.quote-document-page:last-child {
    break-after: auto;
    page-break-after: auto;
}

.quote-document-title {
    align-items: center;
    border: 2px solid #000000;
    display: flex;
    height: 15mm;
    justify-content: center;
    margin-top: 6mm;
    margin-bottom: 2mm;
}

.quote-document-title h1 {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.quote-document-parties {
    display: grid;
    gap: 5mm;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.quote-document-recipient-wrap {
    display: grid;
    gap: 6.2mm;
}

.quote-document-info-table,
.quote-document-line-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.quote-document-info-table th,
.quote-document-info-table td,
.quote-document-line-table th,
.quote-document-line-table td {
    border: 1px solid #000000;
    color: #000000;
}

.quote-document-info-table thead th {
    font-size: 13px;
    font-weight: 800;
    height: 7mm;
    text-align: center;
}

.quote-document-info-table tbody th {
    font-weight: 700;
    text-align: center;
    width: auto;
}

.quote-document-info-label-col {
    width: 22mm;
}

.quote-document-supplier-label-col {
    width: 31mm;
}

.quote-document-info-table tbody th,
.quote-document-info-table tbody td {
    height: 6.2mm;
    padding: 0.6mm 2mm;
    vertical-align: middle;
}

.quote-document-info-table tbody td {
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.quote-document-quote-meta-table {
    margin-top: 0;
}

.quote-document-supplier-wrap {
    position: relative;
}

.quote-document-company-cell {
    padding-right: 19mm !important;
    position: relative;
}

.quote-document-company-cell > span {
    display: block;
    min-height: 4.5mm;
}

.quote-document-stamp-image {
    height: 17mm;
    object-fit: contain;
    position: absolute;
    right: 1.5mm;
    top: 50%;
    transform: translateY(-50%);
    width: 17mm;
}

.quote-document-stamp {
    align-items: center;
    border: 2px solid #ff3048;
    border-radius: 50%;
    color: #ff3048;
    display: flex;
    font-size: 8px;
    font-weight: 800;
    height: 16mm;
    justify-content: center;
    line-height: 1.1;
    opacity: 0.75;
    padding: 1mm;
    position: absolute;
    right: 3mm;
    text-align: center;
    top: 9mm;
    transform: rotate(-13deg);
    width: 16mm;
    word-break: keep-all;
}

.quote-document-summary-band {
    align-items: end;
    display: grid;
    gap: 5mm;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 2mm;
}

.quote-document-intro-lines {
    font-size: 13px;
    font-weight: 400;
    margin: 0 0 1mm;
}

.quote-document-intro-lines p {
    margin: 0;
}

.quote-document-total-strip {
    align-self: end;
    border: 1px solid #000000;
    display: grid;
    grid-template-columns: 27mm minmax(0, 1fr);
    height: 11mm;
    width: 100%;
}

.quote-document-total-heading {
    align-items: center;
    border-right: 1px solid #000000;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    gap: 0.6mm;
    height: 100%;
    justify-content: center;
    text-align: center;
}

.quote-document-total-heading span:last-child {
    font-size: 12px;
}

.quote-document-total-values {
    display: flex;
    gap: 2mm;
    min-width: 0;
    padding: 0 2mm;
}

.quote-document-total-amount {
    font-size: 14px;
    font-weight: 800;
    justify-content: flex-end;
}

.quote-document-total-korean {
    font-size: 13px;
    font-weight: 800;
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: 0;
    overflow-wrap: anywhere;
}

.quote-document-total-values-inline {
    align-items: center;
    justify-content: space-between;
}

.quote-document-continuation {
    font-size: 12px;
    font-weight: 700;
    margin: 2mm 0 0;
    text-align: right;
}

.quote-document-line-table {
    margin-top: 3mm;
}

.quote-document-line-table th {
    font-size: 13px;
    font-weight: 800;
    height: 7mm;
    text-align: center;
}

.quote-document-line-table td {
    height: 6.7mm;
    padding: 0.7mm 2mm;
    vertical-align: middle;
}

.quote-document-line-spec-cell {
    vertical-align: top !important;
}

.quote-document-line-spec {
    white-space: pre-line;
}

.quote-document-line-detail {
    padding-left: 5mm;
}

.quote-document-line-detail-text {
    color: #000000;
    font-size: inherit;
    line-height: 1.22;
}

.quote-document-line-detail-text p,
.quote-document-line-detail-text ul,
.quote-document-line-detail-text ol {
    margin: 0.2mm 0;
}

.quote-document-line-detail-text p {
    white-space: pre-wrap;
}

.quote-document-line-detail-text ul,
.quote-document-line-detail-text ol {
    padding-left: 4mm;
}

.quote-document-line-detail-text li {
    margin: 0.1mm 0;
}

.quote-document-line-table .center-cell {
    text-align: center;
}

.quote-document-line-table .number-cell {
    text-align: right;
    white-space: nowrap;
}

.quote-document-line-no {
    width: 12mm;
}

.quote-document-line-price {
    width: 31mm;
}

.quote-document-line-qty {
    width: 15mm;
}

.quote-document-line-amount {
    width: 31mm;
}

.quote-document-summary-row th,
.quote-document-summary-row td {
    font-size: 13px;
    font-weight: 800;
    height: 7mm;
}

.quote-document-summary-blank {
    border-bottom: 0;
}

.quote-document-remarks {
    border: 1px solid #000000;
    margin-bottom: 0;
    margin-top: 3mm;
    min-height: 36mm;
    padding: 1.5mm 3mm;
    white-space: pre-line;
}

.quote-document-remarks strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2mm;
}

@media (max-width: 900px) {
    .quote-document-page {
        min-width: 210mm;
    }
}

@media print {
    .quote-document-page {
        box-sizing: border-box;
        min-height: 297mm;
        padding: 10mm 11mm 12mm;
        width: 210mm;
    }
}

.delivery-statement-document-page {
    padding: 9mm 10mm 11mm;
}

.delivery-statement-document-page .quote-document-title {
    height: 14mm;
    margin-bottom: 2mm;
    margin-top: 4mm;
}

.delivery-statement-document-page .quote-document-title h1 {
    font-size: 26px;
}

.delivery-statement-document-page .quote-document-parties {
    gap: 5mm;
}

.delivery-statement-document-page .quote-document-recipient-wrap {
    gap: 4.2mm;
}

.delivery-statement-document-page .delivery-statement-number-label {
    white-space: nowrap;
}

.delivery-statement-document-page .quote-document-summary-band {
    margin-top: 2mm;
}

.delivery-statement-document-page .quote-document-total-strip {
    height: 10.5mm;
}

.delivery-statement-document-page .quote-document-remarks {
    min-height: 17mm;
}

.purchase-order-document-page {
    padding: 8mm 10mm 10mm;
}

.purchase-order-document-page .quote-document-title {
    height: 14mm;
    margin-bottom: 3mm;
    margin-top: 3mm;
}

.purchase-order-document-page .quote-document-title h1 {
    font-size: 26px;
    letter-spacing: 0;
}

.purchase-order-document-page .quote-document-parties {
    gap: 4mm;
}

.purchase-order-document-page .quote-document-recipient-wrap {
    gap: 4mm;
}

.purchase-order-document-page .quote-document-info-table thead th {
    height: 6.2mm;
}

.purchase-order-document-page .quote-document-info-table tbody th,
.purchase-order-document-page .quote-document-info-table tbody td {
    height: 5.8mm;
    padding: 0.45mm 1.5mm;
}

.purchase-order-document-preline {
    align-items: end;
    display: grid;
    gap: 4mm;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 2.2mm;
}

.purchase-order-document-total-strip {
    height: 10.5mm;
    margin-top: 0;
}

.purchase-order-document-page .quote-document-total-heading {
    gap: 0.3mm;
}

.purchase-order-document-page .quote-document-total-korean {
    font-size: 12px;
}

.purchase-order-document-page .quote-document-total-amount {
    font-size: 13px;
}

.purchase-order-document-intro-line {
    font-size: 12px;
    margin: 0 0 1mm;
}

.purchase-order-document-intro-line p {
    margin: 0;
}

.purchase-order-document-page .quote-document-line-table {
    margin-top: 1.2mm;
}

.purchase-order-document-page .quote-document-line-table th {
    font-size: 12px;
    height: 6.2mm;
}

.purchase-order-document-page .quote-document-line-table td {
    height: 6.1mm;
    padding: 0.45mm 1.6mm;
}

.purchase-order-document-page .quote-document-summary-row th,
.purchase-order-document-page .quote-document-summary-row td {
    font-size: 12px;
    height: 6.3mm;
}

.purchase-order-document-line-vat {
    width: 12mm;
}

.purchase-order-document-group-row td {
    background: #f3f6fb;
    font-weight: 700;
}

.purchase-order-document-group-row .quote-document-line-spec {
    color: #111827;
}

.purchase-order-document-memo {
    margin-top: 2mm;
    min-height: 20mm;
}

.purchase-order-document-page .quote-document-remarks strong {
    font-size: 12px;
    margin-bottom: 1mm;
}

.delivery-statement-receipt-table {
    border-collapse: collapse;
    margin-top: 3mm;
    table-layout: fixed;
    width: 100%;
}

.delivery-statement-receipt-table th,
.delivery-statement-receipt-table td {
    border: 1px solid #000000;
    height: 8mm;
    padding: 0.6mm 2mm;
    vertical-align: middle;
}

.delivery-statement-receipt-table th {
    font-weight: 800;
    text-align: center;
    width: 22mm;
}

@media print {
    .delivery-statement-document-page {
        padding: 9mm 10mm 11mm;
    }

    .purchase-order-document-page {
        padding: 8mm 10mm 10mm;
    }
}
