/* ═══════════════════════════════════════════════════════════════════════
   OW Kundportal v2 — foundation (shell, tokens, components)
   Scope: every rule is prefixed with body.customers:not(.customers_login) so it never leaks
   into the admin and always beats perfex_office_theme's `body .x` rules.
   Page-specific rules live in ./portal/<page>.css
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) {
    /* Greys alias the admin --ow-* scale (custom.css :root loads in the portal too).
       --pt-surface stays solid white on purpose (--ow-surface is 70 % transparent). */
    --pt-bg: var(--ow-bg, #f4f6f8);
    --pt-surface: #ffffff;
    --pt-surface-2: var(--ow-surface-alt, #f8f9fa);
    --pt-surface-3: var(--ow-surface-muted, #f1f3f5);
    --pt-border: var(--ow-border, #e5e7eb);
    --pt-border-strong: var(--ow-border-strong, #d1d5db);
    --pt-border-input: #858d9b;          /* ≥3:1 boundary for form controls */
    --pt-text: var(--ow-text, #1f2937);
    --pt-text-2: var(--ow-text-soft, #4b5563);
    --pt-muted: var(--ow-text-muted, #6b7280);
    --pt-faint: var(--ow-text-dim, #9ca3af); /* decorative only — never text */
    /* Single accent = the public brand purple (optagonen.se). Swap here and the whole portal follows. */
    --pt-accent: #7a00df;
    --pt-accent-hover: #5c00a8;
    --pt-accent-soft: #f3e8ff;
    --pt-accent-text: #5c00a8;
    --pt-success: #15803d;
    --pt-success-soft: #ecfdf3;
    --pt-warning: #b45309;
    --pt-warning-soft: #fffbeb;
    --pt-danger: #b91c1c;
    --pt-danger-soft: #fef2f2;
    --pt-info: #5c00a8;
    --pt-info-soft: #f3e8ff;
    --pt-radius: 12px;
    --pt-radius-sm: 8px;
    --pt-radius-xs: 6px;
    --pt-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    --pt-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
    --pt-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
    --pt-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --pt-header-h: 60px;
    --pt-max-w: 1200px;
    --pt-focus: 0 0 0 3px rgba(122, 0, 223, 0.16); /* decorative halo only; real focus = outline */
}

/* ── Base ───────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) {
    background: var(--pt-bg) !important;
    background-image: none !important;
    color: var(--pt-text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.customers,
body.customers:not(.customers_login) h1, body.customers:not(.customers_login) h2, body.customers:not(.customers_login) h3, body.customers:not(.customers_login) h4, body.customers:not(.customers_login) h5, body.customers:not(.customers_login) h6,
body.customers:not(.customers_login) p, body.customers:not(.customers_login) a, body.customers:not(.customers_login) span, body.customers:not(.customers_login) div, body.customers:not(.customers_login) li,
body.customers:not(.customers_login) label, body.customers:not(.customers_login) input, body.customers:not(.customers_login) select, body.customers:not(.customers_login) textarea, body.customers:not(.customers_login) button,
body.customers:not(.customers_login) table, body.customers:not(.customers_login) tr, body.customers:not(.customers_login) th, body.customers:not(.customers_login) td, body.customers:not(.customers_login) img, body.customers:not(.customers_login) form, body.customers:not(.customers_login) fieldset,
body.customers:not(.customers_login) .btn, body.customers:not(.customers_login) .form-control, body.customers:not(.customers_login) .bootstrap-select .btn, body.customers:not(.customers_login) .dropdown-menu,
body.customers:not(.customers_login) .dataTables_wrapper, body.customers:not(.customers_login) .dataTables_wrapper input, body.customers:not(.customers_login) .dataTables_wrapper select {
    font-family: var(--pt-font) !important;
}
body.customers:not(.customers_login) a { color: var(--pt-accent-text); }
body.customers:not(.customers_login) a:hover, body.customers:not(.customers_login) a:focus { color: var(--pt-accent-hover); text-decoration: none; }
body.customers:not(.customers_login) :focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
body.customers:not(.customers_login) .pt-prose a, body.customers:not(.customers_login) .pt-notice a, body.customers:not(.customers_login) .cp-description-body a, body.customers:not(.customers_login) .ticket-message a { text-decoration: underline; }
body.customers:not(.customers_login) ::selection { background: var(--pt-accent-soft); }

/* Hide stock header/submenu (replaced by .pt-header) */
body.customers:not(.customers_login) .navbar.header,
body.customers:not(.customers_login) .customer-top-submenu { display: none !important; }

/* Layout wrapper from my_index.php */
body.customers:not(.customers_login) #wrapper { margin: 0; padding: 0; }
body.customers:not(.customers_login) #content { padding: 0; }
body.customers:not(.customers_login) .pt-page {
    max-width: var(--pt-max-w);
    margin: 0 auto;
    padding: 40px 24px 72px;
}
body.customers:not(.customers_login) .pt-page > .row { margin: 0; }

/* Skip link */
body.customers:not(.customers_login) .pt-skip {
    position: absolute; left: 12px; top: -48px; z-index: 2000;
    background: var(--pt-text); color: #fff; padding: 8px 14px; border-radius: var(--pt-radius-sm);
    font-weight: 600; transition: top .15s;
}
body.customers:not(.customers_login) .pt-skip:focus { top: 12px; color: #fff; }

/* ── Header / navigation ─────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--pt-surface);
    border-bottom: 1px solid var(--pt-border);
    transition: box-shadow .2s;
}
body.customers:not(.customers_login) .pt-header.is-scrolled { box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06); }
body.customers:not(.customers_login) .pt-header-inner {
    max-width: var(--pt-max-w); margin: 0 auto; padding: 0 24px;
    height: var(--pt-header-h);
    display: flex; align-items: center; gap: 12px;
}
body.customers:not(.customers_login) .pt-brand { display: flex; align-items: center; margin-right: 20px; }
body.customers:not(.customers_login) .pt-brand a { display: flex; align-items: center; }
body.customers:not(.customers_login) .pt-brand img { height: 28px !important; width: auto !important; max-width: 160px; margin: 0 !important; position: static !important; }
body.customers:not(.customers_login) .pt-brand .logo-text { font-weight: 700; font-size: 16px; color: var(--pt-text); }

body.customers:not(.customers_login) .pt-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
body.customers:not(.customers_login) .pt-nav-item { position: relative; }
body.customers:not(.customers_login) .pt-nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    height: var(--pt-header-h); padding: 0 12px;
    color: var(--pt-text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
    background: none; border: 0; cursor: pointer; text-decoration: none; position: relative;
}
body.customers:not(.customers_login) .pt-nav-link:hover { color: var(--pt-text); }
body.customers:not(.customers_login) .pt-nav-link.is-active { color: var(--pt-accent-text); font-weight: 600; }
body.customers:not(.customers_login) .pt-nav-link.is-active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
    background: var(--pt-accent); border-radius: 2px 2px 0 0;
}
body.customers:not(.customers_login) .pt-nav-link .pt-caret { width: 10px; height: 10px; color: var(--pt-faint); transition: transform .2s; }
body.customers:not(.customers_login) .pt-nav-link[aria-expanded="true"] .pt-caret { transform: rotate(180deg); }
body.customers:not(.customers_login) .pt-nav-link:focus-visible { outline-offset: -4px; border-radius: var(--pt-radius-sm); }

/* Dropdown menus (desktop) */
body.customers:not(.customers_login) .pt-menu {
    display: none; position: absolute; top: calc(100% - 6px); left: 0; min-width: 220px;
    background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow-lg); padding: 6px; z-index: 1001;
}
body.customers:not(.customers_login) .pt-menu.is-open { display: block; animation: ptMenuIn .16s ease-out; }
body.customers:not(.customers_login) .pt-menu--right { left: auto; right: 0; }
@keyframes ptMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
body.customers:not(.customers_login) .pt-menu-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--pt-radius-sm);
    color: var(--pt-text); font-size: 14px; text-decoration: none; white-space: nowrap;
}
body.customers:not(.customers_login) .pt-menu-item i { width: 16px; text-align: center; color: var(--pt-faint); font-size: 13px; }
body.customers:not(.customers_login) .pt-menu-item:hover, body.customers:not(.customers_login) .pt-menu-item:focus-visible { background: var(--pt-surface-2); color: var(--pt-text); box-shadow: none; }
body.customers:not(.customers_login) .pt-menu-item.is-active { color: var(--pt-accent-text); font-weight: 600; background: var(--pt-accent-soft); }
body.customers:not(.customers_login) .pt-menu-item.is-active i { color: var(--pt-accent); }
body.customers:not(.customers_login) .pt-menu-item--danger { color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-menu-item--danger i { color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-menu-item--danger:hover { background: var(--pt-danger-soft); color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-menu-sep { height: 1px; background: var(--pt-border); margin: 6px 4px; }
body.customers:not(.customers_login) .pt-menu-label { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
body.customers:not(.customers_login) .pt-menu-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--pt-border); }
body.customers:not(.customers_login) .pt-menu-head-name { font-weight: 600; font-size: 14px; color: var(--pt-text); line-height: 1.3; }
body.customers:not(.customers_login) .pt-menu-head-sub { font-size: 12.5px; color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-menu-badge {
    margin-left: auto; background: var(--pt-accent); color: #fff; font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
}

/* Account button */
body.customers:not(.customers_login) .pt-account { margin-left: auto; position: relative; }
body.customers:not(.customers_login) .pt-account-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 3px 10px 3px 3px;
    border: 1px solid var(--pt-border); border-radius: 20px; background: var(--pt-surface); cursor: pointer;
    color: var(--pt-text); font-size: 13.5px; font-weight: 500;
}
body.customers:not(.customers_login) .pt-account-btn:hover { background: var(--pt-surface-2); border-color: var(--pt-border-strong); }
body.customers:not(.customers_login) .pt-account-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
body.customers:not(.customers_login) .pt-account-btn .pt-caret { width: 10px; height: 10px; color: var(--pt-faint); }
body.customers:not(.customers_login) .pt-account-btn[aria-expanded="true"] .pt-caret { transform: rotate(180deg); }
body.customers:not(.customers_login) .pt-account .pt-menu { min-width: 250px; }

/* Public (logged-out) header actions */
body.customers:not(.customers_login) .pt-header-actions { margin-left: auto; display: flex; gap: 8px; }

/* Mobile toggle */
body.customers:not(.customers_login) .pt-toggle {
    display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--pt-border); border-radius: var(--pt-radius-sm);
    background: var(--pt-surface); cursor: pointer; align-items: center; justify-content: center; color: var(--pt-text);
}
body.customers:not(.customers_login) .pt-toggle svg { width: 20px; height: 20px; }
body.customers:not(.customers_login) .pt-toggle .pt-icon-close { display: none; }
body.customers:not(.customers_login) .pt-toggle[aria-expanded="true"] .pt-icon-burger { display: none; }
body.customers:not(.customers_login) .pt-toggle[aria-expanded="true"] .pt-icon-close { display: block; }

/* Mobile sheet */
body.customers:not(.customers_login) .pt-sheet {
    display: none; position: fixed; top: var(--pt-header-h); left: 0; right: 0; bottom: 0; z-index: 999;
    background: var(--pt-surface); overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
}
body.customers:not(.customers_login) .pt-sheet.is-open { display: block; animation: ptMenuIn .18s ease-out; }
body.customers.pt-sheet-open { overflow: hidden; }
body.customers:not(.customers_login) .pt-sheet-group { padding: 6px 0 10px; }
body.customers:not(.customers_login) .pt-sheet-group + .pt-sheet-group { border-top: 1px solid var(--pt-border); }
body.customers:not(.customers_login) .pt-sheet-label { padding: 12px 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-sheet-link {
    display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 10px; border-radius: var(--pt-radius-sm);
    color: var(--pt-text); font-size: 16px; font-weight: 500; text-decoration: none;
}
body.customers:not(.customers_login) .pt-sheet-link i { width: 20px; text-align: center; color: var(--pt-faint); }
body.customers:not(.customers_login) .pt-sheet-link.is-active { background: var(--pt-accent-soft); color: var(--pt-accent-text); font-weight: 600; }
body.customers:not(.customers_login) .pt-sheet-link.is-active i { color: var(--pt-accent); }
body.customers:not(.customers_login) .pt-sheet-link:hover { background: var(--pt-surface-2); color: var(--pt-text); }
body.customers:not(.customers_login) .pt-sheet-link--danger { color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-sheet-link--danger i { color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-sheet-head { display: flex; align-items: center; gap: 12px; padding: 12px 8px; }
body.customers:not(.customers_login) .pt-sheet-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--pt-border); }

/* ── Page head / sections ────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 20px;
}
body.customers:not(.customers_login) .pt-title { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--pt-text); margin: 0; line-height: 1.25; }
body.customers:not(.customers_login) .pt-subtitle { margin: 6px 0 0; color: var(--pt-muted); font-size: 16px; }
body.customers:not(.customers_login) .pt-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pt-muted); margin: 0 0 6px; }
body.customers:not(.customers_login) .pt-page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
body.customers:not(.customers_login) .pt-section { margin-bottom: 52px; }
body.customers:not(.customers_login) .pt-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
body.customers:not(.customers_login) .pt-section-title { font-size: 23px; font-weight: 650; letter-spacing: -0.015em; color: var(--pt-text); margin: 0; display: flex; align-items: center; gap: 8px; }
body.customers:not(.customers_login) .pt-section-title i { color: var(--pt-faint); font-size: 14px; }
body.customers:not(.customers_login) .pt-link { font-size: 13.5px; font-weight: 500; color: var(--pt-accent-text); text-decoration: none; white-space: nowrap; }
body.customers:not(.customers_login) .pt-link:hover { text-decoration: underline; }
body.customers:not(.customers_login) .pt-link i { font-size: 11px; margin-left: 2px; }
body.customers:not(.customers_login) .pt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
body.customers:not(.customers_login) .pt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
body.customers:not(.customers_login) .pt-stack { display: flex; flex-direction: column; gap: 12px; }
body.customers:not(.customers_login) .pt-muted { color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-small { font-size: 12.5px; }
body.customers:not(.customers_login) .pt-strong { font-weight: 600; color: var(--pt-text); }
body.customers:not(.customers_login) .pt-num { font-variant-numeric: tabular-nums; }
body.customers:not(.customers_login) .pt-nowrap { white-space: nowrap; }
body.customers:not(.customers_login) .pt-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Card ────────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-card {
    background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow);
}
body.customers:not(.customers_login) .pt-card > .dataTables_wrapper, body.customers:not(.customers_login) .pt-card > .pt-list, body.customers:not(.customers_login) .pt-card > .table { border-radius: inherit; overflow: hidden; }
body.customers:not(.customers_login) .pt-card > .table-responsive { border-radius: inherit; overflow-x: auto; overflow-y: hidden; max-width: 100%; }
body.customers:not(.customers_login) .table-responsive { border: 0; margin: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.customers:not(.customers_login) .pt-card > .table-responsive > .table, body.customers:not(.customers_login) .pt-card > .dataTables_wrapper .table { margin: 0; }
body.customers:not(.customers_login) .pt-card-body { padding: 22px 24px; }
body.customers:not(.customers_login) .pt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--pt-border); }
body.customers:not(.customers_login) .pt-card-head .pt-section-title { font-size: 16px; font-weight: 600; letter-spacing: 0; }
body.customers:not(.customers_login) .pt-card-foot { padding: 12px 20px; border-top: 1px solid var(--pt-border); background: var(--pt-surface-2); display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
body.customers:not(.customers_login) .pt-card--flat { box-shadow: none; }
body.customers:not(.customers_login) .pt-card--accent { border-color: #e2d6fb; background: linear-gradient(180deg, #fbf9ff 0%, #fff 100%); }
/* Stock panels inside the portal get the same skin */
body.customers:not(.customers_login) .panel_s { background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: var(--pt-radius); box-shadow: var(--pt-shadow); margin-bottom: 20px; }
body.customers:not(.customers_login) .panel_s > .panel-body { padding: 18px 20px; }
body.customers:not(.customers_login) .panel_s > .panel-footer { background: var(--pt-surface-2); border-top: 1px solid var(--pt-border); border-radius: 0 0 var(--pt-radius) var(--pt-radius); padding: 12px 20px; }
body.customers:not(.customers_login) .panel_s > .panel-heading { background: transparent; border-bottom: 1px solid var(--pt-border); font-weight: 600; color: var(--pt-text); padding: 14px 20px; }

/* ── List rows ───────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-list { display: flex; flex-direction: column; }
body.customers:not(.customers_login) .pt-list-row {
    display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 24px;
    border-top: 1px solid var(--pt-border); color: var(--pt-text); text-decoration: none;
}
body.customers:not(.customers_login) .pt-list-row:first-child { border-top: 0; }
body.customers:not(.customers_login) a.pt-list-row:hover { background: var(--pt-surface-2); color: var(--pt-text); }
body.customers:not(.customers_login) .pt-list-icon {
    width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pt-surface-3); color: var(--pt-muted); font-size: 14px; flex-shrink: 0;
}
body.customers:not(.customers_login) .pt-list-icon--accent { background: var(--pt-accent-soft); color: var(--pt-accent); }
body.customers:not(.customers_login) .pt-list-icon--success { background: var(--pt-success-soft); color: var(--pt-success); }
body.customers:not(.customers_login) .pt-list-icon--warning { background: var(--pt-warning-soft); color: var(--pt-warning); }
body.customers:not(.customers_login) .pt-list-icon--danger { background: var(--pt-danger-soft); color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-list-icon--info { background: var(--pt-info-soft); color: var(--pt-info); }
body.customers:not(.customers_login) .pt-list-main { flex: 1; min-width: 0; }
body.customers:not(.customers_login) .pt-list-title { font-weight: 500; color: var(--pt-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.customers:not(.customers_login) .pt-list-sub { font-size: 12.5px; color: var(--pt-muted); margin-top: 1px; }
body.customers:not(.customers_login) .pt-list-aside { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
body.customers:not(.customers_login) .pt-list-amount { font-weight: 600; color: var(--pt-text); white-space: nowrap; }
body.customers:not(.customers_login) .pt-list-arrow { color: var(--pt-faint); font-size: 12px; }
body.customers:not(.customers_login) a.pt-list-row:hover .pt-list-arrow { color: var(--pt-accent); }

/* ── Badges ──────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-badge {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
    border-radius: var(--pt-radius-xs); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
    background: var(--pt-surface-3); color: var(--pt-text-2); border: 1px solid transparent;
}
body.customers:not(.customers_login) .pt-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
body.customers:not(.customers_login) .pt-badge--plain::before { display: none; }
body.customers:not(.customers_login) .pt-badge--success { background: var(--pt-success-soft); color: var(--pt-success); }
body.customers:not(.customers_login) .pt-badge--warning { background: var(--pt-warning-soft); color: var(--pt-warning); }
body.customers:not(.customers_login) .pt-badge--danger { background: var(--pt-danger-soft); color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-badge--info { background: var(--pt-info-soft); color: var(--pt-info); }
body.customers:not(.customers_login) .pt-badge--accent { background: var(--pt-accent-soft); color: var(--pt-accent-text); }
body.customers:not(.customers_login) .pt-badge--neutral { background: var(--pt-surface-3); color: var(--pt-text-2); }
/* Stock Perfex status labels rendered by helpers (format_invoice_status etc.) */
body.customers:not(.customers_login) .label {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--pt-radius-xs) !important;
    font-size: 12px !important; font-weight: 600 !important; line-height: 1 !important; border: 1px solid transparent !important;
}

/* ── Chips (status filters) ──────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
body.customers:not(.customers_login) .pt-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px;
    border: 1px solid var(--pt-border-strong); background: var(--pt-surface); color: var(--pt-text-2);
    font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
    appearance: none; -webkit-appearance: none; font-family: inherit; line-height: 1;
}
body.customers:not(.customers_login) .pt-chip[aria-pressed="true"] { background: var(--pt-text); border-color: var(--pt-text); color: #fff; }
body.customers:not(.customers_login) .pt-chip[aria-pressed="true"] .pt-chip-count { background: rgba(255,255,255,.18); color: #fff; }
body.customers:not(.customers_login) .pt-chip:hover { border-color: var(--pt-border-strong); color: var(--pt-text); background: var(--pt-surface-2); }
body.customers:not(.customers_login) .pt-chip.is-active { background: var(--pt-text); border-color: var(--pt-text); color: #fff; }
body.customers:not(.customers_login) .pt-chip-count { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: var(--pt-surface-3); color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-chip.is-active .pt-chip-count { background: rgba(255,255,255,.18); color: #fff; }
body.customers:not(.customers_login) .pt-chip--danger:not(.is-active) { color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-chip--warning:not(.is-active) { color: var(--pt-warning); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-btn,
body.customers:not(.customers_login) .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
    border-radius: var(--pt-radius-sm) !important; font-size: 14px; font-weight: 500; line-height: 1; cursor: pointer;
    border: 1px solid var(--pt-border-strong) !important; background: var(--pt-surface) !important; color: var(--pt-text) !important;
    text-decoration: none; box-shadow: var(--pt-shadow) !important; transition: background .12s, border-color .12s; transform: none !important;
}
body.customers:not(.customers_login) .pt-btn:hover, body.customers:not(.customers_login) .btn:hover { background: var(--pt-surface-2) !important; color: var(--pt-text) !important; }
body.customers:not(.customers_login) .pt-btn--primary, body.customers:not(.customers_login) .btn-primary, body.customers:not(.customers_login) .btn-info, body.customers:not(.customers_login) .btn-pfxcbsubmit, body.customers:not(.customers_login) .btn-success {
    background: var(--pt-accent) !important; border-color: var(--pt-accent) !important; color: #fff !important;
}
body.customers:not(.customers_login) .pt-btn--primary:hover, body.customers:not(.customers_login) .btn-primary:hover, body.customers:not(.customers_login) .btn-info:hover, body.customers:not(.customers_login) .btn-success:hover,
body.customers:not(.customers_login) .pt-btn--primary:focus, body.customers:not(.customers_login) .btn-primary:focus { background: var(--pt-accent-hover) !important; border-color: var(--pt-accent-hover) !important; color: #fff !important; }
body.customers:not(.customers_login) .btn-danger { background: var(--pt-surface) !important; border-color: var(--pt-border-strong) !important; color: var(--pt-danger) !important; }
body.customers:not(.customers_login) .btn-danger:hover { background: var(--pt-danger-soft) !important; }
body.customers:not(.customers_login) .pt-btn--ghost { background: transparent !important; border-color: transparent !important; box-shadow: none !important; color: var(--pt-accent-text) !important; }
body.customers:not(.customers_login) .pt-btn--ghost:hover { background: var(--pt-accent-soft) !important; }
body.customers:not(.customers_login) .pt-btn--sm, body.customers:not(.customers_login) .btn-sm, body.customers:not(.customers_login) .btn-xs { height: 32px; padding: 0 11px; font-size: 13px; }
body.customers:not(.customers_login) .pt-btn--icon { width: 38px; padding: 0; }
body.customers:not(.customers_login) .btn-icon { width: 34px; height: 34px; padding: 0; }
body.customers:not(.customers_login) .btn-block { width: 100%; }
body.customers:not(.customers_login) .btn-default { background: var(--pt-surface) !important; }
body.customers:not(.customers_login) .btn:focus-visible, body.customers:not(.customers_login) .pt-btn:focus-visible { box-shadow: var(--pt-focus) !important; }
body.customers:not(.customers_login) .btn .waves-ripple { display: none; }

/* ── Empty state ─────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 36px 20px; color: var(--pt-muted); gap: 8px;
}
body.customers:not(.customers_login) .pt-empty i { font-size: 24px; color: var(--pt-faint); }
body.customers:not(.customers_login) .pt-empty-title { font-weight: 600; color: var(--pt-text-2); }
body.customers:not(.customers_login) .pt-empty .pt-btn { margin-top: 6px; }

/* ── Key/value grid ──────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 24px; }
body.customers:not(.customers_login) .pt-kv-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--pt-muted); margin-bottom: 3px; }
body.customers:not(.customers_login) .pt-kv-value { display: block; font-size: 14px; color: var(--pt-text); font-weight: 500; }

/* ── Notice ──────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-notice {
    display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--pt-radius);
    border: 1px solid var(--pt-border); background: var(--pt-surface-2); color: var(--pt-text-2); margin-bottom: 20px;
}
body.customers:not(.customers_login) .pt-notice i { margin-top: 2px; color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-notice--info { background: var(--pt-accent-soft); border-color: #e0cbfa; color: #3b0764; }
body.customers:not(.customers_login) .pt-notice--info i { color: var(--pt-info); }
body.customers:not(.customers_login) .pt-notice--warning { background: var(--pt-warning-soft); border-color: #fde68a; color: #78350f; }
body.customers:not(.customers_login) .pt-notice--warning i { color: var(--pt-warning); }
body.customers:not(.customers_login) .pt-notice--danger { background: var(--pt-danger-soft); border-color: #fecaca; color: #7f1d1d; }
body.customers:not(.customers_login) .pt-notice--danger i { color: var(--pt-danger); }
body.customers:not(.customers_login) .pt-notice a { font-weight: 600; }
/* Stock alerts (my_index alerts template) */
body.customers:not(.customers_login) .alert { border-radius: var(--pt-radius); border: 1px solid var(--pt-border); box-shadow: none; }

/* ── Avatars ─────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-avatar-stack { display: inline-flex; align-items: center; }
body.customers:not(.customers_login) .pt-avatar-stack img, body.customers:not(.customers_login) .pt-avatar {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pt-surface); box-shadow: 0 0 0 1px var(--pt-border);
}
body.customers:not(.customers_login) .pt-avatar-stack img + img { margin-left: -8px; }
body.customers:not(.customers_login) .pt-avatar--lg { width: 44px; height: 44px; }
body.customers:not(.customers_login) .pt-avatar-more { margin-left: 6px; font-size: 12px; color: var(--pt-muted); font-weight: 500; }

/* ── Tables ──────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.customers:not(.customers_login) .table { margin-bottom: 0; }
body.customers:not(.customers_login) .table > thead > tr > th {
    background: var(--pt-surface-2); color: var(--pt-muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
    border-bottom: 1px solid var(--pt-border) !important; border-top: 0; padding: 12px 16px; white-space: nowrap; vertical-align: middle;
}
body.customers:not(.customers_login) .table > tbody > tr > td {
    padding: 15px 16px; border-top: 1px solid var(--pt-border); vertical-align: middle; font-size: 15px; color: var(--pt-text); line-height: 1.45;
}
body.customers:not(.customers_login) .table > tbody > tr:hover > td { background: var(--pt-surface-2); }
body.customers:not(.customers_login) .table > tbody > tr > td a { font-weight: 500; }
body.customers:not(.customers_login) .table.dataTable { border-collapse: collapse !important; }
body.customers:not(.customers_login) .pt-card .table > thead > tr:first-child > th { border-top: 0; }
body.customers:not(.customers_login) .pt-card .table > tbody > tr:last-child > td { border-bottom: 0; }
body.customers:not(.customers_login) table.dataTable thead .sorting:after, body.customers:not(.customers_login) table.dataTable thead .sorting_asc:after, body.customers:not(.customers_login) table.dataTable thead .sorting_desc:after { opacity: .5; }
body.customers:not(.customers_login) table.dataTable thead .sorting_asc, body.customers:not(.customers_login) table.dataTable thead .sorting_desc, body.customers:not(.customers_login) #wrapper th.sorting_asc, body.customers:not(.customers_login) #wrapper th.sorting_desc { color: var(--pt-accent-text) !important; }
body.customers:not(.customers_login) table.dataTable thead .sorting_asc:after, body.customers:not(.customers_login) table.dataTable thead .sorting_desc:after { color: var(--pt-accent) !important; opacity: 1; }
body.customers:not(.customers_login) .table > tbody > tr.pt-row-link { cursor: pointer; }
body.customers:not(.customers_login) .table .pt-td-arrow { width: 36px; text-align: right; color: var(--pt-faint); }
body.customers:not(.customers_login) .table > tbody > tr:hover .pt-td-arrow { color: var(--pt-accent); }
body.customers:not(.customers_login) .table .pt-td-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
body.customers:not(.customers_login) .table .pt-td-muted { color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pt-accent); margin-right: 6px; vertical-align: middle; }
/* left:0 matters: an absolutely positioned sr-only span keeps its static
   position, and inside a horizontally scrolled table that lands far to the
   right — escaping the scroll container and widening the document. Bootstrap's
   own .sr-only has the same flaw and shows up on the public document pages. */
body.customers:not(.customers_login) .sr-only { left: 0; }
body.customers:not(.customers_login) .pt-sr-only { position: absolute; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* DataTables controls */
body.customers:not(.customers_login) .dataTables_wrapper { padding: 0; }
body.customers:not(.customers_login) .dataTables_wrapper .row { margin: 0; }
body.customers:not(.customers_login) .dataTables_wrapper .row > [class*="col-"] { padding: 0; }
body.customers:not(.customers_login) .dataTables_wrapper > .row:first-child { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--pt-border); }
body.customers:not(.customers_login) .dataTables_wrapper > .row:first-child > [class*="col-"] { width: auto; flex: 0 0 auto; }
body.customers:not(.customers_login) .dataTables_length label, body.customers:not(.customers_login) .dataTables_filter label { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--pt-muted); font-size: 13px; }
body.customers:not(.customers_login) .dataTables_length select {
    height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--pt-border-input); border-radius: var(--pt-radius-sm); background: var(--pt-surface); color: var(--pt-text); font-size: 13px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 10px center;
}
body.customers:not(.customers_login) .dataTables_filter input {
    height: 34px; min-width: 220px; padding: 0 12px 0 32px; border: 1px solid var(--pt-border-input); border-radius: var(--pt-radius-sm); background: var(--pt-surface); color: var(--pt-text); font-size: 13.5px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>"); background-repeat: no-repeat; background-position: 10px center;
}
body.customers:not(.customers_login) .dataTables_filter input:focus-visible { border-color: var(--pt-accent); outline: 2px solid var(--pt-accent); outline-offset: 1px; }
body.customers:not(.customers_login) .dataTables_wrapper > .row:last-child { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--pt-border); }
body.customers:not(.customers_login) .dataTables_wrapper > .row:last-child > [class*="col-"] { width: auto; flex: 0 0 auto; }
body.customers:not(.customers_login) .dataTables_info { padding: 0; font-size: 12.5px; color: var(--pt-muted); }
body.customers:not(.customers_login) .dataTables_paginate { padding: 0; }
body.customers:not(.customers_login) .dataTables_paginate .pagination { margin: 0; display: inline-flex; gap: 4px; }
body.customers:not(.customers_login) .pagination > li > a, body.customers:not(.customers_login) .pagination > li > span {
    border: 1px solid var(--pt-border) !important; border-radius: var(--pt-radius-xs) !important; color: var(--pt-text-2) !important; background: var(--pt-surface) !important;
    padding: 5px 10px; font-size: 13px; margin: 0;
}
body.customers:not(.customers_login) .pagination > .active > a, body.customers:not(.customers_login) .pagination > .active > span { background: var(--pt-text) !important; border-color: var(--pt-text) !important; color: #fff !important; }
body.customers:not(.customers_login) .pagination > .disabled > a, body.customers:not(.customers_login) .pagination > .disabled > span { color: var(--pt-muted) !important; background: var(--pt-surface-2) !important; }
body.customers:not(.customers_login) .dataTables_wrapper .dataTables_paginate ul.pagination li:not(.previous):not(.next):not(.active) { display: inline-block; }
body.customers:not(.customers_login) .dataTables_wrapper .dataTables_paginate ul.pagination li a { min-height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; }
body.customers:not(.customers_login) .dataTables_paginate .paginate_button, body.customers:not(.customers_login) .dataTables_paginate .paginate_button a { color: var(--pt-text-2); }
body.customers:not(.customers_login) .dataTables_paginate .paginate_button.active a, body.customers:not(.customers_login) .dataTables_paginate .paginate_button.active a:hover, body.customers:not(.customers_login) .dataTables_paginate .paginate_button.active a:focus { background: var(--pt-text) !important; border-color: var(--pt-text) !important; color: #fff !important; }
body.customers:not(.customers_login) .dt-loader { display: none; }
body.customers:not(.customers_login) .dataTables_empty { color: var(--pt-muted); padding: 28px 14px !important; text-align: center; }

/* ── Forms ───────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .form-group { margin-bottom: 16px; }
body.customers:not(.customers_login) label, body.customers:not(.customers_login) .control-label { font-size: 13px; font-weight: 500; color: var(--pt-text-2); margin-bottom: 6px; }
body.customers:not(.customers_login) .form-control,
body.customers:not(.customers_login) .bootstrap-select > .btn.dropdown-toggle,
body.customers:not(.customers_login) .bootstrap-select > .btn.dropdown-toggle.btn-default {
    height: 40px; padding: 0 12px; border: 1px solid var(--pt-border-input) !important; border-radius: var(--pt-radius-sm) !important;
    background: var(--pt-surface) !important; color: var(--pt-text) !important; font-size: 14px; box-shadow: none !important; transition: border-color .12s, box-shadow .12s;
}
body.customers:not(.customers_login) textarea.form-control { height: auto; padding: 10px 12px; line-height: 1.5; }
body.customers:not(.customers_login) .form-control:focus, body.customers:not(.customers_login) .bootstrap-select.open > .btn.dropdown-toggle { border-color: var(--pt-accent) !important; box-shadow: var(--pt-focus) !important; }
body.customers:not(.customers_login) .form-control:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 1px; }
body.customers:not(.customers_login) .form-control::placeholder { color: var(--pt-muted); }
body.customers:not(.customers_login) .bootstrap-select > .btn.dropdown-toggle { display: flex; align-items: center; justify-content: space-between; font-weight: 400; text-align: left; }
body.customers:not(.customers_login) .bootstrap-select > .btn.dropdown-toggle .filter-option { color: var(--pt-text); }
body.customers:not(.customers_login) .bootstrap-select .dropdown-menu { border: 1px solid var(--pt-border); border-radius: var(--pt-radius); box-shadow: var(--pt-shadow-lg); padding: 6px; }
body.customers:not(.customers_login) .bootstrap-select .dropdown-menu > li > a { border-radius: var(--pt-radius-sm); padding: 8px 10px; color: var(--pt-text); }
body.customers:not(.customers_login) .bootstrap-select .dropdown-menu > li.selected > a, body.customers:not(.customers_login) .bootstrap-select .dropdown-menu > li > a:hover { background: var(--pt-surface-2); color: var(--pt-text); }
body.customers:not(.customers_login) .bootstrap-select .dropdown-menu > li.selected > a { color: var(--pt-accent-text); font-weight: 600; }
body.customers:not(.customers_login) input[type="file"].form-control { padding: 7px 10px; line-height: 1.4; }
body.customers:not(.customers_login) .input-group .form-control { border-radius: var(--pt-radius-sm) 0 0 var(--pt-radius-sm) !important; }
body.customers:not(.customers_login) .input-group-btn .btn { border-radius: 0 var(--pt-radius-sm) var(--pt-radius-sm) 0 !important; height: 40px; }
body.customers:not(.customers_login) .checkbox, body.customers:not(.customers_login) .radio { margin: 8px 0; }
body.customers:not(.customers_login) .checkbox label, body.customers:not(.customers_login) .radio label { font-size: 14px; color: var(--pt-text); font-weight: 400; padding-left: 28px; min-height: 22px; display: inline-flex; align-items: center; }
body.customers:not(.customers_login) .checkbox label::before { border: 1px solid var(--pt-border-input); border-radius: 5px; width: 18px; height: 18px; top: 1px; left: 0; background: var(--pt-surface); }
body.customers:not(.customers_login) .checkbox label::after { top: 1px; left: 0; width: 18px; height: 18px; font-size: 11px; padding-left: 4px; padding-top: 1px; color: #fff; }
body.customers:not(.customers_login) .checkbox input[type="checkbox"]:checked + label::before, body.customers:not(.customers_login) input[type="checkbox"]:checked + label::before { background: var(--pt-accent) !important; border-color: var(--pt-accent) !important; }
body.customers:not(.customers_login) input[type="checkbox"]:checked + label::after { background: transparent !important; color: #fff; }
body.customers:not(.customers_login) .checkbox input[type="checkbox"]:focus-visible + label::before { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
body.customers:not(.customers_login) .help-block, body.customers:not(.customers_login) .text-danger.help-block { font-size: 12.5px; }
body.customers:not(.customers_login) .dropzone { border: 1.5px dashed var(--pt-border-strong); border-radius: var(--pt-radius); background: var(--pt-surface-2); min-height: 120px; }
body.customers:not(.customers_login) .dropzone .dz-message { color: var(--pt-muted); font-size: 14px; }
body.customers:not(.customers_login) .dropzone:hover { border-color: var(--pt-accent); background: var(--pt-accent-soft); }

/* Headings from stock views (fallback when a page is not yet re-skinned) */
body.customers:not(.customers_login) #pt-main h4.section-heading, body.customers:not(.customers_login) #pt-main h4.tickets-summary-heading, body.customers:not(.customers_login) #pt-main h3.contracts-summary-heading, body.customers:not(.customers_login) #pt-main h4.section-text {
    font-size: 18px; font-weight: 600; color: var(--pt-text); margin: 0 0 12px;
}
body.customers:not(.customers_login) hr { border-color: var(--pt-border); }
body.customers:not(.customers_login) .tw-text-neutral-700 { color: var(--pt-text); }

/* Tabs (project page, ticket pages) */
body.customers:not(.customers_login) .nav-tabs { border-bottom: 1px solid var(--pt-border); }
body.customers:not(.customers_login) .nav-tabs > li > a {
    border: 0 !important; border-radius: 0 !important; padding: 11px 14px; color: var(--pt-text-2) !important; font-weight: 500; font-size: 14px; margin: 0; background: transparent !important; position: relative;
}
body.customers:not(.customers_login) .nav-tabs > li > a:hover { color: var(--pt-text) !important; background: transparent !important; }
body.customers:not(.customers_login) .nav-tabs > li.active > a, body.customers:not(.customers_login) .nav-tabs > li.active > a:focus, body.customers:not(.customers_login) .nav-tabs > li.active > a:hover { color: var(--pt-accent-text) !important; font-weight: 600; background: transparent !important; }
body.customers:not(.customers_login) .nav-tabs > li.active > a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--pt-accent); border-radius: 2px 2px 0 0; }
body.customers:not(.customers_login) .nav-tabs > li > a .menu-icon { color: inherit; opacity: .7; margin-right: 4px; }
body.customers:not(.customers_login) .horizontal-scrollable-tabs .scroller { background: var(--pt-surface); color: var(--pt-muted); border: 1px solid var(--pt-border); border-radius: var(--pt-radius-xs); }

/* Progress bars (stock) */
body.customers:not(.customers_login) .progress { height: 6px; border-radius: 3px; background: var(--pt-surface-3); box-shadow: none; margin-bottom: 0; }
body.customers:not(.customers_login) .progress-bar { border-radius: 3px; box-shadow: none; }
body.customers:not(.customers_login) #wrapper .progress-bar-info, body.customers:not(.customers_login) .progress-bar-info { background: var(--pt-accent) !important; }
body.customers:not(.customers_login) .progress-bar-success { background: var(--pt-success) !important; }
body.customers:not(.customers_login) .progress-bar-warning { background: #f59e0b !important; }
body.customers:not(.customers_login) .progress-bar-danger { background: #ef4444 !important; }

/* FullCalendar (clients/calendar) sizes its own tables in pixels from the
   container it measured first, which can end up a couple of dozen pixels wider
   than a phone. Contain it instead of letting it push the page sideways. */
body.customers:not(.customers_login) #calendar { position: relative; max-width: 100%; overflow-x: auto; }
body.customers:not(.customers_login) #calendar .fc-toolbar { flex-wrap: wrap; gap: 8px; }

/* Modals */
body.customers:not(.customers_login) .modal-content { border-radius: var(--pt-radius); border: 1px solid var(--pt-border); box-shadow: var(--pt-shadow-lg); }
body.customers:not(.customers_login) .modal-header { background: var(--pt-surface); border-bottom: 1px solid var(--pt-border); border-radius: var(--pt-radius) var(--pt-radius) 0 0; }
body.customers:not(.customers_login) .modal-header .modal-title { color: var(--pt-text); font-weight: 600; }
body.customers:not(.customers_login) .modal-footer { border-top: 1px solid var(--pt-border); }

/* Tooltips / dropdown-menu generic */
body.customers:not(.customers_login) .dropdown-menu { border: 1px solid var(--pt-border); border-radius: var(--pt-radius) !important; box-shadow: var(--pt-shadow-lg); }

/* ── Footer ──────────────────────────────────────────────────────────── */
body.customers:not(.customers_login) .pt-footer { border-top: 1px solid var(--pt-border); background: var(--pt-surface); }
body.customers:not(.customers_login) .pt-footer-inner { max-width: var(--pt-max-w); margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-footer-inner a { color: var(--pt-muted); }
body.customers:not(.customers_login) .pt-footer-inner a:hover { color: var(--pt-text); text-decoration: underline; }
body.customers:not(.customers_login) .pt-footer-brand { font-weight: 600; color: var(--pt-text-2); }
body.customers:not(.customers_login) .pusher { display: none; }
body.customers:not(.customers_login) footer.footer { display: none; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    body.customers:not(.customers_login) .pt-nav, body.customers:not(.customers_login) .pt-account { display: none; }
    body.customers:not(.customers_login) .pt-toggle { display: inline-flex; }
    body.customers:not(.customers_login) .pt-header-inner { padding: 0 16px; }
}
@media (max-width: 767px) {
    body.customers:not(.customers_login) .pt-section { margin-bottom: 40px; }
    body.customers:not(.customers_login) .pt-section-title { font-size: 20px; }
    body.customers:not(.customers_login) .pt-page { padding: 28px 16px 56px; }
    body.customers:not(.customers_login) .pt-page:has(> .pt-hero) { padding-top: 0; }
    body.customers:not(.customers_login) .pt-grid-2, body.customers:not(.customers_login) .pt-grid-3 { grid-template-columns: 1fr; gap: 16px; }
    body.customers:not(.customers_login) .pt-title { font-size: 22px; }
    body.customers:not(.customers_login) .pt-page-head { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
    body.customers:not(.customers_login) .pt-card-body { padding: 16px; }
    body.customers:not(.customers_login) .pt-list-row { padding: 10px 16px; }
    body.customers:not(.customers_login) .pt-card-head, body.customers:not(.customers_login) .pt-card-foot { padding: 12px 16px; }
    body.customers:not(.customers_login) .dataTables_wrapper > .row:first-child, body.customers:not(.customers_login) .dataTables_wrapper > .row:last-child { padding: 10px 16px; }
    body.customers:not(.customers_login) .dataTables_filter input { min-width: 0; width: 100%; }
    body.customers:not(.customers_login) .dataTables_wrapper > .row:first-child > [class*="col-"] { flex: 1 1 100%; }
    body.customers:not(.customers_login) .dataTables_filter label { width: 100%; }
    body.customers:not(.customers_login) .dataTables_filter label input { flex: 1; }
    body.customers:not(.customers_login) .pt-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
    body.customers:not(.customers_login) .pt-chips::-webkit-scrollbar { display: none; }
    body.customers:not(.customers_login) .pt-list-sub { white-space: normal; }
    body.customers:not(.customers_login) .pt-footer-inner { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    body.customers:not(.customers_login) *, body.customers:not(.customers_login) *::before, body.customers:not(.customers_login) *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ── Hero ─────────────────────────────────────────────────────────────────
   The front door. Deep brand gradient, and when the workshop archive has
   images the newest one sits behind it, dimmed. Content stays readable
   whether or not the media request succeeds. */
body.customers:not(.customers_login) .pt-hero {
    position: relative;
    isolation: isolate;
    margin: -40px -24px 36px;
    padding: 56px 24px 48px;
    border-radius: 0 0 28px 28px;
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1259 48%, #4a1a8f 100%);
    color: #fff;
    overflow: hidden;
}
body.customers:not(.customers_login) .pt-hero-inner { max-width: var(--pt-max-w); margin: 0 auto; }
body.customers:not(.customers_login) .pt-hero-media {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
    opacity: 0; transform: scale(1.04);
    transition: opacity 1s ease;
}
body.customers:not(.customers_login) .pt-hero.has-media .pt-hero-media { opacity: .55; }
body.customers:not(.customers_login) .pt-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(115deg, rgba(20, 8, 36, .95) 0%, rgba(45, 18, 89, .84) 52%, rgba(74, 26, 143, .58) 100%);
}
body.customers:not(.customers_login) .pt-hero-greeting {
    margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: #fff;
}
body.customers:not(.customers_login) .pt-hero-company { margin: 10px 0 0; font-size: 16px; color: rgba(255, 255, 255, 0.74); }

/* ── Feature card: the next workshop, led by its own media ───────────────── */
body.customers:not(.customers_login) .pt-feature { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); overflow: hidden; }
body.customers:not(.customers_login) .pt-feature-media {
    position: relative;
    min-height: 210px;
    background: linear-gradient(135deg, #2d1259 0%, #4a1a8f 100%);
    background-size: cover;
    background-position: center;
}
body.customers:not(.customers_login) .pt-feature-fallback {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: rgba(255, 255, 255, 0.92); text-align: center;
}
body.customers:not(.customers_login) .pt-feature-media.has-image .pt-feature-fallback { display: none; }
body.customers:not(.customers_login) .pt-feature-count { font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
body.customers:not(.customers_login) .pt-feature-count-label { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }

body.customers:not(.customers_login) .pt-feature-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.28) 100%);
}
body.customers:not(.customers_login) .pt-feature-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
body.customers:not(.customers_login) .pt-feature-body .pt-eyebrow { margin: 0; }
body.customers:not(.customers_login) .pt-feature-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: var(--pt-text); }
body.customers:not(.customers_login) .pt-feature-meta { margin: 0; color: var(--pt-text-2); font-size: 15px; }
body.customers:not(.customers_login) .pt-feature-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

@media (max-width: 767px) {
    body.customers:not(.customers_login) .pt-hero {
        margin: 0 -16px 28px;
        padding: 40px 20px 34px;
        border-radius: 0 0 20px 20px;
    }
    body.customers:not(.customers_login) .pt-hero-greeting { font-size: 27px; }
    body.customers:not(.customers_login) .pt-hero-company { font-size: 15px; }
    body.customers:not(.customers_login) .pt-feature { grid-template-columns: 1fr; }
    body.customers:not(.customers_login) .pt-feature-media { min-height: 0; aspect-ratio: 16 / 9; }
    body.customers:not(.customers_login) .pt-feature-body { padding: 20px; }
    body.customers:not(.customers_login) .pt-feature-title { font-size: 21px; }

    /* Let the compact lists fit the screen instead of scrolling sideways:
       tighter cells, wrapping dates, and no decorative arrow column. */
    body.customers:not(.customers_login) .pt-table > thead > tr > th,
    body.customers:not(.customers_login) .pt-table > tbody > tr > td { padding: 12px 10px; }
    body.customers:not(.customers_login) .pt-table > tbody > tr > td,
    body.customers:not(.customers_login) .pt-table .pt-td-num { white-space: normal; }
    body.customers:not(.customers_login) .pt-table .pt-td-arrow,
    body.customers:not(.customers_login) .pt-table th.pt-th-arrow { display: none; }
    /* The week number is a desktop nicety; on a phone it costs the date two
       extra lines. Keep the range readable on one or two lines instead. */
    body.customers:not(.customers_login) .pt-table .pt-week-suffix { display: none; }
}


/* ── Public document pages ────────────────────────────────────────────────
   /invoice/{id}/{hash} and friends render the same theme shell, so the portal
   table rhythm reaches them and pushes their line-item tables off a phone
   screen. Give those documents their own compact cells on small screens. */
body.customers:not(.customers_login) .table-responsive { max-width: 100%; min-width: 0; }
body.customers:not(.customers_login) .panel_s, body.customers:not(.customers_login) .panel_s > .panel-body { min-width: 0; }

@media (max-width: 767px) {
    /* Documents had no horizontal slack before the portal type scale; give them
       their previous rhythm back on phones, and let anything still too wide
       scroll inside the page rather than dragging the whole document sideways. */
    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) {
        font-size: 14px;
        line-height: 1.45;
    }

    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) .pt-page {
        overflow-x: auto;
    }

    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) .table > thead > tr > th,
    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) .table > tbody > tr > td {
        padding: 8px 6px;
        font-size: 13px;
    }

    /* The line-item table's natural width is wider than a phone; pin it to the
       container and let the description wrap instead of scrolling the page. */
    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) .table.items {
        table-layout: fixed;
        width: 100%;
    }
    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) .table.items th,
    body.customers:is(.viewinvoice, .viewestimate, .viewproposal, .viewcontract) .table.items td {
        overflow-wrap: anywhere;
        white-space: normal;
    }
}


/* ── Sign-in page ─────────────────────────────────────────────────────────
   my_login.php is a self-contained full-screen design (fixed .cl-wrap), so the
   portal header and footer only clutter it — and the legacy client-dashboard
   rule `body.customers_login nav` paints any <nav> element #0f0f1a, which used
   to land as a black band across the new header. */
body.customers_login .pt-header,
body.customers_login .pt-footer,
body.customers_login .pt-skip { display: none !important; }
body.customers_login .pt-page { padding: 0; max-width: none; }
body.customers_login .pt-nav { background: transparent !important; }
