@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard-dynamic-subset.css");

:root{
  --bg:#f4f7fb;
  --surface:#fff;
  --surface2:#f8fafc;
  --text:#162033;
  --muted:#758095;
  --line:#e4e9f1;
  --primary:#2563eb;
  --primary2:#eaf1ff;
  --open:#2563eb;
  --confirm:#e58a00;
  --done:#159765;
  --danger:#dc3545;
  --shadow:0 8px 24px rgba(23,32,51,.055);

  --radius-sm:8px;
  --radius-md:11px;
  --radius-lg:15px;

  --content-max:1240px;
  --sidebar-width:190px;
}

*{
  box-sizing:border-box;
}

html{
  font-size:15px;
  -webkit-text-size-adjust:100%;
  text-rendering:optimizeLegibility;
}

html,body,#app{
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--text);
  font-family:
    "Pretendard",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight:400;
  letter-spacing:-.015em;
}

body{
  line-height:1.5;
  font-synthesis:none;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

button,
input,
select,
textarea{
  font:inherit;
  letter-spacing:inherit;
}

button{
  cursor:pointer;
}

button:disabled{
  cursor:not-allowed;
  opacity:.48;
}

.shell{
  min-height:100vh;
}

/* ============================================================
   CSS MASK ICON SYSTEM
   ============================================================ */

.ico{
  display:inline-block;
  width:18px;
  height:18px;
  flex:0 0 18px;
  background:currentColor;
  -webkit-mask:var(--ico) center/contain no-repeat;
  mask:var(--ico) center/contain no-repeat;
}

.ico-sm{
  width:16px;
  height:16px;
  flex-basis:16px;
}

.ico-home{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3.1 3 10v11h6v-6h6v6h6V10z'/%3E%3C/svg%3E");
}

.ico-list{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h3v3H4zm5 0h11v3H9zM4 10.5h3v3H4zm5 0h11v3H9zM4 16h3v3H4zm5 0h11v3H9z'/%3E%3C/svg%3E");
}

.ico-draft{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h11l3 3v15H5zm2 2v14h10V7h-3V5zm2 5h6v2H9zm0 4h6v2H9z'/%3E%3C/svg%3E");
}

.ico-dashboard{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h8v8H3zm10 0h8v5h-8zM3 13h8v8H3zm10-3h8v11h-8z'/%3E%3C/svg%3E");
}

.ico-users{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8m6.5 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7M2 21v-3c0-3 3-5 7-5s7 2 7 5v3zm15 0v-3c0-1.5-.6-2.8-1.7-3.8 4.1.2 6.7 1.9 6.7 4.8v2z'/%3E%3C/svg%3E");
}

.ico-system{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m20.1 13.5 1.7 1.3-2 3.5-2-.8a8 8 0 0 1-2.3 1.3l-.3 2.2h-4l-.3-2.2a8 8 0 0 1-2.3-1.3l-2 .8-2-3.5 1.7-1.3a8 8 0 0 1 0-2.6L4.6 9.6l2-3.5 2 .8a8 8 0 0 1 2.3-1.3l.3-2.2h4l.3 2.2a8 8 0 0 1 2.3 1.3l2-.8 2 3.5-1.7 1.3a8 8 0 0 1 0 2.6M13.2 9A3.2 3.2 0 1 0 13.2 15.4 3.2 3.2 0 0 0 13.2 9'/%3E%3C/svg%3E");
}

.ico-settings{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 15.5A3.5 3.5 0 1 0 12 8a3.5 3.5 0 0 0 0 7.5m8.4-3.5c0-.5-.1-1-.2-1.5l2-1.6-2-3.5-2.4 1a8 8 0 0 0-2.6-1.5L14.9 2h-4l-.4 2.9A8 8 0 0 0 8 6.4l-2.4-1-2 3.5 2 1.6a8 8 0 0 0 0 3l-2 1.6 2 3.5 2.4-1a8 8 0 0 0 2.6 1.5l.4 2.9h4l.4-2.9a8 8 0 0 0 2.6-1.5l2.4 1 2-3.5-2-1.6c.1-.5.2-1 .2-1.5'/%3E%3C/svg%3E");
}

.ico-logout{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 3h9v2H6v14h7v2H4zm11.6 4.6L20 12l-4.4 4.4-1.4-1.4 2-2H9v-2h7.2l-2-2z'/%3E%3C/svg%3E");
}

.ico-plus{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E");
}

.ico-chevron-left{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m15.4 5.4-1.4-1.4L6 12l8 8 1.4-1.4L8.8 12z'/%3E%3C/svg%3E");
}

.ico-refresh{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.8-4.3L13 11h8V3z'/%3E%3C/svg%3E");
}

/* ============================================================
   APP SHELL
   ============================================================ */

.top{
  height:62px;
  background:var(--surface);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:
    0 max(
      22px,
      calc((100vw - var(--content-max))/2)
    );
  position:sticky;
  top:0;
  z-index:20;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.mark{
  width:34px;
  height:34px;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:15px;
  letter-spacing:0;
}

.brand b{
  display:block;
  font-size:14px;
  font-weight:750;
  line-height:1.2;
}

.brand small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:8px;
  font-weight:650;
  letter-spacing:.11em;
}

.userbox{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
}

.userbox>b{
  font-weight:700;
}

.role{
  font-size:10px;
  line-height:1;
  color:var(--primary);
  background:var(--primary2);
  padding:6px 8px;
  border-radius:7px;
  font-weight:750;
}

.layout{
  width:100%;
  max-width:var(--content-max);
  margin:0 auto;
  display:grid;
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  gap:26px;
  padding:28px 22px 110px;
}

.side{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:10px;
  height:max-content;
  position:sticky;
  top:90px;
  box-shadow:0 5px 18px rgba(20,20,40,.025);
  display:flex;
  flex-direction:column;
  gap:14px;
}

.navgroup{
  display:flex;
  flex-direction:column;
  gap:1px;
}

.navgroup-title{
  padding:5px 11px 6px;
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:.06em;
}

.navlogout{
  padding-top:9px;
  border-top:1px solid var(--line);
}

.navbtn{
  width:100%;
  min-height:42px;
  border:0;
  background:transparent;
  color:var(--muted);
  padding:0 11px;
  text-align:left;
  border-radius:9px;
  margin:1px 0;
  font-size:13px;
  font-weight:650;
  display:flex;
  align-items:center;
  gap:10px;
  transition:
    background .14s ease,
    color .14s ease;
}

.navbtn .ico{
  opacity:.82;
}

.navbtn.active,
.navbtn:hover{
  background:var(--primary2);
  color:var(--primary);
}

.navbtn.active{
  font-weight:720;
}

.main{
  min-width:0;
}

.main h1{
  font-size:28px;
  line-height:1.25;
  font-weight:760;
  letter-spacing:-.035em;
  margin:0;
}

.sub{
  color:var(--muted);
  margin:6px 0 22px;
  font-size:13px;
  line-height:1.55;
}

/* ============================================================
   BASIC COMPONENT SCALE
   ============================================================ */

.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.metric,
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
}

.metric{
  min-height:98px;
  padding:16px 18px;
}

.metric small{
  color:var(--muted);
  font-size:12px;
  font-weight:550;
}

.metric strong{
  display:block;
  margin-top:7px;
  font-size:29px;
  line-height:1;
  font-weight:720;
  letter-spacing:-.035em;
}

.card{
  padding:18px;
  margin-top:13px;
}

.sectionhead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:24px 0 9px;
}

.sectionhead h2{
  font-size:16px;
  line-height:1.3;
  font-weight:720;
  margin:0;
}

.sectionhead h3{
  margin:0;
}

.link{
  min-height:34px;
  border:0;
  background:transparent;
  color:var(--primary);
  font-size:12px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.request{
  display:grid;
  grid-template-columns:74px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  min-height:72px;
  padding:12px 2px;
  border-bottom:1px solid var(--line);
}

.request:last-child{
  border-bottom:0;
}

.request b{
  display:block;
  font-size:14px;
  line-height:1.35;
  font-weight:690;
  color:var(--text);
}

.request small,
.meta{
  color:var(--muted);
  font-size:11.5px;
  line-height:1.45;
}

.badge{
  width:max-content;
  padding:5px 7px;
  border-radius:7px;
  font-size:10px;
  line-height:1;
  font-weight:750;
}

.b-open{
  color:var(--open);
  background:var(--primary2);
}

.b-confirm{
  color:var(--confirm);
  background:
    color-mix(
      in srgb,
      var(--confirm) 12%,
      transparent
    );
}

.b-done{
  color:var(--done);
  background:
    color-mix(
      in srgb,
      var(--done) 12%,
      transparent
    );
}

.tabs{
  display:flex;
  gap:6px;
  margin-bottom:14px;
}

.tab{
  min-height:38px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--muted);
  padding:0 13px;
  border-radius:9px;
  font-size:12.5px;
  font-weight:620;
}

.tab.active{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
  font-weight:700;
}

.toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.input,
.select,
.textarea{
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  border-radius:10px;
  outline:0;
  font-size:13px;
  transition:
    border-color .14s ease,
    box-shadow .14s ease;
}

.input,
.select{
  min-height:40px;
  padding:0 12px;
}

.textarea{
  width:100%;
  min-height:140px;
  padding:12px;
  resize:vertical;
  line-height:1.6;
}

.input{
  min-width:260px;
}

.select{
  min-width:120px;
}

.input:focus,
.select:focus,
.textarea:focus{
  border-color:
    color-mix(
      in srgb,
      var(--primary) 62%,
      var(--line)
    );
  box-shadow:
    0 0 0 3px
    color-mix(
      in srgb,
      var(--primary) 10%,
      transparent
    );
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  text-align:left;
  padding:11px 10px;
  border-bottom:1px solid var(--line);
  font-size:12.5px;
}

.table th{
  color:var(--muted);
  font-size:10.5px;
  font-weight:700;
}

.typegrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.typecard{
  min-height:108px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  border-radius:13px;
  padding:17px;
  text-align:left;
}

.typecard:hover{
  border-color:var(--primary);
  background:var(--surface2);
}

.typecard b{
  display:block;
  font-size:15px;
  font-weight:700;
  margin-bottom:5px;
}

.typecard small{
  color:var(--muted);
  font-size:11.5px;
}

.formrow{
  margin:14px 0;
}

