/* =====================================================
   SAM Travel Invoice Manager — Modern Design System
   يُستخدم في wp-admin والـ Frontend Portal معًا.
   ===================================================== */

:root {
  --sam-primary: #0d9488;
  --sam-primary-600: #0f766e;
  --sam-primary-700: #115e59;
  --sam-primary-50: #ecfdf5;
  --sam-accent: #f59e0b;
  --sam-success: #10b981;
  --sam-warning: #f59e0b;
  --sam-danger: #ef4444;
  --sam-info: #3b82f6;
  --sam-indigo: #6366f1;
  --sam-purple: #a855f7;
  --sam-bg: #f6f8fb;
  --sam-bg-soft: #f1f5f9;
  --sam-card-bg: #ffffff;
  --sam-border: #e2e8f0;
  --sam-border-soft: #eef2f7;
  --sam-text: #0f172a;
  --sam-text-soft: #475569;
  --sam-text-muted: #64748b;
  --sam-radius-sm: 8px;
  --sam-radius: 14px;
  --sam-radius-lg: 18px;
  --sam-shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --sam-shadow: 0 4px 12px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --sam-shadow-lg: 0 12px 32px -8px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.06);
  --sam-transition: 180ms cubic-bezier(.4,.0,.2,1);
}

/* ===== Base ===== */
.samtim-wrap{max-width:1400px;margin:20px auto 40px;color:var(--sam-text)}
.samtim-wrap *{box-sizing:border-box}
.samtim-wrap h1,.samtim-wrap h2,.samtim-wrap h3,.samtim-wrap h4{color:var(--sam-text);letter-spacing:-.01em}
.samtim-wrap h1{font-size:26px;font-weight:700;margin:0}
.samtim-wrap a{color:var(--sam-primary-600);text-decoration:none;transition:color var(--sam-transition)}
.samtim-wrap a:hover{color:var(--sam-primary-700)}

/* ===== wp-admin page background (portal-like) ===== */
body[class*="_sam-tim-"] #wpcontent,
body[class*="_page_sam-tim"] #wpcontent,
body.toplevel_page_sam-tim-dashboard #wpcontent{
  background:var(--sam-bg);
  padding-inline-start:0;
}
body[class*="_sam-tim-"] #wpbody-content,
body[class*="_page_sam-tim"] #wpbody-content,
body.toplevel_page_sam-tim-dashboard #wpbody-content{
  padding-bottom:60px;
}
body[class*="_sam-tim-"] #wpfooter,
body[class*="_page_sam-tim"] #wpfooter,
body.toplevel_page_sam-tim-dashboard #wpfooter{
  background:transparent;color:var(--sam-text-muted)
}
body[class*="_sam-tim-"] #wpcontent > *,
body[class*="_page_sam-tim"] #wpcontent > *{
  padding-inline-start:20px;padding-inline-end:20px;
}

