/* دفترچه سرویس خودرو */
.csm {
	--csm-ink: #1d2a33;
	--csm-muted: #5b6b75;
	--csm-line: #d5dee3;
	--csm-surface: #f4f7f8;
	--csm-paper: #fff;
	--csm-petrol: #0f4c5c;
	--csm-petrol-2: #e3eef1;
	--csm-ok: #2e7d4f;
	--csm-ok-bg: #e5f3ea;
	--csm-soon: #8a5d00;
	--csm-soon-bar: #e8a600;
	--csm-soon-bg: #fdf3d8;
	--csm-over: #b3261e;
	--csm-over-bg: #fbe7e5;
	direction: rtl;
	text-align: right;
	color: var(--csm-ink);
	font-size: 15px;
	line-height: 1.8;
	max-width: 980px;
}
.csm *, .csm *::before, .csm *::after { box-sizing: border-box; }
.csm h2, .csm h3, .csm h4 { color: var(--csm-ink); line-height: 1.4; margin: 0; }
.csm h2 { font-size: 1.45em; }
.csm h3 { font-size: 1.15em; }
.csm h4 { font-size: 1em; }
.csm a { color: var(--csm-petrol); }
.csm-muted { color: var(--csm-muted); font-size: .9em; }

/* دکمه‌ها */
.csm-btn {
	display: inline-flex; align-items: center; gap: .3em;
	background: var(--csm-petrol); color: #fff !important;
	border: 1px solid var(--csm-petrol); border-radius: 6px;
	padding: .45em 1em; font: inherit; font-size: .92em; line-height: 1.5;
	text-decoration: none; cursor: pointer;
}
.csm-btn:hover { filter: brightness(1.12); }
.csm-btn--ghost { background: transparent; color: var(--csm-petrol) !important; }
.csm-btn--sm { padding: .25em .75em; font-size: .85em; }
.csm-link { background: none; border: 0; padding: 0; font: inherit; font-size: .88em; color: var(--csm-petrol); cursor: pointer; text-decoration: underline; }
.csm-link--danger { color: var(--csm-over); }
.csm :focus-visible { outline: 2px solid var(--csm-petrol); outline-offset: 2px; }

/* هشدارها */
.csm-alert { border-radius: 6px; padding: .7em 1em; margin: 0 0 1em; border-inline-start: 4px solid; }
.csm-alert--ok { background: var(--csm-ok-bg); border-color: var(--csm-ok); }
.csm-alert--warn { background: var(--csm-soon-bg); border-color: var(--csm-soon-bar); }
.csm-alert--danger { background: var(--csm-over-bg); border-color: var(--csm-over); }

.csm-badge { display: inline-block; font-size: .78em; line-height: 1.6; padding: 0 .6em; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.csm-badge--ok { background: var(--csm-ok-bg); color: var(--csm-ok); }
.csm-badge--soon { background: var(--csm-soon-bg); color: var(--csm-soon); }
.csm-badge--overdue { background: var(--csm-over-bg); color: var(--csm-over); }
.csm-badge--issue, .csm-badge--p2 { background: var(--csm-petrol-2); color: var(--csm-petrol); }
.csm-badge--p3 { background: var(--csm-over); color: #fff; }
.csm-badge--p1 { background: var(--csm-surface); color: var(--csm-muted); }

.csm-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin: 0 0 .9em; }
.csm-section { margin: 2em 0; }
.csm-empty { background: var(--csm-surface); border: 1px dashed var(--csm-line); border-radius: 8px; padding: 1.2em; }
.csm-empty p { margin: 0 0 .5em; }
.csm-crumb { margin: 0 0 .6em; font-size: .9em; }

/* پلاک به شکل پلاک ایرانی */
.csm-plate {
	display: inline-block; direction: rtl;
	border: 1.5px solid var(--csm-ink); border-radius: 4px;
	border-left: 12px solid #1f4fa3;
	background: #fff; color: var(--csm-ink);
	padding: 0 .6em; font-weight: 700; font-size: .9em; letter-spacing: .03em;
}

/* جستجو */
.csm-search { display: flex; gap: .5em; margin: 0 0 1em; }
.csm-search input { flex: 1; }

/* فیلدها */
.csm input[type=text], .csm input[type=search], .csm input[type=email], .csm input[type=number], .csm select, .csm textarea {
	width: 100%; font: inherit; font-size: .95em; color: var(--csm-ink);
	background: #fff; border: 1px solid var(--csm-line); border-radius: 6px; padding: .45em .65em; min-height: 2.4em;
}
.csm input[dir=ltr] { text-align: left; }
.csm-field { display: flex; flex-direction: column; gap: .2em; margin: 0 0 .8em; }
.csm-field > span { font-size: .88em; color: var(--csm-muted); }
.csm-field small { color: var(--csm-muted); font-size: .8em; }
.csm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 1em; }
.csm-fieldset { border: 1px solid var(--csm-line); border-radius: 8px; padding: .4em 1em 1em; margin: 0 0 1em; }
.csm-fieldset legend { padding: 0 .4em; font-weight: 600; }
.csm-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .2em 1em; }
.csm-checks small { color: var(--csm-muted); }
.csm-inline { display: inline-flex; gap: .4em; align-items: center; margin: 0; }
.csm-box { border: 1px solid var(--csm-line); border-radius: 8px; padding: .6em 1em; margin: 1em 0; background: var(--csm-paper); }
.csm-box > summary { cursor: pointer; font-weight: 600; color: var(--csm-petrol); }
.csm-box[open] > summary { margin-bottom: .8em; }

