/* ============================================================
   TickTick Clone — structural styles
   Uses the REAL TickTick theme variables (--color-* etc.)
   ============================================================ */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

* { box-sizing: border-box; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; outline: none; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(var(--color-grey), .18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--color-grey), .3); }
::-webkit-scrollbar-track { background: transparent; }

:root {
  --sidebar-w: 240px;
  --detail-w: 380px;
  --tt-radius: 10px;
}

/* ================= LAYOUT ================= */
.tt-app { display: flex; height: 100vh; width: 100vw; background: rgba(var(--color-main-background), 1); color: rgba(var(--color-grey), 1); }

/* ================= RAIL ================= */
.tt-rail {
  width: 48px;
  min-width: 48px;
  background: linear-gradient(180deg, rgba(var(--color-primary), .96), rgba(var(--color-primary), .84));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 14px;
  position: relative;
  z-index: 31;
  border-right: 1px solid rgba(0, 0, 0, .15);
}
.tt-rail-top { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tt-rail-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.tt-rail-bot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: auto; }
.tt-rail-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .12s, color .12s;
}
.tt-rail-btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.tt-rail-btn.on { background: rgba(255, 255, 255, .26); color: #fff; }
.tt-rail-btn svg { width: 19px; height: 19px; }
.tt-rail-btn.spinning svg { animation: railSpin .7s linear infinite; }
@keyframes railSpin { to { transform: rotate(360deg); } }
.tt-rail-avatar {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, .24);
}
.tt-rail-avatar:hover { background: rgba(255, 255, 255, .34); }
.tt-rail-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(var(--color-warn-red), 1);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 820px) {
  .tt-rail { display: none; }
}

/* ================= SIDEBAR ================= */
.tt-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: rgba(var(--color-left-sidebar-bg-color), 1);
  color: rgba(var(--color-left-sidebar-color), 1);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(var(--color-grey), .06);
  position: relative; z-index: 30;
  padding: 8px 10px 10px;
  user-select: none;
}
.tt-sidebar-head { display: flex; align-items: center; padding: 4px 6px 10px; gap: 6px; }
.tt-logo { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.tt-logo svg { width: 30px; height: 30px; border-radius: 8px; }
.tt-logo-name { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.tt-head-btn {
  width: 32px; height: 32px; border: none; background: transparent; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(var(--color-left-sidebar-color), .85);
}
.tt-head-btn:hover { background: rgba(var(--color-grey), .08); }
.tt-head-btn svg { width: 18px; height: 18px; }

.tt-search {
  display: flex; align-items: center; gap: 8px; margin: 4px 2px 10px;
  background: rgba(var(--color-grey), .06); border-radius: 10px;
  padding: 0 10px; height: 34px; color: rgba(var(--color-left-sidebar-color), .6);
}
.tt-search svg { width: 16px; height: 16px; flex: none; }
.tt-search input { flex: 1; border: none; background: transparent; font-size: 14px; color: rgba(var(--color-left-sidebar-color), 1); }
.tt-search input::placeholder { color: rgba(var(--color-left-sidebar-color), .45); }

.tt-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 0; }
.tt-nav::-webkit-scrollbar { width: 4px; }
.tt-nav-sec { margin-top: 14px; }
.tt-nav-sec-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 6px; font-size: 12px; font-weight: 500;
  color: rgba(var(--color-left-sidebar-color), .45);
  letter-spacing: .2px;
}
.tt-nav-sec-title button {
  border: none; background: transparent; color: rgba(var(--color-left-sidebar-color), .5);
  width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .12s;
}
.tt-nav-sec:hover .tt-nav-sec-title button { opacity: 1; }
.tt-nav-sec-title button:hover { background: rgba(var(--color-grey), .12); }
.tt-nav-sec-title button svg { width: 13px; height: 13px; }

.tt-nav-item {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500;
  color: rgba(var(--color-left-sidebar-color), .85);
  position: relative; margin-bottom: 1px;
}
.tt-nav-item:hover { background: rgba(var(--color-grey), .07); }
.tt-nav-item.active { background: rgba(var(--color-primary), .12); color: rgba(var(--color-primary), 1); font-weight: 600; }
.tt-nav-item .tt-ni-icon { width: 20px; height: 20px; flex: none; display: flex; align-items: center; justify-content: center; }
.tt-nav-item .tt-ni-icon svg { width: 19px; height: 19px; }
.tt-nav-item .tt-ni-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-nav-item .tt-ni-count {
  font-size: 12px; font-weight: 400; color: rgba(var(--color-left-sidebar-color), .5);
  background: rgba(var(--color-grey), .08); border-radius: 8px; padding: 1px 7px;
}
.tt-nav-item.active .tt-ni-count { color: rgba(var(--color-primary), 1); background: rgba(var(--color-primary), .12); }
.tt-nav-item .tt-ni-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }

