/* =========================================================
   团团为你办 · 酒店运营与管理系角色工作台
   ========================================================= */

.workspace-body {
  min-height: 100vh;
  background: #f5efe4;
}

.workspace-body.ws-locked {
  overflow: hidden;
}

.workspace-body .brand__mark {
  flex: 0 0 auto;
}

/* ===== Login ===== */
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  background: var(--paper);
}

.login-visual {
  position: relative;
  display: flex;
  padding: 38px 46px 30px;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper-3);
  background:
    radial-gradient(circle at 88% 8%, rgba(217, 72, 50, 0.23), transparent 28%),
    radial-gradient(circle at 4% 92%, rgba(73, 130, 106, 0.17), transparent 30%),
    #12251e;
}

.login-visual__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 250, 241, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 250, 241, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 92% 82% at 30% 45%, black, transparent 78%);
  pointer-events: none;
}

.login-visual__ring {
  position: absolute;
  right: -230px;
  bottom: -260px;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(255, 250, 241, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.login-visual__ring::before,
.login-visual__ring::after {
  position: absolute;
  border: 1px solid rgba(255, 250, 241, 0.07);
  border-radius: 50%;
  content: "";
}

.login-visual__ring::before { inset: 80px; }
.login-visual__ring::after { inset: 160px; border-color: rgba(217, 72, 50, 0.16); }

.login-brand {
  position: relative;
  z-index: 1;
  color: var(--red);
}

.login-brand .brand__mark {
  width: 40px;
  height: 40px;
}

.login-brand .brand__emblem {
  width: 42px;
  height: 42px;
}

.login-brand .brand__emblem--department {
  width: 44px;
  height: 44px;
}

.login-brand .brand__text strong {
  color: var(--paper-3);
  font-size: 18px;
}

.login-brand .brand__text small {
  color: rgba(255, 250, 241, 0.42);
  font-size: 8.5px;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin-top: auto;
  margin-bottom: auto;
  padding: 56px 0 44px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #ef8a70;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.login-kicker::before {
  width: 22px;
  height: 1px;
  background: currentColor;
  content: "";
}

.login-copy h1 {
  font-size: clamp(2.9rem, 4.5vw, 4.7rem);
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.login-copy h1 em {
  color: #ffd6c3;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.07em;
}

.login-copy > p {
  max-width: 500px;
  margin-top: 22px;
  color: rgba(255, 250, 241, 0.55);
  font-size: 13px;
  line-height: 1.95;
}

.login-chain {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 250, 241, 0.12);
}

.login-chain > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.login-chain > div span {
  color: #ef8a70;
  font-family: var(--mono);
  font-size: 7.5px;
}

.login-chain > div strong {
  color: rgba(255, 250, 241, 0.86);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.login-chain > div small {
  color: rgba(255, 250, 241, 0.34);
  font-size: 7.5px;
  white-space: nowrap;
}

.login-chain > i {
  padding-top: 15px;
  color: rgba(255, 250, 241, 0.2);
  font-size: 9px;
  font-style: normal;
}

.login-visual__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 27px;
  color: rgba(255, 250, 241, 0.36);
  font-size: 8.5px;
}

.login-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px 44px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 72, 50, 0.06), transparent 24%),
    var(--paper);
}

.login-back {
  position: absolute;
  top: 29px;
  right: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  transition: color 0.2s ease;
}

.login-back svg {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}

.login-back:hover {
  color: var(--red);
}

.login-wrap {
  width: min(472px, 100%);
}

.login-card {
  padding: 29px 30px 23px;
  border: 1px solid rgba(20, 35, 29, 0.12);
  border-radius: 22px;
  background: rgba(255, 250, 241, 0.87);
  box-shadow: 0 28px 70px rgba(38, 39, 28, 0.12);
  backdrop-filter: blur(8px);
}

.login-head > span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.login-head h2 {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.login-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.login-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 20px 0 18px;
}

.login-role {
  display: flex;
  min-height: 57px;
  padding: 9px 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.45);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.login-role:hover {
  border-color: rgba(217, 72, 50, 0.4);
  background: var(--paper-3);
}

.login-role.is-active {
  border-color: var(--red);
  background: #fdf0e8;
  box-shadow: inset 0 0 0 1px var(--red);
}

.login-role__icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
}

.login-role:nth-child(2) .login-role__icon { color: var(--blue); background: var(--blue-soft); }
.login-role:nth-child(3) .login-role__icon { color: var(--rose); background: var(--rose-soft); }
.login-role:nth-child(4) .login-role__icon { color: var(--jade); background: var(--jade-soft); }

.login-role__icon svg {
  width: 14px;
  height: 14px;
}

.login-role > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.login-role strong {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.login-role small {
  color: var(--muted-2);
  font-size: 7.5px;
  white-space: nowrap;
}

.login-field {
  margin-bottom: 13px;
}

.login-field > label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 650;
}

.login-input {
  display: flex;
  min-height: 45px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 250, 241, 0.64);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input:focus-within {
  border-color: var(--red);
  background: var(--paper-3);
  box-shadow: 0 0 0 3px rgba(217, 72, 50, 0.08);
}

.login-input > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--muted-2);
}