.formrow label{
  display:block;
  margin-bottom:6px;
  font-size:11.5px;
  line-height:1.35;
  font-weight:700;
}

.full{
  width:100%;
}

.actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:7px;
  margin-top:16px;
}

.primary,
.secondary,
.danger{
  min-height:40px;
  border-radius:10px;
  padding:0 15px;
  font-size:12.5px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}

.primary{
  border:1px solid var(--primary);
  background:var(--primary);
  color:#fff;
}

.secondary{
  border:1px solid var(--line);
  background:var(--surface2);
  color:var(--text);
}

.danger{
  border:1px solid transparent;
  background:
    color-mix(
      in srgb,
      var(--danger) 11%,
      transparent
    );
  color:var(--danger);
}

.fab{
  position:fixed;
  right:26px;
  bottom:24px;
  z-index:18;

  min-height:46px;
  border:0;
  border-radius:24px;

  background:var(--primary);
  color:#fff;

  padding:0 18px;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;

  font-size:13px;
  font-weight:720;

  box-shadow:
    0 10px 24px
    color-mix(
      in srgb,
      var(--primary) 27%,
      transparent
    );
}

.timeline{
  border-left:1px solid var(--line);
  margin:13px 0 0 5px;
  padding-left:17px;
}

.event{
  position:relative;
  margin:0 0 16px;
}

.event:before{
  content:"";
  position:absolute;
  left:-21px;
  top:5px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--primary);
}

.event b{
  font-size:12.5px;
  font-weight:680;
}

.event small{
  color:var(--muted);
  font-size:10.5px;
}

.setting{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:52px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}

.setting:last-child{
  border:0;
}

.loginwrap{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:20px;
}

.login{
  width:min(430px,100%);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  padding:28px;
  box-shadow:var(--shadow);
}

.login .brand{
  margin-bottom:26px;
}

.login h1{
  margin:0 0 5px;
  font-size:28px;
}

.mobileNav{
  display:none;
}

@media(max-width:760px){
  html{
    font-size:14px;
  }

  .top{
    height:58px;
    padding:0 14px;
  }

  .mark{
    width:32px;
    height:32px;
  }

  .brand b{
    font-size:13px;
  }

  .userbox .role{
    display:none;
  }

  .layout{
    display:block;
    padding:18px 13px 106px;
  }

  .side{
    display:none;
  }

  .main h1{
    font-size:23px;
  }

  .sub{
    margin-bottom:18px;
    font-size:12.5px;
  }

  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .grid .metric:last-child{
    grid-column:1/-1;
  }

  .metric{
    min-height:88px;
    padding:14px;
  }

  .metric strong{
    font-size:25px;
  }

  .request{
    grid-template-columns:64px minmax(0,1fr);
    min-height:68px;
    padding:11px 0;
  }

  .request>small{
    display:none;
  }

  .typegrid{
    grid-template-columns:1fr;
  }

  .input{
    min-width:0;
    width:100%;
  }

  .toolbar .select{
    flex:1;
    min-width:105px;
  }

  .tablewrap{
    overflow:auto;
  }

  .table{
    min-width:700px;
  }

  .fab{
    right:50%;
    transform:translateX(50%);
    bottom:64px;
    min-height:44px;
    white-space:nowrap;
  }

  .mobileNav{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    background:var(--surface);
    border-top:1px solid var(--line);
    z-index:19;
    padding-bottom:env(safe-area-inset-bottom);
  }

  .mobileNav button{
    min-height:54px;
    border:0;
    background:transparent;
    color:var(--muted);
    padding:7px 3px 6px;
    font-size:10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
  }

  .mobileNav button .ico{
    width:19px;
    height:19px;
  }

  .mobileNav button.active{
    color:var(--primary);
    font-weight:700;
  }
}


