/* Scoped to unit Tools/Expenses. Shared navigation and other approved cards are untouched. */
:is(.ute-tools,.ute-expenses) {
  --ute-surface:#fff;--ute-soft:#f8f7fc;--ute-line:#e5e1f0;--ute-text:#19152d;
  --ute-muted:#77718e;--ute-accent:#7c3aed;--ute-tint:#f2eaff;
  container-type:inline-size;color:var(--ute-text);
}
[data-theme="dark"] :is(.ute-tools,.ute-expenses) {
  --ute-surface:#1c1829;--ute-soft:#241f33;--ute-line:#383044;--ute-text:#f4efff;
  --ute-muted:#b0a7c1;--ute-accent:#bc98ff;--ute-tint:#34234f;
}
html #view :is(.ute-tools,.ute-expenses).phase {border:1px solid var(--ute-line);border-radius:16px;background:var(--ute-surface);box-shadow:0 2px 4px #20133d03;overflow:visible;margin-block:20px;}
html #view :is(.ute-tools,.ute-expenses)>.ute-heading {display:flex;align-items:center;flex-wrap:nowrap;gap:12px;padding:18px 20px;background:none;min-height:80px;border-bottom:1px solid var(--ute-line);}
.ute-icon,.ute-chevron {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:18px;}
.ute-icon svg,.ute-tile svg,.ute-tool-icon svg,.ute-chevron svg {width:100%;height:100%;}
.ute-tile {width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;background:var(--ute-tint);color:var(--ute-accent);padding:9px;border-radius:11px;box-sizing:border-box;}
.ute-heading-text {min-width:0;}
html #view :is(.ute-tools,.ute-expenses) .ute-heading .pname {display:block;color:var(--ute-text);font-size:15px;font-weight:700;line-height:1.4;}
.ute-heading-text small {display:block;margin-top:3px;color:var(--ute-muted);font-size:12px;line-height:1.5;}
html #view .ute-tools>.phase-body {padding:18px!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.ute-tool {display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px 14px;padding:20px;border:1px solid var(--ute-line);border-radius:12px;background:var(--ute-soft);min-width:0;}
.ute-tool-icon {width:36px;height:36px;box-sizing:border-box;padding:8px;border:1px solid var(--ute-line);border-radius:10px;color:var(--ute-accent);background:var(--ute-surface);}
.ute-eyebrow,.ute-label {font-size:10px;font-weight:700;line-height:1.5;letter-spacing:.06em;color:var(--ute-muted);text-transform:uppercase;}
.ute-tool h3 {margin:5px 0 7px;font-size:16px;font-weight:700;letter-spacing:-.25px;color:var(--ute-text);}
html #view .ute-tool .tnote {margin:0!important;line-height:1.7;font-size:12px;color:var(--ute-muted);}
html #view .ute-tools .ute-tool .ute-action {grid-column:2;justify-self:start;align-self:end;display:inline-flex;align-items:center;justify-content:center;min-height:42px;max-width:100%;margin:2px 0 0;padding:10px 16px;border:1px solid transparent;border-radius:var(--radius-sm,10px);background:var(--grad,linear-gradient(135deg,#7c3aed,#a855f7));color:var(--on-accent,#fff);font-family:inherit;font-size:12px;font-weight:650;line-height:1.4;white-space:normal;text-align:center;box-shadow:none;cursor:pointer;}
html #view .ute-tools .ute-tool .ute-action:hover {filter:brightness(1.04);}
html #view .ute-expenses .exp-total {margin-left:auto;display:grid;gap:3px;color:var(--ute-muted);font-size:11px;text-align:right;white-space:nowrap;}
html #view .ute-expenses .exp-total b {display:block;margin:0;color:var(--ute-text);font-size:23px;line-height:1.15;letter-spacing:-.5px;font-variant-numeric:tabular-nums;}
html #view .ute-expenses .exp-hide {display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;margin:0 0 0 8px;padding:9px 12px;border:1px solid var(--ute-line);border-radius:9px;background:var(--ute-surface);color:var(--ute-muted);font-family:inherit;font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap;}
html #view .ute-expenses>.phase-body {padding:4px 20px 12px!important;}
html #view .ute-expenses .exp-groups {display:flex;flex-direction:column;gap:0;}
html #view .ute-expenses .exp-group {border:0;border-bottom:1px solid var(--ute-line);margin:0;padding:0;}
html #view .ute-expenses .exp-group:last-child {border-bottom:0;}
.ute-category {margin:0;border:0;background:none;}
.ute-category-head {list-style:none;display:flex;align-items:center;gap:16px;min-height:68px;padding:14px 0;cursor:pointer;box-sizing:border-box;}
.ute-category-head::-webkit-details-marker {display:none;}
.ute-category-head::marker {content:"";}
.ute-category-title {display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;flex:1;min-width:0;}
html #view .ute-expenses .exp-group-name {font-size:13px;font-weight:650;color:var(--ute-text);letter-spacing:0;}
.ute-category-title small {font-size:11px;color:var(--ute-muted);font-weight:400;}
.ute-category-head .exp-group-sub {margin-left:auto;color:var(--ute-text);font-size:14px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap;}
.ute-chevron {color:var(--ute-muted);width:15px;height:15px;}
.ute-category[open]>.ute-category-head .ute-chevron {transform:rotate(180deg);}
html #view .ute-expenses .exp-group-items {padding:0 0 16px;}
html #view .ute-expenses .exp-item {display:grid;grid-template-columns:minmax(110px,.65fr) minmax(150px,1.5fr) minmax(250px,1.4fr) 40px;align-items:end;gap:12px;padding:14px;margin:0 0 10px;border:1px solid var(--ute-line);border-radius:11px;background:var(--ute-soft);}
.ute-field {min-width:0;}
.ute-label {display:block;margin:0 0 6px;}
html #view .ute-expenses :is(.exp-desc,.exp-link,.exp-amt-wrap) {width:100%;min-width:0;max-width:none;box-sizing:border-box;height:42px;border:1px solid var(--ute-line);border-radius:8px;background:var(--ute-surface);color:var(--ute-text);font-family:inherit;font-size:13px;box-shadow:none;}
html #view .ute-expenses :is(.exp-desc,.exp-link) {padding:10px 12px;}
html #view .ute-expenses input::placeholder {color:var(--ute-muted);opacity:1;}
html #view .ute-expenses .exp-amt-wrap {display:flex;align-items:center;gap:6px;padding:0 12px;}
html #view .ute-expenses .exp-cur {position:static;flex:0 0 auto;color:var(--ute-muted);font-size:13px;}
html #view .ute-expenses .exp-amt {width:100%;min-width:0;flex:1;padding:10px 0!important;border:0!important;background:none!important;color:var(--ute-text);font-size:13px;font-family:inherit;box-shadow:none;text-align:right;font-variant-numeric:tabular-nums;}
html #view .ute-expenses .exp-inv {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-width:0;}
html #view .ute-expenses .exp-file {position:relative;display:flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:42px;margin:0;padding:8px 12px;border:1px solid var(--ute-line);border-radius:8px;background:var(--ute-surface);color:var(--ute-accent);font-size:12px;line-height:1.4;font-weight:600;white-space:nowrap;cursor:pointer;overflow:hidden;}
html #view .ute-expenses .exp-file input[type="file"] {display:block;position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;}
html #view .ute-expenses .exp-inv-has {display:flex;align-items:center;gap:8px;box-sizing:border-box;min-height:42px;max-width:none;width:100%;padding:2px 2px 2px 12px;border:1px solid var(--ute-line);border-radius:8px;background:var(--ute-surface);}
html #view .ute-expenses .exp-inv-has a {min-width:0;flex:1;color:var(--ute-accent);font-size:12px;font-weight:550;}
html #view .ute-expenses :is(.ute-remove,.exp-inv-has button) {display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:40px;min-height:42px;margin:0;padding:10px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ute-muted);cursor:pointer;}
html #view .ute-expenses :is(.ute-remove,.exp-inv-has button):hover {color:#d14343;background:#d1434310;border-color:#d1434340;}
html #view .ute-expenses .exp-add {display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:40px;margin:0;padding:8px 12px;border:1px solid var(--ute-line);border-radius:8px;background:var(--ute-surface);color:var(--ute-accent);font:inherit;font-size:12px;font-weight:600;cursor:pointer;}
.ute-empty {margin:0 0 12px;font-size:12px;line-height:1.6;color:var(--ute-muted);}
html #view .ute-expenses>.phase-body>.tnote {padding:14px 0;color:var(--ute-muted);}
html #view :is(.ute-tools,.ute-expenses) :is(button,input,a,summary):focus-visible {outline:2px solid var(--ute-accent);outline-offset:3px;}
html #view .ute-expenses :is(.exp-amt-wrap,.exp-file):focus-within {outline:2px solid var(--ute-accent);outline-offset:2px;}
@container (max-width:850px) {
  html #view .ute-expenses .exp-item {grid-template-columns:130px minmax(0,1fr) 40px;}
  .ute-description {grid-column:2 / 4;}
  .ute-invoice {grid-column:1 / 3;}
  .ute-remove {grid-column:3;}
}
@container (max-width:620px) {
  html #view .ute-tools>.phase-body {grid-template-columns:minmax(0,1fr);padding:14px!important;}
  html #view .ute-expenses>.ute-heading {flex-wrap:wrap;gap:10px;padding:16px;}
  .ute-expenses .ute-heading-text {flex:1;min-width:calc(100% - 60px);}
  html #view .ute-expenses .ute-heading>.spacer {display:none;}
  html #view .ute-expenses .exp-total {margin-left:0;text-align:left;flex:1;}
  html #view .ute-expenses .exp-hide {min-height:44px;}
  html #view .ute-expenses>.phase-body {padding:0 14px 8px!important;}
  html #view .ute-expenses :is(.exp-desc,.exp-link,.exp-amt-wrap) {height:44px;font-size:16px;}
  html #view .ute-expenses .exp-amt {font-size:16px;}
  html #view .ute-expenses :is(.exp-file,.ute-remove,.exp-inv-has,.exp-inv-has button,.exp-add) {min-height:44px;}
  .ute-category-head {min-height:66px;gap:10px;}
  .ute-category-title {display:grid;gap:3px;}
  html #view .ute-tools .ute-tool .ute-action {grid-column:1 / -1;justify-self:stretch;width:100%;min-height:44px;}
}
@container (max-width:400px) {
  .ute-tool {padding:16px;gap:10px;}
  html #view .ute-tools .ute-tool .ute-action {grid-column:1 / -1;justify-self:stretch;}
  html #view .ute-expenses .exp-item {grid-template-columns:minmax(0,1fr) 40px;padding:12px;gap:12px 8px;}
  .ute-amount {grid-column:1;grid-row:1;}
  .ute-description {grid-column:1 / -1;grid-row:2;}
  .ute-invoice {grid-column:1 / -1;grid-row:3;}
  .ute-remove {grid-column:2;grid-row:1;}
  html #view .ute-expenses .exp-inv {grid-template-columns:minmax(0,1fr);}
  html #view .ute-expenses .exp-file {justify-content:center;}
}