.tt-sidebar-foot {
  border-top: 1px solid rgba(var(--color-grey), .07); padding-top: 8px; margin-top: 6px;
}
.tt-user {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer;
}
.tt-user:hover { background: rgba(var(--color-grey), .07); }
.tt-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(var(--color-primary), 1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex: none;
}
.tt-user-info { flex: 1; min-width: 0; }
.tt-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-user-sub { font-size: 11px; color: rgba(var(--color-left-sidebar-color), .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-user svg { width: 15px; height: 15px; color: rgba(var(--color-left-sidebar-color), .5); flex: none; }

/* ================= MAIN ================= */
.tt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: rgba(var(--color-main-background), 1); }

/* ================= TOP BAR ================= */
.tt-topbar {
  height: 48px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 20px; border-bottom: 1px solid rgba(var(--color-grey), .08);
  background: rgba(var(--color-card-bg), .85);
  backdrop-filter: blur(6px);
  position: relative; z-index: 20;
}
.tb-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tb-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-nav-btn { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: rgba(var(--color-grey), .55); display: flex; align-items: center; justify-content: center; }
.tb-nav-btn:hover { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .9); }
.tb-nav-btn svg { width: 16px; height: 16px; }
.tb-date { font-size: 14px; font-weight: 600; padding: 0 6px; white-space: nowrap; }
.tb-today-btn { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(var(--color-grey), .15); background: transparent; font-size: 13px; font-weight: 600; color: rgba(var(--color-grey), .75); }
.tb-today-btn:hover { background: rgba(var(--color-grey), .07); }
.tb-tabs { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; overflow: hidden; }
.tb-tab { height: 30px; padding: 0 12px; border-radius: 8px; border: none; background: transparent; font-size: 13.5px; font-weight: 600; color: rgba(var(--color-grey), .55); position: relative; }
.tb-tab:hover { color: rgba(var(--color-grey), .9); background: rgba(var(--color-grey), .06); }
.tb-tab.on { color: rgba(var(--color-primary), 1); }
.tb-tab.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -9px; height: 2.5px; border-radius: 2px; background: rgba(var(--color-primary), 1); }
.tb-right { display: flex; align-items: center; gap: 8px; flex: none; }
.tb-search { position: relative; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 16px; background: rgba(var(--color-grey), .06); color: rgba(var(--color-grey), .5); transition: box-shadow .15s, background .15s; }
.tb-search:focus-within { background: rgba(var(--color-grey), .04); box-shadow: 0 0 0 2px rgba(var(--color-primary), .25); }
.tb-search svg { width: 15px; height: 15px; flex: none; }
.tb-search input { width: 150px; border: none; background: transparent; font-size: 13.5px; color: rgba(var(--color-grey), 1); }
.tb-search input:focus { width: 210px; }
.tb-search input::placeholder { color: rgba(var(--color-grey), .45); }
.tb-bell { position: relative; width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: rgba(var(--color-grey), .6); display: flex; align-items: center; justify-content: center; }
.tb-bell:hover { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .9); }
.tb-bell svg { width: 18px; height: 18px; }
.tb-badge { position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: rgba(var(--color-warn-red), 1); color: #fff; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tb-avatar { width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(var(--color-primary), 1); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tb-avatar:hover { filter: brightness(1.08); }
.tt-search-pop { position: absolute; top: calc(100% + 6px); right: 0; width: 320px; max-height: 380px; overflow-y: auto; background: rgba(var(--color-card-bg), 1); border: 1px solid rgba(var(--color-grey), .12); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); z-index: 60; padding: 6px; }
.tt-search-pop .sp-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.tt-search-pop .sp-item:hover { background: rgba(var(--color-grey), .06); }
.tt-search-pop .sp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tt-search-pop .sp-title { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-search-pop .sp-empty { padding: 14px; text-align: center; font-size: 13px; color: rgba(var(--color-grey), .5); }

/* ================= BOARD ================= */
.tt-board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; min-height: 300px; }
.tt-board-col { flex: 0 0 260px; background: rgba(var(--color-grey), .03); border-radius: 14px; padding: 10px 10px 8px; border: 1px solid rgba(var(--color-grey), .06); transition: background .12s, border-color .12s; }
.tt-board-col.over { background: rgba(var(--color-primary), .07); border-color: rgba(var(--color-primary), .35); }
.bc-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 10px; }
.bc-head .bc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.bc-head .bc-name { flex: 1; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-head .bc-count { font-size: 12px; color: rgba(var(--color-grey), .45); }
.bc-list { display: flex; flex-direction: column; gap: 7px; min-height: 40px; }
.bc-empty { font-size: 12.5px; color: rgba(var(--color-grey), .4); text-align: center; padding: 14px 0; border: 1px dashed rgba(var(--color-grey), .15); border-radius: 10px; }
.tt-b-card { display: flex; gap: 8px; background: rgba(var(--color-card-bg), 1); border: 1px solid rgba(var(--color-grey), .08); border-radius: 11px; padding: 9px 10px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }.tt-b-card:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .08); }
.tt-b-card.done { opacity: .6; }
.tt-b-card.done .bc-title { text-decoration: line-through; color: rgba(var(--color-grey), .4); }
.tt-b-card .tt-check { margin-top: 1px; }
.bc-card-main { flex: 1; min-width: 0; }
.bc-title { font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.bc-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.bc-meta span { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: rgba(var(--color-grey), .5); }
.bc-meta svg { width: 11px; height: 11px; }
.bc-meta .bc-time.over { color: rgba(var(--color-warn-red), 1); }
.bc-tag { background: rgba(var(--color-primary), .1); color: rgba(var(--color-primary), 1); padding: 1px 6px; border-radius: 6px; }

/* ================= TIMELINE ================= */
.tt-tl-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 14px; }
.tt-tl-head button { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: rgba(var(--color-grey), .6); display: flex; align-items: center; justify-content: center; }
.tt-tl-head button:hover { background: rgba(var(--color-grey), .08); }
.tt-tl-head button svg { width: 16px; height: 16px; }
.tt-tl-range { font-size: 14px; font-weight: 600; padding: 0 8px; }
.tt-tl-wrap { overflow-x: auto; border: 1px solid rgba(var(--color-grey), .08); border-radius: 14px; background: rgba(var(--color-grey), .02); }
.tt-tl-grid { display: flex; min-width: max-content; }
.tt-tl-col { width: 96px; border-right: 1px solid rgba(var(--color-grey), .06); min-height: 320px; }
.tt-tl-col:last-child { border-right: none; }
.tt-tl-col.today { background: rgba(var(--color-primary), .045); }
.tt-tl-col .tl-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0 10px; border-bottom: 1px solid rgba(var(--color-grey), .08); }
.tt-tl-col .tl-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: rgba(var(--color-grey), .8); }
.tt-tl-col.today .tl-num { background: rgba(var(--color-primary), 1); color: #fff; }
.tt-tl-col .tl-dow { font-size: 11px; font-weight: 600; color: rgba(var(--color-grey), .5); }
.tt-tl-col .tl-day.wd .tl-dow { color: rgba(var(--color-warn-red), .6); }
.tt-tl-col .tl-cards { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.tt-tl-col .tl-none { height: 24px; }
.tt-tl-col .tt-b-card { box-shadow: none; }

.tt-view { flex: 1; overflow-y: auto; padding: 26px 34px 90px; min-width: 0; }
.tt-view-center { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }

.tt-view-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 2px 18px; }
.tt-view-title { font-size: 30px; font-weight: 700; line-height: 1.15; }
.tt-view-sub { font-size: 13px; color: rgba(var(--color-grey), .5); margin-top: 3px; }
.tt-view-head-right { display: flex; align-items: center; gap: 10px; }
.tt-vh-btn {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 8px; border: 1px solid rgba(var(--color-grey), .12);
  background: transparent; color: rgba(var(--color-grey), .7); font-size: 13px;
}
.tt-vh-btn:hover { background: rgba(var(--color-grey), .05); }
.tt-vh-btn svg { width: 14px; height: 14px; }
.tt-vh-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--color-primary); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; margin-left: 2px; }