/* V2 block editor */
.editorhint{margin:-2px 0 10px}.blockeditor{display:flex;flex-direction:column;gap:10px}.editorblock{border:1px solid var(--line);border-radius:14px;background:var(--surface2);padding:10px}.textblock .textarea{min-height:110px;background:var(--surface);border:0}.blocktext:focus{box-shadow:0 0 0 2px var(--primary2)}.attachblock{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.preview{grid-column:1/-1;width:100%;max-height:360px;object-fit:contain;border-radius:10px;background:var(--surface)}.attachname{display:flex;gap:9px;align-items:center;min-width:0}.attachname span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}.blocktools{display:flex;gap:5px;justify-content:flex-end;margin-top:7px}.attachblock .blocktools{margin:0}.blocktools button{border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:8px;padding:6px 9px}.editoradd{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.filelabel{cursor:pointer;display:inline-block}.filelabel input{display:none}.slackpreview{margin-top:18px;border:1px dashed var(--line);background:var(--surface2);border-radius:13px;padding:14px;display:grid;gap:5px}.slackpreview small{color:var(--muted);font-weight:900}.slackpreview span,.slackpreview div{font-size:12px;color:var(--muted)}.camera{display:none}
@media(max-width:760px){.editoradd{display:grid;grid-template-columns:1fr 1fr}.editoradd .secondary:first-child{grid-column:1/-1}.filelabel{text-align:center}.camera{display:block}.attachblock{grid-template-columns:1fr}.attachblock .blocktools{justify-content:stretch}.blocktools button{flex:1;padding:9px}.preview{max-height:300px}.editorhint{font-size:11px}}


/* ============================================================
   SMARTDOCTOR THEME SYSTEM
   Source-aligned theme palette
   ============================================================ */

:root,
html[data-theme="light"] {
  color-scheme:light;

  --theme-page:#f8f7fc;
  --theme-page-top:#fbfaff;
  --theme-page-bottom:#f7f5fb;
  --theme-glow:#ddd2ff;

  --theme-surface:#fff;
  --theme-surface-soft:#faf8fd;
  --theme-surface-strong:#fff;
  --theme-surface-hover:#f6f3ff;

  --theme-text:#171524;
  --theme-text-2:#4f4a5d;
  --theme-muted:#777286;

  --theme-line:#ebe7f2;
  --theme-line-strong:#ded8e9;

  --theme-accent:#7146ef;
  --theme-accent-2:#8a67f5;
  --theme-accent-3:#bba9fa;
  --theme-accent-soft:#f1edff;

  --theme-success:#21a67a;
  --theme-success-soft:#e8f7f1;
  --theme-danger:#ef625b;
  --theme-danger-soft:#fff0ef;
  --theme-warning:#f2994a;
  --theme-warning-soft:#fff4e9;

  --theme-shadow:0 14px 40px rgba(48,31,91,.07);
}

html[data-theme="dark"] {
  color-scheme:dark;
  --theme-page:#121217;
  --theme-page-top:#15151c;
  --theme-page-bottom:#101015;
  --theme-glow:#332859;
  --theme-surface:#1c1c24;
  --theme-surface-soft:#252530;
  --theme-surface-strong:#22222c;
  --theme-surface-hover:#292936;
  --theme-text:#f3f1f7;
  --theme-text-2:#d0ccd9;
  --theme-muted:#9e99aa;
  --theme-line:#33323e;
  --theme-line-strong:#44424f;
  --theme-accent:#9b7bff;
  --theme-accent-2:#b29aff;
  --theme-accent-3:#cabaff;
  --theme-accent-soft:#30284c;
  --theme-success:#4cc89e;
  --theme-success-soft:#203b34;
  --theme-danger:#ff7770;
  --theme-danger-soft:#412729;
  --theme-warning:#f5a65d;
  --theme-warning-soft:#402f21;
  --theme-shadow:0 16px 42px rgba(0,0,0,.26);
}

html[data-theme="midnight"] {
  color-scheme:dark;
  --theme-page:#0d1624;
  --theme-page-top:#101c2d;
  --theme-page-bottom:#0b1320;
  --theme-glow:#173e67;
  --theme-surface:#142235;
  --theme-surface-soft:#1b2e46;
  --theme-surface-strong:#182a40;
  --theme-surface-hover:#203651;
  --theme-text:#eef5ff;
  --theme-text-2:#cfdaea;
  --theme-muted:#8fa1b7;
  --theme-line:#293d55;
  --theme-line-strong:#39516d;
  --theme-accent:#62a4ff;
  --theme-accent-2:#80b6ff;
  --theme-accent-3:#a5ccff;
  --theme-accent-soft:#1b3656;
  --theme-success:#4ed0a2;
  --theme-success-soft:#183d38;
  --theme-danger:#ff7d7d;
  --theme-danger-soft:#492a31;
  --theme-warning:#f5ab63;
  --theme-warning-soft:#453426;
  --theme-shadow:0 16px 42px rgba(0,8,20,.30);
}

html[data-theme="emerald"] {
  color-scheme:light;
  --theme-page:#f3f8f5;
  --theme-page-top:#f8fcfa;
  --theme-page-bottom:#eef6f1;
  --theme-glow:#cceadd;
  --theme-surface:#fff;
  --theme-surface-soft:#f2f8f4;
  --theme-surface-strong:#fff;
  --theme-surface-hover:#edf7f1;
  --theme-text:#17241e;
  --theme-text-2:#45594f;
  --theme-muted:#708178;
  --theme-line:#dce9e2;
  --theme-line-strong:#cdded5;
  --theme-accent:#168a63;
  --theme-accent-2:#29a87c;
  --theme-accent-3:#81ccb0;
  --theme-accent-soft:#e4f5ee;
  --theme-success:#269b63;
  --theme-success-soft:#e4f5ec;
  --theme-danger:#d95757;
  --theme-danger-soft:#fcebea;
  --theme-warning:#d88932;
  --theme-warning-soft:#fbf0df;
  --theme-shadow:0 14px 40px rgba(20,82,58,.07);
}

html[data-theme="slate"] {
  color-scheme:light;
  --theme-page:#eef1f5;
  --theme-page-top:#f6f8fa;
  --theme-page-bottom:#e9edf2;
  --theme-glow:#d7e0eb;
  --theme-surface:#fff;
  --theme-surface-soft:#f4f6f8;
  --theme-surface-strong:#fff;
  --theme-surface-hover:#eef2f6;
  --theme-text:#202832;
  --theme-text-2:#4b5867;
  --theme-muted:#74808e;
  --theme-line:#dce2e8;
  --theme-line-strong:#ccd4dd;
  --theme-accent:#506b8a;
  --theme-accent-2:#6682a2;
  --theme-accent-3:#a2b4c8;
  --theme-accent-soft:#e7edf4;
  --theme-success:#318765;
  --theme-success-soft:#e5f2ed;
  --theme-danger:#d85f5f;
  --theme-danger-soft:#faecec;
  --theme-warning:#cf8538;
  --theme-warning-soft:#f8efe3;
  --theme-shadow:0 14px 38px rgba(46,61,78,.08);
}

html[data-theme="warm"] {
  color-scheme:light;
  --theme-page:#faf6f0;
  --theme-page-top:#fdfaf6;
  --theme-page-bottom:#f7f0e7;
  --theme-glow:#f2dcc4;
  --theme-surface:#fffdf9;
  --theme-surface-soft:#faf2e8;
  --theme-surface-strong:#fffefa;
  --theme-surface-hover:#f8ede0;
  --theme-text:#30261f;
  --theme-text-2:#62544a;
  --theme-muted:#88786c;
  --theme-line:#eadfd4;
  --theme-line-strong:#ddd0c4;
  --theme-accent:#b56b42;
  --theme-accent-2:#ca8055;
  --theme-accent-3:#ddb092;
  --theme-accent-soft:#f7e8dc;
  --theme-success:#368763;
  --theme-success-soft:#e9f3ed;
  --theme-danger:#c95c55;
  --theme-danger-soft:#f9eae7;
  --theme-warning:#c57b2d;
  --theme-warning-soft:#f8eddd;
  --theme-shadow:0 14px 38px rgba(90,57,35,.08);
}

html[data-theme="valentine"] {
  color-scheme:light;
  --theme-page:#fff6f9;
  --theme-page-top:#fff9fb;
  --theme-page-bottom:#fff3f7;
  --theme-glow:#f6b8cc;
  --theme-surface:#fffafb;
  --theme-surface-soft:#fff1f5;
  --theme-surface-strong:#fff;
  --theme-surface-hover:#fdeaf1;
  --theme-text:#351a26;
  --theme-text-2:#684453;
  --theme-muted:#8b6575;
  --theme-line:#f1d0dc;
  --theme-line-strong:#e8b5c7;
  --theme-accent:#e63e78;
  --theme-accent-2:#ef6796;
  --theme-accent-3:#f4a3bd;
  --theme-accent-soft:#fde6ee;
  --theme-success:#29936c;
  --theme-success-soft:#e6f5ef;
  --theme-danger:#da5264;
  --theme-danger-soft:#fcebed;
  --theme-warning:#d58a32;
  --theme-warning-soft:#fff2df;
  --theme-shadow:0 14px 40px rgba(143,47,84,.08);
}

html[data-theme="summer"] {
  color-scheme:light;
  --theme-page:#f4fbff;
  --theme-page-top:#f9fdff;
  --theme-page-bottom:#eef9ff;
  --theme-glow:#b9e4fa;
  --theme-surface:#fbfdff;
  --theme-surface-soft:#edf8ff;
  --theme-surface-strong:#fff;
  --theme-surface-hover:#e4f4ff;
  --theme-text:#17324b;
  --theme-text-2:#3f617a;
  --theme-muted:#66849b;
  --theme-line:#cce8f7;
  --theme-line-strong:#afd9ef;
  --theme-accent:#238fe4;
  --theme-accent-2:#4cabe8;
  --theme-accent-3:#8dcef3;
  --theme-accent-soft:#e1f3ff;
  --theme-success:#29a47d;
  --theme-success-soft:#e3f6ef;
  --theme-danger:#de6670;
  --theme-danger-soft:#fbecef;
  --theme-warning:#dfaa31;
  --theme-warning-soft:#fff6d9;
  --theme-shadow:0 14px 40px rgba(35,143,228,.08);
}

/* Request Portal semantic token bridge */
:root {
  --bg:var(--theme-page);
  --surface:var(--theme-surface);
  --surface2:var(--theme-surface-soft);
  --card:var(--theme-surface);
  --text:var(--theme-text);
  --muted:var(--theme-muted);
  --line:var(--theme-line);
  --primary:var(--theme-accent);
  --primary2:var(--theme-accent-soft);
  --purple:var(--theme-accent);
  --purpleSoft:var(--theme-accent-soft);
  --open:var(--theme-accent);
  --confirm:var(--theme-warning);
  --done:var(--theme-success);
  --danger:var(--theme-danger);
  --shadow:var(--theme-shadow);
}

body {
  color:var(--theme-text);
  background:
    radial-gradient(
      circle at 77% -8%,
      var(--theme-glow),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      var(--theme-page-top),
      var(--theme-page-bottom)
    );
}

.card,
.login,
.top,
.side {
  background:var(--theme-surface);
  border-color:var(--theme-line);
  color:var(--theme-text);
}

.input,
.select,
textarea {
  background:var(--theme-surface-strong);
  border-color:var(--theme-line);
  color:var(--theme-text);
}

.secondary,
.link {
  color:var(--theme-accent);
}

.primary {
  background:var(--theme-accent);
}

.theme-palette-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.theme-palette {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:12px;
  text-align:left;
  border:1px solid var(--theme-line);
  border-radius:13px;
  background:var(--theme-surface-soft);
  color:var(--theme-text);
  cursor:pointer;
}

.theme-palette:hover,
.theme-palette.active {
  border-color:var(--theme-accent);
}

.theme-palette.active {
  box-shadow:0 0 0 2px
    color-mix(in srgb,var(--theme-accent) 20%,transparent);
}

.theme-palette b {
  display:block;
}

.theme-palette small {
  display:block;
  margin-top:3px;
  color:var(--theme-muted);
}

.theme-preview {
  width:32px;
  height:32px;
  flex:0 0 32px;
  border-radius:9px;
  border:1px solid var(--theme-line);
}

.theme-preview-light {
  background:linear-gradient(135deg,#7146ef,#f1edff);
}
.theme-preview-dark {
  background:linear-gradient(135deg,#1c1c24,#9b7bff);
}
.theme-preview-midnight {
  background:linear-gradient(135deg,#142235,#62a4ff);
}
.theme-preview-emerald {
  background:linear-gradient(135deg,#168a63,#e4f5ee);
}
.theme-preview-slate {
  background:linear-gradient(135deg,#506b8a,#e7edf4);
}
.theme-preview-warm {
  background:linear-gradient(135deg,#b56b42,#f7e8dc);
}
.theme-preview-valentine {
  background:linear-gradient(135deg,#e63e78,#fde6ee);
}
.theme-preview-summer {
  background:linear-gradient(135deg,#238fe4,#e1f3ff);
}

@media(max-width:760px) {
  .theme-palette-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:390px) {
  .theme-palette-grid {
    grid-template-columns:1fr;
  }
}


/* Request customer autocomplete */
.customer-autocomplete {
  position:relative;
}

.customer-suggestions {
  display:none;
  position:absolute;
  z-index:80;
  left:0;
  right:0;
  top:calc(100% + 6px);

  max-height:280px;
  overflow:auto;

  padding:6px;

  border:1px solid var(--line);
  border-radius:12px;

  background:var(--surface);
  box-shadow:var(--shadow);
}

.customer-suggestions.show {
  display:block;
}

.customer-suggestions button {
  width:100%;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:11px 12px;

  border:0;
  border-radius:9px;

  text-align:left;

  background:transparent;
  color:var(--text);
}

.customer-suggestions button:hover {
  background:var(--primary2);
}

.customer-suggestions button b {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.customer-suggestions button span {
  flex:0 0 auto;
  color:var(--muted);
  font-size:11px;
}

/* Customer code + name pair */
.customer-pair {
  display:grid;
  grid-template-columns:minmax(160px,.42fr) minmax(240px,1fr);
  gap:12px;
}

.customer-pair .formrow {
  min-width:0;
}

.customer-option {
  cursor:pointer;
}

.customer-option-main {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.customer-option-main b {
  flex:0 0 auto;
  min-width:72px;
  font-variant-numeric:tabular-nums;
  color:var(--primary);
}

.customer-option-main strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:600;
  color:var(--text);
}

.customer-option-usage {
  flex:0 0 auto;
  color:var(--muted);
  font-size:11px;
}

.customer-suggestions button.active,
.customer-suggestions button:hover {
  background:var(--primary2);
  outline:1px solid
    color-mix(in srgb,var(--primary) 30%,transparent);
}

@media(max-width:650px) {
  .customer-pair {
    grid-template-columns:1fr;
    gap:4px;
  }
}

/* Storage management */

.storage-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:18px;
}

.storage-summary > div {
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface2);
}

.storage-summary small {
  display:block;
  color:var(--muted);
  font-size:11px;
}

.storage-summary strong {
  display:block;
  margin-top:5px;
  font-size:18px;
}

.storage-bar {
  width:100%;
  height:10px;
  margin-top:16px;
  overflow:hidden;
  border-radius:999px;
  background:var(--surface2);
  border:1px solid var(--line);
}

.storage-bar span {
  display:block;
  height:100%;
  border-radius:999px;
  background:var(--done);
  transition:width .25s ease;
}

.storage-bar span.warning {
  background:var(--confirm);
}

.storage-bar span.danger {
  background:var(--danger);
}

.storage-detail {
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  margin-top:13px;
  color:var(--muted);
  font-size:12px;
}

.storage-detail b {
  color:var(--text);
}

.storage-disk {
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
}

.storage-disk b {
  color:var(--text);
}

.storage-alert {
  margin-top:14px;
  padding:12px 14px;
  border-radius:10px;
  background:
    color-mix(
      in srgb,
      var(--confirm) 13%,
      transparent
    );
  color:var(--confirm);
  font-size:12px;
  font-weight:700;
}

@media(max-width:650px) {
  .storage-summary {
    grid-template-columns:1fr;
  }
}

/* Real request list */

.request-list-card {
  padding:0;
  overflow:hidden;
}

.real-request {
  cursor:pointer;
}

.real-request:hover {
  background:var(--surface2);
}

.request-main {
  min-width:0;
}

.request-main b,
.request-main small {
  display:block;
}

.request-main b {
  overflow:hidden;
  text-overflow:ellipsis;
}

.request-age {
  white-space:nowrap;
}

.request-toolbar {
  grid-template-columns:minmax(240px,1fr) auto auto;
}

.empty-state {
  padding:34px 18px;
  text-align:center;
  color:var(--muted);
}

.empty-state.error {
  color:var(--danger);
}

/* Request detail */
.detail-topbar{
  position:sticky;
  top:70px;
  z-index:12;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 0 10px;
  background:linear-gradient(var(--bg) 72%,transparent);
}
.detail-back{padding-left:0}
.detail-slack-btn{min-height:38px}
.detail-hero{padding:8px 0 6px}
.detail-hero-main{min-width:0}
.detail-kickers{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-bottom:8px;color:var(--muted);font-size:11.5px}
.detail-kickers>span:not(.badge){padding:4px 7px;border-radius:7px;background:var(--surface2);border:1px solid var(--line)}
.detail-project-pill{color:var(--primary)!important;background:var(--primary2)!important;border-color:color-mix(in srgb,var(--primary) 18%,var(--line))!important;font-weight:720}
.detail-hero h1{margin:0;font-size:28px;line-height:1.22;letter-spacing:-.035em}
.detail-customer{margin-top:6px;color:var(--muted);font-size:13px;font-weight:620}
.detail-summary-compact{padding:4px 18px;margin-top:10px}
.detail-meta-row{display:grid;grid-template-columns:130px minmax(0,1fr);align-items:center;gap:20px;min-height:46px;border-bottom:1px solid var(--line)}
.detail-meta-row:last-child{border-bottom:0}
.detail-meta-row>span{color:var(--muted);font-size:12px}
.detail-meta-row>b{text-align:right;font-size:13px;font-weight:680;overflow-wrap:anywhere}
.detail-content-card{padding:18px 20px}
.detail-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.detail-section-title h3{margin:0}
.detail-blocks{display:flex;flex-direction:column;gap:16px;margin-top:14px}
.detail-text-block{line-height:1.72;white-space:normal;overflow-wrap:anywhere}
.detail-attachment-block{max-width:900px}
.detail-image{display:block;width:auto;max-width:100%;max-height:720px;object-fit:contain;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
.detail-file-meta{display:flex;justify-content:space-between;gap:10px;margin-top:7px;color:var(--muted);font-size:11px}
.detail-file-meta b{color:var(--text)}
.detail-file-block{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:11px;background:var(--surface2);color:var(--text);text-decoration:none}
.detail-file-block:hover{border-color:var(--primary)}
.detail-file-block span:last-child{min-width:0}
.detail-file-block b,.detail-file-block small{display:block}
.detail-file-block b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.detail-file-block small{margin-top:3px;color:var(--muted)}
.detail-history{padding:0;overflow:hidden}
.detail-history>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;font-weight:720}
.detail-history>summary::-webkit-details-marker{display:none}
.detail-history>summary:after{content:"+";color:var(--muted);font-size:18px;font-weight:500}
.detail-history[open]>summary{border-bottom:1px solid var(--line)}
.detail-history[open]>summary:after{content:"−"}
.detail-history .timeline{margin:16px 18px 18px 23px}
.detail-admin-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 18px}
.detail-admin-bar p{margin:3px 0 0}
.detail-admin-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}

@media(max-width:760px){
  .request-toolbar{display:grid;grid-template-columns:1fr}
  .detail-topbar{top:58px;padding-top:4px}
  .detail-slack-btn{position:fixed;left:14px;right:14px;bottom:66px;z-index:25;width:calc(100% - 28px);box-shadow:0 10px 28px rgba(0,0,0,.22)}
  .detail-hero{padding-top:4px}
  .detail-hero h1{font-size:23px}
  .detail-meta-row{grid-template-columns:96px minmax(0,1fr);min-height:44px;gap:12px}
  .detail-summary-compact{padding:3px 14px}
  .detail-content-card{padding:16px 14px}
  .detail-admin-bar{align-items:flex-start;flex-direction:column}
  .detail-admin-actions{width:100%;justify-content:stretch}
  .detail-admin-actions button{flex:1}
  .real-request{align-items:flex-start}
  .request-age{font-size:10px}
  .detail-image{width:100%;max-height:none}
}

/* Real dashboard */

.dashboard-metric {
  cursor:pointer;
  transition:
    transform .12s ease,
    border-color .12s ease;
}

.dashboard-metric:hover {
  transform:translateY(-1px);
  border-color:var(--primary);
}

.admin-dashboard-filter {
  display:grid;
  grid-template-columns:
    minmax(150px,.7fr)
    minmax(190px,1fr)
    minmax(130px,.55fr);
}

@media(max-width:760px) {
  .admin-dashboard-filter {
    grid-template-columns:1fr;
  }
}


/* v0.6.1 Request Worklist density */
.request-filter-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:14px;margin-bottom:12px}.request-toolbar{display:grid;grid-template-columns:minmax(280px,1fr) 150px 180px;gap:8px;margin:0}.request-search{width:100%;min-width:0}.date-filter-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:11px;padding-top:11px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.filter-label{font-weight:720;color:var(--text);margin-right:2px}.filter-chip,.bulk-actions button{min-height:32px;padding:0 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface2);color:var(--text);font-size:12.5px;font-weight:680}.date-input{height:34px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);padding:0 9px;font:inherit;font-size:12.5px}.request-result-bar{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.bulk-actions{display:flex;align-items:center;gap:6px}.bulk-actions strong{color:var(--primary);margin-right:4px}.bulk-actions .primary-mini{background:var(--primary);border-color:var(--primary);color:#fff}.request-list-card{padding:0;overflow:hidden;margin-top:0}.request-table-wrap{overflow:visible}.request-work-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:13.5px}.request-work-table th{position:sticky;top:0;z-index:2;background:var(--surface2);color:var(--muted);font-size:12.5px;font-weight:720;text-align:left;white-space:nowrap;padding:11px 8px;border-bottom:1px solid var(--line);cursor:default;overflow:hidden;text-overflow:ellipsis}.request-work-table th:not(.check-col):hover{color:var(--primary)}.request-work-table td{padding:11px 8px;border-bottom:1px solid var(--line);vertical-align:middle;overflow:hidden;text-overflow:ellipsis}.request-work-table tbody tr{cursor:pointer;background:var(--surface)}.request-work-table tbody tr:hover{background:var(--surface2)}.request-work-table tbody tr:last-child td{border-bottom:0}.request-work-table th:nth-child(1),.request-work-table td:nth-child(1){width:38px}.request-work-table th:nth-child(2),.request-work-table td:nth-child(2){width:105px}.request-work-table th:nth-child(3),.request-work-table td:nth-child(3){width:116px}.request-work-table th:nth-child(4),.request-work-table td:nth-child(4){width:90px}.request-work-table th:nth-child(5),.request-work-table td:nth-child(5){width:100px}.request-work-table th:nth-child(6),.request-work-table td:nth-child(6){width:auto}.request-work-table th:nth-child(7),.request-work-table td:nth-child(7){width:125px}.request-work-table th:nth-child(8),.request-work-table td:nth-child(8){width:82px}.request-work-table th:nth-child(9),.request-work-table td:nth-child(9){width:48px}.check-col{text-align:center!important}.nowrap{white-space:nowrap}.num-cell{text-align:center}.customer-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.title-cell{min-width:0}.title-cell b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:720}.title-cell small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}.request-status-select{width:90px;height:32px;border:1px solid var(--line);border-radius:8px;padding:0 22px 0 9px;font:inherit;font-size:12px;font-weight:750;outline:0}.request-status-select.status-open{color:var(--open);background:var(--primary2)}.request-status-select.status-confirm{color:var(--confirm);background:color-mix(in srgb,var(--confirm) 10%,var(--surface))}.request-status-select.status-done{color:var(--done);background:color-mix(in srgb,var(--done) 10%,var(--surface))}.request-filter-panel .input,.request-filter-panel .select{font-size:13.5px}.request-filter-panel .input::placeholder{font-size:13px}.tabs .tab{font-size:13.5px}.request-result-bar>b{font-size:13px}
@media(max-width:1050px){.request-table-wrap{overflow-x:auto;overflow-y:hidden}.request-work-table{min-width:940px;table-layout:fixed}}
@media(max-width:760px){.request-filter-panel{padding:11px}.request-toolbar{display:grid;grid-template-columns:1fr 1fr}.request-toolbar .request-search{grid-column:1/-1}.date-filter-row{gap:6px;font-size:12.5px}.date-filter-row .date-input{width:calc(50% - 18px)}.request-result-bar{align-items:flex-start;flex-direction:column;padding:4px 0 8px}.bulk-actions{width:100%;overflow:auto;padding-bottom:2px}.request-work-table{min-width:940px;font-size:13px}.request-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}}


/* v0.6.2 Worklist controls */
.request-status-control{position:relative;display:inline-flex;overflow:visible}.request-status-pill{height:30px;display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:0 10px;font-size:12.5px;font-weight:750;line-height:1;white-space:nowrap;border:1px solid transparent}.request-status-button{cursor:pointer;font-family:inherit}.request-status-pill.status-open,.status-menu-item.status-open{color:var(--open)}.request-status-pill.status-confirm,.status-menu-item.status-confirm{color:var(--confirm)}.request-status-pill.status-done,.status-menu-item.status-done{color:var(--done)}.request-status-pill.status-open{background:color-mix(in srgb,var(--open) 13%,var(--surface));border-color:color-mix(in srgb,var(--open) 20%,var(--line))}.request-status-pill.status-confirm{background:color-mix(in srgb,var(--confirm) 12%,var(--surface));border-color:color-mix(in srgb,var(--confirm) 20%,var(--line))}.request-status-pill.status-done{background:color-mix(in srgb,var(--done) 12%,var(--surface));border-color:color-mix(in srgb,var(--done) 20%,var(--line))}.status-dot{width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 7px}.status-caret{font-size:13px;margin-left:1px;transform:translateY(-1px);opacity:.75}.request-status-menu{position:fixed;z-index:120;width:142px;padding:5px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:0 12px 32px rgba(0,0,0,.22)}.status-menu-item{width:100%;height:36px;border:0;background:transparent;border-radius:7px;padding:0 9px;display:grid;grid-template-columns:10px 1fr 18px;align-items:center;gap:7px;text-align:left;font-family:inherit;font-size:12.5px;font-weight:700}.status-menu-item:hover,.status-menu-item.current{background:var(--surface2)}.status-check{text-align:right;color:var(--primary);font-weight:800}.request-work-table td:nth-child(2){overflow:hidden}.date-input{width:116px;min-width:116px;text-align:center;font-variant-numeric:tabular-nums;letter-spacing:.01em}.date-input::placeholder{color:var(--muted);opacity:.72}.date-range-sep{color:var(--muted);padding:0 1px}.request-work-table th:nth-child(2),.request-work-table td:nth-child(2){width:112px}
@media(max-width:760px){.date-filter-row .date-input{width:116px;min-width:116px}.request-status-menu{width:min(280px,calc(100vw - 32px));padding:8px}.status-menu-item{height:44px;font-size:14px}}

/* v0.6.3 Worklist interaction fixes */
.request-search:focus{position:relative;z-index:1}.request-status-menu{max-height:calc(100vh - 16px);overflow:auto}.request-table-wrap{scrollbar-gutter:auto}

/* v0.6.4 checked filter combos */
.request-toolbar{overflow:visible}
.check-combo{position:relative;min-width:170px}
.check-combo summary{list-style:none;min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;font-weight:650;cursor:pointer;user-select:none}
.check-combo summary::-webkit-details-marker{display:none}
.check-combo[open] summary{border-color:color-mix(in srgb,var(--primary) 55%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 9%,transparent)}
.combo-chevron{color:var(--muted);font-size:14px}
.check-combo-menu{position:absolute;z-index:80;right:0;top:calc(100% + 6px);min-width:220px;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:0 14px 36px rgba(0,0,0,.18)}
.check-combo-item{display:flex;align-items:center;gap:9px;min-height:38px;padding:0 9px;border-radius:8px;font-size:13px;cursor:pointer}
.check-combo-item:hover{background:var(--surface2)}
.check-combo-item input{width:15px;height:15px;accent-color:var(--primary)}
.combo-all{font-weight:700}.combo-divider{height:1px;background:var(--line);margin:5px 3px}
.dashboard-request-row{cursor:pointer}
@media(max-width:760px){.check-combo{min-width:0;flex:1}.check-combo-menu{left:0;right:auto;min-width:210px}}

/* ============================================================
   v0.7.0 Worklist controls / modal / persistent drafts
   ============================================================ */

/* Worklist status pills and filter triggers intentionally have no chevrons. */
.status-caret,.combo-chevron{display:none!important}

.check-combo{position:relative;min-width:0}
.check-combo-trigger{
  width:100%;
  min-height:40px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  color:var(--text);
  text-align:left;
  font-size:13px;
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.check-combo-trigger:hover,
.check-combo-trigger:focus{
  border-color:color-mix(in srgb,var(--primary) 55%,var(--line));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 8%,transparent);
  outline:0;
}
.check-combo-menu{
  position:fixed;
  z-index:130;
  width:230px;
  min-width:0;
  padding:7px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:11px;
  box-shadow:0 14px 36px rgba(0,0,0,.22);
}
.check-combo-all{
  width:100%;
  min-height:38px;
  padding:0 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font:inherit;
  font-size:13px;
  font-weight:700;
  text-align:left;
}
.check-combo-all:hover,.check-combo-all.current{background:var(--surface2)}

.request-toolbar{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(150px,185px) minmax(150px,185px);
  gap:8px;
  align-items:stretch;
}

@media(max-width:1120px){
  .request-toolbar{grid-template-columns:1fr 1fr}
  .request-toolbar .request-search{grid-column:1/-1}
}
@media(max-width:680px){
  .request-toolbar{grid-template-columns:1fr}
  .request-toolbar .request-search{grid-column:auto}
  .date-filter-row{align-items:stretch}
  .date-filter-row .filter-label{width:100%}
}

.bulk-actions button{background:var(--surface2);border-color:var(--line);color:var(--text)}
.bulk-actions .bulk-status{display:inline-flex;align-items:center;gap:7px}
.bulk-actions .bulk-status.status-open{color:var(--open)}
.bulk-actions .bulk-status.status-confirm{color:var(--confirm)}
.bulk-actions .bulk-status.status-done{color:var(--done)}
.bulk-actions .bulk-clear{margin-left:4px;color:var(--muted)}
.bulk-actions .status-dot{width:6px;height:6px;flex-basis:6px}

/* In-app confirmation instead of browser confirm() for bulk/draft actions. */
.app-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:500;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(3,10,22,.56);
  backdrop-filter:blur(2px);
}
.app-modal{
  width:min(430px,100%);
  padding:20px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  color:var(--text);
  box-shadow:0 24px 70px rgba(0,0,0,.32);
}
.app-modal-title{font-size:17px;font-weight:760;letter-spacing:-.02em}
.app-modal-message{margin-top:10px;color:var(--muted);font-size:13.5px;line-height:1.65;white-space:pre-line}
.app-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}

/* Draft worklist */
.draft-filter-panel{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(160px,200px);
  gap:8px;
  padding:14px;
  margin-bottom:10px;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--surface);
}
.draft-filter-panel .input{width:100%;min-width:0}
.draft-list-card{padding:0;overflow:hidden;margin-top:0}
.draft-row{
  display:grid;
  grid-template-columns:110px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  min-height:78px;
  padding:13px 16px;
  border-bottom:1px solid var(--line);
  background:var(--surface);
  cursor:pointer;
}
.draft-row:last-child{border-bottom:0}
.draft-row:hover{background:var(--surface2)}
.draft-main{min-width:0}
.draft-main small,.draft-main b{display:block}
.draft-main b{margin:2px 0;font-size:14px;font-weight:720;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.draft-main small{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.draft-delete{min-height:34px;padding:0 11px}

@media(max-width:680px){
  .draft-filter-panel{grid-template-columns:1fr}
  .draft-row{grid-template-columns:82px minmax(0,1fr) auto;gap:9px;padding:12px}
  .draft-delete{padding:0 9px}
}
\n\n/* v0.8.0 dashboard tables / request composer / system projects */\n.dashboard-table-wrap,.draft-table-wrap,.system-project-table{overflow:auto;border:1px solid var(--line);border-radius:12px}.dashboard-table,.draft-table,.system-project-table table{width:100%;border-collapse:collapse;min-width:820px}.dashboard-table th,.dashboard-table td,.draft-table th,.draft-table td,.system-project-table th,.system-project-table td{padding:10px 11px;border-bottom:1px solid var(--line);text-align:left;font-size:12.5px;vertical-align:middle}.dashboard-table th,.draft-table th,.system-project-table th{color:var(--muted);background:var(--surface2);font-size:11.5px;font-weight:720}.dashboard-table tr:last-child td,.draft-table tr:last-child td,.system-project-table tr:last-child td{border-bottom:0}.dashboard-table tbody tr,.draft-table tbody tr{cursor:pointer}.dashboard-table tbody tr:hover,.draft-table tbody tr:hover{background:var(--surface2)}.draft-table-card{padding:0;overflow:hidden}.draft-delete{min-height:32px}.request-composer-backdrop{position:fixed;inset:0;z-index:70;background:rgba(5,10,20,.62);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:22px}.request-composer{width:min(980px,100%);max-height:calc(100vh - 44px);background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.3);display:flex;flex-direction:column;overflow:hidden}.composer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 14px;border-bottom:1px solid var(--line)}.composer-head h2{margin:0;font-size:22px}.composer-head p{margin:5px 0 0;color:var(--muted);font-size:12.5px}.composer-close{width:36px;height:36px;border:0;border-radius:9px;background:var(--surface2);color:var(--muted);font-size:24px;line-height:1}.request-composer>.typegrid,.request-composer>.project-groups{padding:20px 22px;overflow:auto}.project-groups{display:grid;gap:18px}.project-group h3{margin:0 0 9px;font-size:13px;color:var(--muted)}.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.project-card{min-height:72px;text-align:left;border:1px solid var(--line);border-radius:11px;background:var(--surface2);color:var(--text);padding:12px}.project-card:hover{border-color:var(--primary);background:var(--primary2)}.project-card b,.project-card small{display:block}.project-card b{font-size:14px}.project-card small{margin-top:4px;color:var(--muted);font-size:10.5px}.composer-scroll{padding:16px 22px;overflow:auto}.composer-project-summary{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);margin-bottom:10px}.composer-project-summary span{font-size:11px;color:var(--muted)}.composer-project-summary b{font-size:13px}.composer-footer{display:flex;justify-content:flex-end;gap:8px;padding:13px 22px;border-top:1px solid var(--line);background:var(--surface)}.autosave{margin-top:10px;color:var(--muted);font-size:11.5px}.system-project-table .group-id-input{min-width:150px;width:100%}.system-project-actions{white-space:nowrap}.template-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.template-setting{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--surface2)}.template-setting-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.template-setting .textarea{min-height:120px;background:var(--surface)}\n@media(max-width:760px){.request-composer-backdrop{padding:0;align-items:flex-end}.request-composer{width:100%;max-height:94vh;border-radius:18px 18px 0 0}.project-grid{grid-template-columns:1fr 1fr}.template-settings{grid-template-columns:1fr}.composer-head{padding:16px}.composer-scroll,.request-composer>.typegrid,.request-composer>.project-groups{padding:14px}.composer-footer{padding:11px 14px}.dashboard-table,.draft-table{min-width:760px}}\n
/* v0.8.0 request worklist project column */
.request-work-table th:nth-child(1),.request-work-table td:nth-child(1){width:36px}
.request-work-table th:nth-child(2),.request-work-table td:nth-child(2){width:100px}
.request-work-table th:nth-child(3),.request-work-table td:nth-child(3){width:112px}
.request-work-table th:nth-child(4),.request-work-table td:nth-child(4){width:88px}
.request-work-table th:nth-child(5),.request-work-table td:nth-child(5){width:98px}
.request-work-table th:nth-child(6),.request-work-table td:nth-child(6){width:auto}
.request-work-table th:nth-child(7),.request-work-table td:nth-child(7){width:118px}
.request-work-table th:nth-child(8),.request-work-table td:nth-child(8){width:120px}
.request-work-table th:nth-child(9),.request-work-table td:nth-child(9){width:76px}
.request-work-table th:nth-child(10),.request-work-table td:nth-child(10){width:46px}
@media(max-width:1150px){.request-work-table{min-width:1060px}.request-table-wrap{overflow-x:auto}}


