:root { color-scheme: dark; font: 16px system-ui, sans-serif; color: #e6edf7; background: #101925; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { padding: 16px max(20px, calc((100% - 1060px)/2)); background: #18283b; display: flex; align-items: center; justify-content: space-between; }
main { width: min(1060px, calc(100% - 32px)); margin: 32px auto; }
.card { background: #18283b; border: 1px solid #344760; border-radius: 12px; padding: 20px; margin: 16px 0; }
#login { max-width: 440px; margin-inline: auto; }
h1, h2 { margin: 0 0 10px; }
p { margin: 8px 0; }
form, label { display: grid; gap: 8px; }
form { gap: 14px; }
.remember-login { display: flex; align-items: center; }
button, input, select { border: 1px solid #5b718d; border-radius: 6px; background: #101925; color: inherit; padding: 9px 12px; font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
.primary { background: #1750a3; }
.heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
#message { color: #fec28b; overflow-wrap: anywhere; }
body.supplier-view { background: #0c1723; }
.supplier-view main { width: auto; margin: 0 0 0 238px; padding: 0 24px 80px; }
#supplierNav { position: fixed; inset: 0 auto 0 0; width: 238px; padding: 20px 16px; background: #0d1e30; border-right: 1px solid #25445e; }
.supplier-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.supplier-brand span { padding: 8px 10px; border-radius: 10px; background: #1d69ad; }
.supplier-brand small { display: block; color: #9ab4cd; font-size: .75rem; letter-spacing: .05em; }
#logout { width: 100%; text-align: left; }
.supplier-topbar { display: flex; justify-content: end; border-bottom: 1px solid #25445e; min-height: 62px; align-items: center; margin-bottom: 24px; }
#supplierClock { color: #bcd3e8; font-size: .8rem; border: 1px solid #25445e; border-radius: 24px; padding: 8px 12px; }
.supplier-tabs { display: flex; gap: 8px; border-bottom: 1px solid #25445e; margin: 14px 0 12px; padding-bottom: 9px; }
.supplier-tabs [aria-pressed="true"] { background: #175993; border-color: #328fd5; }
.supplier-table { overflow: auto; border: 1px solid #25445e; border-radius: 10px; margin-top: 12px; }
.supplier-table table { border-collapse: collapse; width: 100%; min-width: 850px; font-size: .88rem; }
.supplier-table th, .supplier-table td { padding: 10px; text-align: left; vertical-align: top; }
.supplier-table th { background: #173147; }
.supplier-table td { border-top: 1px solid #25445e; background: #0e1d2b; }
.supplier-table h2 { font-size: 1rem; margin-bottom: 4px; }
.help, .detail { color: #a6c0d8; font-size: .8rem; }
.detail { margin: 3px 0; }
.reply { min-width: 185px; gap: 8px; }
.reply button { justify-self: start; }
.supplier-status { display: inline-block; padding: 5px 9px; border: 1px solid; border-radius: 8px; font-weight: 650; font-size: .82rem; }
.supplier-status-sent, .supplier-status-cancelled { color: #ffd1d6; background: #512a34; border-color: #af5967; }
.supplier-status-accepted { color: #dae3ed; background: #303e4c; border-color: #667788; }
.supplier-status-queued { color: #ffe7a0; background: #51421b; border-color: #ab8732; }
.supplier-status-working { color: #c3eaff; background: #193e59; border-color: #4b9bd0; }
.supplier-status-ready { color: #a5f1d0; background: #164b38; border-color: #359b72; }
#chatDock { position: fixed; right: 24px; bottom: 22px; z-index: 2; }
#chatToggle { display: block; margin-left: auto; }
#chatCount { background: #a72d40; border-radius: 16px; padding: 2px 7px; margin-left: 5px; }
@keyframes chat-pulse { 50% { box-shadow: 0 0 0 5px #a72d4070; } }
@media (prefers-reduced-motion: no-preference) { #chatCount.pulse { animation: chat-pulse .7s 3; } }
#chatWindow { position: absolute; bottom: calc(100% + 8px); right: 0; width: min(430px, calc(100vw - 48px)); padding: 14px; border: 1px solid #3c5c7b; border-radius: 12px; background: #13283c; box-shadow: 0 8px 30px #0008; }
#chatMessages { height: min(36vh, 340px); overflow: auto; margin-block: 10px; }
#chatMessages article { padding: 8px; margin-bottom: 6px; border-radius: 8px; background: #0c1b2a; }
#chatMessages article.own { background: #173c59; margin-left: 24px; }
#chatMessages time { color: #a6c0d8; font-size: .75rem; margin-left: 8px; }
#chatMessages p { white-space: pre-wrap; overflow-wrap: anywhere; }
#chatText { background: #0c1b2a; color: inherit; padding: 8px; border: 1px solid #527291; border-radius: 6px; font: inherit; resize: vertical; }
#chatStatus { color: #fec28b; font-size: .8rem; }
@media (max-width: 720px) {
  #supplierNav { position: static; width: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .supplier-brand { margin: 0; }
  #logout { width: auto; }
  .supplier-view main { margin: 0; padding-inline: 12px; }
}
