.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 24px;
}
.cloud-storage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cloud-storage > span {
  flex: 1 1 220px;
  color: var(--muted);
  font-size: 13px;
}
.cloud-storage .form-error {
  flex-basis: 100%;
  margin: 0;
}
.material-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
  background: var(--surface);
}
.material-cover {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--canvas);
  cursor: pointer;
}
.material-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.material-cover:hover img {
  opacity: 0.9;
}
.material-card-body {
  padding: 18px;
}
.material-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}
.material-title-button {
  text-align: left;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.material-title-button:hover {
  color: var(--primary);
}
.material-excerpt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  height: 3.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.material-meta,
.material-count {
  color: var(--muted);
  font-size: 12px;
}
#material-sort {
  width: 190px;
  flex: 0 0 auto;
}
.material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 16px;
}
.material-usage {
  margin-top: 8px;
}
#material-reader-usage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
#material-reader-usage .material-usage {
  margin-top: 0;
}
#material-reader .dialog-footer {
  flex-wrap: wrap;
}
.material-upload {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--canvas);
}
.material-upload input {
  width: 100%;
  height: auto;
  padding: 8px;
  background: var(--surface);
}
.material-upload p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
  margin: 10px 0 0;
}
.material-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.material-preview {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  min-width: 0;
}
.material-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--canvas);
  border-radius: 4px;
}
.material-preview figcaption {
  overflow-wrap: anywhere;
  font-size: 11px;
  margin-top: 7px;
}
.material-preview small {
  display: block;
  color: var(--muted);
  margin: 5px 0;
}
.material-reader-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.material-reader-images figure {
  margin: 0;
  min-width: 0;
}
.material-reader-images img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}
#material-reader-title {
  overflow-wrap: anywhere;
}
.material-article {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  user-select: text;
}
#material-upload-status {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 1200px) {
  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  #material-sort {
    width: 100%;
  }
  .material-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .material-previews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #materials-panel .panel-top {
    flex-wrap: wrap;
    gap: 10px;
  }
  body .sidebar nav {
    gap: 2px;
  }
  body .sidebar nav .nav-item {
    padding: 8px 6px;
    gap: 4px;
    white-space: nowrap;
  }
}
:root {
  --primary: #d92f48;
  --primary-hover: #bb2037;
  --primary-soft: #fff0f2;
  --canvas: #f6f7f9;
  --surface: #ffffff;
  --ink: #22252e;
  --muted: #737783;
  --border: #e9eaee;
  --green: #187556;
  --green-soft: #edf8f2;
  --blue: #496cb3;
  --blue-soft: #eff3fc;
  --amber: #926111;
  --amber-soft: #fff6e5;
  --danger: #bc2841;
  --scroll-thumb: #c4c7ce;
  --scroll-track: #f3f4f6;
  --scroll-hover: #a6aab3;
  --scroll-active: #777d89;
  --font-body:
    "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  --font-mono: "Consolas", monospace;
  --radius: 10px;
  --radius-panel: 14px;
  --space: 16px;
  --shadow: 0 16px 60px #2026321f;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 6px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}
html {
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-size: 13px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 1px;
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
textarea {
  resize: none;
  min-height: 100px;
  max-height: 260px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 650;
}
small {
  font-size: 12px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
} /* Native hidden must win component display rules. */
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 550;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}
.button.primary {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 3px 7px #d92f4815;
}
.button.primary:hover {
  background: var(--primary-hover);
}
.button.outline {
  background: var(--surface);
  border-color: var(--border);
}
.button.outline:hover {
  border-color: #c5c8d0;
  background: var(--canvas);
}
.button.small {
  font-size: 12px;
  padding: 7px 13px;
  min-height: 35px;
}
.button.danger {
  background: var(--danger);
  color: var(--surface);
}
.button.danger:hover {
  background: var(--primary-hover);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--canvas);
  color: var(--ink);
}
.icon-button .icon {
  width: 17px;
  height: 17px;
}
.text-button {
  color: var(--primary);
  padding: 5px 8px;
  border-radius: 4px;
}
.text-button:hover {
  background: var(--primary-soft);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 32px 20px 0;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 1px;
}
.brand-mark {
  width: 42px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--surface);
  font-size: 25px;
  border-radius: 12px 12px 12px 4px;
  transform: rotate(-4deg);
  font-family: "STKaiti", "KaiTi", serif;
}
.brand-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: -2px;
}
.workspace-label {
  font-size: 11px;
  color: var(--muted);
  margin: 43px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.workspace-label span {
  background: var(--canvas);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  color: #626775;
  font-size: 13px;
  min-height: 46px;
}
.nav-item:hover {
  background: var(--canvas);
  color: var(--ink);
}
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active:before {
  content: "";
  position: absolute;
  left: 0;
  height: 22px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-count {
  margin-left: auto;
  font-size: 11px;
  line-height: 1.6;
  min-width: 21px;
  text-align: center;
  background: var(--surface);
  border-radius: 5px;
  padding: 1px 5px;
}
.sidebar-note {
  position: relative;
  margin: 42px 6px 24px;
  padding: 24px 14px 20px;
  background: var(--canvas);
  border-radius: 9px;
}
.sidebar-note > .icon {
  color: var(--primary);
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
}
.sidebar-note strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.sidebar-note p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.9;
}
.note-line {
  position: absolute;
  top: 0;
  left: 14px;
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-bottom > .nav-item {
  font-size: 12px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.account > div {
  min-width: 0;
  flex: 1;
}
.account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.account small {
  font-size: 10px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}
.avatar.dark {
  background: #eef0f4;
  color: #505b70;
}
.workspace {
  margin-left: 232px;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  color: #c8cad0;
  margin: 0 14px;
}
.breadcrumb strong {
  font-weight: 450;
  color: var(--ink);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 11px;
  color: var(--muted);
}
.private-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}
.top-date {
  padding-left: 22px;
  border-left: 1px solid var(--border);
}
main#main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px 40px 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.page-heading h1 {
  font-size: 29px;
  letter-spacing: 1px;
  line-height: 1.6;
}
.heading-dot {
  color: var(--primary);
  margin-left: 5px;
  font-family: var(--font-display);
  font-size: 36px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.page-heading > .button {
  margin-top: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 28px;
}
.stat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 19px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  min-height: 135px;
}
.stat > div > span {
  display: block;
  font-size: 12px;
  color: #666b77;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 32px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  letter-spacing: 0.5px;
}
.stat small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.red {
  background: var(--primary-soft);
  color: var(--primary);
}
.green {
  background: var(--green-soft);
  color: var(--green);
}
.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.stat-icon .icon {
  width: 18px;
  height: 18px;
}
.records-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  overflow: hidden;
  position: relative;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  min-height: 65px;
}
.list-tabs {
  display: flex;
  align-items: stretch;
  gap: 26px;
  min-height: 65px;
}
.list-tab {
  position: relative;
  padding: 0 1px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.list-tab:hover {
  color: var(--primary);
}
.list-tab.active {
  font-weight: 600;
  color: var(--primary);
}
.list-tab.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}
.list-tab span {
  font-size: 10px;
  border-radius: 4px;
  background: var(--primary-soft);
  padding: 2px 6px;
  margin-left: 4px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 24px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  max-width: 390px;
  width: 100%;
  height: 39px;
  background: var(--surface);
}
.search-wrap > .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-wrap input {
  border: 0;
  padding: 7px 0;
  background: transparent;
  outline: none;
  font-size: 12px;
}
.search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.search-wrap input:focus-visible {
  outline: 0;
}
.search-wrap input::placeholder {
  font-size: 12px;
}
.search-wrap input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.search-wrap .icon-button {
  width: 25px;
  height: 25px;
}
.filters {
  display: flex;
  gap: 10px;
}
.filters select {
  width: 142px;
  font-size: 12px;
  padding: 8px 10px;
  cursor: pointer;
  height: 39px;
}
.table-region {
  overflow-x: auto;
  min-height: 354px;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 780px;
}
th {
  text-align: left;
  background: #fafbfc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 450;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
th:first-child {
  width: 39%;
  padding-left: 24px;
}
th:nth-child(2) {
  width: 26%;
}
th:nth-child(3) {
  width: 11%;
}
th:nth-child(4) {
  width: 13%;
}
th:last-child {
  width: 11%;
  padding-right: 20px;
}
td {
  padding: 21px 18px;
  border-bottom: 1px solid #f0f1f4;
  vertical-align: middle;
  font-size: 12px;
}
td:first-child {
  padding-left: 24px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fdfdfe;
}
.article-cell {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  min-width: 0;
}
.article-marker {
  display: grid;
  place-items: center;
  width: 38px;
  height: 44px;
  border: 1px solid #f5dce1;
  background: #fff6f7;
  color: #ce5c70;
  border-radius: 7px;
  flex-shrink: 0;
}
.article-marker .icon {
  width: 19px;
  height: 19px;
}
.article-copy {
  min-width: 0;
  flex: 1;
}
.article-title {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.8;
}
.article-title > span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.article-title > .icon {
  width: 13px;
  height: 13px;
  color: #9498a3;
}
.article-title:hover {
  color: var(--primary);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.category-tag {
  background: var(--canvas);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}
.link-host {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-notes {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-height: 60px;
  overflow: auto;
}
.publisher {
  display: flex;
  gap: 9px;
  align-items: center;
}
.publisher .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.publisher-name {
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.contact-value {
  overflow-wrap: anywhere;
  user-select: text;
}
.contact-line .icon-button {
  width: 25px;
  height: 25px;
}
.contact-line .icon {
  width: 13px;
  height: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  white-space: nowrap;
}
.badge:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.published {
  background: var(--green-soft);
  color: var(--green);
}
.badge.pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge.offline {
  background: var(--canvas);
  color: var(--muted);
}
.date-cell {
  font-family: var(--font-display);
  font-size: 12px;
  color: #696e7a;
  white-space: nowrap;
}
.date-cell small {
  font-family: var(--font-body);
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.row-actions {
  display: flex;
  gap: 1px;
  justify-content: flex-end;
}
.actions-head {
  text-align: right;
}
.delete-button:hover {
  color: var(--danger);
  background: var(--primary-soft);
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 9px;
}
.pagination select {
  width: 57px;
  padding: 4px 6px;
  font-size: 11px;
  min-height: 30px;
}
.pagination .icon-button {
  width: 29px;
  height: 29px;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.pagination .icon {
  width: 14px;
  height: 14px;
}
.flip {
  transform: rotate(180deg);
}
#page-label {
  min-width: 39px;
  text-align: center;
  font-family: var(--font-display);
  color: var(--ink);
}
.bottom-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  margin: 20px 2px;
}
.bottom-tip .icon {
  width: 13px;
  height: 13px;
}
.bottom-tip > span {
  margin-left: auto;
  color: #9599a2;
}
.empty-state {
  min-height: 354px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px 40px;
  text-align: center;
}
.empty-state h2 {
  font-size: 16px;
  font-weight: 550;
  margin-top: 18px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 21px;
}
.empty-state .button {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 14px;
}
.empty-art {
  width: 92px;
  height: 78px;
  position: relative;
}
.empty-sheet {
  position: absolute;
  left: 22px;
  top: 0;
  background: var(--surface);
  border: 1px solid #efd7dd;
  width: 52px;
  height: 66px;
  border-radius: 8px;
  transform: rotate(7deg);
  box-shadow: 0 4px 10px #d92f480a;
  padding: 11px;
}
.empty-sheet.back {
  transform: rotate(-12deg);
  left: 10px;
  top: 3px;
  background: var(--primary-soft);
  border: 1px solid #f8e4e9;
}
.empty-sheet > .icon {
  color: var(--primary);
  width: 23px;
  height: 23px;
}
.empty-sheet > i {
  display: block;
  background: #eadfe2;
  height: 3px;
  border-radius: 2px;
  margin-top: 5px;
  width: 25px;
}
.empty-sheet > i + i {
  width: 18px;
}
.empty-plus {
  position: absolute;
  right: -10px;
  bottom: -5px;
  width: 25px;
  height: 25px;
  background: var(--primary);
  color: var(--surface);
  font-size: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--surface);
  line-height: 1;
}
.loading-state {
  min-height: 354px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
}
.list-error {
  background: var(--primary-soft);
  color: var(--danger);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  min-height: 50px;
}
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
  min-height: 354px;
  align-content: start;
}
.contact-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.contact-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-card h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.contact-card > .contact-line {
  margin: 16px 0 12px;
  justify-content: space-between;
  background: var(--canvas);
  padding: 6px 10px;
  border-radius: 6px;
}
.contact-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
}
dialog::backdrop {
  background: #24293765;
  backdrop-filter: blur(3px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog h2 {
  font-size: 22px;
  line-height: 1.6;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.mini-label {
  display: block;
  font-size: 10px;
  color: var(--primary);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.dialog-body {
  padding: 22px 28px;
}
.form-intro {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.form-intro > span {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.field label,
#auth-form > label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 7px;
}
.field label b {
  color: var(--primary);
  font-weight: 450;
}
.field label span {
  font-weight: 400;
  color: var(--muted);
  font-size: 10px;
  margin-left: 5px;
}
.field small {
  font-size: 10px;
  margin-top: 5px;
}
.field input,
.field select,
.field textarea {
  font-size: 13px;
  min-height: 42px;
}
.field-error {
  display: block;
  min-height: 22px;
  padding-top: 3px;
  color: var(--danger);
  font-size: 11px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.contact-row {
  grid-template-columns: 140px 1fr;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.8;
  white-space: pre-line;
}
.form-error:not(:empty) {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--primary-soft);
  margin: 8px 0;
}
.dialog-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  z-index: 1;
}
.compact-dialog {
  width: min(460px, calc(100% - 32px));
}
.compact-dialog .dialog-body {
  padding: 28px;
}
.compact-dialog h2 {
  font-size: 20px;
}
.compact-dialog p {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.compact-dialog p.form-error {
  color: var(--danger);
}
.confirm-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--danger);
  margin-bottom: 16px;
}
.guide h3 {
  font-size: 14px;
  font-weight: 550;
}
.guide p {
  margin: 8px 0 22px;
  font-size: 12px;
}
.guide p:last-child {
  margin-bottom: 0;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 22px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
  font-size: 13px;
  z-index: 100;
  pointer-events: none;
}
.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 1fr);
  align-items: center;
  max-width: 1400px;
  margin: auto;
  padding: 64px 80px;
  gap: 90px;
}
.auth-story {
  padding: 20px 0;
  min-height: 650px;
  display: flex;
  flex-direction: column;
}
.auth-story > .brand {
  margin-bottom: 75px;
}
.story-body > .eyebrow {
  color: var(--primary);
  font-size: 11px;
}
.story-body h1 {
  font-size: 46px;
  line-height: 1.5;
  letter-spacing: 3px;
  margin: 18px 0;
}
.story-body > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}
.auth-story > small {
  margin-top: auto;
  padding-top: 50px;
  font-size: 11px;
}
.paper-stack {
  margin-top: 35px;
  max-width: 370px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  padding: 22px;
  box-shadow: 0 12px 35px #22252e06;
  transform: rotate(-2deg);
}
.paper-stack:before {
  content: "";
  position: absolute;
  inset: 5px -5px -8px 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  z-index: -1;
  transform: rotate(4deg);
}
.paper-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
  font-size: 11px;
}
.paper-lines {
  margin: 16px 0 20px;
}
.paper-lines i {
  display: block;
  height: 6px;
  width: 75%;
  background: #f0f1f4;
  margin: 8px 0;
  border-radius: 3px;
}
.paper-lines i + i {
  width: 49%;
}
.paper-contact {
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.paper-contact small {
  display: block;
  font-size: 9px;
  margin-top: 3px;
}
.paper-contact > .icon {
  margin-left: auto;
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 12px 45px #22252e04;
  max-width: 450px;
  width: 100%;
  justify-self: end;
}
.auth-card h2 {
  font-size: 27px;
  margin: 8px 0 12px;
}
.auth-card > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 30px;
}
.auth-card form > input {
  height: 46px;
}
.auth-card .field-error {
  min-height: 27px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  height: 46px;
  padding-right: 60px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 7px;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  border-radius: 5px;
}
.password-toggle:hover {
  background: var(--canvas);
  color: var(--ink);
}
.auth-submit {
  width: 100%;
  margin-top: 12px;
  min-height: 46px;
  justify-content: space-between;
}
.auth-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  padding-top: 26px;
}
.auth-foot .icon {
  width: 14px;
  height: 14px;
  color: var(--green);
}
.table-region {
  height: 390px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.table-region th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.empty-state,
.loading-state {
  height: 390px;
}
.mobile-table-hint {
  display: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1500px) {
  main#main {
    padding-top: 45px;
  }
  .stats {
    margin-bottom: 32px;
  }
  .page-heading {
    margin-bottom: 35px;
  }
  .table-region,
  .empty-state,
  .loading-state {
    min-height: 390px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 208px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .workspace {
    margin-left: 208px;
  }
  .topbar {
    padding: 0 28px;
  }
  main#main {
    padding: 28px;
  }
  .stat {
    padding: 18px 15px;
  }
  .stat-icon {
    width: 30px;
    height: 30px;
  }
  .stats {
    gap: 12px;
  }
  .toolbar {
    padding: 18px;
  }
  .filters select {
    width: 128px;
  }
  .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bottom-tip > span {
    display: none;
  }
  .auth-wrap {
    padding: 45px;
    gap: 50px;
  }
  .auth-card {
    padding: 36px 30px;
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 76px;
    padding: 26px 10px 0;
  }
  .sidebar .brand {
    justify-content: center;
  }
  .sidebar .brand > span:last-child,
  .workspace-label,
  .sidebar-note,
  .sidebar .nav-item .nav-count,
  .account > div {
    display: none;
  }
  .sidebar nav {
    margin-top: 38px;
  }
  .sidebar .nav-item {
    font-size: 0;
    justify-content: center;
    gap: 0;
    padding: 12px;
  }
  .sidebar .nav-item > .icon {
    width: 22px;
    height: 22px;
  }
  .account {
    flex-wrap: wrap;
    justify-content: center;
  }
  .account > .avatar {
    display: none;
  }
  .workspace {
    margin-left: 76px;
  }
  .topbar {
    height: 64px;
  }
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .stat {
    min-height: 125px;
  }
  .stat-icon {
    display: none;
  }
  .list-tabs {
    gap: 21px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-wrap {
    max-width: none;
    flex: 1;
    min-width: 200px;
  }
  .auth-wrap {
    gap: 28px;
    padding: 32px;
  }
  .story-body h1 {
    font-size: 38px;
  }
  .auth-card {
    padding: 32px 24px;
  }
}
@media (max-width: 650px) {
  .sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    padding: 15px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: block;
  }
  .sidebar > .brand {
    justify-content: flex-start;
    gap: 9px;
    font-size: 19px;
  }
  .brand-mark {
    width: 32px;
    height: 34px;
    font-size: 21px;
    border-radius: 9px;
  }
  .sidebar .brand > span:last-child {
    display: block;
  }
  .brand-sub {
    font-size: 8px;
  }
  .sidebar nav {
    display: flex;
    gap: 10px;
    margin-top: 17px;
  }
  .sidebar .nav-item {
    font-size: 11px;
    gap: 6px;
    min-height: 43px;
    padding: 8px 10px;
    margin: 0;
  }
  .sidebar .nav-item > .icon {
    width: 16px;
    height: 16px;
  }
  .sidebar .nav-item.active {
    background: none;
    border-bottom: 2px solid var(--primary);
    border-radius: 0;
  }
  .sidebar .nav-item.active:before {
    display: none;
  }
  .sidebar-bottom {
    position: absolute;
    top: 14px;
    right: 15px;
    display: flex;
    align-items: center;
  }
  .sidebar-bottom > .nav-item {
    width: 35px;
    font-size: 0;
    padding: 8px;
  }
  .account {
    padding: 0;
    border: 0;
    margin-left: 7px;
  }
  .account .icon-button {
    width: 31px;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    padding: 0 20px;
    height: 46px;
  }
  .top-date {
    display: none;
  }
  .topbar-right {
    font-size: 10px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 8px;
  }
  main#main {
    padding: 24px 16px;
  }
  .page-heading {
    gap: 10px;
    margin-bottom: 22px;
    align-items: center;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 10px;
    max-width: 230px;
  }
  .page-heading .button {
    font-size: 11px;
    padding: 9px 11px;
    gap: 4px;
  }
  .page-heading .button .icon {
    width: 16px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  .stat {
    min-height: 112px;
    padding: 14px 16px;
  }
  .stat strong {
    font-size: 28px;
  }
  .stat small {
    font-size: 9px;
  }
  .stat-icon {
    display: grid;
    width: 29px;
    height: 29px;
  }
  .stat-icon .icon {
    width: 16px;
    height: 16px;
  }
  .stat > div > span {
    font-size: 11px;
  }
  .panel-top {
    padding: 0 14px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .list-tabs {
    gap: 17px;
    min-height: 53px;
  }
  .list-tab {
    font-size: 11px;
  }
  .list-tab span {
    display: none;
  }
  .panel-top > .button {
    font-size: 10px;
    min-height: 30px;
    padding: 5px 8px;
    gap: 4px;
    margin: 8px 0;
  }
  .panel-top > .button .icon {
    width: 13px;
    height: 13px;
  }
  .toolbar {
    padding: 15px 14px;
    gap: 10px;
  }
  .search-wrap {
    flex-basis: 100%;
    height: 39px;
  }
  .filters {
    width: 100%;
    gap: 10px;
  }
  .filters select {
    width: 50%;
    font-size: 11px;
    height: 36px;
  }
  .table-footer {
    padding: 12px 14px;
    font-size: 10px;
    gap: 8px;
  }
  .pagination {
    gap: 6px;
  }
  .pagination label {
    display: none;
  }
  .pagination select {
    width: 45px;
    padding: 3px;
  }
  .bottom-tip {
    font-size: 9px;
    align-items: flex-start;
    line-height: 1.8;
  }
  .bottom-tip .icon {
    margin-top: 3px;
  }
  .empty-state {
    min-height: 310px;
    padding: 24px 14px;
  }
  .empty-state h2 {
    font-size: 14px;
  }
  .empty-state p {
    font-size: 11px;
  }
  .contacts-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
  }
  .contact-card {
    padding: 16px;
  }
  .dialog-header {
    padding: 17px 20px;
  }
  .dialog-body {
    padding: 18px 20px;
  }
  .dialog-footer {
    padding: 14px 20px;
  }
  .form-row {
    gap: 12px;
  }
  .contact-row {
    grid-template-columns: 100px 1fr;
  }
  dialog {
    max-height: calc(100dvh - 24px);
    width: calc(100% - 20px);
  }
  .form-intro {
    font-size: 11px;
  }
  .field label {
    font-size: 11px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .field input::placeholder,
  .field textarea::placeholder {
    font-size: 11px;
  }
  .auth-wrap {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 30px 20px;
  }
  .auth-story {
    min-height: auto;
    padding: 0;
  }
  .auth-story > .brand {
    margin-bottom: 24px;
  }
  .story-body h1 {
    font-size: 29px;
    line-height: 1.5;
    margin: 8px 0;
  }
  .story-body > p,
  .paper-stack,
  .auth-story > small,
  .story-body > .eyebrow {
    display: none;
  }
  .story-body h1 br {
    display: none;
  }
  .auth-card {
    justify-self: center;
    max-width: 500px;
    padding: 30px 24px;
  }
  .auth-card h2 {
    font-size: 24px;
  }
  .auth-card input {
    font-size: 16px;
  }
}
@media (max-width: 650px) {
  .mobile-table-hint {
    display: block;
    font-size: 10px;
    color: var(--muted);
    padding: 0 14px 12px;
  }
  .table-region {
    height: 370px;
  }
  .empty-state,
  .loading-state {
    height: 370px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  } /* Respect reduced-motion at the global boundary. */
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  .button,
  .badge,
  .stat-icon {
    border: 1px solid ButtonText;
  }
  .nav-item.active {
    outline: 1px solid Highlight;
  }
}
