/* RJ Magna Printing — logo-inspired visual system. */
:root{--page-glow:rgba(65,184,255,.13);--gold-glow:rgba(242,184,43,.16);}
html,body{background:var(--bg);color:var(--ink);}
body{font-size:14px;background:radial-gradient(circle at 8% 0%,var(--page-glow),transparent 28%),radial-gradient(circle at 92% 0%,var(--gold-glow),transparent 22%),var(--bg);}
.site-header{height:72px;padding:0 28px;gap:24px;background:rgba(6,20,28,.94);border-bottom:1px solid var(--line);box-shadow:0 1px 18px rgba(0,0,0,.22);}
.logo-chip{width:42px;height:42px;border-radius:11px;overflow:hidden;background:#07161E;border:1px solid rgba(242,184,43,.38);box-shadow:0 0 0 1px rgba(103,199,255,.08),0 4px 14px rgba(0,0,0,.24);}
.logo-chip img{display:block;width:100%;height:100%;object-fit:cover;}
.brand-word{font-size:15px;font-weight:700;letter-spacing:-.015em;color:#fff;}
.site-brand{gap:11px;color:var(--ink);}
.site-nav{gap:8px;}
.role-chip{padding:5px 10px;background:var(--brand-soft);color:var(--brand);border:1px solid rgba(242,184,43,.25);font-size:11px;letter-spacing:.01em;}
.user-chip{font-size:13px;color:var(--ink-soft);max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.site-actions{gap:8px;}
.site-actions a{padding:8px 11px;border-radius:8px;font-size:13px;color:var(--ink-soft);}
.site-actions a:hover{background:var(--surface-alt);color:var(--ink);}
.site-actions a.logout{border-color:var(--line-strong);}
.site-main{max-width:1320px;padding:30px 28px 52px;}
.site-footer{color:var(--ink-faint);border-top:1px solid rgba(29,57,71,.55);}
.screen{border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-md);background:rgba(11,30,40,.78);overflow:visible;}
.screen.active{animation:page-in .16s ease-out;}
.app-body{min-height:0;display:block;}
.app-main{padding:30px;max-width:1180px;margin:0 auto;}
.app-main.split{gap:28px;}
/* Headings are real h1/h2 now, so the browser's default margins and font-size
   would otherwise fight the design. Normalise before applying the style. */
/* Headings are real h1/h2 now, so the browser's default margins, padding and
   font-size would otherwise fight the design. Normalise before styling.
   padding:0 matters: layout.css sets .h2{padding-bottom:14px;border-bottom:...}
   and this is the rule that deliberately removes that padding and border. */
h1.h2,h2.h2{padding:0;margin:0 0 8px;border:0;font-size:24px;line-height:1.2;font-weight:700;letter-spacing:-.025em;color:var(--ink);}
h1.h2::after,h2.h2::after{content:"";display:block;width:42px;height:3px;margin-top:12px;border-radius:3px;background:linear-gradient(90deg,var(--brand),var(--blue));opacity:.95;}
.muted{margin:0 0 24px;color:var(--ink-soft);font-size:13px;max-width:720px;}
.field-label{margin-bottom:8px;font-size:11px;font-weight:700;letter-spacing:.045em;text-transform:uppercase;color:var(--ink-faint);}
.hint{font-size:12px;color:var(--ink-faint);line-height:1.55;}
.menu{margin-left:0;}
.menu-btn{padding:9px 13px;border-color:var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;box-shadow:var(--shadow-sm);}
.menu-btn:hover{background:var(--surface-alt);border-color:var(--line-strong);}
.menu-list{min-width:250px;max-height:70vh;overflow:auto;padding:7px;border-color:var(--line);border-radius:12px;background:var(--surface);box-shadow:0 18px 40px rgba(0,0,0,.36);}
.menu-list a{padding:10px 11px;border-radius:8px;font-size:13px;color:var(--ink-soft);}
.menu-list a:hover{background:var(--surface-alt);color:var(--ink);}
.menu-list a.active{background:var(--brand-soft);color:var(--brand);}
.stat-row{gap:12px;margin:24px 0 30px;}
.stat{min-width:160px;padding:18px 20px;border:1px solid var(--line);border-radius:13px;background:linear-gradient(145deg,rgba(16,42,54,.95),rgba(11,30,40,.95));box-shadow:var(--shadow-sm);}
.stat .num{font-size:28px;line-height:1.1;font-weight:700;color:var(--brand);}
.stat .lbl{margin-top:7px;font-size:12px;color:var(--ink-soft);}
.stat:first-child{border-top:3px solid var(--brand);}
.field{margin-bottom:18px;}
.input-box{min-height:40px;padding:9px 12px;border-color:var(--line-strong);border-radius:9px;background:#081A23;color:var(--ink);box-shadow:none;font-size:13px;}
.input-box::placeholder{color:#66808F;}
.input-box:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(242,184,43,.12);outline:none;}
select.input-box option{background:#0B1E28;color:#F8FAFC;}
textarea.input-box{min-height:104px;}
.btn{min-height:38px;padding:8px 14px;border-radius:9px;border-color:var(--line-strong);background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;box-shadow:none;}
.btn:hover{background:var(--surface-alt);border-color:#3C6A7C;color:#fff;}
.btn.primary{background:linear-gradient(135deg,#F2B82B,#D99A09);border-color:#E3A614;color:#111A1F;box-shadow:0 4px 12px rgba(242,184,43,.18);}
.btn.primary:hover{background:linear-gradient(135deg,#FFD15A,#E6A817);color:#101820;}
.btn.ghost{border-color:transparent;background:transparent;color:var(--ink-soft);}
.btn.sm{min-height:32px;padding:5px 11px;}
.btn-row{gap:8px;}
.table-scroll{border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow-sm);overflow:auto;}
table.data{font-size:13px;color:var(--ink-soft);}
.data th{padding:11px 14px;background:#102A36;border-top:0;font-size:10px;letter-spacing:.06em;color:var(--ink-faint);}
.data td{padding:12px 14px;border-bottom:1px solid #173441;color:var(--ink-soft);}
.data tbody tr:last-child td{border-bottom:0;}
.data tbody tr:hover td{background:#102A36;color:var(--ink);}
.table-toolbar{margin:0 0 12px;}
.pipeline{gap:10px;margin-top:12px;}
.pipe-col{border-color:var(--line);background:#0A1C25;border-radius:12px;}
.pipe-head{padding:10px 12px;color:var(--ink-faint);font-size:10px;}
.job-card{margin:0 8px 8px;width:calc(100% - 16px);border-left-width:2px;border-color:var(--line);background:var(--surface);color:var(--ink);border-radius:9px;box-shadow:var(--shadow-sm);}
.job-card:hover{transform:none;box-shadow:0 4px 12px rgba(0,0,0,.22);}
.quote-card{border-color:rgba(242,184,43,.32);border-radius:13px;box-shadow:var(--shadow-sm);background:linear-gradient(145deg,#182A2F,#0B1E28);}
.quote-amount{font-size:30px;color:var(--brand);}
.summary-box{border-color:var(--line);background:var(--surface);color:var(--ink-soft);}
.check-line{border-color:#1E5B46;background:var(--green-soft);border-radius:9px;color:#A9F0CF;}
.field-error{border-color:#6B2C31;background:var(--red-soft);border-radius:9px;color:#FFB5B5;}
.status{padding:4px 9px;font-size:11px;}
.status.progress,.status.pending{background:var(--amber-soft);color:#FFD76A;}
.status.qc{background:var(--blue-soft);color:#9ADFFF;}
.status.delivered,.status.active,.status.ready{background:var(--green-soft);color:#8DE8BE;}
.status.low,.status.cancelled{background:var(--red-soft);color:#FF9C9C;}
.status.queued{background:#132A34;color:var(--ink-soft);box-shadow:inset 0 0 0 1px var(--line);}
.screen > .app-body + .app-body{margin-top:24px;}
.mt-24{margin-top:28px !important;}
.mb-24{margin-bottom:28px !important;}
.dialog{border-radius:14px;background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:0 20px 60px rgba(0,0,0,.42);}
.dialog form{padding:26px;}
.dialog h3{font-size:18px;}
.dialog::backdrop{background:rgba(0,0,0,.56);backdrop-filter:blur(3px);}
.canvas-workspace,.proof-workspace,.canvas-editor{background:#07171F !important;border:1px solid var(--line) !important;border-radius:14px !important;}
@media (max-width:980px){.site-header{height:auto;min-height:68px;padding:12px 16px;gap:10px 14px;}.site-nav{order:3;flex-basis:100%;}.site-main{padding:22px 16px 40px;}.app-main{max-width:none;}.app-main.split{gap:20px;}h1.h2,h2.h2{font-size:21px;}.stat{min-width:140px;}}
@media (max-width:640px){.site-header{align-items:flex-start;}.site-actions{margin-left:auto;}.user-chip{display:none;}.site-nav{width:100%;}.menu{width:100%;}.menu-btn{width:100%;justify-content:space-between;}.menu-list{left:0;right:0;width:100%;max-height:60vh;}.stat-row{display:grid;grid-template-columns:1fr 1fr;}.stat{min-width:0;padding:15px;}.stat .num{font-size:24px;}.btn-row .btn{flex:1 1 auto;justify-content:center;}}


/* UI bug-fix pass: predictable disabled controls, compact actions, and safe mobile dialogs. */
.btn:disabled,.btn[aria-disabled="true"]{opacity:.45;cursor:not-allowed;pointer-events:none;filter:none;}
.input-box:disabled{opacity:.6;cursor:not-allowed;background:#0A1820;}
.btn-row{align-items:center;}
.check-line,.field-error,.warning-box,.success-box{overflow-wrap:anywhere;}
.dialog{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;}
.dialog form{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;}
.dialog-actions{position:sticky;bottom:0;padding-top:12px;background:var(--surface);}
.empty{min-height:72px;vertical-align:middle;}

@media (max-width:640px){
  .site-brand .brand-word{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .app-main{padding:20px 14px;}
  .table-toolbar{display:grid;grid-template-columns:1fr;}
  .table-toolbar .input-box,.table-toolbar select.input-box{width:100%;flex:1 1 auto;}
  .btn-row{width:100%;}
  .btn-row .btn{min-width:0;}
  .dialog{width:min(94vw,440px);max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);}
  .dialog form{padding:20px;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);}
  .dialog-actions{flex-wrap:wrap;}
  .dialog-actions .btn{flex:1 1 120px;justify-content:center;}
  .pipeline{overflow-x:auto;padding-bottom:6px;}
  .pipe-col{min-width:220px;}
  .stock-row{gap:8px;}
  .stock-name{width:74px;}
  .stock-val{width:68px;}
}




/* Logo fix 2026-10-10: use the exact supplied RJ Magna emblem without the old printer badge frame. */
.site-brand .logo-chip{width:58px;height:58px;flex:0 0 58px;padding:0;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none;}
.site-brand .logo-chip img{display:block;width:100%;height:100%;object-fit:contain;border:0;border-radius:0;box-shadow:none;}
@media(max-width:640px){.site-brand .logo-chip{width:48px;height:48px;flex-basis:48px;}}
