:root{
  color-scheme:light;
  --ink:#182b3b;
  --muted:#586d7f;
  --paper:#f5f8fb;
  --card:#fff;
  --line:#e6edf3;
  --primary:#0878b8;
  --primary-hover:#00679f;
  --blue-soft:#e5f4fd;
  --draft-surface:#e8f4ff;
  --oa-surface:#e6f6f4;
  --red:#b13742;
  --red-soft:#ffedf0;
  --amber:#805b13;
  --amber-soft:#fff4db;
  --radius:20px;
  --shadow:0 8px 32px rgba(41,82,116,.07),0 2px 7px rgba(41,82,116,.025);
  --overlay-shadow:0 24px 80px rgba(24,54,77,.20);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif;
  font-synthesis:none;
  font-size:14px
}
*{
  box-sizing:border-box
}
html{
  min-width:320px;
  background:var(--paper)
}
body{
  margin:0;
  color:var(--ink);
  background:var(--paper);
  line-height:1.5;
  -webkit-font-smoothing:antialiased
}
button,input,select,textarea{
  font:inherit
}
button,a{
  -webkit-tap-highlight-color:transparent
}
button{
  cursor:pointer
}
a{
  color:var(--primary);
  text-underline-offset:4px
}
::selection{
  color:#133e59;
  background:#cceafd
}
:where(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--primary);
  outline-offset:4px
}
.hidden{
  display:none!important
}
.muted{
  color:var(--muted)
}
.ui-icon{
  display:inline-block;
  width:19px;
  height:19px;
  flex:0 0 auto;
  vertical-align:middle
}
.button .ui-icon{
  width:16px;
  height:16px;
  margin-right:7px
}
.brand-mark{
  display:grid;
  width:42px;
  height:42px;
  flex:0 0 auto;
  place-items:center;
  border-radius:14px;
  color:white;
  background:var(--primary);
  font-size:23px;
  font-weight:650
}
.status-dot{
  display:inline-block;
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:var(--primary)
}
/* Light navigation and calm surfaces. Accent blue signifies action and selection. */
.app-shell{
  min-height:100dvh;
  display:grid;
  grid-template-columns:180px minmax(0,1fr)
}
.sidebar{
  position:fixed;
  z-index:30;
  inset:14px auto 14px 14px;
  display:flex;
  width:156px;
  flex-direction:column;
  padding:24px 10px 16px;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#abcadd #eef5fa;
  border-radius:20px;
  color:var(--ink);
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow)
}
.brand{
  display:flex;
  flex-shrink:0;
  gap:9px;
  align-items:center;
  margin:0 2px 34px;
  color:var(--ink);
  text-decoration:none
}
.brand strong,.brand small{
  display:block
}
.brand strong{
  font-size:20px;
  font-weight:650;
  letter-spacing:.03em
}
.brand small{
  margin-top:2px;
  color:var(--muted);
  font-size:11px
}
.nav{
  position:relative;
  display:flex;
  flex:1 0 auto;
  flex-direction:column;
  min-height:0;
  gap:6px
}
.nav-indicator{
  position:absolute;
  inset:0 0 auto;
  height:44px;
  border-radius:11px;
  pointer-events:none;
  background:var(--blue-soft);
  opacity:0;
  transform:translateY(var(--nav-y,0px)) scaleY(var(--nav-scale,1));
  transform-origin:top center
}
.nav[data-ready=true] .nav-indicator{
  opacity:1;
  transition:transform 240ms cubic-bezier(.16,1,.3,1),opacity 150ms
}
.nav a{
  position:relative;
  z-index:1;
  display:flex;
  flex-shrink:0;
  min-height:44px;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  border-radius:13px;
  color:#506477;
  font-weight:550;
  text-decoration:none;
  white-space:nowrap;
  transition:background 180ms,color 180ms
}
.nav-label{
  display:flex;
  align-items:center;
  gap:11px
}
.nav a:hover{
  background:#f0f7fc;
  color:var(--primary)
}
.nav a.active{
  color:#09699f;
  background:transparent
}
.case-subnav{
  display:grid;
  flex-shrink:0;
  gap:4px
}
.case-subnav[hidden]{
  display:none
}
.case-subnav a{
  min-height:36px;
  padding-left:42px;
  font-size:12px
}
.nav-sync{
  margin-top:auto
}
.sidebar-note{
  display:flex;
  flex-shrink:0;
  gap:10px;
  align-items:flex-start;
  margin:16px 7px 9px;
  padding:20px 0 12px;
  border-top:1px solid var(--line)
}
.sidebar-note .status-dot{
  margin-top:6px
}
.sidebar-note strong,.sidebar-note small{
  display:block
}
.sidebar-note strong{
  font-size:12px;
  font-weight:550
}
.sidebar-note small{
  margin-top:4px;
  color:var(--muted);
  font-size:11px
}
.logout-button{
  flex-shrink:0;
  min-height:40px;
  padding:9px 12px;
  border:0;
  border-radius:11px;
  color:var(--muted);
  background:transparent;
  text-align:left
}
.logout-button:hover{
  color:var(--primary);
  background:#f0f7fc
}
.workspace{
  grid-column:2;
  min-width:0
}
.topbar{
  position:sticky;
  z-index:20;
  top:0;
  display:flex;
  min-height:92px;
  gap:24px;
  align-items:center;
  padding:20px 36px;
  background:rgba(245,248,251,.88);
  backdrop-filter:blur(16px)
}
.topbar-heading{
  min-width:0
}
.topbar h1{
  margin:0;
  font-size:25px;
  font-weight:650;
  letter-spacing:-.02em
}
.topbar-actions{
  display:flex;
  gap:9px;
  align-items:center;
  margin-left:auto
}
.date-chip{
  margin-right:12px;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap
}
.page-content{
  max-width:1640px;
  margin-inline:auto;
  padding:20px 36px 72px
}
.page-content:focus{
  outline:none
}
.app-shell:is([data-page=dashboard],[data-page=sync]) .workspace{
  display:flex;
  height:100dvh;
  min-height:0;
  flex-direction:column
}
.app-shell:is([data-page=dashboard],[data-page=sync]) .topbar{
  flex-shrink:0
}
.page-content:is([data-page=dashboard],[data-page=sync]){
  width:100%;
  max-width:none;
  min-height:0;
  flex:1;
  margin:0;
  padding:8px 24px 24px
}
.page-content[data-page=dashboard]{
  display:flex;
  flex-direction:column
}
.page-content[data-page=sync]{
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:16px;
  overflow:hidden
}
.overview-intro{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-shrink:0;
  margin-bottom:18px;
  color:var(--muted);
  font-size:12px
}
.overview-intro p{
  margin:0;
  font-size:14px
}
.button{
  display:inline-flex;
  min-height:41px;
  align-items:center;
  justify-content:center;
  padding:0 17px;
  border:1px solid transparent;
  border-radius:12px;
  font-size:13px;
  font-weight:550;
  text-decoration:none;
  white-space:nowrap;
  transition:background 180ms,box-shadow 180ms,transform 180ms
}
.button:active{
  transform:translateY(1px)
}
.button.primary{
  color:#fff;
  background:var(--primary)
}
.button.primary:hover{
  background:var(--primary-hover);
  box-shadow:0 4px 12px rgba(8,120,184,.18)
}
.button.subtle{
  color:#395367;
  background:#fff;
  border-color:#dbe6ee
}
.button.subtle:hover{
  background:#f0f8fe
}
.button.secondary{
  color:#09699f;
  background:var(--blue-soft)
}
.button.secondary:hover{
  background:#d5ecfc
}
.button.danger{
  color:var(--red);
  background:var(--red-soft)
}
.button.small{
  min-height:33px;
  padding:0 11px;
  font-size:12px;
  border-radius:10px
}
.button.wide{
  width:100%
}
.button:disabled{
  cursor:not-allowed;
  opacity:.5;
  box-shadow:none
}
.icon-button{
  display:grid;
  width:38px;
  height:38px;
  flex:0 0 auto;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  color:var(--muted);
  background:transparent
}
.icon-button:hover{
  color:var(--primary);
  background:#eaf4fb
}
.menu-button{
  display:none
}
.text-button,.link-button{
  min-height:32px;
  padding:5px 8px;
  border:0;
  color:var(--primary);
  background:transparent;
  font-size:12px;
  text-decoration:none
}
.text-button:hover,.link-button:hover{
  text-decoration:underline
}
.welcome-strip{
  display:flex;
  gap:24px;
  align-items:center;
  justify-content:space-between;
  margin:6px 0 29px
}
.welcome-strip h2{
  margin:0 0 8px;
  font-size:30px;
  font-weight:650;
  letter-spacing:-.03em
}
.welcome-strip p{
  margin:0;
  color:var(--muted);
  font-size:14px
}
.verification-badge{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:9px 14px;
  border-radius:12px;
  color:#356680;
  background:#eaf5fc;
  font-size:12px;
  text-decoration:none
}
.verification-badge strong{
  font-size:19px;
  font-variant-numeric:tabular-nums
}
.verification-badge:hover{
  background:#dceffc
}
.stat-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin-bottom:31px
}
.stat-card{
  position:relative;
  display:grid;
  gap:5px;
  min-width:0;
  padding:20px 22px;
  border-radius:18px;
  color:inherit;
  background:var(--card);
  box-shadow:var(--shadow);
  text-decoration:none;
  transition:transform 180ms,box-shadow 180ms
}
a.stat-card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 34px rgba(41,82,116,.12)
}
.stat-label{
  color:#465f74;
  font-size:13px
}
.stat-value{
  color:#164465;
  font-size:36px;
  font-weight:600;
  letter-spacing:-.03em;
  line-height:1.35;
  font-variant-numeric:tabular-nums
}
.stat-card.attention .stat-value{
  color:var(--red)
}
.stat-caption{
  color:var(--muted);
  font-size:11px
}
.workgroup-columns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
  align-items:start
}
.workgroup-panel{
  min-width:0;
  padding:24px;
  border-radius:var(--radius)
}
.workgroup-panel[data-group=DRAFT]{
  color:#1c4867;
  background:var(--draft-surface)
}
.workgroup-panel[data-group=OA]{
  color:#205e60;
  background:var(--oa-surface)
}
.workgroup-panel[data-group=DRAFT] .overview-group-header p{
  color:#456679
}
.workgroup-panel[data-group=OA] .overview-group-header p{
  color:#466f70
}
.overview-group-header{
  display:flex;
  min-height:84px;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:16px
}
.overview-group-header h2{
  margin:0;
  font-size:22px;
  font-weight:650
}
.overview-group-header p{
  max-width:37ch;
  margin:7px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.7
}
.overview-group-header>a,.overview-group-footer>a{
  flex-shrink:0;
  padding-block:6px;
  color:var(--primary);
  font-size:12px;
  text-underline-offset:4px
}
.group-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px
}
.group-stats .stat-card{
  padding:16px 18px;
  border-radius:16px
}
.group-stats .stat-value{
  font-size:36px
}
.dashboard-workgroup[data-group=OA] .stat-card:last-child{
  grid-column:1 / -1
}
.overview-group-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:20px
}
.dashboard-columns{
  flex:1;
  min-height:0;
  align-items:stretch
}
.dashboard-workgroup{
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#abcadd transparent
}
.dashboard-workgroup .overview-group-header{
  min-height:0;
  flex-shrink:0;
  align-items:center;
  margin-bottom:24px
}
.overview-total{
  display:grid;
  gap:2px;
  text-align:right;
  text-decoration:none
}
.overview-total strong{
  color:inherit;
  font-size:42px;
  font-weight:600;
  line-height:1.1;
  font-variant-numeric:tabular-nums
}
.overview-total span{
  font-size:11px;
  color:var(--muted)
}
.overview-focus{
  display:grid;
  flex-shrink:0;
  gap:7px;
  padding:0 0 24px;
  color:inherit;
  text-decoration:none
}
.overview-focus-label{
  font-size:14px;
  font-weight:600
}
.overview-focus>strong{
  display:flex;
  gap:12px;
  align-items:baseline;
  font-size:58px;
  font-weight:600;
  letter-spacing:-.03em;
  line-height:1.15;
  font-variant-numeric:tabular-nums
}
.overview-focus strong small{
  font-size:22px;
  font-weight:500;
  letter-spacing:0
}
.overview-focus>span:last-child{
  color:var(--muted);
  font-size:12px
}
.overview-focus.attention>strong{
  color:var(--red)
}
.overview-status-list{
  display:grid;
  gap:4px;
  flex-shrink:0;
  padding-block:14px;
  border-block:1px solid rgba(41,82,116,.13)
}
.overview-status-row{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  min-height:68px;
  padding:8px 10px;
  border-radius:10px;
  color:inherit;
  text-decoration:none;
  transition:background 150ms
}
.overview-status-row:hover,.overview-focus:hover{
  background:rgba(255,255,255,.35)
}
.overview-status-row>span:first-child strong,.overview-status-row>span:first-child small{
  display:block
}
.overview-status-row>span:first-child strong{
  font-size:16px;
  font-weight:600
}
.overview-status-row>span:first-child small{
  margin-top:5px;
  font-size:11px;
  line-height:1.6;
  color:var(--muted)
}
.overview-row-count{
  flex-shrink:0;
  font-size:29px;
  font-weight:600;
  font-variant-numeric:tabular-nums
}
.overview-row-count small{
  margin-left:6px;
  font-size:12px;
  font-weight:400
}
.overview-status-row.late .overview-row-count{
  color:var(--red)
}
.overview-status-row.soon .overview-row-count{
  color:var(--amber)
}
.overview-week{
  margin-top:auto;
  padding-top:24px;
  flex-shrink:0
}
.overview-week header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px
}
.overview-week h3{
  margin:0;
  font-size:15px;
  font-weight:600
}
.overview-week header span{
  color:var(--muted);
  font-size:11px
}
.overview-week-days{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:6px
}
.overview-day{
  display:grid;
  gap:9px;
  min-width:0;
  padding:11px 3px;
  border-radius:10px;
  text-align:center;
  color:var(--muted);
  background:rgba(255,255,255,.35)
}
.overview-day time{
  font-size:11px;
  white-space:nowrap
}
.overview-day strong{
  font-size:22px;
  font-weight:600;
  font-variant-numeric:tabular-nums
}
.overview-day strong small{
  margin-left:2px;
  font-size:10px;
  font-weight:400
}
.overview-day.has-deadlines{
  color:#1c4867;
  background:white
}
.overview-week p,.overview-rule{
  color:var(--muted);
  font-size:11px;
  line-height:1.7
}
.overview-week p{
  margin:12px 0 0
}
.overview-rule{
  margin:16px 0 0;
  flex-shrink:0
}
.dashboard-workgroup .overview-group-footer{
  margin-top:8px;
  flex-shrink:0
}
.case-group{
  margin:23px 0 34px
}
.group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:15px
}
.group-header h2{
  margin:0;
  font-size:20px;
  font-weight:650
}
.group-header h2 span{
  margin-left:10px;
  padding:3px 8px;
  border-radius:7px;
  color:#367293;
  background:var(--blue-soft);
  font-size:12px;
  font-variant-numeric:tabular-nums;
  vertical-align:middle
}
.group-header p{
  margin:6px 0 0;
  color:var(--muted);
  font-size:12px
}
.section-intro{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  margin:5px 0 23px
}
.section-intro h2{
  margin:0;
  font-size:25px;
  font-weight:600;
  letter-spacing:-.02em
}
.section-intro p{
  max-width:68ch;
  margin:9px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.8
}
.case-page-intro{
  align-items:flex-start
}
.case-search-tools{
  position:relative;
  flex-shrink:0;
  margin-left:auto
}
.case-search-panel{
  position:absolute;
  z-index:10;
  top:calc(100% + 12px);
  right:0;
  width:min(360px,calc(100vw - 36px));
  padding:20px;
  border-radius:16px;
  color:var(--ink);
  background:var(--card);
  box-shadow:var(--overlay-shadow)
}
.case-search-panel[hidden]{
  display:none
}
.case-search-panel>label{
  display:block;
  margin-bottom:10px;
  color:var(--muted);
  font-size:12px
}
.case-search-panel>.text-button{
  display:block;
  min-height:36px;
  margin:8px 0 0 auto
}
.search-box{
  position:relative
}
.search-icon{
  position:absolute;
  left:16px;
  top:14px;
  width:18px;
  height:18px;
  color:#667c8f;
  pointer-events:none
}
.search-box input{
  padding-left:44px;
  background:#fff
}
.filter-line{
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom:23px;
  color:var(--muted);
  font-size:12px
}
.case-filters{
  flex-wrap:wrap
}
.case-filters #case-status{
  width:130px
}
.case-results-group{
  margin-top:0
}
.filter-line label{
  display:flex;
  align-items:center;
  gap:10px
}
.filter-line select{
  min-height:36px;
  width:190px;
  border-radius:10px;
  background:white;
  font-weight:400;
  font-size:12px
}
#case-filter-count{
  margin-left:auto
}
.table-wrap{
  overflow-x:auto;
  border-radius:18px;
  background:var(--card);
  box-shadow:var(--shadow);
  scrollbar-width:thin;
  scrollbar-color:#abcadd #eef5fa
}
table{
  width:100%;
  min-width:1200px;
  border-collapse:collapse
}
th{
  height:46px;
  padding:0 19px;
  color:#52697c;
  background:#fafdff;
  border-bottom:1px solid var(--line);
  font-size:12px;
  font-weight:500;
  text-align:left;
  white-space:nowrap
}
th:first-child{
  width:205px
}
th:nth-child(2){
  width:24%
}
th:nth-child(3){
  min-width:250px;
  width:28%
}
th:nth-child(4){
  min-width:118px
}
th:nth-child(5){
  min-width:90px
}
th:nth-child(6){
  min-width:150px
}
td{
  padding:19px;
  border-bottom:1px solid #eff3f6;
  color:#486175;
  font-size:13px;
  vertical-align:middle;
  line-height:1.6
}
tr:last-child td{
  border-bottom:0
}
tr[data-open-case]{
  cursor:pointer;
  transition:background 150ms
}
tr[data-open-case]:hover{
  background:#f2f9fe
}
tr[data-open-case]:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:-2px;
  background:#edf7fe
}
.case-reference-line,.case-title>.case-reference-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px
}
.case-type-label,.case-urgent-label{
  display:inline-flex;
  flex-shrink:0;
  align-items:center;
  padding:2px 7px;
  border-radius:7px;
  font-size:12px;
  font-weight:650;
  line-height:1.5;
  white-space:nowrap
}
.case-type-label{color:#205e60;background:var(--oa-surface)}
.case-urgent-label{color:var(--red);background:var(--red-soft)}
.case-title strong,.case-title>span{
  display:block
}
.case-title strong{
  color:#1c4867;
  font-size:19px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.015em
}
.case-title>span:not(.case-reference-line){
  max-width:39ch;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
  overflow-wrap:anywhere
}
.deadline-cell{
  min-width:190px
}
.work-date{
  display:block
}
.case-remarks{
  max-width:380px
}
.remark-entry small,.remark-entry span{
  display:block
}
.remark-entry small{
  color:#58778d;
  font-size:10px;
  margin-bottom:3px
}
.remark-entry span{
  color:#405e73;
  font-size:12px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.remark-entry+.remark-entry{
  margin-top:10px
}
.work-date strong,.work-date b,.work-date small{
  display:block
}
.work-date strong{
  color:#1c4867;
  font-size:21px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  white-space:nowrap
}
.work-clock{
  display:flex;
  gap:5px 10px;
  align-items:baseline;
  flex-wrap:wrap
}
.work-clock .limit-note{
  max-width:26ch;
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  line-height:1.6
}
.work-date time,.work-absolute>span{
  white-space:nowrap
}
.deadline-card-time{
  display:grid;
  gap:6px
}
.deadline-card-time .badge{
  justify-self:start;
  min-height:30px;
  padding:2px 6px;
  font-size:21px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.35
}
.deadline-card-time small{
  color:var(--muted);
  font-size:11px
}
.work-date .work-absolute{
  margin-top:6px;
  color:var(--muted);
  font-size:11px
}
.waiting-label{
  margin-bottom:6px;
  background:var(--blue-soft);
  color:#09699f
}
.work-date b{
  margin-top:3px;
  color:#0873ad;
  font-size:12px;
  font-weight:550;
  font-variant-numeric:tabular-nums
}
.work-date small{
  max-width:31ch;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  line-height:1.5
}
.work-date.late strong,.work-date.late b{
  color:var(--red)
}
.work-date.soon strong,.work-date.soon b,.work-date .target-missed{
  color:var(--amber)
}
.work-date.waiting strong,.work-date.missing strong{
  font-size:16px;
  color:#51718b
}
.stage-chip{
  display:inline-block;
  padding:4px 9px;
  border-radius:8px;
  color:#546c7f;
  background:#f2f6f9;
  font-size:11px;
  white-space:nowrap
}
.stage-chip.waiting{
  color:#336b8b;
  background:var(--blue-soft)
}
.badge{
  display:inline-flex;
  min-height:24px;
  align-items:center;
  padding:2px 9px;
  border-radius:7px;
  color:#266586;
  background:var(--blue-soft);
  font-size:10px;
  font-weight:500;
  white-space:nowrap
}
.badge.red{
  color:var(--red);
  background:var(--red-soft)
}
.badge.amber{
  color:var(--amber);
  background:var(--amber-soft)
}
.badge.neutral{
  color:#536d81;
  background:#edf3f7
}
.deadline-board{
  display:grid;
  grid-template-columns:1fr;
  gap:24px
}
.deadline-column{
  min-width:0;
  padding:0
}
.deadline-column header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 0 12px
}
.deadline-column h3{
  margin:0;
  font-size:16px;
  font-weight:600
}
.deadline-column[data-tone=red] h3{
  color:var(--red)
}
.deadline-column[data-tone=amber] h3{
  color:var(--amber)
}
.deadline-cards{
  display:grid;
  grid-template-columns:1fr;
  gap:8px
}
.deadline-cards>.empty-state{
  grid-column:1 / -1
}
.count{
  min-width:24px;
  text-align:center;
  color:#546c7f;
  font-size:11px
}
.deadline-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  min-width:0;
  padding:0;
  border-radius:14px;
  background:white
}
.deadline-card .badge{
  margin-bottom:0
}
.deadline-card-time{
  margin-bottom:0;
  align-content:center
}
.deadline-card-open{
  display:grid;
  grid-template-columns:125px minmax(0,1fr);
  gap:14px;
  align-items:center;
  min-width:0;
  width:100%;
  padding:13px 14px;
  border:0;
  border-radius:14px;
  text-align:left;
  color:var(--ink);
  background:transparent
}
.deadline-card-identity{
  display:grid;
  min-width:0;
  gap:4px
}
.deadline-case-ref{
  color:#1c4867;
  font-size:20px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere
}
.deadline-case-name{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  font-size:14px;
  color:#3f5f76;
  line-height:1.5;
  overflow-wrap:anywhere
}
.deadline-kind{
  overflow:hidden;
  color:var(--muted);
  font-size:10px;
  white-space:nowrap;
  text-overflow:ellipsis
}
.deadline-card footer{
  padding-right:10px
}
.deadline-card footer .text-button{
  min-height:36px;
  padding:6px;
  font-size:11px
}
.deadline-card:hover,.external-task:hover{
  background:#fafdff
}
.deadline-card-open:focus-visible,.external-task-open:focus-visible{
  outline-offset:-3px
}
.sync-toolbar{
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  border-radius:16px;
  background:white;
  box-shadow:var(--shadow)
}
.sync-toolbar-copy{
  min-width:0
}
.sync-toolbar-copy h2{
  margin:0;
  font-size:18px;
  font-weight:600;
  color:#1c4867
}
.sync-toolbar-copy p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:12px
}
.connector-link{
  display:inline-block;
  margin-top:5px;
  font-size:11px;
  text-decoration:none
}
.sync-toolbar-actions{
  display:grid;
  gap:4px;
  flex-shrink:0
}
.sync-primary-actions,.sync-account-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap
}
.sync-account-actions .text-button{
  min-height:28px;
  font-size:11px;
  padding-block:3px
}
.sync-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  min-height:0
}
.sync-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  padding:18px;
  border-radius:20px;
  background:var(--draft-surface)
}
.sync-card[data-group=OA]{
  background:var(--oa-surface)
}
.sync-card-head{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-shrink:0;
  padding-bottom:14px
}
.sync-card-head h3 small{
  margin-left:10px;
  color:var(--muted);
  font-size:12px;
  font-weight:400;
  font-variant-numeric:tabular-nums
}
.sync-card-head h3{
  margin:0;
  color:#244c68;
  font-size:20px;
  font-weight:600
}
.sync-card-head p{
  margin:6px 0 0;
  color:var(--muted);
  font-size:12px
}
.external-task{
  margin-bottom:10px;
  overflow:hidden;
  border-radius:14px;
  color:var(--ink);
  background:white;
  transition:background 150ms
}
.sync-task-list{
  min-height:0;
  flex:1;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#abcadd transparent;
  padding:2px 4px 0 0
}
.external-task-open{
  display:block;
  width:100%;
  padding:16px;
  border:0;
  border-radius:14px;
  color:inherit;
  background:transparent;
  text-align:left
}
.task-priority{
  display:grid;
  grid-template-columns:minmax(135px,.65fr) minmax(0,1fr);
  gap:16px;
  align-items:start
}
.task-identity{
  display:grid;
  min-width:0;
  gap:5px
}
.task-identity .primary-ref{
  color:#1c4867;
  font-size:22px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere
}
.task-case-name{
  font-size:14px;
  color:#3f5f76;
  line-height:1.6;
  overflow-wrap:anywhere
}
.task-priority .work-date strong{
  font-size:21px
}
.task-context{
  display:flex;
  flex-wrap:wrap;
  gap:4px 10px;
  margin-top:3px;
  font-size:11px;
  line-height:1.6;
  color:var(--muted)
}
.task-context>span:first-child{
  color:#3f5f76;
  font-weight:550
}
.task-note-preview{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  margin-top:12px;
  padding:8px 10px;
  border-radius:8px;
  color:#4c7088;
  background:#f0f8fd;
  font-size:11px;
  line-height:1.7;
  overflow-wrap:anywhere
}
.source-dates{
  display:flex;
  flex-wrap:wrap;
  gap:5px 14px;
  margin-bottom:14px;
  color:var(--muted);
  font-size:11px;
  line-height:1.7
}
.node-note{
  width:100%;
  padding:9px 11px;
  border-radius:9px;
  color:#4c7088;
  background:#f0f8fd
}
.external-task footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:13px;
  padding:0 16px 10px
}
label{
  display:grid;
  gap:8px;
  color:#405e73;
  font-size:12px;
  font-weight:550
}
input,select,textarea{
  width:100%;
  border:1px solid #d4e1eb;
  border-radius:12px;
  outline:none;
  color:var(--ink);
  background:#fff;
  caret-color:var(--primary);
  transition:border-color 180ms,box-shadow 180ms
}
input,select{
  min-height:46px;
  padding:0 13px
}
textarea{
  padding:12px 13px;
  resize:vertical;
  line-height:1.7
}
input::placeholder,textarea::placeholder{
  color:#607589;
  opacity:1
}
input:focus,select:focus,textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(8,120,184,.10)
}
.dialog{
  width:min(760px,calc(100vw - 40px));
  max-height:calc(100dvh - 40px);
  padding:0;
  border:0;
  border-radius:25px;
  color:var(--ink);
  background:white;
  box-shadow:var(--overlay-shadow)
}
.dialog::backdrop{
  background:rgba(32,54,71,.28);
  backdrop-filter:blur(7px)
}
.dialog form>header,.detail-header{
  display:flex;
  gap:20px;
  align-items:center;
  justify-content:space-between;
  padding:25px 28px;
  border-bottom:1px solid var(--line)
}
.dialog h2{
  margin:0;
  font-size:23px;
  font-weight:600;
  line-height:1.5
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  padding:27px 28px
}
.span-2{
  grid-column:span 2
}
.dialog form>footer{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding:20px 28px 26px
}
.safety-note{
  display:flex;
  gap:12px;
  margin:0 28px;
  padding:13px 15px;
  border-radius:12px;
  color:#426780;
  background:#edf7fd;
  font-size:11px;
  line-height:1.8
}
.safety-note strong{
  white-space:nowrap;
  font-weight:600
}
.auto-check-hint{
  align-self:end;
  color:var(--muted);
  font-size:11px
}
.detail-dialog{
  width:min(900px,calc(100vw - 40px))
}
.detail-actions{
  display:flex;
  align-items:center;
  gap:8px
}
.detail-header h2{
  max-width:630px;
  font-size:17px;
  font-weight:500;
  color:#546d80;
  overflow-wrap:anywhere
}
.case-reference{
  margin:0 0 5px;
  color:#1c4867;
  font-size:26px;
  font-weight:650;
  letter-spacing:-.02em;
  font-variant-numeric:tabular-nums
}
.detail-body{
  padding:26px 28px
}
.detail-work-plan{
  display:flex;
  align-items:center;
  gap:36px;
  padding:19px 22px;
  margin-bottom:25px;
  border-radius:17px;
  background:#f0f8fe
}
.detail-work-plan>div:last-child{
  color:#496c86;
  font-size:12px
}
.detail-work-plan p{
  margin:4px 0 0;
  font-size:11px
}
.detail-meta{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:13px;
  margin-bottom:25px
}
.meta-box{
  min-width:0
}
.meta-box small,.meta-box strong{
  display:block
}
.meta-box small{
  margin-bottom:7px;
  color:var(--muted);
  font-size:11px
}
.meta-box strong{
  color:#3f5a70;
  font-size:12px;
  font-weight:500;
  overflow-wrap:anywhere
}
.detail-section{
  margin-top:29px
}
.detail-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px
}
.detail-section-title h3{
  margin:0;
  font-size:16px;
  font-weight:600
}
.detail-notes{
  padding:15px 17px;
  border-radius:13px;
  color:#506c80;
  background:#f4f8fb;
  font-size:12px;
  line-height:1.9;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.detail-deadline,.file-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:17px;
  align-items:center;
  padding:15px 0;
  border-bottom:1px solid var(--line)
}
.detail-deadline strong,.file-row strong{
  display:block;
  color:#3f5a70;
  font-size:12px;
  font-weight:550;
  overflow-wrap:anywhere
}
.detail-deadline span,.file-row span{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:11px
}
.file-upload{
  display:flex;
  gap:10px;
  align-items:end;
  margin-bottom:8px;
  padding:15px;
  border:1px dashed #bed8e9;
  border-radius:15px;
  background:#fafdff
}
.file-upload label:first-child{
  min-width:0;
  flex:1
}
.file-upload select{
  width:145px
}
.file-upload input[type=file]{
  padding:9px
}
.empty-state{
  display:grid;
  min-height:170px;
  place-items:center;
  padding:28px;
  color:var(--muted);
  text-align:center
}
.empty-state strong{
  display:block;
  margin-bottom:7px;
  color:#3d5c73;
  font-size:14px;
  font-weight:550
}
.empty-state span{
  display:block;
  font-size:12px;
  line-height:1.8
}
.toast{
  position:fixed;
  z-index:80;
  right:25px;
  bottom:25px;
  max-width:min(440px,calc(100vw - 32px));
  padding:14px 19px;
  border-radius:15px;
  color:white;
  background:#1d6089;
  box-shadow:var(--overlay-shadow);
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity 200ms,transform 200ms
}
.toast.show{
  opacity:1;
  transform:translateY(0)
}
.toast.error{
  background:var(--red)
}
.login-view{
  min-height:100dvh;
  display:grid;
  grid-template-columns:minmax(360px,1.1fr) minmax(360px,.9fr);
  background:#fff
}
.login-brand{
  position:relative;
  display:flex;
  min-height:100dvh;
  flex-direction:column;
  justify-content:center;
  padding:10%;
  background:#eaf6fd
}
.brand-mark.large{
  position:absolute;
  top:52px;
  left:10%;
  width:50px;
  height:50px;
  font-size:27px
}
.login-brand h1{
  max-width:600px;
  margin:0 0 25px;
  color:#1c4f70;
  font-size:52px;
  line-height:1.3;
  font-weight:650;
  letter-spacing:-.03em
}
.login-copy{
  max-width:52ch;
  margin:0;
  color:#52718a;
  font-size:15px;
  line-height:2
}
.login-footnote{
  position:absolute;
  bottom:45px;
  display:flex;
  gap:9px;
  align-items:center;
  color:#52718a;
  font-size:12px
}
.login-panel{
  display:grid;
  min-height:100dvh;
  place-items:center;
  padding:40px
}
.login-form{
  width:min(365px,100%)
}
.login-form h2{
  margin:0;
  font-size:30px;
  font-weight:600;
  letter-spacing:-.02em
}
.login-form>.muted{
  margin:10px 0 29px;
  font-size:13px
}
.login-form label{
  margin-top:19px
}
.login-form .button{
  min-height:46px;
  margin-top:26px
}
.form-error{
  min-height:22px;
  margin-top:14px;
  color:var(--red);
  font-size:12px
}
@media(max-width:1200px){
  .overview-week-days{
    grid-template-columns:repeat(4,minmax(0,1fr))
  }
  .deadline-cards{
    grid-template-columns:1fr
  }
  .date-chip{
    display:none
  }
  .stat-grid{
    gap:11px
  }
  .stat-card{
    padding:18px
  }
  .task-priority{
    grid-template-columns:1fr;
    gap:10px
  }
}
@media(max-width:1000px){
  .app-shell{
    grid-template-columns:180px minmax(0,1fr)
  }
  .sidebar{
    width:156px;
    padding-inline:10px
  }
  .topbar,.page-content{
    padding-inline:24px
  }
  .stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .welcome-strip{
    align-items:flex-start;
    flex-direction:column;
    gap:17px
  }
  .sync-toolbar{
    gap:12px;
    padding:14px 16px
  }
  .sync-primary-actions .button{
    padding-inline:12px
  }
}
@media(max-width:900px){
  .workgroup-panel{
    padding:18px
  }
  .overview-group-header{
    flex-wrap:wrap
  }
}
@media(max-width:760px){
  .app-shell[data-page=dashboard] .workspace{
    height:auto;
    min-height:100dvh
  }
  .page-content:is([data-page=dashboard],[data-page=sync]){
    padding:8px 18px 18px
  }
  .overview-intro{
    align-items:flex-start;
    flex-direction:column;
    gap:6px
  }
  .dashboard-workgroup{
    overflow:visible
  }
  .sync-toolbar{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px 14px
  }
  .sync-toolbar-copy h2{
    font-size:16px
  }
  .sync-toolbar-copy p,.connector-link{
    font-size:10px
  }
  .sync-primary-actions{
    justify-content:flex-start
  }
  .sync-primary-actions .button{
    min-height:36px;
    font-size:12px
  }
  .sync-account-actions{
    justify-content:flex-start
  }
  .sync-grid{
    grid-template-columns:1fr;
    grid-template-rows:repeat(2,minmax(0,1fr));
    gap:12px
  }
  .sync-card{
    padding:12px
  }
  .sync-card-head{
    padding-bottom:8px
  }
  .sync-card-head h3{
    font-size:17px
  }
  .sync-card-head p{
    margin-top:3px;
    font-size:10px
  }
  .deadline-card-open{
    grid-template-columns:110px minmax(0,1fr);
    gap:10px;
    padding:12px
  }
  .deadline-card-time .badge{
    font-size:19px
  }
  .deadline-case-ref{
    font-size:18px
  }
  .deadline-case-name{
    font-size:12px
  }
  .workgroup-columns{
    grid-template-columns:1fr;
    gap:24px
  }
  .overview-group-header{
    min-height:0
  }
  .app-shell{
    display:block
  }
  .sidebar{
    width:min(240px,85vw);
    transform:translateX(-110%);
    transition:transform 200ms;
    box-shadow:var(--overlay-shadow)
  }
  .sidebar.open{
    transform:translateX(0)
  }
  .workspace{
    width:100%
  }
  .menu-button{
    display:grid
  }
  .topbar{
    min-height:auto;
    gap:11px;
    flex-wrap:wrap;
    padding:16px 18px
  }
  .topbar-heading{
    flex:1
  }
  .topbar h1{
    font-size:22px
  }
  .topbar-actions{
    width:100%;
    margin:5px 0 0
  }
  .topbar-actions .button{
    flex:1
  }
  .page-content{
    padding:18px 18px 55px
  }
  .welcome-strip{
    margin-top:0;
    margin-bottom:23px
  }
  .welcome-strip h2{
    font-size:25px
  }
  .welcome-strip p{
    font-size:12px
  }
  .stat-card{
    padding:16px
  }
  .stat-value{
    font-size:31px
  }
  .stat-label{
    font-size:12px
  }
  .stat-caption{
    font-size:10px
  }
  .filter-line{
    flex-wrap:wrap
  }
  .filter-line label{
    flex:1
  }
  .filter-line select{
    flex:1;
    width:auto
  }
  #case-filter-count{
    margin-left:0
  }
  .section-intro{
    flex-direction:column;
    align-items:flex-start;
    gap:13px
  }
  .section-intro h2{
    font-size:22px
  }
  .case-page-intro{
    flex-direction:row;
    align-items:flex-start
  }
  .case-page-intro p{
    font-size:12px
  }
  .case-page-intro .button{
    padding-inline:12px
  }
  .group-header h2{
    font-size:18px
  }
  .group-header p{
    max-width:44ch;
    font-size:11px
  }
  .task-priority{
    grid-template-columns:150px minmax(0,1fr)
  }
  .dialog{
    width:calc(100vw - 22px);
    max-height:calc(100dvh - 22px);
    border-radius:21px
  }
  .dialog form>header,.detail-header{
    padding:20px
  }
  .form-grid{
    grid-template-columns:1fr;
    padding:20px
  }
  .span-2{
    grid-column:auto
  }
  .dialog form>footer{
    padding:18px 20px 22px
  }
  .safety-note{
    flex-direction:column;
    gap:5px;
    margin-inline:20px
  }
  .detail-body{
    padding:21px
  }
  .detail-meta{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:19px
  }
  .detail-work-plan{
    gap:18px;
    align-items:flex-start;
    flex-direction:column
  }
  .detail-header{
    align-items:flex-start
  }
  .detail-header .detail-actions{
    flex-direction:column-reverse;
    gap:4px
  }
  .case-reference{
    font-size:22px
  }
  .detail-header h2{
    font-size:13px
  }
  .file-upload{
    flex-direction:column;
    align-items:stretch
  }
  .file-upload select{
    width:100%
  }
  .file-row,.detail-deadline{
    grid-template-columns:minmax(0,1fr);
    gap:8px
  }
  .login-view{
    grid-template-columns:1fr
  }
  .login-brand{
    display:none
  }
  .login-panel{
    padding:28px
  }
}
@media(max-width:390px){
  .task-priority{
    grid-template-columns:1fr
  }
  .stat-card{
    padding:14px
  }
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}
@media(prefers-reduced-transparency:reduce){
  .sidebar{
    background:white;
    backdrop-filter:none
  }
  .topbar{
    background:var(--paper);
    backdrop-filter:none
  }
  .dialog::backdrop{
    backdrop-filter:none
  }
}

.login-panel{
  position:relative
}
.icp-footer{
  position:absolute;
  bottom:24px;
  left:0;
  right:0;
  text-align:center;
  font-size:12px;
  line-height:1.6;
  color:#52718a
}
.icp-footer a{
  color:#52718a;
  text-decoration:none;
  transition:color .15s ease
}
.icp-footer a:hover{
  color:#0878b8;
  text-decoration:underline
}
