@font-face {
  font-family: Nexus;
  src: local("Inter"), local("SF Pro Display");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Nexus,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #242526;
  background: #f5f5f5;
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
}
button {
  border: 1px solid #dedede;
  background: #fff;
  border-radius: 8px;
  padding: 0.6rem 0.95rem;
  color: #272727;
  box-shadow: 0 1px 2px #00000006;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #eee;
}
button:active {
  transform: translateY(1px);
}
button.primary,
.primary {
  background: linear-gradient(#303234, #151618);
  color: #fff;
  border-color: #151618;
  box-shadow: 0 2px 4px #0002;
}
.primary:hover {
  background: #414345;
}
button.small-button {
  font-size: 0.875rem;
  padding: 0.35rem 0.65rem;
}
button.text-button {
  background: none;
  border: 0;
  box-shadow: none;
  text-align: left;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid #dcdcdc;
  background: white;
  color: #242526;
  border-radius: 7px;
  padding: 0.65rem 0.8rem;
  width: 100%;
  min-width: 0;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 1rem 0 0.5rem;
}
label input,
label select,
label textarea {
  margin-top: 0.4rem;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  letter-spacing: -0.045em;
  font-weight: 650;
  line-height: 1.18;
  margin-bottom: 0.55rem;
}
h2 {
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p {
  margin-bottom: 1rem;
}
.muted {
  color: #777;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 550;
  letter-spacing: 0.13em;
}
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  white-space: nowrap;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  background: #f7f7f7;
  color: #666;
}
.pill.dark {
  background: #333;
  color: white;
  border-color: #333;
}
.icon-button {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.6rem;
  box-shadow: none;
  font-size: 1.2rem;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #dedede;
  border-radius: 9px;
  font-size: 0.8rem;
  background: linear-gradient(#fff, #eee);
  font-weight: 600;
}
.avatar.small {
  width: 30px;
  height: 30px;
}
.workspace {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #fafafa;
  border-right: 1px solid #dedede;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: block;
  background: #121212;
  height: 112px;
  overflow: hidden;
  margin: 0 -16px 20px;
}
.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.company {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  padding: 0 6px 22px;
  border-bottom: 1px solid #e5e5e5;
}
.company small,
.admin small {
  display: block;
  font-size: 0.75rem;
  color: #858585;
}
.nav-label {
  font-size: 0.7rem;
  color: #929292;
  letter-spacing: 0.12em;
  padding: 24px 12px 8px;
  margin: 0;
}
.nav-item {
  border: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  width: 100%;
  margin: 4px 0;
  font-size: 0.875rem;
  text-align: left;
  background: transparent;
  border-radius: 7px;
  color: #6c6c6c;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(120deg, #323436, #1c1d1f);
  box-shadow: 0 3px 6px #0002;
}
.nav-item .count {
  margin-left: auto;
  font:
    0.7rem "SFMono-Regular",
    monospace;
  opacity: 0.6;
}
.sidebar-bottom {
  margin-top: auto;
  padding-bottom: 16px;
}
.admin {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ddd;
  padding: 20px 4px 0;
  margin-top: 12px;
  font-size: 0.875rem;
}
.admin button {
  margin-left: auto;
}
.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e1e1e1;
  background: #fff;
  padding: 0 36px;
  font-size: 0.875rem;
}
.topbar-right {
  display: flex;
  gap: 18px;
  align-items: center;
}
main {
  padding: 36px;
  flex: 1;
  max-width: 1720px;
  width: 100%;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.page-heading p {
  font-size: 0.875rem;
  color: #7b7b7b;
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button {
  white-space: nowrap;
  font-size: 0.875rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 28px;
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 10px;
  overflow: hidden;
}
.stat {
  padding: 22px 24px;
  border-right: 1px solid #e8e8e8;
}
.stat:last-child {
  border: 0;
}
.stat .label {
  color: #777;
  font-size: 0.875rem;
  display: block;
}
.stat strong {
  display: block;
  font-size: 1.95rem;
  letter-spacing: -0.05em;
  font-weight: 600;
  margin: 8px 0 4px;
  line-height: 1.1;
}
.stat small {
  font-size: 0.75rem;
  color: #8b8b8b;
}
.panel {
  border: 1px solid #dedede;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e9e9e9;
}
.panel-head h3 {
  margin: 0;
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 22px;
}
.tab {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 16px 0;
  color: #888;
  background: transparent;
  font-size: 0.875rem;
}
.tab.active {
  border-bottom: 2px solid #292929;
  color: #222;
}
.filters {
  padding: 18px 22px;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #e9e9e9;
  flex-wrap: wrap;
}
.filters input {
  flex: 2;
  min-width: 170px;
}
.filters select {
  flex: 1;
  min-width: 150px;
}
.filters input,
.filters select {
  font-size: 0.875rem;
  height: 40px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}
th {
  background: #fafafa;
  color: #929292;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e4e4;
  white-space: nowrap;
}
td {
  padding: 16px;
  border-bottom: 1px solid #eeeeee;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfbfb;
}
td strong {
  font-weight: 550;
  color: #292929;
}
td small {
  display: block;
  color: #929292;
  font-size: 0.75rem;
  margin-top: 3px;
}
.cell-title {
  min-width: 215px;
}
.nowrap {
  white-space: nowrap;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 13px 22px;
  border-top: 1px solid #e9e9e9;
  color: #8c8c8c;
  font-size: 0.75rem;
}
.note {
  color: #777;
  font-size: 0.875rem;
  border-left: 2px solid #b3b3b3;
  padding: 10px 14px;
  background: #f2f2f2;
  margin: 18px 0;
}
.demo-note {
  font-size: 0.75rem;
  color: #919191;
  margin-top: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}
.card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.card h3 {
  font-size: 1.1rem;
}
.card p {
  font-size: 0.875rem;
  color: #777;
}
.card-footer {
  padding-top: 16px;
  border-top: 1px solid #eee;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.empty {
  padding: 50px 25px;
  text-align: center;
  color: #888;
}
.empty strong {
  display: block;
  color: #444;
  margin-bottom: 8px;
  font-size: 1rem;
}
.empty p {
  font-size: 0.875rem;
  max-width: 500px;
  margin: 0 auto 15px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.content-pad {
  padding: 24px;
}
.search-box {
  border: 1px solid #ccc;
  border-radius: 12px;
  background: white;
  padding: 18px;
  box-shadow: 0 6px 18px #00000004;
  margin-bottom: 24px;
}
.search-box textarea {
  border: 0;
  box-shadow: none;
  padding: 0;
  min-height: 110px;
  font-size: 1rem;
  resize: vertical;
}
.search-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.research-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
  line-height: 1.75;
}
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.source-links a {
  display: inline-block;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-links a:hover {
  background: #eee;
}
.result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.result-header h3 {
  max-width: 800px;
}
.bar-row {
  margin: 18px 0;
}
.bar-row > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 7px;
}
.bar-track {
  height: 9px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #333, #858585);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: auto;
  margin: 0;
}
.mail-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}
.folder {
  width: 100%;
  text-align: left;
  margin: 3px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.folder.active {
  background: #e7e7e7;
}
.detail-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  font-size: 0.875rem;
}
.detail-list dt {
  color: #888;
}
.detail-list dd {
  margin: 0;
}
.security-number {
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  overflow-wrap: anywhere;
}
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
  gap: 10px;
}
.status-line:last-child {
  border: 0;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 18px 36px;
  color: #a1a1a1;
  font-size: 0.7rem;
  border-top: 1px solid #e7e7e7;
}
dialog {
  padding: 0;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  width: min(760px, calc(100vw - 32px));
  max-height: 90dvh;
  box-shadow: 0 20px 100px #0003;
}
dialog::backdrop {
  background: #1117;
  backdrop-filter: blur(3px);
}
.modal-header {
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.modal-header h2 {
  margin: 0;
}
.modal-header button {
  font-size: 1.6rem;
}
#modal-body {
  padding: 4px 26px 26px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #232426;
  color: white;
  border: 1px solid #555;
  padding: 14px 22px;
  box-shadow: 0 8px 30px #0002;
  border-radius: 8px;
  z-index: 999;
  font-size: 0.875rem;
  max-width: calc(100vw - 32px);
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-brand {
  background: #121212;
  color: white;
  padding: 40px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
}
.hero-logo {
  width: 220px;
  height: 115px;
  object-fit: cover;
  align-self: flex-start;
}
.login-brand h1 {
  font-size: 3.8rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.05em;
  margin: 20px 0 24px;
}
.login-brand p {
  color: #9e9e9e;
}
.login-brand small {
  font-size: 0.75rem;
  color: #696969;
}
.login-panel {
  background: #fcfcfc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}
.login-panel form {
  max-width: 360px;
  width: 100%;
}
.login-panel h2 {
  font-size: 2rem;
  margin: 15px 0 12px;
}
.login-panel label {
  margin: 24px 0 0;
}
.login-panel .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  padding: 13px 18px;
}
.login-note {
  font-size: 0.75rem;
  text-align: center;
  color: #999;
  margin-top: 30px;
}
#login-error {
  font-size: 0.875rem;
  margin-top: 18px;
}
.mobile-only {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  main {
    padding: 40px 50px;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  main {
    padding: 26px;
  }
  .sidebar {
    padding: 0 12px;
  }
  .brand {
    margin-left: -12px;
    margin-right: -12px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid #eee;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .mail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}
@media (max-width: 800px) {
  .workspace {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 50;
    width: 244px;
    box-shadow: 12px 0 40px #0002;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    padding: 0 18px;
    gap: 14px;
  }
  .topbar-right #today {
    display: none;
  }
  .topbar > span {
    margin-right: auto;
  }
  .grid-2,
  .grid-3,
  .mail-layout {
    grid-template-columns: 1fr;
  }
  main {
    padding: 24px 18px;
  }
  .page-heading h1 {
    font-size: 1.75rem;
  }
  .stat {
    padding: 20px;
  }
  .stat strong {
    font-size: 1.6rem;
  }
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .login-panel {
    padding: 36px 24px;
    min-height: 100dvh;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    padding: 15px;
  }
  .filters input,
  .filters select {
    flex: 1 1 40%;
    width: auto;
  }
  footer {
    padding: 18px;
  }
  .detail-list {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .detail-list dd {
    margin-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
