/* CELLOVITA — work management UI */
:root {
  --teal-900: #07302d;
  --teal-800: #0b4f4a;
  --teal-700: #0f6b63;
  --teal-600: #14887d;
  --teal-100: #e3f2ef;
  --teal-50: #f1f8f6;
  --crimson: #b31b3c;
  --crimson-soft: #fdeaee;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --blue: #1d4ed8;
  --blue-soft: #e0e9ff;
  --grey-900: #17201f;
  --grey-700: #3d4b49;
  --grey-500: #6b7b78;
  --grey-300: #cfd9d7;
  --grey-200: #e4ebe9;
  --grey-100: #f5f8f7;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(9, 45, 42, .06), 0 1px 3px rgba(9, 45, 42, .05);
  --shadow-md: 0 4px 16px rgba(9, 45, 42, .10);
  --shadow-lg: 0 18px 44px rgba(9, 45, 42, .18);
  --sidebar-w: 244px;
  --header-h: 62px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--grey-100);
  color: var(--grey-900);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- boot/login */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(160deg, #0b4f4a 0%, #07302d 100%); color: #fff; z-index: 60;
}
.boot-mark { font-size: 26px; letter-spacing: .34em; font-weight: 600; }
.boot-sub { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; opacity: .7; }
.boot-bar { margin-top: 20px; width: 132px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: #fff; border-radius: 3px; animation: bootSlide 1.1s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

.auth-view {
  min-height: 100vh; display: grid; grid-template-columns: 1fr; place-items: center;
  background: radial-gradient(1200px 600px at 15% 0%, #0f6b63 0%, #07302d 62%, #062421 100%);
  padding: 24px 18px 40px;
}
.auth-card {
  width: 100%; max-width: 940px; background: rgba(255,255,255,.98); border-radius: 20px;
  box-shadow: var(--shadow-lg); overflow: hidden; display: grid; grid-template-columns: 1fr;
}
.auth-brand {
  padding: 30px 26px; background: linear-gradient(170deg, #0b4f4a, #07302d); color: #fff;
  display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center;
}
.auth-brand img { width: 108px; height: 108px; object-fit: contain; border-radius: 16px; background: #fff; padding: 6px; }
.auth-brand h1 { font-size: 20px; letter-spacing: .18em; font-weight: 600; }
.auth-brand p { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; opacity: .72; }
.auth-form { padding: 30px 26px 34px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h2 { font-size: 20px; }
.auth-form .hint { color: var(--grey-500); font-size: 13px; }
.auth-demo {
  margin-top: 4px; background: var(--teal-50); border: 1px dashed var(--teal-100);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; color: var(--teal-800);
}
.auth-demo code { background: #fff; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--grey-200); }

/* ----------------------------------------------------------------- shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.main-wrap { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.sidebar {
  display: none; flex-direction: column; gap: 6px; padding: 16px 12px;
  background: linear-gradient(180deg, #0b4f4a 0%, #083b37 100%); color: #d7e9e5;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand-block { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; }
.brand-block img { width: 40px; height: 40px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.brand-block .bt { font-size: 14px; letter-spacing: .16em; font-weight: 600; color: #fff; }
.brand-block .bs { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }

.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: #cfe4e0; font-size: 14px; font-weight: 500; cursor: pointer; border: 0; background: transparent;
  width: 100%; text-align: left; transition: background .14s, color .14s;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active { background: #fff; color: var(--teal-800); font-weight: 650; }
.nav-item .nav-count {
  margin-left: auto; background: var(--crimson); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
}
.nav-item.active .nav-count { background: var(--crimson); color: #fff; }
.nav-sep { margin: 12px 8px 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .45; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center;
  gap: 10px; padding: 0 14px; background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--grey-200);
}
.topbar .icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--grey-200);
  background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--grey-700);
  flex: 0 0 auto; position: relative;
}
.topbar .icon-btn:hover { background: var(--grey-100); }
.topbar-title { font-size: 15px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.topbar .dot {
  position: absolute; top: -4px; right: -4px; background: var(--crimson); color: #fff;
  border-radius: 10px; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
  display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--grey-200); background: #fff; cursor: pointer;
}
.user-chip:hover { background: var(--grey-100); }
.user-chip .un { font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .ur { font-size: 10.5px; color: var(--grey-500); }

.view { padding: 16px 14px 92px; max-width: 1420px; width: 100%; margin: 0 auto; flex: 1; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 28; display: grid;
  grid-template-columns: repeat(5, 1fr); background: rgba(255,255,255,.97);
  border-top: 1px solid var(--grey-200); padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(10px);
}
.tabbar button {
  border: 0; background: transparent; padding: 8px 2px 7px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; font-size: 10.5px; color: var(--grey-500); cursor: pointer; font-weight: 500;
}
.tabbar button i { font-size: 16px; }
.tabbar button.active { color: var(--teal-800); font-weight: 700; }

.drawer {
  position: fixed; inset: 0; z-index: 55; background: rgba(6,36,33,.5);
  display: flex; justify-content: flex-start;
}
.drawer-panel {
  width: 84%; max-width: 320px; height: 100%; background: linear-gradient(180deg, #0b4f4a, #083b37);
  color: #d7e9e5; padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  animation: slideIn .18s ease-out;
}
@keyframes slideIn { from { transform: translateX(-24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ primitives */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.page-head h1 { font-size: 21px; }
.page-head p { color: var(--grey-500); font-size: 13px; margin-top: 3px; }
.page-head .grow { flex: 1; min-width: 120px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--grey-300); background: #fff; color: var(--grey-900); font-weight: 600;
  font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: .14s;
}
.btn:hover { background: var(--grey-100); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--teal-800); border-color: var(--teal-800); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-accent { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn-accent:hover { background: #9d1734; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--teal-700); }
.btn-ghost:hover { background: var(--teal-50); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 9px; }
.btn-danger { color: var(--crimson); border-color: #f0c3ce; background: #fff; }
.btn-danger:hover { background: var(--crimson-soft); }
.btn-block { width: 100%; justify-content: center; }

.card {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px;
}
.card-tight { padding: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12px; color: var(--grey-500); }
.card-head .spacer { flex: 1; }

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

.kpi {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px;
}
.kpi .k-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey-500); font-weight: 600; }
.kpi .k-value { font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi .k-foot { font-size: 11.5px; color: var(--grey-500); }
.kpi.warn { border-color: #f4c9d3; background: linear-gradient(180deg, #fff, #fff7f9); }
.kpi.warn .k-value { color: var(--crimson); }
.kpi.ok .k-value { color: var(--teal-700); }
.kpi.info .k-value { color: var(--blue); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap; border: 1px solid transparent;
}
.chip-todo { background: var(--grey-100); color: var(--grey-700); border-color: var(--grey-200); }
.chip-doing { background: var(--blue-soft); color: var(--blue); }
.chip-review { background: var(--amber-soft); color: var(--amber); }
.chip-done { background: var(--teal-100); color: var(--teal-800); }
.chip-low { background: var(--grey-100); color: var(--grey-500); }
.chip-normal { background: #eef2f1; color: var(--grey-700); }
.chip-high { background: #fff1e2; color: #b45309; }
.chip-urgent { background: var(--crimson-soft); color: var(--crimson); }
.chip-blocked { background: var(--crimson); color: #fff; }
.chip-soft { background: var(--teal-50); color: var(--teal-800); }
.chip-outline { background: #fff; border-color: var(--grey-300); color: var(--grey-700); font-weight: 600; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-100); color: var(--teal-800); font-weight: 700; font-size: 11.5px;
  flex: 0 0 auto; letter-spacing: .02em;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

.progress { height: 6px; background: var(--grey-200); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal-600); border-radius: 999px; transition: width .3s; }
.progress.warn > span { background: var(--crimson); }
.progress.amber > span { background: var(--amber); }

.muted { color: var(--grey-500); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--grey-200); margin: 12px 0; }
.text-danger { color: var(--crimson); }
.text-ok { color: var(--teal-700); }

.empty {
  padding: 34px 18px; text-align: center; color: var(--grey-500); display: flex;
  flex-direction: column; align-items: center; gap: 8px;
}
.empty i { font-size: 26px; color: var(--grey-300); }
.empty .title { font-weight: 650; color: var(--grey-700); }
.empty .desc { font-size: 12.5px; max-width: 320px; }

.skeleton { background: linear-gradient(90deg, #eef3f2 25%, #f7faf9 37%, #eef3f2 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* --------------------------------------------------------------- filters */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow-sm);
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 11.5px; font-weight: 650; color: var(--grey-500); letter-spacing: .04em; text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--grey-300); border-radius: 10px;
  background: #fff; outline: none; transition: border-color .14s, box-shadow .14s; min-width: 0;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(20,136,125,.14); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7b78' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.search-wrap { position: relative; flex: 1; min-width: 170px; }
.search-wrap i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--grey-500); font-size: 13px; }
.search-wrap .input { padding-left: 32px; }

.segmented { display: inline-flex; background: var(--grey-100); border-radius: 11px; padding: 3px; gap: 2px; border: 1px solid var(--grey-200); }
.segmented button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-size: 12.5px;
  font-weight: 600; color: var(--grey-500); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.segmented button.active { background: #fff; color: var(--teal-800); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------ task lists */
.task-row {
  display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; background: #fff;
  border: 1px solid var(--grey-200); border-radius: var(--radius); cursor: pointer;
  transition: .14s; box-shadow: var(--shadow-sm);
}
.task-row:hover { border-color: var(--teal-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.task-row.overdue { border-left: 3px solid var(--crimson); }
.task-row .t-title { font-weight: 650; font-size: 14.5px; line-height: 1.35; }
.task-row .t-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--grey-500); }
.task-row .t-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-row .t-side { display: flex; align-items: center; gap: 8px; }

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

.pager { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px 0 4px; }

/* ---------------------------------------------------------------- kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--grey-100); border: 1px solid var(--grey-200); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.kcol.drag-over { background: var(--teal-50); border-color: var(--teal-600); }
.kcol-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; padding: 0 2px; }
.kcol-head .k-count { margin-left: auto; font-size: 11.5px; color: var(--grey-500); font-weight: 700; }
.kcard {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 10px;
  margin-bottom: 8px; box-shadow: var(--shadow-sm); cursor: grab;
}
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; }
.kcard .kt { font-weight: 640; font-size: 13.5px; line-height: 1.35; margin-bottom: 6px; }

/* -------------------------------------------------------------- calendar */
.cal { background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--grey-200); }
.cal-head .m { font-weight: 700; font-size: 14.5px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 7px 4px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--grey-500); text-transform: uppercase; border-bottom: 1px solid var(--grey-200); background: var(--grey-100); }
.cal-cell { min-height: 82px; border-right: 1px solid var(--grey-200); border-bottom: 1px solid var(--grey-200); padding: 5px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: #fafcfb; color: var(--grey-300); }
.cal-cell.today { background: var(--teal-50); }
.cal-cell .cd { font-size: 11.5px; font-weight: 700; color: var(--grey-500); margin-bottom: 3px; }
.cal-cell.today .cd { color: var(--teal-800); }
.cal-pill {
  display: block; font-size: 10.5px; padding: 1px 5px; border-radius: 5px; margin-bottom: 2px;
  background: var(--blue-soft); color: var(--blue); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: pointer; font-weight: 600;
}
.cal-pill.p-urgent, .cal-pill.p-high { background: var(--crimson-soft); color: var(--crimson); }
.cal-pill.done { background: var(--teal-100); color: var(--teal-800); text-decoration: line-through; }

/* ---------------------------------------------------------------- tables */
.table-wrap { background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; padding: 10px 12px; background: var(--grey-100); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--grey-500); font-weight: 700;
  border-bottom: 1px solid var(--grey-200); white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--grey-200); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--grey-100); }

/* ----------------------------------------------------------------- modal */
.modal-root {
  position: fixed; inset: 0; z-index: 60; background: rgba(7,48,45,.46);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
  background: #fff; width: 100%; max-width: 620px; max-height: 94vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); animation: sheetUp .2s ease-out;
  display: flex; flex-direction: column;
}
@keyframes sheetUp { from { transform: translateY(26px); opacity: .7; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--grey-200); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 13px; }
.modal-foot { padding: 13px 18px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--grey-200); display: flex; gap: 8px; justify-content: flex-end; background: #fff; position: sticky; bottom: 0; }

/* --------------------------------------------------------- detail view */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.detail-title { font-size: 20px; line-height: 1.3; }
.meta-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-item .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--grey-500); font-weight: 700; }
.meta-item .val { font-size: 13.5px; font-weight: 600; }

.check-item { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--grey-200); }
.check-item:last-child { border-bottom: 0; }
.check-item input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--teal-700); flex: 0 0 auto; cursor: pointer; }
.check-item .ct { flex: 1; font-size: 13.5px; }
.check-item .ct.done { text-decoration: line-through; color: var(--grey-500); }

.comment { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--grey-200); }
.comment:last-child { border-bottom: 0; }
.comment .body { flex: 1; min-width: 0; }
.comment .body .n { font-weight: 650; font-size: 13px; }
.comment .body .t { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }

