@import 'bootstrap/dist/css/bootstrap.css';
@import 'primeicons/primeicons.css';

/* ============================================================
   Plantoo Tech — Organization (Pro) panel
   Brand: teal #0e7a68
   ============================================================ */

:root {
  --brand: #0e7a68;
  --brand-700: #0b6253;
  --brand-800: #08493d;
  --blush: #7fccbb;
  --blush-soft: #cdeae3;
  --blush-bg: #e7f4f0;

  --bg: #eef3f2;
  --surface: #ffffff;
  --surface-2: #f3f7f6;
  --sidebar: #102420;
  --sidebar-2: #16332c;
  --sidebar-line: #234a40;
  --sidebar-text: #c4d8d1;
  --sidebar-muted: #7e988f;

  --ink: #161e1c;
  --ink-2: #445550;
  --muted: #7d8f8b;
  --faint: #adbfbb;

  --line: #e4eeeb;
  --line-2: #d9e8e4;

  --wa: #1faa59; --wa-bg: #e6f6ed;
  --fb: #0a7cff; --fb-bg: #e6f1ff;

  --green: #2f9e6f; --green-bg: #e7f5ee;
  --amber: #c98a14; --amber-bg: #fbf0d8;
  --red: #c5384b; --red-bg: #fbe7ea;
  --blue: #3b6fd4; --blue-bg: #e8eefb;
  --grey-bg: #edf2f0;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16,36,32,.05), 0 1px 3px rgba(16,36,32,.04);
  --shadow: 0 4px 16px rgba(16,36,32,.07), 0 1px 3px rgba(16,36,32,.05);
  --shadow-lg: 0 18px 50px rgba(16,36,32,.18);

  --ring: rgba(14,122,104,.16);
  --accent-shadow: rgba(14,122,104,.34);

  --font: "Hanken Grotesk", -apple-system, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#react-app { height: 100vh; overflow: hidden; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--blush-soft); color: var(--brand-800); }
.pt-mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c4d8d1; border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
.sidebar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); background-clip: content-box; }

/* ============================================================ LOGIN — PRO SPLIT */
.login-stage {
  height: 100vh; width: 100vw;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #eef3f1 0%, #f6f8f7 52%, #cdeae333 100%);
}
.login-grain { position: absolute; inset: 0; opacity: .55; z-index: 1;
  background-image: radial-gradient(rgba(14,122,104,.04) 1px, transparent 1px);
  background-size: 26px 26px; pointer-events: none; animation: grainPan 40s linear infinite; }
@keyframes grainPan { from{ background-position: 0 0; } to{ background-position: 260px 260px; } }

.login-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

/* ===== Org stage backdrop (spreadsheet grid + animated charts) ===== */
.login-bg.orgstage { z-index: 0; }
.og-grid { position: absolute; inset: -12%;
  background-image: linear-gradient(rgba(15,93,80,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(15,93,80,.07) 1px, transparent 1px);
  background-size: 40px 40px; animation: ogGrid 24s linear infinite; }
@keyframes ogGrid { from { background-position: 0 0; } to { background-position: 40px 40px; } }

.orgstage .og-sweep { position: absolute; height: 1.5px; width: 40%; opacity: .5; }
.og-sweep.s1 { top: 22%; left: -40%; background: linear-gradient(90deg, transparent, var(--blush), transparent); animation: ogSweep 9s linear infinite; }
.og-sweep.s2 { bottom: 28%; left: -40%; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: ogSweep 13s linear infinite 2.5s; }
.og-sweep.s3 { top: 60%; left: -40%; opacity: .4; background: linear-gradient(90deg, transparent, var(--blush), transparent); animation: ogSweep 16s linear infinite 4s; }
@keyframes ogSweep { 0% { transform: translateX(0); } 100% { transform: translateX(150vw); } }

.orgstage .og-bars { position: absolute; display: flex; align-items: flex-end; gap: 8px; }
.og-bars.b-left { bottom: 9%; left: 5%; height: 96px; opacity: .18; }
.og-bars.b-right { top: 13%; right: 6%; height: 66px; opacity: .14; }
.og-bars.b-mid { bottom: 34%; left: 31%; height: 54px; opacity: .12; gap: 6px; }
.orgstage .og-bars span { width: 13px; border-radius: 3px 3px 0 0; transform-origin: bottom; height: 100%; background: var(--brand); }
.orgstage .og-bars.b-right span { background: var(--blush); }
.orgstage .og-bars.b-mid span { width: 10px; background: var(--brand); }
.orgstage .og-bars span:nth-child(1) { animation: ogBar 3.2s ease-in-out infinite; }
.orgstage .og-bars span:nth-child(2) { animation: ogBar 3.8s ease-in-out infinite .3s; }
.orgstage .og-bars span:nth-child(3) { animation: ogBar 3.4s ease-in-out infinite .6s; }
.orgstage .og-bars span:nth-child(4) { animation: ogBar 4.1s ease-in-out infinite .9s; }
.orgstage .og-bars span:nth-child(5) { animation: ogBar 3.6s ease-in-out infinite 1.2s; }
@keyframes ogBar { 0%,100% { transform: scaleY(.32); } 50% { transform: scaleY(1); } }

.orgstage .og-trend { position: absolute; top: 9%; left: 3%; width: 210px; height: 84px; opacity: .5; overflow: visible; }
.orgstage .og-trend polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 360; stroke-dashoffset: 360; animation: ogDraw 6.5s ease-in-out infinite; }
@keyframes ogDraw { 0% { stroke-dashoffset: 360; } 45%,55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -360; } }

.orgstage .og-prog { position: absolute; height: 7px; border-radius: 4px; background: rgba(15,93,80,.1); overflow: hidden; }
.orgstage .og-prog > i { display: block; height: 100%; width: 100%; border-radius: 4px; background: rgba(15,93,80,.42); transform: scaleX(.12); transform-origin: left; }
.og-prog.p1 { top: 32%; left: 4%; width: 150px; } .og-prog.p1 > i { animation: ogProg 5s ease-in-out infinite; }
.og-prog.p2 { top: 37%; left: 4%; width: 108px; } .og-prog.p2 > i { animation: ogProg 5s ease-in-out infinite .6s; }
.og-prog.p3 { bottom: 24%; right: 6%; width: 140px; } .og-prog.p3 > i { animation: ogProg 5s ease-in-out infinite 1.2s; }
@keyframes ogProg { 0%,100% { transform: scaleX(.12); } 50% { transform: scaleX(.92); } }

.orgstage .og-sq { position: absolute; width: 9px; height: 9px; border-radius: 2px; opacity: .4; }
.og-sq.q1 { top: 30%; left: 24%; background: var(--brand); animation: ogBlink 5s ease-in-out infinite; }
.og-sq.q2 { bottom: 36%; left: 47%; background: var(--blush); animation: ogBlink 6.2s ease-in-out infinite 1s; }
.og-sq.q3 { top: 48%; right: 24%; background: var(--brand); animation: ogBlink 7s ease-in-out infinite 2s; }
.og-sq.q4 { bottom: 24%; right: 33%; background: var(--blush); animation: ogBlink 5.6s ease-in-out infinite 1.5s; }
@keyframes ogBlink { 0%,100% { opacity: .16; transform: scale(.8) rotate(45deg); } 50% { opacity: .5; transform: scale(1.15) rotate(45deg); } }