/* batch action bar (multi-select) */
.tt-batch {
  position: sticky; bottom: 22px; z-index: 40; margin: 18px auto 0; width: max-content; max-width: 94%;
  display: flex; align-items: center; gap: 4px; padding: 6px 8px;
  background: #24262b; color: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}
.tt-batch button {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: none; border-radius: 8px;
  background: transparent; color: #fff; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.tt-batch button:hover { background: rgba(255, 255, 255, .12); }
.tt-batch button svg { width: 15px; height: 15px; }
.tt-batch-count { font-size: 13px; font-weight: 600; padding: 0 10px; }
.tt-batch .tt-batch-close { padding: 0 8px; }
.tt-task.tt-sel { background: rgba(var(--color-primary), .06); border-radius: 8px; }
.tt-task.tt-sel .tt-task-body { border-radius: 0; }
.tt-task.tt-sel .tt-check svg { opacity: 1; color: var(--color-primary); }
.tt-task.kb-sel { background: rgba(var(--color-primary), .08); border-radius: 8px; }
.tt-task.kb-sel .tt-task-body { border-radius: 0; }

/* group section */
.tt-group { margin-bottom: 6px; }
.tt-group-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 2px 6px; font-size: 14px; font-weight: 600;
  cursor: pointer; user-select: none;
}
.tt-group-head .tt-g-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.tt-group-head .tt-g-name { flex: 1; }
.tt-group-head .tt-g-count { font-size: 12px; font-weight: 400; color: rgba(var(--color-grey), .4); }
.tt-group-head .tt-g-chev { width: 14px; height: 14px; color: rgba(var(--color-grey), .4); transition: transform .15s; }
.tt-group.collapsed .tt-g-chev { transform: rotate(-90deg); }
.tt-group.collapsed .tt-task-list { display: none; }

/* ================= TASK ROW ================= */
.tt-task-list { }
.tt-task {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 2px 10px;
  border-radius: 10px; cursor: pointer; position: relative;
}
.tt-task:hover { background: rgba(var(--color-grey), .045); }
.tt-task.sel { background: rgba(var(--color-grey), .07); }
.tt-task.dragging { opacity: .4; }
.tt-check {
  width: 20px; height: 20px; border-radius: 50%; flex: none; cursor: pointer;
  border: 2px solid rgba(var(--color-grey), .28);
  display: flex; align-items: center; justify-content: center;
  background: transparent; padding: 0; transition: all .12s;
  color: transparent;
}
.tt-check:hover { border-color: rgba(var(--color-primary), 1); }
.tt-check svg { width: 12px; height: 12px; }
.tt-task.completed .tt-check { background: rgba(var(--color-primary), 1); border-color: rgba(var(--color-primary), 1); color: #fff; }
.tt-task-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.tt-task-title { font-size: 15px; line-height: 1.4; word-break: break-word; }
.tt-task.completed .tt-task-title { color: rgba(var(--color-grey), .38); text-decoration: line-through; }
.tt-task-tags { display: flex; gap: 4px; flex: none; }
.tt-task-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 6px; white-space: nowrap;
  background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .65);
}
.tt-task-tag.tagged { background: rgba(var(--color-primary), .12); color: rgba(var(--color-primary), 1); }
.tt-task-meta { display: flex; align-items: center; gap: 6px; flex: none; color: rgba(var(--color-grey), .45); font-size: 12px; }
.tt-task-meta .m-item { display: flex; align-items: center; gap: 3px; }
.tt-task-meta svg { width: 13px; height: 13px; }
.tt-task-meta .m-overdue { color: rgba(var(--color-warn-red), 1); }
.tt-task-meta .m-done-time { color: rgba(var(--color-grey), .38); }
.tt-task-flag { width: 12px; height: 12px; flex: none; }
.tt-task-menu {
  width: 26px; height: 26px; border-radius: 8px; border: none; background: transparent;
  color: rgba(var(--color-grey), .4); display: none; align-items: center; justify-content: center;
}
.tt-task-menu svg { width: 16px; height: 16px; }
.tt-task:hover .tt-task-menu { display: flex; }
.tt-task-menu:hover { background: rgba(var(--color-grey), .12); color: rgba(var(--color-grey), .8); }

