:root {
  --wt-primary: #0b3b7a;
  --wt-primary-soft: #eef4ff;
  --wt-text: #17324d;
  --wt-border: #d7dfeb;
  --wt-danger: #b42318;
  --wt-success: #147a3f;
}

body {
  background: #f5f7fb;
  color: var(--wt-text);
}

body.signature-sticky-active {
  padding-bottom: 92px;
}

.navbar-brand strong {
  letter-spacing: 0.3px;
}

.page-shell {
  max-width: 1320px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

.card-soft {
  border: 1px solid var(--wt-border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(11, 59, 122, 0.05);
}

.section-title {
  font-weight: 700;
  color: var(--wt-primary);
}

.badge-status {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.1px;
}

.badge-DRAFT { background: #eff2f6; color: #4d5b6b; }
.badge-SUBMITTED { background: #e8f1ff; color: #0b3b7a; }
.badge-UNDER_HR_REVIEW,
.badge-PENDING_REVIEW { background: #fff5d6; color: #8a6400; }
.badge-WAITING_DIRECTOR { background: #efe8ff; color: #6c36c8; }
.badge-WAITING_DEPUTY,
.badge-WAITING_EXECUTIVE,
.badge-PENDING_APPROVAL { background: #e8ddff; color: #5b30c4; }
.badge-APPROVED { background: #e2f8ea; color: #147a3f; }
.badge-RETURNED { background: #ffe7d9; color: #b5511d; }
.badge-REJECTED { background: #fde3e7; color: #b42318; }
.badge-CLOSED { background: #e2e8f0; color: #475569; }

.signature-wrap {
  border: 1px dashed #94a3b8;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

#signatureCanvas {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 12px;
  background: #fff;
}

.signature-status {
  border: 1px dashed var(--wt-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafcff;
}

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

.timeline li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 14px;
}

.timeline li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wt-primary);
  position: absolute;
  left: 0;
  top: 8px;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 460px;
}

.pdf-viewer-wrap {
  border: 1px solid var(--wt-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf2fa 100%);
  min-height: 760px;
  overflow: hidden;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(215, 223, 235, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
}

.pdf-toolbar .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #5b6778;
}

.pdf-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-zoom-label {
  min-width: 56px;
  text-align: center;
  font-weight: 600;
  color: var(--wt-primary);
}

.pdf-scroll {
  max-height: 820px;
  overflow: auto;
  padding: 20px 12px 28px;
}

.pdf-page-shell {
  width: fit-content;
  margin: 0 auto 20px;
}

.pdf-page-shell:last-child {
  margin-bottom: 0;
}

.pdf-page-container {
  position: relative;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 40, 80, 0.16);
  border-radius: 6px;
  overflow: hidden;
}

.pdf-page-canvas {
  display: block;
}

.pdf-page-overlay {
  position: absolute;
  inset: 0;
}

.pdf-page-overlay.place-armed {
  cursor: crosshair;
}

.pdf-page-overlay.place-armed::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(11, 59, 122, 0.34);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: inset 0 0 0 9999px rgba(11, 59, 122, 0.015);
}

.pdf-page-label {
  text-align: center;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: #5c6b7d;
}

.signature-bank {
  display: grid;
  gap: 12px;
}

.signature-source {
  border: 1px solid #d7dfeb;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  transition: 0.2s ease;
  cursor: pointer;
}

.signature-source.active {
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 3px rgba(11, 59, 122, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.signature-thumb {
  height: 92px;
  border-radius: 10px;
  border: 1px dashed #d0d7e2;
  background: linear-gradient(135deg, #ffffff, #f7f9fd);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.signature-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.signature-thumb.empty {
  color: #6b7280;
  font-size: 0.85rem;
  cursor: default;
}

.signature-source-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.signature-source-title {
  font-weight: 600;
  color: var(--wt-primary);
}

.signature-source-hint {
  font-size: 0.82rem;
  color: #6b7280;
}

.drag-ghost {
  position: fixed;
  z-index: 2000;
  width: 180px;
  pointer-events: none;
  opacity: 0.78;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.16));
}

.stamp-node {
  position: absolute;
  border: 2px solid rgba(11, 59, 122, 0.65);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.8) inset;
  user-select: none;
  touch-action: none;
  cursor: move;
}

.stamp-node.selected {
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 4px rgba(11, 59, 122, 0.12);
}

.stamp-node::after,
.text-stamp-node::after {
  content: '';
  position: absolute;
  inset: -10px;
}

.stamp-node img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.stamp-node .stamp-stage-chip {
  position: absolute;
  top: -12px;
  left: -2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--wt-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(11, 59, 122, 0.22);
}

.stamp-node .stamp-resize {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wt-primary);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(11, 59, 122, 0.24);
  cursor: nwse-resize;
}

.stamp-node .stamp-remove {
  position: absolute;
  right: -8px;
  top: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wt-danger);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(180, 35, 24, 0.24);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stamp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.signature-sticky-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(248, 251, 255, 0.94);
  border-top: 1px solid rgba(215, 223, 235, 0.96);
  box-shadow: 0 -14px 34px rgba(8, 44, 92, 0.13);
  backdrop-filter: blur(10px);
}

.signature-sticky-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.signature-sticky-title {
  font-weight: 800;
  color: var(--wt-primary-deep, var(--wt-primary));
  line-height: 1.25;
}

.signature-sticky-subtitle {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.35;
}

.signature-sticky-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signature-sticky-actions .btn {
  min-height: 44px;
  white-space: nowrap;
}

.tool-bank {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.text-stamp-node {
  position: absolute;
  border: 2px dashed rgba(11, 59, 122, 0.45);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.8) inset;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  min-width: 26px;
  touch-action: none;
  cursor: move;
}

.text-stamp-node .text-stamp-content {
  font-size: 14px;
  font-weight: 700;
  color: var(--wt-primary);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.check-stamp-node .text-stamp-content {
  font-size: 22px;
}

.stage-slot-guide {
  border: 1px dashed rgba(180, 35, 24, 0.72);
  background: rgba(253, 227, 231, 0.12);
  position: absolute;
  pointer-events: none;
}

.helper-note {
  font-size: 0.85rem;
  color: #5b6778;
}

@media (max-width: 991px) {
  .pdf-scroll {
    max-height: none;
  }

  .pdf-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* role landing + executive mobile enhancements */
.admin-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  body.mobile-executive-mode .page-shell {
    margin-top: 12px;
    padding: 0 10px 150px;
  }

  body.mobile-executive-mode .navbar .container-fluid {
    align-items: flex-start;
  }

  body.mobile-executive-mode .pdf-viewer-wrap {
    min-height: auto;
    border-radius: 14px;
  }

  body.mobile-executive-mode .pdf-scroll {
    padding: 12px 8px 18px;
  }

  body.mobile-executive-mode .pdf-page-shell {
    width: 100%;
  }

  body.mobile-executive-mode .pdf-page-container,
  body.mobile-executive-mode .pdf-page-overlay,
  body.mobile-executive-mode .pdf-page-canvas {
    max-width: 100%;
    height: auto;
  }

  body.mobile-executive-mode .signature-bank {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.mobile-executive-mode .signature-source {
    padding: 10px;
    border-radius: 12px;
  }

  body.mobile-executive-mode .signature-thumb {
    height: 82px;
  }

  body.mobile-executive-mode #executiveActionCard {
    position: sticky;
    bottom: 8px;
    z-index: 30;
    box-shadow: 0 12px 24px rgba(11, 59, 122, 0.12);
  }

  body.mobile-executive-mode #executiveActionCard .card-body {
    padding: 14px !important;
  }

  body.mobile-executive-mode .mobile-approve-stack {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    padding-top: 8px;
  }

  body.mobile-executive-mode #btnApprove,
  body.mobile-executive-mode #btnReject,
  body.mobile-executive-mode #btnUploadSavedSignature,
  body.mobile-executive-mode #btnRefreshDrawnSignature,
  body.mobile-executive-mode .stamp-actions .btn {
    min-height: 46px;
    font-size: 1rem;
  }

  body.mobile-executive-mode .stamp-node .stamp-resize,
  body.mobile-executive-mode .stamp-node .stamp-remove {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 991px) {
  .signature-sticky-action-bar {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .signature-sticky-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .signature-sticky-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .signature-sticky-actions .btn {
    min-height: 48px;
  }
}

@media (max-width: 575px) {
  .signature-sticky-actions {
    grid-template-columns: 1fr;
  }

  .signature-sticky-subtitle {
    font-size: 0.82rem;
  }
}


.remember-row {
  padding: 4px 2px 0;
}

.remember-row .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
}

.remember-row .form-check-label {
  font-weight: 600;
  color: #334155;
}

.remember-hint {
  margin-top: 4px;
  margin-left: 1.6rem;
  font-size: 0.84rem;
  color: #64748b;
}

@media (max-width: 576px) {
  .login-card {
    max-width: 100%;
    border-radius: 20px;
  }

  .login-card .card-body {
    padding: 28px 22px !important;
  }

  .login-card .form-control-lg,
  .login-card .btn-lg {
    min-height: 58px;
    font-size: 1.08rem;
  }

  .remember-row .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
  }
}


.hr-edit-panel .alert {
  border-radius: 14px;
}

.hr-number-config {
  background: #fff;
}

.number-stamp-node {
  border-color: rgba(180, 35, 24, 0.52);
  background: rgba(255, 248, 248, 0.92);
}

.number-stamp-node .text-stamp-content {
  color: #b42318;
  font-weight: 800;
}


.signature-upload-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.hr-edit-history-item {
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #f8fbff;
}

.hr-edit-history-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(11, 59, 122, 0.10);
  color: var(--wt-primary);
  font-size: 0.78rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .signature-upload-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ===== Phase 1 UI polish ===== */
:root {
  --wt-bg: #f3f6fb;
  --wt-surface: #ffffff;
  --wt-surface-soft: #f8fbff;
  --wt-primary-deep: #082c5c;
  --wt-shadow: 0 16px 34px rgba(10, 43, 93, 0.08);
  --wt-shadow-soft: 0 8px 20px rgba(10, 43, 93, 0.05);
}

body {
  background:
    radial-gradient(circle at top left, rgba(11,59,122,0.08), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--wt-bg) 18%, #f4f7fb 100%);
  color: var(--wt-text);
}

.navbar {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(8px);
}

.navbar .page-shell {
  min-height: 76px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--wt-primary-deep);
}

.navbar-brand::before {
  content: 'W';
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--wt-primary) 0%, #2a69c7 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px rgba(11,59,122,0.16);
}

.page-shell {
  max-width: 1360px;
  margin: 28px auto 52px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(8,44,92,0.98) 0%, rgba(11,59,122,0.95) 52%, rgba(42,105,199,0.92) 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(8,44,92,0.18);
}

.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.page-hero::before {
  width: 220px;
  height: 220px;
  right: -48px;
  top: -80px;
}

.page-hero::after {
  width: 140px;
  height: 140px;
  right: 140px;
  bottom: -56px;
}

.page-hero .hero-body {
  position: relative;
  z-index: 1;
  padding: 28px 30px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.94);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.hero-title {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 800;
  margin: 16px 0 10px;
}

.hero-desc {
  max-width: 760px;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  margin-bottom: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
}

.hero-stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.74);
  margin-bottom: 4px;
}

.hero-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.card-soft {
  border: 1px solid rgba(215,223,235,0.95);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--wt-shadow-soft);
}