.orgstage .og-arrow { position: absolute; width: 13px; height: 13px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.og-arrow.ar1 { top: 26%; right: 31%; color: var(--brand); animation: ogArrow 3s ease-in-out infinite; }
.og-arrow.ar2 { bottom: 17%; left: 39%; color: var(--blush); animation: ogArrow 3.6s ease-in-out infinite 1s; }
@keyframes ogArrow { 0%,100% { opacity: .15; transform: rotate(-45deg) translate(0,0); } 50% { opacity: .42; transform: rotate(-45deg) translate(3px,-3px); } }

/* Split layout */
.pro-layout {
  position: relative; z-index: 2; width: 860px; max-width: 94vw;
  display: grid; grid-template-columns: 0.84fr 1fr;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(20,40,36,.05);
  animation: cardIn .6s cubic-bezier(.16,.84,.44,1) both;
}
@keyframes cardIn { from { transform: translateY(22px) scale(.975); } to { transform: none; } }
.pro-side {
  position: relative; overflow: hidden; padding: 38px 34px; display: flex; flex-direction: column; gap: 26px;
  background: linear-gradient(165deg, #0f5d50 0%, #0a3a32 100%); color: #fff;
}
.pro-side > * { position: relative; z-index: 2; }
.pro-side-bg { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.ps-line { position: absolute; height: 1.5px; width: 62%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); }
.ps-line.l1 { top: 30%; left: -62%; animation: orgSweep 11s linear infinite; }
.ps-line.l2 { bottom: 32%; left: -62%; animation: orgSweep 15s linear infinite 3s; }
@keyframes orgSweep { 0%{ transform: translateX(0); } 100%{ transform: translateX(250vw); } }
.ps-bars { position: absolute; bottom: 30%; right: 9%; display: flex; align-items: flex-end; gap: 6px; height: 62px; opacity: .2; }
.ps-bars span { width: 9px; background: #fff; border-radius: 2px 2px 0 0; transform-origin: bottom; height: 100%; }
.ps-bars span:nth-child(1){ animation: barPulse 3.2s ease-in-out infinite; }
.ps-bars span:nth-child(2){ animation: barPulse 3.8s ease-in-out infinite .3s; }
.ps-bars span:nth-child(3){ animation: barPulse 3.4s ease-in-out infinite .6s; }
.ps-bars span:nth-child(4){ animation: barPulse 4.1s ease-in-out infinite .9s; }
.ps-bars span:nth-child(5){ animation: barPulse 3.6s ease-in-out infinite 1.2s; }
@keyframes barPulse { 0%,100%{ transform: scaleY(.32); } 50%{ transform: scaleY(1); } }
.ps-arrow { position: absolute; top: 30%; right: 16%; width: 12px; height: 12px; border-top: 2px solid rgba(255,255,255,.5); border-right: 2px solid rgba(255,255,255,.5); animation: arrowUp 3.2s ease-in-out infinite; }
@keyframes arrowUp { 0%,100%{ opacity:.15; transform: rotate(-45deg) translate(0,0); } 50%{ opacity:.42; transform: rotate(-45deg) translate(3px,-3px); } }

.pro-brand { display: flex; align-items: center; gap: 11px; }
.pro-heading { font-size: 25px; line-height: 1.22; font-weight: 800; letter-spacing: -.02em; margin: 0; max-width: 13ch; }
.pro-feat { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 14px; }
.pro-feat li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: rgba(255,255,255,.88); line-height: 1.4; }
.pro-feat .fi { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.pro-foot { margin-top: auto; }
.pro-stats { display: flex; gap: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); margin-bottom: 13px; }
.pro-stats div { font-size: 11px; color: rgba(255,255,255,.6); }
.pro-stats b { display: block; font-size: 18px; color: #fff; font-family: var(--mono); font-weight: 600; margin-bottom: 1px; }
.pro-trust { font-size: 12px; color: rgba(255,255,255,.62); display: flex; align-items: center; gap: 7px; }

.pro-form { padding: 44px 42px 36px; display: flex; flex-direction: column; overflow-y: auto; }
.pro-form > * { animation: fieldIn .5s ease both; }
.pro-form > *:nth-child(1){ animation-delay:.04s } .pro-form > *:nth-child(2){ animation-delay:.08s }
.pro-form > *:nth-child(3){ animation-delay:.12s } .pro-form > *:nth-child(4){ animation-delay:.16s }
.pro-form > *:nth-child(5){ animation-delay:.20s } .pro-form > *:nth-child(6){ animation-delay:.24s }
@keyframes fieldIn { from { transform: translateY(9px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) { .pro-layout { grid-template-columns: 1fr; } .pro-side { display: none; } }

/* Standalone login card (in case used) */
.login-card { width: 392px; padding: 38px 38px 30px; background: var(--surface); border-radius: 22px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(20,40,36,.04); position: relative; z-index: 2;
  animation: cardIn .6s cubic-bezier(.16,.84,.44,1) both; }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.login-foot { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 28px; }

/* Form fields */
.pt-field { margin-bottom: 15px; }
.pt-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; letter-spacing: .01em; }
.pt-input { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 11px; background: var(--surface-2); font-size: 14.5px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; outline: none; }
.pt-input::placeholder { color: var(--faint); }
.pt-input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--ring); }

/* Multiline input — shares pt-input chrome but grows vertically and has comfortable
   padding / line-height. pt-textarea-mono is the JSON variant. */
.pt-textarea {
    width: 100%; min-height: 84px; padding: 10px 14px;
    border: 1.5px solid var(--line-2); border-radius: 11px;
    background: var(--surface-2); color: var(--ink);
    font: inherit; font-size: 14px; line-height: 1.55;
    transition: border-color .15s, box-shadow .15s, background .15s;
    outline: none; resize: vertical;
    -webkit-appearance: none;
}
.pt-textarea::placeholder { color: var(--faint); }
.pt-textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--ring); }
.pt-textarea:disabled { opacity: .55; cursor: not-allowed; }
.pt-textarea::-webkit-scrollbar { width: 10px; height: 10px; }
.pt-textarea::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid var(--surface-2); }
.pt-textarea::-webkit-scrollbar-thumb:hover { background: var(--brand); }
.pt-textarea-mono {
    font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
    tab-size: 2; -moz-tab-size: 2;
    padding: 12px 14px;
}
.pt-input-wrap { position: relative; }
.pt-input-wrap .pt-input { padding-right: 44px; }
.pt-input-eye { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; background: none; border: none; cursor: pointer; }
.pt-input-eye:hover { background: var(--grey-bg); }

