:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #141414;
  --surface-2: #1d1d1f;
  --surface-3: #272729;
  --line: #303033;
  --text: #f5f5f1;
  --muted: #a3a3a6;
  --muted-2: #737378;
  --red: #e50914;
  --red-dark: #b20710;
  --amber: #f0a43c;
  --green: #45b97c;
  --blue: #5e8df7;
  --nav-height: 76px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--text);
}

body {
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
button, .project-card, .mail-row, .teammate-row { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }

.app-shell {
  position: relative;
  width: min(100%, 460px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  border-left: 1px solid #171717;
  border-right: 1px solid #171717;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(62px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 9, 9, .96);
  border-bottom: 1px solid #202020;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.wordmark {
  color: var(--red);
  font-size: 22px;
  line-height: 1;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0;
  transform: scaleX(.82);
  transform-origin: left center;
  margin-right: -14px;
}

.product-name {
  color: #d7d7d7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.top-actions { display: flex; align-items: center; gap: 5px; }
.top-actions > button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border-radius: 50%;
}
.top-actions svg { width: 21px; height: 21px; stroke-width: 1.9; }
.top-actions b {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 8px;
  height: 8px;
  font-size: 0;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--bg);
}
.top-actions .mini-avatar {
  width: 32px;
  height: 32px;
  margin-left: 3px;
  background: #333;
  border: 1px solid #4b4b4b;
  font-size: 11px;
  font-weight: 800;
}

.page {
  display: none;
  min-height: calc(100dvh - 62px);
  padding: 22px 18px calc(var(--nav-height) + 24px + env(safe-area-inset-bottom));
}
.page.active { display: block; }

.eyebrow, .today-head .eyebrow {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.today-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.today-head h1 {
  margin: 6px 0 4px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}
.today-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.date-tile {
  flex: 0 0 48px;
  width: 48px;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}
.date-tile span { display: block; color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.date-tile strong { display: block; margin-top: 1px; font-size: 21px; line-height: 1.1; }

.focus-hero {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.6;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #181818;
  border: 1px solid #262626;
  text-align: left;
}
.focus-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.focus-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.52) 58%, rgba(0,0,0,.08) 100%);
}
.focus-copy {
  position: absolute;
  left: 18px;
  right: 58px;
  bottom: 16px;
  display: block;
}
.focus-copy strong { display: block; margin: 5px 0 4px; font-size: 18px; line-height: 1.2; }
.focus-copy small { display: block; color: #d2d2d2; font-size: 11px; }
.focus-play {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: #fff;
}
.focus-play svg { width: 16px; height: 16px; fill: currentColor; stroke-width: 1.7; margin-left: 2px; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}
.metric-row button {
  min-width: 0;
  padding: 12px 4px 10px;
  background: var(--surface);
  text-align: center;
}
.metric-row strong { display: block; font-size: 19px; line-height: 1; }
.metric-row span { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }

.content-section { margin-top: 28px; }
.first-section { margin-top: 22px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head span:not(.counter) { display: block; color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: 1.35px; }
.section-head h2 { margin: 4px 0 0; font-size: 18px; line-height: 1.1; }
.section-head > button {
  padding: 4px 0;
  background: transparent;
  color: #c7c7c7;
  font-size: 11px;
}
.section-head .counter {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.schedule-list, .decision-list, .teammate-list, .project-list, .mail-list { display: grid; gap: 8px; }
.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #343437;
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.schedule-row {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 48px 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid #242424;
  border-radius: 5px;
  text-align: left;
}
.schedule-time strong { display: block; font-size: 13px; }
.schedule-time small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.schedule-line { align-self: stretch; border-radius: 2px; background: var(--red); }
.schedule-line.amber { background: var(--amber); }
.schedule-line.blue { background: var(--blue); }
.schedule-line.green { background: var(--green); }
.schedule-line.gray { background: #777; }
.schedule-copy { min-width: 0; }
.schedule-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.schedule-copy small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.tag {
  padding: 4px 6px;
  border-radius: 3px;
  background: #2c2c2f;
  color: #bbb;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .4px;
}
.tag.red { background: rgba(229,9,20,.15); color: #ff696f; }
.tag.amber { background: rgba(240,164,60,.14); color: #f1b45e; }

.decision-card {
  width: 100%;
  padding: 14px;
  background: var(--surface);
  border: 1px solid #282828;
  border-left: 3px solid var(--red);
  border-radius: 5px;
  text-align: left;
}
.decision-card > span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.decision-card h3 { margin: 7px 0 10px; font-size: 14px; line-height: 1.35; }
.decision-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.decision-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decision-meta b { flex: 0 0 auto; color: #d7d7d7; font-weight: 600; }

.culture-strip {
  margin-top: 28px;
  padding: 18px;
  background: #ecebe7;
  color: #111;
  border-radius: 6px;
}
.culture-strip span { color: var(--red-dark); font-size: 9px; font-weight: 900; letter-spacing: 1.3px; }
.culture-strip h2 { margin: 6px 0 6px; font-size: 20px; }
.culture-strip p { margin: 0; color: #555; font-size: 12px; line-height: 1.5; }

.page-head {
  min-height: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.page-head span { display: block; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.page-head h1 { margin: 5px 0 0; font-size: 28px; line-height: 1; }
.page-head > button:not(.compose-button) {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.page-head svg { width: 19px; height: 19px; }

.search-field {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.search-field svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--muted); }
.search-field input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.search-field input::placeholder { color: var(--muted-2); }

.team-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--line);
}
.team-status div { padding: 11px 8px; background: var(--surface); }
.team-status strong { display: block; font-size: 17px; }
.team-status span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.teammate-row {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid #282828;
  text-align: left;
}
.teammate-row:first-child { border-radius: 5px 5px 0 0; }
.teammate-row:last-child { border-radius: 0 0 5px 5px; border-bottom: 0; }
.person-avatar {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.person-copy { min-width: 0; }
.person-copy strong { display: block; font-size: 14px; }
.person-copy span, .person-copy small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.person-copy small::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
}
.person-copy small.focus::before { background: var(--amber); }
.person-copy small.offline::before { background: #6d6d70; }
.teammate-row > svg { width: 17px; height: 17px; color: var(--muted-2); }

.slate-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.slate-summary div { min-width: 0; padding: 11px 7px; background: var(--surface); }
.slate-summary span { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 7px; font-weight: 800; white-space: nowrap; }
.slate-summary strong { display: block; margin-top: 5px; font-size: 15px; }
.text-amber { color: var(--amber); }

.filter-rail {
  display: flex;
  gap: 7px;
  margin: 0 -18px 16px;
  padding: 0 18px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-rail::-webkit-scrollbar { display: none; }
.filter-rail button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.filter-rail button.active { background: #f1f1ed; border-color: #f1f1ed; color: #111; font-weight: 700; }

.project-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 99px;
  padding: 13px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #292929;
  border-radius: 5px;
  text-align: left;
}
.project-code {
  width: 48px;
  height: 58px;
  display: grid;
  place-items: center;
  background: #242426;
  border: 1px solid #353538;
  border-radius: 4px;
  color: #dedede;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .4px;
}
.project-copy { min-width: 0; }
.project-kicker { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.health-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.health-dot.watch { background: var(--amber); }
.project-copy h3 { margin: 5px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.project-copy p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.progress-track { height: 3px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: #333; }
.progress-track span { display: block; height: 100%; background: var(--red); }
.project-card > svg { width: 17px; height: 17px; color: var(--muted-2); }

.compose-button {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.compose-button svg { width: 16px; height: 16px; }
.mail-search { margin-top: -2px; }
.mail-summary {
  display: flex;
  gap: 8px;
  margin: 11px 0 13px;
  color: var(--muted);
  font-size: 10px;
}
.mail-summary span { padding-right: 9px; border-right: 1px solid var(--line); }
.mail-summary span:last-child { border-right: 0; }
.mail-summary b { color: #eee; }

.mail-row {
  position: relative;
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 13px 12px;
  background: var(--surface);
  border-bottom: 1px solid #282828;
  text-align: left;
}
.mail-row.unread::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; background: var(--red); }
.mail-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #29292c;
  color: #e8e8e8;
  font-size: 11px;
  font-weight: 800;
}
.mail-copy { min-width: 0; }
.mail-sender { display: flex; align-items: center; gap: 6px; }
.mail-sender strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mail-sender span { flex: 0 0 auto; padding: 2px 4px; border-radius: 2px; background: #2c2c2f; color: #aaa; font-size: 7px; text-transform: uppercase; }
.mail-copy h3 { margin: 5px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.mail-row:not(.unread) .mail-copy h3, .mail-row:not(.unread) .mail-sender strong { color: #cecece; font-weight: 600; }
.mail-copy p { margin: 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail-meta { display: grid; justify-items: end; align-content: space-between; min-width: 43px; color: var(--muted); font-size: 9px; }
.mail-meta button { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; background: transparent; color: var(--muted); }
.mail-meta button.starred { color: #f1b84b; }
.mail-meta svg { width: 16px; height: 16px; }

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.profile-avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #242426;
  border: 2px solid #444;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-copy { min-width: 0; }
.profile-copy > span { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.profile-copy h1 { margin: 5px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 23px; }
.profile-copy p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.profile-copy small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.profile-hero > button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: var(--surface-2); }
.profile-hero > button svg { width: 17px; height: 17px; }

.access-card {
  min-height: 91px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 14px;
  background: #efeee9;
  color: #111;
  border-radius: 6px;
}
.n-mark {
  width: 42px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: #080808;
  border-radius: 3px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 30px;
}
.access-card span { display: block; color: #555; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.access-card strong { display: block; margin: 4px 0; font-size: 16px; }
.access-card small { display: block; color: #686868; font-size: 9px; }
.access-card button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: #dddcd8; color: #222; }
.access-card svg { width: 19px; height: 19px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--line);
}
.profile-stats button { padding: 12px 8px; background: var(--surface); text-align: left; }
.profile-stats strong { display: block; font-size: 16px; }
.profile-stats span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.service-list { display: grid; overflow: hidden; border-radius: 5px; background: var(--surface); }
.service-list button {
  min-height: 65px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  background: transparent;
  border-bottom: 1px solid #292929;
  text-align: left;
}
.service-list button:last-child { border-bottom: 0; }
.service-list button > svg:first-child { width: 19px; height: 19px; color: #e4e4e4; }
.service-list button > svg:last-child { width: 16px; height: 16px; color: var(--muted-2); }
.service-list strong { display: block; font-size: 13px; }
.service-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.culture-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.culture-grid button { min-height: 72px; padding: 12px; border-radius: 5px; background: var(--surface); border: 1px solid #292929; text-align: left; }
.culture-grid strong { display: block; font-size: 12px; }
.culture-grid span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.app-version { margin: 24px 0 0; color: #555; font-size: 9px; text-align: center; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  width: min(100%, 458px);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 8px 8px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  transform: translateX(-50%);
  background: rgba(16,16,17,.97);
  border-top: 1px solid #303030;
  backdrop-filter: blur(20px);
}
.bottom-nav > button {
  min-width: 0;
  height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: #8d8d91;
  font-size: 9px;
}
.bottom-nav > button.active { color: #fff; }
.bottom-nav > button.active::after { content: ""; position: absolute; top: 0; width: 28px; height: 2px; background: var(--red); }
.bottom-nav svg { width: 21px; height: 21px; stroke-width: 1.8; }
.nav-icon { position: relative; display: grid; place-items: center; }
.nav-icon b {
  position: absolute;
  top: -6px;
  right: -12px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  border: 1.5px solid #111;
  font-size: 8px;
}

.detail-view {
  position: fixed;
  z-index: 80;
  inset: 0;
  width: min(100%, 460px);
  margin: 0 auto;
  overflow-y: auto;
  background: var(--bg);
  animation: detail-in .24s ease-out;
}
.detail-view[hidden], .sheet-layer[hidden] { display: none; }
@keyframes detail-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 10px 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  background: rgba(9,9,9,.97);
  border-bottom: 1px solid #282828;
  backdrop-filter: blur(16px);
}
.detail-header button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: transparent; }
.detail-header svg { width: 21px; height: 21px; }
.detail-header h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; text-align: center; }
.detail-content { padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
.detail-kicker { color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: 1.2px; }
.detail-title { margin: 7px 0 8px; font-size: 25px; line-height: 1.2; }
.detail-subtitle { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-hero { margin: 18px -18px 0; }
.detail-hero img { display: block; width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.detail-section { margin-top: 24px; }
.detail-section > h3 { margin: 0 0 11px; font-size: 15px; }
.detail-section > p { margin: 0; color: #c0c0c0; font-size: 12px; line-height: 1.65; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: 5px; background: var(--line); border: 1px solid var(--line); }
.detail-facts div { min-width: 0; padding: 12px; background: var(--surface); }
.detail-facts span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .6px; }
.detail-facts strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 12px; }
.detail-list { display: grid; overflow: hidden; border-radius: 5px; background: var(--surface); }
.detail-list div, .detail-list button {
  width: 100%;
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: transparent;
  border-bottom: 1px solid #292929;
  text-align: left;
}
.detail-list div:last-child, .detail-list button:last-child { border-bottom: 0; }
.detail-list span { color: var(--muted); font-size: 10px; }
.detail-list strong { font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.milestone { display: grid !important; grid-template-columns: 18px minmax(0, 1fr); justify-content: start !important; }
.milestone i { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #101010; font-size: 9px; font-style: normal; font-weight: 900; }
.milestone.pending i { background: #333; color: #aaa; }
.mail-detail-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.mail-detail-sender { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 17px; }
.mail-detail-sender .mail-avatar { width: 42px; height: 42px; border-radius: 50%; }
.mail-detail-sender strong { display: block; font-size: 13px; }
.mail-detail-sender span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.mail-body { margin-top: 22px; color: #d0d0d0; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.attachment-list { display: grid; gap: 7px; margin-top: 16px; }
.attachment-list button { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 9px 11px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: #ddd; font-size: 10px; text-align: left; }
.attachment-list svg { width: 17px; height: 17px; }
.primary-action { width: 100%; min-height: 45px; margin-top: 22px; border-radius: 4px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }
.secondary-action { width: 100%; min-height: 45px; margin-top: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: #eee; font-size: 12px; font-weight: 700; }
.person-detail-card { display: grid; justify-items: center; padding: 26px 18px; border-radius: 6px; background: var(--surface); text-align: center; }
.person-detail-card .person-avatar { width: 76px; height: 76px; font-size: 20px; }
.person-detail-card h2 { margin: 14px 0 4px; font-size: 22px; }
.person-detail-card p { margin: 0; color: var(--muted); font-size: 12px; }
.skill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-row span { padding: 6px 8px; border-radius: 3px; background: var(--surface-2); color: #ccc; font-size: 9px; }
.culture-detail { display: grid; gap: 10px; }
.culture-detail article { padding: 16px; border-radius: 5px; background: var(--surface); border-left: 3px solid var(--red); }
.culture-detail h3 { margin: 0 0 7px; font-size: 15px; }
.culture-detail p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.sheet-layer { position: fixed; z-index: 100; inset: 0; width: min(100%, 460px); margin: 0 auto; }
.sheet-scrim { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(0,0,0,.68); }
.action-sheet { position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); max-height: 80dvh; overflow-y: auto; padding: 18px; border-radius: 7px; background: #202022; border: 1px solid #3a3a3d; animation: sheet-in .2s ease-out; }
@keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.action-sheet h2 { margin: 0 0 14px; font-size: 18px; }
.action-sheet label { display: block; margin-top: 11px; color: var(--muted); font-size: 9px; font-weight: 700; }
.action-sheet input, .action-sheet textarea { width: 100%; margin-top: 6px; padding: 11px; border: 1px solid var(--line); border-radius: 4px; outline: 0; background: #111; color: #fff; font: inherit; font-size: 12px; }
.action-sheet textarea { min-height: 140px; resize: vertical; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.sheet-actions button { min-height: 42px; border-radius: 4px; background: #303033; font-size: 12px; font-weight: 700; }
.sheet-actions .send { background: var(--red); }

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom));
  max-width: calc(100% - 40px);
  padding: 10px 14px;
  border-radius: 4px;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  background: #eeeeea;
  color: #111;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  font-size: 11px;
  transition: .2s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 700px) {
  body { background: #141414; }
  .app-shell, .detail-view { box-shadow: 0 0 50px rgba(0,0,0,.5); }
}

@media (max-width: 350px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .filter-rail { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .today-head h1, .page-head h1 { font-size: 25px; }
  .metric-row span { font-size: 8px; }
  .profile-copy h1 { font-size: 20px; }
  .bottom-nav > button { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