.tt-subtask-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 40px;
  cursor: pointer; border-radius: 8px;
}
.tt-subtask-row:hover { background: rgba(var(--color-grey), .045); }
.tt-subtask-row .tt-check { width: 15px; height: 15px; border-width: 1.5px; }
.tt-subtask-row .tt-check svg { width: 9px; height: 9px; }
.tt-subtask-title { font-size: 14px; flex: 1; }
.tt-subtask-row.completed .tt-subtask-title { color: rgba(var(--color-grey), .38); text-decoration: line-through; }
.tt-subtask-row .tt-subtask-bullet { width: 6px; height: 6px; border-radius: 50%; background: rgba(var(--color-grey), .4); flex: none; margin-left: 4px; }
.tt-subtask-row.completed .tt-subtask-bullet { background: rgba(var(--color-primary), .5); }
.tt-d-checklist { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; color: rgba(var(--color-grey), .55); cursor: pointer; user-select: none; }
.tt-d-checklist input { accent-color: var(--color-primary); }
.tt-d-attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(var(--color-grey), .045); margin-bottom: 6px; }
.tt-d-attach .a-ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(var(--color-primary), .1); color: rgba(var(--color-primary), 1); display: flex; align-items: center; justify-content: center; }
.tt-d-attach .a-ico svg { width: 15px; height: 15px; }
.tt-d-attach .a-name { flex: 1; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-d-attach .a-size { font-size: 12px; color: rgba(var(--color-grey), .5); flex: none; }
.tt-d-attach .a-down { display: flex; color: rgba(var(--color-grey), .5); padding: 4px; border-radius: 6px; }
.tt-d-attach .a-down:hover { background: rgba(var(--color-grey), .12); color: rgba(var(--color-primary), 1); }
.tt-d-attach .a-down svg { width: 15px; height: 15px; }
.tt-d-attach .a-del { display: flex; padding: 4px; border-radius: 6px; border: none; background: transparent; color: rgba(var(--color-grey), .4); cursor: pointer; }
.tt-d-attach .a-del:hover { color: rgba(var(--color-warn-red), 1); }
.tt-d-attach .a-del svg { width: 13px; height: 13px; }

/* ================= QUICK ADD ================= */
.tt-quickadd {
  position: absolute; left: 34px; right: 34px; bottom: 22px; z-index: 40;
  background: rgba(var(--color-main-background), .98);
  border: 1px solid rgba(var(--color-grey), .12);
  border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
}
.tt-quickadd.focused { border-color: rgba(var(--color-primary), .5); box-shadow: 0 4px 14px rgba(var(--color-primary), .15); }
.tt-quickadd .tt-qa-add {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(var(--color-primary), 1);
  color: #fff; border: none; display: flex; align-items: center; justify-content: center; flex: none;
}
.tt-quickadd .tt-qa-add svg { width: 13px; height: 13px; }
.tt-quickadd input { flex: 1; border: none; background: transparent; font-size: 15px; color: rgba(var(--color-grey), 1); height: 28px; }
.tt-quickadd input::placeholder { color: rgba(var(--color-grey), .4); }
.tt-qa-chips { display: flex; gap: 4px; flex: none; }
.tt-qa-chip {
  display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 8px; border: none; font-size: 12px;
  background: rgba(var(--color-grey), .07); color: rgba(var(--color-grey), .65);
}
.tt-qa-chip:hover { background: rgba(var(--color-grey), .12); }
.tt-qa-chip.on { background: rgba(var(--color-primary), .13); color: rgba(var(--color-primary), 1); }
.tt-qa-chip svg { width: 13px; height: 13px; }
.tt-qa-chip .chip-close { width: 12px; height: 12px; color: rgba(var(--color-grey), .4); }

/* ================= DETAIL PANEL ================= */
.tt-detail {
  width: var(--detail-w); min-width: var(--detail-w);
  background: rgba(var(--color-main-background), 1);
  border-left: 1px solid rgba(var(--color-grey), .08);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .05);
  display: flex; flex-direction: column; position: relative; z-index: 50;
  animation: detailIn .18s ease;
  transition: width .18s ease, min-width .18s ease;
}
.tt-detail.full { width: 100vw; min-width: 100vw; position: fixed; inset: 0; z-index: 100; animation: none; }
@keyframes detailIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tt-detail-head { display: flex; align-items: center; padding: 18px 14px 0 20px; gap: 8px; }
.tt-detail-close { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: rgba(var(--color-grey), .5); display: flex; align-items: center; justify-content: center; }
.tt-detail-close:hover { background: rgba(var(--color-grey), .08); }
.tt-detail-close svg { width: 17px; height: 17px; }
.tt-detail-scroll { flex: 1; overflow-y: auto; padding: 6px 20px 24px; }
.tt-d-title-row { display: flex; align-items: flex-start; gap: 10px; }
.tt-d-check { width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 1px; border: 2px solid rgba(var(--color-grey), .3); background: transparent; color: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tt-d-check svg { width: 13px; height: 13px; }
.tt-d-check:hover { border-color: rgba(var(--color-primary), 1); }
.tt-task.completed .tt-d-check, .tt-d-check.done { background: rgba(var(--color-primary), 1); border-color: rgba(var(--color-primary), 1); color: #fff; }
.tt-d-title {
  flex: 1; font-size: 17px; font-weight: 600; line-height: 1.45; border: none; background: transparent;
  color: rgba(var(--color-grey), 1); resize: none; min-height: 26px;
}
.tt-d-title.completed { color: rgba(var(--color-grey), .38); text-decoration: line-through; }
.tt-d-section { margin-top: 18px; }
.tt-d-sec-title { font-size: 12px; font-weight: 600; color: rgba(var(--color-grey), .45); margin-bottom: 6px; letter-spacing: .3px; text-transform: uppercase; }
.tt-d-sub-add { display: flex; align-items: center; gap: 8px; color: rgba(var(--color-grey), .45); font-size: 14px; cursor: pointer; padding: 4px 0; border-radius: 6px; }
.tt-d-sub-add:hover { color: rgba(var(--color-primary), 1); }
.tt-d-sub-add svg { width: 14px; height: 14px; }
.tt-d-sub-input { display: flex; align-items: center; gap: 8px; }
.tt-d-sub-input input { flex: 1; border: none; border-bottom: 1px solid rgba(var(--color-primary), .6); background: transparent; font-size: 14px; padding: 4px 0; color: rgba(var(--color-grey), 1); }
.tt-d-desc { width: 100%; border: none; background: rgba(var(--color-grey), .05); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: rgba(var(--color-grey), 1); resize: vertical; min-height: 70px; }
.tt-d-desc::placeholder { color: rgba(var(--color-grey), .4); }
.tt-d-desc-preview { font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; cursor: text; padding: 4px 2px; color: rgba(var(--color-grey), .85); }
.tt-d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-d-chip {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 8px; font-size: 13px; cursor: pointer; user-select: none;
  background: rgba(var(--color-grey), .06); color: rgba(var(--color-grey), .75);
  border: 1px solid transparent;
}
.tt-d-chip:hover { background: rgba(var(--color-grey), .1); }
.tt-d-chip.on { background: rgba(var(--color-primary), .12); color: rgba(var(--color-primary), 1); border-color: rgba(var(--color-primary), .3); }
.tt-d-chip svg { width: 14px; height: 14px; }
.tt-d-chip .chip-close { width: 12px; height: 12px; color: rgba(var(--color-grey), .4); }
.tt-d-chip .chip-close:hover { color: rgba(var(--color-warn-red), 1); }
.tt-d-comments { display: flex; flex-direction: column; gap: 10px; }
.tt-d-comment { display: flex; gap: 8px; }
.tt-d-comment .c-avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(var(--color-primary), 1); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.tt-d-comment .c-body { flex: 1; min-width: 0; }
.tt-d-comment .c-head { font-size: 12px; color: rgba(var(--color-grey), .5); display: flex; gap: 6px; align-items: baseline; }
.tt-d-comment .c-head b { color: rgba(var(--color-grey), .85); font-weight: 600; }
.tt-d-comment .c-text { font-size: 13.5px; line-height: 1.45; margin-top: 2px; word-break: break-word; }
.tt-d-comment-input { display: flex; gap: 8px; align-items: center; }
.tt-d-comment-input input { flex: 1; border: 1px solid rgba(var(--color-grey), .15); border-radius: 18px; background: rgba(var(--color-grey), .04); padding: 7px 14px; font-size: 13.5px; color: rgba(var(--color-grey), 1); }
.tt-d-comment-input input:focus { border-color: rgba(var(--color-primary), .5); }
.tt-d-activity { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: rgba(var(--color-grey), .5); }
.tt-d-activity .a-item { display: flex; gap: 8px; align-items: baseline; }
.tt-d-activity .a-item svg { width: 12px; height: 12px; flex: none; transform: translateY(1px); }

.tt-d-footer {
  display: flex; align-items: center; gap: 2px; padding: 10px 16px;
  border-top: 1px solid rgba(var(--color-grey), .08);
}
.tt-d-footer button {
  width: 34px; height: 34px; border-radius: 10px; border: none; background: transparent;
  color: rgba(var(--color-grey), .55); display: flex; align-items: center; justify-content: center; position: relative;
}
.tt-d-footer button:hover { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .9); }
.tt-d-footer button svg { width: 18px; height: 18px; }
.tt-d-footer button .badge {
  position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(var(--color-warn-red), 1);
}
.tt-d-footer .spacer { flex: 1; }
.tt-d-footer .del { color: rgba(var(--color-warn-red), .8); }
.tt-d-footer .del:hover { background: rgba(var(--color-warn-red), .1); }

/* ================= CALENDAR (view) ================= */
.tt-cal-head { display: flex; align-items: center; gap: 10px; }
.tt-cal-nav { display: flex; align-items: center; gap: 2px; }
.tt-cal-nav button { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: rgba(var(--color-grey), .6); display: flex; align-items: center; justify-content: center; }
.tt-cal-nav button:hover { background: rgba(var(--color-grey), .08); }
.tt-cal-nav button svg { width: 16px; height: 16px; }
.tt-cal-month { font-size: 18px; font-weight: 600; min-width: 150px; text-align: center; }
.tt-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; border: 1px solid rgba(var(--color-grey), .08); border-radius: 12px; overflow: hidden; }
.tt-cal-dow { padding: 8px 4px; text-align: center; font-size: 12px; font-weight: 600; color: rgba(var(--color-grey), .5); background: rgba(var(--color-grey), .03); }
.tt-cal-cell { min-height: 96px; border-right: 1px solid rgba(var(--color-grey), .06); border-bottom: 1px solid rgba(var(--color-grey), .06); padding: 4px; cursor: pointer; background: transparent; overflow: hidden; }
.tt-cal-cell:nth-child(7n) { border-right: none; }
.tt-cal-cell.other { background: rgba(var(--color-grey), .02); }
.tt-cal-cell .c-day { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 500; color: rgba(var(--color-grey), .75); }
.tt-cal-cell.today .c-day { background: rgba(var(--color-primary), 1); color: #fff; font-weight: 600; }
.tt-cal-cell.selected { box-shadow: inset 0 0 0 2px rgba(var(--color-primary), .55); }
.tt-cal-task {
  display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 6px; border-radius: 6px;
  margin-top: 2px; cursor: pointer; white-space: nowrap; overflow: hidden;
  background: rgba(var(--color-primary), .12); color: rgba(var(--color-grey), .85);
  height: 20px;
}
.tt-cal-task:hover { filter: brightness(.96); }
.tt-cal-task .ct-check { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.tt-cal-task.done .ct-check { background: currentColor; }
.tt-cal-task.done { text-decoration: line-through; opacity: .55; }
.tt-cal-more { font-size: 12px; color: rgba(var(--color-grey), .5); padding: 2px 6px; cursor: pointer; }
.tt-cal-more:hover { color: rgba(var(--color-primary), 1); }
.tt-cal-modes { display: flex; gap: 2px; background: rgba(var(--color-grey), .07); padding: 3px; border-radius: 10px; }
.tt-cal-mode { height: 28px; padding: 0 14px; border: none; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: rgba(var(--color-grey), .6); background: transparent; }
.tt-cal-mode.on { background: rgba(var(--color-main-background), 1); color: rgba(var(--color-primary), 1); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.tt-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.tt-cal-wcol { border: 1px solid rgba(var(--color-grey), .08); border-radius: 12px; overflow: hidden; background: rgba(var(--color-grey), .02); min-height: 300px; }
.tt-cal-wcol.today { border-color: rgba(var(--color-primary), .4); background: rgba(var(--color-primary), .03); }
.tt-cal-wcol .wc-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-bottom: 1px solid rgba(var(--color-grey), .08); }
.tt-cal-wcol .wc-dow { font-size: 11px; font-weight: 600; color: rgba(var(--color-grey), .5); }
.tt-cal-wcol.today .wc-dow { color: rgba(var(--color-primary), 1); }
.tt-cal-wcol .wc-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: rgba(var(--color-grey), .8); }
.tt-cal-wcol.today .wc-num { background: rgba(var(--color-primary), 1); color: #fff; }
.tt-cal-wcol .wc-list { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.tt-cal-wcol .wc-empty { display: flex; align-items: center; justify-content: center; color: rgba(var(--color-grey), .3); cursor: pointer; border: 1px dashed rgba(var(--color-grey), .15); border-radius: 8px; padding: 12px 0; }
.tt-cal-wcol .wc-empty:hover { color: rgba(var(--color-primary), 1); border-color: rgba(var(--color-primary), .4); }
.tt-cal-wcol .wc-empty svg { width: 15px; height: 15px; }
.tt-cal-wcol .wc-task { display: flex; gap: 6px; align-items: flex-start; }
.tt-cal-wcol .wc-task .wc-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-cal-wcol .wc-time { font-size: 10.5px; opacity: .8; flex: none; }
.tt-cal-agenda { margin-top: 16px; }

/* mini calendar (Upcoming left panel) */
.tt-minical {
  border: 1px solid rgba(var(--color-grey), .1); border-radius: 12px; padding: 10px;
  background: rgba(var(--color-sidebar-bg-color), 1);
}
.tt-minical-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tt-minical-head .m-title { font-size: 13px; font-weight: 600; }
.tt-minical-head button { width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; color: rgba(var(--color-grey), .6); display: flex; align-items: center; justify-content: center; }
.tt-minical-head button:hover { background: rgba(var(--color-grey), .1); }
.tt-minical-head button svg { width: 14px; height: 14px; }
.tt-minical-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.tt-minical-grid .dow { text-align: center; font-size: 10.5px; color: rgba(var(--color-grey), .5); padding: 3px 0; font-weight: 600; }
.tt-minical-cell { text-align: center; font-size: 12.5px; padding: 4px 0; border-radius: 6px; cursor: pointer; color: rgba(var(--color-grey), .75); }
.tt-minical-cell:hover { background: rgba(var(--color-grey), .1); }
.tt-minical-cell.today { color: rgba(var(--color-primary), 1); font-weight: 700; }
.tt-minical-cell.sel { background: rgba(var(--color-primary), 1); color: #fff; font-weight: 600; }
.tt-minical-cell.dim { color: rgba(var(--color-grey), .3); }
.tt-minical-cell .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(var(--color-primary), .8); margin: 1px auto 0; }

/* ================= HABITS ================= */
.tt-habit-grid-wrap { border: 1px solid rgba(var(--color-grey), .08); border-radius: 12px; overflow: hidden; background: rgba(var(--color-main-background), 1); }
.tt-habit-grid { display: grid; grid-template-columns: 210px repeat(7, 1fr); }
.tt-habit-corner { grid-column: 1; }
.tt-habit-dow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 4px; font-size: 13px; font-weight: 600; color: rgba(var(--color-grey), .75); border-left: 1px solid rgba(var(--color-grey), .06); background: rgba(var(--color-grey), .02); }
.tt-habit-dow .d-num { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; color: rgba(var(--color-grey), .55); }
.tt-habit-dow.today .d-num { background: rgba(var(--color-primary), 1); color: #fff; font-weight: 600; }
.tt-habit-row { display: contents; }
.tt-habit-row .h-name-cell { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid rgba(var(--color-grey), .05); min-width: 0; }
.tt-habit-row .h-name-cell .h-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.tt-habit-row .h-name-cell .h-icon svg { width: 15px; height: 15px; }
.tt-habit-row .h-name-cell .h-info { min-width: 0; }
.tt-habit-row .h-name-cell .h-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-habit-row .h-name-cell .h-times { font-size: 11.5px; color: rgba(var(--color-grey), .5); }
.tt-habit-row .h-name-cell .h-streak { display: flex; align-items: center; gap: 3px; margin-left: auto; font-size: 12px; font-weight: 700; color: rgba(var(--color-warn-red), 1); }
.tt-habit-row .h-name-cell .h-streak svg { width: 14px; height: 14px; }
.tt-habit-cell { border-left: 1px solid rgba(var(--color-grey), .05); border-top: 1px solid rgba(var(--color-grey), .05); display: flex; align-items: center; justify-content: center; padding: 6px; }
.tt-habit-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(var(--color-grey), .2);
  background: transparent; color: transparent; display: flex; align-items: center; justify-content: center;
  transition: all .12s; padding: 0;
}
.tt-habit-check svg { width: 14px; height: 14px; }
.tt-habit-check:hover { border-color: rgba(var(--color-grey), .4); }
.tt-habit-check.done { border-color: var(--hcolor, rgba(var(--color-primary), 1)); background: var(--hcolor, rgba(var(--color-primary), 1)); color: #fff; }
.tt-habit-frac { font-size: 12px; color: rgba(var(--color-grey), .6); text-align: center; }
.tt-habit-stats { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.tt-habit-stat { flex: 1; min-width: 150px; border: 1px solid rgba(var(--color-grey), .08); border-radius: 12px; padding: 14px 16px; }
.tt-habit-stat .s-title { font-size: 12px; color: rgba(var(--color-grey), .5); font-weight: 500; }
.tt-habit-stat .s-value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.tt-habit-stat .s-sub { font-size: 12px; color: rgba(var(--color-grey), .45); margin-top: 2px; }
.tt-habit-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-top: 8px; }
.tt-habit-bar { flex: 1; border-radius: 4px 4px 0 0; background: rgba(var(--color-primary), .75); min-height: 2px; position: relative; }
.tt-habit-bar.empty { background: rgba(var(--color-grey), .1); }
.tt-habit-bar .bar-tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 10.5px; background: rgba(var(--color-grey), .85); color: rgba(var(--color-white), 1); padding: 2px 6px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .1s; }
.tt-habit-bar:hover .bar-tip { opacity: 1; }

/* ================= POMODORO ================= */
.tt-pomo-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 6vh; }
.tt-pomo-tabs { display: flex; gap: 4px; background: rgba(var(--color-grey), .07); padding: 4px; border-radius: 12px; }
.tt-pomo-tab { height: 34px; padding: 0 18px; border-radius: 9px; border: none; font-size: 14px; font-weight: 600; color: rgba(var(--color-grey), .6); background: transparent; }
.tt-pomo-tab.on { background: rgba(var(--color-main-background), 1); color: rgba(var(--color-primary), 1); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.tt-pomo-ring { position: relative; width: 300px; height: 300px; margin: 40px 0 30px; }
.tt-pomo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tt-pomo-ring .ring-bg { fill: none; stroke: rgba(var(--color-grey), .1); stroke-width: 10; }
.tt-pomo-ring .ring-fg { fill: none; stroke: rgba(var(--color-primary), 1); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.tt-pomo-time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tt-pomo-time .t-main { font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.tt-pomo-time .t-state { font-size: 14px; color: rgba(var(--color-grey), .5); margin-top: 2px; font-weight: 500; }
.tt-pomo-btns { display: flex; gap: 10px; }
.tt-pomo-btn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 26px; border-radius: 12px; border: none; font-size: 15px; font-weight: 600; }
.tt-pomo-btn svg { width: 17px; height: 17px; }
.tt-pomo-btn.primary { background: rgba(var(--color-primary), 1); color: #fff; }
.tt-pomo-btn.primary:hover { filter: brightness(1.06); }
.tt-pomo-btn.ghost { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .8); }
.tt-pomo-btn.ghost:hover { background: rgba(var(--color-grey), .13); }
.tt-pomo-stats { display: flex; gap: 14px; margin-top: 40px; width: 100%; max-width: 720px; }
.tt-pomo-stat { flex: 1; border: 1px solid rgba(var(--color-grey), .08); border-radius: 12px; padding: 14px 18px; }
.tt-pomo-stat .s-title { font-size: 12px; color: rgba(var(--color-grey), .5); }
.tt-pomo-stat .s-value { font-size: 24px; font-weight: 700; margin-top: 3px; }

/* ================= TRASH / SEARCH ================= */
/* ================= SUMMARY ================= */
.tt-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tt-s-card {
  border: 1px solid rgba(var(--color-grey), .08);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(var(--color-card-bg), 1);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.tt-s-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); border-color: rgba(var(--color-primary), .35); }
.tt-s-card .s-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--color-primary), .12); color: rgba(var(--color-primary), 1); display: flex; align-items: center; justify-content: center; }
.tt-s-card .s-ic svg { width: 15px; height: 15px; }
.tt-s-card .s-t { font-size: 12px; font-weight: 600; color: rgba(var(--color-grey), .5); margin-top: 10px; }
.tt-s-card .s-v { font-size: 24px; font-weight: 700; margin-top: 2px; line-height: 1.1; }
.tt-s-card .s-s { font-size: 12px; color: rgba(var(--color-grey), .45); margin-top: 3px; }
.tt-summary-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tt-summary-panel {
  border: 1px solid rgba(var(--color-grey), .08);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(var(--color-card-bg), 1);
  margin-top: 14px;
  cursor: pointer;
}
.tt-summary-panel:hover { border-color: rgba(var(--color-primary), .35); }
.tt-summary-panel .sp-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tt-summary-panel .sp-title svg { width: 16px; height: 16px; color: rgba(var(--color-primary), 1); }
.tt-s-bar-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin: 8px 0 6px; }
.tt-s-bar-row .sbr-label { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.tt-s-bar-row .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.tt-s-bar-row .sbr-val { font-size: 12.5px; color: rgba(var(--color-grey), .55); flex: none; }
.tt-s-bar { height: 6px; border-radius: 4px; background: rgba(var(--color-grey), .1); overflow: hidden; }
.tt-s-bar-fill { height: 100%; border-radius: 4px; background: rgba(var(--color-primary), 1); transition: width .3s; }
.tt-s-meta { font-size: 12.5px; color: rgba(var(--color-grey), .5); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.tt-s-meta svg { width: 13px; height: 13px; color: rgba(var(--color-warn-red), 1); }
.tt-s-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-s-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(var(--color-grey), .15);
  background: transparent;
  font-size: 13px;
  color: rgba(var(--color-grey), .8);
  cursor: pointer;
}
.tt-s-chip:hover { border-color: rgba(var(--color-primary), .6); color: rgba(var(--color-primary), 1); background: rgba(var(--color-primary), .05); }
.tt-s-chip svg { width: 13px; height: 13px; }
.tt-s-chip b { font-weight: 700; color: rgba(var(--color-grey), .45); }
.tt-s-chip:hover b { color: rgba(var(--color-primary), 1); }

/* ================= SEARCH MODAL ================= */
.tt-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  animation: fadeIn .12s ease;
}
.tt-search-modal {
  width: min(640px, 96vw);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: rgba(var(--color-card-bg), 1);
  border: 1px solid rgba(var(--color-grey), .12);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  overflow: hidden;
  animation: popIn .14s ease;
}
.tt-search-modal-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid rgba(var(--color-grey), .1);
  color: rgba(var(--color-grey), .5);
  flex: none;
}
.tt-search-modal-input > svg { width: 18px; height: 18px; flex: none; }
.tt-search-modal-input input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 16px;
  color: rgba(var(--color-grey), 1);
  height: 42px;
}
.tt-search-modal-input input::placeholder { color: rgba(var(--color-grey), .4); }
.tt-search-modal-clear {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(var(--color-grey), .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tt-search-modal-clear:hover { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .9); }
.tt-search-modal-clear svg { width: 15px; height: 15px; }
.tt-search-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(var(--color-grey), .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tt-search-modal-close:hover { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .9); }
.tt-search-modal-close svg { width: 15px; height: 15px; }
.tt-search-modal-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
  flex: none;
}
.tt-search-modal-chips button {
  height: 26px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(var(--color-grey), .15);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: rgba(var(--color-grey), .6);
}
.tt-search-modal-chips button:hover { border-color: rgba(var(--color-primary), .5); color: rgba(var(--color-primary), 1); }
.tt-search-modal-chips button.on { background: rgba(var(--color-primary), .12); border-color: rgba(var(--color-primary), .35); color: rgba(var(--color-primary), 1); }
.tt-search-modal-body { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.tt-search-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid rgba(var(--color-grey), .08);
  font-size: 11.5px;
  color: rgba(var(--color-grey), .5);
  flex: none;
}
.tt-search-hist { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 6px 10px; }
.tt-search-hist .tt-s-chip { height: 30px; }
.tt-search-sec { margin-bottom: 4px; }
.tt-search-sec-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: rgba(var(--color-grey), .45);
  padding: 10px 8px 4px;
}
.tt-search-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 6px 4px;
  padding: 10px 12px;
  border: 1px dashed rgba(var(--color-grey), .25);
  border-radius: 10px;
  font-size: 13.5px;
  color: rgba(var(--color-grey), .75);
  cursor: pointer;
}
.tt-search-add:hover { border-color: rgba(var(--color-primary), .6); color: rgba(var(--color-primary), 1); background: rgba(var(--color-primary), .04); }
.tt-search-add svg { width: 14px; height: 14px; flex: none; }
.tt-search-add b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-task-title mark, mark {
  background: rgba(var(--color-primary), .22);
  color: rgba(var(--color-primary), 1);
  border-radius: 3px;
  padding: 0 1px;
}