.login-input input {
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.login-input input::placeholder {
  color: #a6aea7;
}

.login-eye {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  color: var(--muted-2);
}

.login-eye svg {
  width: 14px;
  height: 14px;
}

.login-demo {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

.login-demo code {
  padding: 2px 4px;
  border-radius: 3px;
  color: var(--ink-2);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 8px;
}

.login-demo button {
  margin-left: auto;
  padding: 0;
  color: var(--red);
  font-size: 8px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-error {
  min-height: 15px;
  margin-top: 7px;
  color: var(--red);
  font-size: 9px;
  line-height: 1.4;
}

.login-submit {
  display: flex;
  width: 100%;
  min-height: 48px;
  margin-top: 3px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  color: var(--paper-3);
  background: var(--red);
  box-shadow: 0 10px 24px rgba(217, 72, 50, 0.22);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.login-submit:hover {
  background: var(--red-deep);
  box-shadow: 0 14px 30px rgba(217, 72, 50, 0.3);
  transform: translateY(-1px);
}

.login-submit:hover svg {
  transform: translateX(3px);
}

.login-note {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.65;
  text-align: center;
}

.login-help {
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px dashed rgba(20, 35, 29, 0.17);
  border-radius: 9px;
}

.login-help span {
  color: var(--red);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.login-help p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.65;
}

.first-login-card .login-head {
  margin-bottom: 16px;
}

.first-login-account {
  margin: -4px 0 14px;
  padding: 9px 11px;
  border: 1px dashed rgba(20, 35, 29, 0.16);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(240, 232, 217, 0.45);
  font-size: 9px;
  line-height: 1.6;
}

.first-login-card .login-field + .login-field {
  margin-top: 8px;
}

.first-login-card .login-submit {
  margin-top: 5px;
}

.first-login-card .login-note {
  text-align: left;
}

/* ===== App shell ===== */
.workspace-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 2%, rgba(217, 72, 50, 0.045), transparent 23%),
    #f5efe4;
}

.ws-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  display: flex;
  width: 252px;
  padding: 22px 16px 17px;
  flex-direction: column;
  overflow-y: auto;
  color: var(--paper-3);
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 72, 50, 0.18), transparent 27%),
    #12251e;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 250, 241, 0.2) transparent;
}

.ws-brand {
  display: flex;
  padding: 0 7px 18px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 250, 241, 0.1);
  color: var(--red);
}

.ws-brand .brand__mark {
  width: 36px;
  height: 36px;
}

.ws-brand .brand__emblem {
  width: 32px;
  height: 32px;
}

.ws-brand .brand__emblem--department {
  width: 34px;
  height: 34px;
}

.ws-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ws-brand strong {
  color: var(--paper-3);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
}

.ws-brand small {
  color: rgba(255, 250, 241, 0.38);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.ws-role-box {
  margin: 17px 0 21px;
  padding: 12px;
  border: 1px solid rgba(255, 250, 241, 0.1);
  border-radius: 11px;
  background: rgba(255, 250, 241, 0.04);
}

.ws-role-box__label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 250, 241, 0.3);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.ws-role-box__user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 9px;
  color: var(--paper-3);
  background: var(--red);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
}

.ws-avatar--sm {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 8px;
  font-size: 11px;
}

.ws-role-box__user div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
}

.ws-role-box__user strong {
  color: rgba(255, 250, 241, 0.9);
  font-size: 11px;
  font-weight: 600;
}

.ws-role-box__user small {
  color: rgba(255, 250, 241, 0.42);
  font-size: 8px;
}

.ws-role-box__org {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 250, 241, 0.08);
  color: rgba(255, 250, 241, 0.32);
  font-size: 7.5px;
}

.ws-role-box__settings {
  display: flex;
  margin-top: 8px;
  padding: 0;
  align-items: center;
  gap: 5px;
  color: rgba(255, 250, 241, 0.43);
  font-size: 8px;
  transition: color 0.2s ease;
}

.ws-role-box__settings:hover {
  color: #ffd0b9;
}

.ws-role-box__settings svg {
  width: 11px;
  height: 11px;
}

.ws-role-box__settings[hidden] {
  display: none;
}

.ws-nav-label {
  padding: 0 9px;
  margin-bottom: 7px;
  color: rgba(255, 250, 241, 0.27);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.ws-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ws-nav__item {
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 250, 241, 0.52);
  font-size: 10.5px;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}

.ws-nav__item svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  opacity: 0.8;
}

.ws-nav__item:hover {
  color: var(--paper-3);
  background: rgba(255, 250, 241, 0.05);
}

.ws-nav__item.is-active {
  color: var(--ink);
  background: #f3e7d3;
  font-weight: 650;
}

.ws-nav__item.is-active svg {
  color: var(--red);
  opacity: 1;
}

.ws-nav__badge {
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-left: auto;
  place-items: center;
  border-radius: 999px;
  color: #f5a28e;
  background: rgba(217, 72, 50, 0.16);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1;
}

.ws-nav__badge.is-muted {
  color: rgba(255, 250, 241, 0.3);
  background: rgba(255, 250, 241, 0.06);
}

.ws-sidebar__tip {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding: 15px 9px 13px;
  border-top: 1px solid rgba(255, 250, 241, 0.08);
}

.ws-sidebar__tip svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 2px;
  color: #ef8a70;
}

.ws-sidebar__tip p {
  color: rgba(255, 250, 241, 0.32);
  font-size: 8px;
  line-height: 1.65;
}

.ws-sidebar__bottom {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 250, 241, 0.08);
}

.ws-side-link {
  display: flex;
  width: 100%;
  padding: 7px 9px;
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  color: rgba(255, 250, 241, 0.4);
  font-size: 8.5px;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}

.ws-side-link svg {
  width: 13px;
  height: 13px;
}

.ws-side-link:hover {
  color: var(--paper-3);
  background: rgba(255, 250, 241, 0.04);
}

