:root {
  color-scheme: light;
  --bg: #e7edf4;
  --ink: #172033;
  --muted: #68758b;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(49, 69, 101, 0.15);
  --blue: #205fbc;
  --blue-dark: #123f7d;
  --orange: #c77a16;
  --red: #b73737;
  --green: #2f7d62;
  --shadow: 0 22px 60px rgba(22, 38, 66, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(32, 95, 188, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 95, 188, 0.06) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(32, 95, 188, 0.2), transparent 36rem),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

html {
  scroll-behavior: smooth;
}

.shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(247, 250, 255, 0.84);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: white;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 14px 24px rgba(32, 95, 188, 0.26);
}

.brand h1,
.brand p,
.hero h2,
.hero p,
.panel h3 {
  margin: 0;
}

.brand h1 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.sync-status-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid rgba(32, 95, 188, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(235, 243, 255, 0.78)),
    repeating-linear-gradient(135deg, rgba(32, 95, 188, 0.05) 0 1px, transparent 1px 9px);
  box-shadow: 0 12px 28px rgba(22, 38, 66, 0.08);
}

.sync-status-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.sync-status-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.sync-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(47, 125, 98, 0.12);
}

.sync-status-panel[data-tone="pending"] {
  border-color: rgba(199, 122, 22, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 237, 0.86)),
    repeating-linear-gradient(135deg, rgba(199, 122, 22, 0.06) 0 1px, transparent 1px 9px);
}

.sync-status-panel[data-tone="pending"] .sync-status-badge {
  color: #8a520f;
  background: rgba(199, 122, 22, 0.13);
}

.sync-status-panel[data-tone="pending"] .sync-status-dot {
  background: var(--orange);
  box-shadow: 0 0 0 6px rgba(199, 122, 22, 0.14);
}

.sync-status-panel strong {
  color: var(--ink);
  font-size: 15px;
}

.sync-status-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sync-connect-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.cloud-sync-status-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(32, 95, 188, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(235, 243, 255, 0.76)),
    repeating-linear-gradient(135deg, rgba(32, 95, 188, 0.05) 0 1px, transparent 1px 9px);
  box-shadow: 0 12px 28px rgba(22, 38, 66, 0.07);
}

.cloud-sync-status-panel[data-tone="warning"] {
  border-color: rgba(199, 122, 22, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 237, 0.86)),
    repeating-linear-gradient(135deg, rgba(199, 122, 22, 0.06) 0 1px, transparent 1px 9px);
}

.cloud-sync-status-panel[data-tone="pending"] {
  border-color: rgba(32, 95, 188, 0.24);
}

.cloud-sync-status-panel[data-tone="ready"] {
  border-color: rgba(47, 125, 98, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 250, 246, 0.82)),
    repeating-linear-gradient(135deg, rgba(47, 125, 98, 0.05) 0 1px, transparent 1px 9px);
}

.cloud-sync-status-heading {
  display: grid;
  gap: 4px;
}

.cloud-sync-status-heading strong {
  color: var(--ink);
  font-size: 16px;
}

.cloud-sync-status-grid {
  display: grid;
  gap: 8px;
}

.cloud-sync-status-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.cloud-sync-status-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cloud-sync-status-item strong {
  color: var(--blue-dark);
  font-size: 12px;
  text-align: right;
}

.cloud-sync-suggested-action {
  margin: 0;
  color: #40506e;
  font-size: 12px;
  line-height: 1.55;
}

#taskSection,
#cloudSyncSection,
#taskCaptureSection,
#categorySection {
  scroll-margin-top: 18px;
}

.mobile-bottom-nav {
  display: none;
}

.brand p,
.hero-copy,
.local-note,
.task-meta,
.privacy-hint {
  color: var(--muted);
}

