/* TaskCal @ngchithanh - Calm Productivity (Original Skill Design Tokens) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  /* --- BỘ TOKEN CHUẨN CỦA SKILL (Pastel Lavender – Calm Productivity @ngchithanh) --- */
  --color-primary: #A48FE0;         /* tím lavender đậm - nổi bật */
  --color-primary-light: #D9CEF7;   /* tím pastel nhạt - nền card chính */
  --color-primary-dark: #1E1B2E;    /* đen ánh tím - khung số đo, pill, menu đáy */

  --color-mint: #B8E8D4;            /* mint pastel - ưu tiên / OK */
  --color-mint-dark: #4A9B7F;       /* mint đậm - progress fill, chữ nhóm */

  --color-yellow: #F5D563;          /* vàng - highlight */
  --color-yellow-soft: #FBEBB0;     /* vàng nhạt - cột đang áp dụng */

  --color-bg-page: #C9D6D3;         /* nền tổng thể xanh xám nhạt */
  --color-bg-card: #FFFFFF;
  --color-bg-soft: #F4F3F8;

  --color-text-dark: #2B2933;
  --color-text-body: #8B8894;
  --color-text-light: #B5B2C0;

  --color-badge-high-bg: #F3D9A8;   /* cam nhạt - cảnh báo */
  --color-badge-high-text: #B8722E;
  --color-badge-low-bg: #B8E8D4;    /* mint - an toàn */
  --color-badge-low-text: #2E8B6B;

  --color-border: #ECEAF2;
  --color-dark-pill: #1E1B2E;

  /* Phái sinh nền wash */
  --mint-wash: #EEF9F4;
  --yellow-wash: #FFF9E6;
  --lav-wash: #F3EFFD;
  --rose-wash: #FBEFE6;

  /* Theme Mappings */
  --bg-gradient: radial-gradient(circle at 85% 10%, #D9CEF7 0%, #EEF9F4 38%, #F4F3F8 70%, #E8EAE9 100%);
  --bg-page: var(--color-bg-page);
  --bg-card: var(--color-bg-card);
  --bg-card-dark: var(--color-primary-dark);
  --bg-soft: var(--color-bg-soft);
  --bg-input: #F8F7FC;

  --text-dark: var(--color-text-dark);
  --text-body: var(--color-text-body);
  --text-muted: var(--color-text-light);
  --border: var(--color-border);

  --accent-lime: var(--color-mint);
  --accent-lime-dark: var(--color-mint-dark);
  --accent-purple: var(--color-primary);
  --accent-purple-light: var(--color-primary-light);
  --accent-blue: #3B82F6;
  --accent-blue-light: #EBF3FE;

  /* Priority Colors */
  --prio-low-bg: #DCFCE7;
  --prio-low-text: #166534;
  --prio-med-bg: #FEF3C7;
  --prio-med-text: #92400E;
  --prio-high-bg: #FEE2E2;
  --prio-high-text: #991B1B;

  /* Radiuses */
  --radius-full: 999px;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(43, 41, 51, 0.04);
  --shadow-card: 0 6px 16px rgba(43, 41, 51, 0.06);
  --shadow-dark: 0 10px 28px rgba(30, 27, 46, 0.22);
  --shadow-nav: 0 8px 24px rgba(30, 27, 46, 0.24);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: clip;
  touch-action: pan-y;
  background: var(--bg-gradient);
  background-attachment: fixed;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: 16px;
}

body {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 16px));
}

.app-wrapper {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding: 16px 18px 24px 18px;
}

@media (min-width: 768px) {
  .app-wrapper {
    max-width: 600px;
  }
}
/* TOP HEADER */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #E8DFF5;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.greeting-text {
  font-size: 12px;
  color: var(--text-body);
  font-weight: 500;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn-circle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.icon-btn-circle:active {
  transform: scale(0.94);
}

.icon-btn-circle.dark {
  background: var(--bg-card-dark);
  color: #fff;
  border: none;
}

