/* Charcoal steel, worn copper, olive patina, and recycled paper. */
:root {
    --ink: #151411;
    --surface: #201d18;
    --panel: #28241e;
    --line: #504637;
    --muted: #c7baaa;
    --gold: #e8c586;
    --copper-light: #f3d8a3;
    --copper-dark: #9a7647;
    --field: #25221c;
    --raised: #39332a;
    --text-warm: #f7eee1;
    --patina: #b4c29c;
    --paper: #faf5eb;
    --paper-tint: #e9dcc8;
    --paper-line: #d6c5af;
    --paper-ink: #332a21;
}

.ud-theme { color: var(--text-warm); }
.ud-theme .topbar { background: #292620f7; }
.ud-theme .brand-mark { background: linear-gradient(135deg, #4b3528, #28231d); }
.ud-theme .auth-brand,
.ud-theme.price-login-body { background: radial-gradient(ellipse at 0 0, #49372a, transparent 62%), var(--ink); }
.ud-theme .sidebar nav a { color: var(--muted); }
.ud-theme .sidebar .nav-caption,
.ud-theme .page-footer { color: #ae9f8d; }
.ud-theme .sidebar nav a:hover { background: var(--raised); color: var(--text-warm); }
.ud-theme .sidebar nav a.active { background: #49352a; border-color: #79523d; color: var(--copper-light); }
.ud-theme .sidebar {
    background: radial-gradient(ellipse at 0 0, #51412b, transparent 57%),
        linear-gradient(165deg, #231f18, #181613 60%, #201b16);
    border-right-color: #594b36;
}
.ud-theme .sidebar .sidebar-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 76px;
    padding: 10px;
    border: 1px solid #b080716b;
    border-radius: 13px;
}
.sidebar-metal-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.ud-theme .sidebar-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #171621ec, #171621b5 55%, transparent);
}
.ud-theme .sidebar .nav-caption { color: #ddd1c2; }
.ud-theme .sidebar nav a.workspace-link {
    --tile: #563b43;
    --tile-end: #303a59;
    --tile-line: #a790be;
    --tile-ink: #f0daf9;
    color: #f7f0e8;
    padding: 5px 8px;
    gap: 9px;
}
.ud-theme .sidebar nav a[data-menu-icon="in"],
.ud-theme .sidebar nav a[data-menu-icon="tag"] { --tile: #874829; --tile-end: #523233; --tile-line: #e5a478; --tile-ink: #ffe3bd; }
.ud-theme .sidebar nav a[data-menu-icon="out"],
.ud-theme .sidebar nav a[data-menu-icon="box"] { --tile: #286d69; --tile-end: #23404d; --tile-line: #77c9ba; --tile-ink: #d5fff0; }
.ud-theme .sidebar nav a[data-menu-icon="wallet"],
.ud-theme .sidebar nav a[data-menu-icon="shield"] { --tile: #716027; --tile-end: #3c4833; --tile-line: #d1ba68; --tile-ink: #fff0b1; }
.ud-theme .sidebar nav a[data-menu-icon="chart"],
.ud-theme .sidebar nav a[data-menu-icon="grid"] { --tile: #2f6384; --tile-end: #323f67; --tile-line: #8abce6; --tile-ink: #dcf1ff; }
.ud-theme .sidebar nav a[data-menu-icon="archive"],
.ud-theme .sidebar nav a[data-menu-icon="users"] { --tile: #78495d; --tile-end: #4d325c; --tile-line: #d694b8; --tile-ink: #ffe3f3; }
.workspace-emblem {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 10px;
    color: var(--tile-ink);
    border: 1px solid var(--tile-line);
    background: linear-gradient(145deg, #ffffff30, transparent 58%), linear-gradient(135deg, var(--tile), var(--tile-end));
    box-shadow: inset 0 1px 0 #ffffff35, 0 2px 5px #10152280;
}
.ud-theme .workspace-emblem svg { width: 20px; height: 20px; opacity: 1; }
.ud-theme .sidebar nav a.workspace-link:hover { background: #403628; border-color: #8c7652; }
.ud-theme .sidebar nav a.workspace-link.active {
    background: linear-gradient(105deg, #5c492f, #352d21 85%);
    border-color: #bb9960;
    color: #fff8f0;
    box-shadow: inset 3px 0 #e8c586;
}
.ud-theme .metric-card,
.ud-theme .daily-sales-stat { border-top-color: var(--copper-dark); }
.ud-theme .daily-sales-bar { background: linear-gradient(#cf956e, #9c6040); }
.ud-theme .daily-sales-day.is-today .daily-sales-bar { background: linear-gradient(#c1cda9, #788c64); }
.ud-theme .daily-sales-today { background: #374030; color: var(--patina); }
.ud-theme .daily-sales-day.is-today :is(.daily-sales-date, .daily-sales-amount) { color: var(--patina); }
.ud-theme .notice { background: #3b3326; border-color: #71573f; color: var(--text-warm); }
.ud-theme .gold-button:hover:not(:disabled),
.ud-theme .purchase-detail-print:hover { background: var(--copper-light); }
.ud-theme :is(.secondary-button, .logout, .calculator-key, .purchase-key, .purchase-detail-new) {
    background: var(--raised); border-color: #635648; color: var(--text-warm);
}
.ud-theme .calculator-key:hover { background: #4c4033; border-color: var(--gold); }
.ud-theme .calculator-clear { background: #49352a; color: var(--copper-light); border-color: #79523d; }
.ud-theme :is(.calculator-result, .purchase-total, .purchase-count, .purchase-note-line) { background: var(--field); }
.ud-theme .login-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.ud-theme .employee-input,
.ud-theme .purchase-workspace :is(input, select, textarea),
.ud-theme .purchase-detail-shell :is(input, select),
.ud-theme .price-search-line input { background: var(--field); border-color: #645749; color: var(--text-warm); }
.ud-theme :is(.employee-input, .login-form input):focus { border-color: var(--gold); box-shadow: 0 0 0 3px #e4ad8426; }
.ud-theme input::placeholder { color: #af9f8e; }
.ud-theme :is(.table-scroll, th, td) { border-color: var(--line); }
.ud-theme th { background: var(--raised); color: var(--copper-light); }
.ud-theme :is(.price-login-access, .price-toolbar, .price-category-card) { background: var(--panel); border-color: var(--line); }
.ud-theme .price-category-card { border-top-color: var(--category-accent); }
.ud-theme :is(.price-login-header, .price-login-access > summary, .price-category-header, .price-category-row, .price-login-footer) { border-color: var(--line); }
.ud-theme :is(.price-login-hero h1 em, .price-category-money strong),
.ud-theme .price-login-access > summary::after { color: var(--gold); }
.ud-theme :is(.price-login-header > a:last-child, .price-search-line button, .price-filters button) { background: var(--raised); border-color: var(--line); color: var(--text-warm); }
.ud-theme .price-filters button[aria-pressed=true] { background: var(--gold); color: var(--paper-ink); }
.ud-theme .bg-white { background-color: var(--paper); color: var(--paper-ink); }

:root .invoice-share > summary,
:root .invoice-share-options button { background: var(--gold); border-color: var(--copper-dark); color: var(--paper-ink); }
:root .invoice-share-panel { background: var(--panel); border-color: var(--copper-dark); color: var(--text-warm); }
:root .invoice-file-button { background: var(--raised); color: var(--copper-light); border-color: var(--copper-dark); }
.metal-paper { color-scheme: light; color: var(--paper-ink); background: var(--paper); }
.metal-paper h1 { border-top: 4px solid var(--copper-dark); padding-top: 12px; }
.metal-paper th { background: var(--paper-tint); }
.metal-paper :is(th, td) { border-color: var(--paper-line); }
.metal-paper a { color: #78482f; }
.metal-paper .archive { border-color: var(--copper-dark); background: #f4e5d9; }
@media print {
    .metal-paper { background: #fff; }
    .metal-paper th { print-color-adjust: exact; }
}

/* The dashboard's material palette carries through each workspace. */
.ud-theme {
    --module-accent: #f3bd96;
    --module-edge: #9d6e55;
    --module-wash: #53362d;
}
.ud-theme[data-workspace-tone="steel"] {
    --module-accent: #b9dafa; --module-edge: #6483a2; --module-wash: #35465e;
}
.ud-theme[data-workspace-tone="jade"] {
    --module-accent: #b3e7cd; --module-edge: #648f7e; --module-wash: #304d40;
}
.ud-theme[data-workspace-tone="violet"] {
    --module-accent: #e4cdf5; --module-edge: #9475a6; --module-wash: #4d3a59;
}
.ud-theme .topbar {
    background: linear-gradient(100deg, #33291d, #201d18 62%, #181613);
    border-bottom-color: #715b3d;
    box-shadow: 0 6px 20px #16100f45;
}
.ud-theme .section-mark,
.ud-theme .account-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    flex: none;
    border: 1px solid var(--module-edge);
    border-radius: 11px 4px;
    background: linear-gradient(145deg, var(--module-wash), #251f20);
    color: var(--module-accent);
    font: 700 14px Georgia, serif;
    letter-spacing: .04em;
}
.ud-theme .account-mark { width: 33px; height: 33px; border-radius: 50%; }
.ud-theme .breadcrumb > span { color: #dfcec0; font-size: 10px; letter-spacing: .055em; }
.ud-theme .breadcrumb-divider { color: var(--module-accent); padding-inline: 3px; }
.ud-theme .breadcrumb strong { color: #fff6e9; font-size: clamp(14px, 1.45vw, 19px); overflow-wrap: anywhere; }
.ud-theme .account small { color: var(--module-accent); }
.ud-theme .logout { background: #261f22; border-color: var(--module-edge); color: #fff1e5; }
.ud-theme .logout:hover { color: var(--module-accent); border-color: var(--module-accent); }

.ud-theme .page-content > .page-intro {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 138px;
    padding: clamp(19px, 3vw, 33px);
    border: 1px solid var(--module-edge);
    border-radius: 20px;
    background: linear-gradient(100deg, var(--module-wash), #2b272b 72%);
}
.ud-theme .page-content > .page-intro::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 48%;
    background:
        linear-gradient(90deg, #29252b, #29252b80 56%, #25222650),
        url("./dashboard-yard.webp") 66% 53% / cover;
}
.ud-theme .page-content > .page-intro .eyebrow { color: var(--module-accent); }
.ud-theme .page-content > .page-intro h1 { color: #fff7ee; }
.ud-theme .page-content > .page-intro .muted { color: #e4d7ca; }
.ud-theme .page-content > .page-intro .gold-button { background: var(--module-accent); }
.ud-theme .page-content > h1:first-child {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--module-edge);
}
.ud-theme .page-content > .panel,
.ud-theme .page-content .metric-card { box-shadow: 0 7px 22px #16100e35; }
.ud-theme .page-content .panel > .panel-heading h2 { color: var(--module-accent); }
.ud-theme .page-content .table-scroll:not(.latest-note-table) th { background: var(--module-wash); color: var(--module-accent); }
.ud-theme .page-content .table-scroll:not(.latest-note-table) tbody tr:nth-child(even) { background: #fff1dc07; }
.ud-theme .page-content .table-scroll:not(.latest-note-table) tbody tr:hover { background: #fff1dc10; }
.ud-theme .page-content .employee-input:focus { border-color: var(--module-accent); }
.ud-theme .page-content .catalog-filters label { color: #f0e0d0; }
.ud-theme .page-content .catalog-filters button { background: var(--module-accent); }
.ud-theme .page-content .panel a:focus-visible,
.ud-theme .topbar :is(a,button):focus-visible { outline-color: var(--module-accent); }

.ud-theme :is(.purchase-workspace-header, .purchase-detail-header, .price-login-header) {
    padding: 9px 12px;
    border: 1px solid #92634e;
    border-radius: 13px;
    background:
        linear-gradient(100deg, #4c322d 18%, #322b2be8 60%, #302a29a8),
        url("./dashboard-yard.webp") right 54% / cover;
}
.ud-theme .price-login-header { padding: 12px clamp(10px, 2vw, 20px); }
.ud-theme :is(.purchase-workspace-header, .purchase-detail-header) h1 { color: #fff5e8; }
.ud-theme .purchase-screen { background: linear-gradient(145deg,#3e3028,#2a2723 68%); }
.ud-theme .purchase-stage > :nth-child(2) { background: linear-gradient(145deg,#293f36,#2a2824 65%); }
.ud-theme .purchase-stage .purchase-screen :is(.purchase-key, .purchase-control):focus-visible { outline-offset: 2px; }
.ud-theme .price-login-hero {
    padding: clamp(17px, 3vw, 33px);
    border: 1px solid #87614e;
    border-radius: 20px;
    background:
        linear-gradient(100deg, #342622 18%, #342622ed 57%, #293b38a6),
        url("./dashboard-yard.webp") right 54% / cover;
}
.ud-theme .price-login-hero > p { color: #e9dbce; }

/* Quiet gold surfaces for workspaces and the customer-facing monitor. */
.ud-theme .page-content > .page-intro {
    background: linear-gradient(105deg, #4b3d2b, #2e2820 75%);
    border-color: #806744;
}
.ud-theme .page-content > .page-intro::before {
    background-image: linear-gradient(90deg, #30281f, #332b2175 56%, #29221945), url("./dashboard-yard.webp");
}
body.ud-theme .udsi-dashboard .dashboard-hero {
    background: linear-gradient(110deg, #30271d, #28231e);
    border-color: #ad8c54;
}
body.ud-theme .dashboard-hero::before {
    background: linear-gradient(90deg, #30271e 16%, #30271ef7 34%, #30271ebf 53%, #29221b20 78%),
        linear-gradient(0deg, #251f17a6, transparent 54%);
}
body.ud-theme .udsi-dashboard .hero-actions .gold-button { background: #efce94; }
body.ud-theme .udsi-dashboard .hero-actions .secondary-button { background: #352d22; color: #f7e3bb; border-color: #94774f; }
body.ud-theme .udsi-dashboard .daily-sales-panel { background: radial-gradient(ellipse at 96% 0%, #51402c70, transparent 62%), #2c2822; }
body.ud-theme .customer-display {
    background: radial-gradient(ellipse at 92% 0%, #4e3d26, transparent 58%), #191714;
    border-color: #8d754b;
    color: #fff7e8;
}
body.ud-theme .customer-display .display-brand small,
body.ud-theme .customer-display .display-status,
body.ud-theme .customer-display .display-note-meta time { color: #ebd7b2; }
body.ud-theme .customer-display .display-status[data-problem] { color: #ffd49e; }
body.ud-theme .customer-display .display-brand-mark,
body.ud-theme .customer-display .display-actions .secondary-button { background: #352c21; border-color: #9e8154; color: #fae8c6; }
body.ud-theme .customer-display .display-total { background: linear-gradient(110deg, #efd5a0, #fbefd8 74%, #eedbb7); color: #352819; border-color: #d9b879; }
body.ud-theme .customer-display .display-total-label small { background: #5c492e; color: #fff0d1; }
body.ud-theme .customer-display .latest-note-table th { background: #ead9b9; color: #3d3021; }
body.ud-theme .customer-display .latest-note-table td { background: #fffcf5; color: #30271f; }
body.ud-theme .customer-display .latest-note-table tbody tr:nth-child(even) td { background: #f6eddd; }
@media (max-width: 640px) {
    .ud-theme .topbar .section-mark { width: 30px; height: 32px; font-size: 11px; }
    .ud-theme .topbar .account-mark { display: none; }
    .ud-theme .topbar .breadcrumb > span { font-size: 9px; }
    .ud-theme .topbar .breadcrumb-divider { display: none; }
    .ud-theme .page-content > .page-intro { min-height: 0; border-radius: 15px; }
    .ud-theme .page-content > .page-intro::before { inset-inline-start: 32%; }
    .ud-theme .page-content > .page-intro > :is(a,button) { min-height: 44px; }
    body.ud-theme .dashboard-hero::before { background: linear-gradient(90deg, #30271ef2, #30271e90), linear-gradient(0deg, #251f17dc, transparent); }
}
