/* Bridge Labs Dashboard — 編輯式排版、報表資訊密度。
   配色/字體基調沿用官網（website/index.html）：cream/ink/orange，Nunito+Noto Sans TC 為主，
   Anton 只用於導航編號等少量強調，不做行銷式置中卡片。 */

:root {
  --cream: #fdf7f0;
  --white: #fff;
  --ink: #2b2320;
  --ink-soft: #7a6a5e;
  --line: #efe3d6;
  --orange: #f47a20;
  --orange-deep: #e8641a;
  --blue: #2d8cff;
  --sans: 'Nunito', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --display: 'Anton', var(--sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-deep); text-decoration: none; border-bottom: 2px solid var(--orange); }
a:hover { color: var(--ink); border-color: var(--ink); }

button { font-family: inherit; }

/* top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.brand { font-weight: 900; font-size: 1.05rem; letter-spacing: -.01em; }
.brand b { color: var(--orange-deep); }
.brand-div { margin: 0 10px; color: var(--line); font-weight: 400; }
.brand-app { color: var(--ink-soft); font-weight: 700; }

.auth-status { font-size: .92rem; font-weight: 700; color: var(--ink-soft); }
.auth-status a { border-bottom: 2px solid var(--orange); font-weight: 800; }

/* shell layout */
.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
}

.sidenav {
  border-right: 1px solid var(--line);
  padding: 28px 0;
}

.sidenav ul { list-style: none; }

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.nav-link .num {
  font-family: var(--display);
  font-weight: 400;
  font-size: .78rem;
  color: var(--line);
  transition: color .15s;
}

.nav-link:hover { color: var(--ink); background: var(--cream); }

.nav-link.is-active {
  color: var(--orange-deep);
  border-left-color: var(--orange);
  background: var(--cream);
}

.nav-link.is-active .num { color: var(--orange); }

/* content */
.content { padding: 48px clamp(24px, 5vw, 64px); max-width: 860px; }

.view h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}

.view .lede {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 1.02rem;
  max-width: 46rem;
  margin-bottom: 28px;
}

.view .placeholder {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: .95rem;
}

/* overview: 產品區塊（W6） */
.product-block {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}

.product-block:first-child {
  margin-top: 0;
}

.product-block h2 {
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 14px;
}

.alert-banner {
  border-left: 3px solid var(--orange);
  background: var(--cream);
  color: var(--orange-deep);
  font-weight: 800;
  font-size: .92rem;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.stat-row,
.extras-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  margin-bottom: 12px;
}

.stat-row dt,
.extras-row dt {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.stat-row dd,
.extras-row dd {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink);
}

.extras-row dd {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1rem;
}

.sync-line {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.trend-table {
  border-collapse: collapse;
  width: 100%;
  font-size: .88rem;
}

.trend-table th,
.trend-table td {
  text-align: left;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--line);
}

.trend-table th {
  color: var(--ink-soft);
  font-weight: 700;
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { border-right: none; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .sidenav ul { display: flex; overflow-x: auto; }
  .nav-link { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .nav-link.is-active { border-left-color: transparent; border-bottom-color: var(--orange); }
  .content { padding: 32px 20px; }
}

/* 待辦（W8） */
.todo-item {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}

.todo-item:first-child {
  margin-top: 0;
}

.todo-item h2 {
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.todo-rationale {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 16px;
}

.todo-actions {
  display: flex;
  gap: 14px;
}

.btn {
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 800;
  font-size: .92rem;
  cursor: pointer;
  padding: 8px 4px;
  border-bottom: 2px solid var(--orange);
  color: var(--orange-deep);
  transition: color .15s, border-color .15s;
}

.btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ignore {
  color: var(--ink-soft);
  border-color: var(--line);
/* 成本與業績（W9） */
.view-performance h2,
#view-performance h2 {
  font-size: 1.1rem;
  font-weight: 900;
  margin-top: 30px;
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

#view-performance h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.cost-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px 20px;
  margin-bottom: 22px;
}

.cost-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.cost-form input {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  border: none;
  border-bottom: 2px solid var(--line);
  padding: 6px 2px;
  background: none;
}

.cost-form input:focus {
  outline: none;
  border-color: var(--orange);
}

.cost-form button {
  align-self: end;
  border: none;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  font-size: .9rem;
  padding: 10px 20px;
  cursor: pointer;
}

.cost-form button:hover {
  background: var(--orange-deep);
}

.cost-form-error {
  flex-basis: 100%;
  color: var(--orange-deep);
  font-weight: 700;
  font-size: .88rem;
}

.cost-total {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.cost-table,
.performance-table {
  border-collapse: collapse;
  width: 100%;
  font-size: .88rem;
}

.cost-table th,
.cost-table td,
.performance-table th,
.performance-table td {
  text-align: left;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--line);
}

.cost-table th,
.performance-table th {
  color: var(--ink-soft);
  font-weight: 700;
}

.cost-delete-btn {
  border: none;
  background: none;
  color: var(--orange-deep);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  padding: 0;
}

.cost-delete-btn:hover {
  color: var(--ink);
}
