[class^="ph-"],
[class*=" ph-"] {
  font-size: 1em;
  line-height: 1;
  vertical-align: -0.15em;
  display: inline-block;
}

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

:root {
  /* WorkFlex brand greens — sampled from product screenshots */
  --g-dark: #0e7c66;
  --g-med: #1aa088;
  --g-light: #ece9e9;
  --g-xlight: #cbcbcb;
  --g-tint: #e7f7ee;
  --pink: #ff3d8b;
  --pink-light: #ffe4ee;
  --txt: #0f1f2e;
  --txt2: #5b6b7c;
  --txt3: #8a98a8;
  --bg: #f5f7f8;
  --bg-tint: #f0f7f4;
  --white: #ffffff;
  --border: #e4eaee;
  --border2: #eff3f5;
  --warn: #f59e0b;
  --warn-bg: #fff8e6;
  --warn-border: #fce2a6;
  --danger: #e5484d;
  --danger-bg: #fef1f1;
  --danger-border: #f9c8cb;
  --ok: #10b981;
  --ok-bg: #e7f7ee;
  --ok-border: #b3e4c8;
  --sidebar: #ffffff;
  --r: 10px;
  --font: "Switzer", -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;
}

/* Phosphor icon defaults */
[class^="ph-"],
[class*=" ph-"] {
  font-size: 1em;
  line-height: 1;
  vertical-align: -0.125em;
  display: inline-block;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
html {
  overflow: hidden;
  width: 100vw;
}

/* ── BACKGROUND APP (WorkFlex-style: white sidebar, mint-tinted main) ── */
.app-bg {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  user-select: none;
  background: var(--white);
}

.sidebar {
  width: 218px;
  background: var(--sidebar);
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}

.sidebar-logo {
  padding: 18px 20px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--g-dark);
  letter-spacing: -0.01em;
}

.sidebar-logo .wf-logo {
  height: 22px;
  width: auto;
  display: block;
}

.sidebar-logo .demo-tag {
  font-size: 10px;
  font-weight: 600;
  background: var(--g-light);
  color: var(--g-dark);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.04em;
}

.nav-section {
  padding: 16px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-section .chev {
  color: var(--txt3);
  font-size: 9px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--txt2);
  cursor: pointer;
  border-left: 2px solid transparent;
}

.nav-item.active {
  background: var(--g-tint);
  color: var(--g-dark);
  border-left-color: var(--g-dark);
  font-weight: 500;
}
.nav-item.active svg {
  color: var(--g-dark);
}

.nav-badge {
  margin-left: auto;
  background: var(--g-dark);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
}

.app-main {
  flex: 1;
  overflow: hidden;
  background: linear-gradient(180deg, #e8f4ee 0%, #f1f8f4 25%, #f5f7f8 60%);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px 8px;
}

.app-topbar h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.tb-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  font-family: var(--font);
  font-size: 13px;
  color: var(--txt);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-btn.primary {
  background: var(--g-dark);
  color: white;
  border-color: var(--g-dark);
}

.app-main-inner {
  padding: 0 32px;
  flex: 1;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding: 0 0 0 4px;
  margin-bottom: 18px;
}

.tab {
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab.active {
  color: var(--g-dark);
  border-color: var(--pink);
  font-weight: 600;
}
.tab .ct {
  font-size: 11px;
  color: var(--txt2);
  font-weight: 500;
  background: var(--bg);
  padding: 1px 7px;
  border-radius: 20px;
}
.tab.active .ct {
  background: var(--pink-light);
  color: var(--pink);
}

.filter-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.fp {
  font-size: 12px;
  color: var(--txt2);
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
}
.fp .ct {
  background: var(--g-light);
  color: var(--g-dark);
  font-weight: 600;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 10px;
}
.fp.active {
  background: var(--g-tint);
  border-color: var(--g-light);
  color: var(--g-dark);
}

.emp-table {
  background: white;
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow: hidden;
}

.emp-row {
  display: grid;
  grid-template-columns: 160px 110px 130px 130px 100px 100px 130px 110px;
  align-items: center;
  padding: 13px 22px;
  gap: 8px;
  border-bottom: 1px solid var(--border2);
  font-size: 13px;
  color: var(--txt);
}

.emp-row.header {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--txt2);
  background: #fafcfc;
}

.emp-row:last-child {
  border-bottom: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
}

.status-chip.pending {
  background: var(--warn-bg);
  color: #92400e;
}
.status-chip.approved {
  background: var(--ok-bg);
  color: #0e7c66;
}

/* highlight row of opened request */
.emp-row.opened {
  background: var(--g-tint);
}

/* ── OVERLAY (left scrim only — drawer takes the right) ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 11, 0.557);
  z-index: 100;
}

/* ── DRAWER (slides in from the right) ── */
.modal {
  background: var(--bg);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(880px, calc(100vw - 180px));
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 31, 46, 0.12);
  border-left: 1px solid var(--border);
  animation: drawerIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1100px) {
  .modal {
    width: calc(100vw - 60px);
  }
}

