/*
 * Customer portal design system (2026 redesign).
 *
 * Loaded by base_skeleton.html after Bootstrap 3, so everything here wins over
 * Bootstrap's defaults. Shared by both store branches: store-specific looks
 * belong in the tokens below (override them under body.store-dignity), not in
 * per-page CSS.
 */

:root {
    --bg: #f7f5f0;
    --surface: #fff;
    --surface-subtle: #faf9f5;
    --surface-muted: #eeebe1;
    --line: #e4dfd3;
    --line-soft: #eeebe1;
    --input-line: #d9d3c5;

    --ink: #1f2420;
    --ink-strong: #172a20;
    --ink-2: #3e443f;
    --muted: #5d635c;
    --faint: #8a8f88;

    --brand: #1d5b34;
    --brand-hover: #16482a;
    --brand-active: #103a21;
    --brand-tint: #f1f4ee;
    --focus-ring: 0 0 0 3px rgba(29, 91, 52, 0.14);

    --accent: #b8834f;          /* copper rule on top of cards */
    --accent-on-dark: #c89a66;  /* eyebrows on the dark hero */
    --accent-text: #8f4f17;
    --accent-tint: #f8efe4;

    --hero: #172a20;
    --hero-text: #fff;
    --hero-muted: #b7c2ba;
    --hero-line: rgba(255, 255, 255, 0.14);

    --danger: #9a2f22;
    --danger-tint: #f6e4e1;
    --success-tint: #e7ede6;
    --success-text: #16482a;

    --radius: 2px;
    --font: 'Manrope', Helvetica, Arial, sans-serif;
    --page-max: none;   /* fluid: header, hero and content span the screen */
    --gutter: 40px;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--ink-strong);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 12px;
}
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p { margin: 0 0 12px; }

a, a:link, a:visited { color: var(--brand); text-decoration: none; }
a:hover, a:focus { color: var(--brand-active); text-decoration: underline; }

img { max-width: 100%; }

label { font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ------------------------------------------------------- store banner */

.store-banner {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}
.store-banner { position: relative; }
.store-banner p { color: inherit; margin: 0; }
.store-banner__close { display: none; }
.store-banner a { color: inherit; text-decoration: underline; }
.store-banner img { max-height: 60px; vertical-align: middle; margin: 0 8px; }

/* ------------------------------------------------------------- header */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 18px var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 40px;
}
.site-logo { display: block; line-height: 0; }
.site-logo img { width: 210px; height: auto; display: block; }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
}
.site-nav a,
.site-nav a:link,
.site-nav a:visited {
    padding: 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-strong);
    border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-nav a.is-active {
    color: var(--brand);
    font-weight: 700;
    border-bottom-color: var(--brand);
}

/* ------------------------------------------------------------ buttons */

.btn-portal,
a.btn-portal,
button.btn-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn-portal:hover,
.btn-portal:focus { background: var(--brand-hover); color: #fff; text-decoration: none; }
.btn-portal:active { background: var(--brand-active); }
.btn-portal:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-portal[disabled] { opacity: .6; cursor: not-allowed; }

.btn-portal--lg { height: 56px; padding: 0 40px; font-size: 17px; font-weight: 600; }
.btn-portal--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-portal--block { display: flex; width: 100%; }

.btn-portal.btn-portal--outline {
    background: transparent;
    color: var(--brand);
    border: 1.5px solid var(--brand);
}
.btn-portal.btn-portal--outline:hover,
.btn-portal.btn-portal--outline:focus { background: var(--brand); color: #fff; }

/* White button on the dark hero ("+ New Order"). */
.btn-portal.btn-portal--light {
    height: 52px;
    padding: 0 26px;
    font-size: 16px;
    background: #fff;
    color: var(--hero);
}
.btn-portal.btn-portal--light:hover,
.btn-portal.btn-portal--light:focus { background: var(--surface-muted); color: var(--hero); }

/* Outline button on the dark hero (staff order actions). */
.btn-portal.btn-portal--ghost {
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn-portal.btn-portal--ghost:hover,
.btn-portal.btn-portal--ghost:focus { background: #fff; color: var(--hero); border-color: #fff; }
a.btn-portal.btn-portal--ghost:not([href]) { opacity: .45; cursor: not-allowed; }
a.btn-portal.btn-portal--ghost:not([href]):hover { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }

.btn-portal.btn-portal--danger { background: var(--danger); }
.btn-portal.btn-portal--danger:hover, .btn-portal.btn-portal--danger:focus { background: #7c251b; }

/* --------------------------------------------------------------- hero */

.hero { background: var(--hero); color: var(--hero-text); }
.hero__inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 56px var(--gutter) 60px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}
.hero__text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero__eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-on-dark);
}
.hero__title {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--hero-text);
}
.hero__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero__lead {
    margin: 0;
    max-width: 620px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--hero-muted);
}
.hero__lead strong { color: #fff; font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.hero--compact .hero__inner { padding: 40px var(--gutter) 44px; }
.hero--compact .hero__title { font-size: 48px; }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hero-muted);
}
.breadcrumbs a, .breadcrumbs a:link, .breadcrumbs a:visited { color: var(--accent-on-dark); }

.hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--hero-line);
}
.hero-meta__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-meta__label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-on-dark);
}
.hero-meta__value { font-size: 17px; font-weight: 600; color: #fff; overflow-wrap: anywhere; }

/* --------------------------------------------------------- page shell */

.page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 40px var(--gutter) 96px;
}
.page > * + * { margin-top: 24px; }
.page--wide { max-width: none; }

