/* CSP design system: taken from the Primzsoft Global design (black and yellow, stars, shining borders) */
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --y: #F5B427;
  --bg: #0a0a0a;
  --panel: rgba(18, 18, 18, 0.85);
  --text: #ececec;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --danger: #ff6b6b;
  --ok: #5fd38d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; min-height: 100vh;
  display: flex; flex-direction: column;
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
a { color: var(--y); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; color: var(--y); margin: 0 0 .75rem; }
h3 { color: var(--y); margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* Header and shell */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10,10,10,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.top-in { max-width: 1200px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 40px; height: 40px; border-radius: 10px; background: var(--y); color: #000; display: grid; place-items: center; font-weight: 800; }
.brand small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; line-height: 1; }
.spacer { flex: 1; }
.menu-btn { display: none; }
.who { text-align: right; font-size: .85rem; }
.shell { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 1.2rem 1rem 3rem; width: 100%; flex: 1; display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem; }
.side { display: flex; flex-direction: column; gap: .35rem; align-self: start; position: sticky; top: 5rem; }
.side a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--text); border: 1px solid transparent; transition: .2s; }
.side a:hover { border-color: var(--line); text-decoration: none; transform: translateX(4px); color: var(--y); }
.side a.on { background: rgba(245,180,39,.12); color: var(--y); border-color: rgba(245,180,39,.35); }
.side .grp { margin: .9rem 0 .2rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.main { min-width: 0; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.pagehead h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }

/* Cards, panels */
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stat .num { font-size: 2.2rem; font-weight: 800; color: var(--y); line-height: 1.1; }
.stat .lbl { color: var(--muted); }

/* Buttons */
.btn {
  position: relative; display: inline-block; cursor: pointer; border: 0; border-radius: 8px;
  background: var(--y); color: #000; font: inherit; font-weight: 700; padding: .55rem 1.1rem;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-3px) scale(1.05); background: #fff; color: #000; text-decoration: none;
  box-shadow: 0 8px 20px rgba(245,180,39,.45);
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--y); border: 1px solid var(--y); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: #fff; color: #000; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger:hover { background: var(--danger); color: #000; box-shadow: 0 8px 20px rgba(255,107,107,.35); }
.btn.sm { padding: .3rem .7rem; font-size: .85rem; }

/* Shining border: conic gradient ring, 2px on cards, 3px on buttons, fades in 0.2s, rotates once per 1.4s */
.shine::before, .btn::before {
  content: ""; position: absolute; pointer-events: none; opacity: 0; transition: opacity .2s;
  border-radius: inherit; padding: 2px;
  background: conic-gradient(from var(--a), transparent 0deg 240deg, var(--y) 320deg, #fff 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 6px var(--y));
  animation: spin 1.4s linear infinite;
}
.shine::before { inset: 0; }
.btn::before { inset: -4px; padding: 3px; border-radius: 12px; }
.shine:hover::before, .shine:focus-within::before, .btn:hover::before, .btn:focus-visible::before { opacity: 1; }
@keyframes spin { to { --a: 360deg; } }

/* Forms */
label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: .2rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; background: #111; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem .7rem; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--y); outline-offset: 1px; }
.field { margin-bottom: .9rem; }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; color: var(--text); }
.check input { width: auto; accent-color: var(--y); }
.err { color: var(--danger); font-size: .85rem; margin-top: .2rem; }
.flash { border: 1px solid rgba(95,211,141,.5); background: rgba(95,211,141,.08); color: var(--ok); border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; }
.flash.bad { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.08); color: var(--danger); }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters > * { flex: 1 1 160px; }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: .75rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.y { color: var(--y); border-color: rgba(245,180,39,.5); }
.tag.off { color: var(--danger); border-color: rgba(255,107,107,.5); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .3rem .8rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.pager { margin-top: 1rem; }
.pager nav svg { width: 1rem; height: 1rem; }

/* Login */
.center { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: 2rem 1rem; }
.login { width: min(420px, 100%); }

/* Footer */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 1rem; text-align: center; color: var(--muted); font-size: .85rem; }
.foot a { color: var(--muted); display: inline-block; margin: 0 .6rem; transition: transform .2s, color .2s; }
.foot a:hover { transform: translateX(4px); color: var(--y); text-decoration: none; }

/* Module roadmap */
.mods { list-style: none; margin: 0; padding: 0; }
.mods li { display: flex; gap: .7rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.mods li:last-child { border: 0; }
.mods .st { min-width: 74px; }

/* Responsive: menu collapses below 860px, logo shrinks below 480px */
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: static; }
  .side.open { display: flex; }
}
@media (max-width: 480px) { .brand .mark { width: 34px; height: 34px; } }

/* Print sheet for QR codes */
.qrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.qrcell { background: #fff; color: #000; border-radius: 10px; padding: 12px; text-align: center; break-inside: avoid; }
.qrcell svg { width: 100%; height: auto; max-width: 170px; }
.qrcell b { display: block; margin-top: 4px; }
.qrcell small { color: #444; }
@media print {
  body { background: #fff; color: #000; }
  #stars, .top, .side, .foot, .noprint { display: none !important; }
  .shell { display: block; padding: 0; }
  .qrcell { border: 1px solid #000; }
}

/* Reduced motion: no animation, no transition, no lift */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .btn:focus-visible { transform: none; }
  html { scroll-behavior: auto; }
}

/* Module 6: proof viewer and daily report */
.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: .6rem; }
.thumbs figure { margin: 0; }
.thumbs img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs .ph { display: grid; place-items: center; height: 200px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.thumbs figcaption { margin-top: .4rem; }
.bar { height: 8px; border-radius: 999px; background: #1c1c1c; border: 1px solid var(--line); overflow: hidden; margin-bottom: .2rem; }
.bar i { display: block; height: 100%; background: var(--y); }

@media print {
  body { background: #fff; color: #000; }
  #stars, .top, .side, .foot, .noprint, .pager { display: none !important; }
  .shell { display: block; padding: 0; max-width: none; }
  .card, .tablewrap { background: #fff; border-color: #bbb; }
  th, td { color: #000; border-color: #ccc; }
  h1, h3, .stat .num, a { color: #000; }
  .tag, .tag.y, .tag.off { color: #000; border-color: #777; }
  .bar { background: #eee; border-color: #999; } .bar i { background: #000; }
}

/* Public website */
.site { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 1rem 3rem; width: 100%; flex: 1; }
.sitenav { display: flex; gap: .2rem; }
.sitenav a { color: var(--text); padding: .4rem .7rem; border-radius: 8px; transition: .2s; }
.sitenav a:hover { color: var(--y); text-decoration: none; transform: translateY(-2px); }
.hero { padding: 3.5rem 0 1.5rem; }
.hero h1 { max-width: 18ch; }
.hero .lead { max-width: 62ch; font-size: 1.12rem; color: #cfcfcf; }
.hero .actions { margin: 1.4rem 0 2rem; gap: .8rem; }
.eyebrow { color: var(--y); letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; margin: 0 0 .5rem; }
.facts .card { margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.facts b { color: var(--y); }
.section { padding: 2.2rem 0 .5rem; scroll-margin-top: 5rem; }
.section .card { margin-bottom: 0; }
.section .card h3 { margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
textarea { resize: vertical; }
@media (max-width: 760px) { .sitenav { display: none; } .hero { padding-top: 2rem; } }
@media print { .sitenav { display: none !important; } }

.brand .mark-img { width: 40px; height: 40px; object-fit: contain; }
@media (max-width: 480px) { .brand .mark-img { width: 34px; height: 34px; } }