@keyframes drawerIn {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Breadcrumb */
.modal-bc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}

.bc-path {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--txt2);
  white-space: nowrap;
  min-width: 0;
}

.bc-path a {
  color: var(--g-dark);
  font-weight: 500;
  text-decoration: none;
}
.bc-path a:hover {
  text-decoration: underline;
}
.bc-path .sep {
  color: var(--txt3);
}
.bc-path .cur {
  color: var(--txt);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 12px;
}

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

.bc-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--txt2);
  transition: all 0.15s;
}
.bc-btn:hover {
  background: var(--border2);
  color: var(--txt);
}

.bc-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt2);
  transition: all 0.15s;
  font-size: 16px;
}
.bc-close:hover {
  background: var(--border2);
  color: var(--txt);
}

/* ── DECISION HEADER ── */
.modal-header {
  padding: 18px 22px 0;
  background: var(--white);
  flex-shrink: 0;
  transition: background 0.4s;
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.emp-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.emp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0e7c66 0%, #1aa088 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--g-light);
  transition: all 0.3s;
}

.emp-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}

.emp-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.emp-meta span {
  font-size: 13px;
  color: var(--txt2);
}
.emp-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--txt3);
}

/* Risk badge */
.risk-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.4s;
}

.risk-badge.medium {
  background: var(--warn-bg);
  color: #92400e;
  border: 1px solid var(--warn-border);
  white-space: nowrap;
}

.risk-badge.high {
  background: var(--danger-bg);
  color: #7f1d1d;
  border: 1px solid var(--danger-border);
  white-space: nowrap;
  animation: riskPulse 2.5s ease-in-out infinite;
}

.risk-badge.low {
  background: var(--ok-bg);
  color: #0e7c66;
  border: 1px solid var(--ok-border);
  white-space: nowrap;
}

@keyframes riskPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Trip summary */
.trip-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border2);
  flex-wrap: wrap;
  font-size: 13px;
}

.trip-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.trip-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--txt);
}

.trip-item .lbl {
  color: var(--txt2);
  font-size: 12px;
}

.flag-route {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
}
.flag-route .arrow {
  color: var(--txt3);
  font-size: 12px;
  font-weight: 300;
}
.flag-route .dest-name {
  font-size: 13px;
  color: var(--txt);
  font-weight: 500;
}

.req-id {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--txt2);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── APPROVAL STEPPER ── */
.stepper-wrap {
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
}

.step {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-conn {
  flex: 1 1 auto;
  height: 2px;
  min-width: 24px;
  background: var(--border);
  margin: 0 6px;
  transition: background 0.4s;
}
.step-conn.done {
  background: var(--ok);
}

.step-ico {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.4s;
}

.step-ico.done {
  background: var(--ok);
  color: white;
}
.step-ico.pending {
  background: var(--warn-bg);
  border: 2px solid var(--warn);
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
}
.step-ico.waiting {
  background: var(--border2);
  border: 2px solid var(--border);
  color: var(--txt3);
}
.step-ico.fin-approved {
  background: var(--ok);
  color: white;
}
.step-ico.fin-rejected {
  background: var(--danger);
  color: white;
}

.step-txt {
}
.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}
.step-sub {
  font-size: 11.5px;
  color: var(--txt2);
  margin-top: 1px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-sub .mono {
  font-family: var(--mono);
  font-size: 10.5px;
}

/* ── BODY GRID ── */
.modal-body {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 296px;
  background: var(--bg);
}

.modal-body::-webkit-scrollbar {
  width: 5px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ── LEFT CONTENT ── */
.content-main {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  background: var(--bg);
}

.content-main::-webkit-scrollbar {
  width: 0;
}

/* Compliance card */
.content-main > * {
  height: max-content;
  flex-shrink: 0;
}

.comp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}

.comp-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid var(--border2);
  gap: 10px;
  flex-wrap: wrap;
}

