/* t.tejaratnama.com — compact Persian RTL staff draft site. No framework, no web-font download, no external asset. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; }
body { margin: 0; font-family: Vazirmatn, Tahoma, "Noto Sans Arabic", sans-serif; color: #1d2733; background: #f3f5f7; line-height: 1.5; }
a { color: #1559a8; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #2b7bd6; outline-offset: 1px; }
.td-head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; padding: .45rem .9rem; background: #22313f; color: #fff; }
.td-brand { font-size: 1rem; margin-inline-end: auto; }
.td-nav { display: flex; flex-wrap: wrap; gap: .2rem .4rem; }
.td-nav a { color: #fff; text-decoration: none; padding: .2rem .55rem; border-radius: 4px; }
.td-nav a[aria-current="page"] { background: #3b5168; }
.td-nav a:hover { background: #33475b; }
.td-badge { display: inline-block; min-width: 1.4rem; padding: 0 .3rem; border-radius: 9px; background: #e9eef3; color: #22313f; font-size: .8rem; text-align: center; }
.td-search { display: flex; gap: .3rem; }
.td-search input { width: 14rem; max-width: 46vw; }
.td-inline { display: inline; }
/* G6 private completion fix: header buttons inherited the header's white text on a near-white button (unreadable labels) */
.td-head button { color: #1d2733; }
.td-main { padding: .6rem .9rem 2rem; max-width: 1500px; margin: 0 auto; }
.td-main-login { display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.td-login { width: 100%; max-width: 340px; background: #fff; border: 1px solid #dde3e9; border-radius: 8px; padding: 1.1rem 1.2rem; }
.td-login h1 { font-size: 1.15rem; margin: 0 0 .7rem; text-align: center; }
.td-login form { display: flex; flex-direction: column; gap: .6rem; }
h1 { font-size: 1.1rem; margin: .2rem 0 .5rem; }
h2 { font-size: 1rem; margin: 0 0 .45rem; }
h3 { font-size: .92rem; margin: 0 0 .3rem; width: 100%; }
.td-notice { background: #e7f1ff; border: 1px solid #b6d4fe; padding: .35rem .6rem; border-radius: 4px; margin: 0 0 .5rem; }
.td-error { display: block; color: #b02a37; font-size: .85rem; }
.td-hint { color: #55657a; font-size: .85rem; margin: .2rem 0; width: 100%; }
.td-empty { color: #55657a; }
.td-back { margin: 0 0 .4rem; }
.td-scroll { overflow-x: auto; }
.td-table { width: 100%; border-collapse: collapse; background: #fff; }
.td-table th, .td-table td { border-bottom: 1px solid #dde3e9; padding: .28rem .45rem; text-align: right; vertical-align: top; white-space: nowrap; }
.td-table td:nth-child(4), .td-table td:nth-child(5) { white-space: normal; min-width: 10rem; }
.td-table th { background: #eef2f5; position: sticky; top: 0; }
.td-pager { margin: .5rem 0; }
.td-grid { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2.2fr); gap: .7rem; align-items: start; }
.td-source, .td-edit { background: #fff; border: 1px solid #dde3e9; border-radius: 6px; padding: .55rem .7rem; }
.td-source { position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow: auto; }
.td-facts { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; margin: 0 0 .4rem; font-size: .88rem; }
.td-facts dt { color: #55657a; }
.td-facts dd { margin: 0; }
.td-src-list { list-style: none; margin: 0; padding: 0; }
.td-src-list li { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .22rem 0; border-bottom: 1px dashed #e3e8ed; }
.td-k { color: #55657a; min-width: 5.5rem; }
.td-v { overflow-wrap: anywhere; }
.td-copy { margin-inline-start: auto; font-size: .8rem; padding: .05rem .5rem; }
fieldset { border: 1px solid #dde3e9; border-radius: 6px; margin: 0 0 .55rem; padding: .35rem .6rem .5rem; display: flex; flex-wrap: wrap; gap: .35rem .7rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.td-f { display: flex; flex-direction: column; gap: .12rem; min-width: 11rem; flex: 1 1 11rem; }
.td-wide { flex-basis: 100%; }
.td-f input, .td-f select, .td-f textarea, .td-search input { font: inherit; padding: .28rem .4rem; border: 1px solid #b8c3ce; border-radius: 4px; background: #fff; color: inherit; }
.td-f textarea { min-height: 3.2rem; resize: vertical; }
[aria-invalid="true"] { border-color: #b02a37 !important; background: #fff6f7 !important; }
.td-group { flex-basis: 100%; }
.td-chks { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.td-chk { white-space: nowrap; }
.td-row, .td-person { display: flex; flex-wrap: wrap; gap: .35rem .7rem; width: 100%; }
.td-person { border-top: 1px solid #eef2f5; padding-top: .35rem; }
.td-actions { display: flex; flex-wrap: wrap; gap: .5rem; position: sticky; bottom: 0; background: #fff; padding: .5rem 0; border-top: 1px solid #dde3e9; z-index: 1; }
button { font: inherit; padding: .3rem .8rem; border: 1px solid #8a99a8; border-radius: 4px; background: #f8fafc; color: inherit; cursor: pointer; }
button[disabled] { opacity: .45; cursor: default; }
.td-small { font-size: .85rem; padding: .15rem .6rem; }
.td-primary { background: #1f6f43; border-color: #1f6f43; color: #fff; }
bdi { unicode-bidi: isolate; }
/* G6R2: create-company link, find-and-link results, linked persons */
.td-nav a.td-new, a.td-new { background: #1f6f43; color: #fff; text-decoration: none; padding: .2rem .6rem; border-radius: 4px; }
.td-results { list-style: none; margin: .2rem 0; padding: 0; width: 100%; }
.td-results li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .2rem 0; border-bottom: 1px dashed #e3e8ed; }
.td-person h3 a { text-decoration: none; }
@media (max-width: 900px) {
  .td-grid { grid-template-columns: 1fr; }
  .td-source { position: static; max-height: none; }
  .td-search { width: 100%; }
  .td-search input { flex: 1; width: auto; max-width: none; min-width: 0; }  /* phones: no horizontal overflow of the header search row */
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
