/* Taskflow — layout & colors matched to reference (dark + orange) */
:root {
  --bg-top: #2a221c;
  --bg-bottom: #1a1410;
  --orange: #ff7a45;
  --orange-dark: #e85d2c;
  --white: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.45);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.18);
  --card-dark: rgba(40, 36, 32, 0.95);
  --detail-box: #2c2824;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-height: 96px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--white);
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-bottom) 55%, #0f0c0a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 20px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  position: relative;
}

.view {
  display: none;
  padding-top: max(12px, env(safe-area-inset-top));
  animation: fadeIn 0.22s ease;
}

.view--active {
  display: block;
}

#view-detail {
  padding-bottom: 120px;
}

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

/* Home header */
.home-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.greeting {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

.greeting span {
  color: var(--white);
  font-weight: 600;
}

.home-header__actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

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

.tasks-today-title {
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-header--simple .tasks-today-title {
  margin-top: 8px;
}

.sync-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.sync-dot--live {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.sync-dot--sync {
  background: var(--orange);
  animation: pulse-dot 1s ease infinite;
}

.sync-dot--offline {
  background: #f87171;
}





@keyframes pulse-dot {
  50% {
    opacity: 0.45;
  }
}

.search-bar-wrap {
  margin-top: 16px;
}

.search-bar {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
}

.search-bar::placeholder {
  color: var(--text-dim);
}

/* Date bubbles */
.date-strip-wrap {
  margin: 20px -20px 8px;
  padding: 0 16px;
  overflow: hidden;
}

.date-strip--bubbles {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.date-strip--bubbles::-webkit-scrollbar {
  display: none;
}

.date-bubble {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.date-bubble:active {
  transform: scale(0.95);
}

.date-bubble--today {
  color: var(--white);
  border-color: rgba(255, 122, 69, 0.5);
}

.date-bubble--selected {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  box-shadow: 0 0 0 2px rgba(255, 122, 69, 0.35);
}

.date-bubble--done {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.55);
  color: var(--white);
}

.date-bubble__check {
  position: absolute;
  font-size: 11px;
  font-weight: 800;
  color: #4ade80;
  bottom: 2px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.date-bubble--done .date-bubble__check {
  display: block;
}

.date-bubble:not(.date-bubble--done) .date-bubble__check {
  display: none;
}

.calendar-toggle {
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calendar-toggle__icon {
  font-size: 16px;
}

.home-calendar-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--detail-box);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-cal-nav__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.home-cal-nav__title {
  font-weight: 700;
  font-size: 16px;
}

.home-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.home-cal-cell {
  aspect-ratio: 1;
  max-height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.home-cal-cell--muted {
  opacity: 0.25;
  pointer-events: none;
}

.home-cal-cell--done {
  background: rgba(250, 204, 21, 0.25);
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.5);
}

.home-cal-cell--has {
  color: var(--white);
}

.home-cal-cell--selected {
  box-shadow: 0 0 0 2px var(--orange);
}

.icon-btn--danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.icon-btn--danger:active {
  color: #fecaca;
}

.chart-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.chart-toggle__btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chart-toggle__btn--active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: var(--white);
  border-color: rgba(56, 189, 248, 0.5);
}

.chart-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#progress-chart {
  display: block;
  width: 100%;
  height: 200px;
}

.chart-summary {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Task list */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  padding-bottom: 8px;
}

.task-card {
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  text-align: left;
  cursor: pointer;
  border: none;
  width: 100%;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-card:active {
  transform: scale(0.99);
}

.task-card--primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: var(--white);
  box-shadow: 0 12px 32px rgba(255, 122, 69, 0.35);
}

.task-card--secondary {
  background: var(--white);
  color: #1a1a1a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Card palette: orange, white, yellow, blue, green, pink, candy, purple */
.task-card--v0 {
  background: linear-gradient(135deg, #ff7a45 0%, #e85d2c 100%);
  color: var(--white);
  box-shadow: 0 12px 32px rgba(255, 122, 69, 0.32);
}

.task-card--v1 {
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.task-card--v2 {
  background: linear-gradient(145deg, #fde047 0%, #facc15 100%);
  color: #422006;
  box-shadow: 0 10px 28px rgba(250, 204, 21, 0.35);
}

.task-card--v3 {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35);
}

.task-card--v4 {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.32);
}

.task-card--v5 {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.32);
}

.task-card--v6 {
  background: linear-gradient(145deg, #fcd34d 0%, #fb923c 55%, #f97316 100%);
  color: #431407;
  box-shadow: 0 10px 28px rgba(251, 146, 60, 0.35);
}

.task-card--v7 {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(168, 85, 247, 0.32);
}

.task-card--on-dark .pill {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.task-card--on-dark .task-card__progress {
  color: rgba(255, 255, 255, 0.95);
}

.task-card--on-dark .task-card__by {
  color: rgba(255, 255, 255, 0.85);
}

.task-card--on-dark .avatar-stack .av {
  border-color: rgba(255, 122, 69, 0.6);
}

.task-card--on-light .pill {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.task-card--on-light .task-card__progress {
  color: #444;
}

.task-card--on-light .task-card__by {
  color: #555;
}

.task-card--on-light .avatar-stack .av {
  border-color: var(--white);
}

.task-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.task-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.task-card--primary .pill {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.task-card--secondary .pill {
  background: transparent;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.task-card__progress {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.task-card--secondary .task-card__progress,
.task-card--v1 .task-card__progress,
.task-card--v2 .task-card__progress,
.task-card--v6 .task-card__progress {
  color: #444;
}

.task-card__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.task-card__time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 14px;
}

.task-card--secondary .task-card__time,
.task-card--on-light .task-card__time {
  color: #555;
  opacity: 1;
}

.task-card--on-dark .task-card__time {
  opacity: 0.92;
}

.task-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-card__by {
  font-size: 12px;
  opacity: 0.85;
}

.task-card--secondary .task-card__by,
.task-card--v1 .task-card__by,
.task-card--v2 .task-card__by,
.task-card--v6 .task-card__by {
  color: #666;
  opacity: 1;
}

.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.avatar-stack .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--white);
  margin-right: -10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
}

.task-card--secondary .avatar-stack .av {
  border-color: var(--white);
}

.task-card--primary .avatar-stack .av {
  border-color: var(--orange);
}

/* Detail */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-right: 8px;
}

.detail-date-line {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}

.detail-avatar-wrap .detail-label {
  margin-bottom: 6px;
}

.avatar-stack--single {
  flex-direction: row;
}

.avatar-stack--single .av {
  margin-right: 0;
}

.detail-box {
  background: var(--detail-box);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-box__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-box__value {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.detail-section {
  margin-bottom: 22px;
}

.detail-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.tick-slider-wrap {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}

.tick-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12) 0 2px,
    transparent 2px 5px
  );
  pointer-events: none;
}

.tick-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  margin: 0;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.tick-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-top: -9px;
}

.tick-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--orange) 0%,
    var(--orange) var(--fill, 0%),
    rgba(255, 255, 255, 0.1) var(--fill, 0%),
    rgba(255, 255, 255, 0.1) 100%
  );
}

.tick-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tick-range::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-description {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--card-dark);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 14px 16px;
  resize: vertical;
  min-height: 100px;
}

