:root {
  --ink: #1a2e28;
  --ink-soft: #3d524a;
  --muted: #5c6f67;
  --paper: #f3f6f4;
  --paper-2: #e7eee9;
  --surface: #ffffff;
  --line: rgba(26, 46, 40, 0.12);
  --accent: #0d6b5c;
  --accent-deep: #085246;
  --accent-soft: #d8efe9;
  --danger: #9b2c2c;
  --danger-bg: #fde8e8;
  --ok: #0d6b5c;
  --ok-bg: #e3f5f0;
  --pending: #8a5a12;
  --font: "DM Sans", "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --shadow: 0 18px 50px rgba(26, 46, 40, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-size: 0.92em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* —— Auth / login landing —— */
.auth-body {
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(13, 107, 92, 0.14), transparent 55%),
    radial-gradient(700px 420px at 100% 100%, rgba(26, 46, 40, 0.08), transparent 50%),
    linear-gradient(160deg, #eef4f1 0%, #f7f9f8 45%, #e9f0ec 100%);
}

.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.auth-brand-panel {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem);
  color: #f4faf8;
  background:
    linear-gradient(155deg, rgba(8, 82, 70, 0.92), rgba(13, 107, 92, 0.78)),
    url("../images/icc-logo.png") center / 42% no-repeat,
    linear-gradient(180deg, #0a3f36, #0d6b5c);
  overflow: hidden;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.18), transparent 45%);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  animation: rise 0.7s ease both;
}

.auth-logo-mark {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.auth-brand-name {
  margin: 1.5rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}

.auth-brand-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.auth-brand-lede {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 26rem;
}

.auth-contact {
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.auth-contact div {
  margin: 0;
}

.auth-contact dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.2rem;
}

.auth-contact dd {
  margin: 0;
  font-size: 0.95rem;
}

.auth-contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  animation: rise 0.7s ease 0.08s both;
}

.login-panel-head {
  margin-bottom: 1.25rem;
}

.login-logo-wide {
  display: block;
  width: min(260px, 100%);
  margin-bottom: 1.1rem;
}

.login-panel-head h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.login-panel-head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.login-form {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fbfcfb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 107, 92, 0.18);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-google {
  width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-google:hover {
  background: var(--paper);
}

.btn-google.is-disabled {
  opacity: 0.72;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
}

.btn-ghost:hover {
  background: var(--paper);
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.hint {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(155, 44, 44, 0.12);
}

.login-foot {
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.alert {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
}

.alert-success {
  background: var(--ok-bg);
  color: var(--ok);
}

.alert-signup {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(13, 107, 92, 0.25);
  box-shadow: 0 8px 24px rgba(13, 107, 92, 0.08);
}

.alert-signup strong {
  font-size: 1rem;
}

.alert-signup p {
  margin: 0;
  line-height: 1.45;
}

.alert-signup .alert-next {
  margin-top: 0.25rem;
  font-weight: 600;
  color: var(--accent-deep);
}

/* —— Admin —— */
.admin-body {
  background: #f8faf9;
  min-height: 100vh;
}

.admin-frame {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  background: linear-gradient(185deg, #06231e 0%, #02120f 100%);
  color: #e2f0ec;
  padding: 2rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar .admin-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar .admin-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-sidebar .admin-brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.admin-sidebar .admin-brand small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.admin-nav-section {
  margin: 1.5rem 0 0.5rem;
  padding: 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-nav-link .nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(2px);
}

.admin-nav-link:hover .nav-icon {
  color: #fff;
  opacity: 1;
}

.admin-nav-link.is-active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 4px 0 0 0 #3d9b8f; /* Premium active left border */
}

.admin-nav-link.is-active .nav-icon {
  color: #3d9b8f;
  opacity: 1;
}

.admin-sidebar-foot {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-sidebar-foot p {
  margin: 0;
  line-height: 1.45;
}

.admin-sidebar-foot small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  word-break: break-all;
}

.admin-role-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(61, 155, 143, 0.2);
  color: #59c3b4;
  border: 1px solid rgba(61, 155, 143, 0.25);
  vertical-align: middle;
}

.admin-sidebar-foot .btn-ghost {
  width: 100%;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.admin-sidebar-foot .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.admin-mobilebar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.admin-mobilebar strong {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.admin-nav-backdrop {
  display: none;
}

.admin-content {
  min-width: 0;
  background: #f8faf9;
}

.admin-main {
  width: min(1080px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.admin-shell {
  animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  display: grid;
  gap: 2rem;
}

.admin-hero {
  margin-bottom: 0.5rem;
}

.admin-hero h1 {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
  font-size: 1.08rem;
  line-height: 1.6;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.admin-block {
  background: var(--surface);
  border: 1px solid rgba(26, 46, 40, 0.07);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03), 0 4px 12px -2px rgba(26, 46, 40, 0.01);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-block:hover {
  box-shadow: 0 20px 40px -5px rgba(26, 46, 40, 0.06), 0 8px 20px -4px rgba(26, 46, 40, 0.02);
  transform: translateY(-2px);
}

.admin-block h2 {
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.detail-list div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.detail-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-list dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.detail-list dd a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.15s ease;
}

.detail-list dd a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.status-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-list span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.status-list strong {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.status-list .ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.status-list .pending {
  background: #fef3c7;
  color: #92400e;
  text-align: right;
  max-width: 18rem;
  line-height: 1.3;
}

.status-list strong:not(.ok):not(.pending) {
  background: var(--paper-2);
  color: var(--ink-soft);
}

.settings-form {
  display: grid;
  gap: 1.5rem;
}

.settings-form .btn-primary {
  width: auto;
  justify-self: start;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 4px 12px rgba(13, 107, 92, 0.2);
  transition: all 0.2s ease;
}

.settings-form .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 107, 92, 0.3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--ink);
  background: #fbfcfb;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.1), 0 1px 2px rgba(0, 0, 0, 0.01);
  background: #fff;
}

.check-field {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  padding: 0.5rem 0;
}

.check-field input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 6px;
  border: 1px solid rgba(26, 46, 40, 0.2);
  cursor: pointer;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.status-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.rzp-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.rzp-status-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.rzp-status-card:hover,
.rzp-webhook-card:hover,
.settings-form.admin-block:hover {
  transform: none;
}

.rzp-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rzp-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rzp-webhook-card {
  display: grid;
  gap: 1rem;
}

.rzp-webhook-card h2 {
  margin-bottom: 0;
}

.rzp-webhook-card .lede {
  font-size: 0.98rem;
}

.rzp-webhook {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.rzp-webhook input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fbfcfb;
}

.rzp-webhook .btn-ghost,
.rzp-webhook-card > form .btn-ghost,
.settings-form .btn-ghost {
  width: auto;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
}

.rzp-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  line-height: 1.5;
}

.rzp-status-card code {
  font-size: 0.84em;
  color: var(--accent-deep);
}

.rzp-test-card {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 1.35rem 1.45rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
}

.rzp-test-card h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rzp-test-card > p:last-of-type,
.rzp-test-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.rzp-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.rzp-test-grid div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #f8faf9;
  border: 1px solid rgba(26, 46, 40, 0.06);
}

.rzp-test-grid span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rzp-test-grid strong {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.rzp-test-grid small {
  color: var(--muted);
}

@media (max-width: 860px) {
  .rzp-status-grid {
    grid-template-columns: 1fr;
  }

  .rzp-webhook {
    flex-direction: column;
    align-items: stretch;
  }

  .rzp-test-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(26, 46, 40, 0.08);
  border-radius: 14px;
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 1rem 1.25rem;
}

.data-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(243, 246, 244, 0.6);
  border-bottom: 2px solid rgba(26, 46, 40, 0.08);
}

.data-table td {
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
  color: var(--ink-soft);
  font-weight: 500;
}

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

.data-table tr:hover td {
  background-color: rgba(243, 246, 244, 0.3);
  color: var(--ink);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: auto;
    padding-bottom: 2.5rem;
  }

  .auth-contact {
    display: none;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-frame {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100vh;
  }

  .admin-nav-toggle:checked ~ .admin-frame .admin-sidebar {
    transform: none;
  }

  .admin-mobilebar {
    display: flex;
  }

  .admin-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 26, 0.4);
    backdrop-filter: blur(4px);
    z-index: 20;
  }

  .admin-nav-toggle:checked ~ .admin-nav-backdrop {
    display: block;
  }

  .admin-main {
    width: calc(100% - 2rem);
    padding: 1.5rem 0 3rem;
  }
}

/* —— Member portal —— */
.member-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(920px 420px at 8% -10%, rgba(13, 107, 92, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(61, 155, 143, 0.1), transparent 50%),
    radial-gradient(600px 400px at 80% 100%, rgba(26, 46, 40, 0.06), transparent 55%),
    linear-gradient(180deg, #f4f8f6 0%, #f8faf9 40%, #eef3f0 100%);
}

.member-nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.member-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(26, 46, 40, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.member-top-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.member-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.member-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 0.2rem;
  box-shadow: 0 8px 20px rgba(26, 46, 40, 0.08);
  object-fit: contain;
}

.member-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.member-brand-text strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.member-brand-text small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
}

.member-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-nav-link svg {
  width: 1.15rem;
  height: 1.15rem;
  opacity: 0.85;
}

.member-nav-link:hover {
  color: var(--accent-deep);
  background: rgba(13, 107, 92, 0.06);
  transform: translateX(2px);
}

.member-nav-link.is-active {
  color: var(--accent-deep);
  background: rgba(13, 107, 92, 0.1);
  box-shadow: inset 3px 0 0 0 #3d9b8f;
}

.member-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.member-user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(243, 246, 244, 0.9);
  border: 1px solid rgba(26, 46, 40, 0.06);
}

.member-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  flex-shrink: 0;
}

.member-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.member-user-meta strong {
  font-size: 0.86rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.member-user-meta small {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.member-signout {
  border-radius: 10px;
}

.member-menu-btn {
  display: none;
  border-radius: 10px;
  cursor: pointer;
}

.member-nav-backdrop,
.member-drawer {
  display: none;
}

.member-main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  flex: 1;
}

.member-foot {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 46, 40, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
}

.member-foot p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.member-foot a {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 600;
}

.member-foot a:hover {
  text-decoration: underline;
}

.member-shell {
  display: grid;
  gap: 1.35rem;
  animation: memberRise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes memberRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.member-alert {
  margin: 0;
}

.member-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border-radius: 24px;
  color: #f4faf8;
  background:
    linear-gradient(145deg, rgba(6, 35, 30, 0.97) 0%, rgba(8, 82, 70, 0.94) 48%, rgba(13, 107, 92, 0.9) 100%);
  box-shadow: 0 24px 50px -18px rgba(6, 35, 30, 0.45);
  position: relative;
  overflow: hidden;
}

.member-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(61, 155, 143, 0.35), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.member-hero-copy,
.member-hero-mark {
  position: relative;
  z-index: 1;
}

.member-hero-compact {
  grid-template-columns: 1fr;
}

.member-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}

.member-kicker a {
  color: inherit;
  text-decoration: none;
}

.member-kicker a:hover {
  opacity: 1;
  text-decoration: underline;
}

.member-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.member-hero h1 em {
  font-style: italic;
  color: #b8e6dc;
}

.member-hero-lede {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: rgba(244, 250, 248, 0.82);
  font-size: 1.02rem;
  line-height: 1.55;
}

.member-hero-mark {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.member-hero-mark img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.member-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.4rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
}

.member-status-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(13, 107, 92, 0.12);
  color: var(--accent-deep);
}

