/* Khadamatk custom client theme. Loaded after app_customers_head output.
   Shared tokens/forms are generated in assets/css/custom.css.
   Layout follows mockup-portal.html; content remains live Perfex data. */
body.customers.kh-portal { margin:0; background:var(--kh-bg); color:var(--kh-text); font:15px/1.75 var(--kh-body); }
body.customers.kh-portal .container { width:min(1180px, calc(100% - 32px)); padding-inline:0; }
body.customers.kh-portal #wrapper { margin:0; padding:0; min-height:calc(100vh - 150px); }
body.customers.kh-portal #content { padding:40px 0 72px; }
body.customers.kh-portal .kh-shell > #content > .container > .row { margin-inline:0; }
body.customers.kh-portal .header { margin:0; padding:0; min-height:72px; background:var(--kh-card); }
body.customers.kh-portal .header > .container { display:flex; align-items:center; gap:20px; min-height:72px; }
body.customers.kh-portal .header .navbar-header { flex:none; float:none; }
body.customers.kh-portal .kh-brand { display:flex; align-items:center; gap:12px; color:var(--kh-text); font:600 16px var(--kh-heading); white-space:nowrap; }
body.customers.kh-portal .kh-brand .navbar-brand { float:none; display:flex; align-items:center; padding:0; height:auto; margin:0; }
body.customers.kh-portal .kh-brand img { width:auto; height:38px; max-width:64px; object-fit:contain; }
body.customers.kh-portal .navbar-collapse { flex:1; padding:0; }
body.customers.kh-portal .navbar-nav { float:none !important; display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:4px; margin:0; }
body.customers.kh-portal .navbar-nav > li { float:none; }
body.customers.kh-portal .navbar-nav > li > a { font-size:14px; padding:9px 12px; color:var(--kh-secondary); }
body.customers.kh-portal .navbar-nav > .active > a { background:transparent; color:var(--kh-text); border-radius:0; box-shadow:inset 0 -2px var(--kh-red); }
body.customers.kh-portal .navbar-nav > .customers-nav-item-profile > a { display:flex; align-items:center; gap:8px; border:1px solid var(--kh-border); border-radius:999px; width:auto; height:auto; min-height:0; padding:7px 12px; line-height:1.5; }
body.customers.kh-portal .kh-contact-name { max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.customers.kh-portal .customer-top-submenu { margin:0 0 20px; padding:0; display:flex; gap:18px; flex-wrap:wrap; }
body.customers.kh-portal .kh-page-title,
body.customers.kh-portal :is(h1,h2,h3,h4,h5,h6).section-heading { font:600 clamp(24px,2.6vw,34px)/1.4 var(--kh-heading); margin:0 0 24px; color:var(--kh-text); }
body.customers.kh-portal .kh-label { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--kh-muted); margin-bottom:8px; }
body.customers.kh-portal .kh-label::before { content:""; width:26px; height:1px; background:var(--kh-hover); flex:none; }
body.customers.kh-portal .kh-card { background:var(--kh-card); border:1px solid var(--kh-line); border-radius:18px; padding:24px; min-width:0; }
body.customers.kh-portal .kh-section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
body.customers.kh-portal .kh-section-head h2,
body.customers.kh-portal .kh-proposal-actions h2 { font:600 17px/1.7 var(--kh-heading); margin:0; }
body.customers.kh-portal .kh-note { color:var(--kh-secondary); font-size:14.5px; line-height:1.8; overflow-wrap:anywhere; }
body.customers.kh-portal .btn { padding:12px 24px; font-size:14.5px; }
body.customers.kh-portal .btn-sm { padding:7px 16px; font-size:13.5px; }
body.customers.kh-portal .form-control { min-height:46px; font-size:15px; }
body.customers.kh-portal .text-success { color:var(--kh-success) !important; }
/* Preserve status distinctions while replacing vendor neutral surfaces in dark mode. */
body.customers.kh-portal[data-theme="dark"] :is(.tw-bg-white,.tw-bg-neutral-50,.tw-bg-neutral-100,.panel-heading,.panel-footer,.input-group-addon,.well) { background-color:var(--kh-card) !important; color:var(--kh-text); }
body.customers.kh-portal[data-theme="dark"] :is(.tw-text-neutral-500,.tw-text-neutral-600,.tw-text-neutral-700,.tw-text-neutral-800,.tw-text-neutral-900) { color:var(--kh-secondary) !important; }
body.customers.kh-portal[data-theme="dark"] :is(.tw-border-neutral-100,.tw-border-neutral-200,.tw-border-neutral-300) { border-color:var(--kh-line) !important; }
body.customers.kh-portal .kh-login { display:grid; grid-template-columns:1fr 1fr; min-height:calc(100vh - 230px); border-radius:26px; overflow:hidden; border:1px solid var(--kh-line); background:var(--kh-card); }
body.customers.kh-portal .kh-login-side { background:#A3150B; color:#fff; padding:56px 48px; position:relative; display:flex; align-items:flex-start; overflow:hidden; }
body.customers.kh-portal .kh-login-side .kh-label { color:#F6D4CF; }
body.customers.kh-portal .kh-login-side .kh-label::before { background:#fff; }
body.customers.kh-portal .kh-login-side h2 { color:#fff; font:600 clamp(28px,3vw,44px)/1.4 var(--kh-heading); margin:0; }
body.customers.kh-portal .kh-login-side ul { list-style:none; padding:0; display:grid; gap:12px; margin-top:28px; color:#F6D4CF; }
body.customers.kh-portal .kh-login-side li { display:flex; gap:12px; }
body.customers.kh-portal .kh-login-side li::before { content:""; flex:none; width:9px; height:9px; background:#fff; margin-top:10px; }
body.customers.kh-portal .kh-login-content { padding:48px; align-self:center; min-width:0; }
body.customers.kh-portal .kh-login-content .form-group { margin-bottom:16px; }
body.customers.kh-portal .kh-login-content label { font-weight:600; }
body.customers.kh-portal .kh-login-content input:is([name="email"],[name="password"]) { direction:ltr; }
body.customers.kh-portal .kh-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:24px 0 16px; }
body.customers.kh-portal a.kh-stat { display:block; border:1px solid var(--kh-line); border-radius:18px; padding:24px; background:var(--kh-card); color:var(--kh-muted); text-decoration:none; }
body.customers.kh-portal .kh-stat strong { display:block; font:600 30px/1.3 var(--kh-heading); margin-top:6px; color:var(--kh-text); }
body.customers.kh-portal a.kh-stat-hot { border-color:var(--kh-hover); }
body.customers.kh-portal .kh-stat-hot strong { color:var(--kh-hover); }
body.customers.kh-portal .kh-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:16px; }
body.customers.kh-portal .kh-project { padding-block:16px; border-top:1px solid var(--kh-line); }
body.customers.kh-portal .kh-project-title { display:flex; justify-content:space-between; gap:16px; font-weight:600; }
body.customers.kh-portal .kh-project-title a { color:var(--kh-text); overflow-wrap:anywhere; }
body.customers.kh-portal .kh-project-title span { color:var(--kh-muted); font-size:13px; flex:none; }
body.customers.kh-portal .kh-progress { height:8px; border-radius:999px; background:var(--kh-soft); overflow:hidden; margin-top:8px; }
body.customers.kh-portal .kh-progress span { display:block; height:100%; background:var(--kh-red); border-radius:inherit; }
body.customers.kh-portal .kh-activity { padding-bottom:12px; border-bottom:1px solid var(--kh-line); }
body.customers.kh-portal .kh-activity small { display:block; color:var(--kh-muted); }
body.customers.kh-portal .kh-payment-details { margin-top:24px; }
body.customers.kh-portal summary { cursor:pointer; color:var(--kh-secondary); padding:12px 0; }
body.customers.kh-portal .kh-invoice-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
body.customers.kh-portal .kh-invoice-tabs .kh-tab-active { background:var(--kh-text); color:var(--kh-bg); border-color:var(--kh-text); }
body.customers.kh-portal .kh-table-scroll { max-width:100%; overflow-x:auto; }
body.customers.kh-portal .kh-table-scroll > table { min-width:640px; }
body.customers.kh-portal .table > thead > tr > th { background:transparent; padding:12px 14px; }
body.customers.kh-portal .kh-document-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
body.customers.kh-portal .kh-document-heading .label { flex:none; }
body.customers.kh-portal .kh-document-heading .kh-page-title { margin-bottom:8px; }
/* 2026-11-17: Bootstrap's .row clearfix ::before/::after become grid items and push the columns out of place. */
body.customers.kh-portal #proposal-wrapper > .row::before, body.customers.kh-portal #proposal-wrapper > .row::after,
body.customers.kh-portal .kh-ticket-grid::before, body.customers.kh-portal .kh-ticket-grid::after { content:none; display:none; }
body.customers.kh-portal #proposal-wrapper > .row { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:16px; margin:0; }
body.customers.kh-portal #proposal-wrapper .proposal-left,
body.customers.kh-portal #proposal-wrapper .proposal-right { width:auto; float:none; min-width:0; padding:0; }
body.customers.kh-portal .proposal-left .panel_s { margin-top:0 !important; }
body.customers.kh-portal .proposal-content { overflow-wrap:anywhere; overflow-x:auto; }
body.customers.kh-portal .proposal-content .items-preview :is(th, td):not(.description) { white-space:nowrap; overflow-wrap:normal; }
body.customers.kh-portal .proposal-content img { max-width:100%; height:auto; }
body.customers.kh-portal .kh-proposal-actions { display:flex; flex-direction:column; gap:10px; }
body.customers.kh-portal .kh-proposal-actions form { margin:0; }
body.customers.kh-portal .kh-proposal-actions .btn { width:100%; float:none !important; margin:0 !important; white-space:normal; }
body.customers.kh-portal .kh-proposal-actions .btn-success { background:var(--kh-red); color:#fff; border-color:var(--kh-red); }
body.customers.kh-portal .proposal-html-tabs { background:var(--kh-card); border:1px solid var(--kh-line); border-radius:18px; padding:24px; }
body.customers.kh-portal .kh-ticket-title { overflow-wrap:anywhere; }
body.customers.kh-portal .kh-ticket-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:16px; margin:0; }
body.customers.kh-portal .kh-ticket-grid > .ticket-info { grid-column:2; grid-row:auto; order:2; width:auto; padding:0; }
body.customers.kh-portal .kh-ticket-thread { grid-column:1; grid-row:auto; order:1; width:auto; min-width:0; padding:0; }
body.customers.kh-portal .single-ticket-project-area { grid-column:1/-1; order:0; width:auto; }
body.customers.kh-portal .kh-ticket-thread > .panel_s { border-inline-start:3px solid var(--kh-red); }
body.customers.kh-portal .kh-ticket-thread > .client-reply { border-inline-start:1px solid var(--kh-line); }
body.customers.kh-portal .kh-ticket-thread .panel-body > .row { display:flex; flex-direction:column; gap:12px; }
body.customers.kh-portal .kh-ticket-thread .panel-body > .row > div { width:100%; border:0; overflow-wrap:anywhere; }
body.customers.kh-portal .kh-ticket-thread .preview_image img { max-width:100%; }
body.customers.kh-portal .kh-ticket-compose { margin-top:16px; }
body.customers.kh-portal .kh-footer-content { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:20px 0; font-size:13px; }
body.customers.kh-portal .footer { padding:0; }
body.customers.kh-portal .kh-footer-content .copyright-footer { white-space:normal; overflow-wrap:anywhere; }
body.customers.kh-portal[data-theme="dark"] :is(label,.checkbox label,.text-dark,.text-neutral-500,.text-neutral-600,.text-neutral-700,.text-neutral-800) { color:var(--kh-secondary) !important; }
body.customers.kh-portal[data-theme="dark"] .table :is(td,th,td p,td strong,td b,td span:not(.label)) { color:var(--kh-secondary) !important; }
body.customers.kh-portal[data-theme="dark"] .table > thead > tr > th { background:var(--kh-soft) !important; }
body.customers.kh-portal[data-theme="dark"] :is(.invoice-html-company-info,.estimate-html-company-info,.proposal-html-company-info) b { color:var(--kh-text) !important; }
body.customers.kh-portal .kh-brand .logo img { content:url('../images/logo-mark-on-light.png'); }
body.customers.kh-portal[data-theme="dark"] .kh-brand .logo img { content:url('../images/logo-mark-on-dark.png'); }
body.customers.kh-portal[data-theme="dark"] .kh-brand .logo { background:transparent; padding:0; }
@media(max-width:1000px) {
 body.customers.kh-portal .header > .container { flex-wrap:wrap; gap:0; padding-block:12px; }
 body.customers.kh-portal .header .navbar-header { width:100%; display:flex; justify-content:space-between; align-items:center; }
 body.customers.kh-portal .navbar-toggle { display:block; float:none; order:2; margin:0; }
 body.customers.kh-portal .navbar-collapse.collapse:not(.in) { display:none !important; }
 body.customers.kh-portal .navbar-collapse { flex-basis:100%; }
 body.customers.kh-portal .navbar-nav { align-items:stretch; flex-direction:column; padding-top:14px; }
 body.customers.kh-portal .navbar-nav .dropdown-menu { position:static; float:none; }
}

/* Review fixes 2026-11-12: theme-only presentation. */
body.customers.kh-portal .customer-top-submenu a { gap:8px; align-items:center; }
body.customers.kh-portal .customer-top-submenu a svg { flex:none; width:20px; height:20px; margin:0 !important; }
body.customers.kh-portal :is(.kh-payment-details,.kh-invoice-details) { border:1px solid var(--kh-line); border-radius:18px; background:var(--kh-card); padding:16px; }
body.customers.kh-portal :is(.kh-payment-details,.kh-invoice-details) > summary { display:flex; align-items:center; gap:12px; color:var(--kh-text); font-size:15px; font-weight:600; padding:4px; list-style:none; }
body.customers.kh-portal :is(.kh-payment-details,.kh-invoice-details) > summary::before { content:'+'; font-size:20px; width:24px; text-align:center; flex:none; }
body.customers.kh-portal :is(.kh-payment-details,.kh-invoice-details)[open] > summary::before { content:'−'; }
body.customers.kh-portal :is(.kh-payment-details,.kh-invoice-details)[open] > summary { margin-bottom:16px; border-bottom:1px solid var(--kh-line); }
body.customers.kh-portal :is(.kh-payment-details,.kh-invoice-details) > summary:focus-visible { outline:2px solid var(--kh-secondary); outline-offset:2px; }
body.customers.kh-portal table.dataTable thead > tr > th:is(.sorting,.sorting_asc,.sorting_desc) { position:relative; padding-inline-start:12px !important; padding-inline-end:36px !important; }
body.customers.kh-portal table.dataTable thead > tr > th:is(.sorting,.sorting_asc,.sorting_desc)::after { position:absolute; inset-inline-end:10px; inset-inline-start:auto; top:50%; transform:translateY(-50%); margin:0; }
body.customers.kh-portal .dataTables_empty { text-align:start !important; color:var(--kh-secondary) !important; white-space:normal; }
body.customers.kh-portal .dataTables_wrapper.app_dt_empty table { min-width:0 !important; width:100% !important; }
body.customers.kh-portal[data-theme] :is(.section-heading-tickets,.tickets-summary-heading) { color:var(--kh-text) !important; }
@media(max-width:767px) {
 body.customers.kh-portal .tickets-summary-heading + dl { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:24px; }
 body.customers.kh-portal .tickets-summary-heading + dl a > div { padding:12px; }
}
@media(max-width:900px) {
 body.customers.kh-portal .kh-login,
 body.customers.kh-portal .kh-dashboard-grid,
 body.customers.kh-portal #proposal-wrapper > .row,
 body.customers.kh-portal .kh-ticket-grid { grid-template-columns:minmax(0,1fr); }
 body.customers.kh-portal .kh-login-side,
 body.customers.kh-portal .kh-login-content { padding:36px 24px; }
 body.customers.kh-portal .kh-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body.customers.kh-portal .kh-ticket-grid > .ticket-info { grid-column:1; grid-row:auto; order:2; }
 body.customers.kh-portal .kh-ticket-thread { grid-column:1; grid-row:auto; order:1; }
 body.customers.kh-portal .kh-card { padding:24px; }
 body.customers.kh-portal #content { padding-block:28px 48px; }
 body.customers.kh-portal .kh-document-heading { flex-wrap:wrap; }
 body.customers.kh-portal .kh-section-head { flex-wrap:wrap; }
 body.customers.kh-portal .dataTables_wrapper > .row { margin-inline:0; }
}

/* Unslop pass 2026-11-12: approved polish, original content and structure retained. */
body.customers.kh-portal .customer-top-submenu a { color:var(--kh-secondary) !important; }
body.customers.kh-portal .customer-top-submenu a:hover { color:var(--kh-text); }
body.customers.kh-portal .customer-top-submenu i { width:18px; text-align:center; margin-inline-end:4px; }
body.customers.kh-portal .kh-stat strong { font-weight:600; font-variant-numeric:tabular-nums; }
body.customers.kh-portal .footer > .container > .row { margin-inline:0; }
body.customers.kh-portal .kh-footer-content { min-width:0; width:100%; }
body.customers.kh-portal .copyright-footer { min-width:0; max-width:100%; }
body.customers.kh-portal .tickets-summary-heading + dl dd .tw-text-primary-600 { color:var(--kh-text); font-variant-numeric:tabular-nums; }
body.customers.kh-portal .tickets-summary-heading + dl dt { color:var(--kh-secondary) !important; }
body.customers.kh-portal .tickets-summary-heading + dl a[href$="/1"] dt { color:var(--kh-hover) !important; }
body.customers.kh-portal .tickets-summary-heading + dl a[href$="/2"] dt { color:var(--kh-info) !important; }
body.customers.kh-portal .tickets-summary-heading + dl a[href$="/3"] dt { color:var(--kh-success) !important; }
body.customers.kh-portal .tickets-summary-heading + dl a[href$="/4"] dt { color:var(--kh-warning) !important; }
body.customers.kh-portal .dataTables_wrapper > .row { margin-inline:0; }
body.customers.kh-portal .dataTables_wrapper > .row > div { min-width:0; }
body.customers.kh-portal .dataTables_filter .input-group { display:flex; align-items:stretch; }
body.customers.kh-portal .dataTables_filter .input-group input { min-width:0; width:100%; }
body.customers.kh-portal .dataTables_filter .input-group-addon { width:auto; display:flex; align-items:center; }
body.customers.kh-portal .dataTables_filter input { border-radius:12px; }
body.customers.kh-portal .kh-table-scroll .dataTables_wrapper table { min-width:640px; }
@media(max-width:767px) {
 body.customers.kh-portal .dataTables_wrapper > .row:has(.dataTables_filter) { display:flex; flex-direction:column; gap:12px; }
 body.customers.kh-portal .dataTables_wrapper > .row:has(.dataTables_filter)::before,
 body.customers.kh-portal .dataTables_wrapper > .row:has(.dataTables_filter)::after { display:none; }
 body.customers.kh-portal .dataTables_wrapper > .row:has(.dataTables_filter) > div { float:none !important; width:100% !important; padding-inline:0; }
 body.customers.kh-portal .dataTables_wrapper .dataTables_filter,
 body.customers.kh-portal .dataTables_wrapper .dataTables_length { position:static !important; inset:auto; float:none !important; width:100%; margin:0; text-align:start; }
 body.customers.kh-portal .dataTables_filter label { display:block; width:100%; }
 body.customers.kh-portal .dataTables_filter input { width:100% !important; margin:0; }
 body.customers.kh-portal .section-heading { overflow-wrap:anywhere; }
 body.customers.kh-portal .section-heading-tickets { font-size:24px; }
}