.category-tree {
  display: grid;
  gap: 8px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.category-row.child {
  grid-template-columns: 1fr;
  margin-left: 12px;
}

.category-button {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: 0.18s ease;
}

.category-button:hover,
.category-button.active {
  border-color: rgba(32, 95, 188, 0.2);
  background: rgba(32, 95, 188, 0.09);
}

.category-button.child {
  padding-left: 26px;
  font-size: 14px;
}

.task-category-nav {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 28px;
  min-width: min(100%, 420px);
}

.task-category-nav > .category-button,
.task-category-nav .category-button {
  width: auto;
  min-width: 108px;
  white-space: nowrap;
}

.task-category-nav .category-tree {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.task-category-nav .category-group {
  display: grid;
  gap: 0;
  align-items: start;
}

.task-category-nav .category-children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-left: 14px;
}

.task-category-nav .category-row {
  display: flex;
  gap: 6px;
  width: auto;
}

.task-category-nav .category-row.child {
  margin-left: 0;
}

.task-category-nav .category-button.child {
  padding-left: 12px;
  font-size: 14px;
}

.category-toggle {
  min-width: 52px;
  padding: 9px 10px;
  border: 1px solid rgba(32, 95, 188, 0.15);
  border-radius: 13px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.category-toggle:hover {
  background: rgba(32, 95, 188, 0.14);
}

.local-note {
  margin-top: 28px;
  padding: 16px;
  border: 1px dashed rgba(32, 95, 188, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.category-manager,
.backup-panel,
.mobile-access-panel,
.cloud-config-panel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.category-manager h2,
.backup-panel h2,
.mobile-access-panel h2,
.cloud-config-panel h2 {
  margin: 0;
  font-size: 16px;
}

.backup-panel p,
.mobile-access-panel p,
.cloud-config-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cloud-config-heading {
  display: grid;
  gap: 4px;
}

.cloud-guide-heading {
  display: grid;
  gap: 4px;
}

.cloud-config-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.cloud-config-fields {
  display: grid;
  gap: 8px;
}

.supabase-connection-preview {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(47, 125, 98, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(237, 250, 246, 0.82)),
    repeating-linear-gradient(135deg, rgba(47, 125, 98, 0.05) 0 1px, transparent 1px 9px);
}

.supabase-connection-preview .preview-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(47, 125, 98, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.supabase-connection-preview strong {
  color: #243452;
  font-size: 13px;
}

.supabase-connection-preview span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.cloud-auth-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(32, 95, 188, 0.18);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(235, 243, 255, 0.78)),
    repeating-linear-gradient(135deg, rgba(32, 95, 188, 0.05) 0 1px, transparent 1px 9px);
}

.cloud-auth-panel[data-tone="warning"] {
  border-color: rgba(199, 122, 22, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 237, 0.85)),
    repeating-linear-gradient(135deg, rgba(199, 122, 22, 0.06) 0 1px, transparent 1px 9px);
}

.cloud-auth-panel[data-tone="ready"],
.cloud-auth-panel[data-tone="signed-in"] {
  border-color: rgba(47, 125, 98, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 250, 246, 0.82)),
    repeating-linear-gradient(135deg, rgba(47, 125, 98, 0.05) 0 1px, transparent 1px 9px);
}

.cloud-auth-heading {
  display: grid;
  gap: 6px;
}

.cloud-auth-heading strong {
  color: #243452;
  font-size: 13px;
}

.cloud-auth-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.cloud-auth-panel[data-tone="warning"] .cloud-auth-badge {
  color: #8a520f;
  background: rgba(199, 122, 22, 0.13);
}

.cloud-auth-panel[data-tone="ready"] .cloud-auth-badge,
.cloud-auth-panel[data-tone="signed-in"] .cloud-auth-badge {
  color: var(--green);
  background: rgba(47, 125, 98, 0.1);
}

.cloud-auth-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.cloud-auth-form {
  display: grid;
  gap: 8px;
}

.cloud-auth-form input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
}

.cloud-setup-guide {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(235, 243, 255, 0.72)),
    repeating-linear-gradient(90deg, rgba(32, 95, 188, 0.04) 0 1px, transparent 1px 10px);
}

