.trn-overlay {
  position: fixed;
  inset: var(--portal-chrome-h, 94px) 0 0 0;
  z-index: 3500;
  background: #e8eef5;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}
.trn-overlay[hidden] {
  display: none !important;
}
.trn-panel {
  background: #f8fafc;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #d7e0ea;
}
.trn-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px 20px 12px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.trn-head-copy {
  min-width: 0;
}
.trn-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}
.trn-desc {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
  max-width: 52rem;
  line-height: 1.45;
}
.trn-reload-btn {
  min-width: 7.5rem;
  min-height: 2.35rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  border: 1px solid #0284c7;
  background: #0284c7;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}
.trn-reload-btn:hover {
  background: #0369a1;
  border-color: #0369a1;
}
.trn-reload-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.trn-body {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0;
  overflow: hidden;
}
.trn-nav {
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.75rem 0;
  overflow-y: auto;
}
.trn-nav-heading {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.35rem 1rem 0.5rem;
}
.trn-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trn-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
}
.trn-nav-item:hover {
  background: #e2e8f0;
}
.trn-nav-item.is-active {
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: inset 3px 0 0 #0284c7;
}
.trn-nav-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}
.trn-nav-item.is-active .trn-nav-count {
  background: #bae6fd;
  color: #0369a1;
}
.trn-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.trn-detail-head {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.trn-detail-title {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}
.trn-detail-desc {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.85rem;
}
.trn-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0 1.25rem 1.25rem;
}
.trn-empty {
  margin: 1.25rem 0;
  color: #64748b;
  font-size: 0.92rem;
}
.trn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.trn-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  z-index: 1;
}
.trn-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a;
}
.trn-group-row td {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 0.8rem;
  color: #334155;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}
.trn-item-label {
  width: 22%;
  color: #475569;
  font-weight: 600;
}
.trn-english {
  width: 32%;
  line-height: 1.4;
  word-break: break-word;
}
.trn-arabic-cell {
  width: 32%;
}
.trn-arabic {
  width: 100%;
  min-height: 2.2rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.92rem;
  background: #f8fafc;
  color: #0f172a;
  direction: rtl;
  text-align: right;
}
.trn-arabic:focus {
  outline: 2px solid #7dd3fc;
  border-color: #0284c7;
  background: #fff;
}
.trn-arabic:disabled {
  background: #f1f5f9;
  color: #334155;
  cursor: default;
}
.trn-row.is-editing .trn-arabic {
  background: #fff;
  border-color: #0284c7;
}
.trn-actions {
  width: 14%;
  white-space: nowrap;
}
.trn-row-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  padding: 0.32rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-inline-end: 0.3rem;
}
.trn-row-btn:hover:not(:disabled) {
  background: #f1f5f9;
}
.trn-row-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.trn-row-btn--save {
  border-color: #0284c7;
  background: #0284c7;
  color: #fff;
}
.trn-row-btn--save:hover:not(:disabled) {
  background: #0369a1;
  border-color: #0369a1;
}
.trn-row.is-saved .trn-item-label::after {
  content: "";
}
.trn-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #fff;
}
.trn-status {
  flex: 1 1 12rem;
  min-width: 0;
  color: #334155;
  font-size: 0.85rem;
}
.trn-error {
  flex: 1 1 12rem;
  min-width: 0;
  color: #b91c1c;
  font-size: 0.85rem;
}
@media (max-width: 900px) {
  .trn-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .trn-nav {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.4rem 0.5rem;
  }
  .trn-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .trn-nav-item {
    width: auto;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #f1f5f9;
  }
  .trn-nav-item.is-active {
    box-shadow: none;
    background: #0284c7;
    color: #fff;
  }
  .trn-nav-item.is-active .trn-nav-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
  }
}