.timeline { display: flex; flex-direction: column; gap: 9px; }
.tl-item { display: flex; gap: 9px; font-size: 12.5px; }
.tl-item .dot2 { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-600); margin-top: 6px; flex: 0 0 auto; }

.file-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--grey-200); }
.file-item:last-child { border-bottom: 0; }
.file-item .fi-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: 0 0 auto; }
.file-item .fi-body { flex: 1; min-width: 0; }
.file-item .fi-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.upload-zone {
  border: 1.5px dashed var(--grey-300); border-radius: var(--radius-sm); padding: 16px;
  text-align: center; color: var(--grey-500); font-size: 12.5px; cursor: pointer; background: var(--grey-100);
}
.upload-zone:hover { border-color: var(--teal-600); color: var(--teal-800); background: var(--teal-50); }

.quick-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px;
  background: linear-gradient(100deg, #0b4f4a, #0f6b63); color: #fff; border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: var(--shadow-md);
}
.quick-bar .qb-text { flex: 1; min-width: 120px; font-size: 13px; }
.quick-bar .qb-text strong { display: block; font-size: 14px; }
.quick-bar .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; }
.quick-bar .btn:hover { background: rgba(255,255,255,.26); }

.fab {
  position: fixed; right: 16px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 26;
  width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--crimson); color: #fff;
  font-size: 20px; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(179,27,60,.4); cursor: pointer;
}
.fab:hover { background: #9d1734; }

.toast-root { position: fixed; top: 12px; right: 12px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.notyf { font-family: var(--font) !important; }

.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crimson); flex: 0 0 auto; }