.cloud-setup-guide-header {
  display: grid;
  gap: 4px;
}

.cloud-setup-guide-header strong {
  color: #243452;
  font-size: 13px;
}

.cloud-setup-guide-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.cloud-setup-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cloud-setup-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.setup-step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(32, 95, 188, 0.2);
}

.cloud-setup-steps strong {
  display: block;
  color: #243452;
  font-size: 12px;
}

.cloud-setup-steps p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.cloud-setup-steps code {
  display: inline-block;
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.08);
  font-size: 12px;
  word-break: break-all;
}

.cloud-config-field {
  padding: 10px;
  border: 1px solid rgba(32, 95, 188, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.cloud-config-field strong {
  display: block;
  color: #243452;
  font-size: 13px;
}

.cloud-config-field code {
  display: inline-block;
  margin: 5px 0;
  padding: 3px 6px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.08);
  font-size: 12px;
  word-break: break-all;
}

.cloud-config-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.cloud-config-forbidden {
  padding: 11px;
  border: 1px dashed rgba(183, 55, 55, 0.28);
  border-radius: 15px;
  color: #7c2727;
  background: rgba(255, 244, 244, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.backup-actions .wide {
  grid-column: 1 / -1;
}

.cloud-guide-actions {
  grid-template-columns: 1fr;
  gap: 10px;
}

.sync-step-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(32, 95, 188, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 246, 255, 0.7)),
    radial-gradient(circle at top right, rgba(32, 95, 188, 0.12), transparent 38%);
  box-shadow: 0 10px 24px rgba(22, 54, 105, 0.05);
}

.sync-step-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.sync-step-heading span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 11px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.1);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sync-step-heading strong {
  font-size: 14px;
}

.sync-step-card p {
  font-size: 12px;
  line-height: 1.55;
}

.sync-step-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sync-step-buttons.two {
  grid-template-columns: 1fr 1fr;
}

.personal-sync-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.danger-action {
  color: #8f2f2f;
  background: rgba(183, 55, 55, 0.08);
}

.mobile-url-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 18px;
  background: rgba(244, 248, 255, 0.84);
}

.mobile-url-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mobile-url-card code {
  overflow-wrap: anywhere;
  color: var(--blue-dark);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #40506e;
  font-size: 12px;
  line-height: 1.55;
}

.cloud-preflight-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 16px;
  background: rgba(244, 248, 255, 0.78);
  color: #33415a;
  font-size: 13px;
  line-height: 1.55;
}

.cloud-preflight-result strong {
  color: var(--blue-dark);
}

.cloud-preflight-result.warning {
  border-color: rgba(199, 122, 22, 0.32);
  background: rgba(255, 249, 237, 0.86);
}

.cloud-preflight-result ul {
  margin: 0;
  padding-left: 18px;
}

.category-manager form {
  display: grid;
  gap: 10px;
}

.category-manage-list {
  display: grid;
  gap: 8px;
}

.category-manage-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(49, 69, 101, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.category-manage-item.child {
  margin-left: 18px;
  background: rgba(244, 248, 255, 0.65);
}

.category-manage-name {
  min-width: 0;
  color: #33415a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.category-actions .mini-button {
  padding: 9px 11px;
  font-size: 13px;
}

.category-manage-toggle {
  min-width: 46px;
}

.child-category-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 2px;
}

.child-category-form input {
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(49, 69, 101, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #1f2b43;
  font: inherit;
  font-size: 13px;
}

.child-category-form .mini-button {
  padding: 9px 10px;
  font-size: 13px;
}

.local-note strong,
.local-note span {
  display: block;
}

.workspace {
  padding: 34px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(235, 243, 255, 0.72));
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.home-return-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  background: #d1a246;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(165, 118, 28, 0.2);
  white-space: nowrap;
}

.home-return-button:hover {
  background: #c59438;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero h2 {
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: -0.06em;
}

