:root {
    --bg: #f6f6f4;
    --panel: #ffffff;
    --ink: #151515;
    --muted: #69655c;
    --line: #e2ded6;
    --brand: #9d7a2f;
    --brand-dark: #6f5621;
    --nav: #050505;
    --nav-soft: #24211d;
    --gold: #c9a24e;
    --teal: #46645b;
    --blue: #3f5062;
    --danger: #7f1d1d;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(157, 122, 47, 0.12), transparent 28rem),
        linear-gradient(180deg, #fff 0, var(--bg) 320px);
    color: var(--ink);
    font: 14px/1.5 Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.topbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    border-bottom: 1px solid rgba(223, 230, 238, 0.9);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-right: auto;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 17px;
}

.brand img {
    width: 138px;
    height: 42px;
    object-fit: contain;
    display: block;
}

.brand span {
    padding-left: 14px;
    border-left: 1px solid var(--line);
    white-space: nowrap;
}

.topbar nav {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.topbar nav a {
    color: #334155;
    text-decoration: none;
    padding: 9px 13px;
    border-radius: 6px;
    font-weight: 700;
}

.topbar nav a:hover {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 5px 16px rgba(17, 24, 39, 0.08);
}

.user-chip {
    display: grid;
    gap: 1px;
    min-width: 152px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--nav);
    color: #fff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.14);
}

.user-chip strong,
.user-chip em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip strong {
    font-size: 13px;
}

.user-chip em {
    color: #ead7ad;
    font-size: 11px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0;
}

.layout {
    width: min(1220px, calc(100% - 36px));
    margin: 28px auto 64px;
}

.login-shell {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(280px, 1fr);
    align-items: stretch;
    gap: 20px;
}

.login-panel,
.login-visual {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 34px;
    align-self: center;
}

.login-logo {
    width: 180px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 30px;
}

.login-panel h1,
.page-title h1 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.08;
    letter-spacing: 0;
}

.login-panel p,
.page-title p {
    margin: 0;
    color: var(--muted);
}

.login-panel form {
    display: grid;
    gap: 15px;
    margin-top: 26px;
}

.login-hint {
    margin-top: 18px;
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.login-visual {
    min-height: 520px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(91, 69, 27, 0.78)),
        url('shatchi-banner.jpg') center/cover;
    color: #fff;
    overflow: hidden;
}

.login-visual span {
    color: #f0dfba;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0;
}

.login-visual strong {
    display: block;
    max-width: 560px;
    margin: 10px 0 12px;
    font-size: clamp(28px, 4vw, 54px);
    line-height: 1.05;
    letter-spacing: 0;
}

.login-visual p {
    max-width: 420px;
    margin: 0;
    color: #eef2f7;
    font-size: 16px;
}

.page-title {
    margin-bottom: 20px;
}

.hero-title {
    min-height: 154px;
    display: flex;
    align-items: center;
    padding: 30px;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(94, 72, 29, 0.82)),
        url('shatchi-banner1.jpg') center/cover;
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-title p {
    color: #f3f6fb;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #f1dfb3;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.panel,
.metrics article {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.05);
}

