:root{
  --tem-navy:#312d2b;
  --tem-navy2:#24201f;
  --tem-orange:#d17a1f;
  --tem-pink:#6f1727;
  --tem-green:#6c4b36;
  --tem-blue:#a64629;
  --tem-red:#a52a36;
  --tem-bg:#f7f4f0;
  --tem-card:#ffffff;
  --tem-text:#302b29;
  --tem-muted:#786e68;
  --tem-line:#e7ded8;
  --tem-soft:#fbf8f5;
  --tem-success:#28745a;
  --tem-warning:#9a6117;
  --tem-shadow:0 18px 44px rgba(50,38,32,.08);
  --tem-radius:18px;
}

html{margin:0!important;padding:0!important;background:var(--tem-bg)}
body.tem-portal-page{margin:0!important;padding:0!important;overflow-x:hidden;background:var(--tem-bg)}
body.tem-standalone{min-width:320px;min-height:100vh;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--tem-text);background:var(--tem-bg)}
body.tem-portal-page .entry-header,body.tem-portal-page .page-header,body.tem-portal-page .wp-block-post-title{display:none!important}
body.tem-portal-page #primary,body.tem-portal-page #main,body.tem-portal-page .site-main,body.tem-portal-page .content-area,body.tem-portal-page .site-content,body.tem-portal-page article.page,body.tem-portal-page .entry-content,body.tem-portal-page .wp-block-post-content,body.tem-portal-page .wp-block-shortcode{width:100%!important;max-width:none!important;margin:0!important;padding-left:0!important;padding-right:0!important}
body.tem-portal-page .wp-block-shortcode{overflow:visible!important}

.tem-shell,.tem-shell *{box-sizing:border-box}
.tem-shell{width:100%;max-width:none;min-width:0;min-height:100vh;display:flex;background:var(--tem-bg);color:var(--tem-text);font-family:inherit;line-height:1.48}
.tem-shell a{text-decoration:none}
.tem-shell button,.tem-shell input,.tem-shell select,.tem-shell textarea{font-family:inherit}
.tem-shell button:focus-visible,.tem-shell a:focus-visible,.tem-shell input:focus-visible,.tem-shell select:focus-visible,.tem-shell textarea:focus-visible,.tem-shell summary:focus-visible{outline:3px solid rgba(209,122,31,.28);outline-offset:2px}

/* Sign in */
.tem-login-shell{display:grid;place-items:center;padding:clamp(16px,4vw,52px);background:
  radial-gradient(circle at 8% 10%,rgba(209,122,31,.13),transparent 32%),
  radial-gradient(circle at 94% 88%,rgba(111,23,39,.10),transparent 34%),
  var(--tem-bg)}