.notif-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--grey-200); cursor: pointer; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: var(--teal-50); }
.notif-item:hover { background: var(--grey-100); }
.notif-item .ni-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-100); color: var(--teal-800); flex: 0 0 auto; }
.notif-item .ni-body { flex: 1; min-width: 0; }
.notif-item .ni-title { font-weight: 650; font-size: 13.5px; }
.notif-item .ni-text { font-size: 12.5px; color: var(--grey-700); word-break: break-word; }

.btn-primary-ghost { background: var(--teal-50); border-color: #cfe7e2; color: var(--teal-800); font-weight: 600; }
.btn-primary-ghost:hover { background: #e2f1ee; }

.goal-card { display: flex; flex-direction: column; gap: 9px; }

/* rã mục tiêu — danh sách công việc con */
.gt-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.gt-row + .gt-row { margin-top: 8px; }
.gt-row:hover { background: var(--teal-50); border-color: #cfe7e2; }
.gt-main { flex: 1; min-width: 0; }
.gt-title { font-weight: 620; font-size: 13.5px; margin: 4px 0 3px; line-height: 1.35; word-break: break-word; }
.gt-side { width: 72px; flex: 0 0 auto; }
.goal-card .g-head { display: flex; gap: 8px; align-items: flex-start; }
.goal-card .g-title { font-weight: 650; font-size: 14.5px; flex: 1; line-height: 1.35; }
.goal-card .g-nums { display: flex; align-items: baseline; gap: 6px; }
.goal-card .g-cur { font-size: 22px; font-weight: 700; color: var(--teal-800); }
.goal-card .g-tgt { font-size: 12.5px; color: var(--grey-500); }

.dept-card { display: flex; flex-direction: column; gap: 8px; }
.dept-card .dc-top { display: flex; align-items: center; gap: 10px; }
.dept-card .dc-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.dept-card .dc-name { font-weight: 650; font-size: 14.5px; }
.dept-card .dc-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--grey-500); }
.dept-card .dc-stats b { color: var(--grey-900); font-size: 13px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--grey-200); margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; padding: 9px 13px; font-size: 13.5px; font-weight: 600;
  color: var(--grey-500); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.active { color: var(--teal-800); border-bottom-color: var(--teal-700); }

/* --------------------------------------------------------- breakpoints */
@media (min-width: 640px) {
  .view { padding: 18px 18px 96px; }
  .grid-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-root { align-items: center; padding: 20px; }
  .modal { border-radius: 18px; max-height: 88vh; }
  .meta-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-row { grid-template-columns: 1fr auto; align-items: center; }
  .task-row .t-main { min-width: 0; }
  .filters .search-wrap { max-width: 320px; }
  .auth-card { grid-template-columns: 300px 1fr; }
  .auth-brand { padding: 40px 24px; }
}

@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--sidebar-w) 1fr; }
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .view { padding: 22px 24px 54px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2.detail-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
  .detail-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
  .page-head h1 { font-size: 23px; }
  .fab { bottom: 26px; }
  .meta-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-row { grid-template-columns: 1fr 220px; }
  .cal-cell { min-height: 104px; }
}

@media (min-width: 1440px) {
  .grid-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