.member-status-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.member-status.is-active .member-status-icon {
  background: var(--ok-bg);
  color: var(--ok);
}

.member-status.is-active {
  border-color: rgba(13, 107, 92, 0.22);
  background: linear-gradient(165deg, #fff 0%, #f3faf7 100%);
}

.member-status.is-empty {
  background: linear-gradient(165deg, #fff 0%, #f7faf8 100%);
}

.member-status-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.member-status-id {
  margin: 0.35rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.member-status-id code {
  background: transparent;
  padding: 0;
  font-family: var(--font);
  font-size: inherit;
  font-weight: inherit;
}

.member-status-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.member-status-cta {
  width: auto;
  flex-shrink: 0;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  border: none;
  box-shadow: 0 10px 24px rgba(13, 107, 92, 0.22);
}

.member-status-cta:hover {
  background: linear-gradient(135deg, var(--accent-deep) 0%, #064038 100%);
}

.member-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.member-pill.ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.member-pill.pending {
  color: var(--pending);
  background: #f8efd9;
}

.member-section {
  display: grid;
  gap: 1.1rem;
}

.member-section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.member-section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.member-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.85rem;
}

.library-icon-grid {
  margin-bottom: 0.35rem;
}

.member-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.1rem 0.75rem 1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px -6px rgba(26, 46, 40, 0.04);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 8.5rem;
}

.member-icon-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 107, 92, 0.28);
  box-shadow: 0 16px 36px -8px rgba(26, 46, 40, 0.1);
}

.member-icon-tile strong {
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.member-icon-tile small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
}

.member-icon-tile.is-soon {
  opacity: 0.62;
  pointer-events: none;
}

.member-icon-tile-badge {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
  background: rgba(13, 107, 92, 0.1);
}

.member-icon-tile-badge svg {
  width: 1.55rem;
  height: 1.55rem;
}