.ws-sidebar__bottom > p {
  margin-top: 8px;
  padding: 0 9px;
  color: rgba(255, 250, 241, 0.2);
  font-size: 7px;
}

.ws-main {
  display: flex;
  min-height: 100vh;
  margin-left: 252px;
  flex-direction: column;
}

.ws-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  min-height: 72px;
  padding: 0 30px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(16px);
}

.ws-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 250, 241, 0.7);
}

.ws-menu-btn svg {
  width: 17px;
  height: 17px;
}

.ws-title > span {
  display: block;
  margin-bottom: 2px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
}

.ws-title h1 {
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.ws-topbar__right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ws-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 8px;
}

.ws-online i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #5cbf91;
}

.ws-top-link {
  color: var(--muted);
  font-size: 9px;
  transition: color 0.2s ease;
}

.ws-top-link:hover {
  color: var(--red);
}

.ws-notify-wrap {
  position: relative;
}

.ws-icon-btn {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  background: rgba(255, 250, 241, 0.6);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ws-icon-btn:hover {
  border-color: rgba(20, 35, 29, 0.24);
  background: var(--paper-3);
}

.ws-icon-btn svg {
  width: 16px;
  height: 16px;
}

.ws-notify-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 999px;
  color: var(--paper-3);
  background: var(--red);
  font-family: var(--mono);
  font-size: 6.5px;
  font-style: normal;
  line-height: 1;
}

.ws-user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ws-user-chip > span:last-child {
  display: flex;
  flex-direction: column;
}

.ws-user-chip strong {
  font-size: 9.5px;
  font-weight: 650;
}

.ws-user-chip small {
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-popover {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 80;
  width: 320px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-3);
  box-shadow: 0 22px 55px rgba(31, 38, 28, 0.17);
}

.ws-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 9px;
  border-bottom: 1px solid var(--line);
}

.ws-popover__head strong {
  font-size: 11px;
}

.ws-popover__head span {
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-notify-item {
  display: flex;
  width: 100%;
  padding: 9px 4px;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ws-notify-item:last-child {
  border-bottom: 0;
}

.ws-notify-item > span {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border-radius: 6px;
  color: var(--red);
  background: var(--red-soft);
}

.ws-notify-item svg {
  width: 12px;
  height: 12px;
}

.ws-notify-item div {
  min-width: 0;
}

.ws-notify-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-notify-item small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-notify-empty {
  padding: 20px 8px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.ws-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  visibility: hidden;
  background: rgba(12, 23, 18, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ws-content {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 27px 30px 54px;
}

/* ===== Common workspace blocks ===== */
.ws-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.ws-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.ws-eyebrow::before {
  width: 20px;
  height: 1px;
  background: currentColor;
  content: "";
}

.ws-page-head h2 {
  font-size: clamp(1.7rem, 2.3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.ws-page-head p {
  max-width: 630px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.ws-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.ws-action-btn {
  display: inline-flex;
  min-height: 38px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--paper-3);
  background: var(--red);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ws-action-btn svg {
  width: 13px;
  height: 13px;
}

.ws-action-btn:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
}

.ws-action-btn--ghost {
  border-color: var(--line);
  color: var(--ink-2);
  background: rgba(255, 250, 241, 0.55);
}

.ws-action-btn--ghost:hover {
  border-color: var(--ink);
  background: var(--paper-3);
}

.ws-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ws-kpi {
  position: relative;
  overflow: hidden;
  padding: 15px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 250, 241, 0.72);
}

.ws-kpi::after {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 80px;
  height: 80px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
  opacity: 0.55;
}

.ws-kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ws-kpi__top span:first-child {
  color: var(--muted);
  font-size: 9px;
}

.ws-kpi__icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  color: var(--jade);
  background: var(--jade-soft);
}

.ws-kpi__icon svg {
  width: 13px;
  height: 13px;
}

.ws-kpi__value {
  display: flex;
  margin-top: 7px;
  align-items: baseline;
  gap: 3px;
  color: var(--ink);
  font-size: 27px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.05em;
}

.ws-kpi__value small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.ws-kpi__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-kpi__foot em {
  color: var(--jade);
  font-style: normal;
}

.ws-kpi--alert {
  border-color: rgba(217, 72, 50, 0.22);
  background: #fcf0ea;
}

.ws-kpi--alert .ws-kpi__icon {
  color: var(--red);
  background: var(--red-soft);
}

.ws-kpi--alert .ws-kpi__value {
  color: var(--red-deep);
}

.ws-kpi--alert .ws-kpi__foot em {
  color: var(--red);
}

.ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(276px, 0.7fr);
  gap: 15px;
  align-items: start;
}

.ws-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.ws-panel {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 250, 241, 0.77);
}

.ws-panel--dark {
  border-color: rgba(255, 250, 241, 0.1);
  color: var(--paper-3);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 72, 50, 0.15), transparent 30%),
    #14271f;
}

.ws-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}

.ws-panel__head > div {
  min-width: 0;
}

.ws-panel__head h3 {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.ws-panel__head p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.ws-panel--dark .ws-panel__head h3 {
  color: var(--paper-3);
}

.ws-panel--dark .ws-panel__head p {
  color: rgba(255, 250, 241, 0.34);
}

.ws-alert-block {
  padding: 13px 14px;
  border: 1px solid rgba(245, 162, 142, 0.2);
  border-radius: 9px;
  background: rgba(217, 72, 50, 0.1);
}

.ws-alert-block > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffb4a2;
  font-size: 8px;
  font-weight: 600;
}

.ws-alert-block > span svg {
  width: 11px;
  height: 11px;
}

