/* ?먥븧 TOKENS ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
:root {
  --bg:      #111214;
  --bg2:     #18191d;
  --bg3:     #1e1f24;
  --surf:    #242529;
  --surf2:   #2a2b30;
  --hover:   #2e2f35;
  --bd:      rgba(255,255,255,.07);
  --bd2:     rgba(255,255,255,.04);
  --text:    #f0f1f3;
  --text2:   #a0a3b0;
  --text3:   #5a5d6b;
  --accent:  #6c6af7;
  --adim:    rgba(108,106,247,.13);
  --green:   #3ecf8e;
  --amber:   #f5a623;
  --red:     #f26b6b;
  --violet:  #b794f4;
  --teal:    #36d4bf;
  --pink:    #f472b6;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --daily-memo-height:124px;
}
html[data-theme="light"] {
  --bg:      #f2f3f7;
  --bg2:     #ffffff;
  --bg3:     #f8f9fb;
  --surf:    #ffffff;
  --surf2:   #f2f3f7;
  --hover:   #ebebf0;
  --bd:      rgba(0,0,0,.08);
  --bd2:     rgba(0,0,0,.04);
  --text:    #16171c;
  --text2:   #4b4e5e;
  --text3:   #95979f;
  --accent:  #4f46e5;
  --adim:    rgba(79,70,229,.08);
  --green:   #059669;
  --amber:   #d97706;
  --red:     #dc2626;
  --violet:  #7c3aed;
  --teal:    #0d9488;
  --pink:    #db2777;
}

/* ?먥븧 RESET ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧??*/
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--text);font-family:var(--sans);font-size:14px;line-height:1.5}
input,select,textarea,button{font-family:var(--sans);font-size:14px;color:var(--text)}
input::placeholder,textarea::placeholder{color:var(--text3)}
button{cursor:pointer}

/* ?먥븧 TOPNAV ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.topnav{
  position:sticky;top:0;z-index:100;
  height:50px;padding:0 20px;
  display:flex;align-items:center;justify-content:space-between;
  background:color-mix(in srgb,var(--bg2) 92%,transparent);
  border-bottom:1px solid var(--bd);
  backdrop-filter:blur(12px);
}
.nav-l{display:flex;align-items:center;gap:18px}
.nav-r{display:flex;align-items:center;gap:8px}
.logo{display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px;white-space:nowrap}
.logo-chip{
  background:linear-gradient(135deg,var(--accent),var(--violet));
  color:#fff;font-size:11px;font-weight:800;letter-spacing:.06em;
  padding:3px 7px;border-radius:6px
}
.tabs{display:flex;gap:1px}
.tab{background:none;border:none;padding:6px 13px;border-radius:7px;font-weight:600;font-size:13px;color:var(--text3);transition:all .12s}
.tab:hover{background:var(--hover);color:var(--text2)}
.tab.active{background:var(--adim);color:var(--accent)}
.save-pill{font-family:var(--mono);font-size:10.5px;color:var(--text3);padding:5px 11px;border:1px solid var(--bd);border-radius:999px;white-space:nowrap}
.icon-btn{width:32px;height:32px;border-radius:8px;font-size:14px;background:var(--surf);border:1px solid var(--bd);display:flex;align-items:center;justify-content:center;color:var(--text2);transition:all .12s}
.icon-btn:hover{border-color:var(--accent);color:var(--text)}

/* ?먥븧 PAGE ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.page{display:none}
.page.active{display:block}
.auth-required .page{display:none!important}
.auth-required .tabs,.auth-required .save-pill,.auth-required .access-admin-btn{display:none!important}
.auth-gate{min-height:calc(100vh - 50px);display:flex;align-items:center;justify-content:center;padding:32px 20px;background:radial-gradient(circle at 50% 0,rgba(108,106,247,.16),transparent 340px),var(--bg)}
.auth-gate.hidden{display:none}
.auth-card{width:min(440px,100%);background:var(--bg2);border:1px solid var(--bd);border-radius:16px;padding:30px 28px;text-align:center;box-shadow:0 18px 60px rgba(0,0,0,.28)}
.auth-logo{justify-content:center;margin-bottom:18px}
.auth-card h1{font-size:24px;font-weight:900;margin-bottom:8px;letter-spacing:0}
.auth-card p{font-size:14px;color:var(--text2);line-height:1.6;margin-bottom:22px}
.auth-login-btn{width:100%;padding:11px 18px}


/* ?먥븧 怨듯넻 硫붾え ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.memo-bar{
  padding:16px 20px;
  background:var(--bg2);
  border-bottom:1px solid var(--bd);
}
.memo-label{
  font-weight:700;font-size:13px;margin-bottom:8px;
  display:flex;align-items:center;gap:10px;
}
.memo-sync{font-size:11px;color:var(--text3);font-weight:400;font-family:var(--mono)}
.memo-area{
  width:100%;min-height:76px;max-height:160px;
  background:var(--bg3);border:1px solid var(--bd);border-radius:10px;
  padding:10px 13px;color:var(--text);font-size:13px;line-height:1.6;resize:vertical;
  transition:border-color .12s;
}
.memo-area:focus{outline:none;border-color:var(--accent)}

/* ?먥븧 ?꾨줈?앺듃 ?대컮 ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧??*/
.proj-toolbar{
  display:flex; align-items:center; justify-content:flex-end;
  padding:12px 20px;
  background:var(--bg2); border-bottom:1px solid var(--bd);
}
.tb-input{
  background:var(--bg3);border:1px solid var(--bd);border-radius:8px;
  padding:8px 11px;transition:border-color .12s;flex:1;min-width:120px;
}
.tb-input.short{flex:0 0 148px}
.tb-input:focus{outline:none;border-color:var(--accent)}
.btn-add-proj{
  background:var(--accent);color:#fff;border:none;
  padding:8px 16px;border-radius:8px;font-weight:700;font-size:13px;white-space:nowrap;
  box-shadow:0 2px 10px rgba(108,106,247,.3);transition:filter .12s;
}
.btn-add-proj:hover{filter:brightness(1.1)}
.btn-add-card{
  background:var(--surf2);color:var(--text2);border:1px solid var(--bd);
  padding:8px 14px;border-radius:8px;font-weight:600;font-size:13px;white-space:nowrap;transition:all .12s;
}
.btn-add-card:hover{border-color:var(--accent);color:var(--accent)}

/* ?먥븧 ?듦퀎 ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.stats-row{
  display:flex; gap:1px;
  padding: 0 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
}
.stat-card{
  flex: 1;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-right: 1px solid var(--bd);
}
.stat-card:last-child { border-right: none; }
.stat-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--adim); flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.stat-card-body { display: flex; flex-direction: column; gap: 2px; }
.stat-card p { font-size: 11px; color: var(--text3); font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.stat-card strong { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.stat-card.warn strong { color: var(--red); }

/* ?먥븧 ?몄썝蹂?移대뱶 洹몃━???먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.person-grid{
  padding:18px 20px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(420px,1fr));
  gap:14px;
  align-items:start;
}

.person-card{
  background:var(--bg2); border:1px solid var(--bd); border-radius:16px;
  overflow:hidden; box-shadow:0 2px 12px rgba(0,0,0,.1);
  display:flex; flex-direction:column;
}
.person-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px 12px;
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border-bottom:1px solid var(--bd);
}
.person-name{font-size:15px;font-weight:800;letter-spacing:-.01em}
.count-badge{
  font-family:var(--mono);font-size:11.5px;font-weight:700;
  padding:4px 10px;border-radius:999px;
}
.count-badge.red   {background:rgba(242,107,107,.15);color:var(--red)}
.count-badge.yellow{background:rgba(245,166,35,.15); color:var(--amber)}
.count-badge.green {background:rgba(62,207,142,.15); color:var(--green)}

.person-projects{display:flex;flex-direction:column;flex:1;}
.pi{
  display:flex;align-items:center;gap:8px;
  padding:9px 14px;border-bottom:1px solid var(--bd2);
  transition:background .08s; cursor:pointer;
}
.pi:last-child{border-bottom:none}
.pi:hover{background:var(--hover)}
.pi-dot{width:7px;height:7px;border-radius:999px;flex:0 0 7px}
.pi-name{flex:1;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pi-client{font-size:10.5px;color:var(--text3);white-space:nowrap;flex:0 0 auto;font-family:var(--mono)}
.pi-tag{
  font-family:var(--mono);font-size:10px;padding:2px 8px;
  border-radius:999px;background:var(--adim);color:var(--accent);
  white-space:nowrap;flex:0 0 auto;font-weight:600;
}
.pi-del{
  width:20px;height:20px;border-radius:999px;border:none;flex:0 0 20px;
  background:rgba(242,107,107,.15);color:var(--red);font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;transition:background .1s;
  opacity:0;
}
.pi:hover .pi-del{opacity:1}
.pi-del:hover{background:rgba(242,107,107,.3)}
.pi-drag{color:var(--text3);font-size:11px;cursor:grab;flex:0 0 auto;user-select:none;opacity:0;}
.pi:hover .pi-drag{opacity:1;}

/* 鍮??곹깭 */
.empty-pi{
  padding:24px 16px;
  text-align:center;
  font-size:12px; color:var(--text3);
  display:flex; flex-direction:column; align-items:center; gap:6px;
  flex:1;
}
.empty-pi::before{
  content:'＋';
  font-size:18px; color:var(--bd); font-weight:300;
}

/* 移대뱶 ??젣 踰꾪듉 ?????묎퀬 ?먯뿰?ㅻ읇寃?*/
.card-del-btn{
  width:100%; padding:8px; border:none; background:none;
  color:var(--text3); font-size:11.5px; font-weight:500;
  border-top:1px solid var(--bd2); transition:all .1s;
  letter-spacing:.01em;
}
.card-del-btn:hover{color:var(--red);}

/* ?먥븧 二쇨컙 罹섎┛???먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.cal-toolbar{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:12px 20px;background:var(--bg2);border-bottom:1px solid var(--bd);
}
.view-toggle{
  display:flex;border:1px solid var(--bd);border-radius:999px;overflow:hidden;background:var(--bg3);
}
.vt-btn{
  background:none;border:none;padding:7px 16px;font-size:13px;font-weight:600;
  color:var(--text3);border-radius:999px;transition:all .12s;
}
.vt-btn.active{background:var(--bg2);color:var(--text);box-shadow:0 1px 6px rgba(0,0,0,.2)}
.cal-filter{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text3);white-space:nowrap}
.cal-filter select{background:var(--bg3);border:1px solid var(--bd);border-radius:8px;padding:7px 11px;color:var(--text);min-width:140px}
.cal-filter select:focus{outline:none;border-color:var(--accent)}
.cal-nav{display:flex;align-items:center;gap:10px;margin-left:auto}
.cal-range{font-family:var(--mono);font-size:12.5px;font-weight:600;white-space:nowrap;min-width:180px;text-align:center}

/* 二쇨컙 洹몃━??*/
.weekly-wrap{padding:16px 20px 40px;overflow-x:auto}