/* ===== Portal-style welcome banner (admin + portal) ===== */
.samtim-card.samtim-welcome{position:relative;overflow:hidden;background:linear-gradient(135deg,var(--sam-primary) 0%,var(--sam-primary-700) 100%);color:#fff !important;border:none !important;border-radius:var(--sam-radius-lg);padding:26px 28px;margin-bottom:18px;box-shadow:0 12px 32px -10px rgba(13,148,136,.5)}
.samtim-card.samtim-welcome::before{content:"";position:absolute;top:-40%;right:-10%;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.18) 0%,transparent 70%);pointer-events:none}
.samtim-card.samtim-welcome::after{content:"";position:absolute;bottom:-50%;left:-5%;width:200px;height:200px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 70%);pointer-events:none}
.samtim-card.samtim-welcome h2{color:#fff !important;margin:0 0 6px;font-size:22px;font-weight:700;position:relative;z-index:1}
.samtim-card.samtim-welcome p{color:rgba(255,255,255,.88) !important;margin:0;font-size:14px;position:relative;z-index:1;line-height:1.7}
.samtim-card.samtim-welcome .samtim-welcome-actions{display:flex;gap:10px;margin-top:14px;position:relative;z-index:1;flex-wrap:wrap}
.samtim-card.samtim-welcome .samtim-welcome-actions .button{background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.3);color:#fff;backdrop-filter:blur(4px)}
.samtim-card.samtim-welcome .samtim-welcome-actions .button:hover{background:rgba(255,255,255,.28);border-color:rgba(255,255,255,.5);color:#fff}
.samtim-card.samtim-welcome .samtim-welcome-actions .button-primary{background:#fff;color:var(--sam-primary-700);border-color:#fff}
.samtim-card.samtim-welcome .samtim-welcome-actions .button-primary:hover{background:#f0fdfa;color:var(--sam-primary-700);box-shadow:0 4px 14px rgba(0,0,0,.15)}

/* ===== Tabs ===== */
.sam-tabs-nav{display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:var(--sam-bg-soft);border-radius:12px;margin-bottom:14px;border:1px solid var(--sam-border-soft)}
.sam-tabs-nav .sam-tab{flex:1 1 auto;min-width:0;padding:9px 12px;border:none;background:transparent;color:var(--sam-text-soft);font-size:13px;font-weight:600;border-radius:8px;cursor:pointer;transition:all var(--sam-transition);font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-align:center;white-space:nowrap}
.sam-tabs-nav .sam-tab:hover{color:var(--sam-text);background:rgba(255,255,255,.6)}
.sam-tabs-nav .sam-tab.is-active{background:#fff;color:var(--sam-primary-700);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.sam-tabs-nav .sam-tab .dashicons{font-size:14px;width:14px;height:14px}
.sam-tab-panel{display:none;animation:samFadeIn .25s ease-out}
.sam-tab-panel.is-active{display:block}

/* ===== Fullscreen floating button (fixed bottom-left, icon only) ===== */
.sam-fullscreen-btn{
  position:fixed !important;
  bottom:24px !important;
  left:24px !important;
  width:48px !important;
  height:48px !important;
  padding:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:0 !important;
  border:1px solid var(--sam-border) !important;
  background:#fff !important;
  color:var(--sam-primary-700) !important;
  border-radius:50% !important;
  cursor:pointer !important;
  font-family:inherit !important;
  text-decoration:none !important;
  box-shadow:0 6px 20px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.08) !important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease !important;
  z-index:99999 !important;
  line-height:1 !important;
}
.sam-fullscreen-btn:hover{
  background:var(--sam-primary) !important;
  color:#fff !important;
  border-color:var(--sam-primary) !important;
  transform:translateY(-2px) !important;
  box-shadow:0 10px 26px rgba(13,148,136,.35), 0 4px 10px rgba(15,23,42,.12) !important;
}
.sam-fullscreen-btn:focus{outline:none !important;box-shadow:0 0 0 3px rgba(13,148,136,.25), 0 6px 20px rgba(15,23,42,.18) !important}
.sam-fullscreen-btn .dashicons{font-size:22px !important;width:22px !important;height:22px !important;margin:0 !important}
/* hide any text labels (icon only) */
.sam-fullscreen-btn .label-enter,
.sam-fullscreen-btn .label-exit{display:none !important}
/* swap icon when in fullscreen */
.sam-fullscreen-btn .dashicons-exit-fs{display:none !important}
body.sam-fullscreen .sam-fullscreen-btn .dashicons-enter-fs{display:none !important}
body.sam-fullscreen .sam-fullscreen-btn .dashicons-exit-fs{display:inline-block !important}
/* keep above WP admin bar and any sticky footer */
body.sam-fullscreen .sam-fullscreen-btn{bottom:24px !important;left:24px !important}
@media (max-width:600px){
  .sam-fullscreen-btn{width:44px !important;height:44px !important;bottom:16px !important;left:16px !important}
  .sam-fullscreen-btn .dashicons{font-size:20px !important;width:20px !important;height:20px !important}
}

/* admin fullscreen — hide WP chrome */
body.sam-fullscreen #wpadminbar{display:none !important}
body.sam-fullscreen #adminmenumain{display:none !important}
body.sam-fullscreen html{margin-top:0 !important}
body.sam-fullscreen #wpcontent{margin-inline-start:0 !important;padding-top:0 !important}
body.sam-fullscreen #wpbody-content{padding-top:10px !important}
body.sam-fullscreen #wpfooter{display:none !important}
body.sam-fullscreen .samtim-wrap{max-width:1600px;padding:0 16px}

/* frontend fullscreen — hide theme chrome (best-effort) */
body.sam-fullscreen header,body.sam-fullscreen footer,body.sam-fullscreen .site-header,body.sam-fullscreen .site-footer,body.sam-fullscreen #masthead,body.sam-fullscreen #colophon,body.sam-fullscreen nav.main-navigation,body.sam-fullscreen aside,body.sam-fullscreen #secondary,body.sam-fullscreen .widget-area,body.sam-fullscreen .entry-header,body.sam-fullscreen .entry-meta,body.sam-fullscreen .entry-footer{display:none !important}
body.sam-fullscreen .entry-content,body.sam-fullscreen .site-main,body.sam-fullscreen .site-content,body.sam-fullscreen main{max-width:none !important;padding:0 !important;margin:0 !important;width:100% !important}
body.sam-fullscreen .samtim-frontend{max-width:1600px;margin:10px auto;padding:0 16px}

/* ===== Customer picker (autocomplete) ===== */
.samtim-customer-picker{position:relative;background:linear-gradient(135deg,#f0fdfa 0%,#ecfdf5 100%);border:1px dashed var(--sam-primary);border-radius:var(--sam-radius);padding:14px;margin-bottom:14px}
.samtim-customer-picker > label{font-weight:700;color:var(--sam-primary-700);margin-bottom:8px;display:block;font-size:13px}
.samtim-customer-picker .description{font-size:11.5px;color:var(--sam-text-muted);margin:8px 0 0;line-height:1.6}
.sam-customer-search-wrap{position:relative}
.sam-customer-search{width:100%;height:38px;padding:6px 12px;border:1px solid var(--sam-border);border-radius:8px;background:#fff;font-family:inherit;font-size:13.5px;direction:rtl}
.sam-customer-search:focus{outline:none;border-color:var(--sam-primary);box-shadow:0 0 0 3px rgba(13,148,136,.15)}
.sam-customer-results{position:absolute;z-index:50;top:calc(100% + 4px);left:0;right:0;max-height:280px;overflow-y:auto;background:#fff;border:1px solid var(--sam-border);border-radius:10px;box-shadow:0 10px 30px -8px rgba(15,23,42,.18);padding:4px}
.sam-customer-results[hidden]{display:none}
.sam-cust-row{display:flex;flex-direction:column;gap:2px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:background var(--sam-transition)}
.sam-cust-row:hover{background:var(--sam-primary-50)}
.sam-cust-row strong{font-size:13.5px;color:var(--sam-text)}
.sam-cust-row span{font-size:12px;color:var(--sam-text-muted)}
.sam-cust-empty{padding:14px;text-align:center;color:var(--sam-text-muted);font-size:12.5px}
.sam-customer-selected{margin-top:10px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;background:#fff;border:1px solid var(--sam-border-soft);border-radius:8px;padding:10px 12px}
.sam-customer-selected[hidden]{display:none}
.sam-customer-selected .sel-info{display:flex;flex-direction:column;gap:2px;flex:1}
.sam-customer-selected .sel-name{font-size:14px;color:var(--sam-text)}
.sam-customer-selected .sel-meta{font-size:12.5px;color:var(--sam-text-muted)}
.sam-customer-selected .sel-badge{display:inline-block;margin-top:4px;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--sam-primary-50);color:var(--sam-primary-700);width:fit-content}
.sam-customer-selected .sel-badge.new{background:#fef3c7;color:#92400e}
.sam-clear-customer{background:transparent;border:none;color:var(--sam-text-muted);font-size:22px;line-height:1;cursor:pointer;padding:0 6px;border-radius:6px;transition:color var(--sam-transition),background var(--sam-transition)}
.sam-clear-customer:hover{color:#dc2626;background:#fef2f2}

/* ===== Sticky form footer (Save button) ===== */
.samtim-form-footer{
  position:sticky;bottom:0;
  display:flex;align-items:center;justify-content:flex-start;gap:10px;flex-wrap:wrap;
  padding:14px 20px;
  background:rgba(255,255,255,.96);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  border:1px solid var(--sam-border);
  border-radius:var(--sam-radius-lg);
  margin-top:18px;
  z-index:30;
  box-shadow:0 -6px 16px -4px rgba(15,23,42,.08);
}
.samtim-form-footer .footer-spacer{flex:1}
.samtim-form-footer .footer-info{font-size:12.5px;color:var(--sam-text-muted)}
.samtim-form-footer .button-primary{min-width:140px}
/* In invoice form (grid layout), footer spans full width */
.samtim-invoice-layout .samtim-form-footer{grid-column:1/-1}
/* Compact invoice layout - fit screen */
.samtim-invoice-layout{align-items:start}
.samtim-invoice-layout .samtim-sidebar{max-height:calc(100vh - 180px);overflow-y:auto;padding-inline-end:6px}
.samtim-invoice-layout .sticky-preview{max-height:calc(100vh - 100px);overflow-y:auto}
.samtim-invoice-layout .sticky-preview::-webkit-scrollbar,.samtim-invoice-layout .samtim-sidebar::-webkit-scrollbar{width:6px}
.samtim-invoice-layout .sticky-preview::-webkit-scrollbar-thumb,.samtim-invoice-layout .samtim-sidebar::-webkit-scrollbar-thumb{background:var(--sam-border);border-radius:6px}
body.sam-fullscreen .samtim-invoice-layout .samtim-sidebar,body.sam-fullscreen .samtim-invoice-layout .sticky-preview{max-height:calc(100vh - 130px)}

/* ===== Simple bar chart for Stats page ===== */
.sam-chart-bars,.sam-stats-list{display:flex;flex-direction:column;gap:14px}
.sam-bar-row,.sam-stat-row{display:flex;align-items:center;gap:12px}
.sam-bar-label,.sam-stat-label{min-width:90px;flex-shrink:0;font-size:13px;color:var(--sam-text-soft);font-weight:600}
.sam-bar-track{flex:1;height:10px;background:var(--sam-bg-soft);border-radius:999px;overflow:hidden;position:relative}
.sam-bar-fill{height:100%;background:linear-gradient(90deg,var(--sam-primary) 0%,var(--sam-primary-700) 100%);border-radius:999px;transition:width 600ms cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px rgba(13,148,136,.3)}
.sam-bar-value{min-width:120px;text-align:left;font-size:13px;color:var(--sam-text);font-weight:700;font-variant-numeric:tabular-nums;direction:ltr;flex-shrink:0}
.sam-stat-row .sam-badge{min-width:120px;flex-shrink:0;justify-content:center}

/* ===== Header ===== */
.samtim-header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:20px;flex-wrap:wrap;animation:samFadeIn .3s ease-out}
.samtim-header h1{display:flex;align-items:center;gap:12px}
.samtim-header h1::before{content:"";display:inline-block;width:6px;height:28px;background:linear-gradient(180deg,var(--sam-primary) 0%,var(--sam-primary-700) 100%);border-radius:6px;box-shadow:0 2px 6px rgba(13,148,136,.4)}
.samtim-header .button{flex-shrink:0}
@keyframes samFadeIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.samtim-card,.samtim-table-wrap,.samtim-table-toolbar{animation:samFadeIn .35s ease-out}

/* ===== Grid ===== */
.samtim-grid{display:grid;gap:18px}
.cards-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cards-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.cards-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.mt-24{margin-top:24px}
.mt-16{margin-top:16px}

/* ===== Cards ===== */
.samtim-card{background:var(--sam-card-bg);border:1px solid var(--sam-border);border-radius:var(--sam-radius-lg);padding:20px;box-shadow:var(--sam-shadow-sm);transition:box-shadow var(--sam-transition),transform var(--sam-transition)}
.samtim-card h2,.samtim-card h3,.samtim-card h4{margin:0 0 14px}
.samtim-card h3{font-size:16px;font-weight:700;padding-bottom:12px;border-bottom:1px solid var(--sam-border-soft);display:flex;align-items:center;gap:8px}
.samtim-card h3::before{content:"";width:4px;height:18px;background:var(--sam-primary);border-radius:4px}
.samtim-card.muted{background:var(--sam-bg-soft)}
.samtim-card.no-pad{padding:0}
.samtim-card.no-pad .samtim-table-toolbar,.samtim-card.no-pad .samtim-table{margin:0}

/* ===== Stat cards (Dashboard) ===== */
.samtim-card.stat{position:relative;overflow:hidden;display:flex;flex-direction:column;gap:8px;padding:22px;background:linear-gradient(135deg,#ffffff 0%,#f8fafc 100%)}
.samtim-card.stat::before{content:"";position:absolute;top:-30px;left:-30px;width:120px;height:120px;background:linear-gradient(135deg,var(--sam-primary) 0%,var(--sam-primary-700) 100%);opacity:.08;border-radius:50%}
.samtim-card.stat strong{font-size:34px;line-height:1;font-weight:800;color:var(--sam-primary-600);position:relative;z-index:1}
.samtim-card.stat span{color:var(--sam-text-muted);font-size:14px;font-weight:500;position:relative;z-index:1}
.samtim-card.stat.accent::before{background:linear-gradient(135deg,var(--sam-accent) 0%,#d97706 100%)}
.samtim-card.stat.accent strong{color:#d97706}
.samtim-card.stat.success::before{background:linear-gradient(135deg,var(--sam-success) 0%,#059669 100%)}
.samtim-card.stat.success strong{color:#059669}
.samtim-card.stat.info::before{background:linear-gradient(135deg,var(--sam-info) 0%,#2563eb 100%)}
.samtim-card.stat.info strong{color:#2563eb}

/* ===== Buttons ===== */
.samtim-wrap .button,.samtim-frontend .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 18px;border-radius:10px;border:1px solid var(--sam-border);background:#fff;color:var(--sam-text);font-size:14px;font-weight:600;cursor:pointer;text-decoration:none;line-height:1.2;transition:all var(--sam-transition);box-shadow:var(--sam-shadow-sm)}
.samtim-wrap .button:hover,.samtim-frontend .button:hover{background:#f8fafc;border-color:#cbd5e1;transform:translateY(-1px);box-shadow:var(--sam-shadow)}
.samtim-wrap .button-primary,.samtim-frontend .button-primary{background:linear-gradient(135deg,var(--sam-primary) 0%,var(--sam-primary-600) 100%);border-color:var(--sam-primary-600);color:#fff;box-shadow:0 2px 8px rgba(13,148,136,.25)}
.samtim-wrap .button-primary:hover,.samtim-frontend .button-primary:hover{background:linear-gradient(135deg,var(--sam-primary-600) 0%,var(--sam-primary-700) 100%);color:#fff;border-color:var(--sam-primary-700);box-shadow:0 4px 14px rgba(13,148,136,.35)}
.samtim-wrap .button-large,.samtim-frontend .button-large{padding:12px 26px;font-size:15px}
.samtim-wrap .button-danger,.samtim-frontend .button-danger{background:#fff;border-color:#fecaca;color:var(--sam-danger)}
.samtim-wrap .button-danger:hover,.samtim-frontend .button-danger:hover{background:#fef2f2;border-color:#f87171}
.samtim-wrap .button .dashicons,.samtim-frontend .button .dashicons{font-size:16px;width:16px;height:16px;line-height:1}

/* ===== Forms ===== */
.samtim-form .samtim-field{margin-bottom:16px}
.samtim-field label{display:block;font-weight:600;margin-bottom:6px;color:var(--sam-text-soft);font-size:13px}
.samtim-field input[type="text"],.samtim-field input[type="email"],.samtim-field input[type="url"],.samtim-field input[type="number"],.samtim-field input[type="date"],.samtim-field input[type="password"],.samtim-field input[type="color"],.samtim-field select,.samtim-field textarea{width:100%;padding:10px 14px;border:1px solid var(--sam-border);border-radius:10px;box-sizing:border-box;background:#fff;color:var(--sam-text);font-size:14px;font-family:inherit;transition:border-color var(--sam-transition),box-shadow var(--sam-transition);line-height:1.5}
.samtim-field input:focus,.samtim-field select:focus,.samtim-field textarea:focus{outline:none;border-color:var(--sam-primary);box-shadow:0 0 0 3px rgba(13,148,136,.12)}
.samtim-field input[readonly]{background:var(--sam-bg-soft);color:var(--sam-text-muted);cursor:not-allowed}
.samtim-field input[type="color"]{height:42px;padding:4px;cursor:pointer}
.samtim-field textarea{min-height:110px;resize:vertical}
.samtim-field select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%2364748b' d='M6 8.5L1.5 4h9z'/></svg>");background-repeat:no-repeat;background-position:left 12px center;padding-left:36px}
.samtim-field input::placeholder,.samtim-field textarea::placeholder{color:#94a3b8}
.media-picker{display:flex;gap:8px}
.media-picker input{flex:1}
.thumb-preview img{max-width:100%;height:90px;object-fit:cover;border-radius:12px;margin-top:10px;border:1px solid var(--sam-border)}

/* ===== Table Toolbar (Compact Filters) ===== */
.samtim-table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;background:var(--sam-card-bg);border:1px solid var(--sam-border);border-radius:12px;margin-bottom:12px;box-shadow:var(--sam-shadow-sm);min-height:52px}
.samtim-table-toolbar .samtim-search{position:relative;flex:1 1 240px;max-width:340px;min-width:180px}
.samtim-table-toolbar .samtim-search input{width:100%;height:36px;padding:0 34px 0 12px;border:1px solid var(--sam-border);border-radius:8px;font-size:13px;background:#fff;transition:border-color var(--sam-transition),box-shadow var(--sam-transition);font-family:inherit;line-height:36px}
.samtim-table-toolbar .samtim-search input::placeholder{color:#94a3b8;font-size:13px}
.samtim-table-toolbar .samtim-search input:focus{outline:none;border-color:var(--sam-primary);box-shadow:0 0 0 3px rgba(13,148,136,.12)}
.samtim-table-toolbar .samtim-search::before{content:"";position:absolute;top:50%;right:11px;transform:translateY(-50%);width:13px;height:13px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") center/contain no-repeat;opacity:.55;pointer-events:none}
.samtim-table-toolbar .samtim-search:focus-within::before{opacity:.85}
.samtim-table-toolbar select{height:36px;padding:0 30px 0 14px;border:1px solid var(--sam-border);border-radius:8px;font-size:13px;background:#fff;color:var(--sam-text-soft);min-width:170px;max-width:240px;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path fill='%2364748b' d='M6 8.5L1.5 4h9z'/></svg>");background-repeat:no-repeat;background-position:left 10px center;cursor:pointer;transition:all var(--sam-transition);font-weight:500;font-family:inherit;line-height:1;text-overflow:ellipsis}
.samtim-table-toolbar select:hover{border-color:#cbd5e1;color:var(--sam-text)}
.samtim-table-toolbar select:focus{outline:none;border-color:var(--sam-primary);box-shadow:0 0 0 3px rgba(13,148,136,.12);color:var(--sam-text)}
.samtim-table-toolbar select.is-active{background-color:var(--sam-primary-50);border-color:#5eead4;color:var(--sam-primary-700);font-weight:600;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path fill='%230f766e' d='M6 8.5L1.5 4h9z'/></svg>")}
.samtim-table-toolbar .samtim-toolbar-spacer{flex:1;min-width:0}
.samtim-table-toolbar .samtim-toolbar-info{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;background:var(--sam-bg-soft);border-radius:999px;color:var(--sam-text-muted);font-size:12px;font-weight:600;white-space:nowrap}
.samtim-table-toolbar .samtim-toolbar-info strong{color:var(--sam-primary-700);font-weight:700;font-size:13px}
.samtim-table-toolbar .samtim-reset-filters{display:none;align-items:center;gap:4px;font-size:12px;color:var(--sam-danger);background:transparent;border:1px solid transparent;cursor:pointer;padding:5px 10px;border-radius:8px;transition:all var(--sam-transition);font-weight:600;font-family:inherit}
.samtim-table-toolbar .samtim-reset-filters::before{content:"×";font-size:16px;line-height:1;margin-top:-2px}
.samtim-table-toolbar .samtim-reset-filters:hover{background:#fef2f2;border-color:#fecaca}
.samtim-table-toolbar.has-filters .samtim-reset-filters{display:inline-flex}

/* ===== Tables (Modern Refined) ===== */
.samtim-table-wrap{background:var(--sam-card-bg);border:1px solid var(--sam-border);border-radius:14px;overflow:hidden;box-shadow:var(--sam-shadow-sm)}
.samtim-table-wrap .samtim-table{margin:0;border:none;border-radius:0;box-shadow:none}
.samtim-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border-radius:14px;overflow:hidden;border:1px solid var(--sam-border)}
.samtim-table thead{background:#fafbfc}
.samtim-table thead th{padding:12px 16px;text-align:right;font-weight:700;font-size:11px;color:var(--sam-text-muted);border-bottom:1px solid var(--sam-border);text-transform:uppercase;letter-spacing:.06em;white-space:nowrap;background:#fafbfc}
.samtim-table thead th:first-child{padding-inline-start:20px}
.samtim-table thead th:last-child{padding-inline-end:20px}
.samtim-table tbody td{padding:14px 16px;border-bottom:1px solid var(--sam-border-soft);font-size:14px;color:var(--sam-text);vertical-align:middle}
.samtim-table tbody td:first-child{padding-inline-start:20px}
.samtim-table tbody td:last-child{padding-inline-end:20px}
.samtim-table tbody tr{transition:background var(--sam-transition);position:relative}
.samtim-table tbody tr:hover{background:#fafcfe}
.samtim-table tbody tr:hover td:first-child{box-shadow:inset 3px 0 0 var(--sam-primary)}
.samtim-table tbody tr:last-child td{border-bottom:none}
.samtim-table tbody td strong{font-weight:600;color:var(--sam-text)}
.samtim-table tbody td .cell-sub{font-size:12px;color:var(--sam-text-muted);margin-top:3px;font-weight:400}
.samtim-table tbody td .cell-money{font-weight:700;color:var(--sam-text);font-variant-numeric:tabular-nums;direction:ltr;display:inline-block}

/* Avatar/Initial circle */
.cell-with-avatar{display:flex;align-items:center;gap:10px}
.cell-avatar{flex-shrink:0;width:36px;height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;color:#fff;background:linear-gradient(135deg,var(--sam-primary) 0%,var(--sam-primary-700) 100%);text-transform:uppercase;letter-spacing:.02em}
.cell-avatar.invoice{background:linear-gradient(135deg,#6366f1 0%,#4338ca 100%);font-size:11px;border-radius:8px;letter-spacing:0}
.cell-avatar.branch{background:linear-gradient(135deg,#0ea5e9 0%,#0369a1 100%)}
.cell-avatar.trip{background:linear-gradient(135deg,#f59e0b 0%,#b45309 100%)}
.cell-avatar.muted{background:linear-gradient(135deg,#94a3b8 0%,#475569 100%)}
.cell-text{display:flex;flex-direction:column;min-width:0;gap:2px}
.cell-text strong{font-weight:600;font-size:14px;line-height:1.3}

/* ===== Action chips (color-coded) ===== */
.samtim-table .actions{white-space:nowrap;text-align:right;display:flex;gap:6px;justify-content:flex-start;align-items:center}
.samtim-table .actions a,.samtim-table .actions button{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:32px;padding:0 12px;border-radius:8px;font-size:12.5px;font-weight:600;border:1px solid transparent;cursor:pointer;transition:all var(--sam-transition);text-decoration:none;line-height:1;font-family:inherit}
.samtim-table .actions .dashicons{font-size:14px;width:14px;height:14px;line-height:1}

/* Default chip (fallback) */
.samtim-table .actions a,.samtim-table .actions button{background:var(--sam-bg-soft);color:var(--sam-text-soft);border-color:var(--sam-border-soft)}
.samtim-table .actions a:hover,.samtim-table .actions button:hover{background:#fff;border-color:#cbd5e1;color:var(--sam-text);transform:translateY(-1px);box-shadow:var(--sam-shadow-sm)}

/* View — blue */
.samtim-table .actions .action-view{background:#eff6ff;color:#1d4ed8;border-color:#dbeafe}
.samtim-table .actions .action-view:hover{background:#1d4ed8;color:#fff;border-color:#1d4ed8;box-shadow:0 4px 10px -2px rgba(29,78,216,.4)}

/* Edit — amber */
.samtim-table .actions .action-edit{background:#fffbeb;color:#b45309;border-color:#fde68a}
.samtim-table .actions .action-edit:hover{background:#d97706;color:#fff;border-color:#d97706;box-shadow:0 4px 10px -2px rgba(217,119,6,.4)}

/* Print — purple */
.samtim-table .actions .action-print{background:#faf5ff;color:#7e22ce;border-color:#e9d5ff}
.samtim-table .actions .action-print:hover{background:#7e22ce;color:#fff;border-color:#7e22ce;box-shadow:0 4px 10px -2px rgba(126,34,206,.4)}

/* Delete — red */
.samtim-table .actions .action-delete{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.samtim-table .actions .action-delete:hover{background:#b91c1c;color:#fff;border-color:#b91c1c;box-shadow:0 4px 10px -2px rgba(185,28,28,.4)}

/* Email — teal */
.samtim-table .actions .action-email{background:var(--sam-primary-50);color:var(--sam-primary-700);border-color:#a7f3d0}
.samtim-table .actions .action-email:hover{background:var(--sam-primary-600);color:#fff;border-color:var(--sam-primary-600);box-shadow:0 4px 10px -2px rgba(13,148,136,.4)}

/* Icon-only variant for tight spaces */
.samtim-table .actions .icon-only{width:32px;padding:0;justify-content:center}
.samtim-table .actions .icon-only span:not(.dashicons){display:none}

/* Empty state */
.samtim-table .empty-row td{text-align:center;color:var(--sam-text-muted);padding:60px 16px;font-style:normal;border-bottom:none !important}
.samtim-table .empty-row:hover{background:transparent !important}
.samtim-table .empty-row .empty-state{display:flex;flex-direction:column;align-items:center;gap:10px}
.samtim-table .empty-row .empty-state::before{content:"";width:56px;height:56px;border-radius:50%;background:var(--sam-bg-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") center/24px no-repeat}
.samtim-table .empty-row .empty-state strong{font-size:15px;color:var(--sam-text-soft);font-weight:700}
.samtim-table .empty-row .empty-state span{font-size:13px;color:var(--sam-text-muted)}

/* ===== Status Badges ===== */
.sam-badge{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.4;white-space:nowrap;border:1px solid transparent}
.sam-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}
.sam-badge.muted{background:var(--sam-bg-soft);color:var(--sam-text-muted);border-color:var(--sam-border)}
.sam-badge.success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.sam-badge.info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.sam-badge.indigo{background:#eef2ff;color:#4338ca;border-color:#c7d2fe}
.sam-badge.warning{background:#fffbeb;color:#b45309;border-color:#fde68a}
.sam-badge.danger{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.sam-badge.purple{background:#faf5ff;color:#7e22ce;border-color:#e9d5ff}
.sam-badge.teal{background:#f0fdfa;color:#0f766e;border-color:#99f6e4}
.sam-badge.outline{background:#fff;color:var(--sam-text-muted);border-color:var(--sam-border)}

/* ===== Detail view ===== */
.samtim-list-inline{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.detail-head{display:flex;gap:18px;align-items:center;margin-bottom:22px;padding-bottom:20px;border-bottom:1px solid var(--sam-border-soft)}
.detail-head img,.no-image{width:84px;height:84px;border-radius:18px;object-fit:cover;background:linear-gradient(135deg,var(--sam-primary-50) 0%,#ccfbf1 100%);display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:700;color:var(--sam-primary-600);flex-shrink:0;border:1px solid #99f6e4}
.no-image.small{width:56px;height:56px;font-size:22px;border-radius:14px}
.detail-head h2{margin:0;font-size:22px}
.detail-head .badge{display:inline-block;background:var(--sam-primary-50);color:var(--sam-primary-700);padding:4px 12px;border-radius:999px;font-size:12px;font-weight:700;margin-bottom:8px;border:1px solid #99f6e4}
.detail-item{background:#fff;border:1px solid var(--sam-border);padding:14px 16px;border-radius:12px;transition:border-color var(--sam-transition),box-shadow var(--sam-transition)}
.detail-item:hover{border-color:#cbd5e1;box-shadow:var(--sam-shadow-sm)}
.detail-item span{display:block;color:var(--sam-text-muted);margin-bottom:6px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.detail-item strong{font-size:15px;color:var(--sam-text);font-weight:600;word-break:break-word}
.actions-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;padding-top:18px;border-top:1px solid var(--sam-border-soft)}
.detail-card .actions-row{border-top:1px solid var(--sam-border-soft)}

/* ===== Invoice ===== */
.samtim-invoice-layout{display:grid;grid-template-columns:440px 1fr;gap:18px}
.sticky-preview{position:sticky;top:42px}
.invoice-preview,.invoice-view-wrap{background:transparent}
.invoice-paper{max-width:920px;margin:0 auto;background:#fff;border:1px solid var(--sam-border);border-radius:var(--sam-radius-lg);padding:32px;color:var(--sam-text);box-shadow:var(--sam-shadow);--primary:var(--sam-primary-600)}
.invoice-head{display:flex;flex-direction:column;gap:18px;padding-bottom:22px;border-bottom:3px solid var(--primary);margin-bottom:22px}
.invoice-company{display:flex;gap:14px;align-items:center;width:100%}
.invoice-company img{width:64px;height:64px;object-fit:contain;border-radius:14px;background:#fff;border:1px solid var(--sam-border-soft);padding:6px}
.invoice-company h2{margin:0 0 6px;font-size:26px;color:var(--primary)}
.invoice-company p{margin:0;color:var(--sam-text-muted);font-size:13px}
.invoice-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;text-align:center;width:100%;min-width:0}
.invoice-meta div{background:linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%);padding:12px 14px;border-radius:12px;border:1px solid var(--sam-border-soft)}
.invoice-meta span{display:block;color:var(--sam-text-muted);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.invoice-meta strong{display:block;margin-top:4px;font-size:14px;color:var(--sam-text)}
.invoice-section{margin-top:18px}
.invoice-section.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.invoice-section.three-col{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.invoice-section h4{margin:0 0 10px;font-size:14px;color:var(--primary);font-weight:700;display:flex;align-items:center;gap:6px}
.invoice-section h4::before{content:"";width:3px;height:14px;background:var(--primary);border-radius:3px}
.invoice-section ul{list-style:none;padding:0;margin:0}
.invoice-section li{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px dashed var(--sam-border)}
.invoice-section li:last-child{border-bottom:none}
.invoice-section li span{color:var(--sam-text-muted);font-size:13px}
.invoice-section li strong{font-size:14px;text-align:left}
.statbox{background:linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%);border:1px solid var(--sam-border-soft);padding:18px;border-radius:14px;text-align:center}
.statbox span{display:block;color:var(--sam-text-muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.statbox strong{display:block;font-size:22px;margin-top:6px;color:var(--primary);font-weight:800}
.invoice-total{margin-top:22px;background:var(--sam-primary-700);color:#fff;border-radius:var(--sam-radius);padding:22px;display:grid;grid-template-columns:repeat(3,1fr);gap:14px;box-shadow:0 8px 24px -4px rgba(15,118,110,.35)}
.invoice-total > div{text-align:center;padding:6px 8px}
.invoice-total > div + div{border-inline-start:1px solid rgba(255,255,255,.32)}
.invoice-total span{display:block;opacity:.85;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.invoice-total strong{display:block;margin-top:6px;font-size:24px;font-weight:800}
.invoice-section p{margin:0;line-height:1.8;color:var(--sam-text)}
.samtim-sidebar{display:flex;flex-direction:column;gap:18px}
.preview-logo-img{max-width:60px}
.invoice-view-wrap{padding:0;background:transparent;border:none;box-shadow:none}
.invoice-view-wrap .invoice-paper{box-shadow:var(--sam-shadow)}
.print-only{display:none}
.readonly-note{font-size:12px;color:var(--sam-text-muted)}

/* ===== Notices ===== */
.samtim-wrap .notice,.samtim-frontend .notice{border-radius:12px;border-width:1px;padding:12px 16px}

/* ===== Tools page additions ===== */
.samtim-tool-row{padding:12px 14px;background:var(--sam-bg-soft);border-radius:10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;flex-wrap:wrap;gap:8px}
.samtim-tool-row strong{color:var(--sam-text)}
.samtim-tool-status{font-size:13px;font-weight:700}
.samtim-tool-status.ok{color:#047857}
.samtim-tool-status.miss{color:#b45309}

/* ===== Responsive ===== */
@media (max-width:1100px){
  .cards-2,.cards-3,.cards-4,.samtim-invoice-layout,.invoice-section.two-col,.invoice-section.three-col,.invoice-total{grid-template-columns:1fr}
  .invoice-total > div + div{border-inline-start:none;border-top:1px solid rgba(255,255,255,.15);padding-top:14px}
  .sticky-preview{position:static}
}
@media (max-width:768px){
  .samtim-table thead{display:none}
  .samtim-table tbody td{display:flex;justify-content:space-between;gap:10px;padding:10px 14px;border-bottom:1px solid var(--sam-border-soft)}
  .samtim-table tbody td::before{content:attr(data-label);font-weight:700;color:var(--sam-text-muted);font-size:12px;text-transform:uppercase}
  .samtim-table tbody tr{display:block;border:1px solid var(--sam-border);border-radius:12px;margin-bottom:10px;background:#fff}
  .samtim-table tbody tr:hover{background:#fff}
  .samtim-table .actions{justify-content:flex-end}
  .samtim-table .actions::before{display:none}
  .samtim-table-wrap{border:none;background:transparent;box-shadow:none;padding:0}
  .invoice-paper{padding:20px}
  .invoice-meta{grid-template-columns:1fr;text-align:right}
}

/* ===== Invoice Print Templates ===== */
.invoice-paper.invoice-tpl-classic{--primary:#1f2937;border:2px solid #1f2937;padding:36px;font-family:"Times New Roman",Georgia,serif}
.invoice-paper.invoice-tpl-classic .invoice-head{border-bottom:2px solid #1f2937;padding-bottom:18px}
.invoice-paper.invoice-tpl-classic .invoice-company h2{color:#1f2937;font-family:inherit}
.invoice-paper.invoice-tpl-classic .invoice-meta div{background:#fff;border:1px solid #1f2937;border-radius:4px}
.invoice-paper.invoice-tpl-classic .invoice-section h4{color:#1f2937;border-bottom:1px solid #cbd5e1;padding-bottom:6px}
.invoice-paper.invoice-tpl-classic .invoice-section h4::before{display:none}
.invoice-paper.invoice-tpl-classic .invoice-total{background:#1f2937 !important;border-radius:4px}
.invoice-paper.invoice-tpl-classic .statbox{background:#fff;border:1px solid #1f2937;border-radius:4px}
.invoice-paper.invoice-tpl-classic .invoice-meta strong,.invoice-paper.invoice-tpl-classic .statbox strong{color:#1f2937}

.invoice-paper.invoice-tpl-compact{padding:20px;font-size:12.5px}
.invoice-paper.invoice-tpl-compact .invoice-head{padding-bottom:12px;margin-bottom:12px;border-bottom-width:2px}
.invoice-paper.invoice-tpl-compact .invoice-company img{width:46px;height:46px}
.invoice-paper.invoice-tpl-compact .invoice-company h2{font-size:18px}
.invoice-paper.invoice-tpl-compact .invoice-section{margin-top:10px}
.invoice-paper.invoice-tpl-compact .invoice-section li{padding:5px 0;font-size:12px}
.invoice-paper.invoice-tpl-compact .invoice-section h4{font-size:12px;margin-bottom:6px}
.invoice-paper.invoice-tpl-compact .statbox{padding:10px}
.invoice-paper.invoice-tpl-compact .statbox strong{font-size:16px;margin-top:3px}
.invoice-paper.invoice-tpl-compact .invoice-total{padding:14px;margin-top:14px}
.invoice-paper.invoice-tpl-compact .invoice-total strong{font-size:18px}
.invoice-paper.invoice-tpl-compact .invoice-meta div{padding:7px 10px}

/* Modern (default) reinforcement */
.invoice-paper.invoice-tpl-modern{background:linear-gradient(180deg,#ffffff 0%,#fafbff 100%)}
.invoice-paper.invoice-tpl-modern .invoice-head{position:relative}
.invoice-paper.invoice-tpl-modern .invoice-head::after{content:"";position:absolute;bottom:-3px;right:0;width:80px;height:3px;background:var(--sam-accent,#f59e0b);border-radius:3px}

/* ===== Print (preserves on-screen look 1:1 — same grids, same colors) ===== */
@page{size:A4;margin:5mm}
@media print{
  /* Print colors exactly as shown on screen */
  *{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important}
  html,body{background:#fff !important;margin:0 !important;padding:0 !important;width:auto !important;min-width:0 !important}

  /* Hide WP/theme/plugin chrome */
  #wpadminbar,#adminmenumain,#adminmenuback,#adminmenuwrap,#wpfooter,
  .notice,.update-nag,
  header,footer,.site-header,.site-footer,#masthead,#colophon,nav.main-navigation,
  aside,#secondary,.widget-area,.entry-header,.entry-meta,.entry-footer,
  .post-navigation,.comments-area,
  .samtim-sidebar,.samtim-header,.actions-row,.samtim-portal-nav,.sam-nav-toggle,
  .samtim-table-toolbar,.samtim-card.samtim-tools-card,.samtim-welcome,
  .invoice-tpl-picker,.print-hide,.samtim-grid,.samtim-form-footer,
  .sam-fullscreen-btn,.sam-theme-toggle
  {display:none !important}

  /* Strip ALL outer wrappers so the invoice fills the page edge-to-edge */
  #wpcontent,#wpbody-content,#wpbody,.wrap,.samtim-wrap,.samtim-frontend,
  .entry-content,.site-main,.site-content,main,
  .samtim-card.invoice-view-wrap,.invoice-view-wrap{
    margin:0 !important;padding:0 !important;
    background:#fff !important;
    max-width:none !important;width:100% !important;min-width:0 !important;
    border:none !important;box-shadow:none !important;
    float:none !important;display:block !important;
  }

  /* Invoice paper: keep its inner padding (matches preview) but strip outer chrome */
  .invoice-paper{
    margin:0 !important;
    border:none !important;
    box-shadow:none !important;
    border-radius:0 !important;
    max-width:none !important;
    width:100% !important;
    background:#fff !important;
  }

  /* CRITICAL: A4 print width (~720px) is BELOW our 780px responsive breakpoint,
     which would collapse all multi-column grids to a single column.
     Force them back to their desktop layout so print matches preview exactly. */
  .invoice-head{display:flex !important;flex-direction:column !important;gap:18px !important}
  .invoice-company{display:flex !important;flex-direction:row !important;gap:14px !important;align-items:center !important;width:100% !important}
  .invoice-meta{display:grid !important;grid-template-columns:repeat(3,1fr) !important;gap:12px !important;text-align:center !important;width:100% !important}
  .invoice-section.two-col{display:grid !important;grid-template-columns:1fr 1fr !important;gap:14px !important}
  .invoice-section.three-col{display:grid !important;grid-template-columns:repeat(3,1fr) !important;gap:14px !important}

  /* Total box: solid green, rounded corners, padding AND visible separators */
  .invoice-total{
    display:grid !important;
    grid-template-columns:repeat(3,1fr) !important;
    gap:14px !important;
    padding:22px !important;
    margin-top:22px !important;
    border-radius:14px !important;
    background:var(--sam-primary-700) !important;
    color:#fff !important;
    /* Fallback outline in case the background doesn't render on some printers */
    border:1px solid var(--sam-primary-700) !important;
    box-shadow:none !important;
  }
  .invoice-total > div{
    text-align:center !important;
    padding:6px 8px !important;
    border-top:none !important;
  }
  /* Visible separators between the 3 cells (low opacity is invisible on paper) */
  .invoice-total > div + div{
    border-inline-start:1px solid rgba(255,255,255,.55) !important;
    border-top:none !important;
    padding-top:6px !important;
  }
  .invoice-total span,.invoice-total strong{color:#fff !important}

  .invoice-section li{display:flex !important;flex-direction:row !important;justify-content:space-between !important;gap:10px !important}

  /* Force light look during print even when dark theme is active */
  html[data-sam-theme="dark"],html[data-sam-theme="dark"] body{background:#fff !important}
  html[data-sam-theme="dark"] .invoice-paper{background:#fff !important;color:#0f172a !important;border-color:#e2e8f0 !important}
  html[data-sam-theme="dark"] .invoice-paper *{color:inherit}
  html[data-sam-theme="dark"] .invoice-total,html[data-sam-theme="dark"] .invoice-total *{color:#fff !important}
  html[data-sam-theme="dark"] .invoice-meta div,html[data-sam-theme="dark"] .statbox{background:#f8fafc !important;border-color:#e2e8f0 !important;color:#0f172a !important}
  html[data-sam-theme="dark"] .invoice-section li,html[data-sam-theme="dark"] .invoice-section li *{color:#0f172a !important}
  html[data-sam-theme="dark"] .invoice-section li span,html[data-sam-theme="dark"] .invoice-section li{border-color:#cbd5e1 !important}

  /* Page-break hints */
  .invoice-head,.invoice-section,.invoice-total{page-break-inside:avoid}
}