.ws-alert-block h4 {
  margin-top: 7px;
  color: var(--paper-3);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.ws-alert-block p {
  margin-top: 3px;
  color: rgba(255, 250, 241, 0.43);
  font-size: 8px;
}

.ws-alert-block button {
  display: inline-flex;
  min-height: 27px;
  margin-top: 9px;
  padding: 0 9px;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(245, 162, 142, 0.26);
  border-radius: 5px;
  color: #ffd9c2;
  background: rgba(217, 72, 50, 0.11);
  font-size: 8px;
  font-weight: 600;
}

.ws-alert-block button:hover {
  background: rgba(217, 72, 50, 0.2);
}

.ws-alert-block button svg {
  width: 10px;
  height: 10px;
}

.ws-panel__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ws-panel__link svg {
  width: 11px;
  height: 11px;
}

.ws-panel__link:hover {
  color: var(--red-deep);
}

.ws-issue-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ws-issue-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.52);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ws-issue-card:hover {
  border-color: rgba(20, 35, 29, 0.22);
  background: rgba(255, 250, 241, 0.84);
}

.ws-issue-card.is-overdue {
  border-left: 2px solid var(--red);
  background: #fdf1ec;
}

.ws-issue-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ws-tag {
  display: inline-flex;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.ws-tag--red {
  border-color: rgba(217, 72, 50, 0.18);
  color: var(--red);
  background: rgba(217, 72, 50, 0.05);
}

.ws-tag--jade {
  border-color: rgba(31, 91, 73, 0.16);
  color: var(--jade);
  background: rgba(31, 91, 73, 0.05);
}

.ws-issue-top time {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 7.5px;
  white-space: nowrap;
}

.ws-issue-card h4 {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.ws-issue-card > p {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ws-issue-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-issue-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ws-issue-meta svg {
  width: 10px;
  height: 10px;
}

.ws-issue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(20, 35, 29, 0.08);
}

.ws-card-reason {
  margin-top: 7px;
  padding: 7px 9px;
  border-left: 2px solid var(--violet);
  border-radius: 0 5px 5px 0;
  color: var(--muted);
  background: rgba(107, 91, 139, 0.055);
  font-size: 8px;
  line-height: 1.6;
}

.ws-card-reason span {
  margin-right: 5px;
  color: var(--violet);
  font-weight: 650;
}

.ws-mini-btn {
  display: inline-flex;
  min-height: 27px;
  padding: 0 9px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  background: rgba(255, 250, 241, 0.72);
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ws-mini-btn svg {
  width: 10px;
  height: 10px;
}

.ws-mini-btn:hover {
  border-color: var(--ink);
  background: var(--paper-3);
}

.ws-mini-btn--primary {
  border-color: var(--red);
  color: var(--paper-3);
  background: var(--red);
}

.ws-mini-btn--primary:hover {
  border-color: var(--red-deep);
  background: var(--red-deep);
}

.ws-mini-btn--warn {
  border-color: rgba(217, 72, 50, 0.25);
  color: var(--red-deep);
  background: #fdf0ea;
}

.ws-mini-btn--warn:hover {
  border-color: var(--red);
  background: #fbe7df;
}

.ws-status {
  display: inline-flex;
  padding: 3px 7px;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 650;
  white-space: nowrap;
}

.ws-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.ws-status--pending {
  border-color: rgba(201, 151, 63, 0.18);
  color: #9c742d;
  background: rgba(201, 151, 63, 0.09);
}

.ws-status--published {
  border-color: rgba(63, 109, 133, 0.18);
  color: var(--blue);
  background: rgba(63, 109, 133, 0.08);
}

.ws-status--transferred {
  border-color: rgba(107, 91, 139, 0.18);
  color: var(--violet);
  background: rgba(107, 91, 139, 0.08);
}

.ws-status--answered {
  border-color: rgba(31, 91, 73, 0.18);
  color: var(--jade);
  background: rgba(31, 91, 73, 0.08);
}

.ws-status--local {
  border-color: var(--line);
  color: var(--muted);
  background: var(--paper-2);
}

.ws-status--overdue {
  border-color: rgba(217, 72, 50, 0.18);
  color: var(--red-deep);
  background: rgba(217, 72, 50, 0.08);
}

.ws-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--red-deep);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
}

.ws-due svg {
  width: 10px;
  height: 10px;
}

.ws-due--soon {
  color: #9c742d;
}

.ws-empty {
  padding: 28px 15px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 9.5px;
  text-align: center;
}

.ws-empty span {
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 50%;
  color: var(--jade);
  background: var(--jade-soft);
}

.ws-empty svg {
  width: 16px;
  height: 16px;
}

/* Right-side guide / notes */
.ws-guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-guide-step {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.ws-guide-step > span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid rgba(217, 72, 50, 0.2);
  border-radius: 50%;
  color: var(--red);
  font-family: var(--mono);
  font-size: 7px;
}

.ws-guide-step strong {
  display: block;
  font-size: 9.5px;
  font-weight: 650;
}

.ws-guide-step p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.ws-note-card {
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--jade-soft);
}

.ws-note-card > span {
  color: var(--jade);
  font-size: 8px;
  font-weight: 650;
}

.ws-note-card p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 9.5px;
  line-height: 1.7;
}

.ws-note-card--red {
  background: var(--red-soft);
}

.ws-note-card--red > span {
  color: var(--red-deep);
}

.ws-recent {
  display: flex;
  flex-direction: column;
}

.ws-recent-row {
  display: flex;
  padding: 9px 0;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  font-size: 8.5px;
}

