    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-size: 15px;
      background: #fafafa;
      color: #333;
      height: 100vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .body-row {
      flex: 1;
      display: flex;
      min-height: 0;
    }

    /* ══════════════════════════════════════
       LOGIN PAGE
       ══════════════════════════════════════ */
    .login-page {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: flex;
      align-items: stretch;
    }
    .login-page.hidden { display: none; }
    .login-container {
      display: flex;
      align-items: stretch;
      width: 100%;
      min-height: 100vh;
      animation: login-appear 0.5s cubic-bezier(0.16,1,0.3,1);
    }
    @keyframes login-appear {
      0% { opacity: 0; transform: translateY(24px) scale(0.97); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .login-left {
      flex: 1;
      padding: 56px 64px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      background: #fff;
      max-width: 480px;
    }
    .login-logo {
      margin-bottom: 32px;
    }
    .login-logo img {
      height: 48px;
      width: auto;
    }
    .login-heading {
      font-size: 1.6rem;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 6px;
    }
    .login-subtext {
      font-size: 0.93rem;
      color: #64748b;
      margin-bottom: 28px;
    }
    .login-field {
      margin-bottom: 18px;
    }
    .login-field label {
      display: block;
      font-size: 0.82rem;
      font-weight: 600;
      color: #475569;
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }
    .login-field .input-wrap {
      position: relative;
    }
    .login-field input {
      width: 100%;
      padding: 11px 14px;
      border: 1.5px solid #d1d5db;
      border-radius: 8px;
      font-size: 0.95rem;
      font-family: inherit;
      color: #333;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .login-field input:focus {
      border-color: #0066b3;
      box-shadow: 0 0 0 3px rgba(0,102,179,0.08);
    }
    .login-field input.has-error {
      border-color: #e74c3c;
    }
    .eye-toggle {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: #94a3b8;
      font-size: 1.1rem;
      padding: 2px;
    }
    .eye-toggle:hover { color: #64748b; }
    .login-error {
      display: none;
      background: #fef2f2;
      border: 1px solid #fecaca;
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 0.88rem;
      color: #dc2626;
      margin-bottom: 16px;
      animation: shake 0.3s ease;
    }
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-4px); }
      75% { transform: translateX(4px); }
    }
    .login-error.show { display: block; }
    .login-btn {
      width: 100%;
      padding: 12px;
      background: #0066b3;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.2s, transform 0.1s;
    }
    .login-btn:hover { background: #005599; }
    .login-btn:active { transform: scale(0.98); }
    .login-btn:disabled {
      background: #94a3b8;
      cursor: not-allowed;
    }
    .login-btn .spinner {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255,255,255,0.3);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
      vertical-align: middle;
      margin-right: 8px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .login-right {
      flex: 1;
      background: linear-gradient(160deg, #0066b3, #004a85);
      color: #fff;
      padding: 64px 56px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      order: -1;
    }
    .login-right-title {
      font-size: 1.15rem;
      font-weight: 700;
      margin-bottom: 24px;
      opacity: 0.95;
    }
    .feature-item {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 20px;
      opacity: 0;
      animation: feature-in 0.4s ease forwards;
    }
    .feature-item:nth-child(2) { animation-delay: 0.1s; }
    .feature-item:nth-child(3) { animation-delay: 0.2s; }
    .feature-item:nth-child(4) { animation-delay: 0.3s; }
    .feature-item:nth-child(5) { animation-delay: 0.4s; }
    @keyframes feature-in {
      0% { opacity: 0; transform: translateX(-12px); }
      100% { opacity: 1; transform: translateX(0); }
    }
    .feature-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: rgba(255,255,255,0.15);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .feature-icon svg {
      width: 16px;
      height: 16px;
      stroke: #fff;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .feature-text {
      font-size: 0.88rem;
      line-height: 1.4;
      opacity: 0.9;
    }
    .feature-text strong { display: block; font-weight: 600; opacity: 1; margin-bottom: 2px; }

    @media (max-width: 768px) {
      .login-container { flex-direction: column; }
      .login-right { order: -1; padding: 32px 24px; min-height: auto; }
      .login-left { max-width: 100%; padding: 32px 24px; flex: 0; }
      .login-right-title { font-size: 1.05rem; margin-bottom: 16px; }
      .feature-item { margin-bottom: 12px; }
    }

    /* ══════════════════════════════════════
       LEFT SIDEBAR
       ══════════════════════════════════════ */
    .sidebar {
      width: 56px;
      background: #0066b3;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px 0;
      flex-shrink: 0;
    }
    .sidebar-icons {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
      padding-top: 8px;
    }
    .sidebar-icon {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s;
      position: relative;
    }
    .sidebar-icon:hover { background: rgba(255,255,255,0.15); }
    .sidebar-icon.active { background: rgba(255,255,255,0.2); }
    .sidebar-icon svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: rgba(255,255,255,0.8);
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .sidebar-icon.active svg { stroke: #fff; }
    .sidebar-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 2px solid rgba(255,255,255,0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 600;
      color: #fff;
      margin-top: auto;
      cursor: pointer;
      transition: border-color 0.15s, transform 0.15s;
      overflow: hidden;
      background: rgba(255,255,255,0.15);
    }
    .sidebar-avatar:hover { border-color: #fff; transform: scale(1.08); }
    .sidebar-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* ── Sidebar popover ── */
    .sidebar-popover {
      position: fixed;
      left: 62px;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
      min-width: 210px;
      padding: 6px 0;
      z-index: 5000;
      display: none;
      animation: pop-in 0.2s cubic-bezier(0.16,1,0.3,1);
    }
    .sidebar-popover.show { display: block; }
    @keyframes pop-in {
      0% { opacity: 0; transform: translateX(-6px) scale(0.95); }
      100% { opacity: 1; transform: translateX(0) scale(1); }
    }
    .popover-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 16px;
      font-size: 0.9rem;
      color: #334155;
      cursor: pointer;
      transition: background 0.1s;
      white-space: nowrap;
    }
    .popover-item:hover { background: #f1f5f9; }
    .popover-item svg {
      width: 16px;
      height: 16px;
      stroke: #64748b;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .popover-divider {
      height: 1px;
      background: #e5e7eb;
      margin: 4px 0;
    }
    .popover-header {
      padding: 10px 16px 6px;
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: #94a3b8;
    }

    /* ── Profile popup (bottom-left) ── */
    .profile-popup {
      position: fixed;
      left: 62px;
      bottom: 16px;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
      min-width: 220px;
      padding: 6px 0;
      z-index: 5000;
      display: none;
      animation: pop-in 0.2s cubic-bezier(0.16,1,0.3,1);
    }
    .profile-popup.show { display: block; }
    .profile-popup .popover-item.danger { color: #dc2626; }
    .profile-popup .popover-item.danger svg { stroke: #dc2626; }

    /* ══════════════════════════════════════
       MAIN AREA
       ══════════════════════════════════════ */
    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    /* ── Top header bar ── */
    .top-bar {
      background: #fff;
      border-bottom: 1px solid #ddd;
      padding: 0 24px;
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .top-bar-left {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .tma-logo {
      display: flex;
      align-items: center;
      text-decoration: none;
      flex-shrink: 0;
    }
    .tma-logo img {
      height: 38px;
      width: auto;
      object-fit: contain;
    }
    .header-divider {
      width: 1px;
      height: 28px;
      background: #ddd;
      flex-shrink: 0;
    }
    .back-link {
      display: flex;
      align-items: center;
      gap: 4px;
      color: #555;
      text-decoration: none;
      font-size: 0.93rem;
    }
    .back-link:hover { color: #0066b3; }
    .back-link svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }
    .guideline-title {
      font-size: 1.05rem;
      font-weight: 600;
      color: #333;
    }
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #22c55e;
      display: inline-block;
      margin-left: 6px;
    }

    /* ── Tab bar ── */
    .tab-bar {
      background: #fff;
      border-bottom: 1px solid #ddd;
      display: flex;
      padding: 0 24px;
      flex-shrink: 0;
    }
    .tab {
      padding: 12px 24px;
      font-size: 0.93rem;
      font-family: inherit;
      color: #0066b3;
      text-decoration: none;
      border-bottom: 3px solid transparent;
      transition: all 0.15s;
      cursor: pointer;
      white-space: nowrap;
    }
    .tab:hover { background: #f0f7ff; }
    .tab.active {
      color: #0066b3;
      font-weight: 600;
      border-bottom-color: #0066b3;
    }

    /* ── Content area ── */
    .content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }

    /* ── Config bar ── */
    .config-bar {
      background: #fff;
      border-bottom: 1px solid #ddd;
      padding: 10px 24px;
      display: flex;
      align-items: flex-end;
      gap: 14px;
      flex-wrap: wrap;
      flex-shrink: 0;
    }
    .config-bar .field { display: flex; flex-direction: column; gap: 3px; }
    .config-bar label {
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: #888;
    }
    .config-bar input, .config-bar select {
      padding: 6px 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 0.88rem;
      font-family: inherit;
      outline: none;
      background: #fff;
      color: #333;
    }
    .config-bar input:focus, .config-bar select:focus {
      border-color: #0066b3;
    }
    .config-bar input[type="color"] {
      width: 34px; height: 32px; padding: 2px; cursor: pointer; border-radius: 4px;
    }
    .config-bar .btn-load {
      padding: 6px 18px;
      background: #0066b3;
      color: #fff;
      border: none;
      border-radius: 4px;
      font-size: 0.88rem;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.15s;
    }
    .config-bar .btn-load:hover { background: #005599; }

    /* ── Iframe ── */
    .editor-frame {
      flex: 1;
      position: relative;
    }
    .editor-frame iframe {
      width: 100%;
      height: 100%;
      border: none;
      display: block;
      position: absolute;
      top: 0;
      left: 0;
    }

    /* ── Footer ── */
    .footer-bar {
      background: #fff;
      border-top: 1px solid #ddd;
      padding: 6px 24px;
      font-size: 0.75rem;
      color: #999;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* ── Toast animations ── */
    @keyframes toast-slide-in {
      0% { transform: translateX(100%); opacity: 0; }
      100% { transform: translateX(0); opacity: 1; }
    }
    @keyframes toast-slide-out {
      0% { transform: translateX(0); opacity: 1; }
      100% { transform: translateX(100%); opacity: 0; }
    }

    /* ── WIP overlay ── */
    .wip-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(245,249,255,0.96));
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      animation: wip-bg-in 0.5s ease;
    }
    @keyframes wip-bg-in { 0% { opacity: 0; } 100% { opacity: 1; } }
    .wip-card { text-align: center; padding: 48px 56px; max-width: 440px; }
    .wip-icon {
      width: 72px; height: 72px; border-radius: 50%;
      background: linear-gradient(135deg, #e0f0ff, #c7e2ff);
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 22px;
      animation: wip-icon-in 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s both;
    }
    @keyframes wip-icon-in {
      0% { opacity: 0; transform: scale(0.5) translateY(12px); }
      100% { opacity: 1; transform: scale(1) translateY(0); }
    }
    .wip-icon svg {
      width: 30px; height: 30px; stroke: #0066b3; fill: none;
      stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
      animation: wip-icon-pulse 3s ease-in-out infinite;
    }
    @keyframes wip-icon-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
    .wip-title {
      font-size: 1.2rem; font-weight: 700; color: #1e293b; margin-bottom: 10px;
      animation: wip-text-in 0.5s cubic-bezier(0.16,1,0.3,1) 0.2s both;
    }
    .wip-message {
      font-size: 0.93rem; color: #64748b; line-height: 1.6; margin-bottom: 22px;
      animation: wip-text-in 0.5s cubic-bezier(0.16,1,0.3,1) 0.3s both;
    }
    .wip-badge {
      display: inline-block; padding: 6px 18px;
      background: linear-gradient(135deg, #f0f7ff, #e8f2ff);
      border: 1px solid #c7deff; border-radius: 20px;
      font-size: 0.82rem; font-weight: 600; color: #0066b3; letter-spacing: 0.3px;
      animation: wip-text-in 0.5s cubic-bezier(0.16,1,0.3,1) 0.4s both;
    }
    @keyframes wip-text-in {
      0% { opacity: 0; transform: translateY(16px); }
      100% { opacity: 1; transform: translateY(0); }
    }

    /* ── Change Password Modal ── */
    .modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 8000;
      display: none; align-items: center; justify-content: center;
      animation: wip-bg-in 0.2s ease;
    }
    .modal-overlay.show { display: flex; }
    .modal-card {
      background: #fff; border-radius: 12px; padding: 32px; width: 400px; max-width: 92%;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
      animation: login-appear 0.3s cubic-bezier(0.16,1,0.3,1);
    }
    .modal-card h3 { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin-bottom: 20px; }
    .modal-card .login-field { margin-bottom: 14px; }
    .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
    .modal-actions button {
      padding: 8px 20px; border-radius: 6px; font-size: 0.9rem; font-weight: 500;
      font-family: inherit; cursor: pointer; transition: background 0.15s;
    }
    .btn-cancel { background: #f1f5f9; border: 1px solid #d1d5db; color: #475569; }
    .btn-cancel:hover { background: #e2e8f0; }
    .btn-save { background: #0066b3; border: none; color: #fff; }
    .btn-save:hover { background: #005599; }

    /* ── Editor loading shimmer ── */
    .loading-shimmer {
      position: absolute;
      inset: 0;
      background: #fff;
      z-index: 5;
      display: flex;
      flex-direction: column;
      padding: 20px 24px;
      animation: wip-bg-in 0.3s ease;
    }
    .shimmer-toolbar {
      display: flex;
      gap: 6px;
      padding: 10px 0 14px;
      border-bottom: 1px solid #eee;
      margin-bottom: 20px;
    }
    .shimmer-btn {
      width: 28px;
      height: 28px;
      border-radius: 4px;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: shimmer-move 1.5s ease-in-out infinite;
    }
    .shimmer-divider {
      width: 1px;
      height: 28px;
      background: #eee;
      margin: 0 4px;
    }
    .shimmer-body { flex: 1; padding: 8px 40px; }
    .shimmer-line {
      height: 14px;
      border-radius: 4px;
      margin-bottom: 12px;
      background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: shimmer-move 1.5s ease-in-out infinite;
    }
    .shimmer-line:nth-child(odd) { width: 100%; }
    .shimmer-line:nth-child(even) { width: 75%; }
    .shimmer-line:nth-child(3n) { width: 60%; }
    .shimmer-line.short { width: 40%; }
    .shimmer-line.heading {
      height: 20px;
      width: 55%;
      margin-bottom: 18px;
      margin-top: 24px;
    }
    .shimmer-paragraph-gap { height: 16px; }
    @keyframes shimmer-move {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .shimmer-status {
      text-align: center;
      padding-top: 16px;
      font-size: 0.82rem;
      color: #94a3b8;
      animation: wip-text-in 0.4s ease 0.3s both;
    }

    /* ── Personal Details Modal ── */
    .pd-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px 20px;
    }
    .pd-grid .full-width { grid-column: 1 / -1; }
    .pd-field label {
      display: block; font-size: 0.78rem; font-weight: 600; color: #64748b;
      text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px;
    }
    .pd-field .pd-value {
      font-size: 0.93rem; color: #1e293b; padding: 6px 0;
    }

    /* ══════════════════════════════════════
       REFERENCES PANEL
       ══════════════════════════════════════ */
    .refs-panel {
      position: absolute; inset: 0; background: #fff; z-index: 10;
      display: flex; flex-direction: column; overflow: hidden;
    }
    .refs-scroll {
      flex: 1; overflow-y: auto; padding: 24px 28px 12px;
      min-height: 0;
    }
    /* Guidelines landing page */
    .gl-landing-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 18px;
    }
    .gl-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
    .gl-table th {
      text-align: left; padding: 10px 12px; background: #f8fafc;
      border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569;
      white-space: nowrap; cursor: pointer; user-select: none;
    }
    .gl-table th:hover { color: #0066b3; }
    .gl-table td {
      padding: 12px; border-bottom: 1px solid #f1f5f9;
      vertical-align: middle; color: #334155; line-height: 1.5;
    }
    .gl-table tbody tr { cursor: pointer; }
    .gl-table tbody tr:hover td { background: #f1f5f9 !important; transition: background 0.15s; }
    .gl-table .col-sr { width: 50px; text-align: center; }
    .gl-table .col-status { width: 100px; }
    .gl-table .col-year { width: 80px; }
    .gl-table .col-versions { width: 80px; text-align: center; }
    .gl-table .col-actions { width: 180px; white-space: nowrap; }
    .gl-table .gl-title { font-weight: 600; color: #1e293b; }
    .gl-table .gl-role { font-size: 0.72rem; color: #64748b; margin-top: 2px; }
    .gl-btn {
      padding: 5px 14px; border: none; border-radius: 4px;
      font-size: 0.78rem; font-weight: 600; font-family: inherit;
      cursor: pointer; transition: background 0.15s; display: inline-flex;
      align-items: center; gap: 4px;
    }
    .gl-btn:active { transform: scale(0.96); }
    .gl-btn-open { background: #0066b3; color: #fff; }
    .gl-btn-open:hover { background: #005599; }
    .gl-btn-refs { background: #1e3a5f; color: #fff; }
    .gl-btn-refs:hover { background: #162d4a; }
    .gl-status-badge {
      display: inline-block; padding: 2px 8px; border-radius: 10px;
      font-size: 0.75rem; font-weight: 600;
    }
    .gl-status-current { background: #dcfce7; color: #166534; }
    .gl-status-planned { background: #dbeafe; color: #1e40af; }
    .gl-status-ongoing { background: #fef3c7; color: #92400e; }
    .gl-status-review { background: #ede9fe; color: #5b21b6; }

    /* Transitions between landing and editor */
    #guidelines-landing, #editor-area {
      transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .gl-fade-in { animation: glFadeIn 0.25s ease; }
    @keyframes glFadeIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
    .gl-fade-in-right { animation: glFadeInRight 0.25s ease; }
    @keyframes glFadeInRight { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

    .refs-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 18px;
    }
    .refs-header-left { display: flex; align-items: center; gap: 12px; }
    .refs-header-left label { font-size: 0.88rem; color: #555; }
    .refs-header-left select {
      padding: 5px 8px; border: 1px solid #ccc; border-radius: 4px;
      font-size: 0.85rem; font-family: inherit;
    }
    .refs-search-wrap {
      position: relative; display: inline-flex; align-items: center;
    }
    .refs-search {
      padding: 7px 32px 7px 12px; border: 1px solid #ccc; border-radius: 6px;
      font-size: 0.88rem; font-family: inherit; width: 320px; outline: none;
    }
    .refs-search:focus { border-color: #0066b3; box-shadow: 0 0 0 2px rgba(0,102,179,0.08); }
    .refs-search-clear {
      position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
      width: 18px; height: 18px; border-radius: 50%; background: #e2e8f0;
      border: none; cursor: pointer; display: none; align-items: center;
      justify-content: center; font-size: 11px; color: #64748b; line-height: 1;
      padding: 0;
    }
    .refs-search-clear:hover { background: #cbd5e1; }
    .refs-search:not(:placeholder-shown) + .refs-search-clear { display: flex; }
    .btn-add-ref {
      padding: 8px 18px; background: #0066b3; color: #fff; border: none;
      border-radius: 6px; font-size: 0.88rem; font-weight: 600;
      font-family: inherit; cursor: pointer; transition: background 0.15s;
      display: flex; align-items: center; gap: 6px;
    }
    .btn-add-ref:hover { background: #005599; }

    .refs-table {
      width: 100%; border-collapse: collapse; font-size: 0.88rem;
    }
    .refs-table th {
      text-align: left; padding: 10px 12px; background: #f8fafc;
      border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569;
      white-space: nowrap; cursor: pointer; user-select: none;
    }
    .refs-table th:hover { color: #0066b3; }
    .refs-table td {
      padding: 12px; border-bottom: 1px solid #f1f5f9;
      vertical-align: top; color: #334155; line-height: 1.5;
    }
    .refs-table tr:hover td { background: #f8fafc; }
    .refs-table .col-sr { width: 60px; text-align: center; }
    .refs-table .col-year { width: 60px; }
    .refs-table .col-doi { width: 180px; word-break: break-all; }
    .refs-table .col-actions { width: 280px; white-space: nowrap; }
    .refs-table .citation-text { font-size: 0.86rem; line-height: 1.55; }

    .ref-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
    .ref-btn {
      padding: 5px 12px; border: none; border-radius: 4px;
      font-size: 0.78rem; font-weight: 600; font-family: inherit;
      cursor: pointer; transition: background 0.15s, transform 0.1s;
      display: inline-flex; align-items: center; gap: 4px;
    }
    .ref-btn:active { transform: scale(0.96); }
    .ref-btn-profile { background: #0066b3; color: #fff; }
    .ref-btn-profile:hover { background: #005599; }
    .ref-btn-pdf { background: #1e3a5f; color: #fff; }
    .ref-btn-pdf:hover { background: #162d4a; }
    .ref-btn-icon {
      width: 28px; height: 28px; border-radius: 4px; background: #f1f5f9;
      border: 1px solid #e2e8f0; display: flex; align-items: center;
      justify-content: center; cursor: pointer; transition: background 0.15s;
    }
    .ref-btn-icon:hover { background: #e2e8f0; }
    .ref-btn-icon svg {
      width: 14px; height: 14px; stroke: #64748b; fill: none;
      stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    }
    .ref-btn-delete { border-color: #fecaca; }
    .ref-btn-delete svg { stroke: #dc2626; }
    .ref-btn-delete:hover { background: #fef2f2; }

    .refs-footer {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 28px; font-size: 0.85rem; color: #64748b;
      border-top: 1px solid #e2e8f0; background: #fff; flex-shrink: 0;
    }
    .refs-pagination { display: flex; gap: 4px; }
    .refs-pagination button {
      padding: 5px 10px; border: 1px solid #d1d5db; border-radius: 4px;
      background: #fff; font-size: 0.82rem; font-family: inherit;
      cursor: pointer; transition: background 0.15s;
    }
    .refs-pagination button:hover { background: #f1f5f9; }
    .refs-pagination button.active {
      background: #0066b3; color: #fff; border-color: #0066b3;
    }
    .refs-pagination button:disabled { opacity: 0.5; cursor: default; }

    /* Reference profile view */
    .ref-profile { padding: 0; }
    .ref-profile-header {
      display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
    }
    .ref-profile-back {
      display: flex; align-items: center; gap: 4px; color: #555;
      text-decoration: none; font-size: 0.93rem; cursor: pointer;
      transition: color 0.15s; background: none; border: none; font-family: inherit;
    }
    .ref-profile-back:hover { color: #0066b3; }
    .ref-profile-back svg {
      width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2;
    }
    .ref-profile-title {
      font-size: 1.05rem; font-weight: 600; color: #1e293b;
    }
    .ref-detail-table {
      width: 100%; max-width: 720px; border-collapse: collapse;
    }
    .ref-detail-table td {
      padding: 12px 16px; border-bottom: 1px solid #f1f5f9;
      vertical-align: top;
    }
    .ref-detail-table .detail-label {
      font-weight: 600; color: #334155; width: 200px; white-space: nowrap;
    }
    .ref-detail-table .detail-value {
      background: #f8fafc; border-radius: 4px; padding: 8px 12px;
      color: #1e293b; font-size: 0.93rem;
    }
    .author-divider {
      border-top: 1px solid #e2e8f0; margin: 12px 0;
    }

    /* Empty / loading state */
    .refs-empty {
      text-align: center; padding: 48px; color: #94a3b8; font-size: 0.93rem;
    }
    .refs-shimmer {
      height: 18px; border-radius: 4px;
      background: linear-gradient(90deg, #f1f5f9 25%, #e8ecf1 50%, #f1f5f9 75%);
      background-size: 200% 100%;
      animation: refs-shimmer 1.5s ease-in-out infinite;
    }
    @keyframes refs-shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    @keyframes refLoad {
      0% { width: 10%; margin-left: 0; }
      50% { width: 40%; margin-left: 30%; }
      100% { width: 10%; margin-left: 90%; }
    }

    /* Sort indicators */
    .refs-table th .sort-icon { font-size: 0.7rem; margin-left: 4px; opacity: 0.3; }
    .refs-table th.sort-active .sort-icon { opacity: 1; color: #0066b3; }

    /* PDF Viewer */
    .ref-pdf-viewer {
      display: flex; flex-direction: column; flex: 1; min-height: 0;
    }
    .ref-pdf-header {
      display: flex; align-items: center; gap: 12px; padding: 14px 24px;
      border-bottom: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0;
    }
    .ref-pdf-title {
      font-size: 1rem; font-weight: 600; color: #1e293b;
    }
    .ref-pdf-frame {
      flex: 1; border: none; width: 100%; min-height: 0;
    }

    /* ═══════════════════════════════════════
       PEER REVIEW (v2.11.0 P1)
       ═══════════════════════════════════════ */

    /* v2.11.1 — horizontal progress bar (loading indicator). Visible only
       while the containing .pr-modal-card has the .pr-loading class. */
    .pr-progress-bar {
      position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: transparent; overflow: hidden; z-index: 2;
      opacity: 0; transition: opacity 0.15s ease;
    }
    .pr-loading .pr-progress-bar { opacity: 1; }
    .pr-progress-fill {
      height: 100%; width: 30%; background: #0066b3; border-radius: 0 3px 3px 0;
      animation: refLoad 1.2s ease-in-out infinite;
    }

    .pr-modal-card { position: relative; }
    .pr-modal-card {
      width: 720px; max-width: 94vw; padding: 0;
      display: flex; flex-direction: column; max-height: 88vh;
    }
    .pr-modal-loading { padding: 48px; text-align: center; color: #64748b; font-size: 0.92rem; }

    .pr-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 20px 24px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
    }
    .pr-header-left { display: flex; align-items: center; gap: 12px; }
    .pr-title { font-size: 1.05rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
    .pr-subtitle { font-size: 0.82rem; color: #64748b; margin-top: 2px; }
    .pr-back-btn {
      background: none; border: none; color: #0066b3; font-size: 0.9rem;
      cursor: pointer; padding: 4px 6px; border-radius: 4px;
    }
    .pr-back-btn:hover { background: #f1f5f9; }
    .pr-close-btn {
      background: none; border: none; font-size: 1.4rem;
      cursor: pointer; color: #94a3b8; padding: 0 6px; line-height: 1;
    }
    .pr-close-btn:hover { color: #475569; }

    .pr-toolbar {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 24px; border-bottom: 1px solid #f1f5f9; gap: 12px; flex-wrap: wrap;
    }
    .pr-filter-tabs { display: flex; gap: 4px; }
    .pr-tab {
      background: none; border: none; padding: 6px 12px; border-radius: 6px;
      font-size: 0.82rem; color: #64748b; cursor: pointer; font-family: inherit;
    }
    .pr-tab:hover { background: #f1f5f9; color: #1e293b; }
    .pr-tab-active { background: #eff6ff; color: #0066b3; font-weight: 600; }

    .pr-btn {
      padding: 7px 14px; border-radius: 6px; font-size: 0.87rem; font-weight: 500;
      font-family: inherit; cursor: pointer; border: 1px solid transparent;
      transition: background 0.15s, border-color 0.15s;
    }
    .pr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .pr-btn-primary { background: #0066b3; color: #fff; }
    .pr-btn-primary:hover:not(:disabled) { background: #005599; }
    .pr-btn-secondary {
      background: #f1f5f9; color: #1e293b; border-color: #e2e8f0;
    }
    .pr-btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
    .pr-btn-danger { background: #dc2626; color: #fff; }
    .pr-btn-danger:hover:not(:disabled) { background: #b91c1c; }
    .pr-btn-remove {
      background: none; border: none; color: #94a3b8; font-size: 1rem;
      cursor: pointer; padding: 2px 6px; border-radius: 4px;
    }
    .pr-btn-remove:disabled { cursor: not-allowed; opacity: 0.35; }
    .pr-btn-remove:hover:not(:disabled) { background: #fee2e2; color: #dc2626; }

    .pr-empty-state {
      padding: 48px 24px; text-align: center; color: #64748b;
      font-size: 0.9rem; line-height: 1.5;
    }
    .pr-empty-hint { display: inline-block; margin-top: 12px; color: #94a3b8; font-size: 0.85rem; }
    .pr-empty-cell { text-align: center; color: #94a3b8; padding: 20px; font-size: 0.88rem; }

    .pr-session-rows { overflow-y: auto; padding: 8px 0; flex: 1; }
    .pr-session-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 24px; border-bottom: 1px solid #f1f5f9; gap: 16px;
    }
    .pr-session-row:hover { background: #fafbfc; }
    .pr-session-row-main { flex: 1; min-width: 0; }
    .pr-session-title { font-weight: 600; color: #1e293b; margin-bottom: 4px; }
    .pr-session-meta {
      display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
      font-size: 0.82rem; color: #64748b;
    }
    .pr-session-participants::before { content: '· '; color: #cbd5e1; }
    .pr-session-deadline em { color: #475569; font-style: normal; }

    .pr-status-pill {
      display: inline-block; padding: 2px 10px; border-radius: 999px;
      font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
    }
    .pr-status-open    { background: #dcfce7; color: #166534; }
    .pr-status-closed  { background: #e2e8f0; color: #475569; }
    .pr-status-expired { background: #fee2e2; color: #991b1b; }

    .pr-form { padding: 20px 24px; overflow-y: auto; flex: 1; }
    .pr-form-field { margin-bottom: 18px; }
    .pr-form-field label {
      display: block; font-size: 0.85rem; font-weight: 600; color: #374151;
      margin-bottom: 6px;
    }
    .pr-form-field input[type="text"],
    .pr-form-field input[type="datetime-local"],
    .pr-form-field select,
    .pr-form-field textarea {
      width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px;
      font-size: 0.9rem; font-family: inherit; box-sizing: border-box;
      background: #fff; color: #1e293b;
    }
    .pr-form-field input:focus, .pr-form-field select:focus, .pr-form-field textarea:focus {
      outline: none; border-color: #0066b3; box-shadow: 0 0 0 3px rgba(0,102,179,0.12);
    }
    .pr-form-hint { margin-top: 6px; font-size: 0.78rem; color: #94a3b8; }
    .pr-optional { color: #94a3b8; font-weight: 400; font-size: 0.78rem; }

    .pr-deadline-row { display: flex; gap: 8px; align-items: center; }
    .pr-deadline-row input { flex: 1; }
    .pr-deadline-presets { display: flex; gap: 4px; }
    .pr-deadline-presets button {
      background: #f1f5f9; border: 1px solid #e2e8f0; padding: 8px 10px;
      border-radius: 6px; font-size: 0.78rem; cursor: pointer; color: #475569;
      font-family: inherit;
    }
    .pr-deadline-presets button:hover { background: #e2e8f0; }

    .pr-reviewer-pills {
      display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 4px;
    }
    .pr-reviewer-pill {
      display: inline-flex; align-items: center; gap: 6px;
      background: #eff6ff; color: #0066b3; padding: 4px 8px 4px 10px;
      border-radius: 999px; font-size: 0.82rem; border: 1px solid #bfdbfe;
    }
    .pr-reviewer-email { color: #64748b; font-size: 0.74rem; }
    .pr-pill-remove {
      background: none; border: none; color: #0066b3; cursor: pointer;
      padding: 0 4px; font-size: 1rem; line-height: 1;
    }
    .pr-pill-remove:hover { color: #dc2626; }

    .pr-reviewer-suggestions {
      max-height: 240px; overflow-y: auto; margin-top: 4px;
      border: 1px solid transparent; border-radius: 6px;
    }
    .pr-reviewer-suggestions:not(:empty) { border-color: #e2e8f0; background: #fff; }
    .pr-suggestion {
      padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f1f5f9;
    }
    .pr-suggestion:last-child { border-bottom: none; }
    .pr-suggestion:hover { background: #f8fafc; }
    .pr-suggestion-name { font-weight: 500; color: #1e293b; font-size: 0.88rem; }
    .pr-suggestion-email { color: #64748b; font-size: 0.78rem; margin-top: 2px; }
    .pr-suggestion-loading, .pr-suggestion-empty {
      padding: 10px 12px; color: #94a3b8; font-size: 0.85rem;
    }

    .pr-error {
      color: #dc2626; background: #fef2f2; border: 1px solid #fecaca;
      border-radius: 6px; padding: 10px 12px; font-size: 0.85rem;
      margin-top: 12px;
    }
    .pr-error:empty { display: none; }

    .pr-detail-meta {
      display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
      padding: 14px 24px; font-size: 0.87rem; color: #475569;
      border-bottom: 1px solid #f1f5f9;
    }
    .pr-detail-meta strong { color: #1e293b; }
    .pr-detail-message {
      padding: 12px 24px; margin: 0; background: #fafbfc; color: #475569;
      font-size: 0.9rem; line-height: 1.5; border-bottom: 1px solid #f1f5f9;
      font-style: italic;
    }

    .pr-participants-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 24px 8px;
    }
    .pr-participants-header h4 {
      margin: 0; font-size: 0.92rem; font-weight: 600; color: #1e293b;
    }
    .pr-participants-wrap {
      padding: 0 24px 16px; overflow-y: auto; flex: 1; min-height: 120px;
    }
    .pr-participants-table {
      width: 100%; border-collapse: collapse; font-size: 0.87rem;
    }
    .pr-participants-table th {
      text-align: left; padding: 8px 10px; font-weight: 600; color: #64748b;
      border-bottom: 1px solid #e2e8f0; font-size: 0.78rem; text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    .pr-participants-table td {
      padding: 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top;
    }
    .pr-participant-name { font-weight: 500; color: #1e293b; }
    .pr-participant-email { color: #64748b; font-size: 0.78rem; margin-top: 2px; }
    .pr-participant-dot { margin-right: 4px; font-size: 0.7rem; }
    .pr-participant-active { color: #16a34a; }
    .pr-participant-idle { color: #ca8a04; }
    .pr-participant-never { color: #cbd5e1; }

    .pr-modal-card .modal-actions {
      padding: 16px 24px; border-top: 1px solid #e2e8f0;
      background: #fafbfc; margin: 0; border-radius: 0 0 12px 12px;
    }

    /* v2.11.1 — reviewer search results as a two-column table */
    .pr-suggestion-table {
      width: 100%; border-collapse: collapse; font-size: 0.87rem;
      background: #fff; border-radius: 6px; overflow: hidden;
    }
    .pr-suggestion-table thead th {
      text-align: left; padding: 8px 12px; font-weight: 600; color: #64748b;
      font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em;
      background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    }
    .pr-suggestion-row {
      cursor: pointer; transition: background 0.1s;
    }
    .pr-suggestion-row:hover { background: #f8fafc; }
    .pr-suggestion-row td {
      padding: 9px 12px; border-bottom: 1px solid #f1f5f9;
      color: #1e293b; font-weight: 500;
    }
    .pr-suggestion-row:last-child td { border-bottom: none; }
    .pr-suggestion-email-cell {
      color: #64748b !important; font-weight: 400 !important; font-size: 0.83rem;
    }
    .pr-suggestion-progress {
      padding: 6px 12px; position: relative; min-height: 12px;
    }
    .pr-suggestion-progress .pr-progress-bar {
      opacity: 1; position: relative; height: 3px;
    }

    /* v2.11.1 — cross-session reviewers table (guideline-row [Reviewers] modal) */
    .pr-reviewers-wrap {
      padding: 12px 24px 16px; overflow-x: auto; flex: 1; min-height: 120px;
    }
    .pr-reviewers-table {
      width: 100%; border-collapse: collapse; font-size: 0.86rem;
    }
    .pr-reviewers-table th {
      text-align: left; padding: 10px 10px; font-weight: 600; color: #64748b;
      border-bottom: 1px solid #e2e8f0; font-size: 0.75rem;
      text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap;
    }
    .pr-reviewers-table td {
      padding: 11px 10px; border-bottom: 1px solid #f1f5f9;
      vertical-align: middle; color: #1e293b;
    }
    .pr-reviewers-table tbody tr:hover { background: #fafbfc; }

    /* v2.11.2 — peer-review row-action button variants. Same shape as the
       existing .gl-btn-refs / .gl-btn-open, distinct fills so the two new
       peer-review actions are visually differentiated from References /
       Open (and from each other). */
    .gl-btn-reviewers { background: #475569; color: #fff; }
    .gl-btn-reviewers:hover { background: #334155; }
    .gl-btn-invite    { background: #0d9488; color: #fff; }
    .gl-btn-invite:hover    { background: #0f766e; }

    /* v2.11.2 — guidelines-landing top-of-table loading indicator. Same
       horizontal-bar pattern as the peer-review modal loader. */
    .gl-loading-wrap {
      padding: 32px 24px; text-align: center;
    }
    .gl-loading-wrap .pr-progress-bar {
      max-width: 320px; margin: 0 auto; border-radius: 3px; overflow: hidden;
      background: #e2e8f0;
    }
    .gl-loading-text {
      margin-top: 14px; font-size: 0.88rem; color: #64748b;
    }

    /* Peer-review + Reviewers modals — bottom-sheet style.
       The modal sits with its bottom edge at the viewport bottom, has
       rounded top corners only (flat bottom continues the viewport),
       and slides in from fully-below on open. Wider + taller than the
       centered variant we started with. Overrides align-items:center
       from the shared .modal-overlay for peer-review modals only. */
    .pr-modal-card {
      width: 1040px; max-width: 96vw;
      min-height: 640px;
      max-height: 92vh;
      align-self: flex-end;
      border-radius: 16px 16px 0 0;
      box-shadow:
        0 -8px 28px rgba(0, 0, 0, 0.10),
        0 -32px 72px rgba(0, 0, 0, 0.22);
      animation: pr-slide-up 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes pr-slide-up {
      0%   { opacity: 0; transform: translateY(100%); }
      100% { opacity: 1; transform: translateY(0); }
    }

    /* Content slot must be a flex column that fills the card, so .pr-form
       (flex: 1) can scroll internally while .modal-actions stays pinned
       at the card's bottom edge. min-height: 0 is required to let the
       scrollable child actually scroll instead of expanding the slot. */
    .pr-content {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
    }
    .pr-form { min-height: 0; }
    .pr-modal-card .modal-actions { flex-shrink: 0; }

    /* Selected reviewers as a compact scrollable table (replaces the
       wrapping-pills area). Fixed max-height keeps the form's message
       textarea + actions visible even with many reviewers selected. */
    .pr-selected-reviewers-wrap {
      max-height: 168px; overflow-y: auto;
      border: 1px solid #e2e8f0; border-radius: 6px;
      margin-bottom: 8px; background: #fff;
    }
    .pr-selected-reviewers-table {
      width: 100%; border-collapse: collapse; font-size: 0.85rem;
    }
    .pr-selected-reviewers-table thead th {
      position: sticky; top: 0; background: #f8fafc; z-index: 1;
      text-align: left; padding: 8px 12px; font-weight: 600;
      color: #64748b; font-size: 0.72rem;
      text-transform: uppercase; letter-spacing: 0.03em;
      border-bottom: 1px solid #e2e8f0;
    }
    .pr-selected-reviewers-table td {
      padding: 8px 12px; border-bottom: 1px solid #f1f5f9;
      vertical-align: middle;
    }
    .pr-selected-reviewers-table tr:last-child td { border-bottom: none; }
    .pr-selected-name { font-weight: 500; color: #1e293b; }
    .pr-selected-email { color: #64748b; font-size: 0.82rem; }
    .pr-selected-remove { width: 40px; text-align: right; }
    .pr-selected-reviewers-empty {
      padding: 12px 14px; margin-bottom: 8px;
      background: #f8fafc; border: 1px dashed #e2e8f0;
      border-radius: 6px; color: #94a3b8; font-size: 0.83rem;
    }

    /* Styled confirm-dialog content (used for the Close-session confirmation
       that replaced native confirm()). Sits on top of the peer-review
       modal via z-index in the JS. */
    .pr-confirm-message {
      font-size: 0.9rem; color: #475569; line-height: 1.55;
      margin: 4px 0 8px;
    }
    .pr-confirm-message p { margin: 0 0 8px; }
    .pr-confirm-message p:last-child { margin-bottom: 0; }

    /* Inline "Add reviewer" panel shown inside Screen 3 detail view.
       Replaces the previous native prompt() with the same search-and-add
       flow the create form uses. */
    .pr-add-reviewer-panel {
      margin: 4px 24px 12px;
      padding: 14px 16px;
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
    }

    /* Trash-can icon buttons for row-level remove actions across the
       peer-review UI. Neutral by default, red on hover to signal a
       destructive action; disabled state is muted with no hover. */
    .pr-icon-remove {
      background: none; border: none;
      padding: 5px 6px; border-radius: 4px;
      color: #94a3b8; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
      transition: color 0.15s, background 0.15s;
    }
    .pr-icon-remove:hover:not(:disabled) {
      color: #dc2626; background: #fee2e2;
    }
    .pr-icon-remove:disabled {
      cursor: not-allowed; opacity: 0.4;
    }

    /* Amber CTA shown on a guideline row when the current user is an
       active reviewer for that guideline. Distinct from the tenant-admin
       action colors (navy, slate, teal, blue) so a reviewer's own
       "you have a pending review here" affordance stands out. */
    .gl-btn-review-cta { background: #d97706; color: #fff; }
    .gl-btn-review-cta:hover { background: #b45309; }

    /* ═══════════════════════════════════════
       PEER REVIEW P2 (v2.11.5) — Email drafting
       ═══════════════════════════════════════ */

    .pr-email-panel {
      margin-top: 8px;
    }

    /* Two-column: editor on the left, live preview on the right. Stacks
       on narrow screens (though this modal is desktop-only in practice). */
    .pr-email-drafting {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      align-items: stretch;
    }
    @media (max-width: 780px) {
      .pr-email-drafting { grid-template-columns: 1fr; }
    }

    .pr-email-editor-col,
    .pr-email-preview-col {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .pr-email-toolbar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
      padding: 6px 8px;
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-bottom: none;
      border-radius: 6px 6px 0 0;
    }
    .pr-email-toolbar button {
      background: #fff; border: 1px solid #e2e8f0; color: #1e293b;
      padding: 4px 9px; border-radius: 4px; cursor: pointer;
      font-family: inherit; font-size: 0.82rem; line-height: 1;
      transition: background 0.12s, border-color 0.12s;
    }
    .pr-email-toolbar button:hover { background: #f1f5f9; border-color: #cbd5e1; }
    .pr-email-tb-sep {
      width: 1px; height: 18px; background: #e2e8f0; margin: 0 4px;
    }
    .pr-email-tb-label {
      font-size: 0.75rem; color: #64748b; margin: 0 4px 0 2px;
    }
    .pr-var-btn {
      background: #eef2ff !important; color: #4338ca !important;
      border-color: #e0e7ff !important; font-size: 0.75rem !important;
    }
    .pr-var-btn:hover { background: #e0e7ff !important; border-color: #c7d2fe !important; }

    .pr-email-body {
      border: 1px solid #e2e8f0;
      border-radius: 0 0 6px 6px;
      padding: 12px 14px;
      min-height: 220px;
      max-height: 320px;
      overflow-y: auto;
      background: #fff;
      font-size: 0.9rem;
      line-height: 1.5;
      color: #1e293b;
      outline: none;
    }
    .pr-email-body:focus { border-color: #0066b3; box-shadow: 0 0 0 3px rgba(0,102,179,0.10); }
    .pr-email-body p { margin: 0 0 10px; }
    .pr-email-body p:last-child { margin-bottom: 0; }
    .pr-email-body ul, .pr-email-body ol { margin: 0 0 10px 20px; }
    .pr-email-body a { color: #0066b3; text-decoration: underline; }

    .pr-email-preview-label {
      font-size: 0.8rem; color: #64748b; margin-bottom: 4px;
      font-weight: 600;
    }
    .pr-email-preview {
      border: 1px solid #e2e8f0; border-radius: 6px;
      background: #fafbfc;
      padding: 14px 16px;
      min-height: 220px;
      max-height: 360px;
      overflow-y: auto;
      font-size: 0.88rem;
      line-height: 1.5;
      color: #1e293b;
    }
    .pr-email-preview-subject {
      font-weight: 600; color: #0f172a; margin-bottom: 10px;
      padding-bottom: 8px; border-bottom: 1px solid #e2e8f0;
      font-size: 0.9rem;
    }
    .pr-email-preview-body p { margin: 0 0 10px; }
    .pr-email-preview-body a { color: #0066b3; }

    /* Screen 3 email-delivery column */
    .pr-delivery-cell { font-size: 0.85rem; white-space: nowrap; }
    .pr-delivery-sent { color: #16a34a; font-weight: 500; }
    .pr-delivery-when { color: #64748b; font-size: 0.78rem; font-weight: 400; }
    .pr-delivery-failed { color: #dc2626; font-weight: 500; }
    .pr-delivery-pending { color: #ca8a04; font-weight: 500; }
    .pr-delivery-resend {
      background: none; border: 1px solid #dc2626;
      color: #dc2626; padding: 2px 8px; margin-left: 4px;
      border-radius: 4px; font-family: inherit; font-size: 0.78rem;
      cursor: pointer;
    }
    .pr-delivery-resend:hover:not(:disabled) { background: #fee2e2; }
    .pr-delivery-resend:disabled { opacity: 0.6; cursor: wait; }

    /* ═══════════════════════════════════════
       PEER REVIEW P2 — 3-step wizard (create session)
       ═══════════════════════════════════════ */

    /* Version pill on session-list rows */
    .pr-session-version {
      display: inline-block; padding: 2px 8px; border-radius: 4px;
      background: #eef2ff; color: #4338ca; font-size: 0.74rem;
      font-weight: 600;
    }
    .pr-session-version::before { content: none; }

    /* Stepper — three-dot progress at top of create wizard */
    .pr-wizard-stepper {
      display: flex; align-items: center; justify-content: center;
      padding: 12px 24px; gap: 10px;
      border-bottom: 1px solid #f1f5f9;
    }
    .pr-wizard-step {
      display: inline-flex; align-items: center; gap: 8px;
      opacity: 0.5;
    }
    .pr-wizard-step-active { opacity: 1; }
    .pr-wizard-step-done { opacity: 0.85; }
    .pr-wizard-step-num {
      display: inline-flex; align-items: center; justify-content: center;
      width: 24px; height: 24px; border-radius: 50%;
      background: #e2e8f0; color: #64748b;
      font-size: 0.8rem; font-weight: 600;
    }
    .pr-wizard-step-active .pr-wizard-step-num {
      background: #0066b3; color: #fff;
    }
    .pr-wizard-step-done .pr-wizard-step-num {
      background: #16a34a; color: #fff;
    }
    .pr-wizard-step-label {
      font-size: 0.85rem; font-weight: 500; color: #1e293b;
    }
    .pr-wizard-step-sep {
      width: 28px; height: 1px; background: #e2e8f0;
    }

    /* Wizard action bar — Cancel on left, Back/Next on right */
    .pr-wizard-actions { justify-content: space-between; }
    .pr-wizard-actions-right { display: flex; gap: 10px; }

    .pr-wizard-body { padding-top: 18px; }

    /* Step 3 tabs (Compose / Preview) */
    .pr-email-tabs {
      display: flex; gap: 4px;
      border-bottom: 1px solid #e2e8f0;
      margin-bottom: 12px;
    }
    .pr-email-tab {
      background: none; border: none;
      padding: 8px 18px;
      font-family: inherit; font-size: 0.88rem; font-weight: 500;
      color: #64748b; cursor: pointer;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
    }
    .pr-email-tab:hover { color: #1e293b; }
    .pr-email-tab-active {
      color: #0066b3; border-bottom-color: #0066b3;
    }

    .pr-email-compose-panel {
      display: flex; flex-direction: column; min-height: 380px;
    }
    .pr-email-body-wide {
      min-height: 360px; max-height: 460px;
    }
    .pr-email-preview-wide {
      min-height: 380px; max-height: 500px;
    }
    .pr-email-preview-body ol { margin: 0 0 10px 24px; }
    .pr-email-preview-body ol li { margin-bottom: 4px; }
    .pr-email-preview-body ul { margin: 0 0 10px 24px; }

    /* Sending progress overlay — replaces wizard content while create+
       send is in flight. Vertically centered panel with an indeterminate
       progress bar and one-line status. Reuses the refLoad keyframe. */
    .pr-sending-panel {
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding: 80px 40px 60px;
      text-align: center;
      min-height: 420px;
    }
    .pr-sending-icon {
      font-size: 2.6rem; line-height: 1;
      margin-bottom: 16px;
    }
    .pr-sending-ok { color: #16a34a; }
    .pr-sending-warn { color: #d97706; }
    .pr-sending-title {
      font-size: 1.15rem; font-weight: 600;
      color: #1e293b; margin-bottom: 10px;
      max-width: 520px;
    }
    .pr-sending-subtitle {
      font-size: 0.9rem; color: #64748b;
      max-width: 460px; line-height: 1.5;
    }
    .pr-sending-bar-wrap {
      width: 100%; max-width: 380px;
      margin: 24px 0 20px;
    }
    .pr-sending-bar {
      height: 4px; background: #e2e8f0;
      border-radius: 3px; overflow: hidden;
    }
    .pr-sending-bar-fill {
      height: 100%; width: 30%;
      background: #0066b3; border-radius: 3px;
      animation: refLoad 1.4s ease-in-out infinite;
    }
    .pr-sending-continue-btn {
      margin-top: 28px; padding: 10px 28px;
      font-size: 0.95rem;
    }

    /* P4/F2 wizard additions — anonymize checkbox on step 1 + editable
       email subject at the top of step 3 compose tab. */
    .pr-anon-field {
      background: #fafbfc;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      padding: 12px 14px;
      margin-top: 4px;
    }
    .pr-checkbox-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-weight: 500;
      color: #1e293b;
    }
    .pr-checkbox-label input[type="checkbox"] {
      width: 16px; height: 16px;
      accent-color: #0066b3;
      cursor: pointer;
    }
    .pr-email-subject-row {
      margin-bottom: 12px;
    }
    .pr-email-subject-row label {
      display: block;
      font-size: 0.85rem;
      font-weight: 600;
      color: #374151;
      margin-bottom: 6px;
    }
    .pr-email-subject-row input {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 0.9rem;
      font-family: inherit;
      background: #fff;
      color: #1e293b;
      box-sizing: border-box;
    }
    .pr-email-subject-row input:focus {
      outline: none;
      border-color: #0066b3;
      box-shadow: 0 0 0 3px rgba(0,102,179,0.12);
    }
    .pr-email-subject-row code {
      background: #f1f5f9;
      padding: 1px 5px;
      border-radius: 3px;
      font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
      font-size: 0.85em;
      color: #4338ca;
    }

    /* Alias column in the cross-session Reviewers modal (admin decode key
       for anonymized sessions). */
    .pr-reviewers-anon-note {
      background: #fef3c7;
      border: 1px solid #fde68a;
      color: #78350f;
      padding: 10px 14px;
      border-radius: 6px;
      font-size: 0.85rem;
      line-height: 1.5;
      margin-bottom: 12px;
    }
    .pr-reviewer-alias {
      display: inline-block;
      background: #eef2ff;
      color: #4338ca;
      padding: 2px 8px;
      border-radius: 4px;
      font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
      font-size: 0.82rem;
      font-weight: 600;
    }
    .pr-reviewer-alias-none {
      color: #cbd5e1;
    }