/* HERO HEADLINE */
.hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.18;
  color: var(--text-dark);
  margin-bottom: 20px;
}

/* TODAY'S PROGRESS CARD (DARK HERO) */
.progress-card {
  background: var(--bg-card-dark);
  border-radius: var(--radius-xl);
  padding: 22px;
  color: #fff;
  box-shadow: var(--shadow-dark);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.progress-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #A3A0B3;
  margin-bottom: 16px;
}

.progress-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gauge-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: #2A2738;
  stroke-width: 10;
}

.gauge-meter {
  fill: none;
  stroke: var(--accent-lime);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.gauge-label {
  position: absolute;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.progress-stats-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.p-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #252233;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #A3A0B3;
}

.p-stat-info {
  display: flex;
  flex-direction: column;
}

.p-stat-num {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.p-stat-sub {
  font-size: 11px;
  color: #8C889C;
}

/* MOOD TRACKER CARD (NEW FEATURE) */
.mood-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.mood-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mood-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.mood-streak-badge {
  font-size: 11.5px;
  font-weight: 600;
  background: #FEF3C7;
  color: #B45309;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mood-emoji-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}

.mood-pill-btn {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px 2px;
}

.mood-pill-btn:hover {
  transform: translateY(-2px);
  background: #EDE8F8;
}

.mood-pill-btn.active {
  background: #EDE8F8;
  border-color: var(--accent-purple);
  box-shadow: 0 4px 14px rgba(157, 123, 252, 0.25);
  transform: scale(1.05);
}

.mood-icon-big {
  font-size: 24px;
  line-height: 1;
}

.mood-pill-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-body);
  margin-top: 4px;
}

.mood-note-input {
  width: 100%;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  outline: none;
  color: var(--text-dark);
}

.mood-note-input:focus {
  border-color: var(--accent-purple);
  background: #fff;
}

/* SECTION HEADERS */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}

.view-all-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
}

/* HORIZONTAL PILL TABS */
.pill-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}

.pill-tabs-bar::-webkit-scrollbar {
  display: none;
}

.pill-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dark);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pill-tab.active {
  background: var(--bg-card-dark);
  color: #fff;
  border-color: var(--bg-card-dark);
  box-shadow: var(--shadow-sm);
}

.tab-count-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-lime);
  color: var(--accent-lime-dark);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-tab.active .tab-count-badge {
  background: #fff;
  color: #000;
}

/* TASK CARDS (CLEAN DRIBBBLE STYLE) */
.task-card-modern {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.task-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(18, 17, 24, 0.08);
}

.task-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.priority-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.priority-pill.high {
  background: var(--prio-high-bg);
  color: var(--prio-high-text);
}

.priority-pill.med {
  background: var(--prio-med-bg);
  color: var(--prio-med-text);
}

.priority-pill.low {
  background: var(--prio-low-bg);
  color: var(--prio-low-text);
}

.arrow-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.arrow-action-btn:hover {
  background: var(--text-dark);
  color: #fff;
}

.task-main-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

.task-desc-text {
  font-size: 13px;
  color: var(--text-body);
  margin-bottom: 12px;
  line-height: 1.4;
}

