:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-soft: #faf7f2;
  --surface-strong: #f0ece5;
  --sidebar: #ffffff;
  --text: #1f2430;
  --muted: #667085;
  --line: #e6ded3;
  --line-strong: #d6c9b9;
  --primary: #f06a3c;
  --primary-strong: #d9542a;
  --primary-soft: #fff0ea;
  --secondary: #1f4b99;
  --secondary-soft: #eaf1ff;
  --success: #147d5f;
  --success-soft: #e8f7f2;
  --warning: #a06411;
  --warning-soft: #fff5de;
  --danger: #c03e32;
  --danger-soft: #fdecea;
  --violet: #6f52ed;
  --violet-soft: #f1eeff;
  --shadow-lg: 0 28px 70px rgba(31, 36, 48, 0.08);
  --shadow-sm: 0 10px 24px rgba(31, 36, 48, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 300px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(240, 106, 60, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(31, 75, 153, 0.12), transparent 24%),
    linear-gradient(180deg, #fcfaf7 0%, #f6f3ee 36%, #f2eee8 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 28px 20px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 242, 0.98)),
    var(--sidebar);
  border-right: 1px solid rgba(214, 201, 185, 0.9);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 20;
  backdrop-filter: blur(16px);
  overflow-y: auto;
  overflow-x: hidden;
}

.brand-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.brand-wordmark {
  width: 220px;
  max-width: 100%;
  height: 56px;
  border-radius: 0;
  background: url("./logo-monitor-projua.png") no-repeat left center / contain;
}

.brand-kicker,
.page-eyebrow,
.modal-eyebrow,
.section-title,
.workspace-badge {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 800;
}

.brand-title {
  margin: 4px 0;
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.brand-subtitle,
.page-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.workspace-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.workspace-badge {
  color: var(--primary);
}

.main-nav,
.sidebar-project-list,
.sidebar-member-list {
  display: grid;
  gap: 6px;
}

.sidebar-project-list,
.sidebar-member-list {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.nav-btn,
.sidebar-project-btn,
.sidebar-member-btn {
  border: 0;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  transition: 0.18s ease;
}

.sidebar-project-btn,
.sidebar-member-btn {
  align-items: flex-start;
}

.nav-btn:hover,
.nav-btn.active,
.sidebar-project-btn:hover,
.sidebar-project-btn.active,
.sidebar-member-btn:hover,
.sidebar-member-btn.active {
  background: white;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.nav-copy,
.sidebar-project-copy,
.sidebar-member-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nav-copy strong,
.sidebar-project-copy strong,
.sidebar-member-copy strong {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.nav-copy small,
.sidebar-project-copy small,
.sidebar-member-copy small {
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon,
.member-avatar,
.project-color-dot {
  flex: 0 0 auto;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  font-weight: 700;
}

.nav-pill,
.status-pill,
.priority-pill,
.tiny-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-pill {
  background: var(--surface-strong);
  color: var(--muted);
}

.sidebar-section {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.sidebar-section.compact {
  margin-top: 6px;
  padding-bottom: 8px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.icon-chip,
.sync-chip,
.secondary-btn,
.primary-btn,
.ghost-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  transition: 0.18s ease;
}

.icon-chip {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text);
}

.icon-chip.ghost {
  background: transparent;
  border-color: var(--line);
}

.main-shell {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 30px 20px;
  background: rgba(246, 243, 238, 0.86);
  border-bottom: 1px solid rgba(214, 201, 185, 0.75);
  backdrop-filter: blur(18px);
}

.topbar-copy {
  display: grid;
  gap: 4px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  letter-spacing: -0.05em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-box {
  min-width: 320px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 12px;
  display: grid;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.search-box span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.search-box input {
  border: 0;
  outline: none;
  padding: 0;
  background: transparent;
  font-size: 0.96rem;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.sync-chip {
  padding: 11px 14px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #ff8b5f);
  color: white;
  box-shadow: 0 18px 32px rgba(240, 106, 60, 0.2);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(240, 106, 60, 0.24);
}

.secondary-btn,
.sync-chip {
  background: white;
  color: var(--text);
  border-color: var(--line);
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(192, 62, 50, 0.18);
}

.secondary-btn:hover,
.danger-btn:hover,
.sync-chip:hover,
.icon-chip:hover,
.ghost-btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.sync-chip.online {
  border-color: rgba(20, 125, 95, 0.25);
  background: var(--success-soft);
  color: var(--success);
}

.user-chip {
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.user-wordmark {
  width: 150px;
  height: 36px;
  flex: 0 0 auto;
  background: url("./logo-monitor-projua.png") no-repeat left center / contain;
}

.view-container {
  padding: 28px 30px 36px;
  display: grid;
  gap: 22px;
}

.surface-card,
.hero-card,
.metric-card,
.board-column,
.calendar-day,
.detail-card,
.activity-item,
.empty-card,
.report-card {
  background: var(--surface);
  border: 1px solid rgba(230, 222, 211, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr);
  gap: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(31, 75, 153, 0.1), transparent 30%),
    radial-gradient(circle at top left, rgba(240, 106, 60, 0.12), transparent 36%),
    white;
}

.hero-card h3,
.section-heading h3,
.detail-card h3,
.report-card h3,
.surface-card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.hero-card p,
.surface-card p,
.detail-card p,
.report-card p {
  color: var(--muted);
  line-height: 1.55;
}

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

.hero-list-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(230, 222, 211, 0.75);
}

.hero-side {
  display: grid;
  gap: 12px;
}

.hero-bubble {
  padding: 18px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, #1f4b99, #507bd0);
}

.hero-bubble strong {
  display: block;
  font-size: 2.1rem;
  letter-spacing: -0.05em;
}

.hero-mini-grid,
.metric-grid,
.project-summary-grid,
.portfolio-grid,
.goal-grid,
.team-grid,
.report-grid,
.stats-row,
.detail-grid,
.settings-grid {
  display: grid;
  gap: 16px;
}

.hero-mini-grid,
.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  padding: 18px;
  display: grid;
  gap: 8px;
  min-height: 142px;
}

.metric-card .metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric-card .metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.metric-card .metric-foot {
  color: var(--muted);
  font-size: 0.85rem;
}

.metric-card.primary {
  background: linear-gradient(180deg, white, #fff6f1);
}

.metric-card.secondary {
  background: linear-gradient(180deg, white, #f4f8ff);
}

.metric-card.success {
  background: linear-gradient(180deg, white, #f2fbf7);
}

.metric-card.violet {
  background: linear-gradient(180deg, white, #f7f4ff);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-heading p {
  margin: 6px 0 0;
}

.split-layout,
.project-workspace,
.settings-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  align-items: start;
}

.surface-card {
  padding: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

.activity-item,
.task-row,
.goal-row,
.member-card,
.portfolio-card,
.project-card,
.mini-stat,
.comment-card,
.automation-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.activity-item {
  display: grid;
  gap: 8px;
}

.activity-item.unread {
  border-color: rgba(240, 106, 60, 0.3);
  background: linear-gradient(180deg, #fff7f3, #fffdfb);
}

.activity-topline,
.task-topline,
.member-topline,
.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.activity-item p,
.task-row p,
.goal-row p,
.portfolio-card p,
.project-card p,
.member-card p,
.comment-card p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.stats-row,
.project-summary-grid,
.goal-grid,
.portfolio-grid,
.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-stat strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.05em;
  margin-top: 6px;
}

.project-header-card {
  padding: 20px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(111, 82, 237, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(240, 106, 60, 0.12), transparent 32%),
    white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.project-header-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.project-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-chip {
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 12px;
  background: white;
  font-weight: 700;
}

.project-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
}

.tab-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 16px;
  overflow-x: auto;
}

.board-column {
  min-height: 320px;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.board-column h4,
.calendar-day h4 {
  margin: 0;
}

.column-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(31, 36, 48, 0.05);
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(31, 36, 48, 0.08);
}

.task-card-head,
.task-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.task-card strong,
.task-row strong,
.goal-row strong,
.portfolio-card strong,
.project-card strong,
.member-card strong,
.comment-card strong {
  letter-spacing: -0.02em;
}

.task-card small,
.task-row small,
.goal-row small,
.portfolio-card small,
.project-card small,
.member-card small {
  color: var(--muted);
}

.task-meta-tags,
.task-card-tags,
.project-tags,
.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill.backlog {
  background: var(--surface-strong);
  color: var(--muted);
}

.status-pill.progress {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.status-pill.review {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill.done {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.risk {
  background: var(--danger-soft);
  color: var(--danger);
}

.priority-pill.low {
  background: #f5f1ea;
  color: #7a6a57;
}

.priority-pill.medium {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.priority-pill.high {
  background: var(--warning-soft);
  color: var(--warning);
}

.priority-pill.critical {
  background: var(--danger-soft);
  color: var(--danger);
}

.tiny-pill {
  background: rgba(31, 36, 48, 0.06);
  color: var(--muted);
  padding: 5px 8px;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
}

.task-table th,
.task-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.task-table th {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.task-table tbody tr:hover {
  background: #fffdf9;
}

.table-shell {
  overflow: auto;
}

.timeline-shell {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 14px;
  align-items: center;
}

.timeline-track {
  height: 18px;
  background: #f1ece4;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.timeline-bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #ff9968);
}

.calendar-shell {
  display: grid;
  gap: 12px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.weekday {
  padding: 6px 4px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 148px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.calendar-day.other-month {
  opacity: 0.5;
}

.calendar-events {
  display: grid;
  gap: 6px;
}

.calendar-event {
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 0.8rem;
  border: 1px solid var(--line);
}

.detail-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #ede7df;
}

.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), #6d92d8);
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.check-item.done {
  background: #f3faf6;
}

.empty-card {
  padding: 26px;
  text-align: center;
  color: var(--muted);
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.sidebar-member-btn .member-avatar,
.user-chip .member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.project-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
}

.workload-list,
.comment-list,
.automation-list,
.inbox-list,
.project-list-stack {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field,
.span-2 {
  display: grid;
  gap: 6px;
}

.span-2 {
  grid-column: span 2;
}

.field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-box input:focus {
  border-color: rgba(240, 106, 60, 0.4);
  box-shadow: 0 0 0 4px rgba(240, 106, 60, 0.1);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-actions {
  grid-column: span 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(24, 28, 38, 0.5);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-shell {
  width: min(1040px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: white;
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(19, 22, 32, 0.28);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
}

.modal-header h3 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.modal-body {
  padding: 22px;
  display: grid;
  gap: 20px;
}

.task-detail-top {
  display: grid;
  gap: 10px;
}

.detail-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.comment-card {
  display: grid;
  gap: 6px;
  background: white;
}

.report-card {
  padding: 18px;
}

.chart-card canvas {
  max-height: 280px;
}

.code-block {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: #171b23;
  color: #e7eefb;
  overflow: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 140;
  background: #171b23;
  color: white;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  transform: translateY(120px);
  opacity: 0;
  transition: 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .hero-mini-grid,
  .metric-grid,
  .project-summary-grid,
  .portfolio-grid,
  .goal-grid,
  .team-grid,
  .report-grid,
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 1080px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell {
    flex-direction: column;
  }

  .main-shell {
    margin-left: 0;
    width: 100%;
  }

  .topbar,
  .hero-card,
  .split-layout,
  .project-workspace,
  .settings-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .view-container,
  .topbar,
  .sidebar,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-mini-grid,
  .metric-grid,
  .project-summary-grid,
  .portfolio-grid,
  .goal-grid,
  .team-grid,
  .report-grid,
  .stats-row,
  .calendar-grid,
  .form-grid,
  .timeline-row {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .span-2 {
    grid-column: auto;
  }

  .board-grid {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 120px;
  }
}

/* =========================================================
   Layout aplicado em 29/06/2026 — referência visual colaborativa
   ========================================================= */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f7f8;
  --surface-strong: #eceef2;
  --sidebar: #2b2d30;
  --sidebar-hover: #3a3c40;
  --sidebar-active: #4a4d52;
  --text: #1f1f21;
  --muted: #6f7782;
  --line: #e6e8ec;
  --line-strong: #cfd3da;
  --primary: #4573d2;
  --primary-strong: #315cb8;
  --primary-soft: #eef3ff;
  --secondary: #4573d2;
  --secondary-soft: #eef3ff;
  --success: #2d7d46;
  --success-soft: #eaf6ed;
  --warning: #a45f00;
  --warning-soft: #fff2da;
  --danger: #cc4b4c;
  --danger-soft: #ffeded;
  --violet: #6d5dfc;
  --violet-soft: #f1efff;
  --shadow-lg: 0 18px 46px rgba(31, 35, 41, 0.08);
  --shadow-sm: 0 6px 16px rgba(31, 35, 41, 0.05);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --sidebar-width: 304px;
  --globalbar-height: 54px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  background: #ffffff;
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  background: #fff;
}

.platform-globalbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--globalbar-height);
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(210px, var(--sidebar-width)) minmax(280px, 520px) 1fr;
  align-items: center;
  gap: 18px;
  padding: 0 18px 0 14px;
  background: #2e3033;
  color: #f7f8fa;
  border-bottom: 1px solid #202124;
}

.globalbar-left,
.globalbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.globalbar-right {
  justify-content: flex-end;
}

.global-icon,
.create-pill {
  border: 0;
  color: #f8f9fb;
  background: transparent;
}

.global-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.global-icon:hover,
.create-pill:hover {
  background: #42454a;
}

.create-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #3d4045;
  font-weight: 700;
}

.search-box.global-search {
  min-width: 0;
  max-width: 540px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 36px;
  border: 1px solid #565a60;
  border-radius: 999px;
  background: #3a3c40;
  box-shadow: none;
}

.search-box.global-search::before {
  content: "⌕";
  color: #c7cbd1;
  font-size: 1.05rem;
}

.search-box.global-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.search-box.global-search input {
  width: 100%;
  color: #fff;
  font-size: 0.94rem;
}

.search-box.global-search input::placeholder {
  color: #d4d7dc;
}

.search-box.global-search:focus-within {
  background: #ffffff;
  border-color: #ffffff;
}

.search-box.global-search:focus-within::before,
.search-box.global-search:focus-within input {
  color: var(--text);
}

.sidebar {
  top: var(--globalbar-height);
  bottom: 0;
  width: var(--sidebar-width);
  padding: 20px 16px 24px;
  background: var(--sidebar);
  color: #f4f5f7;
  border-right: 1px solid #202124;
  gap: 14px;
  overflow-y: auto;
  backdrop-filter: none;
}

.brand-block {
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-kicker,
.brand-subtitle,
.workspace-badge,
.nav-copy small,
.sidebar-project-copy small,
.sidebar-member-copy small {
  color: #b7bcc5;
}

.brand-kicker,
.workspace-badge {
  letter-spacing: 0.08em;
  font-size: 0.64rem;
}

.brand-title {
  margin: 2px 0 0;
  color: #fff;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.brand-kicker,
.brand-title,
.brand-subtitle {
  display: none;
}

.workspace-card {
  margin: 2px 4px 8px;
  padding: 14px;
  border: 1px solid #484b50;
  border-radius: 14px;
  background: linear-gradient(180deg, #35383d, #31343a);
  color: #fff;
  gap: 8px;
}

.workspace-card small {
  color: #bdc2ca;
}

.main-nav,
.sidebar-project-list,
.sidebar-member-list {
  gap: 8px;
}

.nav-btn,
.sidebar-project-btn,
.sidebar-member-btn {
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e9ebef;
  justify-content: flex-start;
  box-shadow: none;
  transform: none;
  align-items: center;
  gap: 12px;
}

.nav-btn:hover,
.nav-btn.active,
.sidebar-project-btn:hover,
.sidebar-project-btn.active,
.sidebar-member-btn:hover,
.sidebar-member-btn.active {
  background: linear-gradient(180deg, #4a4d52, #43464b);
  box-shadow: none;
  transform: none;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe2e7;
  font-size: 0.98rem;
}

.nav-copy,
.sidebar-project-copy,
.sidebar-member-copy {
  gap: 3px;
}

.nav-copy strong,
.sidebar-project-copy strong,
.sidebar-member-copy strong {
  color: #f7f8fb;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
}

.nav-copy small {
  display: none;
}

.sidebar-project-copy small,
.sidebar-member-copy small {
  display: block;
  color: #aeb5bf;
  font-size: 0.8rem;
  line-height: 1.25;
}

.nav-pill {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #5b6068;
  color: #fff;
  font-size: 0.68rem;
}

.sidebar-section {
  margin-top: 10px;
  gap: 8px;
  flex: 0 0 auto;
}

.sidebar-section.compact {
  margin-top: 10px;
}

.section-title-row {
  padding: 0 10px;
}

.section-title {
  color: #d8dce2;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-chip {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #cdd2da;
}

.icon-chip:hover {
  background: #44474d;
  transform: none;
}

.project-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-top: 0;
  margin-left: 2px;
}

.sidebar-member-btn .member-avatar,
.user-chip .member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.76rem;
}

.main-shell {
  margin-left: var(--sidebar-width);
  margin-top: var(--globalbar-height);
  width: calc(100% - var(--sidebar-width));
  background: #fff;
}

.install-banner {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 30px;
  background: #4573d2;
  color: #fff;
}

.install-banner > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.install-banner strong {
  font-size: 0.96rem;
}

.install-banner span:not(.banner-icon) {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.92);
}

.banner-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
}

.banner-action {
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #1f2a44;
  font-weight: 700;
  padding: 9px 14px;
}

.topbar {
  top: var(--globalbar-height);
  z-index: 25;
  padding: 18px 30px 14px;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  align-items: center;
}

.page-eyebrow {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.page-title {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
  color: #1f1f21;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.topbar-actions {
  flex-wrap: nowrap;
}

.user-chip {
  min-width: 0;
  max-width: 160px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f7f8fa;
  box-shadow: none;
}

.user-chip .sidebar-member-copy {
  display: none;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.sync-chip {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.primary-btn {
  background: #4573d2;
  border-color: #4573d2;
  color: #fff;
  box-shadow: none;
}

.primary-btn:hover {
  background: #315cb8;
  box-shadow: none;
}

.secondary-btn,
.sync-chip,
.ghost-btn {
  background: #fff;
  color: #33363b;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.secondary-btn:hover,
.sync-chip:hover,
.ghost-btn:hover {
  background: #f7f8fa;
  transform: none;
}

.view-container {
  padding: 0 30px 36px;
  gap: 18px;
  background: #fff;
}

.surface-card,
.hero-card,
.metric-card,
.board-column,
.calendar-day,
.detail-card,
.activity-item,
.empty-card,
.report-card,
.project-header-card,
.portfolio-card,
.goal-row,
.member-card,
.task-row,
.comment-card,
.automation-item,
.mini-stat {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}

.hero-card,
.project-header-card {
  background: #fff;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}

.metric-card {
  min-height: 108px;
  padding: 16px;
}

.metric-card .metric-value {
  font-size: 1.7rem;
}

.section-heading h3,
.hero-card h3,
.detail-card h3,
.report-card h3,
.surface-card h3 {
  font-size: 1.05rem;
}

.project-view-tabs,
.asana-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.tab-btn,
.asana-page-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 13px 0 12px;
  color: #5f6670;
  font-weight: 700;
}

.tab-btn.active,
.asana-page-tabs button.active {
  color: #1f1f21;
  background: transparent;
  border-bottom: 2px solid #1f1f21;
}

.asana-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.add-task-btn {
  border: 0;
  border-radius: 8px;
  background: #4573d2;
  color: #fff;
  font-weight: 700;
  padding: 9px 14px;
}

.asana-tools {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #5f6670;
  font-size: 0.88rem;
  font-weight: 700;
}

.asana-table-shell {
  border-top: 1px solid var(--line);
  background: #fff;
}

.asana-table-head,
.asana-task-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 140px 150px 230px 170px 90px;
  align-items: center;
}

.asana-table-head {
  min-height: 38px;
  color: #6f7782;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--line);
}

.asana-table-head span,
.asana-task-row > div {
  padding: 0 10px;
  min-width: 0;
}

.asana-task-row {
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.asana-task-row:hover {
  background: #f7f8fa;
}

.asana-task-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asana-task-name strong,
.asana-task-name small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asana-task-name small {
  margin-top: 2px;
  color: #8a9099;
  font-size: 0.78rem;
}

.task-check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid #b9c0ca;
  border-radius: 50%;
  color: transparent;
  background: #fff;
  display: grid;
  place-items: center;
  line-height: 1;
}

.task-check:hover,
.task-check.done {
  color: #fff;
  background: #2d7d46;
  border-color: #2d7d46;
}

.asana-due {
  color: #57606a;
  font-size: 0.88rem;
}

.asana-due.overdue {
  color: #cc4b4c;
  font-weight: 700;
}

.asana-collaborators .member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.7rem;
}

.project-label {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 7px;
  border-radius: 6px;
  background: #eef3ff;
  color: #28344c;
  padding: 5px 8px;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-label::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--project-color);
  flex: 0 0 auto;
}

.asana-row-actions .secondary-btn {
  padding: 6px 9px;
}

.asana-group-title,
.asana-add-section {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: #2f3337;
  text-align: left;
  font-weight: 800;
  padding: 0 10px;
}

.asana-group-title span {
  color: #8a9099;
  font-weight: 600;
  margin-left: 6px;
}

.asana-add-section {
  color: #68707b;
  font-weight: 700;
}

.asana-empty-line {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #8a9099;
  border-bottom: 1px solid var(--line);
}

.status-pill,
.priority-pill,
.tiny-pill {
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.75rem;
}

.table-shell,
.asana-table-shell,
.board-grid {
  overflow-x: auto;
}

.task-table th,
.task-table td {
  border-bottom: 1px solid var(--line);
}

.modal-shell {
  border-radius: 18px;
}

.modal-header {
  border-color: var(--line);
}

.toast {
  border-radius: 10px;
}

@media (max-width: 1080px) {
  .platform-globalbar {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .sidebar {
    position: fixed;
    width: 250px;
    transform: translateX(-250px);
    transition: transform .18s ease;
  }

  .app-shell:hover .sidebar,
  .sidebar:focus-within {
    transform: translateX(0);
  }

  .main-shell {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    top: var(--globalbar-height);
  }

  .banner-action,
  .install-banner span:not(.banner-icon) {
    display: none;
  }
}

@media (max-width: 860px) {
  .platform-globalbar {
    grid-template-columns: auto 1fr auto;
    padding-right: 10px;
  }

  .create-pill,
  .globalbar-right .user-chip .sidebar-member-copy {
    display: none;
  }

  .install-banner,
  .topbar,
  .view-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .asana-table-head,
  .asana-task-row {
    grid-template-columns: 280px 130px 110px 190px 150px 80px;
  }
}