.ws-recent-row:first-child {
  border-top: 0;
}

.ws-recent-row > span:first-child {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 6px;
  color: var(--jade);
  background: var(--jade-soft);
}

.ws-recent-row svg {
  width: 10px;
  height: 10px;
}

.ws-recent-row div {
  min-width: 0;
  flex: 1;
}

.ws-recent-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-recent-row small {
  color: var(--muted-2);
  font-size: 7.5px;
}

/* Secretary summary blocks */
.ws-bars {
  display: flex;
  height: 168px;
  padding-top: 8px;
  align-items: flex-end;
  gap: 10px;
}

.ws-bar {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.ws-bar__value {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
}

.ws-bar__track {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
}

.ws-bar__fill {
  width: min(100%, 27px);
  min-height: 3px;
  border-radius: 4px 4px 1px 1px;
  background: rgba(31, 91, 73, 0.4);
  transition: height 0.5s var(--ease);
}

.ws-bar.is-peak .ws-bar__fill {
  background: var(--red);
}

.ws-bar__day {
  color: var(--muted-2);
  font-size: 7px;
}

.ws-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-chart-foot strong {
  color: var(--jade);
  font-weight: 600;
}

.ws-donut-row {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 3px 0;
}

.ws-donut {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#d94832 0 34%, #d9a24e 34% 61%, #4e8d77 61% 81%, #537f97 81% 92%, #846f9f 92% 100%);
}

.ws-donut::before {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--paper-3);
  content: "";
}

.ws-donut__center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ws-donut__center strong {
  display: block;
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ws-donut__center span {
  color: var(--muted-2);
  font-size: 7px;
}

.ws-legend {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.ws-legend li {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
}

.ws-legend i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 1px;
}

.ws-legend strong {
  margin-left: auto;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 500;
}

.ws-load {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ws-load-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  font-size: 8px;
}

.ws-load-row > span {
  color: var(--muted);
}

.ws-load-row > strong {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 500;
  text-align: right;
}

.ws-load-track {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--paper-2);
}

.ws-load-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--jade);
}

.ws-load-row:nth-child(2) .ws-load-track i { background: var(--blue); }
.ws-load-row:nth-child(3) .ws-load-track i { background: var(--rose); }
.ws-load-row:nth-child(4) .ws-load-track i { background: var(--red); }

/* ===== Tables ===== */
.ws-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.ws-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.ws-table th {
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 7.5px;
  font-weight: 550;
  text-align: left;
  letter-spacing: 0.03em;
}

.ws-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(20, 35, 29, 0.08);
  color: var(--ink-2);
  font-size: 9px;
  vertical-align: middle;
}

.ws-table tbody tr:last-child td {
  border-bottom: 0;
}

.ws-table tbody tr:hover td {
  background: rgba(255, 250, 241, 0.5);
}

.ws-table__issue {
  max-width: 260px;
  white-space: normal;
}

.ws-table__issue code {
  display: block;
  margin-bottom: 1px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 7px;
}

.ws-table__issue strong {
  display: block;
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-table__issue small {
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ws-row-actions button {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 7.5px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ws-row-actions button:hover {
  border-color: var(--red);
  color: var(--red);
}

.ws-text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 600;
}

.ws-text-link svg {
  width: 11px;
  height: 11px;
}

/* Filter bar */
.ws-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.ws-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ws-filter {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 550;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ws-filter span {
  margin-left: 2px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
}

.ws-filter:hover {
  border-color: var(--line);
  color: var(--ink);
}

.ws-filter.is-active {
  color: var(--paper-3);
  background: var(--ink);
}

.ws-filter.is-active span {
  color: rgba(255, 250, 241, 0.55);
}

.ws-filterbar__count {
  color: var(--muted-2);
  font-size: 8px;
  white-space: nowrap;
}

/* Class ledger stats */
.ws-ledger-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 13px;
}

.ws-ledger-stat {
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--paper-2);
}

.ws-ledger-stat strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.ws-ledger-stat span {
  color: var(--muted);
  font-size: 7.5px;
}

/* ===== Reception news manager ===== */
.ws-news-list {
  display: flex;
  flex-direction: column;
}

.ws-news-item {
  display: grid;
  grid-template-columns: 47px 78px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 3px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.ws-news-item:first-child {
  border-top: 0;
}

.ws-news-item__date {
  display: flex;
  flex-direction: column;
  padding-right: 11px;
  border-right: 1px solid var(--line);
}

.ws-news-item__date strong {
  color: var(--red);
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ws-news-item__date span {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-news-item__thumb {
  display: grid;
  width: 78px;
  height: 47px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  color: var(--muted-2);
  background: var(--paper-2);
}

.ws-news-item__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ws-news-item__thumb svg {
  width: 18px;
  height: 18px;
}

/* News image picker */
.ws-image-upload {
  display: inline-flex;
  min-height: 42px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(20, 35, 29, 0.24);
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--paper);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ws-image-upload:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

.ws-image-preview {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-2);
}

.ws-image-preview[hidden] {
  display: none;
}

.ws-image-preview img {
  display: block;
  width: min(100%, 380px);
  max-height: 190px;
  object-fit: cover;
}

.ws-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: #fffaf1;
  background: rgba(20, 35, 29, 0.74);
  font-size: 9px;
  cursor: pointer;
}

.ws-image-remove:hover {
  background: var(--red);
}

.ws-news-item__main {
  min-width: 0;
}

.ws-news-item__main > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ws-news-item__main time {
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-news-item__main h3 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.ws-news-item__main p {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ws-news-item__main small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.ws-news-item > .ws-mini-btn {
  align-self: center;
}

/* ===== Modal ===== */
.ws-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  padding: 20px;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ws-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.ws-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 15, 0.6);
  backdrop-filter: blur(7px);
}

.ws-modal__panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  padding: 24px 26px 20px;
  overflow-y: auto;
  border: 1px solid rgba(255, 250, 241, 0.4);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.3);
  transform: translateY(16px) scale(0.99);
  transition: transform 0.35s var(--ease);
}

