/* ============================================================
   tp-theme.css - שפת עיצוב אחידה לכל דפי Total Print
   נטען אחרי bootstrap ו-sb-admin-2 ודורס אותם.
   ============================================================ */

:root {
	--primary: #009ef7;
	--primary-hover: #0095e8;
	--success: #17c653;
	--danger: #f1416c;
	--warning: #ffa800;
	--orange: #ff8c00;
	--purple: #7239ea;
	--ink: #181c32;
	--ink-2: #0d1933;
	--txt: #181c32;
	--txt-2: #5e6278;
	--muted: #7e8299;
	--faint: #a1a5b7;
	--line: #e4e6ef;
	--divider: #eef0f4;
	--card: #fff;
	--body-bg: #f5f8fa;
	--thead-bg: #fbfcfe;
}

html, body { height: 100%; }

body {
	font-family: 'Heebo', 'Segoe UI', Arial, sans-serif !important;
	background: var(--body-bg) !important;
	color: var(--txt);
	font-size: 13px;
	direction: rtl;
}

/* ---- תיקון RTL ל-Bootstrap 3 ---- */
.row > [class*="col-"] { float: right; }
.pull-left { float: left !important; }
.pull-right { float: right !important; }

label { font-weight: 600; }
a, body a { color: var(--primary) !important; text-decoration: none; }
a:hover { color: var(--primary-hover) !important; }

/* ============ שלד ============ */
#wrapper { min-height: 100%; }

.tp-topbar {
	background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
	padding: 0 22px; height: 62px;
	display: flex; align-items: center; gap: 18px;
	position: sticky; top: 0; z-index: 1030;
	box-shadow: 0 2px 12px rgba(13, 25, 51, .18);
}
.tp-topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 15px; }
.tp-topbar .brand img { height: 34px; }
.tp-topbar .spacer { flex: 1; }
.tp-user { display: flex; align-items: center; gap: 8px; }

.tp-icon-btn {
	background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
	color: #fff !important; border-radius: 8px; height: 34px; padding: 0 12px;
	font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center;
	gap: 6px; cursor: pointer; transition: background .15s;
}
.tp-icon-btn:hover { background: rgba(255,255,255,.22); }

.tp-shell { display: flex; align-items: flex-start; gap: 18px; padding: 18px; }