.panel {
    padding: 22px;
    margin-bottom: 20px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.panel h2,
.panel h3 {
    margin: 0 0 14px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.metrics article {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.metrics article::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--brand);
}

.metrics span {
    display: block;
    min-height: 42px;
    color: var(--muted);
    font-weight: 700;
}

.metrics strong {
    display: block;
    font-size: 32px;
    margin-top: 6px;
    line-height: 1;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

th:first-child {
    border-top-left-radius: 7px;
}

th:last-child {
    border-top-right-radius: 7px;
}

tbody tr:hover td {
    background: #fbf7ee;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f7f0df;
    color: var(--brand-dark);
    border: 1px solid #e7d3a6;
    font-weight: 800;
    font-size: 12px;
    white-space: nowrap;
}

label {
    display: grid;
    gap: 7px;
    color: #435064;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 11px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.02);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(157, 122, 47, 0.18);
    border-color: var(--brand);
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
}

button:hover,
.button:hover {
    transform: translateY(-1px);
}

button.primary,
.button.primary,
.login-panel button {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-color: var(--brand);
}

.button.small {
    min-height: 32px;
    padding: 5px 11px;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.filters input {
    max-width: 430px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.full,
.form-actions {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 20px;
}

.details {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 11px 18px;
    margin: 0 0 22px;
}

.details dt {
    color: var(--muted);
    font-weight: 800;
}

.details dd {
    margin: 0;
}

.brief {
    white-space: normal;
    color: #2d3742;
}

.comment-form {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.note,
.activity {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.note span,
.activity span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.note p,
.activity p {
    margin: 8px 0 0;
}

.flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 7px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
    font-weight: 700;
}

.flash.error {
    background: #fee2e2;
    color: var(--danger);
    border-color: #fecaca;
}

@media (max-width: 980px) {
    .topbar,
    .row,
    .filters {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        position: static;
        padding: 16px;
    }

    .brand {
        margin-right: 0;
    }

    .topbar nav {
        flex-wrap: wrap;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-shell,
    .detail-grid,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 320px;
    }

    .details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .layout {
        width: min(100% - 24px, 1220px);
        margin-top: 18px;
    }

    .brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .brand span {
        border-left: 0;
        padding-left: 0;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .login-panel,
    .login-visual,
    .hero-title,
    .panel {
        padding: 20px;
    }
}
/* Shatchi precision polish */
body {
    background:
        linear-gradient(180deg, rgba(157, 122, 47, 0.08) 0, rgba(246, 246, 244, 0) 280px),
        repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 14px),
        var(--bg);
}

.topbar {
    border-top: 4px solid var(--brand);
}

.brand span {
    color: #2b2925;
    font-weight: 800;
}

.topbar nav a:hover,
.topbar nav a:focus {
    color: #000;
    outline: none;
}

.user-chip {
    border: 1px solid rgba(157, 122, 47, 0.48);
}

.login-panel,
.panel,
.metrics article {
    border-color: #e6dfd0;
}

.login-panel::before,
.panel::before {
    content: '';
    display: block;
    width: 54px;
    height: 3px;
    margin: 0 0 18px;
    background: var(--brand);
}

.panel-head + .table-wrap,
.panel .filters + .table-wrap {
    margin-top: 6px;
}

.login-visual,
.hero-title {
    background-position: center;
    border: 1px solid rgba(157, 122, 47, 0.34);
}

.login-visual strong,
.hero-title h1 {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.metrics article:nth-child(2)::before { background: #050505; }
.metrics article:nth-child(3)::before { background: #6f5621; }
.metrics article:nth-child(4)::before { background: #b49349; }
.metrics article:nth-child(5)::before { background: #46645b; }
.metrics article:nth-child(6)::before { background: #3f5062; }

.metrics article:hover,
.panel:hover {
    box-shadow: 0 18px 46px rgba(21, 21, 21, 0.08);
}

.status {
    background: #f3ead7;
    color: #5d471c;
    border-color: #d8bf84;
}

table strong {
    color: #000;
}

th {
    color: #4b463d;
    background: #f2efe8;
}

tbody tr:hover td {
    background: #fcfaf5;
}

button.primary,
.button.primary,
.login-panel button {
    background: linear-gradient(135deg, #b08b37, #7f6125);
    border-color: #8b6b2a;
    color: #fff;
}

button.primary:hover,
.button.primary:hover,
.login-panel button:hover {
    background: linear-gradient(135deg, #050505, #2a2824);
    border-color: #050505;
    color: #fff;
}

button,
.button {
    border-color: #d8cfbd;
}

button:hover,
.button:hover {
    border-color: var(--brand);
    color: #000;
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 1px var(--brand), 0 8px 20px rgba(157, 122, 47, 0.08);
}

.flash {
    background: #f5efdf;
    color: #5d471c;
    border-color: #d8bf84;
}
/* UI/UX refresh - presentation only */
:root {
    --surface: #fffdfa;
    --surface-soft: #f8f4ec;
    --focus: rgba(176, 139, 55, 0.26);
}

body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0, rgba(246, 246, 244, 0.92) 360px),
        url('shatchi-banner1.jpg') top center/100% auto no-repeat,
        var(--bg);
}

.topbar {
    gap: 18px;
    min-height: 78px;
    backdrop-filter: blur(16px);
}

.topbar nav a.active {
    background: #fff;
    color: #000;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.09);
}

.layout {
    margin-top: 34px;
}

.login-shell {
    grid-template-columns: minmax(320px, 430px) minmax(360px, 1fr);
    gap: 24px;
}

.login-panel,
.panel,
.metrics article {
    background: rgba(255, 255, 255, 0.98);
}

.login-panel {
    padding: 38px;
}

.login-panel h1,
.page-title h1 {
    color: #111827;
}
.hero-title h1 {
    color: #fff;
}

.hero-title p {
    color: #f3f6fb;
}

.hero-title .eyebrow {
    color: #f1dfb3;
}

.login-visual,
.hero-title {
    isolation: isolate;
    position: relative;
}

.login-visual::after,
.hero-title::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.16) 100%);
}

.hero-title {
    min-height: 178px;
    margin-bottom: 22px;
}

.page-title.row {
    padding: 4px 2px 2px;
}

.metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.metrics article {
    min-height: 126px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metrics article:hover {
    transform: translateY(-2px);
}

.metrics span {
    min-height: 0;
}

.panel {
    padding: 24px;
}

.panel-head {
    gap: 16px;
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
}

td {
    color: #27313d;
}

.empty {
    padding: 34px 16px;
    background: #fffdfa;
    font-weight: 800;
}

.status,
.priority {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-submitted,
.status-draft {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.status-in-generation,
.status-generated {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
}

.status-in-verification {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.status-approved,
.status-completed {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.status-rework-required,
.status-cancelled {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.status-on-hold {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #5b21b6;
}

.priority-low {
    background: #f1f5f9;
    color: #475569;
}

.priority-normal {
    background: #f7f0df;
    color: #6f5621;
}

.priority-high {
    background: #fff7ed;
    color: #b45309;
}

.priority-urgent {
    background: #fef2f2;
    color: #b91c1c;
}

input,
select,
textarea {
    min-height: 44px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
    line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: #a97f2f;
    box-shadow: 0 0 0 4px var(--focus);
}

button,
.button {
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

button:focus-visible,
.button:focus-visible,
.topbar nav a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.filters {
    align-items: center;
    padding: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.filters input {
    max-width: none;
}

.grid-form {
    gap: 18px;
}

.detail-grid {
    align-items: start;
}

.details {
    padding: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.brief {
    padding: 16px;
    background: #fffdfa;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.note,
.activity {
    padding: 14px 0;
}

.flash {
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

@media (max-width: 980px) {
    body {
        background: var(--bg);
    }

    .topbar nav,
    .user-chip {
        width: 100%;
    }

    .topbar nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        order: -1;
    }

    .panel-head,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .panel-head .button,
    .form-actions .button,
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .login-panel h1,
    .page-title h1 {
        font-size: 28px;
    }

    .hero-title {
        min-height: 150px;
    }

    .table-wrap {
        border-radius: 0;
        margin-inline: -20px;
        border-left: 0;
        border-right: 0;
    }

    th,
    td {
        padding: 11px 10px;
    }
}

/* Login workflow popup */
.workflow-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 5, 5, 0.56);
    backdrop-filter: blur(5px);
}

.workflow-card {
    position: relative;
    width: min(980px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(157, 122, 47, 0.45);
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.workflow-card::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #050505, #9d7a2f, #d8bf84);
}

.workflow-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 50%;
    background: #050505;
    color: #f2dfaf;
    border-color: rgba(157, 122, 47, 0.7);
    font-size: 24px;
    line-height: 1;
    box-shadow: none;
}

.workflow-head {
    padding: 30px 34px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdfa, #fff);
}

.workflow-head span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.workflow-head h2 {
    margin: 0 48px 6px 0;
    color: #050505;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.08;
}

.workflow-head p {
    margin: 0;
    color: var(--muted);
}

.workflow-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 24px 34px 10px;
    counter-reset: workflow;
}

.workflow-steps li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 94px;
    padding: 14px;
    background: #fffdfa;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.workflow-index {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #050505;
    color: #f2dfaf;
    font-weight: 900;
    border: 1px solid rgba(157, 122, 47, 0.6);
}

.workflow-steps strong {
    display: block;
    color: #151515;
    line-height: 1.25;
}

.workflow-steps p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.workflow-steps em {
    justify-self: end;
    min-width: 88px;
    padding: 6px 8px;
    border-radius: 999px;
    background: #f3ead7;
    color: #5d471c;
    border: 1px solid #d8bf84;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.workflow-actions {
    display: flex;
    justify-content: flex-end;
    padding: 18px 34px 30px;
}

@media (max-width: 820px) {
    .workflow-steps {
        grid-template-columns: 1fr;
        padding-inline: 20px;
    }

    .workflow-head,
    .workflow-actions {
        padding-inline: 20px;
    }

    .workflow-steps li {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .workflow-steps em {
        grid-column: 2;
        justify-self: start;
    }
}

/* Admin maintenance screens */
.admin-form {
    display: grid;
    gap: 18px;
}

.admin-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-text-grid label {
    padding: 14px;
    background: #fffdfa;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-text-grid span {
    color: #151515;
    font-weight: 900;
}

.admin-text-grid small {
    color: var(--muted);
    font-weight: 700;
}

.check-row {
    display: inline-flex;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 8px;
    width: auto;
}

.check-row input {
    width: auto;
}

@media (max-width: 820px) {
    .admin-text-grid {
        grid-template-columns: 1fr;
    }
}


.actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.button-row {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

button.small,
.button.small {
    min-height: 32px;
    padding: 5px 11px;
    font-size: 12px;
}

button.danger {
    background: #fff;
    color: #7f1d1d;
    border-color: #fecaca;
}

button.danger:hover {
    background: #7f1d1d;
    color: #fff;
    border-color: #7f1d1d;
}

.form-section-title {
    margin: 10px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: #151515;
    font-size: 18px;
    line-height: 1.2;
}

.final-check-hint {
    display: flex;
    align-items: center;
}

.final-check-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #ddd6fe;
    background: #f5f3ff;
    color: #5b21b6;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.final-check-done {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.final-check-amendments-needed {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Dashboard metric links and filtered artwork state */
.metrics .metric-card {
    position: relative;
    display: block;
    min-height: 126px;
    overflow: hidden;
    padding: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e6dfd0;
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metrics .metric-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--brand);
}

.metrics .metric-card:nth-child(2)::before { background: #050505; }
.metrics .metric-card:nth-child(3)::before { background: #6f5621; }
.metrics .metric-card:nth-child(4)::before { background: #b49349; }
.metrics .metric-card:nth-child(5)::before { background: #46645b; }
.metrics .metric-card:nth-child(6)::before { background: #3f5062; }

.metrics .metric-card:hover,
.metrics .metric-card:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 18px 46px rgba(21, 21, 21, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.metrics .metric-card:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.metrics .metric-overdue::before {
    background: #9f2f24;
}

.metrics .metric-overdue strong {
    color: #7f1d1d;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 7px 11px;
    border: 1px solid #d8bf84;
    border-radius: 999px;
    background: #f8f1df;
    color: #5d471c;
    font-size: 12px;
}

.active-filter span {
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
}

.active-filter strong {
    color: #151515;
}

.final-amendments-comment.is-hidden {
    display: none;
}

.view-section-title:first-child {
    margin-top: 0;
}

.view-section-title + .details {
    margin-top: 12px;
}