.ws-modal.is-open .ws-modal__panel {
  transform: none;
}

.ws-modal__panel--wide {
  width: min(760px, 100%);
}

.ws-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ws-modal__head > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.ws-modal__head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.ws-modal__body {
  margin-top: 17px;
}

.ws-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 19px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ws-modal__foot .btn {
  min-height: 42px;
  padding: 0 17px;
  font-size: 11px;
}

.ws-modal__foot .btn--ghost {
  border-color: var(--line);
}

.ws-modal__foot .ws-foot-note {
  margin-right: auto;
  color: var(--muted-2);
  font-size: 8px;
}

.ws-modal-error {
  min-height: 0;
  margin-top: 7px;
  color: var(--red-deep);
  font-size: 9px;
  line-height: 1.5;
}

.ws-modal-error:empty {
  display: none;
}

.ws-modal-error.is-visible {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(217, 72, 50, 0.18);
  border-radius: 7px;
  background: #fbece7;
}

.ws-field {
  display: block;
  margin-bottom: 13px;
}

.ws-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
}

.ws-field > span small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 400;
}

.ws-field .text-input,
.ws-field .text-area {
  font-size: 11.5px;
}

.ws-field select.text-input {
  min-height: 40px;
  padding: 8px 30px 8px 12px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 17px, calc(100% - 9px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.ws-field .text-area {
  min-height: 82px;
}

.ws-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.ws-form-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.45);
}

.ws-form-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: var(--red);
}

.ws-form-row p {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}

.ws-form-row p strong {
  display: block;
  margin-bottom: 1px;
  color: var(--ink-2);
  font-size: 9.5px;
}

.ws-hint {
  margin: -4px 0 12px;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--paper-2);
  font-size: 8.5px;
  line-height: 1.65;
}

.ws-hint strong {
  color: var(--ink-2);
}

.ws-modal-issue {
  padding: 12px 13px;
  margin-bottom: 14px;
  border-left: 2px solid var(--red);
  border-radius: 0 8px 8px 0;
  background: var(--paper-2);
}

.ws-modal-issue > span {
  display: flex;
  gap: 5px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 7.5px;
}

.ws-modal-issue h3 {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.ws-modal-issue p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.ws-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ws-detail-grid div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ws-detail-grid span {
  color: var(--muted-2);
  font-size: 8px;
}

.ws-detail-grid strong {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 550;
}

.ws-detail-section {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.ws-detail-section > span {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.ws-detail-section p {
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.8;
}

.ws-detail-section p + p {
  margin-top: 4px;
}

.ws-answer-box {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(31, 91, 73, 0.18);
  border-radius: 10px;
  background: var(--jade-soft);
}

.ws-answer-box > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--jade);
  font-size: 8px;
  font-weight: 650;
}

.ws-answer-box > span svg {
  width: 11px;
  height: 11px;
}

.ws-answer-box p {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 9.5px;
  line-height: 1.75;
}

.ws-answer-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 7.5px;
}

.ws-timeline {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.ws-timeline__item {
  position: relative;
  display: flex;
  gap: 9px;
  padding-bottom: 12px;
}

.ws-timeline__item::before {
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 7px;
  width: 1px;
  background: var(--line);
  content: "";
}

.ws-timeline__item:last-child::before {
  display: none;
}

.ws-timeline__dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  place-items: center;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--jade);
  background: var(--paper);
}

.ws-timeline__dot svg {
  width: 8px;
  height: 8px;
  stroke-width: 2.4;
}

.ws-timeline__item.is-current .ws-timeline__dot {
  border: 2px solid var(--red);
}

.ws-timeline__item.is-current .ws-timeline__dot::after {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.ws-timeline__item > div {
  min-width: 0;
}

.ws-timeline__item strong {
  display: block;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 600;
}

.ws-timeline__item p {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.ws-timeline__item time {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
}

.ws-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  z-index: 400;
  display: flex;
  padding: 10px 15px 10px 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 999px;
  color: var(--paper-3);
  background: rgba(20, 35, 29, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.ws-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ws-toast > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--jade-2);
}

.ws-toast svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.ws-toast p {
  font-size: 9px;
}

.noscript-note {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--paper-3);
  background: var(--red);
  font-size: 11px;
}

/* ===== Responsive ===== */
@media (max-width: 1220px) {
  .ws-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ws-layout {
    grid-template-columns: 1fr;
  }

  .ws-layout .ws-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 1080px) {
  .ws-layout .ws-stack {
    grid-template-columns: 1fr;
  }

  .ws-content {
    padding-left: 22px;
    padding-right: 22px;
  }

  .login-view {
    grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1fr);
  }

  .login-visual {
    padding: 30px 30px 26px;
  }

  .login-copy h1 {
    font-size: clamp(2.5rem, 4.3vw, 3.6rem);
  }

  .login-chain {
    flex-wrap: wrap;
  }

  .login-chain > i {
    display: none;
  }

  .login-chain > div {
    flex: 1 1 40%;
  }

  .login-main {
    padding: 44px 30px;
  }
}

