/* =========================================================
   PraxisSafe · Design system
   Aesthetic: warm clinical / editorial
   Serif display + geometric sans, terracotta + deep teal
   ========================================================= */

:root{
  /* Brand */
  --ink:            #0f1614;
  --ink-2:          #2a3330;
  --muted:          #5d6b66;
  --paper:          #faf7f2;
  --paper-2:        #f1ece2;
  --line:           #e2ddd1;
  --line-2:         #d4cdbd;

  --teal:           #0f3b3a;
  --teal-2:         #1a5755;
  --teal-ink:       #07201f;
  --clay:           #c45a3b;
  --clay-2:         #a74728;
  --sand:           #e8dcc2;
  --amber:          #d89a2a;
  --green:          #2f6b45;
  --red:            #b63a2e;

  --risk-low:       #7ea77a;
  --risk-med:       #e0a641;
  --risk-high:      #c85a3a;

  --radius:         14px;
  --radius-sm:      8px;
  --shadow-soft:    0 2px 0 rgba(15,22,20,0.03), 0 10px 30px -12px rgba(15,22,20,0.14);
  --shadow-lift:    0 8px 30px -8px rgba(15,22,20,0.25);

  --font-display:   "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:      "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Ensure the hidden attribute always wins over component display rules
   (e.g. .modal{display:flex}, .app{display:grid}) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.55;
}

body{
  background:
    radial-gradient(1100px 600px at 90% -10%, rgba(196,90,59,0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(15,59,58,0.07), transparent 60%),
    var(--paper);
}

a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(15,59,58,0.25); }
a:hover { color: var(--clay); border-color: currentColor; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 0.4em; }
h1 { font-size: clamp(1.8rem, 3.3vw, 2.6rem); line-height: 1.05; }
h2 { font-size: 1.6rem; line-height: 1.15; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }

p { margin: 0 0 0.8em; }
small, .small { font-size: 12px; color: var(--muted); }
em { font-style: italic; color: var(--clay); }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; font-size: 0.88em; }

/* ================= BUTTONS ================= */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  background: var(--paper-2); color: var(--ink);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-2); }

.btn-clay { background: var(--clay); color: #fff; border-color: var(--clay); }
.btn-clay:hover { background: var(--clay-2); }

.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }

.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-block { width: 100%; }
.btn-xs { font-size: 12px; padding: 4px 10px; }

.icon-btn{
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); cursor: pointer;
  font-size: 18px; color: var(--ink);
}
.icon-btn:hover { background: var(--paper-2); }

/* ================= INPUTS ================= */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"],
textarea, select{
  width: 100%;
  font: inherit;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15,59,58,0.12);
}

label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 12px; }
label > span { display: block; margin-bottom: 6px; color: var(--muted); font-weight: 500; }

.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--teal); }

