/* ==========================================================================
   ArqHaus Projects — identidade visual própria
   Papel quente, traço de prancheta, serifada editorial e tons terrosos.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  --paper: #f8f7f3;
  --paper-2: #f0eee7;
  --card: #fffefb;
  --line: #e7e0d3;
  --line-soft: #f0ebe1;
  --ink: #45423c;
  --ink-2: #6f6555;
  --muted: #9b8f79;
  --accent: #aa7f60;
  --sage: #7f8c72;
  --sage-soft: #ecf0e5;
  --clay: #b0664a;
  --clay-soft: #f5e5dc;
  --ochre: #a78a45;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --nav: 232px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

/* ---------------------------------------------------------------- avatares */

.avatar {
  --tone: #978064;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 18%, white);
  color: color-mix(in srgb, var(--tone) 80%, black);
  font-size: 11px;
  font-weight: 600;
}
.avatar.small { width: 24px; height: 24px; font-size: 9px; }
.avatar.large { width: 46px; height: 46px; font-size: 14px; }

.stack { display: flex; padding-right: 6px; }
.stack span {
  --tone: #9a8265;
  width: 28px;
  height: 28px;
  margin-right: -6px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 20%, white);
  color: color-mix(in srgb, var(--tone) 80%, black);
  font-size: 9px;
  font-weight: 600;
}
.stack.small span { width: 24px; height: 24px; font-size: 8px; border-color: white; }

/* ---------------------------------------------------------------- navegação lateral */

.workspace-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav);
  display: flex;
  flex-direction: column;
  padding: 30px 22px;
  overflow-y: auto;
  background: var(--paper-2);
  border-right: 1px solid #e4e1d7;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { font-size: 26px; letter-spacing: -1px; }