/* ================= HELP ================= */
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; padding: 4px 0; }
.help-row { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.help-row code {
  min-width: 86px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(var(--color-grey), .07);
  font-size: 12px;
  font-weight: 600;
  color: rgba(var(--color-grey), .85);
  text-align: center;
}
.help-row span { font-size: 13.5px; color: rgba(var(--color-grey), .75); }
@media (max-width: 720px) {
  .help-grid { grid-template-columns: 1fr; }
}

/* ================= EMPTY ================= */
.tt-empty { text-align: center; padding: 60px 20px; }
.tt-empty .e-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: rgba(var(--color-grey), .06); display: flex; align-items: center; justify-content: center; color: rgba(var(--color-grey), .3); }
.tt-empty .e-icon svg { width: 30px; height: 30px; }
.tt-empty .e-title { font-size: 16px; font-weight: 600; }
.tt-empty .e-desc { font-size: 13px; color: rgba(var(--color-grey), .5); margin-top: 4px; }
.tt-trash-actions { display: flex; gap: 8px; }

/* ================= MODALS ================= */
.tt-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s ease;
}
.tt-overlay.light { background: rgba(0, 0, 0, .2); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tt-modal {
  background: rgba(var(--color-main-background), 1); color: rgba(var(--color-grey), 1);
  border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  min-width: 380px; max-width: 520px; width: 90%;
  animation: popIn .16s ease;
  display: flex; flex-direction: column; max-height: 84vh;
}
@keyframes popIn { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.tt-modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 8px; }
.tt-modal-head .m-title { flex: 1; font-size: 17px; font-weight: 700; }
.tt-modal-close { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: rgba(var(--color-grey), .5); display: flex; align-items: center; justify-content: center; }
.tt-modal-close:hover { background: rgba(var(--color-grey), .08); }
.tt-modal-close svg { width: 16px; height: 16px; }
.tt-modal-body { padding: 8px 20px; overflow-y: auto; flex: 1; }
.tt-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; }

