/* ===== MẠNH LIFE V42 SUPER FINAL POLISH ===== */
:root{--ml-v42-border:rgba(148,163,184,.22);--ml-v42-soft:#f8fafc;--ml-v42-orange:#f97316;}

/* Không còn khoảng trắng lớn bên trái khu Việc cần làm */
.ml-task-panel .ml-task-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;align-items:start!important;}
.ml-task-panel .ml-top-task-form{position:static!important;width:100%!important;max-width:none!important;margin:0!important;padding:7px!important;border-radius:18px!important;}
.ml-task-panel .ml-current-task-wrap{min-width:0!important;width:100%!important;}
.ml-compact-create-box{gap:6px!important;}
.ml-compact-title-input{min-height:34px!important;max-height:60px!important;font-size:14px!important;line-height:1.35!important;border-radius:14px!important;}
.ml-compact-create-row.ml-v28-create-row{grid-template-columns:38px 38px 38px!important;justify-content:end!important;gap:6px!important;}
.ml-compact-action{height:34px!important;min-height:34px!important;width:38px!important;border-radius:999px!important;font-size:15px!important;box-shadow:none!important;transform:none!important;}
.ml-v28-detail-drawer,.ml-v28-audio-drawer{padding:8px!important;border-radius:14px!important;margin-top:2px!important;}
.ml-v28-detail-drawer textarea{min-height:46px!important;font-size:12.5px!important;}