.brand strong span {
  display: block;
  margin-top: 2px;
  color: #8d887b;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2.8px;
}
.mark { font-size: 42px; font-weight: 300; color: var(--accent); }
.studio-label { margin: 32px 0 18px; color: #999383; font-size: 10px; letter-spacing: 1.4px; }

.workspace-nav nav { display: grid; gap: 4px; }
.workspace-nav nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border-radius: 5px;
  color: #8f8674;
  font-size: 15px;
}
.workspace-nav nav a span { font-size: 13px; }
.workspace-nav nav a.active { background: #e5e1d5; color: #5f584a; }

.nav-title { display: block; margin: 30px 10px 14px; color: #a49a85; font-size: 10px; letter-spacing: 1.2px; }
.project-links { display: grid; gap: 12px; padding: 0 10px; }
.project-links a { display: flex; align-items: center; gap: 10px; color: #7e7565; font-size: 12px; }
.project-links a.current { color: var(--ink); font-weight: 600; }
.project-links i { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }

.studio-bottom { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; font-size: 13px; }
.studio-bottom small { display: block; color: #a49b88; font-size: 11px; }
.lft { margin-top: 18px; color: #a19884; font-size: 11px; }

/* ---------------------------------------------------------------- estrutura */

.app { margin-left: var(--nav); }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 35px;
  border-bottom: 1px solid #eae7de;
  color: #a49c8b;
  font-size: 12px;
}
.topbar b { font-weight: 400; color: #746c5e; }
main { max-width: 1700px; margin: auto; padding: 32px 35px; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { display: block; margin-bottom: 10px; color: #a69b86; font-size: 11px; letter-spacing: 1.6px; }
h1 { font-family: var(--serif); font-size: 38px; font-weight: 400; letter-spacing: -.6px; color: #554c3e; }
.hero p { margin-top: 10px; color: #a39682; font-size: 13px; }

.primary {
  padding: 11px 17px;
  border: 0;
  border-radius: 5px;
  background: var(--sage);
  color: white;
  font-size: 13px;
  white-space: nowrap;
}
.primary:hover { background: #6d7a61; }

.workspace-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 26px 0 24px;
  color: #9d9380;
  font-size: 12px;
}
.workspace-meta > i { width: 1px; height: 14px; background: #dbd5c9; }
.workspace-meta .done { color: #6f8a62; }
.workspace-meta .late { color: var(--clay); }
.workspace-meta .soon { color: var(--ochre); }

.notice {
  margin: 0 0 20px;
  padding: 13px 15px;
  border: 1px solid #d5dfc7;
  border-radius: 5px;
  background: var(--sage-soft);
  color: #5f7050;
  font-size: 13px;
}
.notice-error { border-color: #ebc9b9; background: #f9ece5; color: #9b5037; }

/* ---------------------------------------------------------------- formulários */

input, select, textarea {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #e4dfd4;
  border-radius: 5px;
  background: white;
  color: #6f624e;
  font-size: 13px;
}
textarea { resize: vertical; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.toolbar input[name=q] { min-width: 230px; }
.toolbar .toggle { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.toolbar a { color: #a59680; font-size: 13px; }

.toolbar button,
.add-form button,
.task-form > button:not(.primary),
.upload-form button {
  padding: 9px 13px;
  border: 1px solid #dbd3c4;
  border-radius: 5px;
  background: #eee9df;
  color: #7a684e;
  font-size: 13px;
}

.task-form { display: grid; gap: 12px; }
.task-form label { display: grid; gap: 6px; color: #8e7c5f; font-size: 12px; }
.task-form label small { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---------------------------------------------------------------- abas e painéis */

.view-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5dfd3;
  color: #a59780;
  font-size: 13px;
}
.view-tabs a { padding: 11px 0; }
.view-tabs .selected { border-bottom: 2px solid #91866c; color: #5f5540; }
.view-tabs > span { margin-left: auto; padding: 11px 0; font-size: 11px; }

.calendar-panel,
.timeline-panel,
.activity-panel,
.milestone-panel,
.project-board {
  min-width: 0;
  padding: 24px;
  border: 1px solid #e5ded0;
  border-radius: 8px;
  background: var(--card);
}
.panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.panel-heading h2 { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.panel-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.legend-task, .legend-bar, .legend-late, .legend-today { display: inline-block; width: 16px; height: 8px; border-radius: 2px; }
.legend-task { border-left: 3px solid var(--accent); background: #f3eee4; }
.legend-bar { background: var(--sage); opacity: .8; }
.legend-late { background: var(--clay); }
.legend-today { width: 2px; height: 12px; background: var(--clay); }
.legend-mark { color: var(--ochre); }
.empty {
  padding: 22px 12px;
  border: 1px dashed #e3dccc;
  border-radius: 7px;
  color: #a3957c;
  font-size: 13px;
}

/* ---------------------------------------------------------------- Kanban */

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
  padding-bottom: 12px;
  overflow-x: auto;
}
.task-column { min-height: 120px; padding: 4px; border-radius: 8px; transition: background .15s; }
.task-column.drop-target { background: #efe9dc; }
.column-heading { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; }
.column-heading h2 { font-size: 14px; font-weight: 600; }
.column-heading i { width: 8px; height: 8px; border-radius: 50%; background: #b9b3a5; }
.column-heading .dot-2 { background: #b69d6e; }
.column-heading .dot-3 { background: #b09db7; }
.column-heading .dot-4 { background: #8eaa85; }
.column-heading > span { margin-left: auto; color: #a39479; font-size: 12px; }

.task-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #e9e3d8;
  border-radius: 7px;
  background: var(--card);
  box-shadow: 0 3px 6px #73604408;
}
.task-card[draggable="true"] { cursor: grab; }
.task-card:hover { border-color: #cbb99b; }
.task-card.dragging { opacity: .5; }
.task-card.is-late { border-left: 3px solid var(--clay); }
.task-card.is-done h3 { color: #8b8373; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.card-project { font-weight: 600; }
.priority { padding: 3px 7px; border-radius: 3px; background: #f3efdf; color: #8f7f4c; font-size: 10px; }
.priority-Alta { background: var(--clay-soft); color: #a3593d; }
.priority-Baixa { background: #eaf0e5; color: #66784f; }
.task-card h3 { margin: 12px 0 8px; font-size: 14px; font-weight: 500; line-height: 1.45; }
.task-card > p { color: #9a8f7a; font-size: 12px; line-height: 1.6; }
.mini-progress { display: block; height: 4px; margin-top: 12px; border-radius: 4px; background: #eee8dc; overflow: hidden; }
.mini-progress > span { display: block; height: 100%; background: #9da88d; }
.mini-progress.wide { margin: 0 0 12px; }
.task-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
}
.task-footer .due { color: #93866e; white-space: nowrap; }
.task-footer small { margin-left: auto; color: #a39479; font-size: 11px; white-space: nowrap; }
.due-late { color: var(--clay) !important; font-weight: 600; }
.due-soon { color: var(--ochre) !important; }

/* ---------------------------------------------------------------- workspace */

.workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.workspace-main { display: grid; gap: 24px; min-width: 0; }
.lane { padding: 22px; border: 1px solid #e5ded0; border-radius: 8px; background: var(--card); }
.lane-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.lane-heading h2 { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.lane-heading span { color: var(--muted); font-size: 12px; }
.lane-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lane-cards .task-card { margin: 0; }

.task-list { margin: 0; padding: 0; list-style: none; }
.task-list li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 24px 120px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.task-list li:first-child { border-top: 0; }
.task-list li.muted { display: block; }
.task-list i { width: 8px; height: 8px; border-radius: 2px; }
.task-list li > span:last-child { text-align: right; font-size: 12px; }

.float-panel {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid #e3d9c6;
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 18px 40px #5842210f;
}
.float-block h3 { margin-bottom: 10px; color: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.float-block + .float-block { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.milestone-row, .member-row { display: flex; gap: 10px; padding: 7px 0; font-size: 13px; }
.milestone-row > span { color: var(--accent); }
.milestone-row small, .member-row small { display: block; color: var(--muted); font-size: 11px; }
.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 6px 0;
  font-size: 13px;
}
.project-row .mini-progress { grid-column: 1 / -1; margin-top: 0; }
.more { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 12px; }

/* ---------------------------------------------------------------- feed de atividades */

.event { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee5d6; }
.event:last-of-type { border-bottom: 0; }
.event-line { font-size: 13px; line-height: 1.5; }
.event-line strong { font-weight: 600; }
.event-line a { color: #9a7b52; }
.event blockquote {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-left: 2px solid #d9ccb3;
  background: #f7f3ea;
  color: #7c6d55;
  font-size: 13px;
  line-height: 1.6;
}
.event small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.float-panel .event-line, .float-panel .event blockquote { font-size: 12px; }
.kind-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.kind-filter a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-2); font-size: 12px; }
.kind-filter a.selected { border-color: var(--sage); background: var(--sage); color: white; }
.day-heading { margin: 22px 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }

/* ---------------------------------------------------------------- calendário */

.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav a {
  min-width: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink-2);
  text-align: center;
  font-size: 14px;
}
.month-nav .today-link { font-size: 12px; }
.calendar-scroll, .timeline-scroll { overflow: auto; }
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  min-width: 760px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.weekday { padding: 10px 12px; background: #f4f1e9; color: #8f836a; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.calendar-cell { min-height: 124px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-cell.weekend { background: #fcfaf5; }
.calendar-cell.outside { background: #f6f3ec; }
.calendar-cell.outside .day-number { color: #cdc3b1; }
.calendar-cell.today { box-shadow: inset 0 0 0 2px #d8b89f; }
.calendar-cell.today .day-number { background: var(--clay); color: white; }
.day-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #9d8f74;
  font-size: 12px;
}
.calendar-task, .milestone-chip {
  display: block;
  margin-top: 6px;
  padding: 5px 7px;
  overflow: hidden;
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  background: #f5f1e8;
  font-size: 11px;
  line-height: 1.4;
}
.calendar-task.late { background: var(--clay-soft); }
.calendar-task.done { color: #9d9585; text-decoration: line-through; }
.milestone-chip { border-left: 0; background: none; padding: 2px 0; color: var(--accent); font-weight: 600; }
.milestone-chip.done { opacity: .6; }

/* ---------------------------------------------------------------- timeline / Gantt */

.timeline-grid { min-width: 820px; }
.timeline-heading, .timeline-row, .timeline-project { display: grid; grid-template-columns: 250px 1fr; }
.timeline-heading { color: #9d8f74; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.timeline-heading > span { padding: 8px 0; }
.timeline-months { display: flex; }
.timeline-months b { padding: 8px 0 8px 6px; border-left: 1px solid var(--line); font-weight: 500; }
.timeline-project { margin-top: 10px; border-top: 1px solid #e3d9c6; background: #faf7f0; }
.timeline-project > a { padding: 10px 14px 10px 10px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 16px; }
.timeline-project small, .timeline-row small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--sans); font-size: 11px; }
.timeline-row small em { color: var(--clay); font-style: normal; }
.timeline-row { min-height: 50px; align-items: center; border-top: 1px solid #f0e9dc; }
.timeline-row > a { padding: 8px 14px 8px 13px; font-size: 13px; line-height: 1.35; }
.timeline-track { position: relative; align-self: stretch; min-height: 50px; }
.today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #d98e6d; opacity: .7; z-index: 1; }
.project-span {
  position: absolute;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}
.milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -52%);
  color: var(--accent);
  font-size: 15px;
  z-index: 2;
}
.milestone.done { opacity: .55; }
.timeline-bar {
  position: absolute;
  top: 50%;
  height: 16px;
  margin-top: -8px;
  border-radius: 4px;
  background: var(--accent);
  opacity: .9;
}
.timeline-bar.status-1 { opacity: .35; }
.timeline-bar.status-2 { opacity: .65; }
.timeline-bar.status-3 { opacity: .8; }
.timeline-bar.late { box-shadow: 0 0 0 2px var(--clay); }

/* ---------------------------------------------------------------- projetos */

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.project-card { overflow: hidden; border: 1px solid #e7dfd0; border-radius: 8px; background: white; }
.drawing {
  position: relative;
  display: block;
  height: 180px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 19px, #e4e0d233 20px),
    repeating-linear-gradient(90deg, #efede6, #efede6 19px, #e4e0d2 20px);
}
.plan-square {
  position: absolute;
  top: 30px;
  left: 30%;
  width: 170px;
  height: 130px;
  border: 3px double var(--accent);
  transform: rotate(-10deg);
}
.plan-inner {
  position: absolute;
  top: 58px;
  left: 44%;
  width: 96px;
  height: 90px;
  border: 2px solid var(--accent);
  transform: rotate(-10deg);
}
.drawing > span {
  position: absolute;
  top: 14px;
  left: 16px;
  padding: 6px 10px;
  background: #fffcf6e0;
  color: var(--accent);
  font-size: 12px;
}
.project-content { padding: 22px; }
.project-content h2 { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.project-content p { margin-top: 8px; color: #97876c; font-size: 13px; }
.project-content .next-milestone { color: var(--accent); }
.project-status { display: flex; justify-content: space-between; margin: 18px 0 8px; color: #8f7d5f; font-size: 13px; }
.project-status em { color: var(--clay); font-style: normal; }
.project-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.project-foot a { color: var(--accent); }
progress { width: 100%; height: 5px; border: 0; }
progress::-webkit-progress-bar { background: #ece7dd; }
progress::-webkit-progress-value { background: #9da88d; }
progress::-moz-progress-bar { background: #9da88d; }

/* página do projeto */
.project-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
}
.project-hero .drawing { height: 170px; border: 1px solid var(--line); border-radius: 8px; }
.project-hero .plan-square { left: 16%; width: 130px; height: 100px; }
.project-hero .plan-inner { left: 34%; width: 70px; height: 70px; }
.project-hero-text > p { max-width: 720px; margin-top: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.project-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 16px 0 0; }
.project-facts dt, .detail-meta dt, .member-stats dt { color: var(--muted); font-size: 11px; }
.project-facts dd, .detail-meta dd, .member-stats dd { margin: 2px 0 0; font-size: 13px; }
.project-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}
.project-summary > div { padding: 16px; border: 1px solid #e5ded0; border-radius: 8px; background: var(--card); }
.project-summary b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.project-summary span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.project-summary .warn b { color: var(--clay); }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.project-main { display: grid; gap: 24px; min-width: 0; }
.milestone-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.milestone-list li { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }
.milestone-list li.done { background: #f3f5ee; }
.milestone-list small { display: block; color: var(--muted); font-size: 11px; }
.milestone-list button { border: 0; background: none; color: #cbbfa9; font-size: 18px; padding: 0; }
.milestone-list li.done button { color: var(--sage); }

/* ---------------------------------------------------------------- equipe */

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.member-card { padding: 22px; border: 1px solid #e5ded0; border-radius: 8px; background: var(--card); }
.member-head { display: flex; align-items: center; gap: 14px; }
.member-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.member-head span { color: var(--muted); font-size: 12px; }
.member-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 12px; }
.member-stats dd { font-family: var(--serif); font-size: 22px; }
.member-stats .warn dd { color: var(--clay); }
.load { height: 6px; border-radius: 6px; background: #eee8dc; overflow: hidden; }
.load span { display: block; height: 100%; opacity: .75; }
.member-projects { margin-top: 10px; color: var(--ink-2); font-size: 12px; }
.member-next { margin: 12px 0; padding: 0; list-style: none; }
.member-next li { padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.member-next small { display: block; color: var(--muted); font-size: 11px; }
.member-link { color: var(--accent); font-size: 12px; }

/* ---------------------------------------------------------------- diálogo e painel flutuante */

dialog {
  width: min(560px, calc(100% - 30px));
  padding: 26px;
  border: 1px solid #dcd2bf;
  border-radius: 10px;
  background: #fffdfa;
  color: var(--ink);
}
dialog::backdrop, .overlay { background: #51402c55; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dialog-heading h2 { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.dialog-heading button { border: 0; background: none; color: #af9976; font-size: 26px; }

.overlay { position: fixed; inset: 0; z-index: 4; }
.has-panel { overflow: hidden; }
.task-detail {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 5;
  width: min(560px, 100%);
  padding: 40px 32px;
  overflow-y: auto;
  background: #fffdfa;
  box-shadow: -10px 0 60px #58422122;
  animation: slide-in .18s ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .task-detail { animation: none; } }
.close { position: absolute; top: 16px; right: 22px; color: #ac997c; font-size: 28px; line-height: 1; }
.task-detail h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.25; }
.detail-description { margin: 14px 0; color: #8f7f64; font-size: 14px; line-height: 1.7; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.detail-meta dd { display: flex; align-items: center; gap: 6px; }
.inline-form { display: flex; gap: 10px; margin: 16px 0; }
.inline-form select { flex: 1; width: 0; }
.edit-box { margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; }
.edit-box summary { color: var(--ink-2); font-size: 13px; cursor: pointer; }
.edit-box[open] summary { margin-bottom: 14px; }
.task-detail h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 26px 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.task-detail h3 small { color: var(--muted); font-size: 11px; font-weight: 400; }
.check-item { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: #7d6a4d; font-size: 14px; }
.check-item.done > span { color: #a89d88; text-decoration: line-through; }
.check-item > span { flex: 1; }
.check-toggle { border: 0; background: none; color: #8a966f; font-size: 20px; padding: 0 2px; }
.remove { border: 0; background: none; color: #c3b196; font-size: 18px; padding: 0 4px; }
.remove:hover { color: var(--clay); }
.add-form { display: flex; gap: 10px; margin-top: 10px; }
.add-form input { flex: 1; }
.attachment { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; color: #8e6f45; font-size: 13px; }
.attachment small { display: block; color: #ad9c7e; font-size: 11px; }
.float-block .attachment { display: block; }
.upload-form { margin-top: 12px; }
.comment { margin-bottom: 10px; padding: 12px 14px; border-radius: 6px; background: #f4f0e7; }
.comment strong { color: #8a7152; font-size: 12px; font-weight: 600; }
.comment small { margin-left: 6px; color: var(--muted); font-size: 11px; }
.comment p { margin-top: 6px; color: #75634a; font-size: 13px; line-height: 1.6; }
.history p { padding: 6px 0; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 12px; }
.history small { display: block; color: var(--muted); font-size: 11px; }

/* ---------------------------------------------------------------- rodapé */

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 8px;
  color: #a39479;
  font-size: 12px;
}

/* ---------------------------------------------------------------- responsivo */

@media (max-width: 1500px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-layout .float-panel { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .project-layout .float-block + .float-block { padding-top: 0; border-top: 0; }
}

@media (max-width: 1200px) {
  .workspace-layout, .project-layout { grid-template-columns: 1fr; }
  .float-panel { position: static; }
  .project-hero { grid-template-columns: minmax(0, 1fr) auto; }
  .project-hero .drawing { display: none; }
}

@media (max-width: 1100px) {
  :root { --nav: 200px; }
  .workspace-nav { padding: 26px 16px; }
  main { padding: 28px; }
  .view-tabs > span { display: none; }
  .project-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .workspace-nav { position: static; width: 100%; padding: 18px; overflow: visible; }
  .brand strong { font-size: 24px; }
  .mark { font-size: 35px; }
  .studio-label, .nav-title, .project-links, .studio-bottom { display: none; }
  .lft { margin-top: 10px; }
  .workspace-nav nav { display: flex; gap: 6px; margin-top: 14px; overflow-x: auto; }
  .workspace-nav nav a { padding: 8px; white-space: nowrap; font-size: 13px; }
  .app { margin: 0; }
  .topbar { height: auto; padding: 12px 18px; font-size: 11px; }
  .topbar-note { max-width: 170px; text-align: right; }
  main { padding: 22px 16px; }
  .hero { align-items: flex-start; }
  h1, .hero h1 { font-size: 29px; }
  .hero .primary { padding: 10px; font-size: 12px; }
  .toolbar > * { flex: 1 1 140px; }
  .toolbar input[name=q] { min-width: 0; }
  .task-board { grid-template-columns: repeat(4, 250px); gap: 14px; }
  .project-grid, .team-grid { grid-template-columns: 1fr; }
  .calendar-panel, .timeline-panel, .activity-panel, .lane, .milestone-panel, .project-board { padding: 16px; }
  .task-list li { grid-template-columns: 8px minmax(0, 1fr) 24px; }
  .task-list li > .muted, .task-list li > span:last-child { grid-column: 2 / -1; text-align: left; }
  .task-detail { padding: 36px 20px; }
  .detail-meta, .two, .three { grid-template-columns: 1fr; }
  .project-hero { grid-template-columns: 1fr; }
  .project-summary { grid-template-columns: 1fr 1fr; }
  .member-stats { grid-template-columns: repeat(2, 1fr); }
  .page-footer { flex-direction: column; gap: 10px; }
}