.hero-copy {
  max-width: 680px;
  margin-top: 12px;
  line-height: 1.7;
}

.reminder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.reminder-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 12px 35px rgba(22, 38, 66, 0.1);
}

.reminder-card {
  padding: 22px;
}

.reminder-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 34px;
  font-weight: 900;
}

.reminder-card p {
  margin: 0;
  color: var(--muted);
}

.reminder-card.danger span {
  color: var(--red);
}

.reminder-card.warning span {
  color: var(--orange);
}

.reminder-card.calm span {
  color: var(--blue);
}

.reminder-card.ink span {
  color: var(--ink);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.task-panel-heading {
  align-items: flex-start;
}

.task-heading-main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
}

.task-heading-title {
  flex: 0 0 auto;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.result-count {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.09);
  font-size: 13px;
  font-weight: 800;
}

.task-radar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 20px;
  background: rgba(244, 248, 255, 0.68);
}

.task-radar .search-box {
  flex: 0 1 680px;
  max-width: 720px;
}

.task-radar label:not(.search-box) {
  flex: 1 1 136px;
  max-width: 180px;
}

.task-radar .ghost-button {
  flex: 0 0 auto;
  min-width: 128px;
  white-space: nowrap;
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(49, 69, 101, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.bulk-toolbar select {
  flex: 1 1 190px;
  min-width: 180px;
  max-width: 240px;
}

.bulk-toolbar .ghost-button {
  flex: 0 0 auto;
  min-width: 112px;
  white-space: nowrap;
}

.task-select {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: #33415a;
  font-size: 13px;
  font-weight: 800;
}

.bulk-toolbar .result-count {
  min-width: 96px;
  text-align: center;
}

.task-select {
  margin-bottom: 0;
  flex-direction: row;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.task-select input {
  flex: 0 0 auto;
}

.search-box input {
  min-width: 0;
}

.panel h3 {
  font-size: 24px;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.task-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(49, 69, 101, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.task-card.selected {
  border-color: rgba(32, 95, 188, 0.42);
  box-shadow: 0 0 0 4px rgba(32, 95, 188, 0.08);
}

.task-card.urgent {
  border-color: rgba(183, 55, 55, 0.3);
  background: rgba(255, 244, 244, 0.9);
}

.task-card.pinned {
  border-color: rgba(32, 95, 188, 0.42);
  box-shadow: 0 14px 28px rgba(32, 95, 188, 0.1);
}

.completed-archive-section {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(32, 95, 188, 0.16);
}

.completed-archive-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.completed-archive-heading h4 {
  margin: 0;
  font-size: 20px;
}

.completed-archive-list {
  display: grid;
  gap: 10px;
}

.completed-archive-item,
.completed-archive-empty {
  border: 1px solid rgba(49, 69, 101, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.completed-archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.completed-archive-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.completed-archive-main strong,
.completed-archive-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.completed-archive-main span {
  color: var(--muted);
  font-size: 13px;
}

.completed-archive-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.completed-archive-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #2f7d62;
  background: rgba(47, 125, 98, 0.1);
  font-size: 13px;
  white-space: nowrap;
}

.completed-archive-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.completed-archive-empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.task-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.task-title-main {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: flex-start;
}

.task-title-row h4 {
  margin: 0;
  min-width: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(32, 95, 188, 0.09);
}

.sync-pill {
  color: #2f7d62;
  background: rgba(47, 125, 98, 0.11);
}

.task-description {
  margin: 12px 0 0;
  color: #3c4960;
  line-height: 1.65;
}

.progress-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid rgba(32, 95, 188, 0.35);
  border-radius: 14px;
  background: rgba(244, 248, 255, 0.72);
}

.progress-note {
  display: grid;
  gap: 3px;
}

.progress-note time {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.progress-note span {
  color: #33415a;
  line-height: 1.55;
}

.task-detail-panel {
  display: grid;
  gap: 16px;
}

.detail-header {
  padding: 18px;
  border: 1px solid rgba(32, 95, 188, 0.16);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(244, 248, 255, 0.92), rgba(255, 255, 255, 0.72));
}

.detail-header h3 {
  margin: 0;
  font-size: 24px;
}

.detail-section {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(49, 69, 101, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.detail-section h4 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 14px;
}

.detail-section p {
  margin: 0;
  color: #33415a;
  line-height: 1.65;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-list-item {
  padding: 10px;
  border-radius: 14px;
  background: rgba(244, 248, 255, 0.78);
  color: #33415a;
  line-height: 1.55;
}

.detail-list-item time {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.detail-progress-form {
  display: grid;
  gap: 12px;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.task-form {
  display: grid;
  gap: 14px;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 34px 18px;
  background: rgba(18, 31, 53, 0.38);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.task-modal {
  width: min(760px, 100%);
  max-height: none;
  overflow: visible;
  border-radius: 24px;
  background: rgba(250, 253, 255, 0.96);
}

label,
.attachment-box {
  display: grid;
  gap: 7px;
  color: #33415a;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(49, 69, 101, 0.18);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(32, 95, 188, 0.5);
  box-shadow: 0 0 0 4px rgba(32, 95, 188, 0.1);
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.attachment-box {
  padding: 14px;
  border: 1px dashed rgba(32, 95, 188, 0.26);
  border-radius: 18px;
  background: rgba(244, 248, 255, 0.65);
}

.attachment-box legend {
  padding: 0 8px;
  color: var(--blue-dark);
}

.primary-button,
.ghost-button,
.mini-button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button {
  padding: 13px 16px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 14px 26px rgba(32, 95, 188, 0.26);
}

.ghost-button,
.mini-button {
  padding: 10px 12px;
  color: var(--blue-dark);
  background: rgba(32, 95, 188, 0.09);
}

.mini-button.done {
  color: var(--green);
  background: rgba(47, 125, 98, 0.1);
}

.mini-button.delete {
  color: var(--red);
  background: rgba(183, 55, 55, 0.1);
}

.hidden {
  display: none !important;
}

button:hover {
  transform: translateY(-1px);
}

.empty-state {
  padding: 36px;
  border: 1px dashed rgba(49, 69, 101, 0.2);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1280px) {
  .task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 1100px) {
  .shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .reminder-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .task-radar label:not(.search-box) {
    max-width: none;
  }

  .bulk-toolbar select,
  .bulk-toolbar .ghost-button,
  .bulk-toolbar .result-count {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 86px;
  }

  .workspace,
  .sidebar {
    padding: 18px;
  }

  .hero,
  .panel-heading,
  .two-columns {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .home-return-button {
    width: 100%;
  }

  .reminder-grid {
    grid-template-columns: 1fr;
  }

  .task-list {
    grid-template-columns: 1fr;
  }

  .completed-archive-heading,
  .completed-archive-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .completed-archive-heading {
    flex-direction: column;
  }

  .completed-archive-meta {
    justify-content: flex-start;
  }

  .completed-archive-actions {
    justify-content: flex-start;
  }

  .task-radar .search-box,
  .task-radar label:not(.search-box),
  .task-radar .ghost-button,
  .bulk-toolbar select,
  .bulk-toolbar .ghost-button,
  .bulk-toolbar .result-count {
    flex: 1 1 100%;
  }

  .bulk-toolbar .ghost-button {
    width: 100%;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(32, 95, 188, 0.18);
    border-radius: 24px;
    background: rgba(247, 250, 255, 0.92);
    box-shadow: 0 18px 46px rgba(22, 38, 66, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav a {
    display: grid;
    place-items: center;
    min-height: 42px;
    border-radius: 16px;
    color: var(--blue-dark);
    text-decoration: none;
    background: rgba(32, 95, 188, 0.08);
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-bottom-nav a:active {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  }
}