.tem-login-card{width:min(1040px,100%);min-height:610px;display:grid;grid-template-columns:minmax(320px,.92fr) minmax(420px,1.08fr);align-items:stretch;overflow:hidden;background:#fff;border:1px solid var(--tem-line);border-radius:28px;box-shadow:0 30px 90px rgba(55,39,31,.16)}
.tem-login-identity{min-width:0;padding:52px 46px 42px;display:flex;flex-direction:column;background:linear-gradient(155deg,#2d2927 0%,#4b3026 56%,#6f1727 125%);color:#fff}
.tem-login-brand{display:flex;align-items:center;justify-content:flex-start}
.tem-login-brand .tem-logo-bundled{display:block;width:min(330px,100%);height:auto;object-fit:contain;background:#fff;border-radius:15px;padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.12)}
.tem-login-copy{margin:auto 0;padding:54px 0 36px;max-width:360px}
.tem-login-kicker{display:block;margin-bottom:10px;color:#f0bc77;font-size:11px;font-weight:850;letter-spacing:.16em;text-transform:uppercase}
.tem-login-copy h1{margin:0 0 14px;font-size:clamp(34px,4vw,49px);line-height:1.02;letter-spacing:-.04em;color:#fff}
.tem-login-copy p{margin:0;max-width:330px;color:rgba(255,255,255,.76);font-size:14px;line-height:1.7}
.tem-contact-mini{display:flex;flex-direction:column;gap:5px;padding-top:22px;border-top:1px solid rgba(255,255,255,.16);color:rgba(255,255,255,.72);font-size:11px;line-height:1.5}
.tem-login-formpanel{min-width:0;padding:58px clamp(36px,5vw,70px);display:flex;flex-direction:column;align-items:stretch;justify-content:center;background:#fff}.tem-login-formpanel>*{width:100%;max-width:470px;margin-left:auto;margin-right:auto}
.tem-login-heading{margin-bottom:28px}
.tem-login-heading h2{margin:4px 0 8px;font-size:31px;line-height:1.12;letter-spacing:-.025em;color:var(--tem-navy2)}
.tem-login-heading p{margin:0;color:var(--tem-muted);font-size:13px}
.tem-login-form{gap:17px;width:100%}.tem-login-form>label{width:100%}
.tem-login-form label{font-size:13px}
.tem-login-form input[type=text],.tem-login-form input[type=password]{min-height:52px!important;font-size:16px!important;border-radius:12px!important}
.tem-login-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.tem-secure-note{color:var(--tem-muted);font-size:11px;font-weight:700}
.tem-login-button{width:100%;min-height:52px;border-radius:12px!important;font-size:14px!important}
.tem-login-help{margin-top:18px;color:var(--tem-muted);font-size:11px;line-height:1.55;text-align:center}
.tem-login-error{margin:0 0 18px;padding:12px 14px;border:1px solid #efc8ce;border-radius:11px;background:#fff2f4;color:#8d2432;font-size:12px;font-weight:750;line-height:1.5}
.tem-password-field{position:relative;display:block;width:100%}
.tem-password-field input{padding-right:70px!important}
.tem-password-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);min-width:54px;height:36px;border:0;border-radius:8px;background:#f1ece8;color:#5d4b42;font-size:11px;font-weight:800;cursor:pointer}

/* App shell */
.tem-sidebar{width:282px;flex:0 0 282px;height:100vh;position:sticky;top:0;z-index:60;display:flex;flex-direction:column;overflow-y:auto;padding:24px 18px 20px;background:linear-gradient(180deg,#292523 0%,#3f2d27 58%,#521d24 125%);color:#fff}
.tem-brand{display:flex;align-items:center;min-height:78px;padding:0 5px 22px}
.tem-brand .tem-logo-bundled{display:block;width:226px;max-width:100%;height:auto;max-height:78px;object-fit:contain;background:#fff;padding:8px 10px;border-radius:12px}
.tem-nav{display:flex;flex-direction:column;gap:6px}
.tem-nav a{min-height:48px;display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:12px;color:rgba(255,255,255,.82);font-size:13px;font-weight:760;transition:background .16s ease,color .16s ease,transform .16s ease}
.tem-nav a:hover,.tem-nav a.active{background:rgba(255,255,255,.12);color:#fff}
.tem-nav a.active{box-shadow:inset 3px 0 0 var(--tem-orange)}
.tem-nav-icon{width:29px;height:29px;flex:0 0 29px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.10);font-size:14px;color:#fff}
.tem-sidebar-foot{margin-top:auto;padding:18px 8px 0;border-top:1px solid rgba(255,255,255,.14)}
.tem-user-chip{display:flex;flex-direction:column;min-width:0}
.tem-user-chip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#fff}
.tem-user-chip span{margin-top:3px;color:rgba(255,255,255,.62);font-size:10px;line-height:1.45}
.tem-logout-form{margin:0;padding:0}
.tem-logout{margin-top:12px;padding:0;border:0;background:transparent;color:#fff;font-size:12px;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}

.tem-main{min-width:0;flex:1;position:relative}
.tem-topbar{height:88px;position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:16px;padding:0 clamp(18px,3vw,38px);background:rgba(255,255,255,.96);border-bottom:1px solid var(--tem-line);backdrop-filter:blur(10px)}
.tem-topbar>div:nth-child(2){min-width:0}
.tem-eyebrow,.tem-kicker{display:block;color:var(--tem-orange);font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.tem-topbar h1{margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--tem-navy2);font-size:24px;line-height:1.1;letter-spacing:-.02em}
.tem-top-meta{margin-left:auto;flex:0 0 auto;color:var(--tem-muted);font-size:13px;font-weight:750}
.tem-menu-toggle{display:none;width:44px;height:44px;flex:0 0 44px;border:0;border-radius:11px;background:var(--tem-navy);color:#fff;font-size:20px;cursor:pointer}
.tem-content{width:100%;max-width:1700px;margin:0 auto;padding:28px clamp(18px,3vw,38px) 52px}
.tem-alert{margin:18px clamp(18px,3vw,38px) 0;padding:13px 16px;border-radius:11px;font-size:13px;font-weight:750;line-height:1.5}
.tem-alert-success{background:#edf8f3;border:1px solid #c8e7d9;color:#23634e}
.tem-alert-error{background:#fff1f3;border:1px solid #efc6cd;color:#902a37}
.tem-inline-alert{margin:16px 0 0}

/* Layout */
.tem-grid{display:grid;gap:18px;min-width:0}
.tem-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.tem-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tem-mt{margin-top:20px}
.tem-card,.tem-stat{min-width:0;background:var(--tem-card);border:1px solid var(--tem-line);border-radius:var(--tem-radius);box-shadow:var(--tem-shadow)}
.tem-card{padding:24px}
.tem-stat{position:relative;overflow:hidden;padding:22px 22px 21px}
.tem-stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px}
.tem-accent-orange:before{background:var(--tem-orange)}
.tem-accent-blue:before{background:var(--tem-blue)}
.tem-accent-pink:before{background:var(--tem-pink)}
.tem-accent-green:before{background:var(--tem-green)}
.tem-stat span{display:block;color:var(--tem-muted);font-size:10px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.tem-stat strong{display:block;margin-top:9px;color:var(--tem-navy2);font-size:30px;line-height:1.05;overflow-wrap:anywhere}
.tem-stat small{display:block;margin-top:7px;color:var(--tem-muted);font-size:11px;line-height:1.4}
.tem-card-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;min-width:0}
.tem-card-head>div{min-width:0}
.tem-card-head h2,.tem-card-head h3{margin:3px 0 0;color:var(--tem-navy2);line-height:1.18;letter-spacing:-.015em}
.tem-card-head h2{font-size:20px}.tem-card-head h3{font-size:16px}
.tem-card-head-compact{margin:0 0 14px}
.tem-divider{height:1px;margin:20px 0;background:var(--tem-line)}
.tem-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#f2ece8;color:#624b3f;font-size:10px;font-weight:850;white-space:nowrap}
.tem-help{color:var(--tem-muted);font-size:11px;font-weight:500;line-height:1.5}
.tem-info-box{padding:13px 15px;border:1px solid #ead5c7;border-radius:11px;background:#fbf4ee;color:#65483b;font-size:12px;line-height:1.6}
.tem-empty{padding:28px 16px;text-align:center;color:var(--tem-muted);font-size:12px}

/* Forms */
.tem-form{display:flex;flex-direction:column;gap:15px;min-width:0}
.tem-form-grid{display:grid;gap:14px;min-width:0}
.tem-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tem-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.tem-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.tem-form label{min-width:0;display:flex;flex-direction:column;gap:6px;color:#4c403a;font-size:11px;font-weight:800;line-height:1.35}
.tem-form input[type=text],.tem-form input[type=email],.tem-form input[type=password],.tem-form input[type=url],.tem-form input[type=number],.tem-form input[type=date],.tem-form select,.tem-form textarea,.tem-copy-row input,.tem-report-filter select,.tem-report-filter input{width:100%;max-width:100%;min-height:44px;padding:10px 12px!important;border:1px solid #dcd3cd!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important;color:var(--tem-text)!important;font:inherit;font-size:14px!important;line-height:1.35}
.tem-form textarea{min-height:96px!important;resize:vertical}
.tem-form input:focus,.tem-form select:focus,.tem-form textarea:focus,.tem-copy-row input:focus,.tem-report-filter input:focus,.tem-report-filter select:focus{border-color:var(--tem-orange)!important;outline:3px solid rgba(209,122,31,.13)!important}
.tem-check{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;color:var(--tem-muted)!important;font-size:11px!important;font-weight:700!important;cursor:pointer}
.tem-check input{width:17px;height:17px;accent-color:var(--tem-pink)}
.tem-form-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.tem-btn{appearance:none;min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:10px 15px;border:0;border-radius:10px;font-size:12px;font-weight:850;line-height:1.2;white-space:nowrap;cursor:pointer;transition:transform .14s ease,background .14s ease,opacity .14s ease}
.tem-btn:hover{transform:translateY(-1px)}
.tem-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.tem-btn-primary{background:var(--tem-navy);color:#fff!important}.tem-btn-primary:hover{background:var(--tem-pink)}
.tem-btn-secondary{background:var(--tem-orange);color:#fff!important}.tem-btn-secondary:hover{background:#ba6417}
.tem-btn-light{background:#f1ece8;color:#4c3d36!important}.tem-btn-light:hover{background:#e8dfda}
.tem-total-preview{padding:13px 15px;border:1px solid #eadfd8;border-radius:11px;background:var(--tem-soft);text-align:right;color:var(--tem-muted);font-size:12px}
.tem-total-preview strong{margin-left:8px;color:var(--tem-navy2);font-size:20px}
.tem-copy-row{display:flex;gap:9px;align-items:center}.tem-copy-row input{flex:1;min-width:0}

/* Tables */
.tem-table-wrap{width:100%;max-width:100%;overflow:auto;border:1px solid var(--tem-line);border-radius:13px;background:#fff;-webkit-overflow-scrolling:touch}
.tem-table{width:100%;min-width:720px;border-collapse:collapse;background:#fff}
.tem-table th{padding:11px 12px;border-bottom:1px solid var(--tem-line);background:#faf8f6;color:#776961;text-align:left;white-space:nowrap;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.tem-table td{padding:12px;border-bottom:1px solid #efe9e5;color:var(--tem-text);font-size:12px;vertical-align:top}
.tem-table tr:last-child td{border-bottom:0}
.tem-table tbody tr:hover{background:#fdfbf9}
.tem-table td small{display:block;margin-top:3px;color:var(--tem-muted);font-size:10px;line-height:1.45}
.tem-actions-cell,.tem-mini-actions{white-space:nowrap}
.tem-actions-cell>a,.tem-mini-actions>a,.tem-link{color:#8b3827;font-size:11px;font-weight:850}
.tem-inline{display:inline}
.tem-link-danger{margin-left:7px;padding:0;border:0;background:none;color:var(--tem-red);font-size:11px;font-weight:850;cursor:pointer}
.tem-note-row td{padding-top:0;background:#fcfaf8}
.tem-notes-inline{display:flex;flex-direction:column;gap:7px}
.tem-notes-inline>div{padding:7px 10px;border-left:3px solid var(--tem-orange);border-radius:7px;background:#fff}
.tem-notes-inline strong{font-size:10px}.tem-notes-inline span{margin-left:6px;color:var(--tem-muted);font-size:9px}.tem-notes-inline p{margin:4px 0 0;font-size:11px}

/* Dashboard */
.tem-split-bars{display:flex;flex-direction:column;gap:15px}
.tem-channel>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.tem-channel span{color:var(--tem-muted);font-size:11px;font-weight:750}.tem-channel strong{font-size:12px;color:var(--tem-navy2)}
.tem-progress{height:8px;overflow:hidden;border-radius:999px;background:#eee8e4}
.tem-progress i{display:block;height:100%;border-radius:inherit}.tem-progress .cash{background:var(--tem-orange)}.tem-progress .card{background:var(--tem-green)}.tem-progress .uber{background:var(--tem-pink)}
.tem-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.tem-quick-actions a{min-height:48px;display:flex;align-items:center;padding:11px 12px;border:1px solid var(--tem-line);border-radius:11px;background:#fff;color:#5e4439;font-size:11px;font-weight:800;line-height:1.35}
.tem-quick-actions a:hover{border-color:#dab7a0;background:#fdf8f4}

/* Reconciliation */
.tem-filter-pills{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.tem-filter-pills a{display:inline-flex;align-items:center;min-height:34px;padding:7px 10px;border-radius:9px;background:#f3eeea;color:#6b5b53;font-size:10px;font-weight:850}
.tem-filter-pills a.active{background:var(--tem-navy);color:#fff}
.tem-period-table{min-width:960px}
.tem-period-table td{vertical-align:middle}.tem-period-table td:nth-child(2){border-left:3px solid rgba(209,122,31,.42)}.tem-period-table td:nth-child(3){border-left:3px solid rgba(108,75,54,.34)}.tem-period-table td:nth-child(4){border-left:3px solid rgba(111,23,39,.28)}
.tem-period-amount{display:block;margin-bottom:8px;color:var(--tem-navy2);font-size:16px}
.tem-reconcile-form{margin:0}
.tem-received-check{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:7px!important;padding:6px 9px;border:1px solid #ebcbd0;border-radius:999px;background:#fff4f5;color:#922f3a!important;font-size:9px!important;font-weight:900!important;cursor:pointer}
.tem-received-check.is-received{border-color:#c4e1d4;background:#edf8f3;color:#23634e!important}
.tem-received-check input{width:15px;height:15px;margin:0;accent-color:var(--tem-success)}

/* Supplier pricing */
.tem-price-table th:not(:first-child),.tem-price-table td:not(:first-child){min-width:145px;text-align:center}.tem-price-table td:first-child{min-width:190px}
.tem-best-price{position:relative;background:#f8f2ed!important}.tem-best-pill{display:inline-block;margin-top:5px;padding:3px 7px;border-radius:999px;background:var(--tem-green);color:#fff;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.tem-no-price{color:#b1a59f}
.tem-list-cards{display:flex;flex-direction:column;gap:9px;max-height:500px;overflow:auto;padding-right:2px}
.tem-list-card{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;border:1px solid var(--tem-line);border-radius:11px;background:#fff}
.tem-list-card>div:first-child{min-width:0}.tem-list-card strong{display:block;overflow-wrap:anywhere;font-size:12px}.tem-list-card small{display:block;margin-top:3px;color:var(--tem-muted);font-size:9px;line-height:1.45}.tem-list-card.is-muted{opacity:.56}

/* Tasks */
.tem-upload-box{padding:16px;border:1px dashed #d8c8bd;border-radius:13px;background:#fcf8f5}.tem-upload-box>strong{display:block;font-size:12px}.tem-upload-box>p{margin:4px 0 12px;color:var(--tem-muted);font-size:11px}.tem-upload-box>small{display:block;margin-top:9px;color:var(--tem-muted);font-size:9px}
.tem-task-files{width:100%;max-width:100%;font-size:12px}
.tem-recorder{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}.tem-record-status{color:var(--tem-muted);font-size:10px;font-weight:750}.tem-record-preview{display:block;width:min(360px,100%);margin-top:9px}.tem-record-preview[hidden]{display:none}
.tem-task-list{display:flex;flex-direction:column;gap:10px}
.tem-task-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:15px 16px;border:1px solid var(--tem-line);border-radius:13px;background:#fff;overflow:hidden}.tem-task-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#b9aea8}.tem-task-card.tem-priority-urgent:before{background:var(--tem-red)}.tem-task-card.tem-priority-high:before{background:var(--tem-orange)}.tem-task-card.tem-priority-normal:before{background:var(--tem-green)}.tem-task-card.tem-priority-low:before{background:#9b918b}
.tem-task-main{min-width:0}.tem-task-main h3{margin:6px 0 4px;color:var(--tem-navy2);font-size:14px}.tem-task-main p{margin:0 0 5px;color:#665c57;font-size:11px;line-height:1.5}.tem-task-main small{color:var(--tem-muted);font-size:9px}.tem-task-tags{display:flex;gap:6px;flex-wrap:wrap}.tem-priority,.tem-status{display:inline-flex;padding:3px 7px;border-radius:999px;background:#f1ece8;color:#66564d;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.tem-task-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.tem-task-detail{margin-top:22px;padding-top:20px;border-top:1px solid var(--tem-line)}.tem-task-detail h3{margin:18px 0 10px;color:var(--tem-navy2);font-size:14px}
.tem-attachments{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.tem-attachment{min-width:0;padding:11px;border:1px solid var(--tem-line);border-radius:11px;background:#fff}.tem-attachment img,.tem-attachment video{display:block;max-width:100%;height:auto;border-radius:8px}.tem-attachment audio{max-width:100%}.tem-file-type{margin-bottom:7px;color:var(--tem-orange);font-size:8px;font-weight:900;letter-spacing:.08em}.tem-attachment small{display:block;margin-top:8px;color:var(--tem-muted);font-size:9px}.tem-attachment a{display:inline-block;margin-top:5px;color:#873a28;font-size:10px;font-weight:800}
.tem-timeline{display:flex;flex-direction:column;gap:0}.tem-timeline>div{position:relative;padding:0 0 18px 24px}.tem-timeline>div:before{content:"";position:absolute;left:6px;top:13px;bottom:-2px;width:1px;background:#dfd4cd}.tem-timeline>div:last-child:before{display:none}.tem-timeline>div>span{position:absolute;left:2px;top:5px;width:9px;height:9px;border-radius:50%;background:var(--tem-orange)}.tem-timeline strong{font-size:10px}.tem-timeline small{margin-left:7px;color:var(--tem-muted);font-size:9px}.tem-timeline p{margin:4px 0 0;color:#5f5550;font-size:11px;line-height:1.55}

/* Reports */
.tem-report-filter{display:grid;grid-template-columns:minmax(220px,1.6fr) minmax(140px,.8fr) minmax(150px,.85fr) minmax(150px,.85fr) auto;gap:12px;align-items:end}.tem-report-filter .tem-btn{min-height:44px}

/* Users */
.tem-user-list{display:flex;flex-direction:column;gap:10px}.tem-user-perms{overflow:hidden;border:1px solid var(--tem-line);border-radius:12px;background:#fff}.tem-user-perms summary{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;cursor:pointer;list-style:none}.tem-user-perms summary::-webkit-details-marker{display:none}.tem-user-perms summary>span:first-child{min-width:0}.tem-user-perms summary strong,.tem-user-perms summary small{display:block}.tem-user-perms summary strong{font-size:12px}.tem-user-perms summary small{margin-top:2px;color:var(--tem-muted);font-size:9px;overflow-wrap:anywhere}.tem-user-perms[open] summary{border-bottom:1px solid var(--tem-line);background:#fcfaf8}.tem-user-perms>.tem-form{padding:16px}.tem-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tem-check-card{min-height:48px!important;display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:9px!important;padding:10px;border:1px solid var(--tem-line);border-radius:10px;background:#fff;cursor:pointer}.tem-check-card input{width:17px;height:17px;margin-top:1px;accent-color:var(--tem-pink)}.tem-check-card span{min-width:0}.tem-check-card strong{display:block;font-size:10px}.tem-password-reset{margin:0 16px 16px;padding:15px;border:1px solid var(--tem-line);border-radius:11px;background:#fbf8f5}.tem-admin-fixed{padding:16px;color:var(--tem-muted);font-size:11px}.tem-account-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tem-account-summary>div{padding:12px;border:1px solid var(--tem-line);border-radius:11px;background:#fcfaf8}.tem-account-summary span{display:block;color:var(--tem-muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.07em}.tem-account-summary strong{display:block;margin-top:5px;color:var(--tem-navy2);font-size:11px;overflow-wrap:anywhere}

/* Settings / diagnostics */
.tem-logo-preview{display:flex;align-items:center;justify-content:center;margin-bottom:18px;padding:16px;border:1px solid var(--tem-line);border-radius:12px;background:#fff}.tem-logo-preview img{display:block;width:min(380px,100%);height:auto}
.tem-health-overall{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.tem-health-overall.is-ok{background:#e8f6ef;color:#28664f}.tem-health-overall.is-warning{background:#fff2df;color:#8e5b19}
.tem-health-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.tem-health-grid>div{padding:12px;border:1px solid var(--tem-line);border-radius:11px;background:#fcfaf8}.tem-health-grid span{display:block;color:var(--tem-muted);font-size:9px;font-weight:800}.tem-health-grid strong{display:block;margin-top:5px;font-size:11px;color:var(--tem-navy2);overflow-wrap:anywhere}.tem-health-grid strong.is-ok{color:var(--tem-success)}.tem-health-grid strong.is-warning{color:var(--tem-warning)}
.tem-log-table{min-width:760px}.tem-log-level{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:8px;font-weight:900;text-transform:uppercase}.tem-log-info{background:#eee8e4;color:#5f524b}.tem-log-warning{background:#fff0da;color:#8c5c1f}.tem-log-error{background:#fff0f2;color:#922b38}


/* Final reconciliation notes and supplier workflow */
.tem-reconcile-form{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.tem-reconcile-form.is-saving{opacity:.7;pointer-events:none}.tem-reconcile-save{min-height:29px;padding:5px 8px;border:1px solid var(--tem-line);border-radius:8px;background:#fff;color:#5d4b42;font-size:9px;font-weight:850;cursor:pointer}
.tem-period-note-row td{padding:0 12px 14px!important;background:#fbf8f5!important}.tem-period-notes{padding:13px 14px;border:1px solid #e8ddd6;border-radius:12px;background:#fff}.tem-period-note-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.tem-period-note-head strong{font-size:11px}.tem-period-note-head span{color:var(--tem-muted);font-size:9px;font-weight:800}.tem-period-note-form{display:grid;grid-template-columns:135px 145px minmax(260px,1fr) auto;gap:9px;align-items:end}.tem-period-note-form label{display:flex;flex-direction:column;gap:5px;color:#5c4b43;font-size:9px;font-weight:850}.tem-period-note-form select,.tem-period-note-form textarea{width:100%;min-height:38px;padding:8px 9px;border:1px solid #ddd2cb;border-radius:9px;background:#fff;color:var(--tem-text);font:inherit;font-size:11px}.tem-period-note-form textarea{min-height:58px;resize:vertical}.tem-period-note-form .tem-btn{min-height:38px}.tem-period-note-list{display:flex;flex-direction:column;gap:7px;margin-top:11px}.tem-period-note-item{padding:9px 10px;border-left:3px solid var(--tem-orange);border-radius:8px;background:#fcfaf8}.tem-period-note-item>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.tem-period-note-item strong{font-size:10px}.tem-period-note-item time{color:var(--tem-muted);font-size:9px}.tem-period-note-item p{margin:5px 0 0;font-size:11px;line-height:1.5}.tem-note-tag,.tem-note-channel{display:inline-flex;padding:3px 6px;border-radius:999px;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.tem-note-tag{background:#f2e5dc;color:#7b432c}.tem-note-channel{background:#eee9e5;color:#5f524b}.tem-empty-compact{padding:10px 0;text-align:left;font-size:10px}
.tem-workflow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tem-workflow>div{position:relative;min-height:86px;padding:14px 14px 13px 48px;border:1px solid var(--tem-line);border-radius:12px;background:#faf8f6;opacity:.55}.tem-workflow>div.is-active{background:#fff;opacity:1}.tem-workflow span{position:absolute;left:13px;top:14px;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#e7dfda;color:#5f524b;font-size:10px;font-weight:900}.tem-workflow .is-active span{background:var(--tem-orange);color:#fff}.tem-workflow strong{display:block;color:var(--tem-navy2);font-size:12px}.tem-workflow small{display:block;margin-top:5px;color:var(--tem-muted);font-size:9px;line-height:1.4}.tem-step-badge{display:inline-flex;margin-bottom:4px;padding:4px 8px;border-radius:999px;background:#f2e4d8;color:#844b2b;font-size:8px;font-weight:900;letter-spacing:.06em;text-transform:uppercase}.tem-locked-step{text-align:center;padding:34px}.tem-locked-step h2{margin:8px 0 7px;font-size:18px}.tem-locked-step p{margin:0;color:var(--tem-muted);font-size:11px}.tem-vat-choice{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:10px!important;padding:12px;border:1px solid #ead7c9;border-radius:11px;background:#fcf7f2;cursor:pointer}.tem-vat-choice input{width:18px;height:18px;margin-top:1px;accent-color:var(--tem-orange)}.tem-vat-choice span{min-width:0}.tem-vat-choice strong{display:block;color:#4c403a;font-size:11px}.tem-vat-choice small{display:block;margin-top:3px;color:var(--tem-muted);font-size:9px;font-weight:500;line-height:1.45}.tem-vat-preview{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 13px;border:1px solid #e9ddd6;border-radius:10px;background:#fbf8f5}.tem-vat-preview span{color:var(--tem-muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.tem-vat-preview strong{color:var(--tem-navy2);font-size:11px;text-align:right}
@media (max-width:1280px){
  .tem-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tem-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tem-report-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.tem-report-filter label:first-child{grid-column:span 2}.tem-report-filter .tem-btn{justify-self:start}
}

@media (max-width:980px){
  .tem-period-note-form{grid-template-columns:repeat(2,minmax(0,1fr))}.tem-period-note-text{grid-column:span 2}.tem-period-note-form .tem-btn{justify-self:start}
  .tem-workflow{grid-template-columns:1fr}
  .tem-sidebar{position:fixed;left:0;top:0;transform:translateX(-105%);transition:transform .22s ease;box-shadow:20px 0 45px rgba(30,20,16,.22)}
  .tem-shell.tem-menu-open .tem-sidebar{transform:translateX(0)}
  .tem-shell.tem-menu-open .tem-main:after{content:"";position:fixed;inset:0;z-index:50;background:rgba(31,24,21,.42)}
  .tem-main{width:100%}
  .tem-menu-toggle{display:grid;place-items:center}
  .tem-topbar{height:78px}
  .tem-content{max-width:none}
  .tem-grid-2{grid-template-columns:1fr}
  .tem-cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:760px){
  .tem-period-note-form{grid-template-columns:1fr}.tem-period-note-text{grid-column:auto}.tem-period-note-form .tem-btn{width:100%}.tem-vat-preview{align-items:flex-start;flex-direction:column}.tem-vat-preview strong{text-align:left}
  .tem-login-shell{padding:14px;place-items:start center}
  .tem-login-card{min-height:0;grid-template-columns:1fr;border-radius:20px}
  .tem-login-identity{padding:26px 24px 24px}
  .tem-login-brand .tem-logo-bundled{width:min(300px,100%)}
  .tem-login-copy{margin:0;padding:30px 0 20px}.tem-login-copy h1{font-size:34px}.tem-login-copy p{font-size:12px}.tem-contact-mini{padding-top:16px}
  .tem-login-formpanel{padding:30px 24px 32px}.tem-login-heading{margin-bottom:22px}.tem-login-heading h2{font-size:27px}
  .tem-topbar{padding:0 14px}.tem-topbar h1{font-size:20px}.tem-top-meta{font-size:11px}
  .tem-content{padding:18px 12px 38px}.tem-alert{margin:12px 12px 0}
  .tem-grid-4{grid-template-columns:1fr}
  .tem-cols-2,.tem-cols-3,.tem-cols-4{grid-template-columns:1fr}
  .tem-card{padding:17px;border-radius:15px}.tem-stat{padding:18px}.tem-stat strong{font-size:27px}
  .tem-card-head{align-items:flex-start;flex-wrap:wrap}.tem-card-head h2{font-size:18px}
  .tem-quick-actions{grid-template-columns:1fr}
  .tem-table{min-width:660px}.tem-period-table{min-width:880px}.tem-price-table{min-width:760px}
  .tem-task-card{grid-template-columns:1fr}.tem-task-actions{justify-content:flex-start}
  .tem-permission-grid,.tem-account-summary,.tem-health-grid{grid-template-columns:1fr}
  .tem-report-filter{grid-template-columns:1fr}.tem-report-filter label:first-child{grid-column:auto}.tem-report-filter .tem-btn{width:100%}
  .tem-copy-row{align-items:stretch;flex-direction:column}.tem-copy-row .tem-btn{width:100%}
}

@media (max-width:440px){
  .tem-login-shell{padding:8px}.tem-login-card{border-radius:16px}.tem-login-identity{padding:20px 18px}.tem-login-formpanel{padding:26px 18px}.tem-login-brand .tem-logo-bundled{padding:9px 10px;border-radius:11px}.tem-login-copy{padding:24px 0 16px}.tem-login-copy h1{font-size:30px}
  .tem-login-row{align-items:flex-start;flex-direction:column}.tem-secure-note{display:none}
  .tem-sidebar{width:min(286px,88vw);flex-basis:min(286px,88vw)}.tem-brand .tem-logo-bundled{width:214px}
  .tem-top-meta{display:none}.tem-topbar{gap:11px}.tem-topbar h1{font-size:18px}
  .tem-btn{white-space:normal;text-align:center}
}

@media print{
  .tem-sidebar,.tem-topbar,.tem-menu-toggle,.tem-alert,.tem-form,.tem-btn,.tem-filter-pills{display:none!important}
  .tem-main,.tem-content{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .tem-shell{display:block;min-height:0;background:#fff}.tem-card,.tem-stat{box-shadow:none!important}.tem-card:not(.tem-print-area),.tem-grid.tem-grid-4{display:none!important}.tem-print-area{display:block!important;border:0!important;padding:0!important}.tem-table-wrap{overflow:visible!important}.tem-table{min-width:0!important;font-size:9px}
}

/* v3.0.1 owner maintenance access */
.tem-admin-maintenance{display:flex;align-items:center;justify-content:center;min-height:42px;margin:0 0 10px;padding:9px 12px;border:1px solid rgba(255,255,255,.22);border-radius:10px;color:#fff;text-decoration:none;font-size:13px;font-weight:800;background:rgba(255,255,255,.08)}
.tem-admin-maintenance:hover,.tem-admin-maintenance:focus{background:rgba(255,255,255,.14);color:#fff;outline:2px solid rgba(255,255,255,.35);outline-offset:2px}

/* Backup & restore */
.tem-btn-danger{background:#8f1f28;color:#fff!important}.tem-btn-danger:hover{background:#721820}
.tem-checkline{min-height:44px!important;display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:10px!important;padding:10px 12px;border:1px solid var(--tem-line);border-radius:10px;background:#fcfaf8;color:var(--tem-text)!important;font-size:11px!important;font-weight:750!important}
.tem-checkline input{width:18px!important;height:18px!important;min-height:0!important;margin:1px 0 0!important;flex:0 0 auto;accent-color:var(--tem-orange)}
.tem-mt-small{margin-top:12px}.tem-restore-form input[type=file]{padding:9px;background:#fff}

/* v4.0 daily operations, workflow and calendar */
.tem-attention-card{margin-top:20px;border-left:5px solid var(--tem-orange)}
.tem-attention-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tem-attention-list a{min-width:0;display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 13px;border:1px solid var(--tem-line);border-radius:11px;background:#fcfaf8;color:var(--tem-text)}
.tem-attention-list a>span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#fff0db;color:#8b5418;font-weight:900}
.tem-attention-list a strong{min-width:0;font-size:11px;line-height:1.4}
.tem-attention-list a em{font-style:normal;color:var(--tem-orange);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.tem-good{border:1px solid #cee6da;background:#f2faf6;color:#24634e}

.tem-task-checklist{display:flex;flex-direction:column;gap:8px;margin:10px 0 18px}
.tem-task-check-item{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:10px;padding:10px 11px;border:1px solid var(--tem-line);border-radius:11px;background:#fff}
.tem-task-check-item.is-done{background:#f3faf6;border-color:#cfe5d9}
.tem-task-check-item span{min-width:0}.tem-task-check-item strong{display:block;font-size:11px}.tem-task-check-item small{display:block;margin-top:3px;color:var(--tem-muted);font-size:9px}
.tem-check-toggle{width:36px;height:36px;border:1px solid #d8ccc5;border-radius:10px;background:#fff;color:#625047;font-size:18px;font-weight:900;cursor:pointer}
.tem-task-check-item.is-done .tem-check-toggle{background:#2d765c;border-color:#2d765c;color:#fff}
.tem-approval{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:12px 0 18px;padding:13px 14px;border:1px solid #efd6ad;border-radius:11px;background:#fff9ee}
.tem-approval.is-approved{border-color:#cce3d7;background:#f2faf6}.tem-approval strong{font-size:11px}.tem-approval span{color:var(--tem-muted);font-size:10px}
.tem-weekday-picks{display:flex;gap:7px;flex-wrap:wrap}.tem-weekday-picks label{display:flex!important;flex-direction:row!important;align-items:center!important;gap:5px!important;padding:7px 9px;border:1px solid var(--tem-line);border-radius:8px;background:#fff;font-size:10px!important}.tem-weekday-picks input{width:16px!important;height:16px!important;min-height:0!important}

.tem-checklist-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.tem-checklist-columns section{min-width:0;padding:16px;border:1px solid var(--tem-line);border-radius:13px;background:#fcfaf8}.tem-checklist-columns h3{margin:0 0 12px;font-size:15px;color:var(--tem-navy2)}
.tem-daily-check{display:grid;grid-template-columns:minmax(180px,1fr) minmax(140px,.8fr) auto;gap:8px;align-items:center;padding:9px 0;border-bottom:1px solid #eee5df}.tem-daily-check:last-child{border-bottom:0}.tem-daily-check>label{display:flex;flex-direction:row;align-items:flex-start;gap:8px;min-width:0;font-size:11px;font-weight:750}.tem-daily-check>label input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--tem-success)}.tem-daily-check>input[type=text]{min-height:38px;padding:8px 9px;border:1px solid #ddd2cb;border-radius:8px;background:#fff;font-size:11px}.tem-daily-check small{grid-column:1/-1;color:var(--tem-muted);font-size:9px}.tem-daily-check.is-done>label span{text-decoration:line-through;color:#6f7d76}
.tem-inline-details{margin-top:14px;padding:10px 12px;border:1px dashed #d9cdc5;border-radius:10px;background:#fbf8f5}.tem-inline-details summary{cursor:pointer;font-size:10px;font-weight:900;color:#6f4b38}.tem-inline-details[open] summary{margin-bottom:12px}
.tem-mini-list{display:flex;flex-direction:column;gap:8px}.tem-mini-list>div{position:relative;padding:10px 11px;border:1px solid var(--tem-line);border-radius:10px;background:#fcfaf8}.tem-mini-list strong{display:block;font-size:11px}.tem-mini-list span,.tem-mini-list small{display:block;margin-top:3px;color:var(--tem-muted);font-size:9px;line-height:1.45}.tem-mini-list form.tem-inline{position:absolute;right:10px;top:10px}
.tem-variance{margin-top:12px;padding:10px 12px;border-radius:9px;font-size:10px}.tem-variance.is-ok{background:#eef8f3;color:#24634e}.tem-variance.is-warning{background:#fff2df;color:#8a581b}
.tem-order-receive{display:grid;gap:8px}.tem-order-receive label{display:grid!important;grid-template-columns:minmax(0,1fr) auto 110px;align-items:center!important;gap:8px!important;padding:8px 9px;border:1px solid var(--tem-line);border-radius:9px;background:#fcfaf8}.tem-order-receive label span{color:var(--tem-muted);font-size:9px}.tem-order-receive input{min-height:36px!important}
.tem-alert-list{display:flex;flex-direction:column;gap:8px}.tem-alert-list>div{padding:10px 11px;border:1px solid #eedccf;border-radius:10px;background:#fff8f2}.tem-alert-list strong{display:block;font-size:11px}.tem-alert-list span{display:block;margin-top:3px;color:#8b5b35;font-size:9px}
.tem-mini-order{display:inline-flex;margin-top:8px;padding:5px 8px;border:1px solid #d8c4b7;border-radius:7px;background:#fff;color:#7b452c;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.tem-backup-media-status{margin-top:12px;padding:12px 13px;border:1px solid #e6d7cd;border-radius:10px;background:#fbf8f5}.tem-backup-media-status strong{display:block;font-size:10px}.tem-backup-media-status span{display:block;margin-top:4px;color:var(--tem-muted);font-size:9px;line-height:1.5}

.tem-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.tem-calendar-head h2{margin:0;font-size:20px;color:var(--tem-navy2)}
.tem-calendar-scroll{width:100%;overflow-x:auto;padding-bottom:4px}.tem-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;min-width:760px}.tem-cal-label{padding:6px 4px;text-align:center;color:var(--tem-muted);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.tem-cal-cell{min-height:112px;padding:8px;border:1px solid var(--tem-line);border-radius:10px;background:#fff;overflow:hidden}.tem-cal-cell.is-empty{border-color:transparent;background:transparent}.tem-cal-cell.is-today{border:2px solid var(--tem-orange);background:#fffaf4}.tem-cal-cell>strong{display:block;margin-bottom:6px;color:var(--tem-navy2);font-size:11px}
.tem-cal-event{position:relative;display:block;margin:5px 0;padding:6px 7px;border-radius:7px;background:#f0ece9;color:#443b36;font-size:9px;line-height:1.3}.tem-cal-event>span{display:block;color:#7f6c62;font-size:8px;font-weight:900}.tem-cal-event>strong{display:block;font-size:9px;overflow-wrap:anywhere}.tem-cal-event>small{display:block;margin-top:2px;color:#75665e;font-size:8px;line-height:1.35}.tem-cal-event.tem-cal-important_date,.tem-cal-event.tem-importance-urgent{background:#fff0f2;color:#8e2735}.tem-cal-event.tem-importance-high{border-left:3px solid var(--tem-orange)}.tem-cal-event.tem-cal-delivery{background:#eef7f1;color:#2e654e}.tem-cal-event.tem-cal-task{background:#f1edf8;color:#5d4775}.tem-cal-delete{position:absolute;right:3px;top:3px;width:20px;height:20px;border:0;border-radius:50%;background:rgba(255,255,255,.8);color:#8e2735;cursor:pointer;font-size:13px;line-height:1}

@media (max-width:1120px){
  .tem-attention-list{grid-template-columns:1fr}
  .tem-checklist-columns{grid-template-columns:1fr}
}
@media (max-width:760px){
  .tem-daily-check{grid-template-columns:1fr}.tem-daily-check .tem-btn{width:100%}
  .tem-order-receive label{grid-template-columns:1fr}.tem-order-receive input{width:100%}
  .tem-calendar-head{align-items:stretch;flex-wrap:wrap}.tem-calendar-head h2{order:-1;width:100%;text-align:center}.tem-calendar-head .tem-btn{flex:1}
  .tem-calendar-grid{min-width:700px}
}
