:root {
  color-scheme: light;
  --page: #eef1f8;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --text: #1c2333;
  --muted: #7b8397;
  --border: #e5e8f1;
  --primary: #4a5be6;
  --primary-soft: #e9ecff;
  --danger: #ef4a5a;
  --danger-soft: #ffe5e8;
  --done: #14b88f;
  --done-soft: #ddf6ee;
  --shadow: 0 1px 2px rgba(28, 35, 51, .05), 0 4px 14px rgba(28, 35, 51, .05);
  --shadow-lg: 0 20px 60px rgba(28, 35, 51, .16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  padding: 24px;
  background: var(--page);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: grid;
  place-items: center;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: min(900px, calc(100dvh - 48px));
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.brand-bar {
  flex: none;
  min-height: 68px;
  padding: 18px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { color: var(--text); text-decoration: none; font-size: 23px; font-weight: 800; letter-spacing: -.045em; }
.logo span { color: var(--primary); font-weight: 300; letter-spacing: -.02em; }
.session-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px 10px; margin: 0; font-size: 12px; font-weight: 700; }
.session-actions button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--danger); font-size: 12px; font-weight: 800; cursor: pointer; }
.session-actions button:hover { background: var(--danger-soft); }
.content { flex: 1; overflow-y: auto; padding: 24px 18px 32px; overscroll-behavior: contain; }

