:root {
  --navy: #14223a;
  --navy2: #1a2c48;
  --ink: #1d2b43;
  --muted: #68758b;
  --line: #e3e8ef;
  --surface: #fff;
  --bg: #f5f8fa;
  --mint: #29c39b;
  --mint-dark: #129374;
  --amber: #e99732;
  --amber-bg: #fff4e4;
  --red: #d95448;
  --blue: #5d8eea;
  --shadow: 0 18px 60px rgba(20, 34, 58, 0.08);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Text',
    'Google Sans',
    Inter,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(
      circle at 72% 5%,
      rgba(41, 195, 155, 0.06),
      transparent 22rem
    ),
    var(--bg);
}
button,
input,
textarea {
  font: inherit;
}
.hidden {
  display: none !important;
}
.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  top: 24px;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 16px 40px rgba(20, 34, 58, 0.22);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error {
  background: #7d3029;
}
.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(41, 195, 155, 0.17),
      transparent 24rem
    ),
    var(--navy);
}
.auth-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 26px;
  padding: 40px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--navy);
  font-weight: 850;
  font-size: 23px;
  box-shadow: 0 10px 28px rgba(41, 195, 155, 0.26);
}
.brand-mark.small {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 18px;
  box-shadow: none;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(41, 195, 155, 0.12);
}
.live-dot.stale {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(233, 151, 50, 0.12);
}
.auth-card h1 {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Display',
    'Google Sans',
    Inter,
    'Segoe UI',
    sans-serif;
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.045em;
}
.auth-copy {
  margin: 12px 0 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.auth-hint {
  margin: 15px 0 0;
  text-align: center;
  color: #8792a4;
  font-size: 12px;
}
.setup-fields {
  margin: 0 0 18px;
}
.setup-fields label,
.dialog-close + span + h2 + p + label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 750;
}
.setup-fields input,
.search-box input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  outline: none;
}
.setup-fields input {
  padding: 13px 14px;
  border-radius: 11px;
}
.setup-fields input:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(41, 195, 155, 0.1);
}
.setup-fields p {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.button {
  border: 0;
  border-radius: 11px;
  padding: 11px 15px;
  cursor: pointer;
  font-weight: 750;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.18s;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.button.primary {
  background: var(--mint);
  color: var(--navy);
  box-shadow: 0 8px 22px rgba(41, 195, 155, 0.18);
}
.button.primary:hover {
  background: #32cda5;
  transform: translateY(-1px);
}
.button.ghost {
  background: #eef2f5;
  color: var(--ink);
}
.button.wide {
  width: 100%;
  padding: 14px;
}
.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  max-width: 1720px;
  margin: auto;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 25px 20px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}
.brand strong,
.brand span {
  display: block;
}
.brand strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand span {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}
nav {
  margin-top: 42px;
  display: grid;
  gap: 5px;
}
.nav-item {
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.nav-icon {
  width: 19px;
  text-align: center;
  color: var(--mint);
  font-weight: 900;
}
.nav-item b {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 20px;
  background: #ffb45c;
  color: #3d2200;
  font-size: 10px;
}
.privacy-note {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
}
.privacy-note strong {
  font-size: 12px;
}
.privacy-note p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  line-height: 1.55;
}
.shield {
  flex: 0 0 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(41, 195, 155, 0.15);
  color: var(--mint);
  font-weight: 850;
}
.logout-button {
  margin-top: 13px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  cursor: pointer;
}
.logout-button:hover {
  color: #fff;
}
.main-panel {
  min-width: 0;
  padding: 32px 38px 52px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.page-header .eyebrow {
  margin: 0 0 12px;
}
.page-header h1 {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Display',
    'Google Sans',
    Inter,
    'Segoe UI',
    sans-serif;
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.048em;
}
.page-header > div > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.header-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.search-box {
  width: 230px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.75);
}
.search-box span {
  font-size: 18px;
  color: var(--muted);
}
.search-box input {
  padding: 11px 2px;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 30px;
}
.metric {
  min-height: 135px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 40px rgba(20, 34, 58, 0.045);
}
.metric span,
.metric b,
.metric small {
  display: block;
}
.metric span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.metric b {
  margin-top: 14px;
  font-size: 29px;
  letter-spacing: -0.04em;
}
.metric small {
  margin-top: 4px;
  font-size: 10px;
  color: #8893a5;
}
.metric-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-style: normal;
  font-weight: 850;
}
.metric-icon.amber {
  background: #fff0dc;
  color: #b66a0f;
}
.metric-icon.teal,
.metric-icon.green {
  background: #e8f9f3;
  color: var(--mint-dark);
}
.metric-icon.blue {
  background: #edf3ff;
  color: var(--blue);
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(340px, 0.66fr);
  gap: 20px;
  margin-top: 20px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  min-height: 76px;
  padding: 20px 21px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.pill {
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
}
.pill.amber {
  background: var(--amber-bg);
  color: #9d5a08;
}
.filter-row {
  display: flex;
  gap: 7px;
  padding: 12px 20px;
  border-bottom: 1px solid #edf0f4;
}
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.filter-chip.active {
  border-color: #b8e8dc;
  background: #eaf9f5;
  color: #14785f;
  font-weight: 750;
}
.obligation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf0f4;
  transition: 0.15s;
}
.obligation-row:last-child {
  border-bottom: 0;
}
.obligation-row:hover {
  background: #fafcfd;
}
.attention-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff0dc;
  color: #b66a0f;
  font-weight: 900;
}
.attention-icon.possible {
  background: #edf3ff;
  color: var(--blue);
}
.row-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.priority {
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}
.priority.high {
  background: #fdeae7;
  color: #b93d32;
}
.priority.normal {
  background: #eef2f5;
  color: #627084;
}
.possible-tag {
  padding: 3px 7px;
  border-radius: 5px;
  background: #edf3ff;
  color: #497acb;
  font-size: 9px;
  font-weight: 800;
}
.project-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.obligation-row h3 {
  margin: 8px 0 4px;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.obligation-row p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.evidence {
  margin-top: 8px !important;
  padding: 8px 10px;
  border-left: 2px solid var(--blue);
  background: #f4f7fd;
  color: #536784 !important;
}
.row-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.age {
  white-space: nowrap;
  font-size: 9px;
  color: #919bac;
}
.resolve-button {
  border: 0;
  background: #eef8f5;
  color: #167b63;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.resolve-button:hover {
  background: #dff5ee;
}
.project-panel {
  background: var(--navy);
  border: 0;
  color: #fff;
}
.panel-head.dark {
  border-color: rgba(255, 255, 255, 0.1);
}
.panel-head.dark p {
  color: rgba(255, 255, 255, 0.45);
}
.project-list {
  padding: 12px;
}
.project-card {
  padding: 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}
.project-card:last-child {
  margin-bottom: 0;
}
.project-top,
.project-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.project-card h3 {
  margin: 0;
  font-size: 12px;
}
.project-card p {
  margin: 4px 0 0;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.43);
}
.project-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(41, 195, 155, 0.11);
}
.project-dot.alert {
  background: #ffb45c;
  box-shadow: 0 0 0 5px rgba(255, 180, 92, 0.11);
}
.project-dot.quiet {
  background: #79879c;
  box-shadow: 0 0 0 5px rgba(121, 135, 156, 0.11);
}
.project-bottom {
  margin-top: 14px;
}
.project-bottom span {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.52);
}
.project-bottom b {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.34);
}
.activity-panel {
  margin-top: 20px;
}
.muted {
  font-size: 10px;
  color: var(--muted);
}
.chat-list {
  display: grid;
}
.chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.7fr) auto;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid #edf0f4;
  align-items: center;
}
.chat-row:last-child {
  border: 0;
}
.chat-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.chat-status {
  font-size: 10px;
  color: var(--muted);
}
.chat-time {
  white-space: nowrap;
  font-size: 9px;
  color: #929caf;
}
.loading-row,
.empty-row {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.loading-row.dark {
  color: rgba(255, 255, 255, 0.45);
}
dialog {
  width: min(460px, calc(100% - 32px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 28px 100px rgba(20, 34, 58, 0.3);
}
dialog::backdrop {
  background: rgba(14, 24, 40, 0.62);
  backdrop-filter: blur(3px);
}
dialog form {
  position: relative;
  padding: 28px;
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 14px;
  border: 0;
  background: transparent;
  color: #8390a3;
  font-size: 24px;
  cursor: pointer;
}
.dialog-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e5f8f2;
  color: var(--mint-dark);
  font-weight: 900;
}
dialog h2 {
  margin: 17px 0 7px;
  font-size: 20px;
}
dialog p {
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
dialog label {
  font-size: 11px;
  font-weight: 750;
}
dialog label small {
  color: var(--muted);
  font-weight: 500;
}
textarea {
  resize: vertical;
  margin-top: 7px;
  border-radius: 10px;
  padding: 11px;
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}
@media (max-width: 1080px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .project-card {
    margin: 0;
  }
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .header-actions {
    width: 100%;
  }
  .search-box {
    flex: 1;
  }
}
@media (max-width: 760px) {
  .dashboard {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }
  .sidebar nav,
  .privacy-note,
  .logout-button {
    display: none;
  }
  .main-panel {
    padding: 24px 15px 40px;
  }
  .page-header h1 {
    font-size: 31px;
  }
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .search-box {
    width: 100%;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    min-height: 120px;
    padding: 16px;
  }
  .content-grid {
    gap: 14px;
  }
  .project-list {
    grid-template-columns: 1fr;
  }
  .activity-panel {
    margin-top: 14px;
  }
  .chat-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .chat-status {
    display: none;
  }
  .auth-card {
    padding: 30px 24px;
  }
}
@media (max-width: 470px) {
  .metrics {
    grid-template-columns: 1fr;
  }
  .obligation-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .row-action {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row-reverse;
    justify-content: flex-end;
  }
  .page-header h1 {
    font-size: 28px;
  }
}