/* Main column + sidebar. Wraps to a single column on narrow screens. */
.layout-split {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}
.layout-split__main {
    flex: 1 1 620px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.layout-split__aside {
    flex: 1 1 340px;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.layout-split__aside--narrow { flex: 0 1 340px; min-width: 260px; }
.layout-split__aside--sticky { position: sticky; top: 24px; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack--lg { gap: 24px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }

.site-footer {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter) 40px;
    font-size: 13px;
    color: var(--faint);
}

/* -------------------------------------------------------------- cards */

.card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 28px;
}
.card--flush { padding: 0; gap: 0; }
.card--plain { border-top-width: 1px; border-top-color: var(--line); }
.card--roomy { padding: 32px; }
.card--scroll-x { overflow-x: auto; }

.card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
}
.card__header--bar { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.card__heading { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink-strong); }
.card__title--lg { font-size: 26px; letter-spacing: -0.015em; }
.card__note { font-size: 14px; color: var(--muted); }
.card__body { padding: 20px 24px; }

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
}
.eyebrow--accent { color: var(--accent-text); }

.label-caps {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Dark resource card (dashboard "Help and downloads"). */
.card--dark {
    background: var(--hero);
    border: 0;
    color: #fff;
}
.card--dark .card__title { color: #fff; }
.card--dark .eyebrow { color: var(--accent-on-dark); }

/* -------------------------------------------------------------- forms */

.field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
}
.field-row--top { align-items: flex-start; }
.field-row--top > .field-row__label { padding-top: 13px; }
.field-row--divided { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.field-row__label {
    flex: 0 0 170px;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}
.field-row__control { flex: 1 1 280px; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 15px; font-weight: 600; margin: 0; }
.field__hint { font-size: 14px; color: var(--muted); }
.field__error { font-size: 14px; color: var(--danger); font-weight: 600; }

.input,
.select,
.textarea,
.form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.textarea,
textarea.form-control {
    height: auto;
    min-height: 120px;
    padding: 12px 14px;
    line-height: 1.5;
    resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus,
.form-control:focus {
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
    outline: none;
}
.input::placeholder,
.textarea::placeholder,
.form-control::placeholder { color: #9a9d95; }

select.select,
select.form-control {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235d635c' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
select[multiple].form-control { height: auto; background-image: none; padding: 8px 14px; }

input[type="checkbox"],
input[type="radio"] { accent-color: var(--brand); }

/* Plain Django widgets ({{ field }}, form.as_p) inside these wrappers get the
   same look as .input/.select/.textarea. */
.form-plain input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="hidden"]),
.form-plain select,
.form-plain textarea,
.table-wrapper form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="hidden"]):not(.form-control),
.table-wrapper form select:not(.form-control),
.table-wrapper form textarea:not(.form-control) {
    display: block;
    width: 100%;
    max-width: 640px;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    background-color: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-plain textarea,
.table-wrapper form textarea:not(.form-control) { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.form-plain .field input,
.form-plain .field textarea { max-width: none; }
.form-plain input:focus, .form-plain select:focus, .form-plain textarea:focus,
.table-wrapper form input:focus, .table-wrapper form select:focus, .table-wrapper form textarea:focus {
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
}
.table-wrapper form p { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.table-wrapper form input[type="submit"],
.table-wrapper form button[type="submit"]:not(.btn) {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.table-wrapper form input[type="submit"]:hover { background: var(--brand-hover); }

/* Joined input + button ("Search", "Send", "Save status"). */
.input-join { display: flex; }
.input-join > .input,
.input-join > .select,
.input-join > .form-control { border-right: 0; border-radius: var(--radius) 0 0 var(--radius); flex: 1; min-width: 0; }
.input-join > .btn-portal { height: auto; min-height: 48px; border-radius: 0 var(--radius) var(--radius) 0; }

/* Large checkbox tile ("Extras" on the order form). */
.check-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
}
.check-tile:hover { background: var(--surface-subtle); }
.check-tile input { width: 20px; height: 20px; margin: 0; flex: none; }

.checkbox-inline-portal { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; cursor: pointer; margin: 0; }
.checkbox-inline-portal input { width: 18px; height: 18px; margin: 0; }

/* Dashed drop zone for file uploads. */
.dropzone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 18px;
    padding: 28px 20px;
    border: 1.5px dashed var(--input-line);
    border-radius: var(--radius);
    background: var(--surface-subtle);
    cursor: pointer;
    text-align: center;
    font-weight: 500;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand); background: var(--brand-tint); }
.dropzone__button {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--brand);
    border-radius: var(--radius);
    color: var(--brand);
    font-size: 15px;
    font-weight: 700;
}
.dropzone__name { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ----------------------------------------------------------- feedback */

.alert-portal,
.messages .alert {
    margin: 0;
    padding: 14px 16px;
    border: 0;
    border-radius: var(--radius);
    background: var(--surface-muted);
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.5;
}
.alert-portal--info, .messages .alert-info { background: #e6ecf2; color: #2f4f6e; }
.alert-portal--success, .messages .alert-success { background: var(--success-tint); color: var(--success-text); }
.alert-portal--warning, .messages .alert-warning { background: #f6ecd9; color: #8a5a14; }
.alert-portal--error,
.messages .alert-error,
.messages .alert-danger { background: #fbeeec; color: #8a2c22; }

.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { margin: 0; }

/* Callout with a copper rule (e.g. "3 proofs are waiting for your approval"). */
.callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius);
}
.callout__text { font-size: 16px; }
.callout__text span { color: var(--muted); }

.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------- badges */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: var(--radius);
    background: var(--surface-muted);
    color: #4a4f47;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}
.badge-status--lg { padding: 6px 12px; font-size: 14px; gap: 8px; }
.badge-status--lg::before { width: 8px; height: 8px; }
.tone-new { background: #e6ecf2; color: #2f4f6e; }
.tone-review { background: #f6ecd9; color: #8a5a14; }
.tone-proof { background: #f3e3d2; color: #8f4f17; }
.tone-progress { background: #e3eee4; color: #1d5b34; }
.tone-neutral { background: #eeebe1; color: #4a4f47; }
.tone-danger { background: #f6e4e1; color: #9a2f22; }

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius);
    background: #f3e3d2;
    color: var(--accent-text);
    font-size: 13px;
    font-weight: 700;
}

/* ------------------------------------------------------- filter tabs */

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tabs a,
.filter-tabs a:link,
.filter-tabs a:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink-strong);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
.filter-tabs a:hover { border-color: var(--ink-strong); }
.filter-tabs a.is-active { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }
.filter-tabs__count {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: var(--radius);
    background: var(--surface-muted);
    font-size: 13px;
    text-align: center;
}
.filter-tabs a.is-active .filter-tabs__count { background: rgba(255, 255, 255, 0.16); }

/* ------------------------------------------------------------- tables */

.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-scroll { border: 0; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: var(--surface);
}
.data-table th {
    padding: 14px 20px;
    background: var(--surface-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    text-align: left;
    white-space: nowrap;
    border: 0;
}
.data-table td {
    padding: 12px 20px;
    border: 0;
    border-top: 1px solid var(--line-soft);
    vertical-align: middle;
    text-align: left;
    background: transparent;
}
.data-table tbody tr:hover td { background: var(--surface-subtle); }
.data-table .num { font-weight: 700; white-space: nowrap; }
.data-table .muted { color: var(--muted); }
.data-table .soft { color: var(--ink-2); }
.data-table .strong { font-weight: 600; }
.data-table .stack-sm { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.data-table .stack-sm a { font-size: 13px; font-weight: 700; }

.thumb {
    display: block;
    width: auto;
    height: 50px;
    max-width: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--input-line);
    background: var(--line);
}
.thumb--placeholder { width: 40px; border-radius: 50%; }

.file-chip,
a.file-chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--ink-2);
}

/* Search box (jquery.typeahead markup) joined to its button. */
.search-bar .typeahead__container { font: inherit; }
.search-bar .typeahead__field { display: flex; width: 100%; height: auto; }
.search-bar .typeahead__query { flex: 1; min-width: 0; }
.search-bar .typeahead__query input.input,
.search-bar .typeahead__field input.input {
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--input-line);
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    box-shadow: none;
}
.search-bar .typeahead__query input.input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.search-bar .typeahead__button { flex: none; width: auto; height: auto; }
.search-bar .typeahead__button .btn-portal {
    width: auto;
    height: 52px;
    margin-left: 0;
    padding: 0 28px;
    border: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.search-bar .typeahead__button .btn-portal:hover { background: var(--brand-hover); }
.search-bar .typeahead__list { border-color: var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.search-bar .typeahead__list > li > a { padding: 10px 16px; }

.table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    font-size: 14px;
    color: var(--muted);
}

/* Key/value grid (order details specs). */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    border-top: 1px solid var(--line-soft);
}
.spec-grid__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 12px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
}
.spec-grid__key { color: var(--muted); }
.spec-grid__value { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.spec-grid__item.is-flagged { background: var(--accent-tint); }
.spec-grid__item.is-flagged .spec-grid__value { color: var(--accent-text); }

/* Plain definition list (account details). */
.detail-list { display: flex; flex-direction: column; gap: 12px; margin: 0; font-size: 15px; }
.detail-list div { display: flex; flex-direction: column; gap: 3px; }
.detail-list dt { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.detail-list dd.detail-list__plain { font-weight: 400; line-height: 1.5; }

/* Arrow link list ("Edit details →"). */
.link-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.link-list a,
.link-list a:link,
.link-list a:visited {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--line-soft);
    font-size: 15px;
    font-weight: 700;
    color: var(--brand);
}
.link-list a::after { content: "\2192"; }
.link-list a[href^="#"]::after { content: "\2193"; }
.link-list a:hover { text-decoration: none; color: var(--brand-active); }
.link-list--lg a, .link-list--lg a:link, .link-list--lg a:visited {
    padding: 18px 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    color: var(--ink-strong);
}
.link-list--lg a:hover { color: var(--brand); }
.card--dark .link-list a,
.card--dark .link-list a:link,
.card--dark .link-list a:visited { color: #fff; border-top-color: var(--hero-line); padding: 12px 0; }
.card--dark .link-list a:hover { color: var(--accent-on-dark); }

/* Address block. */
.address-box {
    padding: 20px;
    background: var(--surface-subtle);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.address-box address { margin: 0; font-style: normal; font-size: 16px; line-height: 1.6; }

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

/* ----------------------------------------------------- stat tiles */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat,
a.stat,
a.stat:link,
a.stat:visited {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
}
a.stat:hover { border-color: var(--brand); color: var(--ink); text-decoration: none; }
.stat__label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; background: none !important; padding: 0; }
.stat__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stat__count { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--ink-strong); }
.stat__note { font-size: 14px; color: var(--muted); }

/* Row in a list of to-dos (dashboard "Needs your action"). */
.todo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 16px 24px;
    border-top: 1px solid var(--line-soft);
}
.todo-row__body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.todo-row__title { font-size: 16px; font-weight: 700; }
.todo-row__title span { font-weight: 600; color: var(--muted); }
.todo-row__detail { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------- download cards */

.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.download-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink-strong);
}
.download-card:hover { border-color: var(--brand); box-shadow: 0 10px 30px rgba(23, 42, 32, 0.08); }
.download-card__cover {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 240px;
    padding: 14px;
    border-bottom: 1px solid var(--line-soft);
    overflow: hidden;
}
.download-card__cover img { max-height: 212px; width: auto; display: block; }
.download-card__body { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 24px; flex: 1; }
.download-card__kind { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-text); text-transform: uppercase; }
.download-card__title { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.download-card__text { font-size: 15px; color: var(--ink-2); }
.download-card__text > :last-child { margin-bottom: 0; }
.download-card__text img { max-width: 100%; height: auto; }
/* Embedded videos (pasted YouTube/Vimeo code has a fixed width) scale to the card. */
.download-card__text iframe,
.download-card__text video,
.download-card__text embed,
.download-card__text object {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius);
}
/* Tutorial videos: wider cards, two (or three) per row on desktop. */
.download-grid--videos { grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); }
.download-card .btn-portal { margin-top: auto; }