/* فهرست نیازمند رسیدگی */
.csm-due { background: var(--csm-paper); border: 1px solid var(--csm-line); border-inline-start: 4px solid var(--csm-soon-bar); border-radius: 8px; padding: .8em 1.1em; margin: 0 0 1.4em; }
.csm-due h3 { margin-bottom: .4em; }
.csm-due ul, .csm-due__list { list-style: none; margin: 0; padding: 0; }
.csm-due li { padding: .3em 0; border-bottom: 1px solid var(--csm-surface); }
.csm-due li:last-child { border-bottom: 0; }

/* کارت خودروها */
.csm-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1em; }
.csm-car {
	display: flex; flex-direction: column; gap: .35em;
	background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 10px;
	border-top: 4px solid var(--csm-ok);
	padding: 1em 1.1em; text-decoration: none; color: var(--csm-ink) !important;
}
.csm-car--soon { border-top-color: var(--csm-soon-bar); }
.csm-car--overdue { border-top-color: var(--csm-over); }
.csm-car:hover { border-color: var(--csm-petrol); }
.csm-car__title { font-weight: 700; font-size: 1.1em; }
.csm-car__km { font-variant-numeric: tabular-nums; color: var(--csm-muted); }
.csm-car__stats { display: flex; gap: .35em; flex-wrap: wrap; margin-top: .2em; }
.csm-car .csm-plate { align-self: flex-start; }