.auth-card, .form-card, .welcome-card {
  margin-top: 34px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
h1 { margin: 5px 0 8px; font-size: 25px; line-height: 1.15; letter-spacing: -.025em; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.muted { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 700; text-decoration: none; }

.form-stack { display: grid; gap: 15px; margin-top: 22px; }
.form-stack label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.form-stack input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.form-stack select {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.form-stack textarea, .comment-form textarea {
  width: 100%;
  padding: 11px 13px;
  resize: vertical;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.45;
}
.form-stack label small, .field-help { color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1.4; }
.form-stack label em { color: var(--muted); font-style: normal; font-weight: 500; }
.form-stack fieldset { display: grid; gap: 15px; margin: 4px 0 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.form-stack legend { padding: 0 6px; font-size: 13px; font-weight: 800; }
.field-help { margin: -4px 0 0; }
.primary-button {
  height: 46px;
  margin-top: 3px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}
.primary-button:hover { filter: brightness(1.06); }

.alert { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.alert-error { color: #a92838; background: var(--danger-soft); border: 1px solid #ffcbd1; }
.alert-success { color: #08775c; background: var(--done-soft); border: 1px solid #bfe9dd; }
.alert ul { margin: 0; padding-left: 18px; }

.account-summary { margin: 22px 0 0; display: grid; gap: 10px; }
.account-summary div { padding: 12px; background: var(--surface-2); border-radius: 12px; }
.account-summary dt { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.account-summary dd { margin: 3px 0 0; font-size: 14px; font-weight: 700; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-heading h1 { margin-bottom: 4px; }
.primary-link {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}
.standalone-link { margin-top: 18px; }
.member-list { display: grid; gap: 12px; }
.member-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.member-card.is-inactive { opacity: .68; }
.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.member-details { min-width: 0; }
.member-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.member-title-row h2 { margin: 0; font-size: 15px; }
.member-details p { margin: 3px 0 0; font-size: 13px; }
.member-details small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.role-chip, .inactive-label { padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.role-admin { color: #6840d2; background: #eee8ff; }
.role-check { color: #08775c; background: var(--done-soft); }
.role-equipo { color: var(--primary); background: var(--primary-soft); }
.inactive-label { display: inline-block; margin-top: 7px; color: #a92838; background: var(--danger-soft); }
.member-actions { grid-column: 2; display: flex; align-items: center; gap: 13px; margin-top: 5px; font-size: 12px; font-weight: 800; }
.member-actions form { margin: 0; }
.member-actions a, .text-action { padding: 0; border: 0; color: var(--primary); background: none; text-decoration: none; cursor: pointer; }
.text-action.danger-action { color: var(--danger); }
.empty-state { padding: 22px 16px; color: var(--muted); border: 1.5px dashed var(--border); border-radius: 16px; text-align: center; font-size: 13px; }
.member-form-card { margin-top: 0; }
.error-card { text-align: left; }
.secondary-link {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--surface);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.task-list { display: grid; gap: 12px; }
.task-list-card, .task-detail {
  padding: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid #4f9dff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.task-list-card.status-completed, .task-detail.status-completed { border-left-color: var(--done); }
.task-list-card.status-approved, .task-detail.status-approved { border-left-color: #7a4df2; }
.task-list-card.is-overdue, .task-detail.is-overdue { border-left-color: var(--danger); }
.task-list-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-code { color: var(--muted); font-size: 12px; font-weight: 800; }
.status-chip { padding: 4px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 99px; font-size: 10.5px; font-weight: 800; }
.is-overdue .status-chip { color: #fff; background: var(--danger); }
.task-list-card h2 { margin: 9px 0 5px; font-size: 15px; }
.task-list-card > p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-list-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 11px; color: var(--text); font-size: 11.5px; font-weight: 700; }
.task-list-card > small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.task-form-card { margin-top: 0; }
.check-list { display: grid; gap: 8px; }
.check-option { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 9px !important; padding: 9px 10px; background: var(--surface-2); border-radius: 10px; cursor: pointer; }
.check-option input { width: 18px; height: 18px; flex: none; }
.check-option > span { display: flex; align-items: baseline; gap: 6px; }

.task-detail h1 { margin-top: 12px; }
.task-description { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.task-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 0; }
.task-facts div { padding: 10px; background: var(--surface-2); border-radius: 11px; }
.task-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.task-facts dd { margin: 3px 0 0; font-size: 12px; font-weight: 700; line-height: 1.35; }
.state-note { margin: 11px 0 0; color: var(--done); font-size: 11.5px; font-weight: 700; }
.approved-note { color: #7a4df2; }
.detail-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; font-size: 12px; font-weight: 800; }
.detail-links a { text-decoration: none; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.task-actions form { flex: 1; min-width: 110px; margin: 0; }
.action-button { width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 11px; color: #fff; background: var(--primary); font-size: 12px; font-weight: 800; cursor: pointer; }
.action-approve { background: #7a4df2; }
.action-reopen { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.delete-form { margin: 15px 0 0; text-align: right; }
.danger-link { padding: 4px 0; border: 0; color: var(--danger); background: none; font-size: 11.5px; font-weight: 800; cursor: pointer; }

.comments-section { margin-top: 22px; }
.comments-section h2 { margin: 0 0 4px; font-size: 18px; }
.comments-list { display: grid; gap: 9px; margin-top: 13px; }
.comment-card { padding: 12px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; }
.comment-card > div { display: flex; justify-content: space-between; gap: 10px; }
.comment-card strong { font-size: 12px; }
.comment-card time { color: var(--muted); font-size: 10.5px; }
.comment-card p { margin: 7px 0 0; font-size: 12.5px; line-height: 1.45; }
.comment-form { display: grid; gap: 10px; margin-top: 15px; padding: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.comment-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; }
.comment-form .primary-button { margin: 0; }

/* Navegación y cronograma mobile-first */
.bottom-nav {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.bottom-nav a { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.bottom-nav .nav-icon { width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a[aria-current="page"] { color: var(--primary); font-weight: 800; }
.bottom-nav a[aria-current="page"] .nav-icon { background: var(--primary-soft); }
.bottom-nav .portal-nav-link { color: var(--primary); font-size: 10.5px; letter-spacing: -.02em; }

.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.calendar-heading h1 { margin: 0; font-size: 25px; font-weight: 800; }
.round-add { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--primary); text-decoration: none; font-size: 25px; line-height: 1; }
.month-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.month-bar h2 { flex: 1; margin: 0; font-size: 16px; }
.icon-button, .today-button { height: 36px; border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; color: var(--text); background: var(--surface); text-decoration: none; font-weight: 700; }
.icon-button { width: 36px; color: var(--muted); font-size: 25px; }
.today-button { padding: 0 13px; font-size: 12px; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; margin: -5px 0 15px; padding: 5px 9px 5px 5px; color: var(--primary); background: var(--primary-soft); border-radius: 99px; text-decoration: none; font-size: 12px; font-weight: 800; }
.progress-summary { margin-bottom: 20px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.progress-summary > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.progress-summary span { color: var(--muted); }
.progress-track { height: 8px; margin-top: 10px; overflow: hidden; background: var(--surface-2); border-radius: 99px; }
.progress-track i { display: block; height: 100%; background: var(--done); border-radius: inherit; }

.timeline-section { --tone: #4f9dff; margin-bottom: 8px; }
.completed-section { --tone: var(--done); margin-top: 22px; }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 17px; white-space: nowrap; }
.section-dot { width: 9px; height: 9px; flex: none; background: var(--tone); border-radius: 50%; }
.section-dash { flex: 1; border-top: 1.5px dashed var(--border); }
.collapse-button { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: var(--surface); cursor: pointer; }
.collapsible-section { display: block; }
.collapsible-section.is-collapsed { display: none; }

.timeline-item { --tone: #4f9dff; --tone-soft: #e4f0ff; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.timeline-item.over { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.timeline-item.done { --tone: var(--done); --tone-soft: var(--done-soft); }
.timeline-rail { display: flex; flex-direction: column; align-items: center; }
.timeline-month { height: 18px; color: var(--tone); font-size: 12px; font-weight: 700; }
.timeline-bubble { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--tone); box-shadow: 0 0 0 4px var(--tone-soft); font-size: 16px; font-weight: 800; }
.timeline-line { flex: 1; width: 4px; margin: 10px 0 -14px; background: var(--tone); border-radius: 4px; opacity: .9; }
.collapsible-section .timeline-item:last-child .timeline-line { display: none; }
.timeline-card { min-width: 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.timeline-item.done .timeline-card { background: #f4fcf9; border-color: #cdeee3; }
.timeline-item.over .timeline-card { border-color: var(--danger-soft); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.deadline-label { min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; }
.deadline-label svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.task-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.task-title-row > a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 700; line-height: 1.3; }
.task-chip { padding: 3px 8px; border-radius: 99px; white-space: nowrap; font-size: 10px; font-weight: 800; }
.task-chip.high { color: var(--danger); background: var(--danger-soft); }
.task-chip.mid, .task-chip.today { color: #b26b00; background: #fff1d6; }
.task-chip.low { color: #347dcc; background: #e4f0ff; }
.task-chip.late { color: #fff; background: var(--danger); }
.task-chip.approved { color: #6840d2; background: #eee8ff; }
.task-card-description { margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.task-owner { display: flex; align-items: center; gap: 7px; margin-top: 11px; color: var(--muted); font-size: 12px; font-weight: 600; }
.task-owner b { color: var(--text); }
.avatar-dot, .team-avatar { width: 27px; height: 27px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--primary); font-size: 9px; font-weight: 800; }
.small-avatar { width: 24px; height: 24px; }
.completion-note { margin: 9px 0 0; color: var(--done); font-size: 11.5px; font-weight: 700; }
.card-actions { display: flex; gap: 7px; margin-top: 11px; padding: 7px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; }
.card-actions form { flex: 1; margin: 0; }
.card-button { width: 100%; height: 38px; border: 0; border-radius: 10px; color: #fff; background: var(--primary); font-size: 12px; font-weight: 800; cursor: pointer; }
.card-button-approve { background: #7a4df2; }
.card-button-ghost { color: var(--muted); background: var(--surface); border: 1px solid var(--border); }

.page-title-block { margin-bottom: 18px; }
.page-title-block h1 { margin: 0 0 5px; }
.page-title-block p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.team-list { display: grid; gap: 12px; }
.team-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.team-avatar { width: 46px; height: 46px; font-size: 13px; background: var(--done); }
.team-card h2 { margin: 0; font-size: 14px; }
.team-card p, .team-card small { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.team-card small { display: block; margin-top: 5px; }
.team-card > a { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; display: grid; place-items: center; color: var(--text); background: var(--surface); text-decoration: none; font-size: 10.5px; font-weight: 800; }
.mini-track { height: 6px; margin-top: 7px; }

.activity-feed { display: grid; }
.activity-item { --event-tone: var(--done); position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; padding-bottom: 18px; }
.activity-item::before { content: ""; position: absolute; left: 17px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.activity-item:last-child::before { display: none; }
.activity-icon { width: 36px; height: 36px; z-index: 1; border-radius: 50%; background: color-mix(in srgb, var(--event-tone) 16%, white); border: 9px solid transparent; box-shadow: inset 0 0 0 9px var(--event-tone); }
.event-approved { --event-tone: #7a4df2; }
.event-reopened { --event-tone: #e08a00; }
.event-deleted { --event-tone: var(--danger); }
.event-created, .event-content_updated, .event-background_updated, .event-commented { --event-tone: var(--primary); }
.activity-item p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }
.activity-item a { color: var(--text); }
.activity-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.stats-grid > div, .info-panel { padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.stats-grid strong { display: block; font-size: 25px; }
.stats-grid span { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.info-panel { margin-bottom: 12px; }
.info-panel h2 { margin: 0 0 10px; font-size: 14px; }
.info-panel ul { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.legend-list { display: grid; gap: 9px; font-size: 12.5px; }
.legend-list div { display: flex; align-items: center; gap: 9px; }
.legend-list i { width: 13px; height: 13px; border-radius: 50%; }
.legend-pending { background: #4f9dff; }.legend-overdue { background: var(--danger); }.legend-completed { background: var(--done); }.legend-approved { background: #7a4df2; }
.account-panel p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.account-panel p strong { color: var(--text); font-size: 14px; }
.info-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.info-actions a { font-size: 12px; font-weight: 800; }

@media (max-width: 480px) {
  body { padding: 0; background: var(--bg); }
  .app-shell { height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .content { padding: 22px 16px 28px; }
  .calendar-heading h1 { font-size: 26px; }
  .section-heading h2 { font-size: 18px; }

  .timeline-item { column-gap: 14px; padding-bottom: 16px; }
  .timeline-month { font-size: 12.5px; }
  .timeline-bubble { width: 44px; height: 44px; font-size: 17px; }

  .timeline-card { padding: 16px; }
  .deadline-label { font-size: 14px; }
  .deadline-label svg { width: 16px; height: 16px; }
  .task-code { font-size: 12.5px; }

  .task-title-row { gap: 8px 10px; margin-top: 11px; }
  .task-title-row > a { font-size: 17px; line-height: 1.35; }
  .task-card-description { margin-top: 8px; font-size: 14.5px; line-height: 1.5; }
  .task-chip { padding: 4px 10px; font-size: 12px; }

  .task-owner { gap: 10px; margin-top: 13px; font-size: 14px; }
  .task-owner .avatar-dot { width: 28px; height: 28px; font-size: 11px; }
  .completion-note { font-size: 13px; }

  .card-actions { gap: 9px; margin-top: 13px; padding: 9px; }
  .card-button { height: 44px; font-size: 14.5px; }
}

/* Desktop / pantallas grandes */
@media (min-width: 900px) {
  body { padding: 0; }
  .app-shell-authenticated {
    max-width: none;
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "brand content" "nav content";
  }
  .app-shell-authenticated .brand-bar {
    grid-area: brand;
    padding: 22px 26px;
    border-right: 1px solid var(--border);
  }
  .app-shell-authenticated .logo { font-size: 26px; }

  .app-shell-authenticated .bottom-nav {
    grid-area: nav;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border-top: 0;
    border-right: 1px solid var(--border);
    padding: 16px 12px;
  }
  .app-shell-authenticated .bottom-nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 14px;
    transition: background .15s, color .15s;
  }
  .app-shell-authenticated .bottom-nav a:hover { color: var(--text); background: var(--surface-2); }
  .app-shell-authenticated .bottom-nav .nav-icon { width: 34px; height: 34px; border-radius: 10px; }
  .app-shell-authenticated .bottom-nav a[aria-current="page"] { background: var(--primary-soft); }
  .app-shell-authenticated .bottom-nav a[aria-current="page"] .nav-icon { background: transparent; }
  .app-shell-authenticated .bottom-nav .portal-nav-link {
    margin-top: auto;
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 14px;
    letter-spacing: normal;
  }
  .app-shell-authenticated .bottom-nav .portal-nav-link:hover { color: var(--primary); background: var(--primary-soft); }

  .app-shell-authenticated .content {
    grid-area: content;
    padding: 36px max(40px, calc(50% - 480px)) 48px;
  }
  .app-shell-authenticated h1 { font-size: 30px; }

  .task-list, .member-list, .team-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1180px) {
  .timeline-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  .timeline-columns .completed-section { margin-top: 0; }
}