.comp-hd > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.comp-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--txt2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comp-overall {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}

.conf-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.4s;
}

.conf-chip.high {
  background: var(--ok-bg);
  color: #065f46;
  border-color: var(--ok-border);
}
.conf-chip.medium {
  background: var(--warn-bg);
  color: #92400e;
  border-color: var(--warn-border);
}
.conf-chip.low {
  background: var(--border2);
  color: var(--txt2);
  border-color: var(--border);
}

.conf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.comp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border2);
  background: var(--white);
  transition: background 0.2s;
}

.comp-row:last-child {
  border-bottom: none;
}
.comp-row:hover {
  background: #fafbfc;
}

.cr-l {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cr-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: background 0.3s;
}

/* .cr-ico.ok {
  background: var(--ok-bg);
} */
/* .cr-ico.danger {
  background: var(--danger-bg);
} */

.cr-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt);
}
.cr-desc {
  font-size: 12px;
  color: var(--txt2);
  margin-top: 1px;
}

.cr-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.cr-status.ok {
  color: #065f46;
  background: var(--ok-bg);
}
.cr-status.warn {
  color: #92400e;
  background: var(--warn-bg);
}
.cr-status.danger {
  color: #991b1b;
  background: var(--danger-bg);
}

/* Assessment note */
.assess-note {
  padding: 12px 16px;
  border-radius: 0;
  font-size: 12.5px;
  line-height: 1.6;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: all 0.4s;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: none;
  border-right: none;
}

.assess-note.medium {
  background: var(--warn-bg);
  border-top-color: var(--warn-border);
  border-bottom-color: var(--warn-border);
  color: #78350f;
}

.assess-note.high {
  background: var(--danger-bg);
  border-top-color: var(--danger-border);
  border-bottom-color: var(--danger-border);
  color: #7f1d1d;
}

/* High-risk acknowledgment */
.risk-ack {
  display: none;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #fff5f5;
  border: 2px solid var(--danger);
  border-radius: var(--r);
  gap: 11px;
  align-items: flex-start;
  animation: fadeSlide 0.3s ease;
}

.risk-ack.visible {
  display: flex;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.risk-ack label {
  font-size: 13px;
  color: #7f1d1d;
  cursor: pointer;
  line-height: 1.55;
  font-weight: 500;
}

.risk-ack input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--danger);
  flex-shrink: 0;
  cursor: pointer;
}

/* Accordions */
.acc {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 10px;
}

.acc-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--white);
  transition: background 0.12s;
  user-select: none;
}

.acc-hd:hover {
  background: #fafbfc;
}

.acc-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt);
}

.acc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--border2);
  color: var(--txt2);
}

.acc-badge.ok {
  background: var(--ok-bg);
  color: #065f46;
}
.acc-badge.warn {
  background: var(--warn-bg);
  color: #92400e;
}
.acc-badge.danger {
  background: #fef2f2;
  color: #991b1b;
}

.acc-chev {
  color: var(--txt3);
  transition: transform 0.22s;
  font-size: 11px;
  margin-left: 2px;
}
.acc.open .acc-chev {
  transform: rotate(180deg);
}

.acc-body {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.acc.open .acc-body {
  display: block;
}

/* Trip details grid */
.td-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.td-cell {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
}
.td-cell:nth-child(even) {
  border-right: none;
}
.td-cell:nth-last-child(-n + 2) {
  border-bottom: none;
}

.td-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}
.td-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--txt);
}

/* Documents */
.doc-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border2);
}
.doc-row:last-child {
  border-bottom: none;
}

.doc-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.doc-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt);
}
.doc-meta {
  font-size: 11.5px;
  color: var(--txt2);
  margin-top: 2px;
}

.doc-info {
  flex: 1;
}

.doc-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.doc-status.verified {
  background: var(--ok-bg);
  color: #065f46;
}
.doc-status.pending-d {
  background: var(--warn-bg);
  color: #92400e;
}
.doc-status.danger {
  background: #fef2f2;
  color: #991b1b;
}
.doc-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.doc-btns {
  display: flex;
  gap: 5px;
}

.doc-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt2);
  font-size: 12px;
  transition: all 0.15s;
}
.doc-btn:hover {
  background: var(--border2);
  color: var(--txt);
}