/* ================= GDPR BANNER ================= */
.gdpr-banner{
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--ink); color: #f0eada;
  padding: 18px 20px; border-top: 3px solid var(--clay);
  animation: slideUp .4s ease;
}
.gdpr-inner{
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.gdpr-banner strong { font-family: var(--font-display); font-size: 1.1rem; display: block; margin-bottom: 4px; color: #fff; }
.gdpr-banner p { margin: 0; font-size: 13px; line-height: 1.55; color: #d6cfc0; max-width: 780px; }
.gdpr-banner a { color: #f2b696; border-color: rgba(242,182,150,0.4); }
.gdpr-actions { display: flex; gap: 10px; }

@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 800px){
  .gdpr-inner { grid-template-columns: 1fr; }
}

/* ================= AUTH ================= */
.auth{
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-grid{
  max-width: 1200px; width: 100%;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 60px; align-items: center;
}
.auth-hero .brand { color: var(--teal); margin-bottom: 40px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand.small { font-size: 17px; }
.brand-mark { display: inline-flex; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25em; letter-spacing: -0.02em; }

.display { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 18px; }
.lead { font-size: 17px; color: var(--ink-2); line-height: 1.55; margin-bottom: 30px; max-width: 560px; }

.hero-points { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 12px; }
.hero-points li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px; color: var(--ink-2);
  backdrop-filter: blur(4px);
}
.hero-points li span {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--clay); min-width: 32px;
}

.legal-note { font-size: 11px; color: var(--muted); line-height: 1.5; max-width: 560px; }

/* Auth Card */
.auth-card-wrap { display: flex; justify-content: center; }
.auth-card{
  width: 100%; max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  position: relative;
}
.auth-card::before{
  content:""; position:absolute; top:-12px; left:-12px; right:-12px; bottom:-12px;
  background: linear-gradient(135deg, rgba(196,90,59,0.1), transparent 40%);
  border-radius: 24px; z-index:-1;
}

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 12px; margin-bottom: 24px; }
.tab{
  flex: 1; padding: 10px 14px; border-radius: 8px;
  background: transparent; border: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--muted);
  transition: all .2s;
}
.tab.active { background: #fff; color: var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px);} to { opacity:1; transform:translateY(0);} }

.demo-box{
  margin-top: 16px; padding: 14px;
  background: linear-gradient(135deg, rgba(216,154,42,0.08), rgba(196,90,59,0.05));
  border: 1px dashed var(--amber);
  border-radius: 10px;
}
.demo-title { font-size: 12px; font-weight: 700; color: var(--clay-2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.demo-cred { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.demo-cred code { background: #fff; border: 1px solid var(--line); }

.auth-foot { margin: 24px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

@media (max-width: 980px){
  .auth-grid { grid-template-columns: 1fr; gap: 40px; }
  .auth-hero { text-align: center; }
  .auth-hero .brand, .hero-points li { justify-self: center; }
  .hero-points li { justify-content: center; }
  .lead, .legal-note { margin-left: auto; margin-right: auto; }
}

/* ================= APP SHELL ================= */
.app{
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar{
  background: var(--teal);
  color: #e9e2d1;
  padding: 24px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(0,0,0,0.1);
}
.sidebar .brand { color: #fff; margin-bottom: 28px; padding: 0 8px; }
.sidebar .brand-mark { color: var(--clay); }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-section{
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(233,226,209,0.5);
  padding: 18px 10px 8px;
}
.nav-item{
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  color: #d9d0bc; font-size: 14px; font-weight: 500;
  border: none; background: transparent;
  transition: background .15s, color .15s;
}
.nav-item i{
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; font-style: normal; font-size: 14px;
  color: var(--clay);
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: var(--teal-ink); color: #fff; }
.nav-item.active i { color: var(--amber); }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; margin-top: 12px; }
.user-chip{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; margin-bottom: 10px;
}
.user-avatar{
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--clay); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.user-name { font-weight: 600; font-size: 14px; color: #fff; }
.user-role { font-size: 11px; color: rgba(233,226,209,0.6); }

.sidebar .btn-ghost { color: #e9e2d1; border-color: rgba(233,226,209,0.2); }
.sidebar .btn-ghost:hover { background: rgba(255,255,255,0.06); }

/* MAIN */
.main{
  display: flex; flex-direction: column;
  min-width: 0;
}

.topbar{
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(250,247,242,0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.crumbs { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--ink); letter-spacing: -0.01em; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.search input{
  width: 320px; border-radius: 999px;
  background: #fff;
  padding: 9px 16px; font-size: 13px;
}
.menu-toggle { display: none; }

.view { padding: 32px; flex: 1; max-width: 1400px; width: 100%; }

.appfoot{
  display: flex; justify-content: space-between; gap: 12px;
  padding: 16px 32px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
  flex-wrap: wrap;
}

/* Responsive sidebar */
@media (max-width: 980px){
  .app { grid-template-columns: 1fr; }
  .sidebar{
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; transform: translateX(-100%);
    z-index: 50; transition: transform .3s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .search input { width: 180px; }
  .view { padding: 20px; }
  .topbar { padding: 14px 18px; }
}

@media (max-width: 560px){
  .search { display: none; }
}

/* ================= CARDS & GRIDS ================= */
.card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.card + .card { margin-top: 18px; }
.card-head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px){ .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Dashboard stat cards */
.stat-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before{
  content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--teal);
}
.stat-card.clay::before { background: var(--clay); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.green::before { background: var(--green); }
.stat-card.red::before { background: var(--red); }

.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; color: var(--ink); line-height: 1; margin: 8px 0 6px; letter-spacing: -0.02em; }
.stat-foot { font-size: 12px; color: var(--muted); }

/* ================= BADGES ================= */
.badge{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge.risk-1 { background: #e8f2e6; color: #2f6b45; border-color: #bfd9b8; }
.badge.risk-2 { background: #faeccd; color: #8a5d10; border-color: #e8cd84; }
.badge.risk-3 { background: #f9dcd2; color: #8a2a18; border-color: #e8a790; }
.badge.ok { background: #e8f2e6; color: #2f6b45; border-color: #bfd9b8; }
.badge.warn { background: #faeccd; color: #8a5d10; border-color: #e8cd84; }
.badge.danger { background: #f9dcd2; color: #8a2a18; border-color: #e8a790; }
.badge.info { background: #e4efef; color: #0f3b3a; border-color: #b8cdcd; }

/* ================= TABLES ================= */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
table.data{
  width: 100%; border-collapse: collapse; font-size: 14px;
  background: #fff;
}
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(232,220,194,0.15); }

/* ================= WIZARD ================= */
.wizard-steps{
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  background: var(--paper-2); border-radius: 12px; padding: 4px;
  margin-bottom: 28px;
  overflow-x: auto;
}
.wizard-step{
  text-align: center; padding: 12px 8px; border-radius: 8px; cursor: pointer;
  background: transparent; border: none; font: inherit; color: var(--muted);
  transition: background .2s, color .2s;
  min-width: 100px;
}
.wizard-step .num { font-family: var(--font-display); font-size: 20px; font-weight: 600; display: block; line-height: 1; margin-bottom: 4px; }
.wizard-step .lbl { font-size: 11px; font-weight: 600; }
.wizard-step.active { background: var(--teal); color: #fff; }
.wizard-step.done { background: #fff; color: var(--teal); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.wizard-step.done .num::before { content: "✓ "; }

@media (max-width: 800px){
  .wizard-steps { grid-template-columns: repeat(7, minmax(80px, 1fr)); }
  .wizard-step .lbl { display: none; }
}

.wizard-panel{ animation: fadeIn .25s ease; }

.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* ================= RISK MATRIX ================= */
.risk-matrix{
  display: grid; grid-template-columns: 90px repeat(3, 1fr); gap: 0;
  max-width: 520px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.risk-matrix .rm-cell{
  padding: 18px 12px; text-align: center; font-weight: 600; font-size: 14px;
  border-right: 1px solid rgba(255,255,255,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: opacity .15s;
}
.risk-matrix .rm-cell:hover { opacity: 0.85; }
.risk-matrix .rm-label { background: var(--paper-2); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.risk-matrix .rm-head { background: var(--paper-2); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.rm-low { background: #c5dcb8; color: #2f6b45; }
.rm-med { background: #f4d698; color: #8a5d10; }
.rm-high { background: #e8a790; color: #8a2a18; }
.rm-cell.selected { outline: 3px solid var(--ink); outline-offset: -3px; }

/* ================= TIMELINE ================= */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before{
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 18px 32px; }
.timeline li::before{
  content: ""; position: absolute; left: 4px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--clay); border: 3px solid var(--paper);
}
.timeline .time { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.timeline .txt { font-size: 14px; color: var(--ink-2); }

/* ================= MODAL ================= */
.modal{ position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(15,22,20,0.55); backdrop-filter: blur(4px); animation: fadeIn .2s; }
.modal-card{
  position: relative; background: #fff; border-radius: 18px;
  max-width: 640px; width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.3);
  animation: popIn .25s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.96);} to { opacity:1; transform: scale(1);} }
.modal-head{ display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1.2rem; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot{ padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ================= TOAST ================= */
.toast-stack{ position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast{
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow-lift); font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  min-width: 240px; max-width: 360px;
  animation: slideIn .3s ease;
  border-left: 3px solid var(--clay);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1;} }

/* ================= UTILS ================= */
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-0 { margin-top: 0; } .mt-s { margin-top: 8px; } .mt-m { margin-top: 16px; } .mt-l { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-s { margin-bottom: 8px; } .mb-m { margin-bottom: 16px; } .mb-l { margin-bottom: 24px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

.muted { color: var(--muted); }
.hidden-mobile { }
@media (max-width: 680px){ .hidden-mobile { display: none; } }

/* Hero intro on dashboard */
.hero-intro{
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-ink) 100%);
  color: #f0e8d5;
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-intro::after{
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(196,90,59,0.4), transparent 70%);
  border-radius: 50%;
}
.hero-intro h2 { color: #fff; font-size: 1.8rem; max-width: 560px; position: relative; z-index: 1; }
.hero-intro p { color: rgba(240,232,213,0.85); max-width: 600px; position: relative; z-index: 1; }
.hero-intro .btn { position: relative; z-index: 1; }

/* Progress */
.progress{
  height: 6px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress > span { display: block; height: 100%; background: var(--clay); border-radius: inherit; transition: width .4s; }

/* Seven-step ring on dashboard */
.seven-ring {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px;
}
.seven-ring > div {
  aspect-ratio: 1/1; border-radius: 8px;
  background: var(--paper-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; color: var(--muted);
  font-weight: 500;
  position: relative;
}
.seven-ring > div.done { background: var(--green); color: #fff; border-color: transparent; }
.seven-ring > div.active { background: var(--clay); color: #fff; border-color: transparent; }

/* Hazard card grid */
.hazard-card{
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  cursor: pointer; transition: box-shadow .2s, transform .15s, border-color .2s;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px;
}
.hazard-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--clay); }
.hazard-card .hz-icon{
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--paper-2), #fff);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--clay);
  border: 1px solid var(--line);
}
.hazard-card h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-display); font-weight: 500; }
.hazard-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45; }

/* Checklist style */
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li{
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.checklist input[type=checkbox]{ width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); }
.checklist li.done { background: #f4f9ef; border-color: #c5dcb8; }
.checklist li.done > span { text-decoration: line-through; color: var(--muted); }

/* Measure tabs */
.mtype-tabs{ display: flex; gap: 4px; background: var(--paper-2); padding: 3px; border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.mtype-tabs button{
  flex: 1; padding: 8px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background .15s, color .15s;
  min-width: 90px;
}
.mtype-tabs button.active { background: #fff; color: var(--teal); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

/* Emergency card */
.emergency-card{
  background: linear-gradient(135deg, #b63a2e, #8a2a18);
  color: #fff;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}
.emergency-card .big-num{
  font-family: var(--font-display); font-size: 3.5rem; font-weight: 600;
  line-height: 1; margin: 10px 0 6px; letter-spacing: -0.03em;
}
.emergency-card .em-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; }

/* Compliance / deadline list rows */
.comp-list { display: flex; flex-direction: column; }
.comp-row{
  display: grid;
  grid-template-columns: 14px minmax(0,1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  border-radius: 8px;
}
.comp-row:last-child { border-bottom: 0; }
.comp-row:hover { background: var(--paper-2); transform: translateX(2px); }
.comp-dot{
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--risk-low); box-shadow: 0 0 0 4px rgba(126,167,122,0.18);
}
.comp-dot.ok      { background: var(--green);  box-shadow: 0 0 0 4px rgba(47,107,69,0.16); }
.comp-dot.partial { background: var(--amber);  box-shadow: 0 0 0 4px rgba(216,154,42,0.18); }
.comp-dot.open    { background: var(--red);    box-shadow: 0 0 0 4px rgba(182,58,46,0.16); }
.comp-title { font-weight: 600; }
.comp-law { text-align: right; }
.comp-stat { text-align: right; min-width: 86px; }
@media (max-width: 720px){
  .comp-row { grid-template-columns: 12px 1fr auto; }
  .comp-law { display: none; }
}

/* Print & PDF export look */
@media print {
  .sidebar, .topbar, .appfoot, .btn, .menu-toggle, .modal, .toast-stack, #gdprBanner { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .view { padding: 0; }
  body { background: #fff; }
}

/* =========================================================
   PraxisSafe · WordPress integration additions
   ========================================================= */

/* The app mounts full-height inside the host page */
#praxissafe-root { min-height: 100vh; }
.praxissafe-app-page { margin: 0; }

/* Sync status badge in the topbar */
.sync-status { display: inline-flex; align-items: center; margin-right: 6px; }
.sync-status .badge { font-size: 11px; }

/* Fatal / login-required notice */
.ps-fatal{
  max-width: 460px; margin: 12vh auto; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow-soft); text-align: center;
}
.ps-fatal h3 { font-family: var(--font-display); margin: 0 0 8px; }
.ps-fatal p { color: var(--muted); margin: 0; }
.ps-login-cta{ display:inline-block; margin-top:16px; }

/* ---------- Onboarding wizard ---------- */
#onboardingScreen{
  position: fixed; inset: 0; z-index: 80;
  background:
    radial-gradient(1100px 600px at 90% -10%, rgba(196,90,59,0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(15,59,58,0.10), transparent 60%),
    var(--paper);
  overflow-y: auto;
}
.ob-wrap{ min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.ob-card{
  width: 100%; max-width: 560px; background: #fff;
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lift); padding: 30px 32px;
}
.ob-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ob-head .brand-name{ font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--teal); }
.ob-body{ min-height: 230px; }
.ob-body h3{ font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 6px; }
.ob-body label{ display: block; margin-top: 14px; }
.ob-body label > span{ display:block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.ob-body input[type=text], .ob-body input[type=number], .ob-body input:not([type]), .ob-body select{
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: 10px; font: inherit; background: var(--paper);
}
.ob-foot{ display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }

/* Make the host theme's content wrapper not constrain the app */
.praxissafe-app-page #content,
.praxissafe-app-page .site-content,
.praxissafe-app-page .entry-content { max-width: none; margin: 0; padding: 0; }

/* ---------- Staff archive + participant checklist (Feinschliff) ---------- */
.staff-actions { display:flex; gap:4px; }
.card.staff-archived { opacity:.82; background:repeating-linear-gradient(135deg,#faf7f2,#faf7f2 10px,#f4efe5 10px,#f4efe5 20px); }
.staff-checklist {
  max-height: 190px; overflow-y: auto; border:1px solid var(--line-2);
  border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; background: var(--paper);
}
.staff-check { display:flex; align-items:center; gap:8px; padding:5px 2px; font-size:.92rem; cursor:pointer; }
.staff-check input { width:auto; margin:0; }
.badge.info { background:#e6eef0; color:#1a5755; }