.section-heading { display: flex; flex-direction: column; gap: 10px; }
.section-heading h2 { margin: 0; font-size: 36px; letter-spacing: -0.02em; }
.section-heading--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.page > .page-section { margin-top: 72px; }
.dxf-search { flex: 0 1 380px; min-width: 0; }

.quick-links { gap: 0; border-top: 2px solid var(--accent); }
.quick-links > .eyebrow { padding: 20px 0 12px; }

/* ------------------------------------------------------------ chat */

.chat__log {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 160px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--surface-subtle);
}
.chat__msg { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.chat__msg--mine { align-items: flex-end; }
.chat__bubble {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.chat__msg--mine .chat__bubble { background: var(--brand); border-color: var(--brand); color: #fff; }
.chat__meta { font-size: 12px; color: var(--muted); }
.chat__compose { padding: 18px 24px 22px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 14px; }
.chat__compose textarea.input { height: 48px; min-height: 48px; padding-top: 12px; resize: none; overflow: hidden; }

/* --------------------------------------------------- pagination */

.pagination { margin: 0; }
.pagination > li > a,
.pagination > li > span {
    color: var(--brand);
    border-color: var(--line);
    padding: 8px 14px;
    font-weight: 600;
}
.pagination > li > a:hover { background: var(--surface-muted); color: var(--brand-active); border-color: var(--line); }
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span {
    background: var(--ink-strong);
    border-color: var(--ink-strong);
    color: #fff;
}
.pagination > li:first-child > a,
.pagination > li:last-child > a,
.pagination > li:first-child > span,
.pagination > li:last-child > span { border-radius: var(--radius); }

/* ----------------------------------------- Bootstrap 3 harmonising */

.form-group { margin-bottom: 18px; }
.control-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.help-block { font-size: 14px; color: var(--muted); }
.has-error .help-block, .has-error .control-label { color: var(--danger); }
.has-error .form-control { border-color: var(--danger); box-shadow: none; }
.has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(154, 47, 34, 0.14); }
.has-success .form-control { border-color: var(--input-line); box-shadow: none; }
.has-success .control-label, .has-success .checkbox label { color: var(--ink); }
.checkbox label { font-weight: 500; }
.checkbox input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; }

.btn { border-radius: var(--radius); font-weight: 700; font-family: var(--font); }
.btn-primary, .btn-success { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
}
.btn-default { border-color: var(--input-line); color: var(--ink-strong); }
.btn-info { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); }
.btn-info:hover, .btn-info:focus { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); }