.detail-description::placeholder {
  color: var(--text-dim);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.pill--outline {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.attach-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--glass-border);
}

.text-btn {
  background: none;
  border: none;
  color: var(--orange);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

.primary-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

.primary-btn--small {
  width: auto;
  padding: 12px 20px;
  margin-top: 0;
  flex-shrink: 0;
}

.secondary-btn {
  width: 100%;
  padding: 14px 16px;
  margin-top: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.profile-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 22px 0;
}

.profile-input--mono {
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.modal-hint {
  margin-top: 0;
  margin-bottom: 8px;
}

#btn-install-pwa {
  margin-top: 20px;
}

.profile-progress-label {
  margin-top: 20px;
}

.chart-section-label {
  margin-top: 20px;
}

.profile-hint--tight {
  margin-bottom: 8px;
}

.profile-progress {
  height: 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--orange), #fbbf24);
  transition: width 0.35s ease;
}

.profile-progress-pct {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
}

.modal-select,
select.profile-input.modal-select {
  background-color: #1e1a18;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  appearance: auto;
}

.modal-select option {
  background: #1a1410;
  color: var(--white);
  padding: 10px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.comment-list li {
  padding: 12px 14px;
  background: var(--detail-box);
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.comment-list li small {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 6px;
}

.comments-section {
  padding-bottom: 8px;
}

.comment-bar-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  width: 100%;
  max-width: 430px;
  padding: 0 20px 10px;
  background: linear-gradient(180deg, transparent, var(--bg-bottom) 28%);
  pointer-events: none;
}

.comment-bar-wrap > * {
  pointer-events: auto;
}

.safe-bottom {
  padding-bottom: max(10px, var(--safe-bottom));
}

#view-detail .comment-bar-wrap {
  z-index: 20;
}

