/* ════════════════════════════════════════════════════════════════
   AICRAM STUDIO — STAFF AREA  (#/equipa, behind login)
   ════════════════════════════════════════════════════════════════ */

#staff-app { display: none; min-height: 100vh; }
#staff-app.active { display: block; }

/* ── Login ────────────────────────────────────────────────────── */
.staff-login { position: fixed; inset: 0; z-index: 8000; background: var(--c-bg-dark); display: flex; align-items: center; justify-content: center; padding: var(--s-6); }
.staff-login-wrap { width: 100%; max-width: 400px; animation: fadeUp 0.6s var(--ease-spring) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.staff-login-logo { text-align: center; margin-bottom: var(--s-10); }
.staff-login-logo .mark { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--c-accent), var(--c-gold)); display: flex; align-items: center; justify-content: center; font-family: var(--f-serif); font-style: italic; font-size: 24px; color: #fff; margin: 0 auto var(--s-4); }
.staff-login-logo h1 { font-size: 28px; color: #fff; }
.staff-login-logo h1 em { color: var(--c-gold); font-style: italic; }
.staff-login-logo p { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: rgba(255,255,255,.4); margin-top: 6px; }
.staff-login-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-xl); padding: var(--s-8); }
.staff-login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: rgba(255,255,255,.04); border-radius: var(--r-md); padding: 4px; margin-bottom: var(--s-6); }
.staff-login-tab { padding: 10px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.4); border-radius: var(--r-sm); text-align: center; transition: all 0.3s var(--ease-silk); }
.staff-login-tab.active { background: var(--c-accent); color: #fff; }
.staff-login-field { margin-bottom: var(--s-4); }
.staff-login-field label { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 6px; }
.staff-login-input { width: 100%; height: 48px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-md); padding: 0 var(--s-4); font-size: 14px; color: #fff; outline: none; transition: all 0.3s; }
.staff-login-input::placeholder { color: rgba(255,255,255,.25); }
.staff-login-input:focus { border-color: var(--c-accent); background: rgba(255,255,255,.09); }
.staff-login-error { background: rgba(166,64,50,.15); border: 1px solid rgba(166,64,50,.3); color: #e07060; border-radius: var(--r-md); padding: 11px 16px; font-size: 13px; margin-top: var(--s-3); text-align: center; display: none; }
.staff-login-error.show { display: block; animation: msgIn 0.3s var(--ease-spring); }
.staff-login-hint { text-align: center; margin-top: var(--s-5); font-size: 12px; color: rgba(255,255,255,.3); line-height: 1.7; }
.staff-login-demo { margin-top: var(--s-4); background: rgba(201,169,98,.08); border: 1px solid rgba(201,169,98,.18); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); font-size: 11px; color: rgba(255,255,255,.5); text-align: center; line-height: 1.7; }
.staff-login-demo b { color: var(--c-gold); }
.staff-login-back { display: block; text-align: center; margin-top: var(--s-5); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.45); }
.staff-login-back:hover { color: var(--c-gold); }

/* ── Shell ────────────────────────────────────────────────────── */
.staff-shell { display: flex; min-height: 100vh; }
.staff-shell.hidden { display: none; }

/* sidebar */
.staff-sidebar { width: var(--sidebar-w); background: var(--c-bg-dark); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 500; transition: transform 0.4s var(--ease-spring); }
.staff-sidebar-logo { padding: var(--s-6) var(--s-5) var(--s-5); border-bottom: 1px solid var(--c-border-s); display: flex; align-items: center; gap: var(--s-3); }
.staff-sidebar-logo .mark { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, var(--c-accent), var(--c-gold)); display: flex; align-items: center; justify-content: center; font-family: var(--f-serif); font-style: italic; font-size: 17px; color: #fff; }
.staff-sidebar-logo .t { font-family: var(--f-serif); font-size: 18px; color: #fff; }
.staff-sidebar-logo .t em { color: var(--c-gold); font-style: italic; }
.staff-sidebar-logo .s { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.3); margin-top: 2px; }
.staff-nav { flex: 1; padding: var(--s-4) var(--s-3); overflow-y: auto; }
.staff-nav-label { font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,.25); padding: var(--s-4) var(--s-2) var(--s-2); }
.staff-nav-item { display: flex; align-items: center; gap: var(--s-3); padding: 11px var(--s-3); border-radius: var(--r-md); font-size: 13px; color: rgba(255,255,255,.55); cursor: pointer; transition: all 0.25s var(--ease-silk); margin-bottom: 2px; position: relative; }
.staff-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.staff-nav-item.active { background: rgba(184,137,106,.18); color: var(--c-accent-l); }
.staff-nav-item.active::before { content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; background: var(--c-accent); border-radius: 0 3px 3px 0; }
.staff-nav-item svg { width: 18px; height: 18px; opacity: 0.75; flex-shrink: 0; }
.staff-nav-badge { margin-left: auto; background: var(--c-accent); color: #fff; font-size: 10px; min-width: 20px; height: 20px; border-radius: 100px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.staff-user { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--c-border-s); display: flex; align-items: center; gap: var(--s-3); }
.staff-user .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, rgba(184,137,106,.35), rgba(201,169,98,.2)); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-family: var(--f-serif); font-style: italic; color: var(--c-gold); flex-shrink: 0; }
.staff-user .info { flex: 1; min-width: 0; }
.staff-user .nm { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-user .rl { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.35); }
.staff-logout { color: rgba(255,255,255,.3); padding: 6px; border-radius: var(--r-sm); transition: color 0.2s; }
.staff-logout:hover { color: var(--c-error); }