@media (max-width: 900px) {
  .login-view {
    display: block;
  }

  .login-visual {
    min-height: 310px;
    padding: 26px 28px 22px;
  }

  .login-copy {
    margin: 26px 0 24px;
    padding: 0;
  }

  .login-copy h1 {
    font-size: clamp(2.5rem, 7vw, 3.5rem);
  }

  .login-copy > p {
    margin-top: 12px;
    font-size: 11px;
  }

  .login-kicker {
    margin-bottom: 12px;
  }

  .login-chain {
    display: none;
  }

  .login-visual__foot {
    margin-top: auto;
  }

  .login-main {
    padding: 36px 22px 50px;
  }

  .login-back {
    top: 16px;
    right: 22px;
  }

  .ws-sidebar {
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
  }

  .workspace-app.is-menu-open .ws-sidebar {
    transform: translateX(0);
  }

  .workspace-app.is-menu-open .ws-scrim {
    visibility: visible;
    opacity: 1;
  }

  .ws-main {
    margin-left: 0;
  }

  .ws-menu-btn {
    display: grid;
  }

  .ws-topbar {
    padding: 0 20px;
  }

  .ws-content {
    padding: 22px 20px 45px;
  }
}

@media (max-width: 720px) {
  .login-visual {
    min-height: 290px;
    padding: 22px 20px 19px;
  }

  .login-brand .brand__text small {
    font-size: 7.5px;
  }

  .login-copy h1 {
    font-size: clamp(2.2rem, 9vw, 2.9rem);
  }

  .login-copy > p {
    font-size: 10px;
  }

  .login-main {
    padding: 31px 14px 45px;
  }

  .login-card {
    padding: 22px 17px 18px;
    border-radius: 18px;
  }

  .login-head h2 {
    font-size: 24px;
  }

  .login-roles {
    gap: 6px;
    margin: 16px 0 15px;
  }

  .login-role {
    min-height: 52px;
    padding: 7px 8px;
  }

  .login-role__icon {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .login-role strong {
    font-size: 9px;
  }

  .login-role small {
    font-size: 6.5px;
  }

  .login-back {
    display: none;
  }

  .ws-topbar {
    min-height: 64px;
    padding: 0 14px;
    gap: 10px;
  }

  .ws-title > span {
    font-size: 6.5px;
  }

  .ws-title h1 {
    font-size: 16px;
  }

  .ws-online,
  .ws-top-link {
    display: none;
  }

  .ws-topbar__right {
    gap: 7px;
  }

  .ws-user-chip > span:last-child {
    display: none;
  }

  .ws-content {
    padding: 18px 14px 40px;
  }

  .ws-page-head {
    display: block;
    margin-bottom: 15px;
  }

  .ws-page-head h2 {
    font-size: 25px;
  }

  .ws-page-head p {
    font-size: 9.5px;
  }

  .ws-page-date {
    display: block;
    margin-top: 3px;
    font-size: 8.5px;
  }

  .ws-head-actions {
    margin-top: 12px;
  }

  .ws-head-actions .ws-action-btn {
    flex: 1;
  }

  .ws-kpis {
    gap: 8px;
    margin-bottom: 12px;
  }

  .ws-kpi {
    padding: 12px 12px 10px;
  }

  .ws-kpi__value {
    font-size: 23px;
  }

  .ws-kpi__top span:first-child {
    font-size: 8px;
  }

  .ws-kpi__foot {
    display: block;
    font-size: 7px;
  }

  .ws-kpi__foot em {
    display: block;
    margin-top: 2px;
  }

  .ws-layout .ws-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .ws-layout .ws-stack > * {
    width: 100%;
    min-width: 0;
  }

  .ws-panel {
    padding: 15px 14px;
  }

  .ws-panel__head h3 {
    font-size: 13px;
  }

  .ws-panel__head p {
    font-size: 8px;
  }

  .ws-issue-card {
    padding: 11px 12px;
  }

  .ws-issue-card h4 {
    font-size: 12px;
  }

  .ws-issue-card > p {
    font-size: 9.5px;
  }

  .ws-news-item {
    grid-template-columns: 38px 58px minmax(0, 1fr);
    gap: 10px;
  }

  .ws-news-item__thumb {
    width: 58px;
    height: 36px;
  }

  .ws-news-item__date {
    padding-right: 8px;
  }

  .ws-news-item > .ws-mini-btn {
    grid-column: 3;
    justify-self: start;
    margin-top: 2px;
  }

  .ws-issue-actions {
    gap: 5px;
  }

  .ws-mini-btn {
    min-height: 28px;
    font-size: 8px;
  }

  .ws-filterbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .ws-filter {
    padding: 4px 8px;
    font-size: 8px;
  }

  .ws-modal {
    padding: 0;
    align-items: flex-end;
  }

  .ws-modal__panel {
    width: 100%;
    max-height: 93vh;
    padding: 19px 17px 16px;
    border-radius: 18px 18px 0 0;
  }

  .ws-modal__head h2 {
    font-size: 21px;
  }

  .ws-modal__body {
    margin-top: 14px;
  }

  .ws-form-grid {
    grid-template-columns: 1fr;
  }

  .ws-detail-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .ws-popover {
    position: fixed;
    top: 62px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .ws-toast {
    bottom: 15px;
    max-width: calc(100vw - 24px);
    border-radius: 10px;
  }

  .ws-ledger-stats {
    gap: 6px;
  }

  .ws-ledger-stat {
    padding: 9px;
  }

  .ws-ledger-stat strong {
    font-size: 17px;
  }

  .ws-bars {
    height: 145px;
    gap: 6px;
  }

  .ws-donut-row {
    gap: 12px;
  }

  .ws-donut {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
  }

  .ws-donut__center strong {
    font-size: 19px;
  }
}

@media (max-width: 420px) {
  .login-roles {
    grid-template-columns: 1fr;
  }

  .login-role {
    min-height: 45px;
  }

  .login-demo {
    flex-wrap: wrap;
  }

  .login-demo button {
    flex: 1 0 100%;
    margin-top: 2px;
    margin-left: 0;
    text-align: left;
  }

  .ws-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .ws-kpi__icon {
    width: 22px;
    height: 22px;
  }

  .ws-kpi__icon svg {
    width: 11px;
    height: 11px;
  }

  .ws-page-head h2 {
    font-size: 22px;
  }

  .ws-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ws-modal__foot {
    flex-wrap: wrap;
  }

  .ws-modal__foot .btn {
    flex: 1;
  }

  .ws-modal__foot .ws-foot-note {
    flex: 1 0 100%;
    margin-right: 0;
  }
}

/* ===== Readability pass ===== */
.login-copy > p {
  max-width: 540px;
  font-size: 13px;
}

.login-chain > div strong { font-size: 10.5px; }
.login-chain > div small { font-size: 8px; }
.login-chain > div span { font-size: 8px; }
.login-role strong { font-size: 11.5px; }
.login-role small { font-size: 8.5px; }
.login-field > label { font-size: 11px; }
.login-input input { font-size: 13px; }
.login-demo { font-size: 9px; }
.login-demo code { font-size: 9px; }
.login-demo button { font-size: 9px; }
.login-note { font-size: 9px; }
.login-help p { font-size: 9px; }

.ws-brand small { font-size: 8.5px; }
.ws-role-box__label { font-size: 8px; }
.ws-role-box__user strong { font-size: 12px; }
.ws-role-box__user small { font-size: 8.5px; }
.ws-role-box__org { font-size: 8.5px; }
.ws-nav-label { font-size: 8.5px; }
.ws-nav__item { font-size: 12px; min-height: 42px; }
.ws-nav__badge { font-size: 8px; }
.ws-sidebar__tip p { font-size: 9px; }
.ws-side-link { font-size: 10px; }
.ws-sidebar__bottom > p { font-size: 8px; }
.ws-title h1 { font-size: 20px; }
.ws-title > span { font-size: 8.5px; }
.ws-online, .ws-top-link { font-size: 9.5px; }
.ws-user-chip strong { font-size: 11px; }
.ws-user-chip small { font-size: 8.5px; }
.ws-notify-item strong { font-size: 10.5px; }
.ws-notify-item small { font-size: 8.5px; }
.ws-notify-empty { font-size: 10px; }

.ws-eyebrow { font-size: 9px; }
.ws-page-head p { font-size: 12px; }
.ws-action-btn { font-size: 11.5px; }
.ws-kpi__top span:first-child { font-size: 10.5px; }
.ws-kpi__value { font-size: 30px; }
.ws-kpi__foot { font-size: 9px; }
.ws-panel__head h3 { font-size: 16px; }
.ws-panel__head p { font-size: 9.5px; }
.ws-panel__link { font-size: 9.5px; }
.ws-issue-top time { font-size: 9px; }
.ws-tag { font-size: 9px; }
.ws-issue-card h4 { font-size: 14px; }
.ws-issue-card > p { font-size: 11px; }
.ws-issue-meta { font-size: 9px; }
.ws-mini-btn { font-size: 10px; }
.ws-status { font-size: 9px; }
.ws-due { font-size: 8.5px; }
.ws-filter { font-size: 9.5px; }
.ws-filterbar__count { font-size: 9px; }
.ws-recent-row { font-size: 9.5px; }
.ws-recent-row strong { font-size: 10.5px; }
.ws-recent-row small { font-size: 8.5px; }
.ws-guide-step strong { font-size: 10.5px; }
.ws-guide-step p { font-size: 9.5px; }
.ws-note-card > span { font-size: 9px; }
.ws-note-card p { font-size: 10.5px; }
.ws-chart-foot { font-size: 8.5px; }
.ws-bar__value { font-size: 8.5px; }
.ws-bar__day { font-size: 8px; }
.ws-load-row { font-size: 9px; }
.ws-load-row > strong { font-size: 8.5px; }
.ws-legend li { font-size: 9px; }
.ws-legend strong { font-size: 8.5px; }
.ws-table th { font-size: 8.5px; }
.ws-table td { font-size: 10.5px; }
.ws-table__issue code { font-size: 8px; }
.ws-table__issue strong { font-size: 11px; }
.ws-table__issue small { font-size: 8.5px; }
.ws-row-actions button { font-size: 8.5px; }

.ws-field > span { font-size: 11.5px; }
.ws-field > span small { font-size: 8.5px; }
.ws-field .text-input, .ws-field .text-area { font-size: 12.5px; }
.ws-hint { font-size: 9.5px; }
.ws-modal-issue p { font-size: 10px; }
.ws-detail-grid span { font-size: 9px; }
.ws-detail-grid strong { font-size: 10px; }
.ws-detail-section p { font-size: 11px; }
.ws-timeline__item strong { font-size: 10px; }
.ws-timeline__item p { font-size: 9.5px; }
.ws-timeline__item time { font-size: 8.5px; }
.ws-answer-box p { font-size: 10.5px; }
.ws-modal-error { font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  .ws-sidebar,
  .ws-modal__panel,
  .ws-toast {
    transition: none;
  }
}