/* Buttons */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 11px; font-weight: 600; font-size: 14px; transition: background .15s, transform .12s, box-shadow .15s, filter .15s; white-space: nowrap; border: none; cursor: pointer; font-family: var(--font); }
.pt-btn:active { transform: translateY(1px); }
.pt-btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px var(--accent-shadow); }
.pt-btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); filter: saturate(1.05); }
.pt-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.pt-btn-block { width: 100%; }
.pt-btn-ghost { background: var(--surface); color: var(--ink-2); border: 1.5px solid var(--line-2); }
.pt-btn-ghost:hover { border-color: var(--faint); background: var(--surface-2); }
.pt-btn-soft { background: var(--blush-bg); color: var(--brand-700); }
.pt-btn-soft:hover { background: var(--blush-soft); }
.pt-btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.pt-btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

.pt-login-error { color: var(--red); font-size: 13px; margin-bottom: 12px; padding: 8px 12px; background: var(--red-bg); border-radius: 8px; border: 1px solid rgba(197,56,75,.15); }
.pt-login-info { color: var(--brand); font-size: 13px; margin-bottom: 12px; padding: 8px 12px; background: var(--blush-bg); border-radius: 8px; border: 1px solid var(--blush); }

/* OTP */
.pt-otp { display: flex; gap: 8px; }
.pt-otp-box { width: 100%; height: 48px; text-align: center; font-size: 20px; font-weight: 700; font-family: var(--mono); border: 1.5px solid var(--line-2); border-radius: 11px; background: var(--surface-2); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; padding: 0; }
.pt-otp-box:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--ring); }
.pt-code-send { justify-content: center; }
.pt-code-hint { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.pt-code-hint a, .pt-code-hint button { color: var(--brand); font-weight: 600; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; font-size: inherit; }
.pt-code-hint a:hover, .pt-code-hint button:hover { text-decoration: underline; }
.pt-link-toggle { display: block; width: 100%; text-align: center; margin-top: 14px; color: var(--brand); font-weight: 600; font-size: 13px; background: none; border: none; cursor: pointer; padding: 4px 0; font-family: inherit; }
.pt-link-toggle:hover { text-decoration: underline; }

/* ============================================================ APP SHELL */
.pt-app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; overflow: hidden; }

.sidebar { background: linear-gradient(188deg, #11574b 0%, #0b372e 100%); color: rgba(255,255,255,.78); display: flex; flex-direction: column; overflow: hidden; }
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 4px; }
.sb-close { display: none; margin-left: auto; width: 34px; height: 34px; border-radius: 9px; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #fff; border: none; cursor: pointer; transition: background .13s; }
.sb-close:hover { background: rgba(255,255,255,.16); }
.sb-backdrop { display: none; position: fixed; inset: 0; background: rgba(8,28,24,.45); backdrop-filter: blur(2px); z-index: 40; animation: cardInBd .2s ease both; }
@keyframes cardInBd { from { opacity: 0; } to { opacity: 1; } }
.sb-ws { margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; gap: 10px; cursor: default; transition: background .15s; }
.sb-ws:hover { background: rgba(255,255,255,.13); }
.sb-ws .ws-nm { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-ws .ws-rl { font-size: 11px; color: rgba(255,255,255,.6); }
.sb-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.sb-sect { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.5); padding: 14px 12px 6px; font-weight: 600; }
.sb-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.78); font-size: 13.5px; font-weight: 500; transition: background .13s, color .13s, transform .13s; width: 100%; text-align: left; background: none; border: none; cursor: pointer; }
.sb-item:hover { background: rgba(255,255,255,.1); color: #fff; transform: translateX(2px); }
.sb-item.on { background: #fff; color: #0b4a3f; box-shadow: 0 6px 18px rgba(0,0,0,.22); font-weight: 600; }
.sb-item.on:hover { background: #fff; color: #0b4a3f; transform: none; }
.sb-item .sb-badge { margin-left: auto; background: rgba(255,255,255,.16); color: #fff; font-size: 11px; font-weight: 600; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); }
.sb-item.on .sb-badge { background: rgba(14,122,104,.16); color: #0b4a3f; }

.pt-main { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.pt-topbar { height: 62px; flex-shrink: 0; background: #ffffff; border-bottom: 1px solid #e4ece9; display: flex; align-items: center; gap: 14px; padding: 0 24px; position: relative; z-index: 30; }
.pt-tb-menu { display: none; width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--ink-2); cursor: pointer; flex-shrink: 0; transition: background .14s, border-color .14s; }
.pt-tb-menu:hover { background: var(--grey-bg); border-color: var(--blush); }
.pt-tb-title { min-width: 0; flex: 1; }
.pt-topbar h1 { font-size: 18px; margin: 0; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-topbar .pt-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-tb-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.pt-tb-user-wrap { position: relative; }
.pt-user-btn { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 6px; border-radius: 11px; background: none; border: none; cursor: pointer; transition: background .14s; }
.pt-user-btn:hover { background: var(--surface-2); }
.pt-user-btn-meta { text-align: left; line-height: 1.25; max-width: 150px; display: flex; flex-direction: column; }
.pt-u-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-u-role { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 248px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 7px; z-index: 200; animation: ddIn .2s ease both; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pt-user-dropdown-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-align: left; transition: background .12s, color .12s; background: none; border: none; cursor: pointer; font-family: var(--font); }
.pt-user-dropdown-item:hover { background: var(--surface-2); color: var(--ink); }
.pt-user-dropdown-item.pt-danger { color: var(--brand); }
.pt-user-dropdown-item.pt-danger:hover { background: var(--blush-bg); }
.pt-dropdown-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.pt-content { flex: 1; overflow-y: auto; padding: 26px; background:
  radial-gradient(1100px 360px at 100% -5%, rgba(127,204,187,.12), transparent 60%),
  var(--bg); }

.pt-ava { border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; background: var(--brand); font-family: var(--font); }
.pt-ava.sq { border-radius: 11px; }

.pt-page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.pt-page-head h2 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.015em; }
.pt-page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.pt-grid { display: grid; gap: 16px; }
.pt-g-4 { grid-template-columns: repeat(4, 1fr); }
.pt-g-3 { grid-template-columns: repeat(3, 1fr); }
.pt-g-2 { grid-template-columns: repeat(2, 1fr); }

.pt-card { background: var(--surface); border: 1px solid #dde9e5; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.pt-card-pad { padding: 20px; }
.pt-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #e8f0ed; }
.pt-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.pt-card-head .pt-hint { font-size: 12.5px; color: var(--muted); }

.pt-stat { background: var(--surface); border: 1px solid #dde9e5; border-top: 2px solid var(--brand); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease; }
.pt-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pt-stat .pt-lbl { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; font-weight: 500; }
.pt-stat .pt-lbl .pt-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--blush-bg); color: var(--brand); flex-shrink: 0; }
.pt-stat .pt-val { font-size: 28px; font-weight: 700; margin: 12px 0 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-stat .pt-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.pt-delta-up { color: var(--green); }
.pt-delta-down { color: var(--red); }
.pt-delta-vs { color: var(--faint); font-weight: 500; margin-left: 4px; }

.pt-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pt-badge .pt-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pt-b-green { background: var(--green-bg); color: var(--green); }
.pt-b-amber { background: var(--amber-bg); color: var(--amber); }
.pt-b-red { background: var(--red-bg); color: var(--red); }
.pt-b-blue { background: var(--blue-bg); color: var(--blue); }
.pt-b-grey { background: var(--grey-bg); color: var(--muted); }
.pt-b-brand { background: var(--blush-bg); color: var(--brand-700); }

.pt-live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px; background: var(--green-bg); color: var(--green); font-size: 11.5px; font-weight: 600; }
.pt-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: beat 2.4s ease-in-out infinite; position: relative; }
.pt-live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: .5; animation: ripple 1.8s ease-out infinite; }
@keyframes beat { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.35); opacity:.7; } }
@keyframes ripple { 0%{ transform: scale(.6); opacity:.6; } 100%{ transform: scale(1.9); opacity:0; } }

.pt-welcome { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-800) 100%); border-radius: var(--radius); padding: 24px 28px; color: #fff; position: relative; overflow: hidden; }
.pt-welcome::after { content: ""; position: absolute; top: -30%; right: -5%; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.06); }
.pt-welcome h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.pt-welcome p { margin: 0; color: rgba(255,255,255,.75); font-size: 14px; }