.task-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.task-time-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack-item {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -6px;
  background: #DDD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}

.avatar-stack-item:first-child {
  margin-left: 0;
}

/* ========================================================
   SCREEN 2: WEEKLY SCHEDULE CALENDAR (CHUẨN ẢNH MẪU 100%)
   ======================================================== */
.cal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-filter-dropdown {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1E1B2E;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.cal-filter-wrapper {
  position: relative;
}

.cal-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(30, 27, 46, 0.12);
  padding: 6px;
  min-width: 170px;
  z-index: 100;
  display: none;
}

.cal-filter-menu.open {
  display: block;
}

.cal-filter-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1E1B2E;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.cal-filter-menu-item:hover,
.cal-filter-menu-item.active {
  background: var(--bg-soft);
}

.cal-dots-rainbow {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.cal-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cal-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E1B2E;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.btn-cal-icon-pill:hover {
  background: var(--bg-soft);
}

/* DẢI CHỌN TUẦN NGANG (WEEK STRIP) */
.week-strip-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.week-strip-scroll::-webkit-scrollbar {
  display: none;
}

.week-strip-pill {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #64748B;
  transition: all 0.2s ease;
}

.week-strip-pill:hover {
  background: rgba(255, 255, 255, 0.6);
}

.week-strip-month {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.week-strip-range {
  font-size: 14px;
  font-weight: 800;
  margin-top: 1px;
}

.week-strip-pill.active {
  background: #FA3E3E;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(250, 62, 62, 0.35);
}

.week-strip-pill.active .week-strip-month {
  color: rgba(255, 255, 255, 0.9);
}

/* BẢNG LỊCH TUẦN & CỘT NGÀY */
.week-board-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 12px 14px 20px 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.week-day-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding: 12px 0;
  border-bottom: 1px solid #F1F1F5;
  min-height: 85px;
}

.week-day-row:last-child {
  border-bottom: none;
}

/* Cột nhãn ngày bên trái */
.week-day-badge-col {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  cursor: pointer;
}

.week-normal-day-num {
  font-size: 17px;
  font-weight: 800;
  color: #1E1B2E;
  line-height: 1.1;
}

.week-normal-day-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #94A3B8;
  margin-top: 2px;
}

/* Viên thuốc đứng cho ngày hôm nay / đang chọn */
.active-today-pill-badge {
  width: 42px;
  border-radius: 21px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(250, 62, 62, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.today-pill-top {
  background: #FA3E3E;
  color: #FFFFFF;
  padding: 6px 2px 4px 2px;
}

.today-pill-top-num {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.today-pill-top-name {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.today-pill-bottom {
  background: #18181B;
  color: #FFFFFF;
  padding: 3px 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ĐƯỜNG CHỈ GIỜ HIỆN TẠI (CURRENT TIME RED INDICATOR LINE) */
.current-time-line-indicator {
  position: absolute;
  top: 16px;
  left: -8px;
  right: 0;
  height: 1.5px;
  background: #FA3E3E;
  z-index: 20;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.current-time-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FA3E3E;
  margin-left: -3px;
  box-shadow: 0 0 0 2px rgba(250, 62, 62, 0.25);
}

.time-indicator-badge {
  background: #FA3E3E;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: -4px;
  box-shadow: 0 2px 8px rgba(250, 62, 62, 0.3);
  white-space: nowrap;
}

/* LƯỚI THẺ SỰ KIỆN TRONG NGÀY */
.week-events-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.week-event-card {
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  min-height: 76px;
  text-decoration: none;
}

.week-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Các biến thể màu pastel đúng chuẩn ảnh */
.week-event-card.purple {
  background: #F3E8FF;
  border: 1px solid #E9D5FF;
  color: #3B0764;
}

.week-event-card.amber {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #78350F;
}

.week-event-card.green {
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
  color: #14532D;
}

.week-event-card.blue {
  background: #E0F2FE;
  border: 1px solid #BAE6FD;
  color: #0C4A6E;
}

.week-event-card.warm-gray {
  background: #F5F5F0;
  border: 1px solid #E7E5DF;
  color: #262626;
}

.event-top-info {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.event-icon-badge {
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1.2;
}

.event-title-text {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-time-footer {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
  text-align: right;
  margin-top: 6px;
  color: inherit;
}

.btn-add-day-empty {
  border: 1px dashed #CBD5E1;
  background: transparent;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  min-height: 50px;
}

.btn-add-day-empty:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: #94A3B8;
  color: #1E1B2E;
}

.timeline-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.pill-action-btn.blue {
  background: var(--accent-blue);
  color: #fff;
}

.pill-action-btn.purple {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
}

/* SCREEN 3: ADD TASK MODAL / FORM */
.modal-fullscreen {
  position: fixed;
  inset: 0;
  background: var(--bg-gradient);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px 18px 40px 18px;
  display: none;
}

.modal-fullscreen.open {
  display: block;
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-nav-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.form-group-modern {
  margin-bottom: 18px;
}

.form-label-modern {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: block;
}

.input-rounded-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.input-rounded-card:focus {
  border-color: var(--text-dark);
  box-shadow: 0 0 0 3px rgba(18, 17, 24, 0.08);
}

.priority-selector-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.prio-btn {
  padding: 12px 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prio-btn.low {
  background: var(--prio-low-bg);
  color: var(--prio-low-text);
}

.prio-btn.med {
  background: var(--prio-med-bg);
  color: var(--prio-med-text);
}

.prio-btn.high {
  background: var(--prio-high-bg);
  color: var(--prio-high-text);
}

.prio-btn.selected {
  border-color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: scale(1.03);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: #E8E5F8;
  color: #58469C;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-black-pill-cta {
  width: 100%;
  background: var(--bg-card-dark);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-dark);
  margin-top: 24px;
  transition: all 0.2s ease;
}

.btn-black-pill-cta:active {
  transform: scale(0.98);
}

/* FLOATING DOCK BOTTOM NAV - CHUẨN DESIGN TOKENS VÀ ẢNH 4 */
.floating-dock-nav {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-dark-pill); /* #1E1B2E */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-full);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 500;
  max-width: 96vw;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.65);
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 52px;
}

.dock-item svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.dock-item:hover {
  color: #FFFFFF;
}

.dock-item.active {
  background: #FFFFFF;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.dock-item.active svg {
  stroke: var(--color-primary-dark);
}

/* TAB PANES */
.screen-pane {
  display: none;
}

.screen-pane.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* TOAST */
.toast-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card-dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-nav);
  z-index: 2000;
  animation: slideDownToast 0.25s ease;
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* TASK ACTION BUTTONS (EDIT, DELETE, CALENDAR) */
.task-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  background: var(--bg-soft);
}

.btn-card-action.edit:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.btn-card-action.del:hover {
  border-color: #F87171;
  color: #DC2626;
  background: #FEF2F2;
}

.btn-card-action.gcal:hover {
  border-color: #3B82F6;
  color: #2563EB;
}

/* MONTH CALENDAR EVENTS GRID STYLING */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.month-cell {
  min-height: 85px;
  max-height: 125px;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
  overflow: hidden;
}

.month-cell:hover {
  background: #EFEBF8;
  border-color: var(--accent-purple-light);
}

.month-cell.today {
  border-color: var(--accent-purple);
  background: #FFFFFF;
}

.month-cell.selected {
  background: #18181B !important;
  color: #FFFFFF !important;
}

.month-cell.selected .month-cell-num {
  color: #FFFFFF;
}

.month-cell-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
  text-align: right;
  padding-right: 2px;
}

.cal-task-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 3px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.25;
  text-align: left;
}

.cal-task-pill.high {
  background: #FEE2E2;
  color: #991B1B;
  border-left: 2px solid #EF4444;
}

.cal-task-pill.med {
  background: #FEF3C7;
  color: #92400E;
  border-left: 2px solid #F59E0B;
}

.cal-task-pill.low {
  background: #DCFCE7;
  color: #166534;
  border-left: 2px solid #10B981;
}

.month-cell.selected .cal-task-pill {
  background: #27272A;
  color: #F4F4F5;
  border-left-color: var(--accent-lime);
}

.cal-more-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

/* Adjust dock nav for 5 items */
.dock-item {
  padding: 8px 12px;
  font-size: 11px;
}

/* ========================================================
   MOOD BOARD REDESIGN (COPY BỐ CỤC CHÍNH XÁC THEO ẢNH MẪU)
   ======================================================== */
.mood-heading-classic {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: #1E1B2E;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.015em;
}

.mood-faces-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px 2px;
}