/* v0.8.4 project category / draft selection */
.project-admin-card{overflow:visible}
.project-category-add{display:grid;grid-template-columns:minmax(220px,420px) auto;gap:8px;align-items:center;margin:14px 0 18px;padding:14px;border:1px dashed var(--line);border-radius:12px;background:var(--surface2)}
.project-category-stack{display:grid;gap:18px}
.project-category-section{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden;box-shadow:0 5px 16px rgba(0,0,0,.025)}
.project-category-head{display:grid;grid-template-columns:72px minmax(190px,340px) 1fr auto;gap:9px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--primary) 4%,var(--surface2))}
.project-category-actions,.project-order-controls{display:flex;align-items:center;gap:5px}
.icon-order{width:30px;height:30px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font-weight:800;display:grid;place-items:center;padding:0}
.icon-order:hover:not(:disabled){border-color:var(--primary);color:var(--primary);background:var(--primary2)}
.icon-order:disabled{opacity:.28;cursor:default}
.category-name-wrap{position:relative;min-width:0}
.category-name-input{width:100%;padding-right:72px;font-weight:720}
.category-save-state{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:10.5px;color:var(--muted);pointer-events:none}
.category-save-state.saving{color:var(--primary)}
.category-save-state.ok{color:var(--done)}
.category-save-state.error{color:var(--danger)}
.project-category-body{min-height:52px;padding:8px 10px}
.project-admin-row{display:grid;grid-template-columns:38px minmax(180px,1fr) minmax(180px,1fr) 72px auto;gap:8px;align-items:center;padding:8px;border-radius:9px;transition:background .12s ease,box-shadow .12s ease,opacity .12s ease}
.project-admin-row+.project-admin-row{border-top:1px solid color-mix(in srgb,var(--line) 72%,transparent)}
.project-admin-row:hover{background:var(--surface2)}
.project-admin-row.dragging{opacity:.42}
.project-admin-row.drag-target{box-shadow:inset 0 2px 0 var(--primary);background:var(--primary2)}
.project-drag-handle{width:32px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:20px;line-height:1;cursor:grab;display:grid;place-items:center;padding:0}
.project-drag-handle:hover{background:var(--primary2);color:var(--primary)}
.project-drag-handle:active{cursor:grabbing}
.project-name-input,.group-id-input{width:100%;min-width:0}
.project-state{font-size:11.5px;font-weight:700;white-space:nowrap}
.project-state.active{color:var(--done)}
.project-state.inactive{color:var(--muted)}
.system-project-actions{display:flex;gap:6px;white-space:nowrap}
.project-empty{padding:18px;text-align:center;color:var(--muted);font-size:12px}
.project-inline-add{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:8px;padding:10px 12px 12px;border-top:1px solid var(--line);background:var(--surface2)}
.composer-close{position:relative;z-index:2;cursor:pointer}
.composer-close:hover{color:var(--text);background:var(--primary2)}
.draft-selection-bar{display:flex;align-items:center;gap:8px;min-height:46px;padding:7px 10px;margin:8px 0 10px;border:1px solid var(--line);border-radius:11px;background:var(--surface2)}
.draft-selection-bar b{margin-right:auto}
.draft-table .select-col{width:42px;text-align:center}
.draft-table .select-col input{width:15px;height:15px}