.wk-header{
  display:grid;grid-template-columns:repeat(7,1fr);gap:6px;
  margin-bottom:8px;min-width:600px;
}
.wk-day-head{
  background:var(--bg3);border:1px solid var(--bd);border-radius:10px;
  padding:10px 10px 8px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;
}
.wk-day-head.today{border-color:rgba(108,106,247,.5);background:var(--adim)}
.wdname{font-family:var(--mono);font-size:10.5px;color:var(--text3);font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.wddate{display:flex;align-items:baseline;gap:5px}
.wddate strong{font-size:20px;font-weight:800;line-height:1}
.wddate span{font-size:11px;color:var(--text3)}
.wk-day-head.today .wddate strong{color:var(--accent)}
.memo-btn{
  margin-top:2px;background:none;border:1px solid var(--bd);border-radius:999px;
  padding:4px 9px;font-size:10.5px;color:var(--text3);transition:all .1s;
}
.memo-btn:hover{border-color:var(--accent);color:var(--accent)}

/* 諛붾뵒 ?덉씠??*/
.wk-body{position:relative;min-width:600px}
.wk-slots{display:flex;flex-direction:column;gap:6px}
.wk-slot-row{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.slot{height:56px;background:var(--bg3);border:1px solid var(--bd2);border-radius:8px}
.slot.today{background:rgba(108,106,247,.04);border-color:rgba(108,106,247,.15)}

/* ?쒖뒪??諛??ㅻ쾭?덉씠 */
.wk-bars{
  position:absolute;top:6px;left:0;right:0;bottom:6px;
  pointer-events:none;
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}
.day-log-col {
  display:flex; flex-direction:column; gap:4px;
  pointer-events:all; min-width:0;
}
.task-bar{
  position:absolute;
  /* ???꾩튂: (--col - 1) / 7 * 100% + ?쎄컙??gap 蹂댁젙 */
  left:calc( (var(--col) - 1) / 7 * 100% + 3px );
  width:calc( var(--span) / 7 * 100% - 6px );
  top:calc( var(--row) * 62px + 4px );
  height:50px;
  border-radius:9px;padding:6px 10px;
  display:flex;flex-direction:column;justify-content:center;gap:2px;
  pointer-events:all;cursor:pointer;
  transition:filter .12s;
  overflow:hidden;
}
.task-bar:hover{filter:brightness(1.08)}
.task-bar strong{display:block;font-size:12px;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
.task-bar span{display:block;font-size:10.5px;color:rgba(255,255,255,.75);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-badge{
  display:inline-flex;align-items:center;
  padding:2px 6px;border-radius:999px;
  background:rgba(255,255,255,.2);font-size:9.5px;font-weight:800;
  font-style:normal;color:#fff;margin-left:4px;
}
.task-bar.teal {background:linear-gradient(135deg,#1fa89a,#2dd4bf)}
.task-bar.red  {background:linear-gradient(135deg,#d9534f,#f26b6b)}
.task-bar.gray {background:linear-gradient(135deg,#4a4e5e,#636880)}
.task-bar.violet{background:linear-gradient(135deg,#7c3aed,#a78bfa)}
.task-bar.amber{background:linear-gradient(135deg,#b97b0d,#f5a623)}
.task-bar.green{background:linear-gradient(135deg,#059669,#3ecf8e)}

/* ?먥븧 紐⑤떖 ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;z-index:200;padding:20px}
.modal-bg.open{display:flex}
/* Keep timeline hover layers below dialogs, including sticky touch hover. */
#page-weekly{position:relative;isolation:isolate;z-index:0}
body:has(.modal-bg.open) .floating-tip{display:none!important}
.modal{background:var(--bg2);border:1px solid var(--bd);border-radius:16px;width:660px;max-width:100%;max-height:calc(100vh - 40px);overflow-y:auto;box-shadow:0 24px 80px rgba(0,0,0,.5)}
.modal.modal-sm{width:400px}
.modal-hd{display:flex;justify-content:space-between;align-items:center;padding:20px 22px 0}
.modal-hd h2{font-size:16px;font-weight:800;letter-spacing:-.01em}
.modal-x{background:var(--surf);border:1px solid var(--bd);color:var(--text3);width:28px;height:28px;border-radius:7px;font-size:13px;display:flex;align-items:center;justify-content:center;transition:all .1s}
.modal-x:hover{background:var(--hover);color:var(--text)}
.modal-bd{display:grid;grid-template-columns:1fr 1fr;gap:11px;padding:16px 22px}
.f{display:flex;flex-direction:column;gap:5px}
.f.full{grid-column:1/-1}
.f label{font-family:var(--mono);font-size:10px;color:var(--text3);letter-spacing:.05em;text-transform:uppercase;font-weight:600}
.f input,.f select,.f textarea{background:var(--bg3);border:1px solid var(--bd);border-radius:8px;padding:9px 11px;width:100%;transition:border-color .12s}
.f input:focus,.f select:focus,.f textarea:focus{outline:none;border-color:var(--accent)}
.f textarea{resize:vertical;min-height:64px}
.modal-ft{display:flex;justify-content:flex-end;gap:8px;padding:0 22px 20px}
.btn-cancel{background:var(--surf);border:1px solid var(--bd);color:var(--text2);padding:8px 16px;border-radius:8px;font-weight:500;transition:all .12s}
.btn-cancel:hover{border-color:var(--text3)}
.btn-save{background:var(--accent);color:#fff;border:none;padding:8px 18px;border-radius:8px;font-weight:700;box-shadow:0 2px 10px rgba(108,106,247,.3);transition:filter .12s}
.btn-save:hover{filter:brightness(1.1)}

/* ?먥븧 RESPONSIVE ?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧?먥븧 */

@media (min-width:1320px){.person-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:1319px) and (min-width:900px){.person-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:900px){
  .stats-row{grid-template-columns:repeat(2,1fr)}
  .person-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .proj-toolbar{gap:6px}
  .tb-input.short{flex:1 1 100%}
  .stats-row{grid-template-columns:repeat(2,1fr)}
}

/* ?? ?쇨컙 酉???????????????????????????????????? */
.hidden { display: none !important; }

.daily-wrap { padding: 20px 20px 40px; }

.day-single-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 4px 16px; border-bottom: 1px solid var(--bd);
  margin-bottom: 14px;
}
.ds-weekday {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: .06em;
}
.ds-date { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ds-count { font-size: 12.5px; color: var(--text3); font-family: var(--mono); margin-left: auto; }

.day-single-list { display: flex; flex-direction: column; gap: 8px; }

.ds-item {
  display: flex; align-items: stretch; gap: 14px;
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 12px; padding: 14px 16px;
  cursor: pointer; transition: background .1s;
}
.ds-item:hover { background: var(--hover); }
.ds-line {
  width: 4px; border-radius: 999px; flex: 0 0 4px; align-self: stretch;
}
.ds-item.teal   .ds-line { background: var(--teal); }
.ds-item.red    .ds-line { background: var(--red); }
.ds-item.gray   .ds-line { background: var(--text3); }
.ds-item.violet .ds-line { background: var(--violet); }
.ds-item.amber  .ds-line { background: var(--amber); }
.ds-item.green  .ds-line { background: var(--green); }

.ds-info strong {
  display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px;
}
.ds-info span {
  font-size: 12px; color: var(--text3);
}
.ds-info span em { color: var(--red); font-style: normal; font-weight: 600; }

/* ?? 援ш? 濡쒓렇??UI ????????????????????????????? */
.user-area {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 5px;
  background: var(--surf); border: 1px solid var(--bd);
  border-radius: 999px; cursor: pointer; max-width: 160px;
}
.user-avatar {
  width: 26px; height: 26px; border-radius: 999px;
  object-fit: cover; flex: 0 0 26px;
  border: 1px solid var(--bd);
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-name  {
  font-size: 12.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px;
}
.user-email { display: none; } /* ?ㅻ퉬?먯꽑 ?④? */
.sign-out-btn {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg2); border: 1px solid var(--bd); border-radius: 8px;
  padding: 10px 18px; font-size: 13px; color: var(--text2);
  white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  display: none; z-index: 50; min-width: 110px; text-align: center;
}
.user-area.open .sign-out-btn { display: block; }
.sign-out-btn:hover { color: var(--red); border-color: var(--red); }

/* ?? ?쇱씪 ?낅Т ?깅줉 踰꾪듉/紐⑤떖 ??????????????????? */
.daily-post-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--bg2);
  border-bottom: 1px solid var(--bd); gap: 12px;
}
.post-user-row { display: flex; align-items: center; gap: 10px; }
.post-username  { font-weight: 700; font-size: 14px; }
.post-date-badge {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
  background: var(--bg3); border: 1px solid var(--bd);
  padding: 3px 8px; border-radius: 999px;
}
.btn-daily-log {
  background: var(--accent); color: #fff; border: none;
  padding: 8px 18px; border-radius: 8px; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 2px 10px rgba(108,106,247,.3);
  transition: filter .12s; white-space: nowrap;
}
.btn-daily-log:hover { filter: brightness(1.1); }

/* ?곹깭 ?좉? */
.status-toggle { display: flex; gap: 8px; margin-top: 4px; }
.status-btn {
  flex: 1; padding: 10px; border-radius: 8px; font-weight: 700; font-size: 13.5px;
  border: 2px solid var(--bd); background: var(--bg3); color: var(--text2);
  transition: all .12s; cursor: pointer;
}
.status-btn.active[data-val="\C9C4\D589\C911"] { border-color: var(--accent); background: var(--adim); color: var(--accent); }
.status-btn.active[data-val="\C644\B8CC"] { border-color: var(--green); background: rgba(62,207,142,.12); color: var(--green); }

/* ?? ?좎뒪???뚮┝ ???????????????????????????????? */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg2);
  padding: 10px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 9999; opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ?? 而ㅼ뒪? ?쒖뒪??諛?(??먮퀎 ?됱긽) ???????????? */
.task-bar-custom {
  position: absolute;
  left:   calc( (var(--col) - 1) / 7 * 100% + 3px );
  width:  calc( var(--span) / 7 * 100% - 6px );
  top:    calc( var(--row) * 62px + 4px );
  height: 52px;
  border-radius: 9px; padding: 7px 11px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  cursor: pointer; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: filter .1s, transform .1s;
  pointer-events: all;
}
.task-bar-custom:hover { filter: brightness(1.1); transform: translateY(-1px); }
.task-bar-custom strong { font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-bar-custom span   { font-size: 11px; color: rgba(255,255,255,.8); white-space: nowrap; }

/* ?? 濡쒓렇 ?곸꽭 紐⑤떖 ????????????????????????????? */
.ld-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--bd2); }
.ld-row:last-of-type { border-bottom: none; }
.ld-label { font-family: var(--mono); font-size: 10.5px; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; }
.ld-value { font-size: 14px; font-weight: 600; }
.ld-content { font-size: 13.5px; white-space: pre-wrap; line-height: 1.6; color: var(--text2); }

/* ?? bar ?대? ??젣 踰꾪듉 ????????????????????????? */
.task-bar-custom { flex-direction: row; align-items: center; padding: 0; overflow: hidden; container-type:inline-size; }
.bar-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  gap: 2px; padding: 7px 10px; cursor: pointer; min-width: 0; overflow: hidden;
}
.bar-del-btn {
  flex: 0 0 28px; width: 28px; height: 100%;
  background: rgba(0,0,0,.2); border: none; border-left: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s; opacity: 0;
}
.task-bar-custom:hover .bar-del-btn { opacity: 1; }
.bar-del-btn:hover { background: rgba(0,0,0,.4); color: #fff; }

/* ?? input + 踰꾪듉 議고빀 ?????????????????????????? */
.input-with-btn {
  display: flex; gap: 6px; align-items: center;
}
.input-with-btn input { flex: 1; }
.input-side-btn {
  flex: 0 0 auto; white-space: nowrap;
  padding: 9px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--bd); color: var(--text2);
  cursor: pointer; transition: all .12s;
}
.input-side-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--adim); }


/* monthly calendar */
.monthly-wrap{padding:16px 20px 40px;overflow-x:auto}
.month-weekdays,.month-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:6px;min-width:840px}
.month-weekdays{margin-bottom:8px}
.month-weekday{font-family:var(--mono);font-size:10.5px;color:var(--text3);font-weight:800;text-transform:uppercase;letter-spacing:.06em;padding:0 8px}
.month-day{min-height:118px;background:var(--bg3);border:1px solid var(--bd2);border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:6px;overflow:hidden;cursor:pointer;transition:border-color .12s,background .12s}
.month-day.other{opacity:.45}
.month-day.today{border-color:rgba(108,106,247,.55);background:var(--adim)}
.month-day:hover{border-color:rgba(108,106,247,.65);background:var(--adim)}
.month-date{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;color:var(--text3);font-weight:700}
.month-date strong{font-size:15px;color:var(--text)}
.month-count{font-family:var(--mono);font-size:10px;color:var(--accent)}
.month-log-list{display:flex;flex-direction:column;gap:4px;min-width:0}
.month-log{display:flex;align-items:center;gap:5px;border:none;border-radius:6px;padding:4px 6px;background:var(--bg2);color:var(--text2);font-size:11px;line-height:1.25;text-align:left;cursor:pointer;min-width:0}
.month-log:hover{background:var(--hover);color:var(--text)}
.month-log-dot{width:7px;height:7px;border-radius:999px;flex:0 0 auto}
.month-log-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.month-more{font-size:10.5px;color:var(--text3);padding-left:2px}


.bar-body span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.month-log-text strong{font-weight:800;color:var(--text)}


.log-layout{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;width:100%}
.log-copy{display:flex;flex-direction:column;gap:2px;min-width:0;overflow:hidden}
.log-worker{font-size:11px;font-weight:800;color:rgba(255,255,255,.95);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.15}
.log-detail{font-size:11px;font-weight:600;color:rgba(255,255,255,.82);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
.log-detail strong{font-weight:900;color:#fff}
.log-count{flex:0 0 auto;margin-left:auto;padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.2);color:#fff;font-family:var(--mono);font-size:10px;font-weight:800;white-space:nowrap}
.ds-info.log-card-info{min-width:0;width:100%}
.ds-info .log-worker,.ds-info .log-detail{color:var(--text)}
.ds-info .log-detail{color:var(--text2)}
.ds-info .log-detail strong{color:var(--text)}
.ds-info .log-count{background:var(--adim);color:var(--accent)}
.month-log-text{display:block;width:100%;min-width:0}
.month-log .log-layout{gap:6px}
.month-log .log-worker{font-size:10px;color:var(--text);line-height:1.1}
.month-log .log-detail{font-size:10.5px;color:var(--text2);line-height:1.15}
.month-log .log-detail strong{color:var(--text)}
.month-log .log-count{font-size:9px;padding:2px 5px;background:var(--adim);color:var(--accent)}


.log-done-btn{flex:0 0 18px;width:18px;height:18px;border-radius:50%;border:1px solid rgba(255,255,255,.7);background:rgba(255,255,255,.12);color:#fff;font-size:12px;font-weight:900;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
.log-done-btn.done{background:#10b981;border-color:#10b981;color:#fff}
.log-layout.done .log-copy{opacity:.68;text-decoration:line-through;text-decoration-thickness:1px}
.log-layout.done .log-count{background:rgba(16,185,129,.22);color:#fff}
.ds-info .log-done-btn{border-color:var(--bd);background:var(--bg3);color:var(--text3)}
.ds-info .log-done-btn.done{background:var(--green);border-color:var(--green);color:#fff}
.ds-info .log-layout.done .log-count,.month-log .log-layout.done .log-count{background:rgba(62,207,142,.14);color:var(--green)}
.month-log .log-done-btn{width:16px;height:16px;flex-basis:16px;font-size:10px;border-color:var(--bd);background:var(--bg3);color:var(--text3)}
.month-log .log-done-btn.done{background:var(--green);border-color:var(--green);color:#fff}
.month-log .log-layout.done .log-copy,.month-day-detail-item .log-layout.done .log-copy{text-decoration:none}
.month-day-modal{width:520px}
.month-day-detail-body{display:block;padding-top:12px}
.month-day-detail-meta{font-size:12px;font-weight:800;color:var(--accent);margin-bottom:10px}
.month-day-detail-list{display:flex;flex-direction:column;gap:8px}
.month-day-detail-item{width:100%;border:1px solid var(--bd2);border-left:4px solid var(--accent);border-radius:8px;background:var(--bg3);padding:10px;text-align:left;color:var(--text);cursor:pointer}
.month-day-detail-item:hover{background:var(--hover);border-color:var(--bd)}
.month-day-detail-item .log-worker,.month-day-detail-item .log-detail{color:var(--text)}
.month-day-detail-item .log-detail{color:var(--text2)}
.month-day-detail-item .log-detail strong{color:var(--text)}
.month-day-detail-item .log-count{background:var(--adim);color:var(--accent)}
.month-day-empty{border:1px dashed var(--bd);border-radius:8px;padding:22px;text-align:center;color:var(--text3);font-size:13px}
.btn-done-toggle.done{border-color:var(--green);background:rgba(62,207,142,.12);color:var(--green)}
.browser-alert-stack{position:fixed;right:18px;bottom:18px;display:flex;flex-direction:column;gap:10px;z-index:10000;pointer-events:none}
.browser-alert{position:relative;width:min(360px,calc(100vw - 36px));background:var(--bg2);color:var(--text);border:1px solid var(--bd);border-left:4px solid var(--accent);border-radius:10px;box-shadow:0 14px 36px rgba(0,0,0,.22);padding:13px 38px 13px 14px;opacity:0;transform:translateY(8px);transition:opacity .18s,transform .18s;pointer-events:auto}
.browser-alert.show{opacity:1;transform:translateY(0)}
.browser-alert-close{position:absolute;top:8px;right:8px;width:22px;height:22px;border:1px solid var(--bd);border-radius:999px;background:var(--bg3);color:var(--text3);font-size:15px;line-height:18px;font-weight:800;display:grid;place-items:center;cursor:pointer;transition:background .15s,color .15s,border-color .15s,transform .15s}
.browser-alert-close:hover{background:var(--bg);color:var(--text);border-color:var(--bd-strong);transform:scale(1.04)}
.browser-alert-title{font-size:13px;font-weight:900;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.browser-alert-body{font-size:12px;color:var(--text2);line-height:1.45;white-space:pre-wrap}


.pi-role{font-family:var(--mono);font-size:9.5px;font-weight:800;padding:2px 6px;border-radius:999px;white-space:nowrap;flex:0 0 auto;letter-spacing:0}
.pi-role.worker{background:var(--adim);color:var(--accent)}
.pi-role.pm{background:rgba(245,166,35,.15);color:var(--amber)}
.pi-role.both{background:rgba(62,207,142,.15);color:var(--green)}
.pi-role.none{background:var(--bg3);color:var(--text3)}
.pi.no-drag{cursor:pointer}
.pi.no-drag .pi-dot{opacity:.7}


.is-disabled,button:disabled{opacity:.45;cursor:not-allowed;filter:none!important}
.read-only-user .pi{cursor:not-allowed!important}
.read-only-user .pi:hover{background:transparent}
.read-only-user .pi-drag,.read-only-user .pi-del,.read-only-user .log-done-btn{display:none!important}
textarea:disabled,input:disabled,select:disabled{opacity:.72;cursor:not-allowed;background:var(--bg3)}


.pi{display:grid;grid-template-columns:18px 58px minmax(0,1fr) 74px 20px 14px;align-items:center;column-gap:9px;padding:9px 14px}
.pi-dot{grid-column:1;width:7px;height:7px;justify-self:center}
.pi>.stage-mark{grid-column:1;justify-self:center}
.pi-role{grid-column:2;width:58px;box-sizing:border-box;text-align:center;justify-self:start;overflow:hidden;text-overflow:ellipsis}
.pi-name{grid-column:3;min-width:0;width:100%;font-size:13px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pi-client{grid-column:4;width:74px;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:right;justify-self:end}
.pi-tag{display:none}
.pi-del{grid-column:5;justify-self:center}
.pi-drag{grid-column:6;justify-self:end}
.pi.no-drag{grid-template-columns:18px 58px minmax(0,1fr) 74px 20px 14px}
.pi.no-drag .pi-del{grid-column:5}
@media (max-width:520px){.pi{grid-template-columns:18px 54px minmax(0,1fr) 58px 20px 10px;column-gap:7px;padding-left:10px;padding-right:10px}.pi-role{width:54px;font-size:9px;padding-left:4px;padding-right:4px}.pi-client{width:58px;text-align:right;justify-self:end}}


/* mobile meeting view */
@media (max-width:720px){
  .topnav{height:auto;min-height:50px;padding:8px 10px;align-items:flex-start;gap:8px;flex-wrap:wrap}
  .nav-l{gap:10px;min-width:0;flex:1 1 auto;flex-wrap:wrap}
  .logo b{display:none}
  .tabs{order:2;width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
  .tab{padding:8px 6px;font-size:12.5px}
  .nav-r{margin-left:auto;gap:6px}
  .save-pill{max-width:92px;overflow:hidden;text-overflow:ellipsis;padding:5px 8px;font-size:10px}
  .proj-toolbar{padding:10px 12px}
  .btn-add-proj,.btn-daily-log{width:100%;justify-content:center;padding:10px 12px}
  .stats-row{grid-template-columns:1fr 1fr}
  .person-grid{padding:12px;gap:10px;grid-template-columns:1fr!important}
  .person-card{border-radius:12px}
  .person-head{padding:12px 13px 10px}
  .pi{grid-template-columns:18px 54px minmax(0,1fr) 62px;column-gap:8px;padding:10px 12px}
  .pi-role{width:54px;font-size:9px;padding:2px 4px}
  .pi-name{font-size:12.5px}
  .pi-client{width:62px;font-size:10px;text-align:right;justify-self:end}
  .pi-del,.pi-drag{display:none!important}
  .daily-post-bar{padding:12px;flex-direction:column;align-items:stretch}
  .post-user-info{min-width:0}
  .cal-toolbar{padding:10px 12px;gap:8px;display:grid;grid-template-columns:1fr;align-items:stretch}
  .view-toggle{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}
  .vt-btn{padding:8px 4px;text-align:center}
  .cal-filter-label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;width:100%}
  .cal-filter-label select{width:100%}
  .cal-nav{margin-left:0;justify-content:space-between;width:100%}
  .cal-range{min-width:0;flex:1;font-size:11.5px}
  .weekly-wrap,.monthly-wrap{padding:12px;overflow-x:auto}
  .weekly-wrap{scroll-snap-type:x proximity}
  .wk-header,.wk-body{min-width:760px;scroll-snap-align:start}
  .daily-wrap{padding:12px 12px 28px}
  .day-single-head{align-items:flex-start;gap:4px}
  .ds-item{padding:10px 12px}
  .log-layout{gap:7px}
  .log-count{font-size:9px;padding:3px 6px}
  .month-weekdays,.month-grid{min-width:760px;grid-template-columns:repeat(7,minmax(104px,1fr))}
  .modal{width:calc(100vw - 20px);max-height:calc(100vh - 20px);overflow:auto}
  .modal-bd{grid-template-columns:1fr;padding:14px}
  .modal-ft{padding:12px 14px;flex-wrap:wrap}
  .modal-ft button{flex:1 1 auto}
}

@media (max-width:380px){
  .pi{grid-template-columns:18px 50px minmax(0,1fr) 54px;column-gap:6px;padding-left:10px;padding-right:10px}
  .pi-role{width:50px;font-size:8.5px}
  .pi-client{width:54px;font-size:9.5px}
  .log-count{max-width:92px;overflow:hidden;text-overflow:ellipsis}
}


/* work links */
.links-toolbar{display:flex;align-items:center;justify-content:flex-end;padding:12px 20px;background:var(--bg2);border-bottom:1px solid var(--bd)}
.links-wrap{padding:18px 20px 40px}
.links-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:10px}
.link-item{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px;background:var(--bg2);border:1px solid var(--bd);border-radius:10px;padding:10px 12px;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.link-drag{color:var(--text3);font-weight:900;cursor:grab;user-select:none;line-height:1;letter-spacing:-2px;padding-right:2px}.link-item.dragging{opacity:.45;transform:scale(.985)}.link-item.drop-before::before,.link-item.drop-after::after{content:"";position:absolute;top:-5px;bottom:-5px;width:3px;border-radius:999px;background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.link-item.drop-before::before{left:-5px}.link-item.drop-after::after{right:-5px}
.link-main{min-width:0;display:flex;flex-direction:column;gap:3px;color:var(--text);text-decoration:none}
.link-main:hover .link-title{color:var(--accent)}
.link-title{font-size:13.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.link-url{font-family:var(--mono);font-size:10.5px;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.link-edit,.link-delete{border:1px solid var(--bd);background:var(--bg3);color:var(--text2);border-radius:8px;padding:7px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.link-edit:hover{border-color:var(--accent);color:var(--accent);background:var(--adim)}
.link-delete{color:var(--red);background:rgba(242,107,107,.1);border-color:rgba(242,107,107,.3)}
.links-empty{background:var(--bg2);border:1px solid var(--bd);border-radius:10px}
@media (max-width:720px){.links-toolbar{padding:10px 12px}.links-toolbar .btn-add-proj{width:100%}.links-wrap{padding:12px}.links-list{grid-template-columns:1fr}.link-item{grid-template-columns:auto 1fr auto;gap:8px}.link-main{grid-column:1/-1}.link-delete{display:none}}


.client-picker{display:flex;flex-direction:column;gap:7px}
.client-add-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:center}
.client-add-row input{min-width:0}
@media (max-width:720px){.client-add-row{grid-template-columns:1fr}.client-add-row .input-side-btn{width:100%}}


.pi.dragging{opacity:.45}
.pi.drop-before,.pi.drop-after{position:relative}
.pi.drop-before::before,.pi.drop-after::after{content:'';position:absolute;left:12px;right:12px;height:3px;border-radius:999px;background:var(--accent);box-shadow:0 0 0 3px var(--adim);z-index:2;pointer-events:none}
.pi.drop-before::before{top:-2px}
.pi.drop-after::after{bottom:-2px}
.person-card.drop-at-end .person-projects{position:relative;padding-bottom:8px}
.person-card.drop-at-end .person-projects::after{content:'';display:block;height:3px;margin:5px 12px 0;border-radius:999px;background:var(--accent);box-shadow:0 0 0 3px var(--adim)}


.project-view-toggle{margin-right:auto}
.proj-toolbar{gap:10px;flex-wrap:wrap}
.stage-mark{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;color:var(--stage-color);border:1px solid color-mix(in srgb,var(--stage-color) 55%,transparent);background:color-mix(in srgb,var(--stage-color) 12%,transparent);font-family:var(--mono);font-size:11px;font-weight:900;line-height:1}
.stage-mark.done{background:rgba(62,207,142,.14)}
.stage-mark.prod{border-radius:6px}
.stage-mark.fb{font-size:8px;border-radius:6px}
.project-group-grid{padding:18px 20px 40px;display:grid;grid-template-columns:1fr;gap:14px}
.project-group-card{background:var(--bg2);border:1px solid var(--bd);border-radius:14px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.08)}
.project-group-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;background:linear-gradient(to bottom,var(--bg3),var(--bg2));border-bottom:1px solid var(--bd)}
.project-group-head strong{font-size:15px;font-weight:900}
.project-group-head span{font-family:var(--mono);font-size:11px;color:var(--text3)}
.project-table{display:flex;flex-direction:column}
.project-table-row{display:grid;grid-template-columns:minmax(220px,1.5fr) 130px 120px 120px 100px 42px;gap:10px;align-items:center;width:100%;border:0;border-bottom:1px solid var(--bd2);background:transparent;color:var(--text);padding:10px 14px;text-align:left}
button.project-table-row{cursor:pointer}
button.project-table-row:hover{background:var(--hover)}
.project-table-row:last-child{border-bottom:0}
.project-table-head{font-family:var(--mono);font-size:10px;color:var(--text3);font-weight:800;background:var(--bg3);cursor:default}
.project-sort-btn{display:inline-flex;align-items:center;gap:4px;max-width:100%;border:0;background:none;color:inherit;font:inherit;font-weight:900;padding:0;cursor:pointer;text-align:left}
.project-sort-btn:hover,.project-sort-btn.active{color:var(--accent)}
.project-sort-btn span{font-size:10px;line-height:1}
.project-title-cell,.stage-cell{display:flex;align-items:center;gap:8px;min-width:0}
.project-title-cell b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.stage-cell{font-size:12px;color:var(--text2)}
.project-empty{background:var(--bg2);border:1px solid var(--bd);border-radius:12px}
@media(max-width:720px){.project-view-toggle{width:100%;display:grid;grid-template-columns:1fr 1fr;order:2}.project-group-grid{padding:12px}.project-table{overflow-x:auto}.project-table-row{grid-template-columns:190px 120px 100px 100px 90px 42px;min-width:700px}.project-view-toggle + .btn-add-proj{order:1}}


.task-bar-custom .bar-body{padding:6px 8px}
.task-bar-custom .log-layout{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:7px;align-items:center}
.task-bar-custom .log-copy{min-width:0;gap:1px}
.task-bar-custom .log-worker{font-size:11.5px;max-width:none;color:#fff}
.task-bar-custom .log-detail{font-size:11px;max-width:none;color:rgba(255,255,255,.9)}
.task-bar-custom .log-count{font-size:9px;padding:2px 5px;max-width:74px;overflow:hidden;text-overflow:ellipsis;opacity:.85}
@container (max-width: 210px){.task-bar-custom .log-count{display:none}}
@media (max-width:720px){.task-bar-custom .log-layout{grid-template-columns:18px minmax(0,1fr)}.task-bar-custom .log-count{display:none}.task-bar-custom .log-worker{font-size:11px}.task-bar-custom .log-detail{font-size:10.5px}}


.access-admin-btn{border:1px solid var(--bd);background:var(--bg2);color:var(--text2);border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800;white-space:nowrap}
.access-admin-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--adim)}
.input-side-btn.danger:hover{border-color:var(--red);color:var(--red);background:rgba(239,68,68,.08)}
.access-list{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto}
.access-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--bd);background:var(--bg3);border-radius:10px;padding:9px 10px}
.access-row strong{display:block;font-size:13px;font-weight:900;color:var(--text)}
.access-row span{display:block;margin-top:2px;font-family:var(--mono);font-size:11px;color:var(--text3)}
.access-empty{border:1px dashed var(--bd);border-radius:10px;padding:12px;color:var(--text3);font-size:12px;text-align:center}
.project-row-actions{display:flex;justify-content:flex-end;align-items:center;min-width:0}
.project-row-del{position:static;opacity:1;transform:none}

.project-table-row[role="button"]{cursor:pointer}
.project-table-row[role="button"]:hover{background:var(--hover)}
.project-row-del{display:flex!important;grid-column:auto!important;justify-self:end!important}


.access-section{display:flex;flex-direction:column;gap:8px}
.access-section + .access-section{margin-top:12px}
.access-section h3{margin:0;font-size:12px;font-weight:900;color:var(--text2)}
.access-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.access-row.pending{border-color:rgba(79,70,229,.28);background:var(--adim)}

.access-fixed{font-size:11px;font-weight:900;color:var(--text3);background:var(--bg2);border:1px solid var(--bd);border-radius:999px;padding:6px 9px;white-space:nowrap}

.modal.modal-admin{width:760px}
.admin-body{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important}
.admin-card{border:1px solid var(--bd);background:var(--bg3);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;min-width:0}
.admin-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.admin-card-head h3{margin:0;font-size:13px;font-weight:900;color:var(--text)}
.admin-card-head span{font-size:11px;color:var(--text3);white-space:nowrap}
.admin-inline-form{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
.admin-inline-form .input-side-btn{width:100%;justify-content:center}
.admin-client-list{display:flex;flex-direction:column;gap:8px;max-height:300px;overflow:auto}
.admin-client-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--bd);background:var(--bg2);border-radius:10px;padding:9px 10px}
.admin-client-row strong{display:block;font-size:13px;font-weight:900;color:var(--text)}
.admin-client-row span{display:block;margin-top:2px;font-size:11px;color:var(--text3)}
@media(max-width:720px){.modal.modal-admin{width:100%}.admin-body{grid-template-columns:1fr!important}.admin-card-head{flex-direction:column;gap:3px}.admin-card-head span{white-space:normal}}

.access-row{position:relative;overflow:hidden;padding-left:15px}
.access-row::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--member-color,var(--accent))}
.access-role{font-size:11px;font-weight:900;color:var(--accent);background:var(--adim);border:1px solid rgba(79,70,229,.24);border-radius:999px;padding:6px 9px;white-space:nowrap}
.access-role.admin{color:var(--text);background:var(--bg2);border-color:var(--bd)}

.access-color-input{width:34px;height:30px;flex:0 0 34px;padding:0;border:1px solid var(--bd);border-radius:8px;background:var(--bg2);cursor:pointer}
.access-color-input::-webkit-color-swatch-wrapper{padding:3px}
.access-color-input::-webkit-color-swatch{border:0;border-radius:6px}


/* modern polish */
html[data-theme="light"]{
  --bg:#f6f7fb;
  --bg2:#ffffff;
  --bg3:#fafbfc;
  --surf:#ffffff;
  --surf2:#f3f5f8;
  --hover:#f4f6fa;
  --bd:rgba(15,23,42,.075);
  --bd2:rgba(15,23,42,.045);
  --text:#111827;
  --text2:#5b6472;
  --text3:#9aa3af;
  --accent:#4f46e5;
  --adim:rgba(79,70,229,.075);
}
:root{
  --soft-shadow:0 1px 2px rgba(15,23,42,.04),0 10px 28px rgba(15,23,42,.06);
  --soft-shadow-hover:0 2px 4px rgba(15,23,42,.06),0 14px 34px rgba(15,23,42,.09);
}
.topnav{height:52px;border-bottom-color:var(--bd2);box-shadow:0 1px 0 rgba(15,23,42,.025)}
.tab,.vt-btn,.access-admin-btn,.icon-btn,.save-pill{border-radius:10px}
.tab.active,.vt-btn.active{box-shadow:inset 0 0 0 1px rgba(79,70,229,.08)}
.person-card,.project-group-card,.link-item,.admin-card,.modal{
  border-color:var(--bd2);
  box-shadow:var(--soft-shadow);
}
.person-card{border-radius:14px}
.project-group-card,.admin-card{border-radius:12px}
.pi,.project-table-row,.ld-row{border-bottom-color:var(--bd2)}
.pi:hover,.project-table-row[role="button"]:hover,button.project-table-row:hover,.month-log:hover{background:var(--hover)}
.btn-add-proj,.btn-daily-log,.btn-save{
  border-radius:10px;
  box-shadow:0 8px 20px rgba(79,70,229,.18);
}
.weekly-wrap,.monthly-wrap,.daily-wrap{background:var(--bg)}
.wk-day,.month-day,.ds-item{
  border-color:var(--bd2);
  background:var(--bg2);
  box-shadow:0 1px 2px rgba(15,23,42,.025);
}
.wk-day.today,.month-day.today{background:linear-gradient(180deg,rgba(79,70,229,.055),var(--bg2));border-color:rgba(79,70,229,.24)}
.task-bar-custom{
  background:var(--bg2)!important;
  color:var(--text)!important;
  border:1px solid var(--bd2);
  border-left:4px solid var(--member-color,var(--accent));
  border-radius:9px;
  box-shadow:var(--soft-shadow);
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.task-bar-custom:hover{filter:none;transform:translateY(-1px);box-shadow:var(--soft-shadow-hover);border-color:rgba(79,70,229,.16)}
.task-bar-custom .bar-body{padding:7px 9px}
.task-bar-custom .log-worker{color:var(--text);font-weight:900}
.task-bar-custom .log-detail{color:var(--text2);font-weight:700}
.task-bar-custom .log-detail strong{color:var(--text)}
.task-bar-custom .log-count{
  background:var(--surf2);
  color:var(--text2);
  border:1px solid var(--bd2);
}
.task-bar-custom .log-done-btn{
  border-color:var(--bd);
  background:var(--bg3);
  color:var(--text3);
}
.task-bar-custom .log-done-btn.done{
  background:#eef2f7;
  border-color:#cbd5e1;
  color:#64748b;
}
.task-bar-custom:has(.log-layout.done){
  border-left-color:#cbd5e1;
  background:#f8fafc!important;
  box-shadow:none;
}
.task-bar-custom:has(.log-layout.done) .log-worker,
.task-bar-custom:has(.log-layout.done) .log-detail{color:#8a94a3}
.task-bar-custom:has(.log-layout.done) .log-count{background:#eef2f7;color:#64748b;border-color:#d9e1ea}
.month-log{
  border:1px solid transparent;
  border-left:3px solid transparent;
  background:var(--bg2);
}
.month-log:has(.log-layout.done){background:#f8fafc}
.month-log-dot{box-shadow:0 0 0 3px color-mix(in srgb,currentColor 12%,transparent)}
.ds-item{
  border-left-width:4px!important;
  border-radius:10px;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.ds-item:hover{transform:translateY(-1px);box-shadow:var(--soft-shadow-hover)}
.access-row,.admin-client-row{
  border-color:var(--bd2);
  background:var(--bg2);
  border-radius:10px;
}
.access-row::before{width:4px}
.access-role,.access-fixed{border-color:var(--bd2)}


/* soften admin form controls */
.modal-admin input,
.modal-admin select,
.modal-admin textarea{
  border-color:rgba(15,23,42,.075);
  background:#fbfcfe;
  box-shadow:inset 0 1px 0 rgba(15,23,42,.025);
}
.modal-admin input:hover,
.modal-admin select:hover,
.modal-admin textarea:hover{
  border-color:rgba(15,23,42,.12);
}
.modal-admin input:focus,
.modal-admin select:focus,
.modal-admin textarea:focus{
  outline:none;
  border-color:rgba(79,70,229,.32);
  box-shadow:0 0 0 3px rgba(79,70,229,.08);
  background:#fff;
}
.modal-admin .input-side-btn{
  border-color:rgba(15,23,42,.075);
  background:#fbfcfe;
  color:var(--text2);
}
.modal-admin .input-side-btn:hover{
  border-color:rgba(79,70,229,.22);
  background:var(--adim);
  color:var(--accent);
}
html[data-theme="dark"] .modal-admin input,
html[data-theme="dark"] .modal-admin select,
html[data-theme="dark"] .modal-admin textarea,
html[data-theme="dark"] .modal-admin .input-side-btn{
  border-color:rgba(255,255,255,.075);
  background:rgba(255,255,255,.035);
}
html[data-theme="dark"] .modal-admin input:focus,
html[data-theme="dark"] .modal-admin select:focus,
html[data-theme="dark"] .modal-admin textarea:focus{
  border-color:rgba(129,140,248,.38);
  box-shadow:0 0 0 3px rgba(129,140,248,.12);
}


/* admin tab page */
.admin-page{padding:18px 20px 42px}
.admin-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}
.admin-page-head h1{margin:0;font-size:20px;font-weight:900;color:var(--text)}
.admin-page-head p{margin:4px 0 0;font-size:12px;color:var(--text3)}
.admin-page-grid{display:grid!important;grid-template-columns:minmax(320px,1.1fr) minmax(280px,.9fr) minmax(320px,1fr)!important;gap:14px!important;align-items:start}
.admin-page .access-list,.admin-page .admin-client-list,.member-color-list{max-height:none;overflow:visible}
.member-color-list{display:flex;flex-direction:column;gap:8px}
.member-color-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--bd2);background:var(--bg2);border-radius:10px;padding:9px 10px}
.member-color-main{display:flex;align-items:center;gap:9px;min-width:0}
.member-color-dot{width:8px;height:28px;border-radius:999px;background:var(--member-color,var(--accent));flex:0 0 8px}
.member-color-row strong{display:block;font-size:13px;font-weight:900;color:var(--text)}
.member-color-row span{display:block;margin-top:2px;font-size:11px;color:var(--text3)}
.admin-page input,.admin-page select,.admin-page textarea{border-color:rgba(15,23,42,.075);background:#fbfcfe;box-shadow:inset 0 1px 0 rgba(15,23,42,.025)}
.admin-page input:focus,.admin-page select:focus,.admin-page textarea:focus{outline:none;border-color:rgba(79,70,229,.32);box-shadow:0 0 0 3px rgba(79,70,229,.08);background:#fff}
.admin-page .input-side-btn{border-color:rgba(15,23,42,.075);background:#fbfcfe;color:var(--text2)}
.admin-page .input-side-btn:hover{border-color:rgba(79,70,229,.22);background:var(--adim);color:var(--accent)}
html[data-theme="dark"] .admin-page input,html[data-theme="dark"] .admin-page select,html[data-theme="dark"] .admin-page textarea,html[data-theme="dark"] .admin-page .input-side-btn{border-color:rgba(255,255,255,.075);background:rgba(255,255,255,.035)}
@media(max-width:1100px){.admin-page-grid{grid-template-columns:1fr 1fr!important}.admin-page-grid .admin-card:last-child{grid-column:1/-1}}
@media(max-width:720px){.admin-page{padding:12px}.admin-page-grid{grid-template-columns:1fr!important}.admin-page-grid .admin-card:last-child{grid-column:auto}.admin-page-head{align-items:flex-start;flex-direction:column}}


/* admin page two-column layout */
.admin-page-grid{grid-template-columns:minmax(360px,1fr) minmax(320px,.85fr)!important}
@media(max-width:1100px){.admin-page-grid{grid-template-columns:1fr 1fr!important}.admin-page-grid .admin-card:last-child{grid-column:auto}}


/* hide legacy standalone member color card remnants */
.member-color-list,.member-color-row{display:none}


/* role dropdown permissions */
.access-role-select{
  min-width:82px;height:30px;border:1px solid var(--bd2);border-radius:999px;background:var(--bg2);color:var(--text2);
  padding:0 26px 0 10px;font-size:12px;font-weight:900;outline:none;
}
.access-role-select:focus{border-color:rgba(79,70,229,.32);box-shadow:0 0 0 3px rgba(79,70,229,.08)}
.role-permission-panel{display:flex;flex-direction:column;gap:6px;border:1px solid var(--bd2);border-radius:12px;background:var(--bg2);padding:10px}
.role-permission-head,.role-permission-row{display:grid;grid-template-columns:72px repeat(3,minmax(70px,1fr));gap:8px;align-items:center}
.role-permission-head b{font-size:11px;color:var(--text3);text-align:center;white-space:nowrap}
.role-permission-row strong{font-size:12px;color:var(--text);font-weight:900}
.permission-check{height:28px;display:flex;align-items:center;justify-content:center;border:1px solid var(--bd2);border-radius:8px;background:var(--bg3);cursor:pointer}
.permission-check input{position:absolute;opacity:0;pointer-events:none}
.permission-check span{width:16px;height:16px;border-radius:5px;border:1px solid var(--bd);background:var(--bg2);position:relative}
.permission-check input:checked + span{background:var(--accent);border-color:var(--accent)}
.permission-check input:checked + span::after{content:"";position:absolute;left:5px;top:2px;width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
@media(max-width:720px){.access-actions{flex-wrap:wrap;justify-content:flex-end}.role-permission-head,.role-permission-row{grid-template-columns:58px repeat(3,minmax(56px,1fr));gap:5px}.role-permission-head b{font-size:10px}.access-role-select{min-width:76px}}


/* split delete permission table */
.role-permission-head,.role-permission-row{grid-template-columns:72px repeat(5,minmax(74px,1fr))}
@media(max-width:720px){.role-permission-head,.role-permission-row{grid-template-columns:58px repeat(5,minmax(52px,1fr))}.role-permission-head b{white-space:normal;line-height:1.2}}


/* daily report color display mode */
.daily-color-mode-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:2px;
  color:var(--text3);
  font-size:12.5px;
  font-weight:700;
  white-space:nowrap;
}
.view-toggle.compact .vt-btn{
  padding:6px 12px;
  font-size:12px;
}
html[data-daily-color-mode="full"] .task-bar-custom{
  background:var(--member-color)!important;
  border-color:color-mix(in srgb,var(--member-color) 84%,#000 16%);
  border-left-color:color-mix(in srgb,var(--member-color) 72%,#000 28%);
  color:var(--member-text)!important;
  box-shadow:0 10px 24px color-mix(in srgb,var(--member-color) 22%,transparent);
}
html[data-daily-color-mode="full"] .task-bar-custom .log-worker,
html[data-daily-color-mode="full"] .task-bar-custom .log-detail,
html[data-daily-color-mode="full"] .task-bar-custom .log-detail strong{
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .task-bar-custom .log-count{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.26);
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .task-bar-custom .log-done-btn{
  background:rgba(255,255,255,.18);
  border-color:rgba(255,255,255,.55);
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done){
  background:#eef2f7!important;
  border-color:#d7dee8;
  border-left-color:#aab4c2;
  color:#64748b!important;
  box-shadow:none;
}
html[data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-worker,
html[data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-detail,
html[data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-detail strong{
  color:#64748b;
}
html[data-daily-color-mode="full"] .ds-item.daily-color-card,
html[data-daily-color-mode="full"] .month-day-detail-item.daily-color-card{
  background:var(--member-color);
  border-color:color-mix(in srgb,var(--member-color) 84%,#000 16%);
  border-left-color:color-mix(in srgb,var(--member-color) 72%,#000 28%)!important;
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .month-log.daily-color-card{
  background:var(--member-color);
  border-color:color-mix(in srgb,var(--member-color) 84%,#000 16%);
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .daily-color-card .log-worker,
html[data-daily-color-mode="full"] .daily-color-card .log-detail,
html[data-daily-color-mode="full"] .daily-color-card .log-detail strong,
html[data-daily-color-mode="full"] .daily-color-card .log-count{
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .daily-color-card .log-count{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.26);
}
html[data-daily-color-mode="full"] .daily-color-card .log-done-btn{
  background:rgba(255,255,255,.18);
  border-color:rgba(255,255,255,.55);
  color:var(--member-text);
}
html[data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done){
  background:#eef2f7;
  border-color:#d7dee8;
  border-left-color:#aab4c2!important;
  color:#64748b;
}
html[data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-worker,
html[data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-detail,
html[data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-detail strong,
html[data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-count{
  color:#64748b;
}
html[data-daily-color-mode="full"] .month-log-dot{
  background:currentColor!important;
  box-shadow:none;
}
@media (max-width:720px){
  .daily-color-mode-toggle{width:100%;justify-content:flex-start}
}


/* shared and personal memo split */
.memo-split-bar{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
  align-items:stretch;
}
.memo-card{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.memo-card .memo-area{
  flex:1;
}
.personal-memo-card .memo-label{
  color:var(--text);
}
.personal-memo-card .memo-sync{
  color:var(--accent);
}
#personalMemo:disabled{
  opacity:.72;
  cursor:not-allowed;
}
@media (max-width:900px){
  .memo-split-bar{grid-template-columns:1fr;}
}

/* daily header profile cleanup */
.daily-post-bar .post-avatar,
.daily-post-bar .post-username{
  display:none!important;
}
.daily-post-bar .post-user-row{
  display:none!important;
  min-height:0;
}
.user-area .user-name{
  display:block;
  color:var(--text);
}

/* top profile name width */
.nav-r .user-area{
  max-width:220px;
  padding-right:12px;
}
.nav-r .user-area .user-name{
  max-width:120px;
}

/* memo five line height */
.memo-card .memo-area{
  height:var(--daily-memo-height);
  min-height:88px;
  max-height:420px;
  flex:0 0 auto;
  resize:none;
}

/* work link note */
.link-note-input{
  min-height:72px;
  line-height:1.55;
}
.link-note{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:var(--text2);
  font-size:12px;
  line-height:1.45;
  margin-top:3px;
  white-space:normal;
}
.link-main:hover .link-note{
  color:var(--text);
}

/* mobile top layout fix */
@media (max-width:720px){
  .topnav{
    display:grid;
    grid-template-columns:1fr;
    align-items:start;
    gap:8px;
    height:auto;
    min-height:0;
    padding:10px 12px;
  }
  .nav-l{
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    width:100%;
    gap:8px;
    padding-top:2px;
  }
  .nav-r{
    position:absolute;
    top:10px;
    right:12px;
    max-width:calc(100vw - 86px);
    gap:5px;
  }
  .tabs{
    grid-column:1 / -1;
    order:initial;
    width:100%;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:5px;
  }
  .tab{
    min-width:0;
    padding:8px 4px;
    font-size:12px;
    line-height:1.15;
    white-space:nowrap;
  }
  .access-admin-btn{
    padding:6px 9px;
    font-size:11px;
  }
  .save-pill{
    max-width:64px;
    padding:5px 7px;
    font-size:9.5px;
  }
  .icon-btn{
    width:31px;
    height:31px;
    flex:0 0 31px;
  }
  .nav-r .user-area{
    max-width:116px;
    min-width:0;
    padding:3px 7px 3px 4px;
    gap:5px;
  }
  .nav-r .user-area .user-name{
    max-width:58px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .user-avatar{
    width:28px;
    height:28px;
  }
  .proj-toolbar{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    padding:10px 12px;
  }
  .proj-toolbar .btn-add-proj{
    order:1;
    width:100%;
  }
  .project-view-toggle{
    order:2;
    width:100%;
    margin-right:0;
  }
  .project-view-toggle + .btn-add-proj{
    order:1;
  }
}

@media (max-width:380px){
  .tab{font-size:11.5px;padding-left:2px;padding-right:2px}
  .nav-r .user-area .user-name{display:none}
  .nav-r .user-area{max-width:46px;padding-right:4px}
}


/* admin mobile overlap fix */
@media (max-width:720px){
  .admin-page{
    padding:12px;
    overflow-x:hidden;
  }
  .admin-page-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
    width:100%;
  }
  .admin-page-grid .admin-card{
    grid-column:auto!important;
    min-width:0;
    width:100%;
  }
  .admin-page .access-list,
  .admin-page .admin-client-list{
    min-width:0;
  }
  .admin-page .access-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
  }
  .admin-page .access-row > div:first-child,
  .admin-page .admin-client-row > div:first-child{
    min-width:0;
  }
  .admin-page .access-row strong,
  .admin-page .admin-client-row strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .admin-page .access-row span,
  .admin-page .admin-client-row span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .admin-page .access-actions{
    justify-content:flex-end;
    flex-wrap:wrap;
    max-width:132px;
  }
  .admin-page .access-color-input{
    width:30px;
    height:28px;
    flex-basis:30px;
  }
  .admin-page .access-role-select{
    min-width:72px;
    max-width:94px;
  }
  .admin-page .admin-client-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:center;
  }
  .admin-page .role-permission-panel{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .admin-page .role-permission-head,
  .admin-page .role-permission-row{
    grid-template-columns:52px repeat(5,46px);
    min-width:320px;
    gap:5px;
  }
  .admin-page .role-permission-head b{
    font-size:9.5px;
    line-height:1.15;
  }
  .admin-page .permission-check{
    height:28px;
  }
}

@media (max-width:380px){
  .admin-page .access-row,
  .admin-page .admin-client-row{
    grid-template-columns:minmax(0,1fr);
  }
  .admin-page .access-actions{
    max-width:none;
    justify-content:flex-start;
  }
}


/* daily timeline main view */
.day-timeline{min-width:920px;display:flex;flex-direction:column;gap:8px}
.day-time-head{display:grid;grid-template-columns:116px minmax(520px,1fr) 300px;gap:10px;align-items:end}
.day-time-axis{display:grid;grid-template-columns:repeat(13,1fr);font-family:var(--mono);font-size:10.5px;color:var(--text3);padding:0 4px}
.day-time-axis span{text-align:left}
.day-list-axis{font-size:11px;font-weight:900;color:var(--text3);text-align:left;padding:0 4px}

.day-timeline-row{display:grid;grid-template-columns:116px minmax(520px,1fr) 300px;gap:10px;min-height:var(--lane-height,74px)}
.day-member{background:var(--bg2);border:1px solid var(--bd2);border-radius:12px;padding:12px 10px;display:grid;grid-template-columns:8px minmax(0,1fr);grid-template-rows:auto auto auto;gap:2px 8px;align-content:center;min-width:0}
.day-member span{grid-row:1/4;width:8px;border-radius:999px;background:var(--member-color,var(--accent))}
.day-member strong{font-size:13px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-member em{font-style:normal;font-family:var(--mono);font-size:10px;color:var(--text3)}
.day-member small{grid-column:2;display:none;font-size:10px;font-weight:900;color:#475569}
.day-member.clocked-out{background:linear-gradient(180deg,#e2e8f0,#cbd5e1);border-color:#94a3b8;box-shadow:inset 0 0 0 1px rgba(255,255,255,.58),0 10px 22px rgba(100,116,139,.18)}
.day-member.clocked-out span{background:#64748b!important}
.day-member.clocked-out strong{color:#334155}
.day-member.clocked-out small{display:none}
.day-clockout-btn{grid-column:2;justify-self:start;margin-top:6px;border:1px solid var(--bd2);border-radius:999px;background:var(--bg3);color:var(--text2);font-size:11px;font-weight:900;padding:5px 10px;cursor:pointer;box-shadow:0 4px 12px rgba(15,23,42,.05)}
.day-clockout-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.day-clockout-btn.done{background:#334155;border-color:#334155;color:#fff;box-shadow:0 6px 14px rgba(51,65,85,.18);cursor:pointer}
.day-clockout-btn.done:hover{background:#1f2937;border-color:#1f2937;color:#fff}
.day-lane{position:relative;min-height:var(--lane-height,74px);background:var(--bg2);border:1px solid var(--bd2);border-radius:12px;overflow:visible}
.day-hour-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(12,1fr);pointer-events:none}
.day-hour-grid i{border-left:1px solid var(--bd2)}
.day-hour-grid i:first-child{border-left:0}
.day-timeline-bar{position:absolute;left:var(--left);width:max(var(--width),92px);max-width:calc(100% - var(--left));top:var(--top,10px);min-width:42px;height:54px;border:1px solid var(--bd2);border-left:4px solid var(--member-color,var(--accent));border-radius:10px;background:var(--bg3);color:var(--text);padding:7px 58px 7px 9px;text-align:left;overflow:hidden;box-shadow:0 8px 18px rgba(15,23,42,.07)}
.day-timeline-bar:hover,.day-timeline-bar:focus-visible{transform:translateY(-1px);box-shadow:var(--soft-shadow-hover);overflow:visible;z-index:500}
.day-timeline-bar .dt-title{display:block;font-size:11px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-timeline-bar .dt-desc{display:block;font-size:10.5px;color:var(--text2);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-timeline-bar .dt-time{position:absolute;right:8px;top:50%;transform:translateY(-50%);max-width:46px;font-family:var(--mono);font-size:10px;font-weight:900;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(248,250,252,.94);border:1px solid var(--bd2);border-radius:999px;padding:4px 7px;box-shadow:0 3px 10px rgba(15,23,42,.08)}
.day-timeline-bar.held{opacity:.72;background:repeating-linear-gradient(135deg,var(--bg3),var(--bg3) 8px,var(--surf2) 8px,var(--surf2) 16px)}
.day-timeline-bar.done{border-left-color:#cbd5e1!important;background:#f8fafc;color:#64748b;box-shadow:none}
.day-timeline-bar[data-tip]:hover::after,.day-timeline-bar[data-tip]:focus-visible::after{content:attr(data-tip);position:absolute;left:0;bottom:calc(100% + 8px);z-index:1001;max-width:340px;width:max-content;white-space:normal;word-break:keep-all;line-height:1.45;background:rgba(15,23,42,.94);color:#fff;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:800;box-shadow:0 14px 30px rgba(15,23,42,.22);pointer-events:none}
.day-timeline-bar[data-tip]:hover::before,.day-timeline-bar[data-tip]:focus-visible::before{content:"";position:absolute;left:18px;bottom:calc(100% + 2px);z-index:1002;border:6px solid transparent;border-top-color:rgba(15,23,42,.94);pointer-events:none}
.day-empty{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--text3)}
.log-layout.held .log-done-btn{border-style:dashed}
.log-layout.held .log-count{background:var(--bg3);color:var(--text3)}
@media(max-width:720px){.daily-wrap{overflow-x:auto}.day-timeline{min-width:860px}.day-timeline-row{grid-template-columns:96px minmax(520px,1fr) 260px}.day-time-head{grid-template-columns:96px minmax(520px,1fr) 260px}}


/* hold timeline overlay */
.day-timeline-hold{position:absolute;left:var(--left);width:var(--width);top:var(--top,10px);height:54px;min-width:46px;border:1px solid rgba(100,116,139,.18);border-radius:10px;background:linear-gradient(180deg,rgba(148,163,184,.42),rgba(100,116,139,.36));z-index:3;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.28),0 8px 16px rgba(15,23,42,.06)}
.day-timeline-hold span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(31,41,55,.82);color:#fff;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:900;line-height:1;box-shadow:0 4px 10px rgba(15,23,42,.14)}
.day-clockout-overlay{position:absolute;left:var(--left);width:var(--width);top:0;bottom:0;z-index:60;background:rgba(148,163,184,.52);border-left:1px solid rgba(100,116,139,.24);border-radius:0 12px 12px 0;pointer-events:none;display:flex;align-items:center;justify-content:center;box-shadow:inset 1px 0 0 rgba(255,255,255,.35)}
.day-clockout-overlay span{background:rgba(31,41,55,.88);color:#fff;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:900;box-shadow:0 8px 18px rgba(15,23,42,.18)}
.day-timeline-bar{z-index:2}
.carry-over-body{display:flex!important;flex-direction:column;gap:12px!important}
.carry-over-lead,.carry-over-question{margin:0;color:var(--text);font-size:14px;font-weight:900}
.carry-over-list{display:flex;flex-direction:column;gap:8px}
.carry-over-item{width:100%;text-align:left;border:1px solid var(--bd2);background:var(--bg3);border-radius:10px;padding:11px 12px;color:var(--text);cursor:pointer}
.carry-over-item strong{display:block;font-size:13px;font-weight:900;margin-bottom:4px}
.carry-over-item span{display:block;font-size:12px;color:var(--text2);line-height:1.45}
.carry-over-item.active{border-color:var(--accent);box-shadow:0 0 0 3px rgba(79,70,229,.1);background:var(--adim)}

html[data-theme="dark"] .day-timeline-bar .dt-time{background:rgba(15,23,42,.9);border-color:rgba(255,255,255,.14);color:#f8fafc}

.resume-held-body{display:flex!important;flex-direction:column;gap:12px!important}
.resume-held-lead,.resume-held-question{margin:0;color:var(--text);font-size:14px;font-weight:900}
.resume-held-list{display:flex;flex-direction:column;gap:8px}
.resume-held-item{width:100%;text-align:left;border:1px solid var(--bd2);background:var(--bg3);border-radius:10px;padding:11px 12px;color:var(--text);cursor:pointer}
.resume-held-item strong{display:block;font-size:13px;font-weight:900;margin-bottom:4px}
.resume-held-item span{display:block;font-size:12px;color:var(--text2);line-height:1.45}
.resume-held-item.active{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}

/* log detail action layout */
#logDetailModal .modal-ft{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
#logDetailModal .modal-ft button{
  width:100%;
  min-width:0;
  white-space:nowrap;
  word-break:keep-all;
  line-height:1.2;
  padding:10px 8px;
  text-align:center;
}
#logDetailModal #ldResumeBtn{
  grid-column:span 2;
}
#logDetailModal #ldDoneBtn,
#logDetailModal .modal-ft button:last-child{
  grid-column:span 2;
}
@media (max-width:420px){
  #logDetailModal .modal-ft{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #logDetailModal #ldResumeBtn,
  #logDetailModal #ldDoneBtn,
  #logDetailModal .modal-ft button:last-child{
    grid-column:span 1;
  }
}


/* daily one-line list */
.day-work-list{min-height:var(--lane-height,74px);background:var(--bg2);border:1px solid var(--bd2);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px;overflow:visible}
.day-work-list-head{font-size:10px;font-weight:900;color:var(--text3);padding:0 2px 2px}
.day-work-list-item{position:relative;width:100%;display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:7px;border:1px solid var(--bd2);border-radius:9px;background:var(--bg3);padding:7px 8px;text-align:left;color:var(--text);cursor:pointer;min-width:0}
.day-work-list-item:hover,.day-work-list-item:focus-visible{border-color:var(--item-color,var(--accent));box-shadow:0 8px 18px rgba(15,23,42,.08);z-index:600}
.day-work-list-item .dw-dot{width:7px;height:22px;border-radius:999px;background:var(--item-color,var(--accent))}
.day-work-list-item .dw-main{min-width:0}
.day-work-list-item strong,.day-work-list-item em{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-work-list-item strong{font-size:11px;font-weight:900}
.day-work-list-item em{font-size:10px;font-style:normal;color:var(--text2);font-weight:700}
.day-work-list-item .dw-status{font-size:10px;font-weight:900;color:var(--text2);background:var(--surf2);border:1px solid var(--bd2);border-radius:999px;padding:3px 6px;white-space:nowrap}
.day-work-list-empty{font-size:11px;color:var(--text3);padding:14px 4px}
.day-work-list-item[data-tip]:hover::after,.day-work-list-item[data-tip]:focus-visible::after{content:attr(data-tip);position:absolute;right:0;bottom:calc(100% + 8px);z-index:1001;max-width:320px;width:max-content;white-space:normal;word-break:keep-all;line-height:1.45;background:rgba(15,23,42,.94);color:#fff;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:800;box-shadow:0 14px 30px rgba(15,23,42,.22);pointer-events:none}
.day-work-list-item[data-tip]:hover::before,.day-work-list-item[data-tip]:focus-visible::before{content:"";position:absolute;right:18px;bottom:calc(100% + 2px);z-index:1002;border:6px solid transparent;border-top-color:rgba(15,23,42,.94);pointer-events:none}

.day-work-list-item.planned{background:linear-gradient(180deg,rgba(248,250,252,.98),rgba(241,245,249,.95))}
.day-work-list-item .dw-status.planned{background:#eef2ff;border-color:#c7d2fe;color:#4338ca}


/* solid daily timeline bars */
.day-timeline-bar{
  height:36px!important;
  top:19px;
  border:0!important;
  border-left:0!important;
  border-radius:3px!important;
  background:#3f4a59!important;
  color:#fff!important;
  padding:7px 48px 7px 10px!important;
  box-shadow:none!important;
}
.day-timeline-bar:hover,
.day-timeline-bar:focus-visible{
  transform:none!important;
  box-shadow:none!important;
  overflow:hidden!important;
  z-index:2!important;
}
.day-timeline-bar .dt-title,
.day-timeline-bar .dt-desc{
  color:#fff!important;
  opacity:.96;
}
.day-timeline-bar .dt-desc{opacity:.72}
.day-timeline-bar .dt-time{
  right:8px!important;
  max-width:38px!important;
  border:0!important;
  background:transparent!important;
  color:#fff!important;
  box-shadow:none!important;
  padding:0!important;
  opacity:.95;
}
.day-timeline-bar.done{
  background:#9ca3af!important;
  color:#fff!important;
}
.day-timeline-bar[data-tip]:hover::after,
.day-timeline-bar[data-tip]:focus-visible::after,
.day-timeline-bar[data-tip]:hover::before,
.day-timeline-bar[data-tip]:focus-visible::before,
.day-work-list-item[data-tip]:hover::after,
.day-work-list-item[data-tip]:focus-visible::after,
.day-work-list-item[data-tip]:hover::before,
.day-work-list-item[data-tip]:focus-visible::before{
  display:none!important;
}
.floating-tip{
  position:fixed;
  left:0;
  top:0;
  z-index:99999;
  max-width:360px;
  width:max-content;
  white-space:normal;
  word-break:keep-all;
  line-height:1.45;
  background:rgba(15,23,42,.96);
  color:#fff;
  border-radius:10px;
  padding:9px 11px;
  font-size:12px;
  font-weight:800;
  box-shadow:0 14px 30px rgba(15,23,42,.24);
  pointer-events:none;
  opacity:0;
  transform:translateY(3px);
  transition:opacity .12s ease,transform .12s ease;
}
.floating-tip.show{
  opacity:1;
  transform:translateY(0);
}


/* timeline contrast refinement */
.day-hour-grid i{
  border-left-color:rgba(100,116,139,.18)!important;
}
.day-lane{
  background:#fff!important;
}
.day-timeline-bar{
  top:50%!important;
  transform:translateY(-50%)!important;
  background:#334155!important;
  color:#fff!important;
}
.day-timeline-bar:hover,
.day-timeline-bar:focus-visible{
  transform:none!important;
}
.day-timeline-bar.done{
  background:#64748b!important;
}
html[data-theme="dark"] .day-hour-grid i{
  border-left-color:rgba(148,163,184,.24)!important;
}
html[data-theme="dark"] .day-lane{
  background:#111827!important;
}
html[data-theme="dark"] .day-timeline-bar{
  background:#3f4a59!important;
}
html[data-theme="dark"] .day-timeline-bar.done{
  background:#9ca3af!important;
}


/* linked list hover and lighter theme tone */
.day-timeline-bar{
  background:#667085!important;
}
.day-timeline-bar.related-hover{
  background:#475467!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.36)!important;
}
.day-timeline-bar.done{
  background:#a3aab5!important;
}
html[data-theme="dark"] .day-timeline-bar{
  background:#3f4a59!important;
}
html[data-theme="dark"] .day-timeline-bar.related-hover{
  background:#566273!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.18)!important;
}
html[data-theme="dark"] .day-timeline-bar.done{
  background:#9ca3af!important;
}


/* done and hold status contrast */
.day-timeline-bar.held,
.day-timeline-bar.done{
  color:#111827!important;
}
.day-timeline-bar.held .dt-title,
.day-timeline-bar.held .dt-desc,
.day-timeline-bar.held .dt-time,
.day-timeline-bar.done .dt-title,
.day-timeline-bar.done .dt-desc,
.day-timeline-bar.done .dt-time{
  color:#111827!important;
}
.day-timeline-bar.held{
  background:#f3f4f6!important;
  box-shadow:inset 0 0 0 1px #cbd5e1!important;
}
.day-timeline-bar.done{
  background:#e5e7eb!important;
  box-shadow:inset 0 0 0 1px #9ca3af!important;
}
.day-timeline-bar.held.related-hover{
  background:#e2e8f0!important;
  box-shadow:inset 0 0 0 2px #94a3b8!important;
}
.day-timeline-bar.done.related-hover{
  background:#d1d5db!important;
  box-shadow:inset 0 0 0 2px #6b7280!important;
}
.day-work-list-item.hold .dw-status,
.day-work-list-item .dw-status.hold{
  background:#f3f4f6;
  border-color:#cbd5e1;
  color:#111827;
}
.day-work-list-item.done .dw-status,
.day-work-list-item .dw-status.done{
  background:#e5e7eb;
  border-color:#9ca3af;
  color:#111827;
}
html[data-theme="dark"] .day-timeline-bar.held,
html[data-theme="dark"] .day-timeline-bar.done{
  background:#334155!important;
  color:#fff!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)!important;
}
html[data-theme="dark"] .day-timeline-bar.held .dt-title,
html[data-theme="dark"] .day-timeline-bar.held .dt-desc,
html[data-theme="dark"] .day-timeline-bar.held .dt-time,
html[data-theme="dark"] .day-timeline-bar.done .dt-title,
html[data-theme="dark"] .day-timeline-bar.done .dt-desc,
html[data-theme="dark"] .day-timeline-bar.done .dt-time{
  color:#fff!important;
}
html[data-theme="dark"] .day-timeline-bar.held.related-hover,
html[data-theme="dark"] .day-timeline-bar.done.related-hover{
  background:#475569!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.24)!important;
}
html[data-theme="dark"] .day-work-list-item.hold .dw-status,
html[data-theme="dark"] .day-work-list-item .dw-status.hold,
html[data-theme="dark"] .day-work-list-item.done .dw-status,
html[data-theme="dark"] .day-work-list-item .dw-status.done{
  background:#334155;
  border-color:#475569;
  color:#fff;
}

/* done badge and dark contrast refresh */
.day-work-list-item.done .dw-status,
.day-work-list-item .dw-status.done,
.log-layout.done .log-count,
.month-log .log-layout.done .log-count,
.ds-info .log-layout.done .log-count{
  background:#dcfce7!important;
  border-color:#bbf7d0!important;
  color:#059669!important;
}

.day-work-list-item.hold .dw-status,
.day-work-list-item .dw-status.hold{
  background:#f3f4f6!important;
  border-color:#cbd5e1!important;
  color:#111827!important;
}

html[data-theme="dark"] .month-log:has(.log-layout.done),
html[data-theme="dark"] .month-day-detail-item:has(.log-layout.done),
html[data-theme="dark"] .daily-color-card:has(.log-layout.done){
  background:#111827!important;
  border-color:rgba(148,163,184,.28)!important;
  color:#e5e7eb!important;
}

html[data-theme="dark"] .month-log:has(.log-layout.done):hover,
html[data-theme="dark"] .month-day-detail-item:has(.log-layout.done):hover,
html[data-theme="dark"] .daily-color-card:has(.log-layout.done):hover{
  background:#172033!important;
}

html[data-theme="dark"] .log-layout.done,
html[data-theme="dark"] .log-layout.done .log-copy,
html[data-theme="dark"] .log-layout.done .log-worker,
html[data-theme="dark"] .log-layout.done .log-detail,
html[data-theme="dark"] .log-layout.done .log-detail strong,
html[data-theme="dark"] .month-log .log-layout.done .log-worker,
html[data-theme="dark"] .month-log .log-layout.done .log-detail,
html[data-theme="dark"] .month-log .log-layout.done .log-detail strong{
  color:#f8fafc!important;
  opacity:1!important;
}

html[data-theme="dark"] .log-layout.done .log-done-btn{
  background:#34d399!important;
  border-color:#34d399!important;
  color:#052e1a!important;
}

html[data-theme="dark"] .day-work-list-item.done .dw-status,
html[data-theme="dark"] .day-work-list-item .dw-status.done,
html[data-theme="dark"] .log-layout.done .log-count,
html[data-theme="dark"] .month-log .log-layout.done .log-count,
html[data-theme="dark"] .ds-info .log-layout.done .log-count{
  background:rgba(16,185,129,.18)!important;
  border-color:rgba(52,211,153,.38)!important;
  color:#6ee7b7!important;
}

html[data-theme="dark"] .day-work-list-item.hold .dw-status,
html[data-theme="dark"] .day-work-list-item .dw-status.hold{
  background:#334155!important;
  border-color:#475569!important;
  color:#fff!important;
}

html[data-theme="dark"] .month-log:not(:has(.log-layout.done)) .log-worker,
html[data-theme="dark"] .month-log:not(:has(.log-layout.done)) .log-detail,
html[data-theme="dark"] .month-log:not(:has(.log-layout.done)) .log-detail strong{
  color:#f8fafc!important;
}

/* dark daily weekly readability refresh */
html[data-theme="dark"] .task-bar-custom:has(.log-layout.done),
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done){
  background:#334155!important;
  border-color:rgba(148,163,184,.38)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 18px rgba(0,0,0,.18)!important;
}

html[data-theme="dark"] .task-bar-custom:has(.log-layout.done) .log-copy,
html[data-theme="dark"] .task-bar-custom:has(.log-layout.done) .log-worker,
html[data-theme="dark"] .task-bar-custom:has(.log-layout.done) .log-detail,
html[data-theme="dark"] .task-bar-custom:has(.log-layout.done) .log-detail strong,
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-copy,
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-worker,
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-detail,
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-detail strong{
  color:#f8fafc!important;
  opacity:1!important;
}

html[data-theme="dark"] .task-bar-custom:has(.log-layout.done) .log-count,
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-count{
  background:rgba(16,185,129,.18)!important;
  border-color:rgba(52,211,153,.38)!important;
  color:#6ee7b7!important;
}

html[data-theme="dark"] .task-bar-custom:has(.log-layout.done) .log-done-btn,
html[data-theme="dark"][data-daily-color-mode="full"] .task-bar-custom:has(.log-layout.done) .log-done-btn{
  background:#34d399!important;
  border-color:#34d399!important;
  color:#052e1a!important;
}

html[data-theme="dark"][data-daily-color-mode="full"] .month-log.daily-color-card:has(.log-layout.done),
html[data-theme="dark"][data-daily-color-mode="full"] .month-day-detail-item.daily-color-card:has(.log-layout.done),
html[data-theme="dark"][data-daily-color-mode="full"] .ds-item.daily-color-card:has(.log-layout.done),
html[data-theme="dark"] .month-log.daily-color-card:has(.log-layout.done),
html[data-theme="dark"] .month-day-detail-item.daily-color-card:has(.log-layout.done),
html[data-theme="dark"] .ds-item.daily-color-card:has(.log-layout.done){
  background:#111827!important;
  border-color:rgba(148,163,184,.3)!important;
  color:#f8fafc!important;
}

html[data-theme="dark"][data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-worker,
html[data-theme="dark"][data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-detail,
html[data-theme="dark"][data-daily-color-mode="full"] .daily-color-card:has(.log-layout.done) .log-detail strong,
html[data-theme="dark"] .daily-color-card:has(.log-layout.done) .log-worker,
html[data-theme="dark"] .daily-color-card:has(.log-layout.done) .log-detail,
html[data-theme="dark"] .daily-color-card:has(.log-layout.done) .log-detail strong{
  color:#f8fafc!important;
  opacity:1!important;
}

html[data-theme="dark"] .day-work-list-item.planned,
html[data-theme="dark"] .day-work-list-item.done{
  background:#1e293b!important;
  border-color:rgba(148,163,184,.3)!important;
  color:#f8fafc!important;
}

html[data-theme="dark"] .day-work-list-item.planned .dw-title,
html[data-theme="dark"] .day-work-list-item.planned .dw-desc,
html[data-theme="dark"] .day-work-list-item.done .dw-title,
html[data-theme="dark"] .day-work-list-item.done .dw-desc{
  color:#f8fafc!important;
  opacity:1!important;
}

html[data-theme="dark"] .day-work-list-item .dw-desc{
  color:#cbd5e1!important;
}

/* restore flat daily bar */
.day-timeline-bar{
  height:34px!important;
  border:0!important;
  border-left:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  outline:0!important;
  padding:6px 52px 6px 10px!important;
  overflow:hidden!important;
  transform:none!important;
}

.day-timeline-bar:hover,
.day-timeline-bar:focus-visible{
  transform:translateY(-50%)!important;
  box-shadow:none!important;
  border:0!important;
  outline:0!important;
  overflow:hidden!important;
  z-index:2!important;
}

.day-timeline-bar .dt-time{
  border:0!important;
  box-shadow:none!important;
  border-radius:2px!important;
  background:rgba(255,255,255,.22)!important;
}

.day-timeline-bar.active{
  background:#147d7c!important;
}

.day-timeline-bar.active.related-hover{
  background:#0f6f6e!important;
  box-shadow:none!important;
}

.day-timeline-bar.held,
.day-timeline-bar.done{
  background:#d1d5db!important;
  color:#111827!important;
  box-shadow:none!important;
}

.day-timeline-bar.held.related-hover,
.day-timeline-bar.done.related-hover{
  background:#c4cbd4!important;
  box-shadow:none!important;
}

.day-timeline-bar.held .dt-title,
.day-timeline-bar.held .dt-desc,
.day-timeline-bar.held .dt-time,
.day-timeline-bar.done .dt-title,
.day-timeline-bar.done .dt-desc,
.day-timeline-bar.done .dt-time{
  color:#111827!important;
}

html[data-theme="dark"] .day-timeline-bar.active,
html[data-theme="dark"] .day-timeline-bar.held,
html[data-theme="dark"] .day-timeline-bar.done{
  background:#334155!important;
  color:#fff!important;
  border:0!important;
  border-left:0!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .day-timeline-bar.active.related-hover,
html[data-theme="dark"] .day-timeline-bar.held.related-hover,
html[data-theme="dark"] .day-timeline-bar.done.related-hover{
  background:#475569!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .day-timeline-bar .dt-time{
  background:rgba(15,23,42,.28)!important;
  border:0!important;
}

/* daily related hover visibility refresh */
.day-timeline-bar.active.related-hover{
  background:#0a9f98!important;
  filter:saturate(1.28) brightness(1.08)!important;
  box-shadow:inset 0 0 0 999px rgba(255,255,255,.08)!important;
}
.day-timeline-bar.held.related-hover,
.day-timeline-bar.done.related-hover{
  background:#b6bec9!important;
  filter:saturate(1.08) brightness(.98)!important;
  box-shadow:inset 0 0 0 999px rgba(15,23,42,.08)!important;
}
html[data-theme="dark"] .day-timeline-bar.active.related-hover,
html[data-theme="dark"] .day-timeline-bar.held.related-hover,
html[data-theme="dark"] .day-timeline-bar.done.related-hover{
  background:#64748b!important;
  filter:brightness(1.18)!important;
  box-shadow:inset 0 0 0 999px rgba(255,255,255,.06)!important;
}

/* daily work status pill colors */
.day-work-list-item:not(.hold):not(.done):not(.planned) .dw-status{
  background:#dbeafe!important;
  border-color:#bfdbfe!important;
  color:#1d4ed8!important;
}
.day-work-list-item.hold .dw-status,
.day-work-list-item .dw-status.hold{
  background:#f1f5f9!important;
  border-color:#cbd5e1!important;
  color:#475569!important;
}
html[data-theme="dark"] .day-work-list-item:not(.hold):not(.done):not(.planned) .dw-status{
  background:rgba(59,130,246,.22)!important;
  border-color:rgba(96,165,250,.38)!important;
  color:#bfdbfe!important;
}
html[data-theme="dark"] .day-work-list-item.hold .dw-status,
html[data-theme="dark"] .day-work-list-item .dw-status.hold{
  background:#334155!important;
  border-color:#64748b!important;
  color:#e2e8f0!important;
}

/* daily active bar blue tone */
.day-timeline-bar.active{
  background:#bfdbfe!important;
  color:#0f172a!important;
}
.day-timeline-bar.active .dt-title,
.day-timeline-bar.active .dt-desc,
.day-timeline-bar.active .dt-time{
  color:#0f172a!important;
}
.day-timeline-bar.active.related-hover{
  background:#93c5fd!important;
  filter:saturate(1.08) brightness(1.02)!important;
}
html[data-theme="dark"] .day-timeline-bar.active{
  background:#334155!important;
  color:#f8fafc!important;
}
html[data-theme="dark"] .day-timeline-bar.active .dt-title,
html[data-theme="dark"] .day-timeline-bar.active .dt-desc,
html[data-theme="dark"] .day-timeline-bar.active .dt-time{
  color:#f8fafc!important;
}
html[data-theme="dark"] .day-timeline-bar.active.related-hover{
  background:#475569!important;
  filter:brightness(1.16)!important;
}


/* daily timeline right safe gutter */
.day-time-axis{
  width:94%!important;
  display:flex!important;
  justify-content:space-between!important;
  padding-right:0!important;
}
.day-hour-grid{
  inset:0 auto 0 0!important;
  width:94%!important;
}
.day-timeline-bar{
  width:var(--width)!important;
  min-width:0!important;
  max-width:calc(94% - var(--left))!important;
}


/* work link detail flow */
.link-main{
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  padding:0;
  min-width:0;
  cursor:pointer;
}
.link-item{cursor:pointer}
.link-detail-body .ld-row{padding:4px 0 12px;border-bottom:1px solid var(--bd2)}
.link-detail-body .ld-row:last-child{border-bottom:0}
.link-detail-url{font-family:var(--mono);font-size:12px;word-break:break-all;color:var(--text2)}
.link-detail-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.link-detail-actions button{width:100%;min-width:0;white-space:nowrap}
.link-detail-delete{color:var(--red)!important;border-color:var(--red)!important}
@media(max-width:420px){
  .link-detail-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* access list ordering */
.access-drag-handle{width:22px;height:30px;border:0;background:transparent;color:var(--text3);font-weight:900;letter-spacing:-3px;cursor:grab;flex:0 0 auto}
.access-drag-handle:active{cursor:grabbing}
.access-user-main{min-width:0;flex:1 1 auto}
.access-row[draggable="true"]{cursor:grab}
.access-row.dragging{opacity:.52}
.access-row.drop-target{box-shadow:0 0 0 2px rgba(79,70,229,.35),0 10px 24px rgba(15,23,42,.12)}
.admin-page .access-row{grid-template-columns:auto minmax(0,1fr) auto}
@media(max-width:720px){.admin-page .access-row{grid-template-columns:auto minmax(0,1fr)}.admin-page .access-actions{grid-column:2}}


/* admin client editing */
.admin-client-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
@media(max-width:720px){.admin-client-actions{justify-content:flex-start;flex-wrap:wrap}}


/* admin client edit modal */
.admin-client-edit-modal .modal-bd{grid-template-columns:1fr}
.client-edit-help{margin:0;color:var(--text3);font-size:12px;line-height:1.5}


/* daily stacked timeline fix */
.day-timeline-bar{
  top:var(--top,10px)!important;
  transform:none!important;
}
.day-timeline-bar:hover,
.day-timeline-bar:focus-visible{
  transform:none!important;
}


/* daily single-row timeline restore */
.day-timeline-row{
  min-height:74px!important;
}
.day-lane{
  min-height:74px!important;
}
.day-timeline-bar{
  top:50%!important;
  transform:translateY(-50%)!important;
}
.day-timeline-bar:hover,
.day-timeline-bar:focus-visible{
  transform:translateY(-50%)!important;
}


/* daily bar time label clarity */
.day-timeline-bar{
  padding-right:84px!important;
}
.day-timeline-bar .dt-time{
  max-width:72px!important;
}

/* log detail history */
.ld-history{display:flex;flex-direction:column;gap:7px}
.ld-history-item{display:grid;grid-template-columns:86px minmax(0,1fr);align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--bd2);border-radius:8px;background:var(--bg2)}
.ld-history-item span{font-size:11px;font-weight:700;color:var(--text3)}
.ld-history-item strong{font-size:13px;color:var(--text);font-weight:700;letter-spacing:0}
.ld-history-item.start{border-left:3px solid var(--accent)}
.ld-history-item.resume{border-left:3px solid #2563eb}
.ld-history-item.hold{border-left:3px solid #9ca3af}
.ld-history-item.done{border-left:3px solid var(--green)}
.ld-history-item.active{border-left:3px solid #60a5fa}
.ld-history-empty{padding:10px;border:1px dashed var(--bd);border-radius:8px;color:var(--text3);font-size:12px;text-align:center}
@media(max-width:420px){.ld-history-item{grid-template-columns:76px minmax(0,1fr);padding:8px}.ld-history-item strong{font-size:12px}}

/* draggable memo height handle */
.memo-resize-handle{
  height:16px;
  background:var(--bg2);
  border-bottom:1px solid var(--bd);
  cursor:ns-resize;
  position:relative;
  touch-action:none;
}
.memo-resize-handle::before{
  content:'';
  position:absolute;
  left:20px;
  right:20px;
  top:7px;
  height:2px;
  border-radius:999px;
  background:rgba(148,163,184,.28);
  transition:background .12s, height .12s;
}
.memo-resize-handle:hover::before,
.memo-resize-handle:focus-visible::before,
body.memo-resizing .memo-resize-handle::before{
  height:3px;
  background:rgba(79,70,229,.48);
}
.memo-resize-handle:focus-visible{outline:none;box-shadow:inset 0 0 0 2px rgba(79,70,229,.18)}
body.memo-resizing{user-select:none;cursor:ns-resize}