.card-soft:hover {
  box-shadow: var(--wt-shadow);
}

.section-title {
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: #64748b;
  font-size: 0.95rem;
}

.surface-subtle {
  border: 1px solid #e5edf7;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--wt-primary-soft);
  color: var(--wt-primary);
  font-size: 0.86rem;
  font-weight: 600;
}

.form-label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

.form-control,
.form-select {
  border-color: #d8e2ee;
  border-radius: 14px;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  box-shadow: none !important;
}

textarea.form-control { min-height: 120px; }

.form-control:focus,
.form-select:focus {
  border-color: #8bb4eb;
  box-shadow: 0 0 0 4px rgba(42,105,199,0.12) !important;
}

.btn {
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.btn-sm { border-radius: 12px; }

.btn-primary {
  background: linear-gradient(135deg, var(--wt-primary) 0%, #1d63c6 100%);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(11,59,122,0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--wt-primary-deep) 0%, #1655ab 100%);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-warning,
.btn-outline-success,
.btn-outline-danger {
  background: #fff;
}

.table-responsive {
  border: 1px solid #e8eef6;
  border-radius: 18px;
  background: #fff;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0.1px;
  color: #475569;
  background: #f8fbff;
  border-bottom-width: 1px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.table > :not(caption) > * > * {
  padding: 14px 16px;
}

.table tbody tr:hover {
  background: #fbfdff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  border: 1px solid #e5edf7;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  padding: 18px 18px 16px;
  box-shadow: var(--wt-shadow-soft);
}

.metric-card .metric-label {
  color: #64748b;
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.metric-card .metric-value {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--wt-primary-deep);
  line-height: 1.1;
}

.metric-card .metric-note {
  color: #64748b;
  font-size: 0.84rem;
  margin-top: 6px;
}

.meta-grid {
  display: grid;
  gap: 12px;
}

.meta-item {
  border: 1px solid #e8eef6;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 12px 14px;
}

.meta-item-label {
  color: #64748b;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.meta-item-value {
  font-weight: 600;
  color: #0f2949;
  line-height: 1.55;
  word-break: break-word;
}

.action-panel-card {
  position: sticky;
  top: 92px;
}

.timeline li {
  padding: 16px 0 16px 24px;
  margin-bottom: 0;
  border-bottom: 1px dashed #e5edf7;
}

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

.timeline li::before {
  width: 10px;
  height: 10px;
  top: 22px;
  box-shadow: 0 0 0 6px rgba(11,59,122,0.08);
}

.pdf-viewer-wrap {
  border-radius: 20px;
  border-color: #dbe6f3;
}

.pdf-toolbar {
  padding: 14px 18px;
}

.panel-divider {
  height: 1px;
  background: #e8eef6;
  margin: 18px 0;
}

.danger-zone {
  border: 1px dashed rgba(214,69,48,0.35);
  background: linear-gradient(180deg, rgba(255,249,247,0.96) 0%, rgba(255,244,240,0.96) 100%);
}

.login-shell {
  background:
    radial-gradient(circle at top left, rgba(11,59,122,0.12), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.login-card {
  max-width: 980px;
  overflow: hidden;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.login-brand-panel {
  padding: 40px 36px;
  background: linear-gradient(145deg, rgba(8,44,92,0.98) 0%, rgba(11,59,122,0.97) 55%, rgba(42,105,199,0.92) 100%);
  color: #fff;
  position: relative;
}

.login-brand-panel::after {
  content: '';
  position: absolute;
  right: -70px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.login-form-panel {
  padding: 40px 34px;
  background: rgba(255,255,255,0.98);
}

.login-feature-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.login-feature-list li {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
}

.kpi-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.kpi-pills span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
}

@media (max-width: 991px) {
  .page-shell {
    margin-top: 18px;
    padding: 0 12px;
  }

  .page-hero .hero-body {
    padding: 22px 20px;
  }

  .action-panel-card {
    position: static;
  }

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

  .login-brand-panel,
  .login-form-panel {
    padding: 28px 24px;
  }
}

@media (max-width: 576px) {
  .hero-stats,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .navbar .page-shell {
    min-height: 68px;
  }

  .table > :not(caption) > * > * {
    padding: 12px 10px;
  }
}


.app-toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}
.app-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  padding: 12px 14px;
  transform: translateY(10px);
  opacity: 0;
  transition: 0.22s ease;
  cursor: pointer;
}
.app-toast.show { transform: translateY(0); opacity: 1; }
.app-toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 0.88rem;
  font-weight: 700;
  flex-shrink: 0;
}
.app-toast-body { font-size: 0.95rem; line-height: 1.45; }
.app-toast-success { background: rgba(20, 122, 63, 0.96); }
.app-toast-danger { background: rgba(180, 35, 24, 0.97); }
.app-toast-warning { background: rgba(180, 110, 10, 0.96); }
.app-toast-info { background: rgba(11, 59, 122, 0.96); }

.table-state {
  text-align: center;
  padding: 28px 14px !important;
  color: #5b6778;
}
.table-state-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border-radius: 50%;
  border: 2px solid #d2d9e6;
  border-top-color: var(--wt-primary);
  vertical-align: -2px;
  animation: wt-spin 0.8s linear infinite;
}
.table-state-error { color: var(--wt-danger); }
.table-state-empty { color: #64748b; }
@keyframes wt-spin { to { transform: rotate(360deg); } }

.empty-block {
  border: 1px dashed var(--wt-border);
  background: #f8fbff;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
}
.empty-block-title { font-weight: 700; color: var(--wt-primary); margin-bottom: 6px; }
.empty-block-desc { color: #64748b; font-size: 0.92rem; }
.empty-block-error { background: #fff6f6; border-color: #f2c8c5; }
.empty-block-error .empty-block-title { color: var(--wt-danger); }

.action-callout {
  border: 1px solid var(--wt-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
  padding: 14px 16px;
}
.action-callout-title { font-weight: 700; color: var(--wt-primary); margin-bottom: 4px; }
.action-callout-desc { color: #64748b; font-size: 0.92rem; }
.is-busy { pointer-events: none; }
.viewer-status-inline { margin-top: 6px; color: #64748b; font-size: 0.9rem; }
.viewer-status-inline.error { color: var(--wt-danger); }
.viewer-status-inline.success { color: var(--wt-success); }


/* ===== Login corporate simplification ===== */
body.login-page {
  background:
    radial-gradient(circle at top left, rgba(11,59,122,0.10), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #eef3f9 100%);
}

.login-card-corporate {
  max-width: 920px;
  border-radius: 24px;
  overflow: hidden;
}

.login-brand-panel-corporate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 42px 36px;
}

.login-brand-panel-corporate .hero-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.18;
  margin-bottom: 12px;
}

.login-brand-panel-corporate .hero-desc {
  max-width: 520px;
  color: rgba(255,255,255,0.86);
  font-size: 1rem;
  line-height: 1.75;
}

.login-mini-note {
  margin-top: 20px;
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  font-weight: 500;
}

.login-form-panel-corporate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 36px;
}

.login-form-head {
  margin-bottom: 12px;
}

.login-org {
  font-size: 0.96rem;
}

.login-note {
  border-top: 1px solid #e6edf6;
  padding-top: 16px;
  color: #64748b;
  font-size: 0.92rem;
}

body.login-page .login-card .form-control-lg,
body.login-page .login-card .btn-lg {
  min-height: 56px;
}

body.login-page .remember-row {
  padding-top: 2px;
}

body.login-page .remember-row .form-check-label {
  font-weight: 600;
  color: #334155;
}

body.login-page .remember-hint,
body.login-page .kpi-pills,
body.login-page .login-feature-list,
body.login-page .surface-subtle {
  display: none !important;
}

@media (max-width: 991px) {
  .login-card-corporate {
    max-width: 760px;
  }

  .login-brand-panel-corporate,
  .login-form-panel-corporate {
    padding: 28px 24px;
  }

  .login-brand-panel-corporate .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  body.login-page .login-shell {
    padding: 12px;
    align-items: flex-start;
  }

  .login-card-corporate {
    border-radius: 20px;
  }

  .login-brand-panel-corporate {
    padding: 22px 20px;
  }

  .login-brand-panel-corporate .hero-title {
    font-size: 1.9rem;
    line-height: 1.2;
  }

  .login-brand-panel-corporate .hero-desc {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .login-mini-note {
    margin-top: 12px;
    font-size: 0.92rem;
  }

  .login-form-panel-corporate {
    padding: 22px 20px 24px;
  }

  body.login-page .login-card .form-control-lg,
  body.login-page .login-card .btn-lg {
    min-height: 54px;
    font-size: 1rem;
  }
}


body.dialog-open {
  overflow: hidden;
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 6000;
  backdrop-filter: blur(2px);
}

.app-modal {
  width: min(560px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 22px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.app-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
}

.app-modal-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #eef4ff;
  color: var(--wt-primary);
  margin-bottom: 10px;
}

.app-modal-kicker.danger {
  background: #fdebec;
  color: var(--wt-danger);
}

.app-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #102a43;
  margin: 0;
}

.app-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
}

.app-modal-body {
  padding: 0 24px 18px;
}

.app-modal-message {
  color: #475569;
  line-height: 1.7;
  white-space: pre-line;
}

.app-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}

.error-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.error-card {
  width: min(720px, 100%);
  border: 1px solid #d9e2ef;
  border-radius: 28px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.error-card .hero-body {
  padding: 34px 32px;
}

.error-code {
  font-size: clamp(3rem, 9vw, 5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