@media(max-width:980px){
  .project-category-head{grid-template-columns:72px minmax(160px,1fr) auto}
  .project-category-head>.meta{display:none}
  .project-category-actions{grid-column:3}
  .project-admin-row{grid-template-columns:38px minmax(160px,1fr) minmax(160px,1fr)}
  .project-admin-row>.project-state,.project-admin-row>.system-project-actions{grid-column:2/-1}
}
@media(max-width:680px){
  .project-category-add{grid-template-columns:1fr}
  .project-category-head{grid-template-columns:72px minmax(0,1fr);padding:10px}
  .project-category-actions{grid-column:2;justify-self:start}
  .project-admin-row{grid-template-columns:38px minmax(0,1fr);gap:7px}
  .project-admin-row .group-id-input,.project-admin-row .system-project-actions,.project-admin-row .project-state{grid-column:2}
  .project-inline-add{grid-template-columns:1fr}
  .draft-selection-bar{flex-wrap:wrap}
  .draft-selection-bar b{width:100%}
}


/* v0.9.0 detail workspace / project autosave / caret image paste */
.request-detail-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:28px;
  align-items:start;
}
.detail-workspace{min-width:0;max-width:900px}
.detail-back{margin-bottom:18px}
.detail-title-area{padding:0 2px 22px;border-bottom:1px solid var(--line)}
.detail-request-no{font-size:11.5px;color:var(--muted);font-weight:650;letter-spacing:.01em;margin-bottom:8px}
.detail-title-area h1{margin:0;font-size:30px;line-height:1.25;letter-spacing:-.035em;word-break:break-word}
.detail-body-section{padding:24px 2px 28px;border-bottom:1px solid var(--line)}
.detail-section-heading{font-size:12px;color:var(--muted);font-weight:700;margin-bottom:14px}
.detail-blocks-flat{display:flex;flex-direction:column;gap:18px;font-size:14px;line-height:1.72}
.detail-blocks-flat .detail-text-block{font-size:14px;line-height:1.72}
.detail-blocks-flat .detail-image{max-width:100%;border-radius:12px}
.detail-history-panel{margin-top:20px;padding:0;border:0;background:transparent;box-shadow:none}
.detail-history-panel summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;padding:11px 0;border-bottom:1px solid var(--line);font-size:13px;font-weight:720}
.detail-history-panel summary::-webkit-details-marker{display:none}
.detail-history-panel .timeline{margin-top:14px}
.detail-info-panel{min-width:0}
.detail-info-sticky{position:sticky;top:90px;border-left:1px solid var(--line);padding-left:22px}
.detail-info-heading{font-size:13px;font-weight:760;margin-bottom:16px}
.detail-status-box{padding:0 0 16px;border-bottom:1px solid var(--line)}
.detail-status-box>small,.detail-info-item>small{display:block;font-size:10.5px;color:var(--muted);font-weight:650;margin-bottom:5px}
.detail-status-current{margin-bottom:9px}
.detail-status-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.detail-status-actions button{min-height:32px;border:1px solid var(--line);border-radius:8px;background:var(--surface2);color:var(--muted);font-size:11px;font-weight:700}
.detail-status-actions button:hover,.detail-status-actions button.active{border-color:var(--primary);color:var(--primary);background:var(--primary2)}
.detail-info-list{display:grid}
.detail-info-item{padding:13px 0;border-bottom:1px solid color-mix(in srgb,var(--line) 72%,transparent)}
.detail-info-item strong{display:block;font-size:14px;line-height:1.35;font-weight:720;word-break:break-word}
.detail-info-sub{display:block;margin-top:3px;font-size:11px;color:var(--muted);font-weight:550}
.detail-slack-action{width:100%;margin-top:16px}
.project-field-wrap{position:relative;min-width:0}
.project-field-wrap .project-name-input{padding-right:62px}
.project-save-state{position:absolute;right:9px;top:50%;transform:translateY(-50%);font-size:10px;color:var(--muted);pointer-events:none}
.project-save-state.saving{color:var(--primary)}
.project-save-state.ok{color:var(--done)}
.project-save-state.error{color:var(--danger)}
.project-admin-row[draggable="true"]{user-select:none}
.project-admin-row input{user-select:text}
.project-admin-row.dragging{opacity:.38;outline:1px dashed var(--primary)}
.project-admin-row.drag-target{box-shadow:inset 0 2px 0 var(--primary)}