/* سربرگ خودرو */
.csm-carhead {
	display: grid; grid-template-columns: 1fr auto auto; gap: 1.2em; align-items: center;
	background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 12px; padding: 1.2em;
}
.csm-carhead__id { display: flex; flex-direction: column; gap: .35em; align-items: flex-start; }
.csm-carhead__id p { margin: 0; }
.csm-odo { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.csm-odo__num {
	direction: ltr; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.6em; letter-spacing: .06em;
	background: var(--csm-ink); color: #f6f1e3; border-radius: 6px; padding: .05em .55em;
	box-shadow: inset 0 -3px 0 rgba(255,255,255,.08);
}
.csm-odo__unit { font-size: .8em; color: var(--csm-muted); margin-top: -.3em; }
.csm-odo .csm-inline input { width: 9em; }
.csm-shopbtn {
	display: flex; flex-direction: column; justify-content: center; text-align: center;
	background: var(--csm-petrol); color: #fff !important; text-decoration: none;
	border-radius: 10px; padding: .9em 1.3em; min-width: 11em;
}
.csm-shopbtn strong { font-size: 1.15em; }
.csm-shopbtn span { font-size: .82em; opacity: .85; }
.csm-shopbtn:hover { filter: brightness(1.12); }

/* سرویس‌ها */
.csm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1em; }
.csm-item { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 10px; padding: 1em; display: flex; flex-direction: column; gap: .4em; }
.csm-item--overdue { border-color: #e9b3ae; }
.csm-item--soon { border-color: #eed38a; }
.csm-item__top { display: flex; justify-content: space-between; align-items: center; gap: .5em; }
.csm-item__status { margin: 0; font-weight: 600; font-size: .92em; }
.csm-item--overdue .csm-item__status { color: var(--csm-over); }
.csm-item--soon .csm-item__status { color: var(--csm-soon); }
.csm-item p { margin: 0; }

/* نوار مصرف تا سرویس بعد (از راست پر می‌شود) */
.csm-gauge { height: 8px; border-radius: 4px; background: var(--csm-surface); overflow: hidden; display: flex; }
.csm-gauge i { display: block; height: 100%; background: var(--csm-ok); border-radius: 4px; }
.csm-gauge--soon i { background: var(--csm-soon-bar); }
.csm-gauge--overdue i { background: var(--csm-over); }

.csm-facts { margin: .2em 0 0; display: grid; gap: .1em; font-size: .88em; }
.csm-facts div { display: flex; gap: .5em; }
.csm-facts dt { color: var(--csm-muted); min-width: 5.5em; margin: 0; }
.csm-facts dd { margin: 0; }
.csm-actions { display: flex; flex-wrap: wrap; gap: .5em; align-items: flex-start; margin-top: auto; padding-top: .4em; }
.csm-actions details { width: 100%; }
.csm-actions details > summary { list-style: none; display: inline-flex; }
.csm-actions details > summary::-webkit-details-marker { display: none; }
.csm-actions details[open] { background: var(--csm-surface); border-radius: 8px; padding: .6em; }
.csm-actions details[open] > summary { margin-bottom: .6em; }

/* ایرادها */
.csm-issueform { display: grid; grid-template-columns: 1fr auto auto; gap: .5em; margin: 0 0 1em; }
.csm-issueform textarea { grid-column: 1 / -1; }
.csm-issues { list-style: none; margin: 0; padding: 0; }
.csm-issue { display: flex; justify-content: space-between; gap: 1em; padding: .7em .9em; border: 1px solid var(--csm-line); border-radius: 8px; margin-bottom: .5em; background: var(--csm-paper); }
.csm-issue p { margin: .2em 0; font-size: .92em; }
.csm-issue--p3 { border-inline-start: 4px solid var(--csm-over); }
.csm-issue .csm-actions { margin: 0; padding: 0; flex-wrap: nowrap; align-items: center; }
.csm-issues--fixed .csm-issue { background: var(--csm-surface); }

/* جدول سوابق */
.csm-tablewrap { overflow-x: auto; }
.csm-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.csm-table th, .csm-table td { padding: .5em .6em; border-bottom: 1px solid var(--csm-line); text-align: right; vertical-align: top; }
.csm-table th { color: var(--csm-muted); font-weight: 600; }
.csm-table tfoot td { font-weight: 700; }

/* چک‌لیست تعمیرگاه */
.csm-shop h2 { margin-bottom: .2em; }
.csm-shop h3 { margin: 1.4em 0 .5em; }
.csm-shop__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1em; }
.csm-check { list-style: none; margin: 0; padding: 0; }
.csm-check li { border-bottom: 1px solid var(--csm-line); }
.csm-check label { display: flex; gap: .7em; align-items: flex-start; padding: .6em .2em; cursor: pointer; }
.csm-check input[type=checkbox] { width: 1.2em; height: 1.2em; margin-top: .35em; flex: none; }
.csm-shop details { margin: 1em 0; }
.csm-shop .csm-fieldset { margin-top: 1.6em; background: var(--csm-surface); }
.csm-printonly { display: none; }
.csm-lines { height: 7em; background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.6em, #999 1.6em, #999 calc(1.6em + 1px)); }

@media (max-width: 700px) {
	.csm-carhead { grid-template-columns: 1fr; }
	.csm-odo { align-items: flex-start; }
	.csm-issueform { grid-template-columns: 1fr; }
	.csm-issue { flex-direction: column; }
}

@media print {
	body.csm-print-mode * { visibility: hidden !important; }
	body.csm-print-mode .csm-shop, body.csm-print-mode .csm-shop * { visibility: visible !important; }
	body.csm-print-mode .csm-shop { position: absolute; inset: 0 0 auto 0; width: 100%; padding: 0 1cm; }
	.csm-noprint { display: none !important; }
	.csm-printonly { display: block; }
	.csm-check label { padding: .35em 0; }
	.csm-badge { border: 1px solid currentColor; }
}

/* اقلام مصرفی */
.csm-items { border: 1px solid var(--csm-line); border-radius: 8px; padding: .7em .8em; margin: .4em 0 .9em; background: var(--csm-paper); }
.csm-items__title { margin: 0 0 .5em; font-weight: 600; font-size: .92em; }
.csm-itemrow { display: grid; grid-template-columns: 2fr 2fr .8fr 1fr 1.3fr auto; gap: .4em; align-items: center; padding: .35em 0; border-bottom: 1px dashed var(--csm-line); }
.csm-itemrow:last-child { border-bottom: 0; }
.csm-itemrow .csm-link { font-size: 1.3em; text-decoration: none; padding: 0 .3em; }
.csm-items__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .8em 1.2em; margin-top: .6em; }
.csm-labor { display: inline-flex; align-items: center; gap: .4em; font-size: .9em; color: var(--csm-muted); }
.csm .csm-labor input { width: 9em; }
.csm-items__total { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.csm-items__total strong { font-size: 1.1em; }
.csm-items template { display: none; }
.csm-sub { margin: 0 0 .9em; }
.csm-sub > summary { cursor: pointer; color: var(--csm-petrol); font-size: .9em; }
.csm-sub[open] > summary { margin-bottom: .5em; }
/* کارت سرویسی که فرمش باز است تمام‌عرض شود */
.csm-list .csm-item:has(details[open]) { grid-column: 1 / -1; }
.csm-used { list-style: none; margin: .3em 0 0; padding: 0; font-size: .88em; color: var(--csm-muted); }
.csm-used li::before { content: "• "; }
.csm-history td:nth-child(2) { min-width: 16em; }

@media (max-width: 700px) {
	.csm-itemrow { grid-template-columns: 1fr 1fr; }
	.csm-itemrow input:first-child, .csm-itemrow input:nth-child(2) { grid-column: 1 / -1; }
	.csm-items__total { margin-inline-start: 0; }
}

/* ===== پلاک استاندارد ===== */
.csm-plate2 { display: inline-flex; align-items: stretch; direction: ltr; height: 2.1em; border: 1.5px solid var(--csm-ink, #1d2a33); border-radius: 5px; overflow: hidden; background: #fff; color: #111; font-weight: 800; line-height: 1; vertical-align: middle; }
.csm-plate2__ir { background: #1f4fa3; color: #fff; font-size: .42em; font-weight: 700; display: flex; align-items: flex-end; padding: 0 .45em .35em; text-align: left; line-height: 1.15; }
.csm-plate2__main { display: flex; align-items: center; gap: .3em; padding: 0 .55em; font-size: 1.05em; }
.csm-plate2__main b { font-weight: 800; }
.csm-plate2__reg { border-left: 1.5px solid var(--csm-ink, #1d2a33); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 .45em; font-size: 1em; }
.csm-plate2__reg small { font-size: .45em; font-weight: 700; }
.csm-car .csm-plate2 { align-self: flex-start; }

.csm-platein { border: 0; padding: 0; margin: 0 0 1em; }
.csm-platein legend { font-size: .88em; color: var(--csm-muted); margin-bottom: .3em; padding: 0; }
.csm-platein__box { display: inline-flex; align-items: stretch; direction: ltr; border: 2px solid var(--csm-ink); border-radius: 8px; overflow: hidden; background: #fff; max-width: 100%; }
.csm-platein__ir { background: #1f4fa3; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: flex-end; padding: 0 8px 6px; line-height: 1.2; }
.csm .csm-platein__box input, .csm .csm-platein__box select { border: 0; border-radius: 0; text-align: center; font-weight: 800; font-size: 1.15em; min-height: 2.6em; padding: 0 .2em; background: transparent; }
.csm .csm-platein__box input[name=plate_a], .csm .csm-platein__box input[name=plate_r] { width: 2.6em; }
.csm .csm-platein__box input[name=plate_b] { width: 3.6em; }
.csm .csm-platein__box select { width: auto; min-width: 4.2em; direction: rtl; }
.csm-platein__reg { display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 2px solid var(--csm-ink); padding-top: 2px; }
.csm-platein__reg small { font-size: 10px; font-weight: 700; line-height: 1; }
.csm .csm-platein__reg input { min-height: 1.9em !important; }

/* ===== قالب‌های سرویس هنگام ثبت خودرو ===== */
.csm-tpls { display: flex; flex-direction: column; }
.csm-tpl { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .7fr); gap: .5em; align-items: center; padding: .35em 0; border-bottom: 1px dashed var(--csm-line); }
.csm-tpl:last-child { border-bottom: 0; }
.csm-tpl__name { display: flex; gap: .5em; align-items: center; cursor: pointer; }
.csm-tpl__name small { color: var(--csm-muted); display: block; font-size: .8em; }
.csm .csm-tpl input[type=text] { font-size: .85em; min-height: 2.2em; }
@media (max-width: 700px) { .csm-tpl { grid-template-columns: 1fr 1fr; } .csm-tpl__name { grid-column: 1 / -1; } }

/* ===== عضویت ===== */
.csm-lead { font-size: 1.05em; margin: 0 0 1em; }
.csm-auth { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.4em; }
.csm-auth__box { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 14px; padding: 1.5em; }
.csm-auth__box h2 { margin-bottom: .8em; }
.csm-auth__box form p { margin: 0 0 .9em; }
.csm-auth__box label { display: block; font-size: .88em; color: var(--csm-muted); margin-bottom: .2em; }
.csm-auth__box .login-remember label { display: inline; }
.csm-auth__box input[type=submit] { background: var(--csm-petrol); color: #fff; border: 0; border-radius: 6px; padding: .55em 1.4em; font: inherit; cursor: pointer; min-height: 44px; }
.csm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.csm-box--open { border-inline-start: 4px solid var(--csm-soon-bar); }
.csm-box--open h3 { margin-bottom: .4em; }
.csm-tiles { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8em; }
.csm-tiles a { display: flex; align-items: center; min-height: 56px; padding: 0 1.1em; border: 1px solid var(--csm-line); border-radius: 10px; background: var(--csm-paper); font-weight: 700; text-decoration: none; }
.csm-tiles a:hover { border-color: var(--csm-petrol); }
.csm-liked { list-style: none; margin: 0; padding: 0; }
.csm-liked li { padding: .45em 0; border-bottom: 1px solid var(--csm-line); }

/* ===== پسندیدن خبر ===== */
.csm-like { display: flex; align-items: center; gap: .7em; margin: 2em 0 0; direction: rtl; font-family: inherit; }
.csm-like__btn { display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: 0 1.1em; border-radius: 999px; border: 1.5px solid #c9d3d6; background: #fff; color: #5b6b75; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.csm-like__btn:hover { border-color: var(--csm-accent, #F2B705); color: var(--csm-accent-text, #8A6500); }
.csm-like__btn.is-liked { background: var(--csm-accent, #F2B705); border-color: var(--csm-accent, #F2B705); color: var(--csm-on-accent, #1D2A33); }
.csm-like__n { color: #5b6b75; font-weight: 700; }

/* ===== قطعات سایشی (لنت، لاستیک) ===== */
.csm-wear { border: 1px solid var(--csm-line); border-radius: 8px; padding: .5em .9em .7em; margin: 0 0 .9em; background: var(--csm-paper); display: flex; flex-direction: column; gap: .3em; }
.csm-wear legend { font-weight: 700; padding: 0 .3em; }
.csm-wear label { display: flex; align-items: center; gap: .4em; flex-wrap: wrap; cursor: pointer; }
.csm .csm-wear input[type=text], .csm .csm-ask input[type=text], .csm .csm-shopwear input { width: 4.5em; min-height: 2.1em; text-align: center; }
.csm-ask { background: var(--csm-soon-bg); border: 1px solid #eed38a; border-radius: 12px; padding: 1em 1.1em; margin: 1.2em 0; }
.csm-ask h3 { margin-bottom: .6em; }
.csm-ask__item { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6em; margin-bottom: .6em; }
.csm-ask__item .csm-wear { flex: 1 1 320px; margin: 0; }
.csm-shopwear { display: inline-flex; align-items: center; gap: .4em; font-size: .88em; color: var(--csm-muted); margin: 0 2.2em .5em 0; }
.csm-check1 { display: flex; gap: .5em; align-items: flex-start; margin: 0 0 1em; font-size: .92em; cursor: pointer; }
@media print { .csm-shopwear input { border: 0; border-bottom: 1px solid #999; } }

/* ===== دکمه امروز ===== */
.csm-field { position: relative; }
.csm-today { position: absolute; left: .35em; top: 1.95em; border: 0; background: var(--csm-petrol-2); color: var(--csm-petrol); border-radius: 4px; font: inherit; font-size: .75em; padding: .15em .55em; cursor: pointer; }
.csm-today:hover { background: var(--csm-petrol); color: #fff; }
.csm .csm-field input[name$="date"], .csm .csm-field input[name^="tpl_date"] { padding-left: 4.2em; }

/* ===== صفحه جزئیات سرویس ===== */
.csm-svc { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 14px; padding: 1.3em; display: flex; flex-direction: column; gap: .8em; }
.csm-svc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; }
.csm-svc__head p { margin: .2em 0 0; }
.csm-svc__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5em; margin-top: .6em; }
.csm-svc__about p { margin: .3em 0 .8em; line-height: 2; }
.csm-svc h3 { margin-bottom: .4em; }
.csm-item__top h4 a { color: inherit; text-decoration: none; }
.csm-item__top h4 a:hover { color: var(--csm-petrol); text-decoration: underline; }

/* ===== ایرادها ===== */
.csm-conds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .2em 1em; }
.csm-conds label { display: flex; gap: .4em; align-items: center; cursor: pointer; }
.csm-issue__body { flex: 1; min-width: 0; }
.csm-issue__body > .csm-sub { margin-top: .5em; }
.csm-light { margin: .3em 0; font-size: .92em; }
.csm-light::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: #e8a600; margin-inline-end: .4em; box-shadow: 0 0 0 3px #fdf3d8; }
.csm-chips { display: flex; flex-wrap: wrap; gap: .3em; align-items: center; margin: .3em 0; font-size: .88em; }
.csm-chip { background: var(--csm-surface); border: 1px solid var(--csm-line); border-radius: 999px; padding: 0 .7em; }
.csm-photos { display: flex; flex-wrap: wrap; gap: .5em; margin: .5em 0; }
.csm-photos a, .csm-photos label { display: block; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--csm-line); position: relative; }
.csm-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csm-photos--pick input { position: absolute; top: 4px; right: 4px; z-index: 1; width: 1.2em; height: 1.2em; }
.csm-photos--pick label:has(input:checked) img { opacity: .35; }
.csm-photoin input[type=file] { border: 1px dashed var(--csm-line); border-radius: 6px; padding: .5em; background: var(--csm-surface); }
.csm-shopissue { padding: 0 2.2em .6em 0; font-size: .92em; }
.csm-shopissue .csm-photos a { width: 72px; height: 72px; }
@media print { .csm-shopissue .csm-photos a { width: 60px; height: 60px; } }

/* ===== PDF ===== */
.csm-headbtns { display: inline-flex; flex-wrap: wrap; gap: .5em; align-items: center; }
.csm-pdf svg { vertical-align: -3px; }
.csm-reportbar { margin: .8em 0 0; display: flex; justify-content: flex-end; }

/* ===== تاریخ تولید لاستیک ===== */
.csm-helplink { display: inline-block; font-size: .78em; color: var(--csm-petrol); text-decoration: underline; text-underline-offset: 2px; margin-top: .15em; }
.csm-helplink:hover { color: var(--csm-accent-text, #8A6500); }
.csm-dotfield input { max-width: 9em; letter-spacing: .15em; font-weight: 700; }
.csm-wear .csm-dotfield { margin: .5em 0 0; }
.csm-tpl__namewrap { display: flex; flex-direction: column; gap: .2em; }
.csm-tpl__dot { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; padding-right: 1.7em; }
.csm .csm-tpl__dot input { width: 8em; font-size: .85em; min-height: 2em; }

.csm-guide { max-width: 760px; }
.csm-guide h2 { font-size: 1.3em; margin: 1.4em 0 .5em; }
.csm-guide__fig { margin: 1em 0 1.4em; }
.csm-guide__fig svg { width: 100%; height: auto; display: block; border-radius: 16px; }
.csm-guide__fig figcaption { text-align: center; color: var(--csm-muted); font-size: .9em; margin-top: .5em; }
.csm-guide__steps { padding-right: 1.4em; margin: 0; display: flex; flex-direction: column; gap: .6em; }
.csm-guide__list { padding-right: 1.2em; display: flex; flex-direction: column; gap: .5em; }
.csm-guide__calc { border-inline-start: 4px solid var(--csm-accent, #F2B705); }
.csm-guide__calc h2 { margin-top: .2em; }
.csm-guide__calc input { max-width: 10em; font-size: 1.4em !important; letter-spacing: .2em; text-align: center; font-weight: 800; }
.csm-guide__result { font-size: 1.05em; margin: .3em 0 0; min-height: 1.8em; }
.csm-guide__result.is-ok { color: var(--csm-ok); } .csm-guide__result.is-soon { color: var(--csm-soon); } .csm-guide__result.is-overdue { color: var(--csm-over); } .csm-guide__result.is-bad { color: var(--csm-muted); }

/* ===== دکمه‌ها و شبکه ===== */
.csm { --csm-accent: #F2B705; --csm-accent-tint: #FDF3D0; --csm-on-accent: #1D2A33; --csm-accent-text: #8A6500; }
.csm .csm-btn--accent { background: var(--csm-accent); border-color: var(--csm-accent); color: var(--csm-on-accent) !important; }
.csm .csm-btn--accent:hover { background: var(--csm-petrol); border-color: var(--csm-petrol); color: #fff !important; filter: none; }
.csm-btn--lg { padding: .7em 1.6em; font-size: 1em; min-height: 48px; }
.csm-btn--block { width: 100%; justify-content: center; }
.csm-grid--2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.csm-req { color: var(--csm-accent-text); font-weight: 700; }

/* ===== ورود و عضویت ===== */
.csm-auth2 { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border-radius: 18px; overflow: hidden; background: var(--csm-paper); border: 1px solid var(--csm-line); box-shadow: 0 10px 40px -20px rgba(0,0,0,.25); max-width: 980px; margin-inline: auto; }
.csm-auth2__side { background: var(--csm-petrol); color: #fff; padding: 2.2em 2em; display: flex; flex-direction: column; gap: 1.2em; position: relative; overflow: hidden; }
.csm-auth2__side::after { content: ""; position: absolute; inset: auto -60px -60px auto; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255,255,255,.06); }
.csm-auth2__brand { margin: 0; font-weight: 800; letter-spacing: .02em; opacity: .85; font-size: .95em; }
.csm-auth2__side h2 { color: #fff; font-size: 1.55em; line-height: 1.5; margin: 0; }
.csm-auth2__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1em; }
.csm-auth2__perks li { display: flex; flex-direction: column; padding-right: 1.6em; position: relative; }
.csm-auth2__perks li::before { content: ""; position: absolute; right: 0; top: .55em; width: .75em; height: .75em; border-radius: 50%; background: var(--csm-accent); box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.csm-auth2__perks span { opacity: .78; font-size: .9em; }
.csm-auth2__main { padding: 1.8em 2em 2em; }
.csm-tabs { display: flex; gap: .3em; background: var(--csm-surface); border-radius: 10px; padding: .3em; margin-bottom: 1.4em; }
.csm-tab { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; padding: .6em; border-radius: 8px; cursor: pointer; color: var(--csm-muted); min-height: 44px; }
.csm-tab[aria-selected="true"] { background: var(--csm-paper); color: var(--csm-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.csm-tabpanel__title { font-size: 1.3em; margin-bottom: .8em !important; }
.csm-auth2__row { display: flex; justify-content: space-between; align-items: center; gap: 1em; margin: -.2em 0 1em; font-size: .9em; }
.csm-auth2__row .csm-check1 { margin: 0; }
.csm-auth2__switch { text-align: center; margin: 1em 0 0; }
.csm-auth2__note { margin: 0 0 1em; }
.csm-pass__wrap { position: relative; display: block; }
.csm .csm-pass__wrap input { padding-left: 5em; }
.csm-pass__toggle { position: absolute; left: .4em; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--csm-petrol); font: inherit; font-size: .8em; cursor: pointer; padding: .3em .5em; }
@media (max-width: 760px) { .csm-auth2 { grid-template-columns: 1fr; } .csm-auth2__side { padding: 1.5em; } .csm-auth2__perks { display: none; } .csm-auth2__main { padding: 1.4em 1.2em; } }

/* ===== حساب کاربری ===== */
.csm-acc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.6em; align-items: start; }
.csm-acc__side { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 14px; padding: 1em; position: sticky; top: 1em; }
.csm-acc__user { display: flex; gap: .7em; align-items: center; padding: .4em .3em 1em; border-bottom: 1px solid var(--csm-line); margin-bottom: .6em; }
.csm-acc__user small { display: block; color: var(--csm-muted); font-size: .8em; }
.csm-acc__avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--csm-petrol); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2em; }
.csm-acc__nav { display: flex; flex-direction: column; gap: .15em; }
.csm-acc__nav a { padding: .55em .8em; border-radius: 8px; text-decoration: none; color: var(--csm-ink); font-weight: 500; }
.csm-acc__nav a:hover { background: var(--csm-surface); }
.csm-acc__nav a[aria-current="page"] { background: var(--csm-petrol-2); color: var(--csm-petrol); font-weight: 800; box-shadow: inset -3px 0 0 var(--csm-petrol); }
.csm-acc__nav .csm-acc__logout { color: var(--csm-over); margin-top: .5em; border-top: 1px solid var(--csm-line); border-radius: 0; padding-top: .8em; }
.csm-acc__main > h2 { margin-bottom: .8em; }
.csm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8em; margin: 0 0 1.2em; }
.csm-stat { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 12px; padding: 1em; text-decoration: none; color: var(--csm-ink) !important; display: flex; flex-direction: column; gap: .1em; }
.csm-stat b { font-size: 1.8em; line-height: 1.1; color: var(--csm-petrol); }
.csm-stat span { color: var(--csm-muted); font-size: .88em; }
.csm-stat.is-warn b { color: var(--csm-accent-text); }
.csm-stat:hover { border-color: var(--csm-petrol); }
.csm-acc__card { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 14px; padding: 1.2em 1.3em; margin-bottom: 1em; }
.csm-acc__card--cta { background: var(--csm-accent-tint); border-color: transparent; }
.csm-acc__list { list-style: none; margin: 0; padding: 0; }
.csm-acc__list li { padding: .55em 0; border-bottom: 1px solid var(--csm-line); }
.csm-acc__list li:last-child { border-bottom: 0; }
.csm-badge--job-new, .csm-badge--job-review { background: var(--csm-petrol-2); color: var(--csm-petrol); }
.csm-badge--job-interview { background: var(--csm-soon-bg); color: var(--csm-soon); }
.csm-badge--job-hired { background: var(--csm-ok-bg); color: var(--csm-ok); }
.csm-badge--job-rejected { background: var(--csm-surface); color: var(--csm-muted); }
@media (max-width: 760px) { .csm-acc { grid-template-columns: 1fr; } .csm-acc__side { position: static; } .csm-acc__nav { flex-direction: row; flex-wrap: wrap; } .csm-acc__nav .csm-acc__logout { border-top: 0; margin-top: 0; padding-top: .55em; } }

/* ===== فرم استخدام ===== */
.csm-jobs { max-width: 860px; }
.csm-jobs__intro { background: var(--csm-petrol); color: #fff; border-radius: 16px; padding: 1.6em 1.8em; margin-bottom: 1.4em; }
.csm-jobs__intro h2 { color: #fff; margin-bottom: .4em; }
.csm-jobs__intro p { margin: 0; opacity: .88; }
.csm-jobs__form { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 16px; padding: 1.4em 1.6em; }
.csm-jobs__form .csm-fieldset { background: var(--csm-surface); border-color: transparent; }

/* ===== مالک ===== */
.csm-owner { display: inline-flex; align-items: center; gap: .6em; background: var(--csm-petrol-2); border-radius: 999px; padding: .3em .4em .3em 1.1em; margin-top: .3em; }
.csm-owner__av { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--csm-petrol); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.csm-owner__txt { display: flex; flex-direction: column; line-height: 1.35; }
.csm-owner__txt small { color: var(--csm-muted); font-size: .72em; }
.csm-owner__txt strong { font-size: 1.05em; color: var(--csm-ink); }
.csm-owner__txt a { font-size: .8em; text-decoration: none; }
.csm-repairs__owner { display: flex; align-items: center; flex-wrap: wrap; gap: .4em 1em; margin: -.2em 0 1em; }

/* ===== فرم مرحله‌به‌مرحله ===== */
.csm-step { border: 0; padding: 0; margin: 0 0 1em; min-width: 0; }
.csm-step__title { font-weight: 800; font-size: 1.05em; padding: 0; margin-bottom: .7em; color: var(--csm-ink); }
.csm-wizard.is-wizard .csm-step { display: none; }
.csm-wizard.is-wizard .csm-step.is-active { display: block; animation: csm-in .2s ease; }
@keyframes csm-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.csm-wizard__prog { list-style: none; display: flex; gap: .3em; margin: 0 0 1.1em; padding: 0; counter-reset: s; }
.csm-wizard__prog li { flex: 1; font-size: .78em; color: var(--csm-muted); padding-top: .55em; border-top: 4px solid var(--csm-line); line-height: 1.4; }
.csm-wizard__prog li.is-done { border-top-color: var(--csm-petrol); }
.csm-wizard__prog li.is-active { border-top-color: var(--csm-accent); color: var(--csm-ink); font-weight: 700; }
.csm-wizard__nav { display: flex; justify-content: space-between; gap: .6em; margin-top: 1em; padding-top: .9em; border-top: 1px solid var(--csm-line); }
.csm-wizard__nav .csm-next { margin-inline-start: auto; }
.csm-wizard__summary:empty { display: none; }
.csm-wizard__summary { background: var(--csm-surface); border-radius: 10px; padding: .8em 1em; margin: 0 0 1em; font-size: .92em; }
.csm-wizard__summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .2em 1em; }
.csm-wizard__summary dt { color: var(--csm-muted); }
.csm-wizard__summary dd { margin: 0; font-weight: 700; }
.csm-pick { display: flex; flex-wrap: wrap; gap: .35em; margin: -.3em 0 1em; }
.csm-pick .csm-chip { cursor: pointer; font: inherit; font-size: .85em; padding: .25em .8em; background: var(--csm-paper); color: var(--csm-ink); }
.csm-pick .csm-chip:hover, .csm-pick .csm-chip.is-on { border-color: var(--csm-petrol); background: var(--csm-petrol-2); color: var(--csm-petrol); }
@media (max-width: 600px) { .csm-wizard__prog li { font-size: 0; } .csm-wizard__prog li.is-active { font-size: .78em; flex: 3; } }

/* ===== سوابق: ردیفی / کاشی ===== */
.csm-logs__bar { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: .6em; }
.csm-seg { display: inline-flex; background: var(--csm-surface); border-radius: 8px; padding: .2em; }
.csm-seg button { border: 0; background: transparent; font: inherit; font-size: .85em; padding: .35em .9em; border-radius: 6px; cursor: pointer; color: var(--csm-muted); min-height: 36px; }
.csm-seg button[aria-pressed="true"] { background: var(--csm-paper); color: var(--csm-ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.csm-logs__items { list-style: none; margin: 0; padding: 0; }
/* ردیفی */
.csm-logs__items.is-list { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 12px; overflow: hidden; }
.is-list .csm-log { border-bottom: 1px solid var(--csm-line); }
.is-list .csm-log:last-child { border-bottom: 0; }
.is-list .csm-log__row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto auto; gap: .3em 1em; align-items: center; padding: .65em 1em; cursor: pointer; }
.is-list .csm-log__row:hover { background: var(--csm-surface); }
.is-list .csm-log__kind { display: none; }
.is-list .csm-log__shop { color: var(--csm-muted); font-size: .88em; }
.is-list .csm-log__more { display: none; padding: 0 1em .8em 1em; padding-right: 8.1em; }
.is-list .csm-log.is-open .csm-log__more { display: block; }
.is-list .csm-log.is-open .csm-log__row { background: var(--csm-surface); }
.csm-log__date { color: var(--csm-muted); font-size: .88em; font-variant-numeric: tabular-nums; }
.csm-log__cost { font-weight: 700; white-space: nowrap; }
.csm-log__cost small { font-weight: 400; color: var(--csm-muted); }
.csm-log__meta, .csm-log__notes { margin: .2em 0; font-size: .88em; color: var(--csm-muted); }
.csm-log__del { margin-top: .4em; }
/* کاشی */
.csm-logs__items.is-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9em; }
.is-tiles .csm-log { background: var(--csm-paper); border: 1px solid var(--csm-line); border-radius: 12px; padding: 1em; border-top: 4px solid var(--csm-petrol); display: flex; flex-direction: column; }
.is-tiles .csm-log--repair { border-top-color: var(--csm-accent); }
.is-tiles .csm-log__row { display: flex; flex-direction: column; gap: .15em; }
.is-tiles .csm-log__title { font-size: 1.05em; order: 1; }
.is-tiles .csm-log__date { order: 0; }
.is-tiles .csm-log__kind { order: 2; align-self: flex-start; font-size: .75em; background: var(--csm-surface); border-radius: 999px; padding: 0 .7em; }
.is-tiles .csm-log__shop { display: none; }
.is-tiles .csm-log__cost { order: 3; font-size: 1.15em; color: var(--csm-petrol); margin-top: .2em; }
.is-tiles .csm-log__more { margin-top: .5em; padding-top: .5em; border-top: 1px dashed var(--csm-line); flex: 1; display: flex; flex-direction: column; }
.is-tiles .csm-log__del { margin-top: auto; padding-top: .5em; }
@media (max-width: 600px) {
	.is-list .csm-log__row { grid-template-columns: minmax(0, 1fr) auto; }
	.is-list .csm-log__date { grid-column: 1 / -1; }
	.is-list .csm-log__shop { display: none; }
	.is-list .csm-log__more { padding-right: 1em; }
}

/* ===== خوش‌آمدگویی ===== */
.csm-hello { display: flex; justify-content: space-between; align-items: center; gap: 1em; background: linear-gradient(135deg, var(--csm-petrol) 0%, color-mix(in srgb, var(--csm-petrol) 78%, #000) 100%); color: #fff; border-radius: 16px; padding: 1.2em 1.4em; margin: 0 0 1.3em; position: relative; overflow: hidden; }
.csm-hello::after { content: ""; position: absolute; left: -40px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; border: 24px solid rgba(255,255,255,.07); }
.csm-hello__title { margin: 0 0 .15em; font-size: 1.35em; font-weight: 800; }
.csm-hello__line { margin: 0; opacity: .88; }
.csm-hello--warn .csm-hello__line::before { content: ""; display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--csm-accent); margin-inline-end: .45em; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.csm-hello__site { font-size: .8em; opacity: .6; white-space: nowrap; position: relative; z-index: 1; }
.csm-onb { background: var(--csm-accent-tint); border-radius: 14px; padding: 1.2em 1.4em; margin: 0 0 1.4em; }
.csm-onb ol { margin: .6em 0 1em; padding-right: 1.3em; display: flex; flex-direction: column; gap: .5em; }
.csm-onb li span { display: block; color: var(--csm-muted); font-size: .9em; }
@media (max-width: 600px) { .csm-hello__site { display: none; } }

.csm-like { --csm-accent: #F2B705; --csm-on-accent: #1D2A33; --csm-accent-text: #8A6500; }
/* زرد سازمانی در پنل */
.csm-carhead { box-shadow: inset 0 4px 0 var(--csm-accent); }
.csm-shopbtn { box-shadow: inset 0 -4px 0 var(--csm-accent); }
.csm-head h2::after, .csm-head h3::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--csm-accent); margin-top: 6px; }
.csm-acc__nav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--csm-accent); }
.csm-hello { box-shadow: inset 0 -4px 0 var(--csm-accent); }
.csm-owner { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--csm-accent) 60%, transparent); }

/* ===== ایرادها: همیشه برجسته ===== */
.csm-issues-sec { background: var(--csm-paper); border: 1px solid var(--csm-line); border-inline-start: 5px solid var(--csm-over); border-radius: 14px; padding: 1em 1.2em; }
.csm-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--csm-over); color: #fff; font-size: .75em; font-weight: 800; vertical-align: middle; margin-inline-start: .3em; }
.csm-issues .csm-issue { background: var(--csm-paper); }
.csm-issues:not(.csm-issues--fixed) .csm-issue__body > strong { font-size: 1.12em; font-weight: 800; color: var(--csm-ink); }
.csm-issues:not(.csm-issues--fixed) .csm-issue { border-width: 1.5px; }
.csm-issues .csm-issue--p3 { background: var(--csm-over-bg); }
.csm-jobs-auto { margin-top: 2em; }