.tt-input {
  width: 100%; height: 38px; border: 1px solid rgba(var(--color-grey), .16); border-radius: 10px;
  background: rgba(var(--color-grey), .04); padding: 0 12px; font-size: 14px; color: rgba(var(--color-grey), 1);
}
.tt-input:focus { border-color: rgba(var(--color-primary), .7); box-shadow: 0 0 0 3px rgba(var(--color-primary), .12); }
.tt-label { font-size: 12.5px; font-weight: 600; color: rgba(var(--color-grey), .6); margin: 14px 0 6px; display: block; }
.tt-btn {
  height: 36px; padding: 0 18px; border-radius: 10px; border: none; font-size: 14px; font-weight: 600;
}
.tt-btn.primary { background: rgba(var(--color-primary), 1); color: #fff; }
.tt-btn.primary:hover { filter: brightness(1.07); }
.tt-btn.ghost { background: rgba(var(--color-grey), .08); color: rgba(var(--color-grey), .85); }
.tt-btn.ghost:hover { background: rgba(var(--color-grey), .14); }
.tt-btn.danger { background: rgba(var(--color-warn-red), .1); color: rgba(var(--color-warn-red), 1); }
.tt-btn.danger:hover { background: rgba(var(--color-warn-red), .18); }
.tt-btn:disabled { opacity: .5; cursor: not-allowed; }

/* color swatches */
.tt-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.tt-swatch.sel { border-color: rgba(var(--color-grey), .7); box-shadow: 0 0 0 2px rgba(var(--color-main-background), 1); }

/* ================= POPOVERS / MENUS ================= */
.tt-popover {
  position: fixed; z-index: 400; background: rgba(var(--color-main-background), 1);
  border: 1px solid rgba(var(--color-grey), .12); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .14); padding: 6px;
  animation: popIn .13s ease; min-width: 180px; max-height: 70vh; overflow-y: auto;
}
.tt-menu-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px;
  border-radius: 8px; cursor: pointer; font-size: 13.5px; color: rgba(var(--color-grey), .9);
  white-space: nowrap;
}
.tt-menu-item:hover { background: rgba(var(--color-grey), .08); }
.tt-menu-item svg { width: 16px; height: 16px; color: rgba(var(--color-grey), .6); }
.tt-menu-item.danger { color: rgba(var(--color-warn-red), 1); }
.tt-menu-item.danger svg { color: rgba(var(--color-warn-red), 1); }
.tt-menu-item .m-right { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 12px; color: rgba(var(--color-grey), .45); }
.tt-menu-sep { height: 1px; background: rgba(var(--color-grey), .08); margin: 5px 8px; }
.tt-menu-head { font-size: 12px; font-weight: 600; color: rgba(var(--color-grey), .5); padding: 6px 10px 4px; }

