/* App Manager workspace (super_admin) — full screen */
#workspace-app-manager { padding: 0; height: 100vh; overflow-y: auto; background: #f6f8fb; }
.am-wrap { width: 100%; max-width: none; margin: 0; padding: 18px 34px 70px; box-sizing: border-box; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.am-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.am-head h2 { margin: 0; font-size: 21px; }
.am-sub { font-size: 11px; font-weight: 700; color: #b45309; background: #fef3c7; padding: 2px 9px; border-radius: 10px; vertical-align: middle; margin-left: 6px; }
.am-headnote { font-size: 12px; color: #6b7280; margin-top: 4px; }
.am-tabs { display: flex; gap: 6px; align-items: center; }
.am-tab { border: 1px solid #d1d5db; background: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; }
.am-tab.active { background: #1f2937; color: #fff; border-color: #1f2937; }
.am-btn { border: 1px solid #d1d5db; background: #fff; padding: 8px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.am-loading, .am-empty { padding: 36px; text-align: center; color: #9ca3af; }
.am-error { padding: 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; color: #991b1b; }

.am-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.am-kpi { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; }
.am-kpi-v { font-size: 25px; font-weight: 700; color: #111827; }
.am-kpi-l { font-size: 12px; color: #6b7280; margin-top: 2px; }

.am-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.am-col2 { grid-column: span 2; }
.am-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; }
.am-card-h { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 12px; }
.am-chart { height: 240px; }

.am-last-type { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 5px; }
.am-last-msg { font-size: 14px; font-weight: 600; color: #1f2937; margin: 8px 0 6px; }
.am-last-meta { font-size: 12px; color: #6b7280; }
.am-sha { display: inline-block; margin-top: 8px; font-size: 11px; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; color: #475569; }

.am-bar { display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.am-bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.am-bar-track { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.am-bar-fill { height: 100%; border-radius: 4px; }
.am-bar-n { text-align: right; color: #6b7280; font-variant-numeric: tabular-nums; }

/* Deploy log */
.am-toolbar { margin-bottom: 10px; }
.am-toolbar input { width: 100%; padding: 9px 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; box-sizing: border-box; }
.am-chipfs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.am-chipf { border: 1px solid #d1d5db; background: #fff; padding: 5px 12px; border-radius: 16px; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; }
.am-chipf.on { background: #1f2937; color: #fff; border-color: #1f2937; }
.am-days { display: flex; flex-direction: column; gap: 12px; }
.am-day { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.am-day-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.am-day-date { font-weight: 700; font-size: 14px; color: #1f2937; }
.am-day-count { font-size: 12px; color: #6b7280; }
.am-commits { padding: 2px 0; }
.am-commit { border-top: 1px solid #f6f8fb; }
.am-commit:first-child { border-top: none; }
.am-commit-head { display: grid; grid-template-columns: 16px 46px 76px auto 1fr auto; gap: 9px; align-items: center; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.am-commit-head:hover { background: #fafbfc; }
.am-caret { color: #9ca3af; font-size: 10px; transition: transform .15s; }
.am-commit.open .am-caret { transform: rotate(90deg); }
.am-time { color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.am-type { text-align: center; font-size: 10px; font-weight: 700; padding: 2px 0; border-radius: 5px; text-transform: uppercase; }
.am-scope { font-size: 11px; font-family: ui-monospace, monospace; color: #6366f1; background: #eef2ff; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.am-msg { color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-meta { color: #9ca3af; font-size: 11px; white-space: nowrap; }
.am-commit-body { display: none; padding: 4px 16px 14px 48px; background: #fafbfc; }
.am-commit.open .am-commit-body { display: block; }
.am-commit-sub { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.am-commit-sub code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; }
.am-files { columns: 2; column-gap: 24px; }
.am-fgroup { break-inside: avoid; margin-bottom: 8px; }
.am-fdir { font-size: 11px; font-weight: 700; color: #475569; }
.am-fdir small { color: #9ca3af; font-weight: 400; }
.am-fitem { font-size: 11.5px; color: #64748b; padding: 1px 0 1px 12px; }

/* Structure */
.am-wsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.am-wscard { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; }
.am-wsname { font-weight: 600; font-size: 13px; color: #1f2937; }
.am-wscard code { font-size: 11px; color: #6366f1; }
.am-dir { border-top: 1px solid #f1f5f9; }
.am-dir summary { cursor: pointer; padding: 9px 0; font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.am-dir-n { color: #9ca3af; font-size: 12px; }
.am-dir-track { flex: 1; min-width: 120px; height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.am-dir-fill { height: 100%; background: #6366f1; }
.am-files2 { padding: 4px 0 10px 16px; columns: 3; column-gap: 24px; }
.am-file { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 12px; color: #475569; break-inside: avoid; }
.am-loc { color: #9ca3af; }
.am-migs { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow: auto; }
.am-mig { font-size: 12px; color: #475569; }
.am-tags { display: flex; flex-wrap: wrap; gap: 6px; max-height: 360px; overflow: auto; }
.am-tag { background: #f1f5f9; color: #334155; border-radius: 5px; padding: 3px 8px; font-size: 11px; }
.am-foot { margin-top: 22px; font-size: 12px; color: #9ca3af; }
.am-foot code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; }

/* Clickable affordance */
.am-click { cursor: pointer; transition: box-shadow .12s, transform .06s, background .12s; }
.am-kpi.am-click:hover, .am-wscard.am-click:hover, .am-card.am-click:hover, .am-last.am-click:hover { box-shadow: 0 2px 10px rgba(99,102,241,.18); border-color: #c7d2fe; }
.am-bar.am-click:hover { background: #f5f7ff; border-radius: 6px; }
.am-arrow { color: #c7cdda; font-weight: 700; transition: color .12s; }
.am-click:hover .am-arrow { color: #6366f1; }

/* Modal chi tiết */
.am-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.am-modal[hidden] { display: none; }
.am-modal-bg { position: absolute; inset: 0; background: rgba(15,23,42,.45); }
.am-modal-box { position: relative; background: #fff; border-radius: 14px; width: min(960px, 92vw); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.am-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #eef2f7; }
.am-modal-head h3 { margin: 0; font-size: 16px; }
.am-modal-head h3 small { color: #9ca3af; font-weight: 400; }
.am-modal-head code { font-size: 12px; background: #eef2f7; padding: 1px 6px; border-radius: 4px; }
.am-modal-x { border: none; background: #f1f5f9; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.am-modal-body { padding: 14px 18px; overflow: auto; }
.am-modal-body .am-days { gap: 10px; }
.am-list { display: flex; flex-direction: column; }
.am-lrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 4px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.am-lrow code { color: #6366f1; }
.am-daylist { display: flex; flex-direction: column; }
.am-dayrow { display: flex; justify-content: space-between; padding: 9px 6px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.am-dayrow.am-click:hover { background: #f5f7ff; }
.am-dayrow-n { color: #6b7280; }
.am-sub2 { font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.am-sub2 code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; }

/* Kế hoạch Dev (tasks) */
.am-btn.primary { background: #1f2937; color: #fff; border-color: #1f2937; font-weight: 600; }
.am-tbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.am-tbar select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.am-tbar input { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.am-tsecs { display: flex; flex-direction: column; gap: 14px; }
.am-tsec { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.am-tsec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.am-tsec-name { font-weight: 700; font-size: 14px; color: #1f2937; }
.am-tsec-meta { font-size: 12px; color: #6b7280; }
.am-tlist { padding: 4px 0; }
.am-task { display: grid; grid-template-columns: 8px 1fr auto auto auto auto auto; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid #f6f8fb; font-size: 13px; }
.am-task:first-child { border-top: none; }
.am-task-prio { width: 8px; height: 8px; border-radius: 50%; }
.am-task-title { color: #1f2937; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-task-as { font-size: 12px; color: #6b7280; white-space: nowrap; }
.am-task-due { font-size: 12px; color: #6b7280; white-space: nowrap; }
.am-task-status { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.am-task-edit, .am-task-del { border: none; background: none; cursor: pointer; font-size: 13px; opacity: .55; }
.am-task-edit:hover, .am-task-del:hover { opacity: 1; }

/* Task form (trong modal) */
.am-form { display: flex; flex-direction: column; gap: 12px; }
.am-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #374151; }
.am-form input, .am-form select, .am-form textarea { padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; font-weight: 400; font-family: inherit; }
.am-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.am-form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Task detail + gắn deploy */
.am-task-open { cursor: pointer; }
.am-task-title.am-task-open:hover { text-decoration: underline; }
.am-task-dep { font-size: 11px; color: #4338ca; background: #eef2ff; padding: 1px 7px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.am-tdetail { display: flex; flex-direction: column; gap: 10px; }
.am-td-title { font-size: 16px; font-weight: 700; color: #1f2937; }
.am-td-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: #6b7280; }
.am-td-prio { font-weight: 600; }
.am-td-desc { font-size: 13px; color: #374151; background: #f8fafc; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.am-td-h { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 700; color: #374151; }
.am-attnote { font-size: 12px; color: #475569; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; padding: 9px 12px; margin-bottom: 10px; }
.am-attlist { max-height: 52vh; overflow: auto; border: 1px solid #eef2f7; border-radius: 8px; margin-bottom: 12px; }
.am-attrow { display: grid; grid-template-columns: 18px 84px 70px 1fr; gap: 9px; align-items: center; padding: 7px 12px; border-top: 1px solid #f6f8fb; font-size: 12.5px; cursor: pointer; }
.am-attrow:first-child { border-top: none; }
.am-attrow:hover { background: #fafbfc; }
.am-attrow .am-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-sugtag { font-size: 10px; font-weight: 700; color: #15803d; background: #dcfce7; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }

/* Overview cho người non-tech */
.am-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; background: linear-gradient(135deg,#fff,#f5f7ff); }
.am-hero-l { flex: 1; min-width: 280px; }
.am-hero-title { font-size: 15px; font-weight: 700; color: #1f2937; margin-bottom: 10px; }
.am-progress { position: relative; height: 26px; background: #eef2f7; border-radius: 13px; overflow: hidden; }
.am-progress-fill { height: 100%; background: linear-gradient(90deg,#6366f1,#15803d); border-radius: 13px; transition: width .4s; min-width: 2px; }
.am-progress-txt { position: absolute; top: 0; left: 12px; line-height: 26px; font-weight: 700; font-size: 13px; color: #1f2937; }
.am-hero-sub { font-size: 13px; color: #475569; margin-top: 8px; }
.am-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.am-schip { border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 9px 14px; font-size: 13px; cursor: pointer; }
.am-schip b { font-size: 17px; margin-right: 4px; }
.am-schip:hover { box-shadow: 0 2px 10px rgba(99,102,241,.18); border-color: #c7d2fe; }
.am-wsprog { display: flex; flex-direction: column; gap: 9px; }
.am-wprow { display: grid; grid-template-columns: 200px 1fr 120px; gap: 12px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.am-wprow:hover { background: #f5f7ff; }
.am-wprow-n { font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-wprow .am-bar-track { height: 10px; }
.am-wprow-c { font-size: 12px; color: #6b7280; text-align: right; }
.am-actline { font-size: 14px; color: #374151; }
.am-chart-cap { font-size: 11px; color: #9ca3af; text-align: center; margin-top: 6px; }
.am-recent { display: flex; flex-direction: column; }
.am-rec { display: grid; grid-template-columns: 52px 150px 1fr auto; gap: 12px; align-items: center; padding: 9px 6px; border-top: 1px solid #f6f8fb; font-size: 13px; cursor: pointer; }
.am-rec:first-child { border-top: none; }
.am-rec:hover { background: #f5f7ff; }
.am-rec-date { color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.am-rec-type { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.am-rec-msg { color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-rec-area { font-size: 11px; color: #4338ca; background: #eef2ff; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }

/* Chip dev */
.am-devchips .am-chipf.on { background: #4338ca; border-color: #4338ca; }
.am-chipn { font-size: 11px; opacity: .7; }
.am-chipf.on .am-chipn { opacity: .85; }

/* Subtab CHÍNH theo người (to, nổi bật) */
.am-persontabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.am-focus-h { font-weight: 700; font-size: 15px; color: #1f2937; margin-right: auto; }
.am-ptab { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d1d5db; background: #fff; padding: 9px 16px; border-radius: 11px; font-size: 14.5px; font-weight: 600; color: #374151; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.am-ptab:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(99,102,241,.12); }
.am-ptab.on { background: #1f2937; color: #fff; border-color: #1f2937; }
.am-ptab .am-pavatar { width: 22px; height: 22px; font-size: 12px; }
.am-ptab-n { font-size: 12px; font-weight: 700; background: rgba(15,23,42,.07); padding: 1px 9px; border-radius: 9px; }
.am-ptab.on .am-ptab-n { background: rgba(255,255,255,.22); }
/* Subtab cấp 2 — theo project (trong view 1 người) */
.am-projtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; padding-left: 2px; }
.am-ptab2 { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e5e7eb; background: #fff; padding: 5px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 600; color: #475569; cursor: pointer; transition: border-color .12s, background .12s; }
.am-ptab2:hover { border-color: #c7d2fe; }
.am-ptab2.on { background: #eef2ff; border-color: #6366f1; color: #4338ca; }
.am-ptab2-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.am-ptab2-n { font-size: 11px; font-weight: 700; color: #94a3b8; }
.am-ptab2.on .am-ptab2-n { color: #6366f1; }

/* Kanban theo stage */
.am-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.am-kcol { background: #f6f8fb; border: 1px solid #eceff4; border-radius: 11px; min-height: 80px; }
.am-kcol.over { background: var(--colbg); outline: 2px dashed var(--col); }
.am-kcol.pulse { animation: amPulse 1.4s ease; }
@keyframes amPulse { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px var(--col); } }
.am-kcol-h { display: flex; align-items: center; gap: 8px; padding: 9px 13px; font-weight: 700; font-size: 12.5px; color: var(--col); border-top: 3px solid var(--col); position: sticky; top: 0; background: #fff; border-radius: 11px 11px 0 0; }

/* VIEW block — mảng có tiêu đề màu nổi bật (Hôm nay / Tuần này / Dự án) */
.am-view { margin: 22px 0 6px; }
.am-view-h { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--vc, #6366f1); margin-bottom: 12px; }
.am-view-h::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--vc, #6366f1), transparent); opacity: .35; }
.am-view-sub { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #475569; background: #eef2f7; padding: 2px 9px; border-radius: 10px; }
.am-vempty { color: #9ca3af; font-size: 13px; padding: 8px 2px 14px; }
.am-kcol-dot { width: 9px; height: 9px; border-radius: 50%; }
.am-kcol-n { margin-left: auto; background: var(--colbg); color: var(--col); font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 10px; }
.am-kbody { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.am-kempty { text-align: center; color: #cbd5e1; font-size: 18px; padding: 8px; }
.am-kcard { background: #fff; border: 1px solid #e8ecf1; border-radius: 9px; padding: 10px 11px; cursor: grab; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: box-shadow .12s, transform .12s; }
.am-kcard:hover { box-shadow: 0 4px 14px rgba(16,24,40,.12); transform: translateY(-1px); }
.am-kcard.dragging { opacity: .45; }
.am-kcard-title { font-size: 13.5px; font-weight: 600; color: #1e293b; line-height: 1.35; cursor: pointer; }
.am-kcard-title:hover { color: #4f46e5; }
.am-kcard-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.am-kc-prio { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.am-kc-ws { font-size: 10.5px; font-weight: 600; color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 20px; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-kcard-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 11.5px; color: #64748b; }
.am-kc-av { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.am-kc-av.none { background: #fff; color: #cbd5e1; border: 1.5px dashed #cbd5e1; }
.am-kc-due { white-space: nowrap; }
.am-kc-due.od { color: #dc2626; font-weight: 700; }
.am-kc-dep { color: #6366f1; cursor: pointer; white-space: nowrap; }
.am-kcard-acts { margin-left: auto; display: flex; gap: 2px; }
.am-kcard-edit, .am-kcard-del { border: none; background: none; cursor: pointer; font-size: 12px; opacity: .45; }
.am-kcard-edit:hover, .am-kcard-del:hover { opacity: 1; }
.am-kc-tab { font-size: 10.5px; font-weight: 600; color: #4f46e5; background: #eef2ff; padding: 2px 8px; border-radius: 20px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Kanban board theo project (Kanban view) */
.am-kbproj { background: #fff; border: 1px solid #e5e7eb; border-left: 3px solid var(--pc, #6366f1); border-radius: 11px; overflow: hidden; margin-bottom: 12px; }
.am-kbproj-h { display: flex; align-items: center; gap: 9px; padding: 10px 14px; cursor: pointer; flex-wrap: wrap; }
.am-kbproj-h:hover { background: #fafbff; }
.am-kbproj .am-caret { color: #9ca3af; font-size: 11px; transition: transform .15s; flex: none; }
.am-kbproj.open .am-caret { transform: rotate(90deg); }
.am-kbproj-b { display: none; padding: 6px 12px 14px; border-top: 1px solid #f1f5f9; background: #fbfcfe; }
.am-kbproj.open .am-kbproj-b { display: block; }
.am-kb-tabgrp { display: flex; flex-direction: column; gap: 8px; }
.am-kb-tabgrp + .am-kb-tabgrp { margin-top: 4px; padding-top: 8px; border-top: 1px dashed #e5e7eb; }
.am-kb-tablbl { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .4px; }
.am-kb-tablbl span { background: #eef2f7; color: #64748b; border-radius: 8px; padding: 0 6px; font-size: 10px; }
.am-khint { font-size: 12px; color: #9ca3af; margin-top: 12px; }

/* Mỗi workspace = 1 bảng kanban */
.am-wsboards { display: flex; flex-direction: column; gap: 18px; }
.am-wsboard { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 12px 14px; }
.am-wsboard-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.am-wsboard-name { font-weight: 700; font-size: 15px; color: #1f2937; }
.am-wsboard-meta { font-size: 12px; color: #6b7280; }
.am-wsboard .am-kanban { background: transparent; }
.am-wsboard .am-kcol { background: #f8fafc; }

/* Chung */
.am-muted { color: #9ca3af; }
.am-tbar select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; background: #fff; }
.am-pavatar { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }
.am-pavatar.lg { width: 34px; height: 34px; font-size: 15px; }
.am-pavatar.sm { width: 18px; height: 18px; font-size: 10px; }

/* 🗂 Dự án — portfolio cards */
.am-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.am-pcard { background: #fff; border: 1px solid #e5e7eb; border-top: 3px solid var(--pc, #6366f1); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: box-shadow .12s, transform .06s; display: flex; flex-direction: column; gap: 9px; }
.am-pcard:hover { box-shadow: 0 4px 16px rgba(99,102,241,.16); transform: translateY(-1px); }
.am-pcard-top { display: flex; align-items: center; gap: 8px; }
.am-pcard-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc, #6366f1); flex: none; }
.am-pcard-name { font-weight: 700; font-size: 15px; color: #1f2937; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-pcard-name.am-proj-open:hover { text-decoration: underline; }
.am-pcard-edit { border: none; background: none; cursor: pointer; font-size: 13px; opacity: .55; }
.am-pcard-edit:hover { opacity: 1; }
.am-pcard-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #6b7280; flex-wrap: wrap; }
.am-pstatus { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.am-pcard-desc { font-size: 12.5px; color: #475569; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am-pcard-bar { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.am-pcard-fill { height: 100%; background: var(--pc, #6366f1); border-radius: 4px; transition: width .4s; }
.am-pcard-prog { font-size: 12.5px; color: #374151; }
.am-pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.am-phealth { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.am-pcard-counts { font-size: 11.5px; color: #6b7280; border-top: 1px solid #f1f5f9; padding-top: 8px; }
.am-pcard-loose { border-top-color: #94a3b8; border-style: dashed; }

/* Color picker (form dự án) */
.am-colorpick { display: flex; gap: 8px; flex-wrap: wrap; }
.am-cdot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.am-cdot.on { border-color: #1f2937; box-shadow: 0 0 0 2px #fff inset; }

/* Badge dự án trên thẻ task + accent màu cho board nhóm */
.am-kcard-prj { font-weight: 700; padding: 1px 7px; border-radius: 6px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-wsboard { border-left: 3px solid var(--gc, #6366f1); }

/* 👥 Hiệu suất */
.am-pf-period { font-size: 13px; font-weight: 600; color: #374151; }
.am-pf-note { font-size: 12.5px; color: #475569; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 10px 13px; margin-bottom: 14px; line-height: 1.5; }
.am-pftable-wrap { overflow-x: auto; }
.am-pftable { width: 100%; border-collapse: collapse; font-size: 13px; }
.am-pftable th { text-align: left; color: #6b7280; font-weight: 600; font-size: 12px; padding: 6px 10px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.am-pftable td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-pftable td:first-child { font-weight: 600; color: #1f2937; }
.am-pfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 14px; }
.am-pfcard { display: flex; flex-direction: column; gap: 11px; }
.am-pf-head { display: flex; align-items: center; gap: 10px; }
.am-pf-name { font-size: 16px; font-weight: 700; color: #1f2937; }
.am-pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.am-pf-stat { background: #f8fafc; border-radius: 8px; padding: 8px 10px; text-align: center; }
.am-pf-v { font-size: 20px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; }
.am-pf-l { font-size: 11px; color: #6b7280; margin-top: 1px; }
.am-pf-row { font-size: 12.5px; color: #374151; border-top: 1px solid #f1f5f9; padding-top: 9px; }
.am-spark { font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: 1px; color: #6366f1; }

/* 🗂 Dự án — accordion (tiến độ tổng + bung task chi tiết) */
.am-paccs { display: flex; flex-direction: column; gap: 10px; }
.am-pacc { background: #fff; border: 1px solid #e5e7eb; border-left: 3px solid var(--pc, #6366f1); border-radius: 10px; overflow: hidden; }
.am-pacc-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; cursor: pointer; flex-wrap: wrap; }
.am-pacc-head:hover { background: #fafbff; }
.am-pacc .am-caret { color: #9ca3af; font-size: 11px; transition: transform .15s; flex: none; }
.am-pacc.open .am-caret { transform: rotate(90deg); }
.am-pacc-dot { display: none; }
.am-pacc-name { font-weight: 700; font-size: 14px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.am-pacc-bar { flex: none; width: 120px; height: 6px; background: #eef2f7; border-radius: 4px; overflow: hidden; margin-left: auto; }
.am-pacc-fill { height: 100%; background: var(--pc, #6366f1); border-radius: 4px; transition: width .4s; }
.am-pacc-prog { font-size: 12.5px; color: #374151; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.am-pacc-edit { border: none; background: none; cursor: pointer; font-size: 14px; opacity: .55; flex: none; }
.am-pacc-edit:hover { opacity: 1; }
.am-pacc-del { border: none; background: none; cursor: pointer; font-size: 13px; opacity: .4; flex: none; }
.am-pacc-del:hover { opacity: 1; }
.am-pacc-body { display: none; padding: 4px 14px 14px; border-top: 1px solid #f1f5f9; background: #fbfcfe; }
.am-pacc.open .am-pacc-body { display: block; }
.am-pacc-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 0; flex-wrap: wrap; }
.am-pacc-toolbar .am-btn { padding: 5px 11px; font-size: 12.5px; }
.am-pacc-counts { font-size: 12px; color: #6b7280; margin-left: auto; }
/* Tầng Tab trong 1 project: mỗi tab thu/mở 1 bảng Kanban */
.am-tabsec { margin: 2px 0 10px; }
.am-tabsec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed #e5e7eb; cursor: pointer; border-radius: 6px; }
.am-tabsec-h:hover { background: #f5f7ff; }
.am-tabsec-h.drop { background: #e0f2fe; outline: 2px dashed #0284c7; }
.am-tabsec-l { display: flex; align-items: center; gap: 8px; }
.am-tabsec-caret { color: #9ca3af; font-size: 10px; transition: transform .15s; }
.am-tabsec.open .am-tabsec-caret { transform: rotate(90deg); }
.am-tabsec-name { font-weight: 700; font-size: 13.5px; color: #1f2937; }
.am-tabsec-meta { font-size: 12px; color: #6b7280; }
.am-tabsec-body { display: none; padding-top: 8px; }
.am-tabsec.open .am-tabsec-body { display: block; }

/* Khu chọn deploy trong form task (Kết quả) */
.am-tf-deploys { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid #eef2f7; padding-top: 11px; }
.am-tf-dh { font-size: 12px; font-weight: 700; color: #374151; }
.am-tf-dh small { font-weight: 400; color: #6b7280; }
.am-tf-dsearch { padding: 7px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.am-attlist.sm { max-height: 220px; }
/* Trong form, .am-form label (display:flex) đè .am-attrow → khôi phục grid hàng ngang cho dòng deploy. */
.am-form .am-attrow { display: grid; gap: 9px; font-weight: 400; }
.am-form .am-attrow .am-msg { text-align: left; }

/* Nút tạo hàng loạt task từ deploy đã tick (trong popup plan task) */
.am-tf-bulk { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.am-tf-bulk .am-btn { padding: 7px 14px; font-size: 13px; }
.am-tf-depbar { display: flex; gap: 8px; margin: 7px 0; }
.am-tf-depbar .am-btn { padding: 5px 11px; font-size: 12.5px; }

/* ===== View switcher + Bảng (Monday-style) + Tải theo người ===== */
.am-vtabs { display: inline-flex; gap: 2px; margin-left: auto; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.am-vtab { border: 0; background: transparent; padding: 4px 11px; border-radius: 6px; cursor: pointer; font-size: 12px; color: #475569; white-space: nowrap; }
.am-vtab:hover { color: #0f172a; }
.am-vtab.on { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(0,0,0,.1); font-weight: 600; }
.am-tg { border: 1px solid #e5e7eb; border-left: 3px solid var(--pc, #6366f1); border-radius: 9px; margin-bottom: 10px; overflow: hidden; background: #fff; }
.am-tg-head { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; }
.am-tg-head:hover { background: #fafbfc; }
.am-tg .am-caret { transition: transform .15s; color: #94a3b8; font-size: 12px; }
.am-tg.open > .am-tg-head .am-caret { transform: rotate(90deg); }
.am-tg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); flex: none; }
.am-tg-name { font-weight: 700; color: #0f172a; }
.am-battery { display: flex; width: 130px; height: 13px; border-radius: 7px; overflow: hidden; background: #eef2f7; flex: none; }
.am-battery > div { height: 100%; }
.am-tg-prog { font-size: 12px; color: #475569; margin-left: auto; }
.am-tg-body { display: none; overflow-x: auto; }
.am-tg.open > .am-tg-body { display: block; }
.am-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.am-tbl th { text-align: left; padding: 6px 10px; background: #f8fafc; color: #64748b; font-weight: 600; font-size: 11px; border-top: 1px solid #eef2f7; }
.am-tbl td { padding: 5px 10px; border-top: 1px solid #f1f5f9; vertical-align: middle; }
.am-tbl tbody tr:hover { background: #fafbfc; }
.am-tbl-title { font-weight: 500; color: #0f172a; cursor: pointer; max-width: 420px; }
.am-tbl-title:hover { color: #4f46e5; text-decoration: underline; }
.am-tbl-tab { color: #64748b; font-size: 12px; white-space: nowrap; }
.am-tbl-status { border: 0; border-radius: 5px; padding: 3px 4px; font-size: 12px; font-weight: 600; color: #fff; cursor: pointer; -webkit-appearance: none; appearance: none; text-align: center; width: 100%; }
.am-tbl-status option { color: #0f172a; background: #fff; }
.am-tbl-as { border: 1px solid #e5e7eb; border-radius: 5px; padding: 3px 5px; font-size: 12px; background: #fff; cursor: pointer; width: 100%; }
.am-tbl-od { color: #dc2626; font-weight: 700; white-space: nowrap; }
.am-tbl-dep { color: #6366f1; font-size: 12px; }
.am-wl { display: flex; flex-direction: column; gap: 8px; }
.am-wl-row { display: grid; grid-template-columns: 180px 150px 1fr; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid #eef2f7; border-radius: 9px; background: #fff; cursor: pointer; }
.am-wl-row:hover { background: #fafbfc; border-color: #e0e7ff; }
.am-wl-who { display: flex; align-items: center; gap: 7px; font-weight: 600; color: #0f172a; }
.am-wl-meta { font-size: 12.5px; color: #475569; }
@media (max-width: 760px) { .am-wl-row { grid-template-columns: 1fr auto; } .am-wl-row .am-battery { display: none; } }

/* ===== Lịch (Calendar) ===== */
.am-cal-nav { margin-left: auto; display: inline-flex; gap: 4px; }
.am-cal-nav .am-btn { padding: 2px 9px; font-size: 13px; }
.am-cal { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; }
.am-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.am-cal-dows { background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.am-cal-dow { padding: 6px; text-align: center; font-size: 11px; font-weight: 600; color: #64748b; }
.am-cal-cell { min-height: 92px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.am-cal-cell:nth-child(7n) { border-right: 0; }
.am-cal-empty { background: #fcfcfd; }
.am-cal-cell.today { background: #eff6ff; }
.am-cal-cell.today .am-cal-d { background: #2563eb; color: #fff; }
.am-cal-d { font-size: 12px; font-weight: 600; color: #475569; width: 22px; height: 20px; line-height: 20px; text-align: center; border-radius: 6px; }
.am-cal-chip { font-size: 11px; padding: 2px 6px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.am-cal-chip:hover { filter: brightness(.96); }
.am-cal-more { font-size: 11px; color: #64748b; padding-left: 4px; }

/* ===== Timeline / Gantt ===== */
.am-gantt { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 8px 12px; overflow-x: auto; }
.am-gantt-grp { margin-bottom: 8px; }
.am-gantt-glabel { font-weight: 700; font-size: 13px; margin: 8px 0 4px; }
.am-gantt-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 10px; padding: 2px 0; }
.am-gantt-name { font-size: 12.5px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.am-gantt-name:hover { color: #4f46e5; text-decoration: underline; }
.am-gantt-track { position: relative; height: 18px; background: #f5f7fa; border-radius: 6px; min-width: 200px; }
.am-gantt-bar { position: absolute; top: 2px; height: 14px; border-radius: 5px; cursor: pointer; min-width: 4px; }
.am-gantt-bar:hover { filter: brightness(.92); }
@media (max-width: 760px) { .am-gantt-row { grid-template-columns: 130px 1fr; } }

/* ===== Tổng quan team (template Monday) ===== */
.am-ov-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 14px; }
.am-ov-num { background: #fff; border: 1px solid #eef2f7; border-top: 3px solid var(--nc, #6366f1); border-radius: 10px; padding: 11px 14px; }
.am-ov-num-v { font-size: 26px; font-weight: 800; color: var(--nc); line-height: 1.05; }
.am-ov-num-l { font-size: 12px; color: #64748b; margin-top: 4px; }
.am-ov-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.am-ov-card { background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 13px 15px; }
.am-ov-card-full { grid-column: 1 / -1; }
.am-ov-card-h { font-size: 12.5px; font-weight: 700; color: #334155; margin-bottom: 11px; }
.am-ov-card-h small { font-weight: 400; color: #94a3b8; margin-left: 5px; }
.am-ov-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.am-ov-pcard { border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 11px; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.am-ov-pcard:hover { border-color: #c7d2fe; box-shadow: 0 2px 9px rgba(0,0,0,.06); }
.am-ov-pc-top { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.am-ov-pc-name { font-weight: 600; color: #0f172a; font-size: 13px; }
.am-ov-pc-pct { margin-left: auto; font-weight: 800; font-size: 15px; }
.am-ov-pcard .am-battery { width: 100%; }
.am-ov-pc-meta { font-size: 11px; color: #64748b; margin-top: 8px; }
.am-ov-projs { display: flex; flex-direction: column; gap: 2px; }
.am-ov-pj { display: grid; grid-template-columns: 11px minmax(80px, 1fr) 110px auto; align-items: center; gap: 9px; padding: 5px 7px; border-radius: 7px; cursor: pointer; }
.am-ov-pj:hover { background: #f8fafc; }
.am-ov-pj-dot { width: 9px; height: 9px; border-radius: 50%; }
.am-ov-pj-n { font-size: 13px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.am-ov-pj .am-battery { width: 110px; }
.am-ov-pj-c { font-size: 11px; color: #64748b; white-space: nowrap; text-align: right; }
@media (max-width: 900px) { .am-ov-cards { grid-template-columns: 1fr; } .am-ov-pj { grid-template-columns: 11px 1fr auto; } .am-ov-pj .am-battery { display: none; } }

@media (max-width: 1100px) { .am-grid { grid-template-columns: 1fr; } .am-col2 { grid-column: span 1; } .am-files, .am-files2 { columns: 1; } }
@media (max-width: 760px) { .am-commit-head { grid-template-columns: 16px 44px 1fr; } .am-commit-head .am-type, .am-commit-head .am-scope, .am-commit-head .am-meta { display: none; } .am-task { grid-template-columns: 8px 1fr auto auto; } .am-task-as, .am-task-due { display: none; } .am-wprow { grid-template-columns: 1fr auto; } .am-wprow .am-bar-track { display: none; } .am-rec { grid-template-columns: 44px 1fr; } .am-rec-type, .am-rec-area { display: none; } }