.mood-face-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: none;
  border-radius: 20px;
  padding: 10px 4px 12px 4px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.mood-face-btn:hover {
  transform: translateY(-2px);
}

.mood-face-btn.active {
  background: #FFFFFF;
  box-shadow: 0 10px 26px rgba(164, 143, 224, 0.2);
  transform: translateY(-4px);
}

.mood-face-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.mood-face-btn.active .mood-face-circle {
  transform: scale(1.06);
}

.mood-face-circle.great {
  background: #68D391;
  color: #1C4532;
}

.mood-face-circle.good {
  background: #63B3ED;
  color: #1A365D;
}

.mood-face-circle.okay {
  background: #ECC94B;
  color: #5F370E;
}

.mood-face-circle.bad {
  background: #F6AD55;
  color: #7B341E;
}

.mood-face-circle.awful {
  background: #B794F4;
  color: #322659;
}

.mood-face-circle svg {
  width: 28px;
  height: 28px;
}

.mood-face-name {
  font-size: 13px;
  font-weight: 700;
  color: #2B2933;
  margin-bottom: 2px;
}

.mood-face-desc {
  font-size: 9.5px;
  color: #8B8894;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
  max-width: 62px;
}

/* CARDS CHO TUẦN NÀY & NHẬT KÝ */
.mood-panel-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(43, 41, 51, 0.05);
  border: 1px solid #ECEAF2;
  margin-bottom: 18px;
}

