/* UGARIT Inventory · R31
   Shared visual system. Screen-only rules keep the established print layouts. */
@media screen {
  html:has(body.ugarit-minimal) { background: #f7f8fa; }
  body.ugarit-minimal {
    --purple: #1d2523;
    --purple-dark: #141a18;
    --ink: #1d2523;
    --muted: #626b68;
    --line: #e6e9e7;
    --bg: #f7f8fa;
    --yellow: #f3d772;
    --green: #24734d;
    --red: #b13d3a;
    --ui-surface: #fff;
    --ui-soft: #f2f4f3;
    --ui-ink: #1d2523;
    --ui-muted: #626b68;
    --ui-line: #e6e9e7;
    --ui-radius: 12px;
    --ugarit-motion-ink: #1d2523;
    --ugarit-motion-press: #e9edeb;
    --ugarit-progress-color: #1d2523;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
  }
  body.ugarit-minimal *, body.ugarit-minimal *::before, body.ugarit-minimal *::after { box-sizing: border-box; }
  body.ugarit-minimal :is(a, a:hover, a:focus, a:active, button, [role="button"], .um-link, .text-button, .oc-entry-link) {
    text-decoration: none !important;
    text-underline-offset: initial;
  }
  body.ugarit-minimal :is(h1, h2, h3, h4) { color: var(--ink); }
  body.ugarit-minimal h1 { font-size: clamp(27px, 2.6vw, 36px); font-weight: 650; line-height: 1.18; letter-spacing: -.045em; }
  body.ugarit-minimal h2 { font-size: 19px; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; }
  body.ugarit-minimal h3 { font-size: 15px; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
  body.ugarit-minimal :is(small, .muted, .help, .guidance, .oc-help, .oc-source) { color: var(--muted); }
  body.ugarit-minimal .eyebrow { color: #737d78; font-size: 10px; letter-spacing: .14em; font-weight: 600; }
  body.ugarit-minimal :is(button, .button, .oc-button, input[type="submit"]) {
    min-height: 40px;
    padding: 10px 15px;
    border: 1px solid #e1e6e3;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.01em;
    box-shadow: none;
    gap: 8px;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
  }
  body.ugarit-minimal :is(button, .button, .oc-button):not(:disabled):not([aria-disabled="true"]):hover {
    background: #f2f4f3;
    border-color: #ccd4cf;
    color: var(--ink);
    box-shadow: none;
  }
  body.ugarit-minimal :is(button, .button, .oc-button):not(:disabled):not([aria-disabled="true"]):active {
    background: #e9edeb;
    border-color: #bdc8c0;
    transform: none;
    color: var(--ink);
    box-shadow: none;
  }
  body.ugarit-minimal :is(button.primary, .button.primary, .oc-button.primary, input.primary[type="submit"]) {
    background: #1d2523;
    border-color: #1d2523;
    color: #fff;
    font-weight: 600;
  }
  body.ugarit-minimal :is(button.primary, .button.primary, .oc-button.primary):not(:disabled):hover { background: #35413b; border-color: #35413b; color: #fff; }
  body.ugarit-minimal :is(button.primary, .button.primary, .oc-button.primary):not(:disabled):active { background: #101713; border-color: #101713; color: #fff; }
  body.ugarit-minimal :is(button, .button, .oc-button):is(:disabled, [aria-disabled="true"]) { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
  body.ugarit-minimal :is(.text-button, .um-link, .oc-entry-link) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 8px 11px;
    background: #f1f4f2;
    color: #35423b;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    white-space: normal;
  }
  body.ugarit-minimal :is(.text-button, .um-link, .oc-entry-link):hover { background: #e7ece8; color: #15231a; }
  body.ugarit-minimal :is(button.danger, .button.danger, .oc-button.danger) { color: #a63734; background: #fff; border-color: #ecd7d5; }
  body.ugarit-minimal :is(button.danger, .button.danger, .oc-button.danger):not(:disabled):hover { color: #902722; background: #fff1ee; border-color: #ddb9b5; }
  body.ugarit-minimal .icon-button { width: 38px; height: 38px; min-height: 38px; padding: 9px; border-color: transparent; background: transparent; border-radius: 9px; }
  body.ugarit-minimal :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea) {
    color: var(--ink);
    background: #fff;
    border: 1px solid #dce2de;
    border-radius: 9px;
    min-height: 42px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
    outline: none;
  }
  body.ugarit-minimal :is(input, textarea)::placeholder { color: #828b86; opacity: 1; }
  body.ugarit-minimal :is(input, textarea, select):focus { border-color: #819589; box-shadow: 0 0 0 3px #dce5df; }
  body.ugarit-minimal :is(input[readonly], textarea[readonly]) { background: #f5f7f5; color: #59645d; }
  body.ugarit-minimal :is(input, select, textarea):disabled { background: #f3f5f4; color: #7c857f; }
  body.ugarit-minimal input:is([type="checkbox"], [type="radio"]) { accent-color: #263f31; min-height: 0; box-shadow: none; }
  body.ugarit-minimal :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #4b705b; outline-offset: 3px; }
  body.ugarit-minimal :is(.field > span, .oc-field > span, .journal-line label) { color: #556259; font-weight: 550; }
  body.ugarit-minimal :is(.panel, .modal, .item-card, .oc-panel, .oc-hero) { border-color: var(--line); border-radius: 12px; background: #fff; }
  body.ugarit-minimal :is(.pill, .badge, .oc-status) { border-radius: 6px; font-weight: 550; font-size: 11px; }
  body.ugarit-minimal :is(.pill.neutral, .badge:not(.submitted):not(.revoked), .oc-status:not(.success):not(.pending)) { background: #eff2f0; color: #536258; }
  body.ugarit-minimal .pill.green { background: #edf6f0; color: #25623e; }
  body.ugarit-minimal .pill.red { background: #fff0ed; color: #a73a32; }
  body.ugarit-minimal .pill.amber { background: #fcf4e2; color: #856121; }
  body.ugarit-minimal progress { accent-color: #2f5140; }
  body.ugarit-minimal progress::-webkit-progress-bar { background: #e9eeea; border-radius: 6px; }
  body.ugarit-minimal progress::-webkit-progress-value { background: #2f5140; border-radius: 6px; }
  body.ugarit-minimal progress::-moz-progress-bar { background: #2f5140; border-radius: 6px; }
  body.ugarit-minimal :is(.ugarit-progress-track) { background-color: #e9eeea; }
  body.ugarit-minimal :is(.ugarit-progress-fill) { background-color: #2f5140; }
  body.ugarit-minimal .ugarit-save-status { color: #25452f; border-color: #dce6dd; box-shadow: 0 5px 20px #14251c0c; }
  body.ugarit-minimal .app-logo { display: block; width: 164px; height: auto; max-height: 62px; object-fit: contain; object-position: left center; }
  body.ugarit-minimal .login-logo { display: block; width: 220px; height: auto; max-height: 86px; object-fit: contain; object-position: left center; }
  body.ugarit-minimal :is(.brand img, .oc-top > img) { display: block; width: 160px; height: 58px; object-fit: contain; object-position: left center; flex-shrink: 0; }
  body.ugarit-minimal .brand { gap: 22px; letter-spacing: normal; }
  body.ugarit-minimal .brand .brand-context { display: grid; gap: 2px; max-width: none; color: #24362b; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: normal; }
  body.ugarit-minimal .brand-context small { display: block; margin: 0; color: #6e7d74; font-size: 10px; font-weight: 400; letter-spacing: normal; }
  body.ugarit-minimal .back-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; border: 1px solid #e6ebe7; border-radius: 9px; padding: 9px 13px; color: #45534a; font-size: 12px; font-weight: 550; background: #fff; white-space: nowrap; }
  body.ugarit-minimal .back-link:hover { background: #f1f4f2; border-color: #cdd7d0; }
  body.ugarit-minimal .back-link svg { width: 15px; height: 15px; flex-shrink: 0; }
  body.ugarit-minimal .login-shell { background: #f7f8fa; padding: 42px 20px; }
  body.ugarit-minimal .login-card { max-width: 480px; padding: 42px; border: 1px solid #e5eae6; border-radius: 18px; box-shadow: 0 16px 50px #10201608; background: #fff; }
  body.ugarit-minimal .login-card h1 { margin-top: 18px; font-size: 32px; }
  body.ugarit-minimal .login-card .eyebrow { margin-top: 32px; }
  body.ugarit-minimal .login-intro { color: #647169; font-size: 14px; }
  body.ugarit-minimal .login-tags { gap: 8px; margin: 24px 0; }
  body.ugarit-minimal .login-tags span { background: #f2f5f3; color: #5b6b61; border-radius: 8px; font-size: 12px; }
  body.ugarit-minimal .login-card .full { min-height: 46px; }
  body.ugarit-minimal .login-note { color: #647169; font-size: 12px; }
  body.ugarit-minimal .toast { border-radius: 12px; background: #1d2f23; box-shadow: 0 8px 30px #1c2b221a; }
  body.ugarit-minimal #messages > div { background: #203a29; border-radius: 10px; padding: 14px 18px; box-shadow: 0 8px 30px #1c2b221a; display: flex; align-items: center; gap: 14px; }
  body.ugarit-minimal #messages > div > button { margin-left: auto; flex-shrink: 0; min-width: 36px; min-height: 36px; padding: 6px; background: #ffffff1a; color: #fff; border-color: #ffffff26; }
  body.ugarit-minimal #messages > .error { background: #99372f; }
  body.ugarit-minimal #messages > .success { background: #24623e; }
  body.ugarit-minimal [hidden] { display: none !important; }
}
@media screen and (max-width: 760px) {
  body.ugarit-minimal :is(button, .button, .oc-button) { min-height: 44px; font-size: 13px; }
  body.ugarit-minimal :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea) { min-height: 46px; font-size: 16px; }
  body.ugarit-minimal :is(.brand img, .oc-top > img) { width: 120px; height: 44px; }
  body.ugarit-minimal .brand { gap: 12px; }
  body.ugarit-minimal .brand .brand-context { font-size: 10px; }
  body.ugarit-minimal .brand-context small { font-size: 9px; }
  body.ugarit-minimal .back-link { min-height: 40px; padding: 8px 10px; font-size: 11px; }
  body.ugarit-minimal .login-shell { padding: 24px 16px; }
  body.ugarit-minimal .login-card { padding: 32px 24px; border-radius: 14px; }
  body.ugarit-minimal .login-logo { width: 195px; max-height: 76px; }
  body.ugarit-minimal .login-card h1 { font-size: 29px; }
  body.ugarit-minimal #messages > div { margin: 8px 10px; font-size: 13px; }
}
@media screen and (max-width: 420px) {
  body.ugarit-minimal .topbar .brand-context { display: none; }
}
@media screen and (prefers-reduced-motion: reduce) {
  body.ugarit-minimal :is(button, .button, .oc-button, input, .panel, .oc-panel) { transition: none; animation: none; }
}