.comment-bar--simple {
  padding-right: 18px;
}

.comment-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--detail-box);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  min-width: 0;
}

.comment-input::placeholder {
  color: var(--text-dim);
}

.comment-bar__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* iOS-style liquid glass dock + side FAB */
.dock-safe {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  pointer-events: none;
  padding-bottom: max(12px, var(--safe-bottom));
}

.dock-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 18px;
  pointer-events: auto;
}

.dock-bar {
  flex: 1;
  min-width: 0;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 12px;
  min-height: 62px;
  border-radius: 40px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.12) 100%
  );
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.dock-item {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
}

.dock-item--active {
  color: var(--orange);
}

.dock-item__circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.dock-item--home:not(.dock-item--active) .dock-item__home-active {
  display: none;
}

.dock-item--home:not(.dock-item--active) .dock-item__home-idle {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.dock-item--home.dock-item--active .dock-item__home-idle {
  display: none !important;
}

.dock-fab {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(160deg, #ff8f5c 0%, var(--orange) 40%, var(--orange-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(255, 122, 69, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dock-fab:active {
  transform: scale(0.94);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(20px, var(--safe-bottom));
}

.modal {
  width: 100%;
  max-width: 400px;
  background: var(--detail-box);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  border: 1px solid var(--glass-border);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-actions .primary-btn {
  width: auto;
  margin-top: 0;
  padding: 12px 24px;
}

.modal-actions .text-btn {
  padding: 12px 16px;
}

/* Profile */
.profile-card {
  background: var(--detail-box);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  margin-bottom: 8px;
}

.profile-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 32px 16px;
  font-size: 15px;
}

@media (min-width: 480px) {
  .tasks-today-title {
    font-size: 32px;
  }
}

/* AI Agent Box */
.ai-box-wrap {
  margin-top: 16px;
  animation: slideIn 0.35s ease;
}

.ai-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.ai-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.ai-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ai-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--orange), #ff9a7b);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.4);
  transition: transform 0.1s ease;
}

.ai-btn:active {
  transform: scale(0.9);
}

/* Profiles & Auth */
.profile-auth-section {
  margin: 12px 0 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  text-align: center;
  backdrop-filter: blur(10px);
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--white);
  background: var(--white);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

.google-btn:active {
  transform: scale(0.98);
}

.google-btn:hover {
  background: #f4f4f4;
}

.secondary-btn {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.secondary-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.user-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--orange);
}

.av--large {
  width: 52px;
  height: 52px;
  font-size: 18px;
  border: 2px solid var(--orange);
}

.user-info-text {
  flex: 1;
}

.user-display-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.user-email {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* --- Login Gateway & Splash --- */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.splash-logo {
  text-align: center;
  animation: splashIn 0.8s ease-out;
}

.splash-img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.splash-title {
  font-size: 32px;
  font-weight: 700;
  background: var(--grad-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.splash-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--orange);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 40px 24px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.login-header h2 {
  font-size: 28px;
  color: var(--white);
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-dim);
}

.login-form-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 32px;
  border-radius: 32px;
}

.login-error {
  margin-top: 16px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-radius: 12px;
  font-size: 13px;
  text-align: center;
}

@keyframes splashIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-actions-footer {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
  text-align: center;
}