.tone-membership,
.tone-circulars { background: rgba(13, 107, 92, 0.12); color: #0d6b5c; }
.tone-abstract-books { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.tone-journals { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.tone-news { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.tone-notifications { background: rgba(190, 24, 93, 0.12); color: #be185d; }
.tone-paper { background: rgba(100, 116, 139, 0.14); color: #475569; }

.member-choice-icon.tone-circulars,
.member-choice-icon.tone-abstract-books,
.member-choice-icon.tone-journals,
.member-choice-icon.tone-news,
.member-choice-icon.tone-notifications {
  background: inherit;
  color: inherit;
}

.member-choice-icon.tone-circulars { background: rgba(13, 107, 92, 0.12); color: #0d6b5c; }
.member-choice-icon.tone-abstract-books { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.member-choice-icon.tone-journals { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.member-choice-icon.tone-news { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.member-choice-icon.tone-notifications { background: rgba(190, 24, 93, 0.12); color: #be185d; }

.member-choice-latest {
  margin-top: 0.35rem !important;
  font-size: 0.82rem !important;
  color: var(--ink-soft) !important;
}

.member-choice-latest span {
  font-weight: 700;
  color: var(--accent-deep);
}

.member-choice-card-compact {
  min-height: auto;
}

.library-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.library-card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.library-card-icon.tone-circulars { background: rgba(13, 107, 92, 0.12); color: #0d6b5c; }
.library-card-icon.tone-abstract-books { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.library-card-icon.tone-journals { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.library-card-icon.tone-news { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.library-card-icon.tone-notifications { background: rgba(190, 24, 93, 0.12); color: #be185d; }

.member-section-head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.member-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.library-hub-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Content admin + library */
.content-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.content-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.content-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  border: none;
  box-shadow: 0 10px 24px rgba(13, 107, 92, 0.2);
}

.content-btn:hover {
  background: linear-gradient(135deg, var(--accent-deep) 0%, #064038 100%);
}

.content-table-card {
  padding: 0;
  overflow: hidden;
}

.content-table-card .table-wrap {
  margin: 0;
}

.content-row-title {
  font-size: 0.98rem;
}

.content-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem !important;
}

.content-file-pill {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(13, 107, 92, 0.1);
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.content-action {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.content-action.is-danger {
  color: var(--danger);
  border-color: rgba(155, 44, 44, 0.25);
}

/* AJAX list filters + pagination */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.list-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
  background: linear-gradient(180deg, rgba(248, 250, 249, 0.9) 0%, rgba(255, 255, 255, 0.4) 100%);
}

.library-filter-bar {
  padding: 0 0 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.07);
  background: transparent;
}

.list-filter-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.list-filter-search input,
.list-filter-select select {
  width: 100%;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  background: #fbfcfb;
  padding: 0.62rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink, #1a2e28);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-filter-select {
  flex: 0 1 auto;
  min-width: 130px;
}

.list-filter-search input:focus,
.list-filter-select select:focus {
  outline: none;
  border-color: var(--accent, #0d6b5c);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.1);
}

.list-filter-clear {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
}

.list-filter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.82rem;
  color: var(--muted, #5a736c);
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.library-ajax .list-filter-meta {
  padding: 0.35rem 0 0.85rem;
  border-bottom: none;
}

[data-list-filter].is-loading .table-wrap,
[data-list-filter].is-loading [data-list-rows] {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 1.25rem 1.2rem;
}

.library-ajax .list-pager {
  padding: 1.25rem 0 0.5rem;
}

.list-pager-btn,
.list-pager-num {
  text-decoration: none;
  appearance: none;
  border: 1px solid rgba(26, 46, 40, 0.12);
  background: #fff;
  color: var(--ink, #1a2e28);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-pager-btn:hover:not(:disabled),
.list-pager-num:hover:not(.is-active) {
  border-color: rgba(13, 107, 92, 0.35);
  color: var(--accent-deep, #085246);
  transform: translateY(-1px);
}

.list-pager-num.is-active {
  background: linear-gradient(135deg, var(--accent, #0d6b5c) 0%, var(--accent-deep, #085246) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(13, 107, 92, 0.55);
}

.list-pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.list-pager-pages {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.list-pager-ellipsis {
  padding: 0 0.2rem;
  color: var(--muted, #5a736c);
  font-size: 0.85rem;
}

.library-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted, #5a736c);
  background: rgba(248, 250, 249, 0.8);
  border-radius: 16px;
  border: 1px dashed rgba(26, 46, 40, 0.12);
}

/* Digital ID card */
.id-card-stage {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1.5rem;
}

.id-card {
  width: min(100%, 560px);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(61, 155, 143, 0.28), transparent 55%),
    linear-gradient(155deg, #06231e 0%, #0a3d34 42%, #02120f 100%);
  color: #e8f3ef;
  box-shadow:
    0 24px 50px -18px rgba(2, 18, 15, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(61, 155, 143, 0.25);
}

.id-card.is-inactive {
  filter: grayscale(0.35);
  opacity: 0.92;
}

.id-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.75rem;
}

.id-card-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.id-card-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
  padding: 4px;
}

.id-card-brand strong {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.id-card-brand small {
  display: block;
  color: rgba(232, 243, 239, 0.65);
  font-size: 0.72rem;
  max-width: 200px;
  line-height: 1.35;
}

.id-card-type {
  text-align: right;
}

.id-card-type-code {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #3d9b8f;
}

.id-card-type-label {
  display: block;
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.id-card-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.1rem;
  padding: 0.5rem 1.25rem 1.15rem;
}

.id-card-photo-wrap {
  position: relative;
}

.id-card-photo {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  display: block;
}

.id-card-photo-empty {
  width: 120px;
  height: 150px;
  border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 243, 239, 0.7);
}

.id-card-photo-empty span {
  font-family: "Instrument Serif", serif;
  font-size: 2rem;
}

.id-card-photo-empty small {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.id-card-status-pill {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.id-card-status-pill.ok {
  background: #3d9b8f;
  color: #02120f;
}

.id-card-status-pill.pending {
  background: rgba(255, 200, 120, 0.95);
  color: #3a2a10;
}

.id-card-name {
  margin: 0 0 0.35rem;
  font-family: "Instrument Serif", serif;
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 400;
}

.id-card-no {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: rgba(232, 243, 239, 0.75);
}

.id-card-no code {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #02120f;
  background: #3d9b8f;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
}

.id-card-id-label {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 243, 239, 0.55);
}

.id-card-id-value {
  margin: 0 0 0.95rem;
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #02120f;
  background: linear-gradient(135deg, #3d9b8f 0%, #7ec8bc 100%);
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px -10px rgba(61, 155, 143, 0.7);
}

.id-card-id-dd {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7ec8bc !important;
}

.id-card-foot-id {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3d9b8f !important;
}

.member-id-chip {
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #085246;
  background: rgba(13, 107, 92, 0.12);
  border: 1px solid rgba(13, 107, 92, 0.22);
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
}

.id-card-dl {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.id-card-dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.35;
}

.id-card-dl dt {
  margin: 0;
  color: rgba(232, 243, 239, 0.5);
  font-weight: 500;
}

.id-card-dl dd {
  margin: 0;
  color: rgba(232, 243, 239, 0.95);
  word-break: break-word;
}

.id-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: rgba(232, 243, 239, 0.55);
  background: rgba(0, 0, 0, 0.18);
}

.id-card-photo-panel {
  margin-bottom: 1.5rem;
}

.id-history-list {
  display: grid;
  gap: 0.75rem;
}

.id-history-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  border-radius: 16px;
  box-shadow: 0 8px 24px -8px rgba(26, 46, 40, 0.04);
}

.id-history-photo {
  flex: 0 0 auto;
  width: 48px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f6f4;
}

.id-history-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-history-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  color: var(--accent-deep, #085246);
  background: rgba(13, 107, 92, 0.1);
}

.id-history-main {
  flex: 1 1 auto;
  min-width: 0;
}

.id-history-no {
  margin: 0 0 0.2rem;
}

.id-history-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted, #5a736c);
}

.member-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.member-user-chip {
  text-decoration: none;
  color: inherit;
}

.member-status-photo {
  overflow: hidden;
  padding: 0 !important;
}

.member-status-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.library-media {
  padding: 0;
  overflow: hidden;
  margin-top: 1rem;
}

.library-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.07);
  background: rgba(248, 250, 249, 0.9);
}

.library-media-head strong {
  font-size: 0.88rem;
  word-break: break-all;
}

.library-pdf-frame {
  position: relative;
  width: 100%;
  min-height: 70vh;
  background: #1a2e28;
}

.library-pdf-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.library-media-fallback {
  margin: 0;
  padding: 0.75rem 1.15rem 1rem;
  font-size: 0.82rem;
  color: var(--muted, #5a736c);
}

.content-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 560px) {
  .id-card-body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .id-card-dl div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .id-card-fields {
    width: 100%;
  }

  .id-card-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .id-card-type {
    text-align: center;
  }

  .id-card-brand {
    flex-direction: column;
  }
}

@media print {
  .member-top,
  .member-drawer,
  .member-nav-backdrop,
  .member-foot,
  .no-print,
  .member-alert {
    display: none !important;
  }

  .member-main,
  .member-shell,
  .id-card-shell {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .id-card-stage {
    margin: 0;
  }

  .id-card {
    box-shadow: none;
    break-inside: avoid;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  body.member-body {
    background: #fff;
  }
}

@media (max-width: 720px) {
  .list-filter-bar {
    padding: 0.9rem;
  }

  .list-filter-select {
    flex: 1 1 45%;
  }
}

.content-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.library-list {
  display: grid;
  gap: 0.9rem;
}

.library-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  border-radius: 18px;
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.library-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -8px rgba(26, 46, 40, 0.08);
  border-color: rgba(13, 107, 92, 0.22);
}

.library-card-main {
  min-width: 0;
  flex: 1;
}

.library-card-meta {
  margin: 0 0 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.library-card h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.library-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.library-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.library-lead {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.library-body {
  color: var(--ink);
  line-height: 1.7;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .library-card {
    flex-wrap: wrap;
  }

  .library-card-actions {
    width: 100%;
    padding-left: 3.75rem;
  }

  .library-card-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .member-section-head-row .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.member-choice-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.55rem 1.55rem 1.35rem;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 100%;
}

.member-choice-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -8px rgba(26, 46, 40, 0.1);
  border-color: rgba(13, 107, 92, 0.28);
}

.member-choice-card.featured {
  border-color: rgba(13, 107, 92, 0.32);
  background: linear-gradient(165deg, #fff 0%, #eef8f4 100%);
}

.member-choice-card.is-disabled {
  opacity: 0.72;
  pointer-events: none;
  cursor: not-allowed;
  background: #fbfcfc;
}

.member-choice-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: rgba(13, 107, 92, 0.1);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.member-choice-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.member-choice-body {
  display: grid;
  gap: 0.45rem;
  flex: 1;
}

.member-choice-card h2,
.member-choice-card h3 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.member-choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.member-plan-code {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(13, 107, 92, 0.1);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.member-choice-cta {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.member-choice-cta.pending {
  color: var(--pending);
}

.price-tag {
  font-size: 1.85rem !important;
  font-weight: 700;
  color: var(--ink) !important;
  letter-spacing: -0.03em;
}

.membership-form h2 {
  margin: 1.25rem 0 0.35rem;
  font-size: 1.05rem;
  color: var(--accent-deep);
}

.form-row-2,
.form-row-3 {
  display: grid;
  gap: 0.85rem;
}

.form-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-crop-box {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px dashed rgba(26, 46, 40, 0.2);
  border-radius: 14px;
  background: #fbfcfb;
}

.photo-crop-stage {
  max-width: 360px;
  max-height: 360px;
}

.photo-crop-stage img {
  display: block;
  max-width: 100%;
}

.photo-result {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.photo-result img {
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.membership-status-card {
  margin-bottom: 0.25rem;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.eyebrow a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.paper-form-head {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 240px);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.08);
}

.paper-org {
  margin: 0;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.paper-regd {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.paper-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(13, 107, 92, 0.1);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.photo-crop-box.compact {
  padding: 0.75rem;
}

.radio-fieldset {
  border: 1px solid rgba(26, 46, 40, 0.1);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.radio-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #f3f6f4;
  border: 1px solid rgba(26, 46, 40, 0.1);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.radio-pill input {
  accent-color: var(--accent);
}

.bank-details-box {
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(13, 107, 92, 0.2);
  background: linear-gradient(165deg, #f7fbf9 0%, #eef7f4 100%);
}

.bank-details-box h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.bank-details-box > p {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .paper-form-head,
  .member-choice-grid,
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .member-nav {
    display: none;
  }

  .member-user-chip {
    display: none;
  }

  .member-signout {
    display: none;
  }

  .member-menu-btn {
    display: inline-flex;
  }

  .member-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 18, 15, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 50;
  }

  .member-drawer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: fixed;
    top: 0;
    right: 0;
    width: min(20rem, 88vw);
    height: 100vh;
    padding: 1.15rem 1.15rem 1.5rem;
    background: linear-gradient(185deg, #06231e 0%, #02120f 100%);
    color: #e8f3ef;
    z-index: 60;
    transform: translateX(104%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.25);
  }

  .member-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .member-drawer-head .btn-ghost {
    color: #d7ebe5;
    border-color: rgba(255, 255, 255, 0.18);
  }

  .member-drawer-nav {
    display: grid;
    gap: 0.35rem;
  }

  .member-drawer .member-nav-link {
    color: rgba(232, 243, 239, 0.88);
    padding: 0.8rem 0.95rem;
  }

  .member-drawer .member-nav-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 4px 0 0 0 #3d9b8f;
  }

  .member-drawer-user {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    margin-top: auto;
  }

  .member-drawer-user strong {
    display: block;
    font-size: 0.92rem;
  }

  .member-drawer-user small {
    color: rgba(232, 243, 239, 0.65);
    font-size: 0.78rem;
    word-break: break-all;
  }

  .member-drawer-signout {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  }

  .member-nav-toggle:checked ~ .member-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .member-nav-toggle:checked ~ .member-drawer {
    transform: translateX(0);
  }

  .member-hero {
    grid-template-columns: 1fr;
  }

  .member-hero-mark {
    display: none;
  }

  .member-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .member-status-cta {
    width: 100%;
    text-align: center;
  }

  .member-main {
    padding: 1.35rem 0 2.5rem;
  }
}

@media (max-width: 520px) {
  .member-brand-text small {
    display: none;
  }

  .member-top-inner {
    width: calc(100% - 1.25rem);
  }

  .member-main,
  .member-foot {
    width: calc(100% - 1.25rem);
  }

  .member-hero {
    padding: 1.35rem 1.2rem;
    border-radius: 20px;
  }

  .member-hero h1 {
    font-size: 1.85rem;
  }
}


.upgrade-banner {
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.member-choice-card.is-disabled {
  opacity: 0.72;
  pointer-events: none;
  cursor: not-allowed;
  background: #f6f8f7;
}

.member-term-dates {
  margin-top: 0.35rem !important;
  font-weight: 600;
  color: var(--accent-deep, #085246) !important;
}

.paper-fee-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13, 107, 92, 0.08) 0%, rgba(61, 155, 143, 0.12) 100%);
  border: 1px solid rgba(13, 107, 92, 0.12);
  color: var(--ink, #1a2e28);
  font-size: 0.95rem;
}

.paper-fee-banner strong {
  color: var(--accent-deep, #085246);
}

.paper-fee-note {
  margin: 0 0 1.25rem;
  color: var(--muted, #5a736c);
  font-size: 0.92rem;
}

.paper-submit-form {
  padding: 1.5rem 1.6rem 1.75rem;
}

.paper-section-title {
  margin: 1.75rem 0 1rem;
  padding-bottom: 0.45rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--accent-deep, #085246);
  border-bottom: 1px solid rgba(26, 46, 40, 0.08);
}

.paper-submit-form > .paper-section-title:first-of-type {
  margin-top: 0;
}

.paper-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.paper-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.paper-corr-check {
  margin: 1rem 0 1.1rem;
}

.paper-coauthors {
  margin: 1.1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(13, 107, 92, 0.28);
  border-radius: 14px;
  background: #fbfcfb;
}

.paper-coauthors-label {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--ink, #1a2e28);
}

.paper-coauthors-label span {
  font-weight: 400;
  color: var(--muted, #5a736c);
}

.paper-add-author {
  margin-top: 0.75rem;
  border-style: dashed !important;
}

.paper-coauthor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
}

.paper-coauthor-row:last-of-type {
  border-bottom: 0;
}

.paper-coauthor-row .coauthor-remove {
  grid-column: 1 / -1;
  justify-self: start;
}

.paper-type-fieldset {
  margin: 1.1rem 0 0.5rem;
  padding: 0;
  border: 0;
}

.paper-type-fieldset legend {
  margin-bottom: 0.65rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink, #1a2e28);
}

.paper-type-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(26, 46, 40, 0.12);
  background: #fbfcfb;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-pill:has(input:checked) {
  border-color: var(--accent, #0d6b5c);
  background: rgba(13, 107, 92, 0.08);
  box-shadow: 0 0 0 3px rgba(13, 107, 92, 0.08);
}

.paper-submit-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.95rem 1.25rem;
  font-size: 1.05rem;
}

.paper-detail-card {
  padding: 1.4rem 1.5rem 1.6rem;
}

.paper-detail-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
  margin: 0 0 0.5rem;
}

.paper-detail-dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #5a736c);
}

.paper-detail-dl dd {
  margin: 0.15rem 0 0;
  color: var(--ink, #1a2e28);
}

.paper-abstract {
  margin: 0;
  line-height: 1.65;
  color: var(--ink, #1a2e28);
  white-space: pre-wrap;
}

.paper-coauthor-list,
.paper-file-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.7;
}

.paper-pay-box {
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: rgba(13, 107, 92, 0.06);
  border: 1px solid rgba(13, 107, 92, 0.15);
}

.paper-pay-box p {
  margin: 0 0 0.85rem;
}

@media (max-width: 720px) {
  .paper-form-grid,
  .paper-form-grid-3,
  .paper-coauthor-row,
  .paper-detail-dl {
    grid-template-columns: 1fr;
  }
}

/* ── Editor paper queue dashboard ── */
.ed-dash {
  max-width: 1100px;
}

.ed-dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(61, 155, 143, 0.18), transparent 55%),
    linear-gradient(145deg, #06231e 0%, #0a3d34 48%, #085246 100%);
  color: #e8f5f2;
  box-shadow: 0 18px 40px -18px rgba(6, 35, 30, 0.55);
}

.ed-dash-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 245, 242, 0.65);
}

.ed-dash-hero h1 {
  margin: 0 0 0.4rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: #fff;
}

.ed-dash-lede {
  margin: 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(232, 245, 242, 0.78);
}

.ed-dash-hero-stat {
  text-align: center;
  min-width: 7rem;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.ed-dash-hero-stat-num {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: 2.4rem;
  line-height: 1;
  color: #7dd3c4;
}

.ed-dash-hero-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 245, 242, 0.7);
}

.ed-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ed-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.95rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -5px rgba(26, 46, 40, 0.06);
}

.ed-stat-card.is-active {
  border-color: rgba(13, 107, 92, 0.35);
  box-shadow: inset 0 0 0 2px rgba(13, 107, 92, 0.15), 0 12px 28px -8px rgba(13, 107, 92, 0.2);
}

.ed-stat-icon {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(13, 107, 92, 0.08);
  color: var(--accent, #0d6b5c);
}

.ed-stat-icon svg { width: 1.15rem; height: 1.15rem; }

.ed-stat-card.tone-pending .ed-stat-icon { background: rgba(180, 120, 20, 0.12); color: #a06a10; }
.ed-stat-card.tone-review .ed-stat-icon { background: rgba(40, 100, 180, 0.1); color: #2a6cb0; }
.ed-stat-card.tone-ok .ed-stat-icon { background: rgba(13, 107, 92, 0.12); color: #0d6b5c; }
.ed-stat-card.tone-rej .ed-stat-icon { background: rgba(155, 44, 44, 0.1); color: #9b2c2c; }

.ed-stat-count {
  font-family: "Instrument Serif", serif;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--ink, #1a2e28);
}

.ed-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #5a736c);
}

.ed-queue {
  padding: 0;
  overflow: hidden;
}

.ed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
  background: linear-gradient(180deg, #f8faf9 0%, #fff 100%);
}

.ed-search {
  position: relative;
  flex: 1 1 240px;
}

.ed-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted, #5a736c);
  pointer-events: none;
}

.ed-search input {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2.45rem;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  background: #fbfcfb;
  font: inherit;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-search input:focus {
  outline: none;
  border-color: var(--accent, #0d6b5c);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.1);
}

.ed-perpage select {
  min-width: 110px;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  background: #fbfcfb;
  font: inherit;
  font-size: 0.88rem;
}

.ed-toolbar-meta {
  padding: 0.55rem 1.2rem;
  font-size: 0.82rem;
  color: var(--muted, #5a736c);
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.ed-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

.ed-empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(13, 107, 92, 0.08);
  color: var(--accent, #0d6b5c);
}

.ed-empty-icon svg { width: 2rem; height: 2rem; }

.ed-empty h2 {
  margin: 0 0 0.4rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.5rem;
}

.ed-empty p {
  margin: 0;
  color: var(--muted, #5a736c);
}

.ed-paper-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ed-paper-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
  border-left: 3px solid transparent;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-paper-row:hover {
  background: rgba(243, 246, 244, 0.45);
}

.ed-paper-row.tone-pending { border-left-color: #c4922a; }
.ed-paper-row.tone-review { border-left-color: #2a6cb0; }
.ed-paper-row.tone-ok { border-left-color: #0d6b5c; }
.ed-paper-row.tone-rej { border-left-color: #9b2c2c; }

.ed-paper-id {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted, #5a736c);
  margin-bottom: 0.2rem;
}

.ed-paper-title {
  display: block;
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--ink, #1a2e28);
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.15s ease;
}

.ed-paper-title:hover { color: var(--accent-deep, #085246); }

.ed-paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.45rem;
}

.ed-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink, #1a2e28);
}

.ed-meta-chip.muted { color: var(--muted, #5a736c); }

.ed-meta-chip svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  color: var(--accent, #0d6b5c);
  opacity: 0.75;
}

.ed-paper-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
}

.ed-status-pill {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ed-status-pill.tone-pending { background: rgba(196, 146, 42, 0.14); color: #8a650f; }
.ed-status-pill.tone-review { background: rgba(42, 108, 176, 0.12); color: #1e5a96; }
.ed-status-pill.tone-ok { background: rgba(13, 107, 92, 0.12); color: #085246; }
.ed-status-pill.tone-rej { background: rgba(155, 44, 44, 0.12); color: #9b2c2c; }

.ed-review-btn {
  white-space: nowrap;
  padding: 0.5rem 0.95rem;
  font-size: 0.86rem;
}

.ed-pager { border-top: 1px solid rgba(26, 46, 40, 0.06); }

/* ── Member paper portfolio dashboard ── */
.paper-dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.55rem;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 100% at 0% 0%, rgba(61, 155, 143, 0.14), transparent 50%),
    linear-gradient(165deg, #f3f8f6 0%, #ffffff 55%, #eef6f3 100%);
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 14px 36px -16px rgba(26, 46, 40, 0.12);
}

.paper-dash-hero h1 {
  margin: 0.15rem 0 0.45rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--ink, #1a2e28);
}

.paper-dash-hero h1 em {
  font-style: italic;
  color: var(--accent-deep, #085246);
}

.paper-dash-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.2rem;
  white-space: nowrap;
}

.paper-dash-cta svg { width: 1.15rem; height: 1.15rem; }

.paper-dash-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.paper-dash-stat {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 28px -8px rgba(26, 46, 40, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-dash-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -10px rgba(26, 46, 40, 0.08);
}

.paper-dash-stat.is-active {
  border-color: rgba(13, 107, 92, 0.35);
  box-shadow: inset 0 0 0 2px rgba(13, 107, 92, 0.12);
}

.paper-dash-stat-icon {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(13, 107, 92, 0.09);
  color: var(--accent, #0d6b5c);
}

.paper-dash-stat-icon svg { width: 1.2rem; height: 1.2rem; }

.paper-dash-stat.tone-pending .paper-dash-stat-icon { background: rgba(180, 120, 20, 0.12); color: #a06a10; }
.paper-dash-stat.tone-review .paper-dash-stat-icon { background: rgba(40, 100, 180, 0.1); color: #2a6cb0; }
.paper-dash-stat.tone-ok .paper-dash-stat-icon { background: rgba(13, 107, 92, 0.12); color: #0d6b5c; }
.paper-dash-stat.tone-rej .paper-dash-stat-icon { background: rgba(155, 44, 44, 0.1); color: #9b2c2c; }

.paper-dash-stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.paper-dash-stat-body strong {
  font-family: "Instrument Serif", serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink, #1a2e28);
}

.paper-dash-stat-body small {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #5a736c);
}

.paper-dash-fee-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.1rem;
  margin-bottom: 1.15rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(196, 146, 42, 0.1) 0%, rgba(13, 107, 92, 0.06) 100%);
  border: 1px solid rgba(196, 146, 42, 0.28);
}

.paper-dash-fee-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(196, 146, 42, 0.15);
  color: #8a650f;
}

.paper-dash-fee-icon svg { width: 1.25rem; height: 1.25rem; }

.paper-dash-fee-alert strong {
  display: block;
  color: var(--ink, #1a2e28);
}

.paper-dash-fee-alert p {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #5a736c);
}

.paper-dash-panel {
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
  overflow: hidden;
}

.paper-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
  background: linear-gradient(180deg, #f8faf9 0%, #fff 100%);
}

.paper-dash-search {
  position: relative;
  flex: 1 1 220px;
}

.paper-dash-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted, #5a736c);
  pointer-events: none;
}

.paper-dash-search input,
.paper-dash-perpage select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  background: #fbfcfb;
  font: inherit;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-dash-search input { padding-left: 2.45rem; }

.paper-dash-search input:focus,
.paper-dash-perpage select:focus {
  outline: none;
  border-color: var(--accent, #0d6b5c);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.1);
}

.paper-dash-perpage { min-width: 110px; }

.paper-dash-summary {
  margin: 0;
  padding: 0.55rem 1.15rem;
  font-size: 0.82rem;
  color: var(--muted, #5a736c);
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.paper-dash-empty {
  text-align: center;
  padding: 3.25rem 1.5rem;
}

.paper-dash-empty-visual {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(13, 107, 92, 0.08);
  color: var(--accent, #0d6b5c);
}

.paper-dash-empty-visual svg { width: 2.25rem; height: 2.25rem; }

.paper-dash-empty h2 {
  margin: 0 0 0.4rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.65rem;
}

.paper-dash-empty p {
  margin: 0 0 1.1rem;
  color: var(--muted, #5a736c);
}

.paper-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1.15rem;
}

.paper-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.2rem 1.1rem;
  border-radius: 18px;
  background: #fbfcfb;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 8px 24px -12px rgba(26, 46, 40, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(26, 46, 40, 0.12);
  background: #fff;
}

.paper-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.paper-card-badge {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.paper-card-badge.tone-pending { background: rgba(196, 146, 42, 0.14); color: #8a650f; }
.paper-card-badge.tone-review { background: rgba(42, 108, 176, 0.12); color: #1e5a96; }
.paper-card-badge.tone-ok { background: rgba(13, 107, 92, 0.12); color: #085246; }
.paper-card-badge.tone-rej { background: rgba(155, 44, 44, 0.12); color: #9b2c2c; }

.paper-card-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #5a736c);
}

.paper-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
}

.paper-card-title a {
  color: var(--ink, #1a2e28);
  text-decoration: none;
}

.paper-card-title a:hover { color: var(--accent-deep, #085246); }

.paper-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.paper-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: rgba(13, 107, 92, 0.06);
  font-size: 0.78rem;
  color: var(--ink, #1a2e28);
}

.paper-card-tag svg {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--accent, #0d6b5c);
}

.paper-progress {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0.25rem 0 0;
  padding: 0.55rem 0 0;
  position: relative;
}

.paper-progress::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: calc(0.55rem + 0.35rem);
  height: 2px;
  background: rgba(26, 46, 40, 0.1);
}

.paper-progress li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.paper-progress-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(26, 46, 40, 0.18);
  transition: all 0.2s ease;
}

.paper-progress li.is-done .paper-progress-dot {
  background: var(--accent, #0d6b5c);
  border-color: var(--accent, #0d6b5c);
}

.paper-progress li.is-current .paper-progress-dot {
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.18);
  transform: scale(1.15);
}

.paper-progress li.is-rej .paper-progress-dot {
  background: #9b2c2c;
  border-color: #9b2c2c;
}

.paper-progress-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted, #5a736c);
  letter-spacing: 0.02em;
}

.paper-progress li.is-done .paper-progress-label,
.paper-progress li.is-current .paper-progress-label {
  color: var(--ink, #1a2e28);
}

.paper-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(26, 46, 40, 0.06);
}

.paper-card-next small {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #5a736c);
}

.paper-card-next strong {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink, #1a2e28);
}

@media (max-width: 960px) {
  .ed-stat-grid,
  .paper-dash-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ed-stat-grid,
  .paper-dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ed-paper-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .paper-dash-hero {
    padding: 1.2rem;
  }

  .paper-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Editor v2 — clearer, calmer queue ── */
.ed2 {
  max-width: 1080px;
}

.ed2-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.15rem;
}

.ed2-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #5a736c);
}

.ed2-head h1 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  color: var(--ink, #1a2e28);
}

.ed2-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0;
  padding: 0.7rem 0.9rem;
  list-style: none;
  border-radius: 12px;
  background: #f3f7f5;
  border: 1px solid rgba(26, 46, 40, 0.06);
}

.ed2-flow li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink, #1a2e28);
}

.ed2-flow li span {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent, #0d6b5c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.ed2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 8px 24px -12px rgba(26, 46, 40, 0.08);
}

.ed2-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted, #5a736c);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed2-tab strong {
  font-size: 0.9rem;
  font-weight: 650;
}

.ed2-tab em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(26, 46, 40, 0.06);
  color: var(--ink, #1a2e28);
}

.ed2-tab:hover {
  background: rgba(13, 107, 92, 0.06);
  color: var(--accent-deep, #085246);
}

.ed2-tab.is-active {
  background: linear-gradient(135deg, var(--accent, #0d6b5c) 0%, var(--accent-deep, #085246) 100%);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(13, 107, 92, 0.55);
}

.ed2-tab.is-active em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ed2-panel {
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 30px -5px rgba(26, 46, 40, 0.03);
  overflow: hidden;
}

.ed2-searchbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
  background: #f8faf9;
}

.ed2-search {
  flex: 1 1 220px;
}

.ed2-search input,
.ed2-searchbar select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
}

.ed2-searchbar select { width: auto; min-width: 110px; }

.ed2-search input:focus,
.ed2-searchbar select:focus {
  outline: none;
  border-color: var(--accent, #0d6b5c);
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.1);
}

.ed2-meta {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
  color: var(--muted, #5a736c);
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.ed2-empty {
  text-align: center;
  padding: 2.75rem 1.25rem;
}

.ed2-empty h2 {
  margin: 0 0 0.35rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.45rem;
}

.ed2-empty p {
  margin: 0;
  color: var(--muted, #5a736c);
}

.ed2-empty a { color: var(--accent-deep, #085246); font-weight: 600; }

.ed2-table-wrap { overflow-x: auto; }

.ed2-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.ed2-table th {
  text-align: left;
  padding: 0.7rem 1.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #5a736c);
  background: rgba(248, 250, 249, 0.9);
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
}

.ed2-table td {
  padding: 0.95rem 1.1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
  color: var(--ink, #1a2e28);
}

.ed2-table tbody tr:hover td {
  background: rgba(243, 246, 244, 0.4);
}

.ed2-title {
  display: block;
  font-weight: 650;
  color: var(--ink, #1a2e28);
  text-decoration: none;
  line-height: 1.35;
  max-width: 28rem;
}

.ed2-title:hover { color: var(--accent-deep, #085246); }

.ed2-id {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #5a736c);
}

.ed2-author { display: block; font-weight: 600; }
.ed2-email { display: block; font-size: 0.78rem; color: var(--muted, #5a736c); }
.ed2-date { white-space: nowrap; color: var(--muted, #5a736c); font-size: 0.85rem; }

.ed2-pill {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ed2-pill.tone-pending { background: rgba(196, 146, 42, 0.14); color: #8a650f; }
.ed2-pill.tone-review { background: rgba(42, 108, 176, 0.12); color: #1e5a96; }
.ed2-pill.tone-ok { background: rgba(13, 107, 92, 0.12); color: #085246; }
.ed2-pill.tone-rej { background: rgba(155, 44, 44, 0.12); color: #9b2c2c; }

.ed2-action {
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

.ed2-pager { border-top: 1px solid rgba(26, 46, 40, 0.06); }

/* Detail */
.ed2-back {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}

.ed2-back a {
  color: var(--muted, #5a736c);
  text-decoration: none;
  font-weight: 600;
}

.ed2-back a:hover { color: var(--accent-deep, #085246); }

.ed2-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.15rem;
  align-items: start;
}

.ed2-detail-hero {
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 28px -12px rgba(26, 46, 40, 0.08);
}

.ed2-detail-hero h1 {
  margin: 0.65rem 0 0.4rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.25;
  color: var(--ink, #1a2e28);
}

.ed2-detail-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted, #5a736c);
}

.ed2-card {
  margin-bottom: 0.85rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
}

.ed2-card h2 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #5a736c);
}

.ed2-author-lg {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.ed2-muted {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #5a736c);
}

.ed2-abstract {
  margin: 0;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ed2-coauthors {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed2-coauthors li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.ed2-coauthors li:last-child { border-bottom: 0; }

.ed2-coauthors span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted, #5a736c);
}

.ed2-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(26, 46, 40, 0.05);
}

.ed2-file-row:last-child { border-bottom: 0; }

.ed2-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--accent-deep, #085246);
  text-decoration: none;
}

.ed2-file svg { width: 1rem; height: 1rem; }

.ed2-decide {
  position: sticky;
  top: 1rem;
}

.ed2-decide-card {
  padding: 1.2rem 1.2rem 1.3rem;
  border-radius: 18px;
  background: linear-gradient(165deg, #06231e 0%, #0a3d34 100%);
  color: #e8f5f2;
  box-shadow: 0 18px 40px -18px rgba(6, 35, 30, 0.5);
}

.ed2-decide-card.is-done {
  background: #fff;
  color: var(--ink, #1a2e28);
  border: 1px solid rgba(26, 46, 40, 0.08);
  box-shadow: 0 10px 28px -12px rgba(26, 46, 40, 0.1);
}

.ed2-decide-card h2 {
  margin: 0 0 0.55rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.45rem;
  color: inherit;
}

.ed2-decide-step {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3c4;
}

.ed2-decide-card.is-done .ed2-decide-step,
.ed2-decide-card.is-done .ed2-decide-help {
  color: var(--muted, #5a736c);
}

.ed2-decide-help {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(232, 245, 242, 0.8);
}

.ed2-notes span { color: rgba(232, 245, 242, 0.75); }

.ed2-notes textarea {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.ed2-notes textarea:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #7dd3c4;
  box-shadow: 0 0 0 4px rgba(125, 211, 196, 0.15);
}

.ed2-decide-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.ed2-full { width: 100%; justify-content: center; }

.ed2-or {
  margin: 0.15rem 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 245, 242, 0.45);
}

.ed2-decide-card .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ed2-decide-card .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ed2-danger {
  color: #fecaca !important;
  border-color: rgba(254, 202, 202, 0.35) !important;
}

.ed2-notes-readonly {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #f8faf9;
}

.ed2-notes-readonly strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #5a736c);
}

.ed2-notes-readonly p { margin: 0; font-size: 0.9rem; }

@media (max-width: 900px) {
  .ed2-detail-grid {
    grid-template-columns: 1fr;
  }

  .ed2-decide { position: static; }
}

@media (max-width: 720px) {
  .ed2-table th:nth-child(3),
  .ed2-table td:nth-child(3),
  .ed2-table th:nth-child(5),
  .ed2-table td:nth-child(5) {
    display: none;
  }

  .ed2-flow { width: 100%; }
}

/* Paper payment (approved → pay) */
.paper-pay-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.45rem;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(61, 155, 143, 0.22), transparent 55%),
    linear-gradient(145deg, #06231e 0%, #0a3d34 55%, #085246 100%);
  color: #e8f5f2;
  box-shadow: 0 18px 40px -18px rgba(6, 35, 30, 0.5);
}

.paper-pay-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7dd3c4;
}

.paper-pay-hero h2 {
  margin: 0 0 0.4rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.75rem;
  color: #fff;
}

.paper-pay-hero-copy > p {
  margin: 0 0 1rem;
  max-width: 32rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(232, 245, 242, 0.8);
}

.paper-pay-amount {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin: 0;
}

.paper-pay-amount dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 245, 242, 0.55);
}

.paper-pay-amount dd {
  margin: 0.15rem 0 0;
  font-family: "Instrument Serif", serif;
  font-size: 1.65rem;
  color: #fff;
}

.paper-pay-hero-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  min-width: min(100%, 260px);
}

.paper-pay-test-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(232, 245, 242, 0.7);
}

.paper-pay-btn {
  width: 100%;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  font-size: 1.02rem;
}

.paper-pay-secure {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 245, 242, 0.45);
}

.paper-pay-settled {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1.15rem;
  padding: 0.9rem 1.15rem;
  border-radius: 14px;
  background: rgba(13, 107, 92, 0.08);
  border: 1px solid rgba(13, 107, 92, 0.18);
  color: var(--ink, #1a2e28);
}

.paper-pay-settled strong { color: var(--accent-deep, #085246); }
.paper-pay-settled span { font-size: 0.9rem; color: var(--muted, #5a736c); }

/* Editor sidebar profile */
.ed-side-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.85rem 0.9rem 0.35rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-side-profile:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.ed-side-avatar {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #3d9b8f 0%, #0d6b5c 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ed-side-profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ed-side-profile-text strong {
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-side-profile-text small {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-side-foot .ed-side-contact {
  margin-bottom: 0.75rem;
}

.ed-side-contact-name {
  margin: 0 0 0.25rem;
  font-weight: 650;
  color: #fff;
}

.ed-side-contact p {
  margin: 0.15rem 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  word-break: break-all;
}

.ed-side-contact a {
  color: #7dd3c4;
  text-decoration: none;
}

.ed-side-contact a:hover { text-decoration: underline; }

.ed-side-missing a { color: #fbbf24; }

.ed-side-user {
  opacity: 0.7;
}

/* Editor profile page */
.ed2-profile-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.ed2-profile-card {
  padding: 1.4rem 1.25rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(26, 46, 40, 0.07);
  box-shadow: 0 10px 28px -12px rgba(26, 46, 40, 0.08);
  text-align: center;
}

.ed2-profile-avatar {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #0d6b5c 0%, #085246 100%);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.ed2-profile-card h2 {
  margin: 0 0 0.2rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink, #1a2e28);
}

.ed2-profile-role {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #0d6b5c);
}

.ed2-profile-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.ed2-profile-facts li {
  padding: 0.65rem 0;
  border-top: 1px solid rgba(26, 46, 40, 0.06);
}

.ed2-profile-facts span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #5a736c);
}

.ed2-profile-facts strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink, #1a2e28);
  word-break: break-word;
}

.ed2-profile-form-wrap { padding: 1.25rem 1.35rem 1.5rem; }

.ed2-form-title {
  margin: 0 0 0.3rem;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink, #1a2e28);
}

.ed2-form-sub {
  margin: 1.35rem 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink, #1a2e28);
}

.ed2-form-lede {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted, #5a736c);
}

.ed2-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.ed2-profile-form .field { margin-bottom: 0.85rem; }

.ed2-profile-form .field input:disabled {
  opacity: 0.7;
  background: #f3f6f4;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .ed2-profile-grid { grid-template-columns: 1fr; }
  .ed2-form-row { grid-template-columns: 1fr; }
}

.ed2-type-filter select {
  min-width: 140px;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(26, 46, 40, 0.15);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
}

.ed2-type-filter select:focus {
  outline: none;
  border-color: var(--accent, #0d6b5c);
  box-shadow: 0 0 0 4px rgba(13, 107, 92, 0.1);
}

.ed-side-avatar-img {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(125, 211, 196, 0.45);
}

.ed2-profile-photo {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 0.85rem;
  display: block;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px -12px rgba(13, 107, 92, 0.45);
}

.ed2-photo-block {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(26, 46, 40, 0.06);
}

/* Member activity timeline in the admin console */
.member-activity-list {
  display: grid;
  border-top: 1px solid rgba(26, 46, 40, 0.09);
}

.member-activity-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(26, 46, 40, 0.09);
}

.member-activity-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.member-activity-item time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
}
