﻿/* ==========================================================================
   MarkSense Content Studio â€” staff portal
   ========================================================================== */

.staff-body { background: #f3fafd; color: var(--ms-body); }
.staff-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.staff-sidebar {
  width: 272px; flex: none; position: fixed; inset: 0 auto 0 0; z-index: 1040;
  background: linear-gradient(180deg, #071a33 0%, #0a2444 55%, #0b2a52 100%);
  color: rgba(255, 255, 255, .64); display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .06); overflow-y: auto;
}
.staff-sidebar-brand { padding: 24px 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.staff-brand-tag { display: none; }
.staff-sidebar-brand .brand-logo-img { height: 34px; }
.login-visual .brand-logo-img { height: 38px; }
.login-mobile-brand .brand-logo-img { height: 36px; }
.staff-nav { padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.staff-nav-label { font-size: .56rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .32); padding: 16px 12px 7px; }
.staff-nav-label:first-child { padding-top: 0; }
.staff-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: rgba(255, 255, 255, .64); font-size: .8rem; font-weight: 500; position: relative;
}
.staff-nav-link i { font-size: .95rem; width: 18px; text-align: center; color: rgba(255, 255, 255, .42); }
.staff-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.staff-nav-link:hover i { color: var(--ms-blue-300); }
.staff-nav-link.active { background: rgba(31, 169, 224, .16); color: #fff; }
.staff-nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ms-blue); }
.staff-nav-link.active i { color: var(--ms-blue-300); }
.staff-nav-badge { margin-left: auto; background: var(--ms-blue); color: #fff; font-size: .6rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.staff-sidebar-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.staff-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.staff-avatar { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #1fa9e0, #0b6fa8); color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.staff-user-copy { min-width: 0; flex: 1; }
.staff-user-copy strong { display: block; font-size: .74rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-user-copy span { display: block; font-size: .6rem; color: rgba(255, 255, 255, .45); }
.staff-logout-form { flex: none; }
.staff-logout { width: 28px; height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: rgba(255, 255, 255, .6); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.staff-logout:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- Main ---------- */
.staff-main { margin-left: 272px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.staff-topbar {
  height: 68px; position: sticky; top: 0; z-index: 1020; background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--ms-line);
  display: flex; align-items: center; gap: 16px; padding: 0 30px;
}
.staff-menu-btn { display: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--ms-line); background: #fff; color: var(--ms-ink); align-items: center; justify-content: center; font-size: 1.2rem; }
.staff-topbar-title { display: flex; flex-direction: column; line-height: 1.2; }
.staff-topbar-kicker { font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ms-muted); }
.staff-topbar-title strong { font-family: var(--ms-head); font-size: .95rem; color: var(--ms-ink); font-weight: 600; }
.staff-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.staff-live { display: inline-flex; align-items: center; gap: 7px; font-size: .68rem; color: var(--ms-muted); }
.staff-topbar-link { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 500; color: var(--ms-body); }
.staff-topbar-link:hover { color: var(--ms-blue-700); }
.staff-content { padding: 30px; max-width: 1440px; width: 100%; margin: 0 auto; }
.staff-messages { margin-bottom: 20px; }
.staff-messages .alert { font-size: .82rem; border-radius: 10px; padding: 12px 40px 12px 14px; }

/* ---------- Welcome ---------- */
.staff-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; flex-wrap: wrap; margin-bottom: 26px; }
.staff-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ms-muted); }
.staff-welcome h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin: 9px 0 6px; letter-spacing: -.04em; }
.staff-welcome p { font-size: .84rem; color: var(--ms-muted); max-width: 640px; margin: 0; line-height: 1.6; }
.staff-welcome-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.staff-welcome-actions .btn { font-size: .76rem; padding: .58rem 1rem; }