/* Task card mềm hơn, thấp hơn, hover không nhảy */
.ml-current-task-list,.ml-task-list{scroll-behavior:auto!important;overscroll-behavior-y:auto!important;padding-right:2px!important;}
.ml-task-item{padding:8px 9px!important;border-radius:16px!important;box-shadow:0 8px 22px rgba(15,23,42,.045)!important;border:1px solid rgba(148,163,184,.18)!important;background:linear-gradient(180deg,#fff,#fffaf5)!important;gap:8px!important;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease!important;transform:none!important;min-height:0!important;}
.ml-task-item:hover{transform:none!important;border-color:rgba(249,115,22,.28)!important;box-shadow:0 10px 24px rgba(15,23,42,.06)!important;}
.ml-task-item.running{border-color:rgba(249,115,22,.38)!important;background:linear-gradient(180deg,#fff,#fff7ed)!important;}
.ml-task-left{gap:5px!important;}
.ml-drag-handle{width:24px!important;height:24px!important;min-width:24px!important;border-radius:8px!important;cursor:grab!important;opacity:.68!important;}
.ml-task-check{width:16px!important;height:16px!important;}
.ml-task-title-row{min-height:22px!important;gap:6px!important;align-items:center!important;}
.ml-task-title-row h3,.ml-inline-edit-title{font-size:14px!important;line-height:1.25!important;font-weight:900!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.ml-task-desc-text{font-size:11.5px!important;line-height:1.25!important;margin:2px 0 0!important;max-height:30px!important;overflow:hidden!important;}
.ml-task-meta{gap:4px!important;margin-top:4px!important;}
.ml-pill,.ml-task-meta select,.ml-inline-min-wrap{height:24px!important;min-height:24px!important;border-radius:999px!important;padding:2px 7px!important;font-size:11px!important;line-height:1!important;box-shadow:none!important;}
.ml-task-meta select{max-width:118px!important;}
.ml-child-task-badge{height:22px!important;min-height:22px!important;padding:2px 7px!important;border-radius:999px!important;font-size:11px!important;box-shadow:none!important;}
.ml-mini-progress{height:4px!important;margin:5px 0 4px!important;border-radius:999px!important;}
.ml-task-time-row{gap:5px!important;margin-top:4px!important;}
.ml-task-time-row>div{min-height:24px!important;padding:3px 7px!important;border-radius:999px!important;font-size:11px!important;box-shadow:none!important;}
.ml-task-time-row strong{font-size:11.5px!important;}
.ml-inline-min-wrap input{width:42px!important;font-size:11px!important;}
.ml-task-actions{gap:4px!important;align-self:start!important;opacity:.72!important;visibility:visible!important;transition:opacity .12s ease!important;}
.ml-task-item:hover .ml-task-actions{opacity:1!important;}
.ml-task-actions .ml-btn{width:27px!important;height:27px!important;min-width:27px!important;padding:0!important;border-radius:10px!important;font-size:12px!important;box-shadow:none!important;transform:none!important;}
.ml-task-actions .ml-btn:hover{transform:none!important;}
.ml-task-detail-zone{margin-top:6px!important;padding:7px!important;border-radius:14px!important;}
.ml-subtask-list{max-height:180px!important;overflow:auto!important;overscroll-behavior-y:auto!important;padding:4px!important;border-radius:12px!important;}
.ml-subtask-row{min-height:26px!important;padding:3px 5px!important;border-radius:10px!important;}
.ml-inline-subtask-add{min-height:30px!important;height:30px!important;border-radius:10px!important;font-size:12.5px!important;}

/* Thanh chia thời gian gọn */
.ml-allocation-panel{padding:7px!important;border-radius:16px!important;margin-bottom:8px!important;}
.ml-allocation-head{margin-bottom:5px!important;gap:6px!important;}
.ml-allocation-head strong{font-size:12.5px!important;}
.ml-allocation-hint{font-size:0!important;}
.ml-allocation-hint::after{content:'↔  🔒';font-size:12px!important;opacity:.65;}
.ml-time-budget-bar{min-height:38px!important;border-radius:14px!important;}
.ml-budget-segment{min-height:36px!important;padding:4px!important;}
.ml-budget-title,.ml-budget-meta{font-size:10.5px!important;line-height:1.1!important;}
.ml-budget-title{max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}

/* Tab task/journal gọn */
.ml-main-work-tabs{height:auto!important;min-height:34px!important;margin:6px 0 8px!important;padding:3px!important;border-radius:999px!important;}
.ml-main-work-tabs button{height:28px!important;min-height:28px!important;border-radius:999px!important;padding:3px 12px!important;font-size:12px!important;}
.ml-main-work-pane:not(.active){display:none!important;}

/* Library: yêu thích + đã xong ở tab việc cần làm, ẩn/hiện */
.ml-v42-task-library-hub{margin:8px 0 0!important;}
.ml-v42-library-buttons{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;margin-bottom:6px!important;}
.ml-v42-library-buttons button{height:28px!important;padding:3px 10px!important;border-radius:999px!important;border:1px solid var(--ml-v42-border)!important;background:#fff!important;color:#334155!important;font-size:12px!important;font-weight:900!important;cursor:pointer!important;box-shadow:none!important;transform:none!important;}
.ml-v42-library-buttons button.active{background:#fff7ed!important;border-color:rgba(249,115,22,.38)!important;color:#9a3412!important;}
.ml-v42-library-panels{display:grid!important;gap:8px!important;}
.ml-v42-library-panel{margin:0!important;padding:8px!important;border-radius:16px!important;background:linear-gradient(180deg,#fff,#fffbeb)!important;border:1px solid rgba(245,158,11,.20)!important;box-shadow:none!important;}
.ml-v42-library-panel.ml-v42-collapsed{display:none!important;}
.ml-v42-library-panel .ml-block-head{display:none!important;}
.ml-v42-library-panel .ml-panel{box-shadow:none!important;border-radius:14px!important;padding:8px!important;}
.ml-v42-library-panel .ml-section-head{margin-bottom:6px!important;}
.ml-v42-library-panel .ml-section-head h2{font-size:14px!important;margin:0!important;}
.ml-v42-library-panel .ml-section-head p{font-size:11.5px!important;line-height:1.25!important;margin:2px 0 0!important;opacity:.62!important;}
.ml-v42-completed-panel .ml-history-list,.ml-v42-favorite-panel .ml-favorite-list{max-height:260px!important;overflow:auto!important;overscroll-behavior-y:auto!important;padding-right:2px!important;display:grid!important;gap:6px!important;}
.ml-history-item,.ml-favorite-item{padding:8px!important;border-radius:13px!important;box-shadow:none!important;}
.ml-history-top strong,.ml-favorite-top strong{font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.ml-history-top span,.ml-history-desc,.ml-favorite-desc,.ml-favorite-top span{font-size:11.5px!important;line-height:1.25!important;}

/* Nhạc tập trung V42 */
#mlV34FocusMusic,#mlV40FocusMusic,.ml-v39-yt-music{display:none!important;}
.ml-v42-focus-music{position:relative!important;display:flex!important;align-items:center!important;gap:4px!important;min-height:30px!important;padding:3px!important;border-radius:999px!important;background:rgba(255,255,255,.82)!important;border:1px solid rgba(148,163,184,.22)!important;box-shadow:none!important;z-index:20!important;}
.ml-v42-focus-music button,.ml-v42-focus-music select{height:25px!important;min-height:25px!important;border-radius:999px!important;border:1px solid rgba(148,163,184,.28)!important;background:#fff!important;color:#334155!important;font-size:11px!important;font-weight:900!important;padding:0 7px!important;box-shadow:none!important;transform:none!important;cursor:pointer!important;}
.ml-v42-focus-music button{min-width:25px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.ml-v42-focus-music button.playing{background:#fff7ed!important;color:#9a3412!important;border-color:rgba(249,115,22,.38)!important;}
.ml-v42-focus-music select{max-width:72px!important;padding-right:18px!important;}
.ml-v42-volume{display:flex!important;align-items:center!important;gap:3px!important;font-size:11px!important;}
.ml-v42-volume input{width:52px!important;height:18px!important;accent-color:#f97316!important;}
#mlV42MusicNote{max-width:110px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:10.5px!important;color:#64748b!important;}
.ml-v42-yt-panel{position:absolute!important;right:0!important;top:36px!important;width:min(390px,calc(100vw - 24px))!important;padding:10px!important;border-radius:18px!important;background:#fff!important;border:1px solid rgba(148,163,184,.25)!important;box-shadow:0 18px 50px rgba(15,23,42,.18)!important;z-index:9999!important;}
.ml-v42-yt-top,.ml-v42-yt-row{display:flex!important;align-items:center!important;gap:6px!important;margin-bottom:7px!important;}
.ml-v42-yt-top{justify-content:space-between!important;}
.ml-v42-yt-row input,.ml-v42-yt-row select{min-width:0!important;flex:1!important;height:32px!important;border-radius:12px!important;border:1px solid rgba(148,163,184,.28)!important;padding:0 9px!important;font-size:12px!important;}
.ml-v42-yt-row button{height:32px!important;min-width:32px!important;border-radius:12px!important;}
.ml-v42-yt-frame{width:100%!important;aspect-ratio:16/9!important;border-radius:16px!important;overflow:hidden!important;background:#0f172a!important;margin-top:6px!important;}
.ml-v42-yt-frame iframe{width:100%!important;height:100%!important;border:0!important;display:block!important;}
.ml-v42-yt-panel small{display:block!important;margin-top:6px!important;font-size:11px!important;color:#64748b!important;line-height:1.25!important;}

/* Daily/session gọn hơn, bỏ chữ dài */
.ml-session-item{transition:background .12s ease,border-color .12s ease!important;transform:none!important;}
.ml-session-item:hover{transform:none!important;}
.ml-session-manager-panel[hidden],.ml-v39-management-hidden{display:none!important;}

@media (max-width: 760px){
  .ml-v42-focus-music{width:100%!important;justify-content:flex-start!important;border-radius:16px!important;}
  .ml-v42-yt-panel{left:0!important;right:auto!important;width:calc(100vw - 32px)!important;}
  #mlV42MusicNote{display:none!important;}
  .ml-task-actions{opacity:1!important;}
}