.mood-panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mood-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #1E1B2E;
}

.mood-panel-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
}

.mood-panel-link:hover {
  text-decoration: underline;
}

/* BIỂU ĐỒ TUẦN NÀY (THIS WEEK GRAPH) */
.mood-chart-area {
  position: relative;
  width: 100%;
  margin-top: 8px;
}

.mood-chart-svg {
  width: 100%;
  height: 140px;
  display: block;
  overflow: visible;
}

.chart-tooltip-floating {
  position: absolute;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 5px 12px;
  box-shadow: 0 6px 20px rgba(164, 143, 224, 0.28);
  border: 1px solid #ECEAF2;
  text-align: center;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 10;
  margin-top: -10px;
  transition: all 0.2s ease;
}

.chart-tooltip-floating::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #FFFFFF transparent transparent transparent;
}

.chart-tooltip-mood {
  font-size: 11px;
  font-weight: 800;
  color: #1E1B2E;
}

.chart-tooltip-date {
  font-size: 9.5px;
  color: #8B8894;
  font-weight: 500;
}

.mood-week-days-axis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #8B8894;
}

.mood-week-mini-faces {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-top: 8px;
}

.mini-face-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.mini-face-dot.great { background: #68D391; }
.mini-face-dot.good { background: #63B3ED; }
.mini-face-dot.okay { background: #ECC94B; }
.mini-face-dot.bad { background: #F6AD55; }
.mini-face-dot.awful { background: #B794F4; }
.mini-face-dot.empty { background: #E2E8F0; opacity: 0.45; }

/* RECENT ENTRIES LIST */
.mood-recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F4F3F8;
}

.mood-recent-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.mood-recent-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mood-recent-date {
  font-size: 14px;
  font-weight: 700;
  color: #1E1B2E;
}

.mood-recent-note {
  font-size: 12px;
  color: #8B8894;
}

.mood-pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.mood-pill-badge.great {
  background: #DCFCE7;
  color: #166534;
}

.mood-pill-badge.good {
  background: #E0F2FE;
  color: #0369A1;
}

.mood-pill-badge.okay {
  background: #FEF3C7;
  color: #92400E;
}

.mood-pill-badge.bad {
  background: #FFEDD5;
  color: #9A3412;
}

.mood-pill-badge.awful {
  background: #F3E8FF;
  color: #6B21A8;
}