/* Comments */
.cmt-area {
  padding: 16px;
}

.cmt-hint {
  font-size: 12px;
  color: var(--txt2);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--border2);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmt-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--txt);
  resize: none;
  min-height: 85px;
  outline: none;
  transition: border-color 0.15s;
}
.cmt-input:focus {
  border-color: var(--g-med);
}

.cmt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--txt2);
}

.cmt-send {
  padding: 8px 15px;
  background: var(--g-dark);
  color: white;
  border: none;
  border-radius: 7px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.cmt-send:hover {
  background: var(--g-med);
}

/* Balance accordion */
.bal-content {
  padding: 16px;
}

.bal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.bal-cell {
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.bal-num {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1;
}
.bal-lbl {
  font-size: 11.5px;
  color: var(--txt2);
  margin-top: 4px;
}

.bal-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.bal-fill {
  height: 100%;
  background: var(--g-med);
  border-radius: 3px;
  transition: width 0.5s;
}

/* ── RIGHT PANEL ── */
.action-panel {
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.action-panel::-webkit-scrollbar {
  width: 0;
}

.act-ctx {
  padding: 13px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 12.5px;
  color: var(--txt2);
  line-height: 1.6;
  transition: all 0.4s;
}
.act-ctx strong {
  color: var(--txt);
  font-weight: 600;
}

/* Buttons */
.btn-approve {
  width: 100%;
  padding: 12px 16px;
  background: var(--g-dark);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s;
  box-shadow: 0 1px 2px rgba(14, 124, 102, 0.2);
}
.btn-approve:hover:not(:disabled) {
  background: #0a6a57;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 124, 102, 0.32);
}
.btn-approve:active:not(:disabled) {
  transform: translateY(0);
}
.btn-approve:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-reject {
  width: 100%;
  padding: 11px 16px;
  background: white;
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s;
}
.btn-reject:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-info {
  width: 100%;
  padding: 10px 16px;
  background: white;
  color: var(--txt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s;
}
.btn-info:hover {
  background: var(--bg-tint);
  border-color: var(--g-light);
  color: var(--g-dark);
}

.act-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

/* Confirmed states */
.confirm-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--r);
  gap: 10px;
  transition: all 0.3s;
}

.confirm-state.visible {
  display: flex;
}

.confirm-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  animation: popIn 0.45s cubic-bezier(0.34, 1.7, 0.64, 1);
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-icon.ok {
  background: var(--ok);
  border: 3px solid var(--ok-bg);
}
.confirm-icon.no {
  background: var(--danger);
  border: 3px solid var(--danger-bg);
}

.confirm-state.ok-s {
  border: 1.5px solid var(--ok-border);
}
.confirm-state.no-s {
  border: 1.5px solid var(--danger-border);
}

.confirm-state h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--txt);
}
.confirm-state p {
  font-size: 12.5px;
  color: var(--txt2);
  line-height: 1.5;
}

.confirm-ts {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
}

.confirm-ts.ok-ts {
  background: var(--ok-bg);
  color: #065f46;
}
.confirm-ts.no-ts {
  background: var(--danger-bg);
  color: #991b1b;
}
/* Balance widget (sidebar) */
.bw {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
}

.bw-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.bw-who {
  font-size: 12px;
  color: var(--txt2);
  margin-bottom: 11px;
}
.bw-who strong {
  color: var(--txt);
}

.bw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 10px;
}

.bw-cell {
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--bg);
}

.bw-num {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1;
}
.bw-num.req {
  color: var(--warn);
}
.bw-num.avail {
  color: var(--ok);
}
.bw-lbl {
  font-size: 11px;
  color: var(--txt2);
  margin-top: 3px;
}

.bw-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.bw-fill {
  height: 100%;
  width: 3%;
  background: linear-gradient(90deg, var(--g-med), var(--ok));
  border-radius: 3px;
}

/* Country guide */
.country-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--txt);
  cursor: pointer;
  transition: all 0.18s;
}
.country-link:hover {
  border-color: var(--g-med);
  background: var(--g-xlight);
}

.cl-flag {
  font-size: 22px;
}
.cl-info {
  flex: 1;
}
.cl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}
.cl-sub {
  font-size: 11.5px;
  color: var(--txt2);
  margin-top: 1px;
}

/* Export audit */
.audit-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  color: var(--txt2);
  transition: all 0.15s;
  text-decoration: none;
}
.audit-link:hover {
  border-color: var(--g-med);
  color: var(--g-dark);
  background: var(--g-xlight);
}

