@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root { --navy: #0b2a4a; --ink: #1d2733; --muted: #6b7785; --line: #e3e8ef; --bg: #f5f7fa; --good: #1f9d55; --warn: #d98e04; --bad: #d64545; --accent: #1f64c1; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.8; }
a { color: var(--accent); text-decoration: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 24px; background: var(--navy); color: #fff; }
.top a { color: #dbe6f3; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 36px; height: 36px; border-radius: 10px; background: #e8b04a; color: var(--navy); display: grid; place-items: center; font-weight: 700; }
.brand b { display: block; color: #fff; font-size: 16px; }
.brand small { display: block; color: #9fb0c7; font-size: 12px; }
nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
form.inline { display: inline; }
button.link { background: none; border: 0; color: #dbe6f3; cursor: pointer; font: inherit; padding: 0; }
.wrap { max-width: 1280px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 22px; margin: 0 0 16px; color: var(--navy); }
h2 { font-size: 16px; margin: 20px 0 8px; color: var(--navy); }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin: 48px auto; }
label { display: block; margin-bottom: 12px; font-weight: 500; }
input, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #cdd6e1; border-radius: 8px; font: inherit; background: #fff; }
input[readonly] { background: #f0f3f7; color: var(--muted); }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 4px 18px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px 10px; margin: 4px 0 14px; }
legend { padding: 0 6px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
button, .btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 18px; font: inherit; font-weight: 500; cursor: pointer; }
.secondary { background: #e9eef5; color: var(--navy); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.alert { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.alert.good { background: #e8f6ee; color: #155f36; }
.alert.bad { background: #fdecec; color: #8c2323; }
.alert.warn { background: #fff6e0; color: #6b4a00; }
pre { background: #0f1b2a; color: #e4ecf5; padding: 12px; border-radius: 8px; overflow-x: auto; }
.secret { font-size: 20px; letter-spacing: 2px; font-weight: 700; background: #f0f3f7; padding: 10px; border-radius: 8px; text-align: center; }
.muted { color: var(--muted); font-size: 12px; word-break: break-all; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { background: #f8fafc; color: var(--muted); font-weight: 500; font-size: 13px; }
td small { display: block; color: var(--muted); }
tr.archived { opacity: .5; }
.chip { display: inline-block; background: #eef3fa; color: var(--navy); border-radius: 20px; padding: 0 8px; margin: 0 0 2px 4px; font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.grey { background: #b8c2ce; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.card.inner { background: #f8fafc; margin-top: 12px; }
pre.out { background: #0f1b2d; color: #dbe6f3; padding: 12px; border-radius: 8px; max-height: 480px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
form.inline { display: inline; }
.table-wrap button.link { background: none; color: #1f6fc4; padding: 0; border: 0; cursor: pointer; }
select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
/* the customer form's save button stays in view while the long form scrolls */
.savebar { position: sticky; bottom: 0; background: #fff; padding: 10px 0 2px; border-top: 1px solid var(--line); z-index: 2; }

/* reports cartable, case page and the development board (horizontal kanban; on phones the board scrolls sideways by itself) */
td.wrap-cell { white-space: normal; min-width: 220px; max-width: 420px; }
.chip-bad { background: #fdecec; color: #8c2323; } .chip-info { background: #e8f0fb; color: #1f4f8f; }
button.danger { background: var(--bad); } button.small, .btn.small { padding: 3px 10px; font-size: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.prewrap { white-space: pre-wrap; word-break: break-word; }
.files { display: flex; flex-wrap: wrap; gap: 10px; }
.file { display: flex; flex-direction: column; width: 140px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 12px; overflow: hidden; }
.file img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { border-inline-start: 3px solid var(--line); padding: 4px 12px 8px; }
.timeline li small { color: var(--muted); } .timeline li.internal { border-color: #e8b04a; background: #fffaf0; }
table.mini td { padding: 4px 8px; white-space: normal; }
.stages { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; }
.stages li { padding: 4px 12px; border-radius: 20px; background: #eef1f5; color: var(--muted); font-size: 13px; }
.stages li.past { background: #e8f6ee; color: #155f36; } .stages li.now { background: var(--navy); color: #fff; font-weight: 700; }
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.kcol { flex: 0 0 270px; background: #eef2f7; border-radius: 12px; padding: 8px; scroll-snap-align: start; min-height: 120px; }
.kcol.hold { background: #f6f1e7; }
.kcol > header { display: flex; justify-content: space-between; padding: 4px 6px 8px; color: var(--navy); }
.kcol > header span { background: #fff; border-radius: 20px; padding: 0 8px; font-size: 12px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; border-inline-start: 4px solid #b8c2ce; }
.kcard.pr-high { border-inline-start-color: var(--warn); } .kcard.pr-urgent { border-inline-start-color: var(--bad); } .kcard.pr-low { border-inline-start-color: #d5dbe3; }
.kcard-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .kcode { font-weight: 700; }
.ktitle { display: block; color: var(--ink); font-weight: 500; margin: 4px 0; }
.kmeta { display: flex; gap: 4px; margin: 4px 0; } .appr { font-size: 11px; border-radius: 6px; padding: 0 6px; background: #f0f3f7; color: var(--muted); }
.appr.ok { background: #e8f6ee; color: #155f36; }
.kmove { margin-top: 6px; }
.filters .grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* the owner's four decisions on a report */
.decide { border: 2px solid #d6e4f5; }
.decide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.decide-box { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfe; }
.decide-box b { font-size: 15px; } .decide-box span { color: var(--muted); font-size: 12.5px; flex: 1; }
.decide-box.ok { border-color: #9fd8b5; background: #f2fbf5; } .decide-box button { align-self: flex-start; }
.howto { background: #f2f7fd; border-color: #d6e4f5; }
details > summary { cursor: pointer; color: var(--navy); }

/* empty board columns fold into a narrow strip (the title reads vertically) so the board fits; «نمایش ستون‌های خالی» opens them */
.kanban.fold-empty .kcol.empty { flex: 0 0 44px; min-height: 160px; padding: 8px 4px; cursor: pointer; }
.kanban.fold-empty .kcol.empty > header { writing-mode: vertical-rl; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; white-space: nowrap; }
.kanban.fold-empty .kcol.empty > *:not(header) { display: none; }
.auto-card{display:flex;flex-direction:column;gap:6px;border-inline-start:4px solid var(--navy,#0b2a4a)}
.auto-card .actions{align-items:center;gap:10px;flex-wrap:wrap}