@media(max-width:980px){
  .request-detail-layout{grid-template-columns:minmax(0,1fr) 250px;gap:20px}
  .detail-info-sticky{padding-left:16px}
}
@media(max-width:760px){
  .request-detail-layout{display:block}
  .detail-workspace{max-width:none}
  .detail-title-area h1{font-size:24px}
  .detail-info-panel{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
  .detail-info-sticky{position:static;border-left:0;padding-left:0}
  .detail-info-list{grid-template-columns:1fr 1fr;column-gap:14px}
  .detail-history-panel:not([open]) .timeline{display:none}
  .detail-slack-action{position:fixed;left:12px;right:142px;bottom:64px;z-index:18;width:auto;box-shadow:0 10px 24px rgba(0,0,0,.18)}
  .fab{right:12px;transform:none}
}

/* v0.9.1 fast status sync / image viewer */
.request-detail-layout{
  grid-template-columns:minmax(0,1fr) 240px;
  gap:24px;
}
.detail-workspace{max-width:none}
.detail-info-sticky{padding-left:18px}
.detail-status-box{
  padding:14px;
  margin-left:-14px;
  margin-bottom:4px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--surface);
  box-shadow:0 5px 18px rgba(20,32,54,.04);
}
.detail-status-box>small{font-size:11px;margin-bottom:8px}
.detail-status-current{margin-bottom:12px}
.detail-status-current .badge{
  min-height:31px;
  display:inline-flex;
  align-items:center;
  padding:0 11px;
  font-size:12.5px;
  border-radius:999px;
}
.detail-status-actions{gap:6px}
.detail-status-actions button{
  min-height:36px;
  font-size:11.5px;
  border-radius:9px;
}
.detail-image-interactive{
  cursor:zoom-in;
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.detail-image-interactive:hover{
  border-color:color-mix(in srgb,var(--primary) 40%,var(--line));
  box-shadow:0 6px 20px rgba(0,0,0,.07);
}
.image-viewer-backdrop{
  position:fixed;
  inset:0;
  z-index:320;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(8,12,20,.78);
  backdrop-filter:blur(3px);
}
.image-viewer{
  width:min(1180px,calc(100vw - 48px));
  height:min(88vh,900px);
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--line) 65%,transparent);
  border-radius:16px;
  background:var(--surface);
  box-shadow:0 26px 80px rgba(0,0,0,.38);
}
.image-viewer-head{
  min-height:50px;
  padding:0 12px 0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid var(--line);
}
.image-viewer-head b{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:13px;
}
.image-viewer-head button{
  width:34px;
  height:34px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  font-size:25px;
  line-height:1;
}
.image-viewer-head button:hover{background:var(--surface2);color:var(--text)}
.image-viewer-stage{
  min-height:0;
  overflow:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:color-mix(in srgb,var(--bg) 72%,#000 28%);
}
.image-viewer-stage img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  cursor:context-menu;
  user-select:none;
}
.image-viewer-hint{
  padding:9px 16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
  text-align:center;
}
.image-context-shield{
  position:fixed;
  inset:0;
  z-index:340;
}
.image-context-menu{
  position:fixed;
  z-index:341;
  width:180px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface);
  box-shadow:0 14px 38px rgba(0,0,0,.24);
}
.image-context-menu button{
  width:100%;
  height:39px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--text);
  text-align:left;
  padding:0 11px;
  font-size:12.5px;
  font-weight:650;
}
.image-context-menu button:hover{background:var(--surface2);color:var(--primary)}