/* ── NEXT REQUEST HINT ── */
.next-req {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.next-req-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txt3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  transition: color 0.15s;
}
.next-req-btn:hover {
  color: var(--g-dark);
}
.next-req-kbd {
  font-size: 11px;
  color: var(--txt3);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--mono);
}

/* ── RISK CONFIRMATION MODAL ── */
.rc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.rc-overlay.open {
  display: flex;
}
.rc-box {
  background: white;
  border-radius: 16px;
  padding: 28px;
  width: 380px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
  text-align: center;
}
.rc-icon {
  font-size: 36px;
  color: var(--danger);
  margin-bottom: 12px;
}
.rc-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  margin: 0 0 8px;
}
.rc-box p {
  font-size: 13px;
  color: var(--txt2);
  line-height: 1.55;
  margin: 0 0 20px;
}
.rc-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rc-approve {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--danger);
  color: white;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}
.rc-approve:hover {
  background: #c41e1e;
}
.rc-cancel {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--txt2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.rc-cancel:hover {
  background: var(--bg2);
}

/* ── REJECT DIALOG ── */
/* ── INLINE REJECTION FORM (replaces action buttons in panel) ── */
#reject-inline {
  animation: fadeSlideIn 0.2s ease;
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ri-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ri-back {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt2);
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.ri-back:hover {
  background: var(--bg);
  color: var(--txt);
}
.ri-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--txt);
}
.ri-sub {
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.ri-reasons {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
/* ri-reasons reuses .rd-r styles — just make them more compact */
.ri-reasons .rd-r {
  font-size: 12.5px;
  padding: 8px 11px;
}
.ri-acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ri-cancel {
  flex: 1;
  padding: 9px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--txt2);
  cursor: pointer;
  transition: all 0.15s;
}
.ri-cancel:hover {
  background: var(--bg);
}
.ri-confirm {
  flex: 2;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: #b91c1c;
  color: white;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ri-confirm:hover {
  background: #991b1b;
}

.rd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.rd-overlay.open {
  display: flex;
}

.rd-box {
  background: white;
  border-radius: 16px;
  padding: 28px;
  width: 430px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.rd-h h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--txt);
}
.rd-h p {
  font-size: 13px;
  color: var(--txt2);
  margin-top: 5px;
  line-height: 1.5;
}

.rd-reasons {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 18px 0 14px;
}

.rd-r {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--txt);
  transition: all 0.15s;
}
.rd-r:hover {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.rd-r.sel {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: #7f1d1d;
  font-weight: 500;
}

.rd-note {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--txt);
  resize: none;
  height: 78px;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.rd-note:focus {
  border-color: var(--danger);
}

.rd-acts {
  display: flex;
  gap: 9px;
}

.rd-cancel {
  flex: 1;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--txt2);
  cursor: pointer;
  transition: all 0.15s;
}
.rd-cancel:hover {
  background: var(--bg);
}

.rd-confirm {
  flex: 2;
  padding: 11px;
  border: none;
  border-radius: 9px;
  background: #b91c1c;
  color: white;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.rd-confirm:hover {
  background: #991b1b;
}

/* ── DEMO BAR ── */
.demo-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f1923;
  color: white;
  border-radius: 100px;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  font-size: 12px;
  z-index: 300;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-lbl {
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-btn {
  padding: 7px 15px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.demo-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}
.demo-btn.active {
  background: white;
  color: #0f1923;
  font-weight: 700;
}

/* ── SR-ONLY ── */
.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;
}

/* ── FOCUS VISIBLE ── */
:focus-visible {
  outline: 3px solid var(--g-med);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--g-med);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn-approve:focus-visible {
  outline-color: white;
  outline-offset: 3px;
}
.btn-reject:focus-visible {
  outline-color: var(--danger);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .modal,
  .rd-box,
  .risk-ack {
    animation: none;
  }
  .modal {
    transform: none;
  }
  @keyframes riskPulse {
    0%,
    100% {
      box-shadow: none;
    }
    50% {
      box-shadow: none;
    }
  }
  @keyframes modalIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes popIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes fadeSlide {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Tooltip on hover for design decisions */
[data-tip] {
  position: relative;
  cursor: help;
}
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1923;
  color: white;
  font-size: 11px;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font);
  pointer-events: none;
  z-index: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