/* main */
.staff-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.staff-topbar { height: var(--topbar-h); background: var(--c-surface); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-8); position: sticky; top: 0; z-index: 400; }
.staff-topbar h1 { font-size: 22px; flex: 1; }
.staff-topbar h1 span { font-family: var(--f-sans); font-weight: 300; font-size: 13px; color: var(--c-text-3); margin-left: var(--s-2); }
.staff-search { display: flex; align-items: center; gap: var(--s-2); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 0 var(--s-4); height: 38px; color: var(--c-text-3); }
.staff-search input { border: none; background: none; outline: none; font-size: 13px; width: 180px; color: var(--c-text-1); }
.staff-tbtn { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--c-bg); border: 1px solid var(--c-border); color: var(--c-text-2); display: flex; align-items: center; justify-content: center; transition: all 0.2s; position: relative; }
.staff-tbtn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.staff-tbtn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; background: var(--c-accent); border-radius: 50%; border: 2px solid var(--c-surface); }
.staff-menu-btn { display: none; }
.staff-content { padding: var(--s-6) var(--s-8); flex: 1; }

/* views */
.staff-view { display: none; }
.staff-view.active { display: block; animation: viewIn 0.4s var(--ease-spring); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* section header */
.staff-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.staff-head h2 { font-size: 22px; }
.staff-head p { font-size: 13px; color: var(--c-text-3); }
.staff-head-actions { display: flex; gap: var(--s-2); align-items: center; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); margin-bottom: var(--s-6); }
@media (max-width: 1024px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--card-pad); transition: all 0.3s var(--ease-spring); }
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s-4); }
.stat-ic { width: 44px; height: 44px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-trend { font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 100px; }
.stat-trend.up { color: var(--c-success); background: rgba(74,124,89,.1); }
.stat-trend.flat { color: var(--c-text-3); background: var(--c-bg-2); }
.stat-val { font-family: var(--f-serif); font-size: 32px; line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--c-text-3); }

/* grid helpers */
.staff-cols { display: grid; grid-template-columns: 1fr 360px; gap: var(--s-5); align-items: start; }
@media (max-width: 1100px) { .staff-cols { grid-template-columns: 1fr; } }

/* table */
.tbl-wrap { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.tbl-toolbar { padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.tbl-filter { height: 34px; padding: 0 var(--s-3); border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-bg); font-size: 12px; color: var(--c-text-1); outline: none; transition: 0.2s; }
.tbl-filter:focus { border-color: var(--c-accent); }
.tbl-search { position: relative; }
.tbl-search input { padding-left: 32px; }
.tbl-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--c-text-3); }
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl thead th { padding: 11px var(--s-4); text-align: left; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--c-text-3); font-weight: 500; border-bottom: 1px solid var(--c-border); background: color-mix(in srgb, var(--c-bg) 60%, var(--c-surface)); white-space: nowrap; }
table.tbl tbody td { padding: var(--row-py) var(--s-4); font-size: 13px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: color-mix(in srgb, var(--c-bg) 70%, transparent); }
.tbl-pag { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--c-border); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--c-text-3); }
.pag-btns { display: flex; gap: 4px; }
.pag-btn { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--c-border); background: var(--c-surface); font-size: 12px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.pag-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pag-btn.active { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.pag-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* client cell */
.cli { display: flex; align-items: center; gap: var(--s-3); }
.cli-av { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--c-accent), var(--c-gold)); display: flex; align-items: center; justify-content: center; font-family: var(--f-serif); font-style: italic; font-size: 15px; color: #fff; }
.cli b { font-family: var(--f-sans); font-size: 13px; font-weight: 500; display: block; }
.cli span { font-size: 11px; color: var(--c-text-3); }

/* row actions */
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* points bar (table) */
.pts-bar { height: 6px; background: var(--c-bg-2); border-radius: 3px; overflow: hidden; margin-top: 4px; width: 90px; }
.pts-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-accent), var(--c-gold)); border-radius: 3px; }

/* mini cards (responsive table → cards on mobile) */
.cards-list { display: none; flex-direction: column; gap: var(--s-3); }
.rcard { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s-4); }
.rcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.rcard-rows { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-4); }
.rcard-rows .k { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--c-text-3); }
.rcard-rows .v { font-size: 13px; }
.rcard-actions { display: flex; gap: var(--s-2); margin-top: var(--s-4); }