.tp-side {
	width: 224px; flex: 0 0 224px; background: var(--card);
	border: 1px solid var(--line); border-radius: 12px; padding: 10px;
	position: sticky; top: 80px;
}
.tp-side .side-title { font-size: 10.5px; font-weight: 700; color: var(--faint); letter-spacing: .6px; padding: 8px 10px 6px; }
.tp-side ul { list-style: none; margin: 0; padding: 0; }
.tp-side li a {
	display: flex; align-items: center; gap: 9px; padding: 9px 11px;
	border-radius: 8px; font-size: 13px; font-weight: 600;
	color: var(--txt-2) !important; transition: background .15s, color .15s;
}
.tp-side li a:hover { background: #f4f8ff; color: var(--primary) !important; }
.tp-side li.liactive > a { background: #eef4ff; color: var(--primary) !important; }
.tp-side li a i { width: 17px; text-align: center; font-size: 14px; }

.tp-main { flex: 1; min-width: 0; }
.hideLi { display: none !important; }
.showLi { display: block !important; }

/* ============ כותרות ============ */
.innerPageTitle h1, .innerPageTitle h2, .page-header {
	font-size: 19px; font-weight: 800; color: var(--txt);
	margin: 0 0 14px; padding: 0; border: none;
}

/* ============ כרטיסים ============ */
.panel, .tp-card {
	background: var(--card); border: 1px solid var(--line) !important;
	border-radius: 12px !important; box-shadow: none !important;
	margin-bottom: 16px; overflow: hidden;
}
.panel > .panel-heading, .tp-card > .tp-card-head {
	background: #fff !important; border-bottom: 1px solid var(--divider) !important;
	color: var(--txt) !important; font-size: 13.5px; font-weight: 700;
	padding: 13px 16px !important; height: auto !important;
	display: flex; align-items: center; gap: 10px;
}
.panel-heading .fa { color: var(--primary); }
.panel-body, .tp-card-body { padding: 14px 16px; }
.panel-heading .flex-sep { flex: 1; }

/* ============ KPI ============ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; display: flex; align-items: center; gap: 12px; }
.kpi .kpi-icon { width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.kpi.total .kpi-icon { background: #eef4ff; color: var(--primary); }
.kpi.open .kpi-icon { background: #eef4ff; color: #3b82f6; }
.kpi.closed .kpi-icon { background: #e8faf0; color: var(--success); }
.kpi.cancel .kpi-icon { background: #fdeef1; color: var(--danger); }
.kpi .kpi-num { font-size: 19px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-lbl { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ============ שדות וסינון ============ */
.tp-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.tp-field { display: flex; flex-direction: column; gap: 5px; min-width: 165px; }
.tp-field > label { font-size: 11px; font-weight: 700; color: var(--muted); margin: 0; }

.form-control, select.form-control {
	height: 36px; border-radius: 7px; border: 1px solid var(--line);
	box-shadow: none !important; font-size: 13px; color: var(--txt); background: #fff;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { height: auto; }

/* ============ צ'יפים ============ */
.chips { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chip {
	border: 1px solid var(--line); background: #fff; border-radius: 20px;
	padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--txt-2);
	cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .chip-count {
	background: rgba(0,0,0,.07); border-radius: 10px; padding: 1px 7px;
	font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.chip.active .chip-count { background: rgba(255,255,255,.25); }

/* ============ כפתורים ============ */
.btn { border-radius: 7px; font-size: 12.5px; font-weight: 600; padding: 8px 14px; border: none; box-shadow: none; transition: all .15s; }
.btn:active, .btn:focus { outline: none !important; box-shadow: none !important; }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-light-primary { background: #eef4ff; color: var(--primary) !important; }
.btn-light-primary:hover { background: var(--primary); color: #fff !important; }
.btn-light-success { background: #e8faf0; color: var(--success) !important; }
.btn-light-success:hover { background: var(--success); color: #fff !important; }
.btn-light-warning { background: #fff4de; color: var(--orange) !important; }
.btn-light-warning:hover { background: var(--orange); color: #fff !important; }
.btn-light-dark { background: #eef0f4; color: var(--ink) !important; }
.btn-light-dark:hover { background: var(--ink); color: #fff !important; }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--primary); color: #fff; }
.btn-default { background: #f4f6f9; color: var(--txt-2); border: 1px solid var(--line); }
.btn-xs { padding: 4px 10px; font-size: 11.5px; }

/* ============ סרגל כלים של טבלה ============ */
.tp-toolbar {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding: 12px 16px; border-bottom: 1px solid var(--divider); background: #fff;
}
.tp-toolbar .tb-actions { display: flex; gap: 7px; }

.dataTables_filter { margin: 0 !important; float: none !important; }
.dataTables_filter label { margin: 0; position: relative; display: block; }
.dataTables_filter input {
	width: 260px !important; height: 36px; border-radius: 7px;
	border: 1px solid var(--line); padding: 0 34px 0 12px; font-size: 13px;
	margin: 0 !important; background: #fff;
}
.dataTables_filter input:focus { border-color: var(--primary); outline: none; }
.dataTables_filter label:after {
	content: "\f002"; font-family: FontAwesome; position: absolute;
	right: 11px; top: 9px; color: var(--faint); font-size: 13px; pointer-events: none;
}
.dt-buttons, .dataTables_info, .dataTables_length { display: none !important; }

/* ============ טבלאות ============ */
.table { margin: 0; border: none; }
.table > thead > tr > th {
	background: var(--thead-bg); border-bottom: 1px solid var(--line) !important;
	border-top: none !important; color: var(--muted); font-size: 11px; font-weight: 700;
	letter-spacing: .2px; padding: 11px 9px; white-space: nowrap; vertical-align: middle;
}
.table > tbody > tr > td {
	font-size: 12.5px !important; color: var(--txt-2);
	border-top: 1px solid #f4f6f9 !important; padding: 9px !important;
	vertical-align: middle; line-height: 1.45;
}
.table-striped > tbody > tr:nth-of-type(odd) { background: #fff; }
.table-hover > tbody > tr:hover { background: #f7fbff !important; }
table tr td { cursor: pointer; }
.markrow { background: #eef7ff !important; font-weight: 700; }

.btnOpenOrder {
	display: inline-block; background: #f4f6f9; border-radius: 6px; padding: 2px 8px;
	font-family: 'Consolas', 'Courier New', monospace; font-weight: 700;
	color: var(--txt) !important; font-size: 12px;
}
tr:hover .btnOpenOrder { background: var(--primary); color: #fff !important; }

.pill { display: inline-block; border-radius: 20px; padding: 3px 11px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill-open { background: #eef4ff; color: #3b82f6; }
.pill-done { background: #e8faf0; color: var(--success); }
.pill-cancel { background: #fdeef1; color: var(--danger); }

.openEasyBook, .openEasyBook i { color: var(--muted) !important; }
.openEasyBook:hover i { color: var(--primary) !important; }
.numText { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0; }
.table-responsive { border: none; margin: 0; }

/* ============ מודאלים (Bootstrap 3) ============ */
.modal-content { border: none; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,.15); }
.modal-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); border: none; padding: 16px 24px; }
.modal-header .modal-title { color: #fff; font-size: 17px; font-weight: 700; margin: 0; }
.modal-header .close { color: #fff; opacity: .85; text-shadow: none; font-size: 24px; }
.modal-body { background: #f9fafc; padding: 22px 24px; font-size: 13.5px; color: var(--txt); }
.modal-footer { background: #fff; border-top: 1px solid var(--divider); padding: 12px 20px; }

/* ============ שכבת התקדמות (טעינת נתונים) ============ */
#ordProgressWrap {
	position: fixed; inset: 0; z-index: 100200;
	background: rgba(13, 25, 51, .55);
	display: none; align-items: center; justify-content: center;
}
#ordProgressWrap.show { display: flex; }
.ord-prog-card {
	background: #fff; border-radius: 14px; width: min(430px, 92vw);
	padding: 22px 24px; box-shadow: 0 18px 50px rgba(13,25,51,.35); direction: rtl;
}
.ord-prog-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--txt); }
.ord-prog-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; min-height: 17px; }
.ord-prog-track { height: 8px; border-radius: 6px; background: #eef0f4; overflow: hidden; }
.ord-prog-bar {
	height: 100%; width: 0; border-radius: 6px;
	background: linear-gradient(90deg, var(--primary), var(--success));
	transition: width .3s ease;
}
.ord-prog-count { text-align: left; font-size: 11.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.ord-prog-steps { margin: 12px 0 0; padding: 0; list-style: none; }
.ord-prog-steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); padding: 3px 0; }
.ord-prog-steps li .st-ic {
	width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--line);
	display: inline-flex; align-items: center; justify-content: center; font-size: 9px; color: #fff; flex: 0 0 17px;
}
.ord-prog-steps li.doing { color: var(--txt); font-weight: 700; }
.ord-prog-steps li.doing .st-ic { border-color: var(--primary); }
.ord-prog-steps li.done { color: var(--txt-2); }
.ord-prog-steps li.done .st-ic { background: var(--success); border-color: var(--success); }

/* חיווי קטן (טעינת הזמנה בודדת) */
#ordMiniLoad {
	position: fixed; inset: 0; z-index: 100150;
	background: rgba(13,25,51,.45); display: none; align-items: center; justify-content: center;
}
#ordMiniLoad.show { display: flex; }
.ord-mini-card {
	background: #fff; border-radius: 12px; padding: 16px 26px;
	display: flex; align-items: center; gap: 12px;
	box-shadow: 0 14px 40px rgba(13,25,51,.3); font-weight: 700; color: var(--txt); direction: rtl;
}
.ord-spin {
	width: 22px; height: 22px; border-radius: 50%;
	border: 3px solid #e4ecf7; border-top-color: var(--primary);
	animation: ordspin .8s linear infinite;
}
@keyframes ordspin { to { transform: rotate(360deg); } }
#loading-image { display: none !important; }  /* הספינר הישן של tp.core */

/* ============ ציר זמן ולוח שלבים ============ */
#stageDash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 900px) { #stageDash { grid-template-columns: repeat(2, 1fr); } }
.sd-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.sd-card .sd-top { display: flex; justify-content: space-between; align-items: baseline; }
.sd-card .sd-name { font-size: 12px; font-weight: 700; color: var(--txt-2); }
.sd-card .sd-nums { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sd-card .sd-nums small { font-size: 11px; color: var(--faint); font-weight: 600; }
.sd-bar { height: 6px; border-radius: 5px; background: #eef0f4; margin-top: 8px; overflow: hidden; }
.sd-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); border-radius: 5px; transition: width .3s; }
.sd-card.sd-total { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%); border: none; }
.sd-card.sd-total .sd-name { color: rgba(255,255,255,.7); }
.sd-card.sd-total .sd-nums, .sd-card.sd-total .sd-nums small { color: #fff; }

.tl-group { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.tl-head {
	display: flex; align-items: center; gap: 10px;
	padding: 11px 15px; border-bottom: 1px solid var(--divider); background: #fbfcfe;
}
.tl-head .tl-title { font-size: 13px; font-weight: 800; color: var(--txt); }
.tl-head .tl-count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-head .tl-track { flex: 1; max-width: 220px; height: 6px; border-radius: 5px; background: #eef0f4; overflow: hidden; }
.tl-head .tl-track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); }

.tl-steps { display: flex; overflow-x: auto; padding: 18px 10px 14px; gap: 0; }
.tl-step { flex: 0 0 128px; position: relative; text-align: center; cursor: pointer; padding: 0 4px; }
.tl-step:not(:last-child):after {
	content: ""; position: absolute; top: 14px; left: -50%; width: 100%;
	height: 3px; background: var(--line); z-index: 0;
}
.tl-step.done:not(:last-child):after { background: var(--success); }
.tl-node {
	width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 7px;
	border: 3px solid var(--line); background: #fff; position: relative; z-index: 1;
	display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
	transition: transform .12s;
}
.tl-step:hover .tl-node { transform: scale(1.12); }
.tl-step.done .tl-node { background: var(--success); border-color: var(--success); }
.tl-step.next .tl-node { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px #eef4ff; }
.tl-step .tl-name { font-size: 11.5px; font-weight: 700; color: var(--txt-2); line-height: 1.3; min-height: 30px; }
.tl-step.done .tl-name { color: var(--txt); }
.tl-step .tl-date {
	display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 700;
	background: #f4f6f9; color: var(--muted); border-radius: 9px; padding: 1px 8px;
	font-variant-numeric: tabular-nums;
}
.tl-step.done .tl-date { background: #e8faf0; color: var(--success); }
.tl-step .tl-remark-dot {
	width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
	display: inline-block; margin-right: 4px;
}

/* דיאלוג דיווח שלב */
#stageReportWrap {
	position: fixed; inset: 0; z-index: 100250;
	background: rgba(13,25,51,.55); display: none; align-items: center; justify-content: center;
}
#stageReportWrap.show { display: flex; }
.sr-card { background: #fff; border-radius: 14px; width: min(380px, 92vw); overflow: hidden; box-shadow: 0 18px 50px rgba(13,25,51,.35); direction: rtl; }
.sr-head { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #fff; padding: 14px 20px; font-weight: 800; font-size: 15px; }
.sr-body { padding: 18px 20px; }
.sr-body .sr-stage { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 12px; }
.sr-body label { font-size: 11px; font-weight: 700; color: var(--muted); display: block; margin: 10px 0 4px; }
.sr-foot { display: flex; gap: 8px; justify-content: flex-start; padding: 12px 20px; border-top: 1px solid var(--divider); }

/* הסתרת מודאל האישור הישן כשהדיווח נעשה מהציר */
body.ord-silent-confirm #msgModal1,
body.ord-silent-confirm .modal-backdrop { display: none !important; }

/* תצוגה קלאסית של השלבים - מוסתרת כברירת מחדל */
body:not(.stage-classic) #stageLines,
body:not(.stage-classic) .stage-classic-head { display: none; }
#stageLines .input-group-addon.fa-calendar1 { background: #f4f6f9; border: 1px solid var(--line); border-radius: 0 7px 7px 0; color: var(--muted); }
#stageLines .btn { font-size: 12px; padding: 7px 10px; }
#stageLines .form-control { height: 34px; }
#stageLines label { font-size: 12.5px; color: var(--txt-2); }
.labelNewStyleInRow h4 {
	background: #eef4ff !important; color: var(--primary); font-size: 13px; font-weight: 700;
	border-radius: 8px; padding: 9px 12px !important; margin: 14px 0 8px;
}

/* ============ תצוגת PDF ============ */
#pdfPreviewWrap {
	position: fixed; inset: 0; z-index: 100240;
	background: rgba(13,25,51,.6); display: none; align-items: center; justify-content: center;
}
#pdfPreviewWrap.show { display: flex; }
.pdf-card {
	background: #fff; border-radius: 14px; width: min(1100px, 95vw); height: 92vh;
	display: flex; flex-direction: column; overflow: hidden;
	box-shadow: 0 18px 50px rgba(13,25,51,.4); direction: rtl;
}
.pdf-head {
	background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff;
	padding: 12px 18px; display: flex; align-items: center; gap: 10px;
}
.pdf-head .pdf-title { font-weight: 800; font-size: 14px; flex: 1; }
.pdf-body { flex: 1; background: #4a4f5e; }
.pdf-body iframe { width: 100%; height: 100%; border: none; }

/* ============ טיפ כהה ============ */
#globalTip {
	position: fixed; z-index: 100300; max-width: 300px;
	background: var(--ink); color: #fff; border-radius: 8px; padding: 7px 12px;
	font: 12px/1.5 Heebo, sans-serif; direction: rtl; pointer-events: none;
	box-shadow: 0 8px 24px rgba(24, 28, 50, .35);
	opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
#globalTip.show { opacity: 1; transform: translateY(0); }

/* ============ Select2 ============ */
.select2-container .select2-selection--single { height: 36px; border: 1px solid var(--line); border-radius: 7px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 34px; }

/* ============ דף התחברות ============ */
.tp-login-bg {
	min-height: 100vh; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 55%, #12365c 100%);
}
.tp-login-card {
	background: #fff; border-radius: 16px; width: min(400px, 92vw);
	box-shadow: 0 24px 70px rgba(0,0,0,.45); overflow: hidden; direction: rtl;
}
.tp-login-head { padding: 26px 28px 6px; text-align: center; }
.tp-login-head img { height: 56px; margin-bottom: 10px; }
.tp-login-head h1 { font-size: 19px; font-weight: 800; color: var(--txt); margin: 0; }
.tp-login-head p { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.tp-login-body { padding: 18px 28px 26px; }
.tp-login-body label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.tp-login-body .form-control { height: 42px; font-size: 14px; margin-bottom: 12px; }
.tp-remember { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--txt-2); margin: 2px 0 14px; }
.tp-remember input { margin: 0; }
#btnLogIn.tp-login-btn {
	width: 100%; height: 44px; font-size: 14.5px; font-weight: 700;
	background: var(--primary); border-radius: 9px; color: #fff;
}
#btnLogIn.tp-login-btn:hover { background: var(--primary-hover); }
.tp-login-foot { text-align: center; font-size: 11px; color: var(--faint); padding: 0 0 18px; }

/* ============ הדפסה ============ */
@media print {
	.noprint, .tp-topbar, .tp-side, .tp-toolbar, .kpi-row, .tp-filters { display: none !important; }
	.tp-shell { padding: 0; }
}

/* ============ כפתור העתקה ללוח (סיסמאות) ============ */
.tp-copy {
	background: none; border: none; padding: 3px; margin-right: 7px;
	cursor: pointer; color: var(--faint); vertical-align: middle;
	border-radius: 6px; line-height: 0; transition: color .12s, background .12s;
}
.tp-copy:hover { color: var(--primary); background: #eef4ff; }
.tp-copy.ok { color: var(--success); background: #e8faf0; }
.tp-copy svg { width: 15px; height: 15px; display: inline-block; }

/* ============ בורר תצוגה (טבלה / כרטיסיות) ============ */
.tp-viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.tp-viewtoggle button {
	background: #fff; border: none; padding: 8px 13px; font-size: 12px; font-weight: 700;
	color: var(--txt-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
	font-family: inherit; transition: background .12s, color .12s;
}
.tp-viewtoggle button + button { border-right: 1px solid var(--line); }
.tp-viewtoggle button.active { background: var(--primary); color: #fff; }
.tp-viewtoggle svg { width: 14px; height: 14px; }

/* ============ תצוגת כרטיסיות לנתוני טבלה ============ */
.tp-cards { display: none; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; padding: 14px 16px; }
.view-cards .tp-cards { display: grid; }
.view-cards .tp-cards-hide { display: none; }
.tp-datacard {
	background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
	cursor: pointer; transition: box-shadow .15s, transform .12s, border-color .15s;
}
.tp-datacard:hover { box-shadow: 0 6px 18px rgba(13,25,51,.08); transform: translateY(-1px); border-color: #cfe6ff; }
.tp-datacard .dc-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tp-datacard .dc-title { font-size: 13.5px; font-weight: 800; color: var(--txt); line-height: 1.35; }
.tp-datacard .dc-code {
	background: #f4f6f9; border-radius: 6px; padding: 2px 8px; flex: 0 0 auto;
	font-family: 'Consolas', 'Courier New', monospace; font-weight: 700; font-size: 12px; color: var(--txt);
}
.tp-datacard .dc-sub { font-size: 11.5px; color: var(--muted); margin: 3px 0 9px; }
.tp-datacard .dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.tp-datacard .dc-field { font-size: 12px; color: var(--txt-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-datacard .dc-field b { display: block; color: var(--faint); font-weight: 700; font-size: 10px; letter-spacing: .2px; }
.tp-datacard .dc-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; border-top: 1px solid var(--divider); padding-top: 9px; }
.tp-datacard .dc-pills .pill { font-size: 10px; padding: 2px 8px; }
.dc-empty { grid-column: 1/-1; text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

/* ============ המבורגר + מגירת ניווט במובייל ============ */
.tp-burger {
	display: none; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
	color: #fff; border-radius: 8px; width: 38px; height: 36px;
	align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto;
}
.tp-burger svg { width: 19px; height: 19px; }
.tp-side-scrim { position: fixed; inset: 0; background: rgba(13,25,51,.45); z-index: 1090; display: none; }
body.side-open .tp-side-scrim { display: block; }

@media (max-width: 900px) {
	.tp-burger { display: inline-flex; }
	.tp-topbar { padding: 0 12px; height: 56px; gap: 10px; }
	.tp-topbar .brand span { font-size: 13.5px; }
	.tp-shell { flex-direction: column; padding: 10px; gap: 10px; }
	.tp-side {
		position: fixed; top: 0; right: 0; height: 100%; width: min(280px, 82vw);
		z-index: 1100; border-radius: 0; border: none; padding-top: 70px; overflow: auto;
		transform: translateX(105%); transition: transform .2s ease;
		box-shadow: -8px 0 30px rgba(13,25,51,.25);
	}
	body.side-open .tp-side { transform: none; }
	.tp-main { width: 100%; }
	.innerPageTitle h1, .innerPageTitle h2, .page-header { font-size: 16px; margin-bottom: 10px; }
	.kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.kpi { padding: 10px 12px; gap: 9px; }
	.kpi .kpi-num { font-size: 16px; }
	.tp-filters { flex-direction: column; align-items: stretch; gap: 10px; }
	.tp-field { min-width: 0; }
	.tp-toolbar { padding: 10px 12px; gap: 8px; }
	#dtSearchSlot, .dataTables_filter, .dataTables_filter label { width: 100%; }
	.dataTables_filter input { width: 100% !important; }
	.tp-toolbar .tb-actions { flex-wrap: wrap; }
	.chips { gap: 5px; }
	.chip { padding: 6px 11px; font-size: 12px; }
	.panel-body, .tp-card-body { padding: 12px; }
	.modal-dialog { width: auto !important; margin: 8px !important; }
	.pdf-card { width: 100vw; height: 100vh; border-radius: 0; }
	.sr-card, .ord-prog-card { width: min(94vw, 400px); }
	#stageDash { grid-template-columns: 1fr 1fr; gap: 8px; }
	.tl-step { flex: 0 0 106px; }
	.tl-step .tl-name { font-size: 10.5px; }
	.tp-cards { grid-template-columns: 1fr; padding: 12px; }
	.tp-login-card { border-radius: 12px; }
}
@media (max-width: 400px) {
	#stageDash { grid-template-columns: 1fr; }
	.tp-toolbar .btn { padding: 7px 10px; font-size: 11.5px; }
}

/* בורר תצוגה קטן בכותרת פאנל */
.tp-viewtoggle.vt-sm button { padding: 5px 9px; font-size: 11px; gap: 4px; }
.tp-viewtoggle.vt-sm svg { width: 12px; height: 12px; }
.panel-heading .tp-viewtoggle { flex: 0 0 auto; }

/* שורת פעולות בכרטיס הזמנה - מערכות הספר */
.dc-actions { display: flex; gap: 6px; margin-top: 9px; }
.dc-actions .dc-act {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	border: none; border-radius: 7px; padding: 7px 10px; font-size: 11.5px; font-weight: 700;
	cursor: pointer; font-family: inherit; text-decoration: none !important; transition: all .13s;
}
.dc-actions svg { width: 13px; height: 13px; }
.dc-act.dc-oldbook { background: #eef0f4; color: var(--ink) !important; }
.dc-act.dc-oldbook:hover { background: var(--ink); color: #fff !important; }
.dc-act.dc-newbook { background: #fff4de; color: var(--orange) !important; }
.dc-act.dc-newbook:hover { background: var(--orange); color: #fff !important; }