@media(max-width:980px){
  .request-detail-layout{grid-template-columns:minmax(0,1fr) 220px;gap:18px}
  .detail-info-sticky{padding-left:14px}
}
@media(max-width:760px){
  .request-detail-layout{display:block}
  .detail-status-box{margin-left:0}
  .image-viewer-backdrop{padding:10px}
  .image-viewer{width:calc(100vw - 20px);height:86vh;border-radius:13px}
  .image-viewer-stage{padding:8px}
}


/* v0.10.0 customer master / detail sticky / composer action alignment */
.detail-info-panel{
  min-width:0;
  align-self:stretch;
  position:relative;
}
.detail-info-sticky{
  position:sticky;
  top:76px;
  max-height:calc(100vh - 92px);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.editoradd{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.editoradd>.secondary,
.editoradd>.filelabel{
  min-height:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  line-height:1;
}
.filelabel{vertical-align:middle}
.customer-master-toolbar{
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto;
  gap:8px;
  margin:12px 0;
}
.customer-master-table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
}
.customer-master-table{
  width:100%;
  min-width:720px;
  border-collapse:collapse;
  background:var(--surface);
}
.customer-master-table th,
.customer-master-table td{
  padding:9px 10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:12.5px;
}
.customer-master-table th{
  color:var(--muted);
  font-size:11.5px;
  font-weight:720;
  background:var(--surface2);
}
.customer-master-table tbody tr:last-child td{border-bottom:0}
.customer-master-input{width:100%;min-width:0}
.customer-master-save-state{font-size:11px;color:var(--muted);white-space:nowrap}
.customer-master-save-state.saving{color:var(--primary)}
.customer-master-save-state.ok{color:var(--done)}
.customer-master-save-state.error{color:var(--danger)}
.customer-active-toggle{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--muted);white-space:nowrap}
.customer-active-toggle input{accent-color:var(--primary)}
@media(max-width:760px){
  .detail-info-sticky{position:static;max-height:none;overflow:visible}
  .editoradd{display:grid;grid-template-columns:1fr 1fr}
  .editoradd>.secondary:first-child{grid-column:1/-1}
  .customer-master-toolbar{grid-template-columns:1fr}
}


/* v0.10.1 system create controls */
.project-create-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:12px;margin:14px 0 18px}
.project-create-panel{border:1px solid var(--line);background:var(--surface2);border-radius:12px;padding:14px}
.project-create-panel>b{display:block;margin-bottom:10px;font-size:13px}
.project-global-add{display:grid;grid-template-columns:150px minmax(140px,1fr) minmax(160px,1fr) auto;gap:8px;align-items:center}
.customer-master-create{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(220px,1fr) auto;gap:8px;margin:12px 0}
@media(max-width:900px){.project-create-grid{grid-template-columns:1fr}.project-global-add,.customer-master-create{grid-template-columns:1fr}}


/* v0.10.2 project management usability */
.project-create-grid{display:none!important}
.project-category-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 16px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
.project-category-toolbar>div:first-child{display:flex;align-items:baseline;gap:8px}
.project-category-add.compact{display:grid;grid-template-columns:minmax(180px,280px) auto;gap:8px;margin:0;padding:0;border:0;background:transparent}
.project-category-head{grid-template-columns:72px minmax(190px,340px) 1fr auto}
.project-category-actions{display:flex;gap:7px;align-items:center}
.project-add-toggle{min-height:34px;padding:0 11px}
.project-inline-create{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--primary) 4%,var(--surface))}
.project-inline-create .primary{min-width:72px}
.project-drag-handle[draggable="true"]{touch-action:none;cursor:grab}
.project-drag-handle[draggable="true"]:active{cursor:grabbing}
@media(max-width:760px){
 .project-category-toolbar{align-items:stretch;flex-direction:column}
 .project-category-add.compact,.project-inline-create{grid-template-columns:1fr}
}
/* v0.10.4 project/request type administration */
.project-inline-create.always{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:10px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line)}
.project-admin-row[draggable="true"]{cursor:default}.project-admin-row.dragging{opacity:.55}.project-drag-handle{cursor:grab;touch-action:none}.project-drag-handle:active{cursor:grabbing}.project-row-order{display:flex;gap:4px}.request-type-create{display:flex;gap:10px;margin:14px 0}.request-type-create .input{max-width:420px}.request-type-admin-list{display:grid;gap:8px}.request-type-admin-row{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
@media(max-width:800px){.project-inline-create.always{grid-template-columns:1fr}.request-type-create{display:grid}.request-type-admin-row{grid-template-columns:1fr auto}.request-type-admin-row .meta{display:none}.project-row-order{display:none}}

/* v0.10.5 project/request type administration fixes */
.project-admin-row{grid-template-columns:38px minmax(180px,1fr) minmax(180px,1fr) 72px auto}
.project-admin-row.dragging{opacity:.46;outline:1px dashed var(--primary);background:var(--primary2)}
.project-drag-handle[draggable="true"]{-webkit-user-drag:element;user-select:none;cursor:grab}
.project-drag-handle[draggable="true"]:active{cursor:grabbing}
.request-type-admin-row{grid-template-columns:72px minmax(220px,1fr) auto auto}
@media(max-width:800px){
  .request-type-admin-row{grid-template-columns:72px minmax(0,1fr) auto}
  .request-type-admin-row .meta{display:none}
}

/* v0.11.0 classification + Slack routing */
.request-classification-create{display:flex;gap:10px;margin:14px 0 18px}.request-classification-create .input{max-width:360px}
.request-classification-stack{display:grid;gap:14px}.request-classification-section{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
.request-classification-head{display:grid;grid-template-columns:72px minmax(180px,320px) 1fr auto;gap:10px;align-items:center;padding:12px 14px;background:var(--surface2);border-bottom:1px solid var(--line)}
.request-type-create.routed{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr) auto;padding:12px 14px;margin:0;border-bottom:1px solid var(--line)}
.request-classification-section .request-type-admin-list{padding:0 14px}.request-classification-section .request-type-admin-row{grid-template-columns:72px minmax(180px,1fr) minmax(220px,1fr) 72px auto}
.type-classification-stack{display:grid;gap:18px}.type-classification-group{display:grid;gap:9px}.type-classification-title{font-size:12px;font-weight:800;color:var(--muted);letter-spacing:.02em}
@media(max-width:800px){.request-classification-create,.request-type-create.routed{display:grid;grid-template-columns:1fr}.request-classification-head{grid-template-columns:72px 1fr auto}.request-classification-head .meta{display:none}.request-classification-section .request-type-admin-row{grid-template-columns:72px minmax(0,1fr);padding:10px 0}.request-classification-section .request-type-admin-row .danger{grid-column:2}.request-classification-section .request-type-admin-row .meta{display:block}}

/* v0.12.0 template Slack mention picker */
.template-setting-actions{display:flex;gap:7px;align-items:center}.template-mention-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;min-height:28px;align-items:center}.mention-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:var(--primary2);color:var(--primary);font-size:11.5px;font-weight:700}.mention-chip button{border:0;background:transparent;color:inherit;padding:0;font-size:15px;line-height:1;cursor:pointer}.mention-picker-backdrop{position:fixed;inset:0;z-index:120;background:rgba(4,10,20,.62);display:grid;place-items:center;padding:20px}.mention-picker{width:min(460px,100%);max-height:min(650px,86vh);display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.35);overflow:hidden}.mention-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line)}.mention-picker-head b,.mention-picker-head small{display:block}.mention-picker-head small{margin-top:3px;color:var(--muted);font-size:11px}.mention-picker-search{padding:12px 14px;border-bottom:1px solid var(--line)}.mention-picker-list{overflow:auto;padding:6px}.mention-user{width:100%;display:flex;align-items:center;gap:10px;border:0;background:transparent;color:var(--text);text-align:left;padding:9px 10px;border-radius:10px}.mention-user:hover{background:var(--surface2)}.mention-user img,.mention-avatar{width:32px;height:32px;border-radius:8px;flex:0 0 32px}.mention-avatar{display:grid;place-items:center;background:var(--primary2);color:var(--primary);font-weight:800}.mention-user span span,.mention-user b,.mention-user small{display:block}.mention-user b{font-size:13px}.mention-user small{margin-top:2px;color:var(--muted);font-size:10.5px}@media(max-width:760px){.template-setting-actions{width:100%;justify-content:flex-end}.template-setting-head{flex-wrap:wrap}.mention-picker-backdrop{padding:0;align-items:end}.mention-picker{width:100%;max-height:80vh;border-radius:16px 16px 0 0}}


/* v0.12.1 inline Slack mention editor */
.rich-template-wrap{position:relative}.rich-template-editor,.rich-text-editor{white-space:pre-wrap;overflow-wrap:anywhere;min-height:130px;cursor:text}.rich-template-editor:empty:before,.rich-text-editor:empty:before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}.inline-mention-chip{display:inline-flex;align-items:center;gap:5px;vertical-align:baseline;padding:2px 7px;margin:0 2px;border-radius:999px;background:var(--primary2);color:var(--primary);font-weight:750;white-space:nowrap;user-select:all}.inline-mention-chip small{font-size:9px;opacity:.65;font-weight:650}.inline-mention-menu{position:absolute;z-index:80;left:0;top:calc(100% + 5px);width:min(440px,100%);max-height:310px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:0 18px 45px rgba(0,0,0,.28)}.inline-mention-menu[hidden]{display:none}.inline-mention-option{width:100%;display:flex;align-items:center;gap:9px;border:0;background:transparent;color:var(--text);text-align:left;padding:8px;border-radius:8px}.inline-mention-option:hover,.inline-mention-option.active{background:var(--primary2);color:var(--primary)}.inline-mention-option img,.inline-mention-option .mention-avatar{width:30px;height:30px;border-radius:8px;flex:0 0 30px}.inline-mention-option span span,.inline-mention-option b,.inline-mention-option small{display:block}.inline-mention-option b{font-size:12.5px}.inline-mention-option small{margin-top:1px;color:var(--muted);font-size:10px}.inline-mention-empty{padding:12px;color:var(--muted);font-size:12px}.template-mention-help{margin-top:7px}.template-setting-actions .secondary{display:none}