/* mini stats */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-bottom: var(--s-6); }
@media (max-width: 760px) { .mini-stats { grid-template-columns: 1fr; } }
.mini { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s-5); }
.mini .l { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--c-text-3); margin-bottom: 6px; }
.mini .v { font-family: var(--f-serif); font-size: 26px; }

/* points tiers */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-6); }
@media (max-width: 640px) { .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-5); display: flex; align-items: center; gap: var(--s-4); }
.tier .ic { font-size: 28px; }
.tier .nm { font-size: 14px; font-weight: 500; }
.tier .rg { font-size: 12px; color: var(--c-text-3); }
.tier .pk { font-size: 12px; color: var(--c-accent); margin-top: 4px; }

/* dashboard side cards */
.side-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.side-card-h { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; justify-content: space-between; }
.side-card-h h3 { font-size: 17px; }
.side-card-body { padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.mini-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; }
.mini-row .av { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, rgba(184,137,106,.2), rgba(201,169,98,.12)); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row b { font-size: 13px; font-weight: 500; }
.mini-row p { font-size: 12px; color: var(--c-text-3); }

/* detail panel */
.detail-panel { position: fixed; inset: 0 0 0 auto; width: 440px; max-width: 100vw; background: var(--c-surface); border-left: 1px solid var(--c-border); z-index: 600; transform: translateX(100%); transition: transform 0.4s var(--ease-spring); display: flex; flex-direction: column; }
.detail-panel.open { transform: none; box-shadow: var(--shadow-lg); }
.detail-overlay { position: fixed; inset: 0; background: rgba(28,26,23,.4); z-index: 590; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.detail-overlay.open { opacity: 1; pointer-events: all; }
.panel-h { padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; justify-content: space-between; }
.panel-h h3 { font-size: 20px; }
.panel-b { padding: var(--s-6); flex: 1; overflow-y: auto; }
.panel-f { padding: var(--s-5) var(--s-6); border-top: 1px solid var(--c-border); display: flex; gap: var(--s-2); }
.panel-sec { margin-bottom: var(--s-6); }
.panel-sec-t { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--c-text-3); margin-bottom: var(--s-3); }
.panel-row { display: flex; justify-content: space-between; gap: var(--s-4); padding: 10px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.panel-row:last-child { border-bottom: none; }
.panel-row .k { color: var(--c-text-3); }
.panel-row .v { font-weight: 500; text-align: right; }

/* timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: var(--s-3); padding-bottom: var(--s-5); position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 1px; background: var(--c-border); }
.tl-dot { width: 33px; height: 33px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--c-border); background: var(--c-surface); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.tl-c h4 { font-family: var(--f-sans); font-size: 13px; font-weight: 500; }
.tl-c p { font-size: 12px; color: var(--c-text-3); }
.tl-c time { font-size: 11px; color: var(--c-text-3); }

/* bar chart (reports) */
.bar-row { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.bar-row .lbl { font-size: 13px; width: 150px; flex-shrink: 0; }
.bar-row .track { flex: 1; height: 22px; background: var(--c-bg-2); border-radius: var(--r-sm); overflow: hidden; }
.bar-row .fill { height: 100%; background: linear-gradient(90deg, var(--c-accent), var(--c-gold)); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-size: 11px; transition: width 0.8s var(--ease-spring); }

/* depoimento moderation card */
.mod-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-5); display: flex; gap: var(--s-4); align-items: flex-start; }
.mod-card .av { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--c-accent), var(--c-gold)); display: flex; align-items: center; justify-content: center; font-family: var(--f-serif); font-style: italic; font-size: 18px; color: #fff; }
.mod-card .body { flex: 1; }
.mod-card .body .meta { display: flex; align-items: center; gap: var(--s-3); margin-bottom: 6px; flex-wrap: wrap; }
.mod-card .body .meta b { font-size: 14px; }
.mod-card .body .stars { color: var(--c-gold); font-size: 13px; }
.mod-card .body .txt { font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--c-text-1); margin: var(--s-2) 0; line-height: 1.5; }
.mod-card .body .acts { display: flex; gap: var(--s-2); margin-top: var(--s-3); }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .staff-sidebar { transform: translateX(-100%); }
  .staff-sidebar.open { transform: none; }
  .staff-main { margin-left: 0; }
  .staff-menu-btn { display: flex; }
  .staff-search { display: none; }
  .staff-content { padding: var(--s-5) var(--s-4); }
  .staff-topbar { padding: 0 var(--s-4); }
  .detail-panel { width: 100%; }
  table.tbl { display: none; }
  .cards-list { display: flex; }
}
.staff-sidebar-overlay { position: fixed; inset: 0; z-index: 490; background: rgba(0,0,0,.5); display: none; }
.staff-sidebar-overlay.open { display: block; }