.tt-picker { width: 260px; }
.tt-picker .p-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.tt-picker .p-head .p-title { font-size: 14px; font-weight: 600; }
.tt-picker .p-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.tt-picker .p-cell { height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; cursor: pointer; color: rgba(var(--color-grey), .8); }
.tt-picker .p-cell:hover { background: rgba(var(--color-grey), .1); }
.tt-picker .p-cell.today { color: rgba(var(--color-primary), 1); font-weight: 700; }
.tt-picker .p-cell.sel { background: rgba(var(--color-primary), 1); color: #fff; font-weight: 600; }
.tt-picker .p-cell.dim { color: rgba(var(--color-grey), .3); }
.tt-picker .p-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(var(--color-grey), .08); }
.tt-picker .p-quick button { height: 30px; border-radius: 8px; border: none; background: rgba(var(--color-grey), .07); color: rgba(var(--color-grey), .8); font-size: 12.5px; }
.tt-picker .p-quick button:hover { background: rgba(var(--color-grey), .12); }
.tt-picker .p-time-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tt-picker .p-time-row input { width: 88px; height: 30px; border-radius: 8px; border: 1px solid rgba(var(--color-grey), .15); background: transparent; padding: 0 8px; font-size: 13px; color: rgba(var(--color-grey), 1); }
.tt-picker .p-time-row button { height: 30px; padding: 0 10px; border-radius: 8px; border: none; background: rgba(var(--color-primary), 1); color: #fff; font-size: 12.5px; font-weight: 600; }

/* ================= TOAST ================= */
.tt-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 500;
  background: rgba(var(--color-grey), .92); color: rgba(var(--color-white), 1);
  padding: 10px 22px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .2); animation: toastIn .2s ease;
  display: flex; align-items: center; gap: 12px;
}
@keyframes toastIn { from { transform: translate(-50%, 14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.tt-toast button { border: none; background: transparent; color: rgba(var(--color-primary), 1); font-weight: 700; font-size: 13.5px; }

/* ================= LOGIN ================= */
.tt-login {
  position: fixed; inset: 0; z-index: 300; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(150deg, #4b6cf7 0%, #7c5cf0 55%, #a05ce8 100%);
}
.lg-bg { position: absolute; inset: 0; pointer-events: none; }
.lg-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.lg-blob.b1 { width: 440px; height: 440px; background: #b06cf6; top: -150px; left: -110px; }
.lg-blob.b2 { width: 380px; height: 380px; background: #3ea8ff; bottom: -130px; right: -90px; }
.lg-blob.b3 { width: 280px; height: 280px; background: #ff8ad1; top: 50%; left: 60%; opacity: .28; }
.lg-grid {
  position: absolute; inset: 0; opacity: .45;
  background-image: radial-gradient(rgba(255, 255, 255, .25) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
}
.lg-card {
  position: relative; width: 100%; max-width: 420px; text-align: center;
  background: rgba(255, 255, 255, .97); color: #3a3f52;
  border-radius: 28px; padding: 46px 42px 30px;
  box-shadow: 0 30px 80px rgba(18, 28, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  animation: loginIn .55s cubic-bezier(.2, .8, .3, 1);
}
.lg-logo { margin-bottom: 30px; }
.lg-logo img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 12px 32px rgba(90, 80, 240, .4); }
.lg-btn {
  width: 100%; height: 52px; border: none; border-radius: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(135deg, #6c5cf0 0%, #4a6cf7 100%); color: #fff;
  font-size: 16px; font-weight: 700; font-family: inherit;
  box-shadow: 0 12px 30px rgba(90, 100, 240, .4);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.lg-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(90, 100, 240, .5); filter: brightness(1.05); }
.lg-btn:active { transform: translateY(0); }
.lg-btn .lc-cosmo-svg { width: 20px; height: 20px; flex-shrink: 0; }
.lg-footer { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; font-size: 13.5px; color: #8a8fa3; }
.lg-footer a { color: #4a6cf7; font-weight: 600; text-decoration: none; }
.lg-footer a:hover { text-decoration: underline; }
.lg-copy { font-size: 12px; opacity: .65; }
@keyframes loginIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }

/* ================= SETTINGS ================= */
.tt-settings { width: 860px; max-width: 92vw; height: 560px; max-height: 88vh; flex-direction: row; }
.tt-settings .tt-modal-body { display: flex; padding: 0; overflow: hidden; }
.tt-settings-nav { width: 200px; border-right: 1px solid rgba(var(--color-grey), .08); padding: 12px 8px; overflow-y: auto; flex: none; }
.tt-settings-nav .s-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; cursor: pointer; color: rgba(var(--color-grey), .8); }
.tt-settings-nav .s-item:hover { background: rgba(var(--color-grey), .06); }
.tt-settings-nav .s-item.on { background: rgba(var(--color-primary), .12); color: rgba(var(--color-primary), 1); font-weight: 600; }
.tt-settings-nav .s-item svg { width: 16px; height: 16px; }
.tt-settings-content { flex: 1; padding: 22px 26px; overflow-y: auto; }
.tt-settings-content h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.tt-settings-content .s-desc { font-size: 13px; color: rgba(var(--color-grey), .5); margin-bottom: 18px; }
.tt-theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tt-theme-card { border: 2px solid rgba(var(--color-grey), .1); border-radius: 12px; overflow: hidden; cursor: pointer; }
.tt-theme-card:hover { border-color: rgba(var(--color-grey), .3); }
.tt-theme-card.sel { border-color: rgba(var(--color-primary), 1); }
.tt-theme-card .t-prev { height: 56px; display: flex; }
.tt-theme-card .t-prev .side { width: 38%; height: 100%; display: flex; align-items: center; justify-content: center; }
.tt-theme-card .t-prev .side svg { width: 18px; height: 18px; opacity: .85; }
.tt-theme-card .t-prev .main { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.tt-theme-card .t-prev .main i { display: block; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .12); }
.tt-theme-card .t-prev .main i:nth-child(2) { width: 70%; }
.tt-theme-card .t-name { font-size: 12.5px; font-weight: 600; padding: 8px 10px; text-align: center; }
.tt-setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(var(--color-grey), .06); }
.tt-setting-row .r-title { font-size: 14px; font-weight: 500; }
.tt-setting-row .r-desc { font-size: 12.5px; color: rgba(var(--color-grey), .5); margin-top: 2px; }
.tt-select {
  height: 34px; border-radius: 9px; border: 1px solid rgba(var(--color-grey), .18);
  background: rgba(var(--color-main-background), 1); color: rgba(var(--color-grey), 1);
  padding: 0 10px; font-size: 13.5px;
}
.tt-switch { position: relative; width: 42px; height: 24px; border-radius: 20px; border: none; background: rgba(var(--color-grey), .25); transition: background .15s; }
.tt-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.tt-switch.on { background: rgba(var(--color-primary), 1); }
.tt-switch.on::after { left: 21px; }

/* ================= NOTIFICATIONS ================= */
.tt-notif-pop { width: 340px; padding: 0; overflow: hidden; }
.tt-notif-pop .n-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; font-size: 15px; font-weight: 700; }
.tt-notif-pop .n-list { max-height: 340px; overflow-y: auto; }
.tt-notif-item { display: flex; gap: 10px; padding: 10px 16px; cursor: pointer; }
.tt-notif-item:hover { background: rgba(var(--color-grey), .04); }
.tt-notif-item .n-ico { width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--color-primary), .12); color: rgba(var(--color-primary), 1); display: flex; align-items: center; justify-content: center; flex: none; }
.tt-notif-item .n-ico svg { width: 15px; height: 15px; }
.tt-notif-item .n-text { font-size: 13px; line-height: 1.4; }
.tt-notif-item .n-time { font-size: 11.5px; color: rgba(var(--color-grey), .45); margin-top: 2px; }
.tt-notif-foot { border-top: 1px solid rgba(var(--color-grey), .08); padding: 10px; text-align: center; font-size: 12.5px; color: rgba(var(--color-grey), .5); cursor: pointer; }

/* ================= DATE CHIP (quick add) ================= */
.tt-chip-date-pop { width: 300px; }
.tt-chip-date-pop .cd-quick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.tt-chip-date-pop .cd-quick button { height: 30px; border-radius: 8px; border: none; background: rgba(var(--color-grey), .07); color: rgba(var(--color-grey), .8); font-size: 12.5px; }
.tt-chip-date-pop .cd-quick button:hover { background: rgba(var(--color-primary), .14); color: rgba(var(--color-primary), 1); }

/* ================= UPCOMING layout ================= */
.tt-upcoming { display: flex; gap: 22px; align-items: flex-start; }
.tt-upcoming .u-left { width: 280px; flex: none; position: sticky; top: 0; }
.tt-upcoming .u-right { flex: 1; min-width: 0; }
.tt-up-day-head { display: flex; align-items: center; gap: 10px; padding: 16px 2px 4px; }
.tt-up-day-head .d-name { font-size: 15px; font-weight: 700; }
.tt-up-day-head .d-date { font-size: 12.5px; color: rgba(var(--color-grey), .5); margin-top: 1px; }

/* ================= HABIT MODAL ================= */
.tt-habit-modal { width: 560px; }
.tt-habit-times { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-habit-time-chip { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px dashed rgba(var(--color-grey), .3); font-size: 13px; color: rgba(var(--color-grey), .75); cursor: pointer; }
.tt-habit-time-chip:hover { border-color: rgba(var(--color-primary), .7); color: rgba(var(--color-primary), 1); }
.tt-habit-time-chip .x { color: rgba(var(--color-grey), .4); }
.tt-habit-time-chip .x:hover { color: rgba(var(--color-warn-red), 1); }
.tt-habit-time-input { display: flex; align-items: center; gap: 8px; }
.tt-habit-time-input input { width: 96px; height: 30px; border: 1px solid rgba(var(--color-grey), .18); border-radius: 8px; background: transparent; padding: 0 8px; font-size: 13px; color: rgba(var(--color-grey), 1); }
.tt-goal-chips { display: flex; gap: 8px; }
.tt-goal-chip { height: 32px; padding: 0 14px; border-radius: 9px; border: 1px solid rgba(var(--color-grey), .18); background: transparent; font-size: 13px; color: rgba(var(--color-grey), .8); }
.tt-goal-chip.on { border-color: rgba(var(--color-primary), 1); background: rgba(var(--color-primary), .1); color: rgba(var(--color-primary), 1); font-weight: 600; }

/* ================= responsive ================= */
@media (max-width: 1100px) {
  .tt-detail { position: fixed; top: 0; right: 0; bottom: 0; box-shadow: -10px 0 40px rgba(0, 0, 0, .18); }
}
@media (max-width: 820px) {
  .tt-sidebar { display: none; }
  .lg-card { padding: 38px 24px 26px; }
  .tt-habit-grid { grid-template-columns: 150px repeat(7, 1fr); }
}