/* v0.13.0 template blocks + rich title/user mentions */
.rich-request-wrap,.rich-template-wrap{position:relative}
.rich-title-editor{min-height:40px;height:auto;padding:9px 12px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;display:block}
.rich-title-editor:empty:before,.rich-template-editor:empty:before,.rich-text-editor:empty:before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.rich-title-editor .inline-mention-chip{vertical-align:middle}
.template-block-setting{padding:18px}
.template-title-section{margin-top:14px}
.template-title-section>label,.template-blocks-head>label{display:block;font-size:12px;font-weight:750;margin-bottom:7px;color:var(--text)}
.template-blocks-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px;margin-bottom:8px}
.template-block-list{display:grid;gap:10px}
.template-block-item{border:1px solid var(--line);border-radius:12px;padding:11px;background:var(--surface2)}
.template-block-order{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.template-block-order>b{font-size:12px}
.template-block-order>div{display:flex;gap:5px}
button.mini{min-height:28px;padding:0 9px;border-radius:8px;font-size:11px}
.template-block-item .rich-template-editor{background:var(--surface);min-height:92px}
.inline-mention-menu{z-index:80}
.rich-request-wrap .inline-mention-menu{top:calc(100% + 4px);left:0;right:auto;min-width:320px;max-width:min(430px,90vw)}
@media(max-width:760px){.rich-request-wrap .inline-mention-menu{min-width:0;width:min(92vw,380px)}.template-block-order{align-items:flex-start}.template-block-order>div{flex-wrap:wrap;justify-content:flex-end}}


/* v0.13.1 system tabs + rich template newline fidelity */
.system-tabs{
  position:sticky;
  top:62px;
  z-index:12;
  display:flex;
  gap:4px;
  margin:0 0 18px;
  padding:6px;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  backdrop-filter:blur(10px);
  box-shadow:0 5px 18px rgba(20,32,54,.035);
}
.system-tab{
  flex:0 0 auto;
  min-height:38px;
  padding:0 14px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  font-size:12.5px;
  font-weight:700;
  white-space:nowrap;
}
.system-tab:hover{background:var(--surface2);color:var(--text)}
.system-tab.active{background:var(--primary2);color:var(--primary)}
.system-tab-panel{min-width:0}
.system-panel-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:4px 2px 12px}
.system-panel-head h2{margin:0 0 3px;font-size:20px;letter-spacing:-.025em}
.system-panel-head .meta{margin:0}
.system-tab-panel>.card:first-of-type{margin-top:0}
.rich-template-editor{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:760px){
  .system-tabs{top:58px;margin-left:-2px;margin-right:-2px;border-radius:10px}
  .system-tab{min-height:36px;padding:0 12px;font-size:12px}
  .system-panel-head h2{font-size:18px}
}

/* v0.14.0 Slack root preview */
.slack-root-preview-card{margin:12px 0 16px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
.slack-root-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.slack-root-preview-head b{font-size:12.5px}.slack-root-preview-head span{font-size:10.5px;color:var(--muted)}
.slack-root-preview-text{padding:10px 12px;border-radius:9px;background:var(--surface);border:1px solid var(--line);font-size:13px;font-weight:750;line-height:1.5;word-break:break-word}


/* v0.14.0 Slack user-group mentions */
.inline-mention-chip.usergroup{background:color-mix(in srgb,var(--confirm) 13%,var(--surface));border-color:color-mix(in srgb,var(--confirm) 28%,var(--line));color:var(--text)}
.inline-mention-chip.usergroup small{color:var(--confirm)}
.mention-avatar.group{background:color-mix(in srgb,var(--confirm) 16%,var(--surface));color:var(--confirm);font-weight:800}
.slack-auto-group-preview{margin-top:8px;padding-top:8px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.group-id-input{min-width:230px;max-width:320px}

/* v0.15.0 Request Composer UX */
.request-composer{width:min(1080px,calc(100vw - 36px));max-height:calc(100vh - 36px)}
.composer-head{padding:16px 20px 12px;flex:0 0 auto}.composer-head h2{font-size:20px}.composer-head p{margin-top:4px}
.composer-step{display:flex;align-items:center;gap:6px;margin-top:7px;color:var(--muted);font-size:10.5px;white-space:nowrap}.composer-step b{display:grid;place-items:center;width:19px;height:19px;border-radius:999px;background:var(--primary2);color:var(--primary);font-size:10px}.composer-step b.done{background:var(--primary);color:#fff}.composer-step i{display:block;width:18px;height:1px;background:var(--line)}
.type-classification-stack{padding:14px 20px 18px!important;overflow:auto;gap:13px!important}.type-classification-group{gap:7px!important}.type-classification-title{font-size:11px!important}.typegrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.typecard{min-height:72px;padding:12px 14px;border-radius:11px;background:var(--surface2)}.typecard b{font-size:13.5px;margin-bottom:7px}.typecard small{font-size:10px}.type-route-state{display:flex!important;align-items:center;gap:5px}.type-route-state i{width:6px;height:6px;border-radius:50%;background:var(--muted)}.type-route-state.connected i{background:#3fb950}.type-route-state.missing i{background:#d29922}
.request-composer>.project-groups{padding:14px 20px 18px}.project-groups{gap:13px}.project-group h3{margin-bottom:7px;font-size:11px}.project-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.project-card{min-height:58px;padding:11px 12px}.project-card b{font-size:13px}
.composer-scroll{padding:12px 20px 16px}.composer-project-summary{padding:7px 10px;margin-bottom:8px;border-radius:9px}.composer-project-summary span{font-size:10px}.composer-project-summary b{font-size:12px}.composer-change-project{margin-left:auto;border:0;background:transparent;color:var(--primary);font-size:11px;cursor:pointer}.composer-scroll>.formrow{margin:10px 0}.customer-pair .formrow{margin:7px 0}.rich-title-editor{min-height:40px!important;padding:9px 11px!important}
.slack-root-preview-card.compact{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;margin:8px 0 12px;padding:8px 10px;border-radius:10px}.slack-root-preview-card.compact .slack-root-preview-head{display:flex;gap:6px;margin:0;white-space:nowrap}.slack-root-preview-card.compact .slack-root-preview-head b{font-size:11px}.slack-root-preview-card.compact .slack-root-preview-head span{font-size:10px}.slack-root-preview-card.compact .slack-root-preview-text{padding:7px 9px;font-size:11.5px;line-height:1.35}.slack-root-preview-card.compact .slack-auto-group-preview{grid-column:2;margin-top:-4px;font-size:10px}
.editorblock{position:relative;padding:8px;border-radius:11px}.textblock .textarea{min-height:88px;padding:10px 12px}.textblock .blocktools{position:absolute;right:14px;top:12px;margin:0;opacity:.72}.textblock .blocktools button{padding:4px 7px;font-size:11px;background:var(--surface2)}.textblock .blocktools:hover{opacity:1}.editoradd{margin-top:7px}.composer-footer{padding:10px 20px;flex:0 0 auto}
@media(max-width:900px){.typegrid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.request-composer{width:100%;max-height:96vh}.composer-step span{display:none}.type-classification-stack{padding:12px 14px 16px!important}.typegrid{grid-template-columns:1fr 1fr}.typecard{min-height:66px}.request-composer>.project-groups{padding:12px 14px 16px}.project-grid{grid-template-columns:1fr 1fr}.composer-scroll{padding:10px 14px 14px}.slack-root-preview-card.compact{grid-template-columns:1fr}.slack-root-preview-card.compact .slack-root-preview-head,.slack-root-preview-card.compact .slack-auto-group-preview{grid-column:1}.textblock .blocktools{position:static;margin-top:6px;opacity:1}}

/* v0.16.2 multi-customer + fixed composer frame */
@media(min-width:761px){
  .request-composer{width:min(1080px,calc(100vw - 36px));height:min(860px,calc(100vh - 36px));max-height:none}
  .request-composer>.type-classification-stack,.request-composer>.project-groups,.request-composer>.composer-scroll{flex:1;min-height:0;overflow:auto}
}
.selected-customer-chips{display:flex;flex-wrap:wrap;gap:7px;margin:6px 0 8px}
.selected-customer-chips:empty{display:none}
.customer-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 8px 6px 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface2);font-size:11.5px}
.customer-chip b{color:var(--primary);font-size:10.5px}.customer-chip button{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:16px;line-height:1;padding:0 2px}.customer-chip button:hover{color:var(--text)}
.type-route-state.connected{color:var(--muted)}


/* v0.16.2 composer performance / compact type cards / detail mention chips */
@media(min-width:901px){
  .typegrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
}
.typecard{min-height:54px!important;padding:10px 12px!important;align-content:center}
.typecard b{font-size:13px!important;margin-bottom:4px!important}
.typecard small{font-size:9.5px!important}
.type-route-state.connected{color:var(--muted)}
.detail-rich-text .inline-mention-chip{vertical-align:middle;margin:1px 2px}
@media(max-width:900px) and (min-width:761px){.typegrid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v0.16.2 request type density / mention hover */
.type-classification-stack{align-content:start!important;grid-auto-rows:max-content!important;gap:12px!important}
.type-classification-group{align-content:start!important;grid-auto-rows:max-content!important;gap:4px!important}
.type-classification-title{margin:0!important;line-height:1.2}
@media(min-width:901px){
  .typegrid{grid-template-columns:repeat(auto-fill,220px)!important;grid-auto-rows:64px;justify-content:start;align-content:start;gap:8px!important}
  .typecard{width:220px!important;height:64px!important;min-height:64px!important;max-height:64px!important;padding:9px 12px!important}
}
.inline-mention-chip{position:relative}
.inline-mention-chip[data-tooltip]::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%) translateY(3px);z-index:120;min-width:max-content;max-width:320px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 10px 28px rgba(0,0,0,.28);color:var(--text);font-size:11px;font-weight:500;line-height:1.35;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease,transform .12s ease}
.inline-mention-chip[data-tooltip]:hover::after{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