/* ---------- Stats ---------- */
.staff-stat-row { margin-bottom: 4px; }
.staff-stat-card {
  display: block; position: relative; background: #fff; border: 1px solid var(--ms-line); border-radius: 14px;
  padding: 18px 18px 16px; height: 100%; color: inherit; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.staff-stat-card:hover { transform: translateY(-3px); box-shadow: var(--ms-shadow); border-color: #b9e6f8; color: inherit; }
.staff-stat-icon { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; margin-bottom: 14px; }
.staff-stat-icon-blue { background: var(--ms-blue-50); color: var(--ms-blue-700); }
.staff-stat-icon-indigo { background: #eef0ff; color: #4b5bd6; }
.staff-stat-icon-teal { background: #e8fbf5; color: #0d8a63; }
.staff-stat-icon-amber { background: #fff7e8; color: #b7791f; }
.staff-stat-label { display: block; font-size: .68rem; font-weight: 500; color: var(--ms-muted); }
.staff-stat-value { display: block; font-family: var(--ms-head); font-size: 1.8rem; font-weight: 600; letter-spacing: -.04em; color: var(--ms-ink); line-height: 1.2; }
.staff-stat-note { display: block; font-size: .62rem; color: var(--ms-muted); }
.staff-stat-arrow { position: absolute; top: 16px; right: 16px; color: var(--ms-blue-600); font-size: .78rem; opacity: .5; }
.staff-stat-card:hover .staff-stat-arrow { opacity: 1; }

/* ---------- Panels ---------- */
.staff-panel { background: #fff; border: 1px solid var(--ms-line); border-radius: 16px; overflow: hidden; }
.staff-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--ms-line); }
.staff-panel-kicker { display: block; font-size: .55rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ms-blue-700); margin-bottom: 2px; }
.staff-panel-head h2 { font-size: .96rem; margin: 0; letter-spacing: -.02em; }
.staff-panel-link { font-size: .7rem; font-weight: 600; color: var(--ms-blue-700); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.staff-panel-link:hover { color: var(--ms-blue-600); }

/* ---------- Table ---------- */
.staff-table { margin: 0; font-size: .76rem; }
.staff-table thead th { background: #fafdff; border-bottom: 1px solid var(--ms-line); font-size: .58rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ms-muted); font-weight: 700; padding: 10px 20px; white-space: nowrap; }
.staff-table tbody td { padding: 12px 20px; border-bottom: 1px solid #edf7fc; color: var(--ms-body); vertical-align: middle; }
.staff-table tbody tr:last-child td { border-bottom: 0; }
.staff-table tbody tr:hover td { background: #fbfeff; }
.staff-row-unread td { background: #f5fdff; }
.staff-contact-cell { display: flex; align-items: center; gap: 9px; }
.staff-contact-avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--ms-blue-50); border: 1px solid var(--ms-blue-100); color: var(--ms-blue-700); display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; flex: none; }
.staff-contact-cell strong { display: block; font-size: .76rem; color: var(--ms-ink); font-weight: 600; line-height: 1.3; }
.staff-contact-cell span { display: block; font-size: .63rem; color: var(--ms-muted); line-height: 1.3; }
.staff-tag { display: inline-block; font-size: .6rem; font-weight: 600; color: var(--ms-blue-700); background: var(--ms-blue-50); border: 1px solid var(--ms-blue-100); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.staff-date { display: block; font-size: .7rem; color: var(--ms-ink); }
.staff-date-sub { display: block; font-size: .6rem; color: var(--ms-muted); }
.staff-status { display: inline-flex; align-items: center; gap: 5px; font-size: .6rem; font-weight: 600; padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.staff-status-new { color: #0d8a63; background: #e9fbf3; }
.staff-status-new .status-dot { width: 5px; height: 5px; box-shadow: none; }
.staff-status-read { color: var(--ms-muted); background: #f0f4f9; }
.staff-icon-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--ms-line); background: #fff; color: var(--ms-blue-700); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; }
.staff-icon-btn:hover { background: var(--ms-blue-50); border-color: var(--ms-blue-200); color: var(--ms-blue-700); }

/* ---------- Solution list ---------- */
.staff-solution-list { display: flex; flex-direction: column; }
.staff-solution-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid #edf7fc; color: inherit; }
.staff-solution-row:last-child { border-bottom: 0; }
.staff-solution-row:hover { background: #fbfeff; color: inherit; }
.staff-solution-thumb { width: 38px; height: 34px; border-radius: 7px; overflow: hidden; background: var(--ms-blue-50); border: 1px solid var(--ms-line); display: inline-flex; align-items: center; justify-content: center; color: var(--ms-blue-700); flex: none; }
.staff-solution-thumb img { width: 100%; height: 100%; object-fit: cover; }
.staff-solution-copy { flex: 1; min-width: 0; }
.staff-solution-copy strong { display: block; font-size: .75rem; color: var(--ms-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-solution-copy small { display: block; font-size: .6rem; color: var(--ms-muted); }
.staff-solution-status { font-size: .58rem; font-weight: 600; color: #0d8a63; background: #e9fbf3; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.staff-solution-date { font-size: .62rem; color: var(--ms-muted); white-space: nowrap; }
.staff-solution-row .staff-icon-btn { width: 26px; height: 26px; }

/* ---------- Quick actions ---------- */
.staff-quick-actions { display: flex; flex-direction: column; }
.staff-quick-actions a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid #edf7fc; color: inherit; }
.staff-quick-actions a:last-child { border-bottom: 0; }
.staff-quick-actions a:hover { background: #fbfeff; color: inherit; }
.quick-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--ms-blue-50); border: 1px solid var(--ms-blue-100); color: var(--ms-blue-700); display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; flex: none; }
.staff-quick-actions strong { display: block; font-size: .73rem; color: var(--ms-ink); font-weight: 600; line-height: 1.3; }
.staff-quick-actions small { display: block; font-size: .6rem; color: var(--ms-muted); line-height: 1.3; }
.staff-quick-actions a > i { margin-left: auto; font-size: .65rem; color: #a8b7c8; }
.staff-quick-actions a:hover > i { color: var(--ms-blue-600); }

/* ---------- Readiness ---------- */
.staff-readiness { list-style: none; padding: 8px 18px 14px; margin: 0; display: grid; gap: 11px; }
.staff-readiness li { display: flex; align-items: flex-start; gap: 9px; }
.readiness-icon { width: 20px; height: 20px; border-radius: 50%; background: #fff4e5; color: #b7791f; display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; flex: none; margin-top: 1px; }
.staff-readiness li.is-ready .readiness-icon { background: #e9fbf3; color: #0d8a63; }
.staff-readiness strong { display: block; font-size: .7rem; color: var(--ms-ink); font-weight: 600; line-height: 1.3; }
.staff-readiness small { display: block; font-size: .6rem; color: var(--ms-muted); line-height: 1.3; }

/* ---------- Help card ---------- */
.staff-help-card { background: linear-gradient(130deg, #071a33, #123b6d); border-radius: 16px; padding: 22px; color: #fff; position: relative; overflow: hidden; }
.staff-help-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -70px; top: -70px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 169, 224, .28), transparent 70%); }
.staff-help-icon { width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: var(--ms-blue-300); display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; margin-bottom: 12px; }
.staff-help-card h2 { color: #fff; font-size: .86rem; margin-bottom: 5px; }
.staff-help-card p { color: rgba(255, 255, 255, .6); font-size: .68rem; line-height: 1.6; margin-bottom: 10px; }
.staff-help-card a { font-size: .68rem; font-weight: 600; color: var(--ms-blue-300); display: inline-flex; align-items: center; gap: 5px; }
.staff-help-card a:hover { color: #fff; }

/* ---------- Empty states ---------- */
.staff-empty { padding: 44px 20px; text-align: center; }
.staff-empty > span { width: 48px; height: 48px; border-radius: 12px; background: var(--ms-blue-50); color: var(--ms-blue-700); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px; }
.staff-empty h3 { font-size: .86rem; margin-bottom: 4px; }
.staff-empty p { font-size: .72rem; color: var(--ms-muted); margin: 0; }
.staff-empty-sm { padding: 20px; }

/* ---------- Backdrop ---------- */
.staff-backdrop { display: none; position: fixed; inset: 0; background: rgba(7, 26, 51, .5); z-index: 1035; }

/* ---------- Login ---------- */
.staff-auth-body { min-height: 100vh; background: #f3fafd; }
.login-shell { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.login-visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(145deg, #071a33 0%, #0a2444 48%, #0e3563 100%);
  padding: 46px 54px; color: #fff;
}
.login-visual-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 54px 54px; mask-image: radial-gradient(ellipse at 40% 30%, #000, transparent 72%); -webkit-mask-image: radial-gradient(ellipse at 40% 30%, #000, transparent 72%); }
.login-visual-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.login-visual-orb-a { width: 560px; height: 560px; right: -200px; top: -180px; background: radial-gradient(circle, rgba(31, 169, 224, .3), transparent 68%); }
.login-visual-orb-b { width: 420px; height: 420px; left: -180px; bottom: -180px; background: radial-gradient(circle, rgba(31, 169, 224, .14), transparent 68%); }
.login-visual-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-visual-copy { position: relative; z-index: 1; max-width: 540px; margin: 40px 0; }
.login-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ms-blue-300); margin-bottom: 20px; }
.login-visual h1 { color: #fff; font-size: clamp(2.2rem, 3.5vw, 3.4rem); letter-spacing: -.05em; line-height: 1.08; margin-bottom: 18px; }
.login-visual-copy > p { color: rgba(255, 255, 255, .62); font-size: .94rem; line-height: 1.75; max-width: 460px; margin-bottom: 26px; }
.login-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.login-features li { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: rgba(255, 255, 255, .72); }
.login-features li span { width: 22px; height: 22px; border-radius: 50%; background: rgba(31, 169, 224, .16); border: 1px solid rgba(143, 220, 245, .2); color: var(--ms-blue-300); display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; flex: none; }
.login-visual-foot { position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.login-stats { display: flex; gap: 26px; }
.login-stats strong { display: block; font-family: var(--ms-head); font-size: 1.3rem; color: #fff; letter-spacing: -.03em; line-height: 1.2; }
.login-stats span { font-size: .6rem; color: rgba(255, 255, 255, .42); text-transform: uppercase; letter-spacing: .08em; }
.login-quote { max-width: 230px; }
.login-quote i { color: var(--ms-blue-300); font-size: 1.2rem; }
.login-quote p { font-size: .7rem; color: rgba(255, 255, 255, .5); line-height: 1.55; margin: 0; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 410px; }
.login-mobile-brand { display: none; margin-bottom: 30px; }
.login-card h2 { font-size: 2rem; margin: 12px 0 6px; letter-spacing: -.04em; }
.login-sub { font-size: .85rem; color: var(--ms-muted); margin-bottom: 26px; }
.login-alert { display: flex; gap: 10px; align-items: flex-start; background: #fff4f4; border: 1px solid #f6d5d5; color: #a53a3a; border-radius: 11px; padding: 12px 14px; font-size: .78rem; margin-bottom: 18px; }
.login-alert p { margin: 0; }
.login-form { display: grid; gap: 16px; }
.login-field label { display: block; font-size: .72rem; font-weight: 600; color: var(--ms-ink); margin-bottom: 6px; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; }
.login-hint { font-size: .6rem; color: var(--ms-muted); }
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-wrap > i { position: absolute; left: 13px; color: var(--ms-muted); font-size: .88rem; pointer-events: none; }
.login-input-wrap .form-control { padding: 12px 40px 12px 38px; border: 1px solid var(--ms-line); border-radius: 11px; font-size: .86rem; background: #fbfeff; box-shadow: none; }
.login-input-wrap .form-control:focus { border-color: var(--ms-blue); background: #fff; box-shadow: 0 0 0 3px rgba(31, 169, 224, .12); }
.password-toggle { position: absolute; right: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--ms-muted); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; }
.password-toggle:hover { background: var(--ms-blue-50); color: var(--ms-blue-700); }
.login-submit { width: 100%; margin-top: 4px; }
.login-security { display: flex; gap: 8px; align-items: flex-start; margin-top: 20px; padding: 11px 12px; background: var(--ms-soft); border: 1px solid var(--ms-line); border-radius: 9px; }
.login-security i { color: var(--ms-blue-600); font-size: .85rem; margin-top: 1px; }
.login-security p { font-size: .65rem; color: var(--ms-muted); margin: 0; line-height: 1.5; }
.login-back { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 500; color: var(--ms-muted); margin-top: 22px; }
.login-back:hover { color: var(--ms-blue-700); }

/* ---------- Staff responsive ---------- */
@media (max-width: 1199.98px) {
  .login-visual { padding: 40px; }
  .login-quote { display: none; }
}

@media (max-width: 991.98px) {
  .staff-sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .staff-sidebar.is-open { transform: none; }
  .staff-backdrop.is-open { display: block; }
  .staff-main { margin-left: 0; }
  .staff-menu-btn { display: inline-flex; }
  .staff-topbar { padding: 0 18px; }
  .staff-content { padding: 22px 18px; }
  .staff-live { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; }
  .login-mobile-brand { display: block; }
  .staff-welcome { align-items: flex-start; }
  .staff-welcome-actions { width: 100%; }
}

@media (max-width: 767.98px) {
  .staff-topbar-actions .staff-topbar-link span { display: none; }
  .staff-topbar-actions .btn { font-size: .72rem; padding: .5rem .8rem; }
  .staff-topbar-title { display: none; }
  .staff-welcome h1 { font-size: 1.55rem; }
  .staff-table thead th:nth-child(2), .staff-table tbody td:nth-child(2) { display: none; }
  .staff-solution-date, .staff-solution-status { display: none; }
  .staff-panel-head { padding: 15px 16px; }
  .staff-table thead th, .staff-table tbody td { padding: 10px 14px; }
  .staff-solution-row, .staff-quick-actions a { padding-left: 14px; padding-right: 14px; }
  .staff-readiness { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 575.98px) {
  .staff-content { padding: 18px 12px; }
  .staff-topbar { padding: 0 12px; gap: 10px; }
  .staff-topbar-actions { gap: 8px; }
  .staff-topbar-actions .btn i { display: none; }
  .staff-stat-card { padding: 15px; }
  .staff-stat-value { font-size: 1.55rem; }
  .login-panel { padding: 22px; }
  .login-card h2 { font-size: 1.75rem; }
}