.modal-content { border-radius: var(--radius); border: 0; border-top: 2px solid var(--accent); box-shadow: 0 20px 50px rgba(23, 42, 32, 0.25); }
.modal-header { border-bottom-color: var(--line-soft); }
.modal-title { font-weight: 800; color: var(--ink-strong); }
.modal-footer { border-top-color: var(--line-soft); }

.alert-info { background: #e6ecf2; border-color: #d3dde8; color: #2f4f6e; }

/* ------------------------------------------- jQuery UI dialogs */

.ui-widget { font-family: var(--font); font-size: 15px; }
.ui-widget-overlay { background: var(--hero); opacity: .55; }
.ui-dialog.ui-widget-content {
    padding: 0;
    border: 0;
    border-top: 2px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(23, 42, 32, 0.25);
}
.ui-dialog .ui-dialog-titlebar {
    padding: 18px 24px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: var(--surface);
    color: var(--ink-strong);
    font-size: 20px;
    font-weight: 800;
}
.ui-dialog .ui-dialog-titlebar-close { right: 18px; }
.ui-dialog .ui-dialog-content { padding: 20px 24px; color: var(--ink); }
.ui-dialog .ui-dialog-buttonpane {
    margin: 0;
    padding: 14px 24px 18px;
    border-top: 1px solid var(--line-soft);
    background: var(--surface);
}
.ui-dialog .ui-dialog-buttonpane button {
    height: 44px;
    margin: 4px 0 4px 8px;
    padding: 0 18px;
    border: 1.5px solid var(--brand);
    border-radius: var(--radius);
    background: transparent;
    color: var(--brand);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
}
.ui-dialog .ui-dialog-buttonpane button:hover { background: var(--brand-tint); }
.ui-dialog .ui-dialog-buttonpane button:last-child,
.ui-dialog .ui-dialog-buttonpane button.btn-success { background: var(--brand); color: #fff; }
.ui-dialog .ui-dialog-buttonpane button:last-child:hover,
.ui-dialog .ui-dialog-buttonpane button.btn-success:hover { background: var(--brand-hover); }
.ui-dialog .ui-dialog-buttonpane button.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.ui-dialog .ui-dialog-buttonpane button.btn-danger:hover { background: var(--danger-tint); }
.ui-dialog .ui-dialog-buttonpane button .ui-button-text { padding: 0; }

/* ------------------------------------------------ legacy classes
 * Pages that have not been redesigned yet (address books, staff order
 * lists, proofs, account settings) still use the old MediaLoot markup.
 * These rules give that markup the new look so every page matches.
 */

.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    overflow-x: auto;
    margin-bottom: 24px;
}
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrapper th,
.table-wrapper .table-header {
    padding: 12px 16px;
    background: var(--surface-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    text-align: left;
    border: 0;
}
.table-wrapper td { padding: 12px 16px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table-wrapper legend { font-size: 22px; font-weight: 800; color: var(--ink-strong); border-bottom-color: var(--line-soft); padding-bottom: 12px; }

ul.tabs, ul.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
ul.menu { flex-direction: column; }
ul.tabs li, ul.menu li { margin: 0; }
ul.tabs li a, ul.menu li a, a.button {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink-strong);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
ul.tabs li a:hover, ul.menu li a:hover, a.button:hover { border-color: var(--ink-strong); text-decoration: none; }

.leftcontainer { margin-bottom: 24px; }
.maincontent { min-width: 0; }

#container-fluid { padding: 40px var(--gutter) 96px; }
#container-fluid > * + * { margin-top: 24px; }

.select-format {
    display: inline-block;
    margin: 0 12px 0 0;
    padding: 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}
.select-format:hover { border-color: var(--input-line); }
.select-format.selected { border-color: var(--brand); background: var(--brand-tint); }

/* ------------------------------------------------------- responsive */

@media (min-width: 1800px) {
    :root { --gutter: 64px; }
}

@media (max-width: 860px) {
    /* Logo and Logout share the first row; the nav gets its own row. */
    .site-header__inner { gap: 12px 16px; padding-top: 14px; padding-bottom: 0; }
    .site-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; gap: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav a, .site-nav a:link, .site-nav a:visited { padding: 10px 0 12px; white-space: nowrap; }
    .site-header__action.btn-portal { height: 40px; padding: 0 16px; font-size: 14px; }
}

.site-nav__short { display: none; }

@media (max-width: 520px) {
    .site-nav { justify-content: space-between; gap: 16px; }
    .site-nav__prefix, .site-nav__long { display: none; }
    .site-nav__short { display: inline; }
}

@media (max-width: 1100px) {
    :root { --gutter: 24px; }
}

@media (max-width: 720px) {
    :root { --gutter: 16px; }

    /* Store banner: hideable on phones (choice kept in localStorage until logout). */
    .store-banner { padding: 12px 48px 12px 16px; font-size: 14px; text-align: left; }
    .store-banner__close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 6px;
        right: 6px;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: var(--radius);
        background: transparent;
        color: inherit;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
    }
    .store-banner__close:hover, .store-banner__close:focus-visible { background: rgba(0, 0, 0, 0.06); outline: none; }
    .store-banner.is-collapsing {
        overflow: hidden;
        max-height: 0 !important;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom-width: 0;
        opacity: 0;
        transition: max-height .25s ease, padding .25s ease, opacity .2s ease;
    }
    .store-banner-hidden .store-banner { display: none; }

    /* Wide list tables turn into one card per row. */
    .table-scroll:has(.data-table--stack) { background: transparent; border: 0; overflow: visible; }
    .data-table--stack, .data-table--stack tbody, .data-table--stack tr, .data-table--stack td { display: block; width: 100%; }
    .data-table--stack { background: transparent; }
    .data-table--stack thead { display: none; }
    .data-table--stack tr {
        margin-bottom: 12px;
        padding: 8px 16px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
    }
    .data-table--stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        padding: 9px 0;
        border-top: 1px solid var(--line-soft);
        text-align: right;
    }
    .data-table--stack td:first-child { border-top: 0; font-size: 17px; }
    .data-table--stack td::before {
        content: attr(data-label);
        flex: none;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
        text-align: left;
    }
    .data-table--stack td.empty-state { display: block; text-align: center; }
    .data-table--stack td.empty-state::before { content: none; }
    .data-table--stack tbody tr:hover td { background: transparent; }
    .data-table--stack .stack-sm { align-items: flex-end; }
    .table-footer { flex-direction: column; align-items: flex-start; }

    /* Status tabs: one swipeable row instead of several wrapped rows. */
    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-left: calc(-1 * var(--gutter));
        margin-right: calc(-1 * var(--gutter));
        padding: 0 var(--gutter) 2px;
        scrollbar-width: none;
    }
    .filter-tabs::-webkit-scrollbar { display: none; }
    .filter-tabs a, .filter-tabs a:link, .filter-tabs a:visited { flex: none; height: 40px; padding: 0 12px; font-size: 14px; }

    /* Order lists: compact cards. Order # + status on top, family name,
       product, then the remaining details on one wrapping line. */
    .data-table--cards tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 16px;
        padding: 14px 16px;
    }
    .data-table.data-table--cards td,
    .data-table.data-table--cards td:first-child {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        text-align: left;
        font-size: 15px;
    }
    .data-table--cards td::before { content: none; }
    .data-table--cards td.cell-id { order: 1; flex: 1 1 auto; font-size: 17px; }
    .data-table--cards td.cell-status { order: 2; flex: none; }
    .data-table--cards td.cell-status .stack-sm { align-items: flex-end; }
    .data-table--cards td.cell-title { order: 3; flex: 1 1 100%; margin-top: 6px; font-size: 16px; }
    .data-table--cards td.cell-sub { order: 4; flex: 1 1 100%; }
    .data-table--cards td.cell-meta,
    .data-table--cards td.cell-flag { order: 5; flex: none; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
    .data-table--cards td.cell-meta::before,
    .data-table--cards td.cell-flag::before {
        content: attr(data-label);
        margin-right: 6px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
    }
    .data-table--cards td.cell-flag.is-off,
    .data-table--cards td.cell-meta.is-empty,
    .data-table--cards td.cell-thumb { display: none; }
    .data-table--cards.staff-table td.cell-flag { width: auto; text-align: left; }
    .data-table--cards td.cell-flag .flag { min-width: 0; }
    .data-table--cards td.empty-state { flex: 1 1 100%; text-align: center; padding: 24px 0; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .stat { padding: 16px; }
    .stat__count { font-size: 32px; }
    .card--flush .table-scroll .data-table--stack tr { margin: 0; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; }
    .search-bar .typeahead__button .btn-portal { padding: 0 18px; }
    .hero__inner { padding-top: 36px; padding-bottom: 40px; }
    .hero__title { font-size: 36px; }
    .hero--compact .hero__title { font-size: 34px; }
    .card, .card--roomy { padding: 20px; }
    .card--flush { padding: 0; }
    .card__header--bar, .card__body, .todo-row, .chat__log, .chat__compose { padding-left: 16px; padding-right: 16px; }
    .site-logo img { width: 170px; }
    .section-heading h2 { font-size: 28px; }
    .data-table th, .data-table td { padding-left: 14px; padding-right: 14px; }
}

/* ------------------------------------------------------- sign-in page
 * Its own look from the design: serif headings, softer radius.
 */

.auth-page { background: #f6f5f1; }
.auth {
    min-height: 100vh;
    display: flex;
    font-family: 'Hanken Grotesk', var(--font);
    color: var(--ink);
    background: #f6f5f1;
}
.auth__panel {
    flex: 1 1 46%;
    min-width: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 56px 64px;
    background: #173f2a;
    color: #f3f1ea;
}
.auth__panel::before,
.auth__panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(243, 241, 234, 0.12);
    pointer-events: none;
}
.auth__panel::before { right: -180px; bottom: -180px; width: 560px; height: 560px; }
.auth__panel::after { right: -110px; bottom: -110px; width: 420px; height: 420px; border-color: rgba(243, 241, 234, 0.08); }
.auth__panel-logo { width: 280px; max-width: 100%; height: auto; display: block; }
.auth__pitch { position: relative; max-width: 440px; }
.auth__kicker { margin: 0 0 20px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #b9c9bd; }
.auth__headline {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: 46px;
    line-height: 1.1;
    color: #f3f1ea;
    text-wrap: pretty;
}
.auth__copyright { position: relative; margin: 0; font-size: 13px; color: #9fb3a5; }

.auth__main {
    flex: 1 1 54%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}
.auth__box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 32px; }
.auth__logo { width: 260px; max-width: 100%; height: auto; display: block; margin: 0 auto 8px; }
.auth__footnote { margin: 48px 0 0; font-size: 13px; color: var(--faint); }

.auth__intro { display: flex; flex-direction: column; gap: 8px; }
.auth__title {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: 0;
    color: #16301f;
}
.auth__subtitle { margin: 0; font-size: 15px; color: var(--muted); }

.auth__form { display: flex; flex-direction: column; gap: 20px; }
.auth__field { display: flex; flex-direction: column; gap: 8px; }
.auth__label { margin: 0; font-size: 14px; font-weight: 500; color: #2b312c; }
.auth__label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 500; }
.auth__input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d6d6cf;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth__input::placeholder { color: #a3a69f; }
.auth__input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.auth__password { position: relative; display: flex; }
.auth__password .auth__input { padding-right: 72px; }
.auth__reveal {
    position: absolute;
    right: 6px;
    top: 6px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
}
.auth__reveal:hover { background: #f0efea; }
.auth__remember { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.auth__remember input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.auth__submit {
    height: 50px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background .15s;
}
.auth__submit:hover { background: var(--brand-hover); }
.auth__submit:active { background: var(--brand-active); }
.auth__error, .auth__notice { padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.auth__error { background: #fbeeec; color: #8a2c22; }
.auth__notice { background: #e6ecf2; color: #2f4f6e; }
.auth__field-error { font-size: 13px; color: #8a2c22; }
.auth__alt { margin: 0; padding-top: 24px; border-top: 1px solid #e3e2dc; text-align: center; font-size: 14px; color: var(--muted); }
.auth__alt a { font-weight: 600; }
.auth__alt--signup { font-size: 18px; }
.auth__alt--signup a { white-space: nowrap; }
.auth__banner { font-size: 14px; color: var(--ink-2); }
.auth__message { font-size: 15px; line-height: 1.6; color: var(--muted); }
.auth__message p { margin: 0 0 8px; }
.auth__message p:last-child { margin-bottom: 0; }
.auth__help { font-size: 13px; color: var(--muted); }
.auth__help ul { margin: 4px 0 0; padding-left: 18px; }
a.auth__submit--link,
a.auth__submit--link:link,
a.auth__submit--link:visited { display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; }
a.auth__submit--link:hover { color: #fff; text-decoration: none; }
/* Plain Django widgets in the account-flow forms. */
.auth__form .auth__field input:not([type="checkbox"]):not([type="hidden"]) {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d6d6cf;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
}
.auth__form .auth__field input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.auth .messages .alert { border-radius: 8px; font-size: 14px; }

@media (max-width: 860px) {
    .auth { flex-direction: column; min-height: 0; }
    .auth__panel { flex: none; gap: 20px; padding: 28px 24px 32px; }
    .auth__panel::before { width: 320px; height: 320px; right: -140px; bottom: -160px; }
    .auth__panel::after { display: none; }
    .auth__panel-logo { width: 200px; }
    .auth__kicker { margin-bottom: 10px; font-size: 12px; }
    .auth__headline { font-size: 30px; }
    .auth__copyright { display: none; }
    .auth__main { justify-content: flex-start; padding: 32px 20px 48px; }
    .auth--centered .auth__main { min-height: 100vh; justify-content: center; }
    .auth__box { gap: 24px; }
    .auth__title { font-size: 32px; }
}

/* ------------------------------------------------- staff order list */

.staff-search { display: flex; flex-direction: column; gap: 14px; }
.staff-filters { gap: 10px 24px; font-size: 15px; }
.staff-table th, .staff-table td { padding-left: 12px; padding-right: 12px; }
.staff-table th { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.staff-table th.flag-col, .staff-table td.flag-col { text-align: center; width: 1%; }
.staff-table .nowrap, .staff-table th:first-child { white-space: nowrap; }
.flag,
a.flag {
    display: inline-block;
    min-width: 44px;
    padding: 3px 8px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    color: var(--faint);
    white-space: nowrap;
}
.flag--yes, a.flag--yes { background: var(--surface-muted); color: var(--ink-2); }
.flag--ok, a.flag--ok { background: #e3eee4; color: var(--brand); }
.flag--alert { background: #f3e3d2; color: var(--accent-text); }

/* --------------------------------------------------- order details */

.hero-meta dt, .hero-meta dd { margin: 0; }
.spec-grid dt, .spec-grid dd { margin: 0; font-weight: inherit; }
.spec-grid dd.spec-grid__value { font-weight: 700; }

.product-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.product-head__text { flex: 1 1 320px; }
.product-head__text .card__title { text-wrap: pretty; }
.product-head__picture { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.photo-frame {
    display: block;
    width: 180px;
    height: 120px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-muted);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-tile,
a.photo-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
a.photo-tile:hover { border-color: var(--brand); text-decoration: none; color: var(--ink); }
.photo-tile img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius); background: var(--surface-muted); display: block; }
.photo-tile small { display: block; font-weight: 400; color: var(--muted); }
.photo-tile__file {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: var(--surface-muted);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent-text);
}
.photo-tile--proof { align-items: stretch; }
.photo-tile--proof img { height: 160px; object-fit: contain; background: var(--surface-subtle); }
.photo-tile--proof .badge-status { align-self: flex-start; }
a.approved img { outline: 3px solid var(--brand); outline-offset: -3px; }

.revised-proof__preview img,
.revised-proof__preview iframe {
    display: block;
    max-width: 240px;
    max-height: 180px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.progress-bar-portal {
    height: 24px;
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 24px;
}
.staff-tiff label { display: block; margin: 12px 0 6px; font-size: 15px; font-weight: 600; }
.staff-tiff input[type="checkbox"] { width: 20px; height: 20px; vertical-align: middle; }

/* Sign-up address blocks (Bootstrap inline forms) as a responsive grid. */
.address-fields form, .address-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.address-fields .form-group { display: block; margin: 0; }
.address-fields .form-control { width: 100%; }
.field__required { color: var(--accent-text); }

.photo-grid--proofs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.proof-card { padding: 12px; gap: 10px; }
.proof-card img { height: 220px; }
.proof-card__name { font-size: 13px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.proof-card .btn-portal { align-self: flex-start; }

.chat__empty { margin: auto 0; font-size: 14px; color: var(--muted); text-align: center; }

/* ------------------------------------------------- form rows + order form
 * .form-rows: forms rendered by django-bootstrap3 in its horizontal layout.
 * These rules turn its .form-group/.col-* markup into the redesign's
 * label + control rows. Used by the order form and the account pages.
 */

.order-form.form-rows { gap: 24px; }
.form-rows.form-horizontal .form-group { margin: 0; }
.order-step__fields { display: flex; flex-direction: column; gap: 18px; }
.form-rows .form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    margin: 0;
}
.form-rows .form-group::before,
.form-rows .form-group::after { content: none; }
.form-rows .form-group > .control-label {
    flex: 0 0 170px;
    width: auto;
    float: none;
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
}
.form-rows .form-group > [class*="col-"]:not(label) {
    flex: 1 1 280px;
    max-width: 720px;
    min-width: 0;
    width: auto;
    float: none;
    margin: 0;
    padding: 0;
}
.form-rows .form-group > [class*="col-lg-offset"]:not(label) { margin-left: 194px; }
.form-rows .control-label.required::after,
.form-rows .required > .control-label::after { content: " *"; color: var(--accent-text); }
.form-rows .help-block { margin: 6px 0 0; }
.form-rows { display: flex; flex-direction: column; gap: 18px; }
.form-rows fieldset { display: flex; flex-direction: column; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }

.price-display { font-size: 22px; font-weight: 700; color: var(--ink-strong); }
.border-style-display { padding: 0 !important; margin: 0 !important; font-weight: 600; color: var(--ink-2) !important; }

/* Photo pickers (jasny fileinput inside quote/image_thumbnail.html). */
.order-form .fileinput { margin: 0; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.order-form .fileinput .thumbnail {
    width: 160px;
    height: 160px;
    margin: 0;
    padding: 6px;
    border: 1.5px dashed #c5c8bf;
    border-radius: var(--radius);
    background: var(--surface-subtle);
    box-shadow: none;
    text-align: center;
    overflow: hidden;
}
.order-form .fileinput-new.thumbnail img { display: none; }
.order-form .fileinput-new.thumbnail::before {
    content: "+";
    display: block;
    line-height: 144px;
    font-size: 34px;
    color: var(--brand);
}
.order-form .fileinput-preview.thumbnail { max-width: none !important; max-height: none !important; line-height: 144px; }
.order-form .fileinput-preview img,
.order-form .fileinput-preview iframe { max-width: 100% !important; max-height: 100% !important; object-fit: contain; vertical-align: middle; }
.order-form .file-input-button-holder { display: flex; gap: 8px; }
.order-form .btn-file,
.order-form .file-input-button-holder .btn {
    height: 40px;
    padding: 0 16px;
    border: 1.5px solid var(--brand);
    border-radius: var(--radius);
    background: #fff;
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
    line-height: 37px;
}
.order-form .file-input-button-holder .btn:hover { background: var(--brand); color: #fff; }

/* "Extras" checkboxes as tiles. */
.order-step__extras {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}
.order-step__extras-label { flex: 0 0 170px; padding-top: 14px; font-size: 15px; font-weight: 600; }
.check-grid {
    flex: 1 1 280px;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.check-grid > .form-group > [class*="col-"]:not(label) { flex: 1 1 100%; margin-left: 0; }
.check-grid > .form-group:not(.form-group--check) { grid-column: 1 / -1; padding: 6px 0; }
.check-grid > .form-group:not(.form-group--check) > .control-label { flex-basis: 100%; }
.check-grid .checkbox {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    min-height: 52px;
    height: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.check-grid .checkbox:hover { background: var(--surface-subtle); }
.check-grid .checkbox label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
}
.check-grid .checkbox input[type="checkbox"] { position: static; width: 20px; height: 20px; margin: 0; flex: none; }
.check-grid .checkbox:has(> label[style*="display: none"]) { display: none; }
.check-grid .help-block { margin: 6px 2px 0; font-size: 13px; }

.order-step__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-left: 194px;
    font-size: 14px;
    font-weight: 600;
}

/* Address search boxes (TypeAheadMultiWidget). */
.order-form .typeahead__container { font: inherit; }
.order-form .typeahead__field { height: auto; }
.order-form .typeahead__field input { height: 48px; padding: 0 14px; border-color: var(--input-line); border-radius: var(--radius); font-size: 16px; color: var(--ink); }
.order-form .typeahead__field input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }

.order-submit { display: flex; justify-content: flex-end; }

.order-summary { padding: 26px; gap: 16px; }
.order-summary__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.order-summary__product { display: flex; flex-direction: column; gap: 4px; }
.order-summary__name { font-size: 15px; font-weight: 700; }
.order-summary__meta { font-size: 14px; color: var(--muted); }
.order-summary__lines { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.order-summary__lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.order-summary__lines dt { font-weight: 400; color: var(--ink-2); }
.order-summary__lines dd { margin: 0; font-weight: 600; }
.order-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 15px; font-weight: 600; }
.order-summary__total strong { font-size: 24px; color: var(--ink-strong); }
.order-summary__note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Preview dialog content. */
.order-preview__intro { font-weight: 700; }
/* Rows stay <div><strong>Label:</strong> <span>value</span></div>: the PDF export
   (jsPDF fromHTML) only prints values from that kind of markup. */
.order-preview__list { margin: 0; border-top: 1px solid var(--line-soft); }
.order-preview__list .form-group { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 8px 4px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.order-preview__row strong { font-weight: 400; color: var(--muted); }
.order-preview__row span { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.order-preview__images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.order-preview__images img:not([src]) { display: none; }
.order-preview__images img { max-width: 160px; max-height: 120px; border: 1px solid var(--line); border-radius: var(--radius); }
.order-preview__warning { color: var(--danger); font-weight: 800; font-size: 17px; }

@media (max-width: 720px) {
    .form-rows .form-group > .control-label,
    .order-step__extras-label { flex-basis: 100%; padding-top: 0; }
    .form-rows .form-group > [class*="col-lg-offset"]:not(label),
    .order-step__links { margin-left: 0; }
    .order-submit .btn-portal { width: 100%; }
    .layout-split__aside--sticky { position: static; }
}