.pt-quick-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .13s, box-shadow .13s, transform .13s; text-align: left; width: 100%; font-family: var(--font); }
.pt-quick-link:hover { border-color: var(--blush); box-shadow: var(--shadow); transform: translateY(-2px); }
.pt-quick-link .pt-ql-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--blush-bg); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.pt-quick-link .pt-ql-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.pt-quick-link .pt-ql-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.pt-fade-in { animation: ptFade .35s ease both; }
@keyframes ptFade { from { transform: translateY(7px); opacity: 0; } to { transform: none; opacity: 1; } }
.pt-fade-in > *:nth-child(1){ animation: ptRise .5s cubic-bezier(.16,.84,.44,1) .02s both; }
.pt-fade-in > *:nth-child(2){ animation: ptRise .5s cubic-bezier(.16,.84,.44,1) .07s both; }
.pt-fade-in > *:nth-child(3){ animation: ptRise .5s cubic-bezier(.16,.84,.44,1) .12s both; }
.pt-fade-in > *:nth-child(4){ animation: ptRise .5s cubic-bezier(.16,.84,.44,1) .17s both; }
.pt-fade-in > *:nth-child(5){ animation: ptRise .5s cubic-bezier(.16,.84,.44,1) .22s both; }
@keyframes ptRise { from { transform: translateY(13px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================ RESPONSIVE */
@media (max-width: 1024px) {
  .pt-app { grid-template-columns: 1fr !important; }
  .pt-tb-menu { display: inline-flex; }
  .pt-topbar { padding: 0 16px; gap: 10px; }
  .pt-content { padding: 18px 16px; }
  .pt-user-btn { padding: 0 4px; }
  .pt-user-btn-meta { display: none; }
  .sidebar { position: fixed !important; top: 0; bottom: 0; left: 0; width: 280px; max-width: 86vw; z-index: 50;
    transform: translateX(-104%); transition: transform .26s cubic-bezier(.16,.84,.44,1);
    box-shadow: 0 18px 50px rgba(0,0,0,.4); will-change: transform; }
  .sidebar.is-open { transform: translateX(0); }
  .sb-close { display: inline-flex; }
  .sb-backdrop { display: block; }
}

@media (max-width: 760px) {
  .pt-g-4 { grid-template-columns: repeat(2, 1fr); }
  .pt-g-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .pt-g-4, .pt-g-3, .pt-g-2 { grid-template-columns: 1fr; }
  .pt-topbar h1 { font-size: 16px; }
  .pt-topbar .pt-sub { display: none; }
  .pt-content { padding: 14px; }
  .pt-page-head { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   PrimeReact overrides — Org (teal/white)
   ============================================================ */

/* Dialog */
.p-dialog-mask { background: rgba(8,28,24,.42); backdrop-filter: blur(2px); }
.p-dialog {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  overflow: hidden;
}
.p-dialog .p-dialog-header {
  background: var(--surface-2);
  color: var(--ink);
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.p-dialog .p-dialog-header .p-dialog-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.p-dialog .p-dialog-header-icons { gap: 4px; }
.p-dialog .p-dialog-header-icon {
  width: 30px; height: 30px; border-radius: 8px;
  color: var(--muted); background: none; border: none;
  transition: background .14s, color .14s;
}
.p-dialog .p-dialog-header-icon:enabled:hover { background: var(--grey-bg); color: var(--ink); }
.p-dialog .p-dialog-content { background: #ffffff; color: var(--ink); padding: 20px 20px 22px; }
.p-dialog .p-dialog-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 12px 20px; }
.p-dialog .form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; letter-spacing: .01em; }

/* Buttons */
.p-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; font-family: var(--font);
  background: var(--brand); color: #fff; border: 1px solid transparent;
  box-shadow: 0 2px 8px var(--accent-shadow);
  transition: background .14s, transform .12s, box-shadow .14s, filter .14s;
  cursor: pointer;
}
.p-button:enabled:hover { background: var(--brand-700); transform: translateY(-1px); filter: saturate(1.04); }
.p-button:enabled:active { transform: translateY(0); }
.p-button.p-button-sm, .p-button.p-button-sm.p-button-icon-only { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.p-button .p-button-icon { font-size: 13px; }
.p-button.p-button-info { background: var(--blush-bg); color: var(--brand-700); border: 1px solid var(--blush); box-shadow: none; }
.p-button.p-button-info:enabled:hover { background: var(--blush-soft); border-color: var(--brand); }
.p-button.p-button-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(201,138,20,.4); box-shadow: none; }
.p-button.p-button-warning:enabled:hover { background: #f7e7b2; }
.p-button.p-button-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(47,158,111,.32); box-shadow: none; }
.p-button.p-button-success:enabled:hover { filter: brightness(.96); }
.p-button.p-button-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(197,56,75,.32); box-shadow: none; }
.p-button.p-button-danger:enabled:hover { background: #f7d6db; }
.p-button.p-button-secondary, .p-button.p-button-text {
  background: var(--surface); color: var(--ink-2); border: 1.5px solid var(--line-2); box-shadow: none;
}
.p-button.p-button-secondary:enabled:hover, .p-button.p-button-text:enabled:hover { background: var(--surface-2); border-color: var(--faint); }

/* Inputs */
.p-inputtext {
  width: 100%; height: 42px; padding: 0 13px;
  border: 1.5px solid var(--line-2); border-radius: 10px;
  background: var(--surface-2); color: var(--ink);
  font-size: 14px; font-family: var(--font);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
.p-inputtext::placeholder { color: var(--faint); }
.p-inputtext:enabled:hover { border-color: var(--faint); }
.p-inputtext:enabled:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--ring); }
.p-inputtext.p-disabled, .p-inputtext:disabled { opacity: .6; background: var(--grey-bg); cursor: not-allowed; }

/* DataTable */
.p-datatable { background: transparent; color: var(--ink); }
.p-datatable .p-datatable-thead > tr > th {
  background: var(--surface-2); color: #4a766b;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  padding: 12px 14px;
}
.p-datatable .p-datatable-tbody > tr { background: transparent; color: var(--ink); transition: background .12s; }
.p-datatable .p-datatable-tbody > tr > td {
  background: transparent; border-bottom: 1px solid var(--line);
  padding: 13px 14px; color: var(--ink); font-size: 13.5px;
}
.p-datatable .p-datatable-tbody > tr:hover { background: var(--blush-bg); }
.p-datatable .p-sortable-column .p-sortable-column-icon { color: var(--muted); }
.p-datatable .p-sortable-column.p-highlight { color: var(--brand); }

/* Paginator */
.p-paginator { background: transparent; border: none; padding: 12px 0; color: var(--muted); }
.p-paginator .p-paginator-pages .p-paginator-page,
.p-paginator .p-paginator-prev, .p-paginator .p-paginator-next,
.p-paginator .p-paginator-first, .p-paginator .p-paginator-last {
  color: var(--ink-2); background: transparent; border: 1px solid transparent;
  min-width: 32px; height: 32px; border-radius: 8px; font-size: 13px;
  transition: background .12s, color .12s;
}
.p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):hover,
.p-paginator .p-paginator-prev:hover, .p-paginator .p-paginator-next:hover { background: var(--blush-bg); color: var(--brand-700); }
.p-paginator .p-paginator-pages .p-paginator-page.p-highlight { background: var(--brand); color: #fff; }

/* Dropdown / MultiSelect */
.p-multiselect, .p-dropdown {
  background: var(--surface-2); border: 1.5px solid var(--line-2);
  border-radius: 10px; color: var(--ink); height: 42px; min-width: 200px;
  transition: border-color .15s, box-shadow .15s;
}
.p-multiselect:not(.p-disabled):hover, .p-dropdown:not(.p-disabled):hover { border-color: var(--faint); }
.p-multiselect:not(.p-disabled).p-focus, .p-dropdown:not(.p-disabled).p-focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.p-multiselect .p-multiselect-label, .p-dropdown .p-dropdown-label { color: var(--ink); padding: 10px 13px; font-size: 14px; }
.p-multiselect .p-multiselect-label.p-placeholder, .p-dropdown .p-dropdown-label.p-placeholder { color: var(--faint); }
.p-multiselect .p-multiselect-trigger, .p-dropdown .p-dropdown-trigger { color: var(--muted); width: 36px; }


/* Filter bar (login logs, ship leaderboard).
   Everything in this row is 42px tall and vertically centred. The controls come from three
   different sources — a .p-inputtext, several .p-button-sm presets, and a .p-calendar wrapper —
   and each brought its own height, so the row read as ragged. Rather than chase each one, the
   bar owns the height and its children inherit it. */
.pt-filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pt-filterbar-group { display: flex; gap: 4px; align-items: center; }
.pt-filterbar-sep { font-size: 12.5px; color: var(--muted); padding: 0 2px; }

.pt-filterbar .p-inputtext,
.pt-filterbar .p-calendar,
.pt-filterbar .p-button,
.pt-filterbar .p-button.p-button-sm {
  height: 42px; min-height: 42px; margin: 0;
}
/* .p-button-sm ships its own smaller padding/·font — keep the type size, drop the height. */
.pt-filterbar .p-button.p-button-sm { padding: 0 14px; font-size: 13px; }
.pt-filterbar .p-button .p-button-icon { font-size: 13px; }

/* Calendar open panel. PrimeReact ships no theme CSS in this project (primeicons only), so every
   component is dressed here — without this the datepicker renders unstyled. Matched to the
   dropdown panel below so the two read as one kit. Light theme, unlike the admin panel's. */
.p-datepicker {
  background: #ffffff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); color: var(--ink); padding: 8px; margin-top: 4px;
}
.p-datepicker .p-datepicker-header {
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  color: var(--ink); padding: 8px 6px; border-radius: 8px 8px 0 0;
}
.p-datepicker .p-datepicker-title .p-datepicker-year,
.p-datepicker .p-datepicker-title .p-datepicker-month { color: var(--ink); font-weight: 700; background: none; border: none; }
.p-datepicker .p-datepicker-prev, .p-datepicker .p-datepicker-next { color: var(--muted); border-radius: 8px; }
.p-datepicker .p-datepicker-prev:hover, .p-datepicker .p-datepicker-next:hover { background: var(--blush-bg); color: var(--brand); }
.p-datepicker table { font-size: 13px; margin: 6px 0 0; }
.p-datepicker table th { color: var(--muted); font-weight: 700; padding: 6px; }
.p-datepicker table td { padding: 2px; }
.p-datepicker table td > span { color: var(--ink-2); border-radius: 8px; width: 32px; height: 32px; transition: background .12s, color .12s; }
.p-datepicker table td > span:hover { background: var(--blush-bg); color: var(--brand); }
.p-datepicker table td > span.p-highlight { background: var(--brand); color: #fff; }
.p-datepicker table td.p-datepicker-today > span { border: 1px solid var(--blush); }
.p-datepicker table td.p-disabled > span, .p-datepicker .p-datepicker-other-month > span { color: var(--muted); opacity: .5; }
.p-datepicker .p-timepicker { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.p-datepicker .p-timepicker button { color: var(--muted); border-radius: 8px; }
.p-datepicker .p-timepicker button:hover { background: var(--blush-bg); color: var(--brand); }

/* One border on the WRAPPER — see the note in admin.scss. The input and the trigger each brought
   their own border, radius and height, which showed as a seam and a height mismatch. */
.p-calendar {
  display: inline-flex; align-items: stretch; width: auto;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.p-calendar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--blush-soft); }
.p-calendar > .p-inputtext,
.p-calendar > input.pt-input,
.p-calendar > input.pt-input:focus,
.p-calendar > input.p-inputtext:focus {
  flex: 1; min-width: 0; height: 42px; margin: 0;
  border: none; border-radius: 0; background: transparent; box-shadow: none; outline: none;
  color: var(--ink); padding: 0 12px; font-size: 14px;
  text-align: center;
}
.p-calendar .p-datepicker-trigger,
.p-calendar .p-datepicker-trigger.p-button {
  flex: 0 0 38px; height: 42px; margin: 0;
  background: transparent; border: none; border-radius: 0; box-shadow: none;
  color: var(--muted); transition: background .12s, color .12s;
}
.p-calendar .p-datepicker-trigger:hover,
.p-calendar .p-datepicker-trigger.p-button:hover { background: var(--blush-bg); color: var(--brand); }
.p-calendar .p-datepicker-trigger:focus { box-shadow: none; }
.p-calendar .p-datepicker-trigger .p-button-icon,
.p-calendar .p-datepicker-trigger .pi { display: inline-block; margin: 0; font-size: 15px; color: inherit; }
.p-calendar .p-datepicker-trigger .p-button-label { display: none; }

.p-multiselect-panel, .p-dropdown-panel {
  background: #ffffff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); color: var(--ink); margin-top: 4px; overflow: hidden;
}
.p-multiselect-header, .p-dropdown-header { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 10px 12px; }
.p-multiselect-items, .p-dropdown-items { padding: 4px; }
.p-multiselect-items .p-multiselect-item, .p-dropdown-items .p-dropdown-item {
  color: var(--ink-2); padding: 9px 12px; font-size: 13.5px; border-radius: 8px;
  transition: background .12s, color .12s;
}
.p-multiselect-items .p-multiselect-item:not(.p-highlight):not(.p-disabled):hover,
.p-dropdown-items .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover { background: var(--blush-bg); color: var(--brand-700); }
.p-multiselect-items .p-multiselect-item.p-highlight,
.p-dropdown-items .p-dropdown-item.p-highlight { background: var(--brand); color: #fff; }

/* Checkbox */
.p-checkbox { width: 18px; height: 18px; }
.p-checkbox .p-checkbox-box {
  background: var(--surface-2); border: 1.5px solid var(--line-2);
  border-radius: 5px; width: 18px; height: 18px;
  transition: background .14s, border-color .14s;
}
.p-checkbox:not(.p-disabled):not(.p-highlight) .p-checkbox-box:hover { border-color: var(--brand); }
.p-checkbox .p-checkbox-box.p-highlight { background: var(--brand); border-color: var(--brand); }
.p-checkbox .p-checkbox-box .p-checkbox-icon { color: #fff; font-size: 12px; font-weight: 700; }

/* Tag */
.p-tag {
  background: var(--blush-bg); color: var(--brand-700);
  border-radius: 20px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.p-tag.p-tag-success { background: var(--green-bg); color: var(--green); }
.p-tag.p-tag-warning { background: var(--amber-bg); color: var(--amber); }
.p-tag.p-tag-danger { background: var(--red-bg); color: var(--red); }
.p-tag.p-tag-info { background: var(--blue-bg); color: var(--blue); }

/* Message.
   PrimeReact renders <Message> (singular) as .p-inline-message and <Messages> (the ref-based,
   dismissable one) as .p-message. Only the latter was styled here, so every inline Message in
   the panel drew as bare text with a stray glyph — no background, no border, no padding. */
.p-inline-message {
  display: inline-flex; align-items: flex-start; gap: 8px; width: 100%;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.5;
  border: 1px solid; margin: 0;
}
.p-inline-message.p-inline-message-error   { background: var(--red-bg);   border-color: rgba(197,56,75,.22); color: var(--red); }
.p-inline-message.p-inline-message-info    { background: var(--blush-bg); border-color: var(--blush);        color: var(--brand-700); }
.p-inline-message.p-inline-message-success { background: var(--green-bg); border-color: rgba(47,158,111,.3); color: var(--green); }
.p-inline-message.p-inline-message-warn    { background: var(--amber-bg); border-color: rgba(201,138,20,.3); color: var(--amber); }
.p-inline-message .p-inline-message-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.p-inline-message .p-inline-message-text { flex: 1; }

/* Message */
.p-message {
  border-radius: 10px; padding: 10px 14px; font-size: 13px;
  border: 1px solid; margin: 0;
}
.p-message .p-message-wrapper { padding: 0; }
.p-message.p-message-error { background: var(--red-bg); border-color: rgba(197,56,75,.22); color: var(--red); }
.p-message.p-message-info { background: var(--blush-bg); border-color: var(--blush); color: var(--brand-700); }
.p-message.p-message-success { background: var(--green-bg); border-color: rgba(47,158,111,.3); color: var(--green); }
.p-message.p-message-warn, .p-message.p-message-warning { background: var(--amber-bg); border-color: rgba(201,138,20,.3); color: var(--amber); }
.p-message .p-message-icon { font-size: 14px; }

/* ProgressSpinner */
.p-progress-spinner .p-progress-spinner-circle { stroke: var(--brand); animation-duration: 1.2s; }

/* ============================================================
   Org panel — statistical backdrop + custom cursor
   (mirrors the org login)
   ============================================================ */
.pt-app.theme-org .pt-content { position: relative; }
.org-panel-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.org-panel-fx .panel-orgstage { position: absolute; inset: 0; }

/* soft glows */
.panel-orgstage .og-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; }
.panel-orgstage .og-glow.g1 { width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(15,93,80,.4), transparent 70%); animation: ogGlow1 48s ease-in-out infinite; }
.panel-orgstage .og-glow.g2 { width: 440px; height: 440px; bottom: -160px; right: -100px;
  background: radial-gradient(circle, rgba(127,204,187,.34), transparent 70%); animation: ogGlow2 60s ease-in-out infinite; }
@keyframes ogGlow1 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(50px,34px); } }
@keyframes ogGlow2 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(-44px,-30px); } }

/* plot styling */
.og-plot { position: absolute; overflow: visible; }
.og-plot .og-axis  { stroke: rgba(15,93,80,.3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.og-plot .og-fit   { stroke: rgba(15,93,80,.5); stroke-width: 1.6; stroke-linecap: round; fill: none;
  stroke-dasharray: 230; stroke-dashoffset: 230; animation: ogDraw 7s ease-in-out infinite; }
.og-plot .og-curve { stroke: rgba(15,93,80,.5); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; fill: none;
  stroke-dasharray: 340; stroke-dashoffset: 340; animation: ogDraw 8s ease-in-out infinite; }
.og-plot .og-area  { fill: rgba(15,93,80,.06); }
.og-plot .og-mean  { stroke: rgba(15,93,80,.42); stroke-width: 1.2; stroke-dasharray: 3 3; }
.og-plot .og-sd    { stroke: rgba(15,93,80,.26); stroke-width: 1; stroke-dasharray: 2 3; }
.og-plot .og-bar   { fill: rgba(15,93,80,.12); stroke: rgba(15,93,80,.28); stroke-width: 1;
  transform-origin: bottom; transform-box: fill-box; animation: ogBarRise 4.5s ease-in-out infinite; }
.og-plot .og-bar:nth-child(3){ animation-delay: .2s; } .og-plot .og-bar:nth-child(4){ animation-delay: .4s; }
.og-plot .og-bar:nth-child(5){ animation-delay: .6s; } .og-plot .og-bar:nth-child(6){ animation-delay: .8s; }
.og-plot .og-bar:nth-child(7){ animation-delay: 1s; }  .og-plot .og-bar:nth-child(8){ animation-delay: 1.2s; }
@keyframes ogBarRise { 0%,100%{ transform: scaleY(.82); opacity: .7; } 50%{ transform: scaleY(1); opacity: 1; } }
.og-plot .og-pt    { fill: rgba(15,93,80,.55); animation: ogTwinkle 4s ease-in-out infinite; }
.og-plot .og-pt:nth-child(3){ animation-delay: .3s; } .og-plot .og-pt:nth-child(4){ animation-delay: .6s; }
.og-plot .og-pt:nth-child(5){ animation-delay: .9s; } .og-plot .og-pt:nth-child(6){ animation-delay: 1.2s; }
.og-plot .og-pt:nth-child(7){ animation-delay: 1.5s; } .og-plot .og-pt:nth-child(8){ animation-delay: 1.8s; }
.og-plot .og-pt:nth-child(9){ animation-delay: 2.1s; } .og-plot .og-pt:nth-child(10){ animation-delay: 2.4s; }
@keyframes ogTwinkle { 0%,100%{ opacity: .28; } 50%{ opacity: .62; } }
.og-plot .og-trace { fill: #0e7a68; filter: drop-shadow(0 0 4px rgba(15,93,80,.5)); }
.og-plot .og-ci    { fill: rgba(15,93,80,.07); stroke: none; animation: ogCI 5s ease-in-out infinite; }
@keyframes ogCI { 0%,100%{ opacity: .5; } 50%{ opacity: 1; } }
.og-plot .og-scan  { stroke: rgba(15,93,80,.5); stroke-width: 1.4; animation: ogScanX 5.5s ease-in-out infinite; }
@keyframes ogScanX { 0%{ transform: translateX(0); opacity: 0; } 12%{ opacity: 1; } 88%{ opacity: 1; } 100%{ transform: translateX(196px); opacity: 0; } }
.og-plot.p-donut .og-ring-bg { stroke: rgba(15,93,80,.14); stroke-width: 9; }
.og-plot.p-donut .og-ring    { stroke-width: 9; stroke-linecap: round; fill: none; transform-origin: center; }
.og-plot.p-donut .og-ring.s1 { stroke: rgba(15,93,80,.55);  stroke-dasharray: 84 188; animation: ogDonut 9s ease-in-out infinite; }
.og-plot.p-donut .og-ring.s2 { stroke: rgba(127,204,187,.7); stroke-dasharray: 52 188; stroke-dashoffset: -90; animation: ogDonut 9s ease-in-out infinite .4s; }
.og-plot.p-donut .og-ring.s3 { stroke: rgba(15,93,80,.32);  stroke-dasharray: 34 188; stroke-dashoffset: -150; animation: ogDonut 9s ease-in-out infinite .8s; }
@keyframes ogDonut { 0%,100%{ transform: rotate(-90deg) scale(1); } 50%{ transform: rotate(-78deg) scale(1.04); } }
@keyframes ogDraw  { 0%{ stroke-dashoffset: 340; } 46%,54%{ stroke-dashoffset: 0; } 100%{ stroke-dashoffset: -340; } }

/* drifting sample points */
.panel-orgstage .og-samples { position: absolute; inset: 0; }
.panel-orgstage .og-sample { position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(15,93,80,.42); box-shadow: 0 0 6px rgba(15,93,80,.3); opacity: 0;
  animation: ogSample 14s ease-in-out infinite; }
.panel-orgstage .og-sample.d0 { left: 22%; top: 70%; animation-duration: 13s; animation-delay: 0s; }
.panel-orgstage .og-sample.d1 { left: 38%; top: 80%; animation-duration: 17s; animation-delay: 3s; }
.panel-orgstage .og-sample.d2 { left: 55%; top: 72%; animation-duration: 15s; animation-delay: 6s; }
.panel-orgstage .og-sample.d3 { left: 68%; top: 84%; animation-duration: 19s; animation-delay: 2s; }
.panel-orgstage .og-sample.d4 { left: 80%; top: 66%; animation-duration: 16s; animation-delay: 8s; }
.panel-orgstage .og-sample.d5 { left: 30%; top: 60%; animation-duration: 18s; animation-delay: 5s; }
.panel-orgstage .og-sample.d6 { left: 60%; top: 58%; animation-duration: 14s; animation-delay: 10s; }
.panel-orgstage .og-sample.d7 { left: 88%; top: 78%; animation-duration: 20s; animation-delay: 7s; }
@keyframes ogSample { 0%{ transform: translateY(0) scale(.6); opacity: 0; } 12%{ opacity: .6; } 80%{ opacity: .5; } 100%{ transform: translateY(-130px) scale(1); opacity: 0; } }

/* plot placements */
.panel-orgstage .p-scatter { top: 12%; left: 4%;  width: 190px; height: 140px; }
.panel-orgstage .p-bell    { top: 16%; right: 5%; width: 220px; height: 130px; }
.panel-orgstage .p-hist    { bottom: 8%; left: 6%; width: 190px; height: 130px; }
.panel-orgstage .p-fn      { bottom: 12%; right: 7%; width: 190px; height: 140px; }
.panel-orgstage .p-donut   { top: 54%; left: 44%; width: 84px; height: 84px; opacity: .85; }

/* floating equations */
.og-eq { position: absolute; font-family: var(--mono); font-size: 13px;
  color: rgba(15,93,80,.22); white-space: nowrap; letter-spacing: .01em;
  animation: ogEqFade 6s ease-in-out infinite; }
.panel-orgstage .og-eq.e1 { top: 44%; left: 25%; }
.panel-orgstage .og-eq.e2 { top: 30%; left: 54%; font-size: 15px; animation-delay: 1s; }
.panel-orgstage .og-eq.e3 { bottom: 30%; left: 34%; animation-delay: 2s; }
.panel-orgstage .og-eq.e4 { top: 64%; right: 26%; animation-delay: 3s; }
.panel-orgstage .og-eq.e5 { top: 25%; left: 17%; font-size: 12px; animation-delay: 1.5s; }
.panel-orgstage .og-eq.e6 { bottom: 20%; right: 38%; font-size: 12px; animation-delay: 2.5s; }
.panel-orgstage .og-eq.e7 { top: 50%; right: 14%; font-size: 12px; animation-delay: 3.5s; }
@keyframes ogEqFade { 0%,100%{ opacity: .5; } 50%{ opacity: 1; } }

@media (prefers-reduced-motion: reduce){
  .panel-orgstage .og-glow,
  .og-plot .og-fit, .og-plot .og-curve, .og-plot .og-bar, .og-plot .og-pt,
  .og-plot .og-trace, .og-plot .og-ci, .og-plot .og-scan, .og-plot.p-donut .og-ring,
  .panel-orgstage .og-sample, .panel-orgstage .og-eq { animation: none !important; }
}

/* ===== Custom cursor: dot + trailing ring ===== */
.org-cursor { position: fixed; inset: 0; pointer-events: none; z-index: 45; }
.oc-dot { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: #0e7a68; box-shadow: 0 0 10px rgba(14,122,104,.5); will-change: transform; }
.oc-ring { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; border: 1.5px solid rgba(14,122,104,.45); will-change: transform;
  transition: width .2s, height .2s, margin .2s, border-color .2s; }
.oc-ring.oc-pulse { animation: ocPulse .5s ease-out; }
@keyframes ocPulse { 0%{ transform-origin: center; } 50%{ box-shadow: 0 0 0 6px rgba(14,122,104,.12); } 100%{ box-shadow: 0 0 0 0 rgba(14,122,104,0); } }
.oc-scans { position: absolute; inset: 0; }
.oc-ripple { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  border: 1.5px solid rgba(14,122,104,.6); transform: scale(.3); opacity: .8;
  animation: ocRipple .65s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes ocRipple { 0%{ transform: scale(.3); opacity: .8; } 100%{ transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce){ .oc-ripple { display: none; } .oc-ring { transition: none; } }

/* Toast.
   PrimeReact ships its own component CSS with pastel severity colours, and this project loads no
   PrimeReact theme to override them — so "Organization created." arrived as a pale green block on
   a panel that is nothing of the sort. Severity is carried by a left border and the icon, not by
   flooding the whole surface. */
.p-toast { opacity: 1; }
.p-toast .p-toast-message {
  background: #ffffff; border: 1px solid var(--line);
  border-left: 4px solid var(--muted); border-radius: 12px;
  box-shadow: var(--shadow-lg); color: var(--ink); margin: 0 0 12px;
}
.p-toast .p-toast-message .p-toast-message-content { padding: 14px 16px; gap: 12px; align-items: flex-start; }
.p-toast .p-toast-message .p-toast-summary { font-size: 14px; font-weight: 700; color: var(--ink); }
.p-toast .p-toast-message .p-toast-detail { font-size: 13px; margin-top: 3px; color: var(--ink-2); line-height: 1.45; }
.p-toast .p-toast-message .p-toast-message-icon { font-size: 17px; margin-top: 1px; }
.p-toast .p-toast-icon-close { color: var(--muted); width: 26px; height: 26px; border-radius: 7px; }
.p-toast .p-toast-icon-close:hover { background: var(--blush-bg); color: var(--ink); }

.p-toast .p-toast-message-success { border-left-color: var(--green); }
.p-toast .p-toast-message-success .p-toast-message-icon { color: var(--green); }
.p-toast .p-toast-message-info { border-left-color: var(--blue, var(--brand)); }
.p-toast .p-toast-message-info .p-toast-message-icon { color: var(--blue, var(--brand)); }
.p-toast .p-toast-message-warn { border-left-color: var(--amber); }
.p-toast .p-toast-message-warn .p-toast-message-icon { color: var(--amber); }
.p-toast .p-toast-message-error { border-left-color: var(--brand); }
.p-toast .p-toast-message-error .p-toast-message-icon { color: var(--brand); }

/* PrimeReact 10.9 renders a real <input class="p-*-input"> on top of every checkbox, radio and
   switch — an invisible, full-size overlay that carries the keyboard and screen-reader behaviour.
   Making it invisible is the THEME's job, and this panel imports no theme (primeicons only), so the
   native macOS control painted on top of the hand-styled box: a blue tick with a ghost box beneath
   it (found 20/08/2026).
   Note primereact.min.css does NOT fix this — it contains no .p-checkbox rules at all. The admin
   panel escapes it only because it imports saga-blue. These rules mirror what that theme does. */
.p-checkbox, .p-radiobutton, .p-inputswitch, .p-togglebutton {
  position: relative; display: inline-flex; user-select: none; vertical-align: bottom;
}
.p-checkbox-input, .p-radiobutton-input, .p-inputswitch-input, .p-togglebutton-input {
  appearance: none; -webkit-appearance: none;
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0; opacity: 0; z-index: 1; outline: 0 none; cursor: pointer;
}

/* Kept for the components that still use the older wrapper (Dropdown's hidden select, etc.). */
.p-hidden-accessible {
  border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px; white-space: nowrap;
}
.p-hidden-accessible input, .p-hidden-accessible select { transform: scale(0); }

/* The MultiSelect panel header holds the select-all checkbox and a close button; the close was
   unstyled and rendered as an oversized bare glyph. */
.p-multiselect-header { display: flex; align-items: center; gap: 10px; }
.p-multiselect-header .p-multiselect-close {
  margin-left: auto; width: 24px; height: 24px; border: 0; background: transparent;
  border-radius: 5px; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; font-size: 12px; color: var(--muted);
}
.p-multiselect-header .p-multiselect-close:hover { background: var(--surface-2); color: var(--ink); }

/* MultiSelect chips (display="chip"). Undressed, the selected days ran together as
   "Mon(x)Tue(x)Wed(x)" with no gap or background — found 20/08/2026. */
.p-multiselect .p-multiselect-label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.p-multiselect-token {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blush-bg); color: var(--brand-700);
  border-radius: 20px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.p-multiselect-token .p-multiselect-token-icon {
  cursor: pointer; font-size: 11px; opacity: .65;
}
.p-multiselect-token .p-multiselect-token-icon:hover { opacity: 1; }

/* Filter inputs inside the overlay panels. Off by default, but a bare input appears the moment
   `filter` is switched on anywhere. */
.p-multiselect-filter-container, .p-dropdown-filter-container { flex: 1; }
.p-multiselect-filter, .p-dropdown-filter {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 13px; color: var(--ink);
}
.p-multiselect-filter:focus, .p-dropdown-filter:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring);
}

/* The date grid inside the Calendar panel — the header was dressed, the table was not. */
.p-datepicker-calendar { width: 100%; border-collapse: collapse; }
.p-datepicker-calendar th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.p-datepicker-calendar td { padding: 2px; }
.p-datepicker-calendar td > span {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 7px; font-size: 13px; cursor: pointer;
}
.p-datepicker-calendar td > span:hover { background: var(--surface-2); }
.p-datepicker-calendar td > span.p-highlight { background: var(--brand); color: #fff; }
.p-datepicker-calendar td > span.p-disabled { opacity: .35; cursor: default; }


/* Weekday picker — seven fixed options, so all seven are on screen. Replaced a MultiSelect whose
   dropdown scrolled, painted whole rows on hover and rendered a checkbox column that never lined
   up: a control that hides six of seven options to save no space. */
.pt-daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-day {
  min-width: 46px; padding: 8px 10px; border-radius: 9px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1;
  transition: border-color .12s, background .12s, color .12s;
}
.pt-day:hover:not(:disabled) { border-color: var(--brand); color: var(--ink); }
.pt-day.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.pt-day:disabled { opacity: .55; cursor: not-allowed; }

/* A schedule window whose span does not divide by its slot: it still works, so this warns rather
   than blocking — the waste is otherwise invisible until someone asks why the day ends early. */
.pt-window-warn {
  margin-top: 6px; padding: 8px 11px; border-radius: 8px;
  background: #fdf6e6; border: 1px solid #f0e0b8; color: #7a5a12;
  font-size: 12.5px; line-height: 1.5;
}
.pt-window-warn b { color: #5e4409; }
