@font-face {
  font-family: Vazirmatn;
  src: url('/assets/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  --bg: #f6f7fb;
  --surface: #fff;
  --surface-2: #f9fafc;
  --text: #263148;
  --muted: #8b93a4;
  --border: #edf0f5;
  --primary: #4f67ed;
  --primary-light: #eef1ff;
  --danger: #d84d62;
  --shadow: 0 12px 55px #23325b0c;
  --sidebar: 250px;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.8;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: var(--primary);
  text-decoration: none;
}
button,
input,
select,
textarea,
a {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
}
[hidden] {
  display: none !important;
}
svg.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mono {
  font-family: ui-monospace, monospace;
  direction: ltr;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: Vazirmatn, sans-serif;
  direction: ltr;
  font-size: 19px;
  line-height: 1.4;
}
.brand b {
  font-weight: 750;
}
.brand small {
  display: block;
  text-align: left;
  direction: rtl;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
  font-weight: 400;
}
.eyebrow {
  font-size: 11px;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 550;
  white-space: nowrap;
  line-height: 1.7;
  transition:
    background 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.button:active {
  transform: translateY(1px);
}
.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px #4f67ed16;
}
.button.primary:hover {
  background: #4059df;
}
.button.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.button.secondary:hover {
  background: var(--surface-2);
  border-color: #cfd5e4;
}
.button.ghost {
  background: transparent;
  color: var(--muted);
}
.button.danger {
  background: var(--danger);
  color: white;
}
.button.danger-ghost {
  background: #fff0f2;
  color: var(--danger);
}
.button.small {
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 8px;
}
.button.wide {
  width: 100%;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  padding: 0;
}
.icon-button:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.icon-button.small {
  width: 28px;
  height: 28px;
}
.icon-button.small .icon {
  width: 17px;
  height: 17px;
}
.avatar {
  height: 43px;
  width: 43px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar.small {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 13px;
}
.avatar.large {
  width: 80px;
  height: 80px;
  border-radius: 25px;
  font-size: 30px;
}
.indigo {
  background: #eef0ff;
  color: #6574d9;
}
.teal {
  background: #e9f7f3;
  color: #3b9f8a;
}
.rose {
  background: #fceef2;
  color: #cc7c98;
}
.amber {
  background: #fff5e5;
  color: #d7a04b;
}
.purple {
  background: #f3edfc;
  color: #9b7bd1;
}
.icon-tile {
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  flex-shrink: 0;
}
.icon-tile .icon {
  width: 23px;
  height: 23px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4bb198;
  border-radius: 50%;
  flex-shrink: 0;
}
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 22px;
  color: var(--muted);
  background: var(--bg);
  z-index: 100;
}
.loading-line {
  height: 3px;
  width: 130px;
  border-radius: 10px;
  background: var(--border);
  overflow: hidden;
}
.loading-line:after {
  content: '';
  display: block;
  height: 100%;
  width: 50%;
  background: var(--primary);
  animation: load 1s ease-in-out infinite;
}
@keyframes load {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 14% 45%, #edf0ff 0, transparent 45%), var(--surface);
}
.login-header {
  width: min(1240px, 90%);
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-main {
  width: min(1180px, 88%);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7%;
  align-items: center;
  padding: 45px 0 85px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--primary-light);
  border: 1px solid #e4e8ff;
  color: var(--primary);
  padding: 7px 13px;
  border-radius: 50px;
  font-size: 11px;
}
.pill .status-dot {
  background: var(--primary);
}
.login-copy h1 {
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.65;
  letter-spacing: -2px;
  font-weight: 800;
  margin: 20px 0 16px;
}
.login-copy h1 > span {
  color: var(--primary);
}
.login-copy > p {
  font-size: 14px;
  line-height: 2.3;
  color: #7d8599;
  max-width: 460px;
}
.login-button {
  margin-top: 24px;
  padding: 14px 20px;
  gap: 16px;
}
.login-copy .login-caption {
  font-size: 11px;
  margin-top: 12px;
}
.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 38px;
  font-size: 11px;
  color: #7d879b;
}
.login-features > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-features .icon {
  width: 16px;
  height: 16px;
}
.login-art {
  min-height: 450px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.orbit {
  position: absolute;
  border: 1px dashed #d9def5;
  border-radius: 50%;
  z-index: -1;
}
.orbit-one {
  width: 420px;
  height: 420px;
}
.orbit-two {
  width: 530px;
  height: 530px;
  border-color: #e8ebf8;
}
.address-card {
  width: 360px;
  padding: 27px;
  background: #ffffffed;
  border: 1px solid #edf0fb;
  border-radius: 22px;
  box-shadow: 0 30px 85px #445fbb12;
  transform: rotate(-4deg);
}
.address-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a2acc4;
  font-size: 9px;
  letter-spacing: 1px;
}
.address-card-top .icon {
  color: #8796e2;
}
.avatar-stack {
  display: flex;
  direction: ltr;
  margin: 32px 0 23px;
  padding-left: 7px;
}
.avatar-stack .avatar {
  border: 3px solid white;
  margin-left: -7px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
}
.address-card h2 {
  font-size: 25px;
  margin: 0;
  font-weight: 700;
}
.address-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 26px;
}
.art-search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #9ba5bb;
  background: #f7f8fd;
  border: 1px solid #edf0f9;
  padding: 12px;
  border-radius: 10px;
  font-size: 10px;
}
.art-search kbd {
  margin-right: auto;
  font-size: 9px;
  direction: ltr;
}
.art-lines {
  margin: 26px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.art-lines span {
  height: 7px;
  border-radius: 8px;
  background: #edf0f9;
  width: 82%;
}
.art-lines span:nth-child(2) {
  width: 62%;
}
.art-lines span:nth-child(3) {
  width: 72%;
}
.art-footer {
  border-top: 1px solid #f0f2f8;
  padding-top: 15px;
  font-size: 10px;
  color: #9aa3b8;
  display: flex;
  align-items: center;
  gap: 7px;
}
.floating-card {
  position: absolute;
  padding: 15px;
  background: white;
  border: 1px solid #edf0f9;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 40px #40569b0c;
  z-index: 2;
  white-space: nowrap;
}
.floating-card b {
  font-size: 11px;
  font-weight: 600;
}
.floating-card small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.fc-one {
  top: 8px;
  right: -25px;
  transform: rotate(4deg);
}
.fc-two {
  bottom: 9px;
  left: -5px;
  transform: rotate(3deg);
}
.tiny-badge {
  padding: 4px 7px;
  font-size: 8px;
  color: #50a18f;
  background: #eff9f6;
  border-radius: 6px;
}
.verified {
  color: #58a891;
}
.login-footer {
  width: 90%;
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: #a1a8b9;
  font-size: 10px;
}
.workspace {
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar);
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 27px 20px 16px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow-y: auto;
}
.workspace-brand {
  justify-content: flex-end;
  align-self: flex-start;
  margin: 0 8px 31px;
  font-size: 18px;
}
.sidebar > .button {
  font-size: 12px;
  margin-bottom: 25px;
  justify-content: flex-start;
  padding: 11px 15px;
}
.key-hint {
  margin-right: auto;
  opacity: 0.6;
  border: 1px solid #ffffff55;
  border-radius: 4px;
  width: 18px;
  font-size: 10px;
  text-align: center;
  line-height: 1.5;
}
.sidebar-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a7afbf;
  font-size: 10px;
  margin: 8px 11px 11px;
  min-height: 23px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 23px;
}
.nav-item {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
  color: #8490a3;
  text-align: right;
  width: 100%;
  transition: background 0.15s;
}
.nav-item .icon {
  width: 19px;
  height: 19px;
}
.nav-item .count {
  margin-right: auto;
  font-size: 10px;
  color: #9ba7ba;
}
.nav-item:hover {
  background: var(--surface-2);
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 550;
}
.nav-item.active .count {
  color: var(--primary);
}
.book-dot {
  height: 8px;
  width: 8px;
  border-radius: 3px;
  display: inline-block;
  background: var(--primary);
  margin: 0 5px;
  flex-shrink: 0;
}
.book-dot.teal {
  background: #4bb198;
}
.book-dot.rose {
  background: #ce84a3;
}
.book-dot.amber {
  background: #dab166;
}
.book-dot.purple {
  background: #a58acf;
}
.tag-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 10px 28px;
}
.tag-button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 9px;
  color: #8e98aa;
  font-size: 10px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-button:hover,
.tag-button.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: #dfe5ff;
}
.tag-empty {
  color: #b0b6c5;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #a7afbd;
  border-top: 1px solid var(--border);
  padding: 18px 5px 0;
  margin-top: 12px;
}
.sidebar-note .mono {
  margin-right: auto;
  font-size: 8px;
}
.main-area {
  margin-right: var(--sidebar);
}
.topbar {
  height: 84px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #a5adbc;
}
.breadcrumb b {
  color: #6a768b;
  font-weight: 500;
}
.breadcrumb-icon {
  color: #99a4b8;
  display: flex;
}
.breadcrumb .slash {
  color: #d1d6e1;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}
.top-divider {
  height: 27px;
  border-right: 1px solid var(--border);
}
.user-menu {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
}
.user-menu > .icon {
  width: 14px;
  height: 14px;
  color: #a3adbf;
}
.user-info {
  text-align: right;
  line-height: 1.6;
}
.user-info b {
  display: block;
  font-size: 11px;
  font-weight: 550;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-info small {
  font-size: 9px;
  color: #a3adbf;
}
.content {
  max-width: 1550px;
  margin: 0 auto;
  padding: 37px 35px 20px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading .eyebrow {
  font-size: 10px;
  color: #a3aabc;
}
.page-heading h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
  line-height: 1.6;
  margin: 4px 0;
  font-weight: 750;
}
.heading-dot {
  color: var(--primary);
  padding-right: 2px;
}
.page-heading p {
  color: #9aa3b6;
  font-size: 11px;
  margin: 6px 0 0;
}
.heading-actions {
  display: flex;
  gap: 9px;
}
.heading-actions .button {
  font-size: 11px;
  padding: 9px 13px;
}
.heading-actions .icon {
  width: 17px;
  height: 17px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 13px;
  padding: 20px;
  display: flex;
  align-items: center;
  text-align: right;
  gap: 14px;
  position: relative;
  min-height: 118px;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-card strong {
  display: block;
  font-size: 25px;
  line-height: 1.55;
  font-weight: 650;
  margin-top: 3px;
}
.stat-label {
  font-size: 10px;
  color: #9aa4b8;
  white-space: nowrap;
}
.stat-caption {
  position: absolute;
  left: 16px;
  bottom: 13px;
  color: #b4bccb;
  font-size: 8px;
}
.contacts-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px #2c375c02;
}
.panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  min-height: 78px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  flex: 1;
  max-width: 460px;
  color: #a1abbd;
}
.search-field .icon {
  width: 18px;
  height: 18px;
}
.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  outline: none !important;
  padding: 8px 0;
}
.search-field input::placeholder {
  color: #abb3c4;
}
.search-field kbd {
  border: 1px solid var(--border);
  border-radius: 5px;
  white-space: nowrap;
  padding: 2px 5px;
  font:
    9px ui-monospace,
    monospace;
  direction: ltr;
  color: #abb3c4;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #7b879e;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 10px;
  max-width: 180px;
}
.table-wrap {
  overflow-x: auto;
  min-height: 325px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: right;
  table-layout: fixed;
}
th {
  font-weight: 450;
  font-size: 10px;
  color: #9ba6b9;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 15px;
}
td {
  padding: 16px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}
tbody tr:hover {
  background: var(--surface-2);
}
tbody tr.selected {
  background: var(--primary-light);
}
th.check-col,
td.check-col {
  width: 46px;
  padding-right: 22px;
  padding-left: 8px;
}
th.name-col {
  width: 29%;
}
th.company-col {
  width: 21%;
}
th.contact-col {
  width: 24%;
}
th.tags-col {
  width: 17%;
}
th.actions-col {
  width: 90px;
}
input[type='checkbox'] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
  vertical-align: middle;
  margin: 0;
}
.contact-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.contact-identity .avatar {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  font-size: 13px;
}
.contact-name {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.7;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.contact-identity > div {
  min-width: 0;
}
.contact-subtitle {
  font-size: 9px;
  color: #a1aabc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 3px;
}
.company-name {
  color: #738096;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-value {
  direction: ltr;
  display: block;
  text-align: right;
  font-family: Vazirmatn, sans-serif;
  font-size: 11px;
  color: #778399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.7;
}
.contact-value.email {
  font-size: 9px;
  color: #a4adbd;
  margin-top: 4px;
}
.tag {
  display: inline-block;
  border-radius: 5px;
  background: var(--primary-light);
  color: #7b87c7;
  font-size: 9px;
  padding: 3px 7px;
  margin: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.tag.teal {
  background: #edf8f5;
  color: #62a18f;
}
.tag.rose {
  background: #faf0f4;
  color: #bc8da1;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}
.row-actions .icon-button {
  width: 28px;
  height: 28px;
}
.row-actions .icon {
  width: 17px;
  height: 17px;
}
.starred {
  color: #dbaf50 !important;
}
.starred .icon {
  fill: #fff0c7;
}
.panel-footer {
  border-top: 1px solid var(--border);
  padding: 15px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a8b0c0;
  font-size: 10px;
  min-height: 60px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pagination > span {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  min-width: 26px;
  padding: 2px;
  text-align: center;
  border-radius: 5px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  font-size: 9px;
  color: #b2b9c9;
}
.workspace-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.workspace-footer .icon {
  width: 13px;
  height: 13px;
}
.workspace-footer .mono {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 360px;
  padding: 40px 20px;
  text-align: center;
}
.empty-art {
  background: var(--primary-light);
  border: 8px solid var(--surface-2);
  border-radius: 25px;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9be3;
  margin-bottom: 18px;
  transform: rotate(-6deg);
}
.empty-art .icon {
  width: 35px;
  height: 35px;
}
.empty-state h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 6px;
}
.empty-state p {
  color: #a1aabc;
  font-size: 11px;
  margin: 0 0 18px;
  max-width: 330px;
  line-height: 2.2;
}
.empty-state .button {
  font-size: 11px;
}
.empty-state.compact {
  min-height: 180px;
}
.active-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 22px 14px;
  color: var(--primary);
  font-size: 11px;
}
.batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
}
.batch-bar .icon-button {
  margin-right: auto;
}
.list-error,
.inline-error {
  padding: 14px;
  background: #fff0f2;
  color: #c85769;
  border-radius: 9px;
  font-size: 11px;
  margin: 10px 22px;
  line-height: 2;
}
.mobile-only {
  display: none;
}
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: #17243e30;
  backdrop-filter: blur(2px);
  z-index: 39;
}
.detail-panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 410px;
  background: var(--surface);
  z-index: 40;
  box-shadow: 12px 0 60px #16233e15;
  overflow-y: auto;
  animation: slide 0.2s ease-out;
}
@keyframes slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}
.detail-top {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  color: #8d99ad;
  font-size: 11px;
}
.detail-hero {
  padding: 30px 25px 20px;
  text-align: center;
  background: linear-gradient(var(--primary-light), var(--surface) 75%);
}
.detail-hero .avatar {
  margin-bottom: 14px;
}
.detail-hero h2 {
  font-size: 21px;
  margin: 0 0 5px;
  word-break: break-word;
}
.detail-hero p {
  margin: 0;
  color: #93a0b4;
  font-size: 11px;
}
.detail-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.detail-quick .button {
  padding: 8px 13px;
  font-size: 10px;
}
.detail-section {
  padding: 20px 27px;
  border-top: 1px solid var(--border);
}
.detail-section h3 {
  font-size: 10px;
  color: #9aa5b9;
  font-weight: 450;
  margin: 0 0 17px;
}
.detail-field {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  min-width: 0;
}
.detail-field:last-child {
  margin: 0;
}
.detail-field > .icon {
  color: #aab3c4;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.detail-field > div {
  min-width: 0;
  flex: 1;
}
.detail-field small {
  display: block;
  color: #a4adbd;
  font-size: 9px;
  margin-bottom: 3px;
}
.detail-field p,
.detail-field a {
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-field .ltr {
  direction: ltr;
  text-align: right;
}
.detail-field .icon-button .icon {
  width: 14px;
  height: 14px;
}
.detail-foot {
  font-size: 9px;
  color: #a7b0c0;
  padding: 22px 27px;
  line-height: 2;
}
.detail-edit-actions {
  padding: 18px 27px;
  display: flex;
  gap: 9px;
  border-top: 1px solid var(--border);
}
.modal {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 50px);
  box-shadow: 0 25px 120px #16233e26;
  overscroll-behavior: contain;
}
.modal::backdrop {
  background: #16243c55;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 25px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.modal-head h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 650;
}
.modal-head p {
  font-size: 10px;
  color: var(--muted);
  margin: 3px 0 0;
}
.modal-body {
  padding: 22px 25px;
}
.modal-foot {
  padding: 17px 25px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: var(--surface);
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.modal-foot .button {
  font-size: 11px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.form-field.full {
  grid-column: 1/-1;
}
.form-field label {
  font-size: 10px;
  color: #7e8ba1;
}
.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid #e4e8f1;
  border-radius: 8px;
  padding: 9px 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  width: 100%;
  max-width: none;
  min-height: 40px;
}
.form-field textarea {
  resize: vertical;
  min-height: 85px;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #b8bfce;
}
.form-field .ltr {
  direction: ltr;
  text-align: left;
}
.form-field small {
  color: #9aa6b9;
  font-size: 9px;
}
.form-divider {
  margin: 24px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 550;
  color: #8492a8;
  grid-column: 1/-1;
}
.form-divider:after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--border);
  margin-right: 15px;
}
.repeat-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}
.repeat-row input {
  flex: 1;
  min-width: 0;
}
.repeat-row select {
  width: 86px;
  flex-shrink: 0;
  font-size: 10px;
}
.repeat-row .icon-button {
  width: 29px;
}
.form-error {
  color: var(--danger);
  font-size: 11px;
  line-height: 2;
  margin-bottom: 17px;
  padding: 10px 13px;
  background: #fff1f3;
  border-radius: 8px;
}
.notice {
  border: 1px solid #e2e8fb;
  background: var(--primary-light);
  color: #7787bb;
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 11px;
  line-height: 2;
  margin-bottom: 19px;
}
.notice a {
  text-decoration: underline;
}
.import-drop {
  border: 1px dashed #cbd3ed;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  margin: 18px 0;
}
.import-drop .icon {
  color: var(--primary);
  width: 30px;
  height: 30px;
}
.import-drop input {
  font-size: 11px;
  max-width: 100%;
  direction: ltr;
}
.import-drop p {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
}
.import-preview {
  padding: 14px;
  border-radius: 9px;
  border: 1px solid #cceadd;
  background: #f0faf6;
  color: #4e8c76;
  font-size: 11px;
  margin-top: 15px;
}
.import-preview ul {
  margin: 7px 0 0;
  padding-right: 20px;
}
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.mini-row .flex {
  flex: 1;
  min-width: 0;
}
.mini-row b {
  font-size: 11px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.mini-row small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.mini-row select {
  max-width: 135px;
  font-size: 10px;
}
.mini-row .book-dot {
  flex-shrink: 0;
}
.duplicate-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
}
.duplicate-people {
  display: flex;
  gap: 15px;
  margin-bottom: 13px;
}
.duplicate-person {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.duplicate-person b {
  display: block;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.duplicate-person small {
  font-size: 9px;
  color: var(--muted);
}
.duplicate-row > .button {
  font-size: 10px;
}
.audit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 110px;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  align-items: center;
}
.audit-row time {
  color: var(--muted);
  font-size: 9px;
}
.audit-row small {
  font-size: 9px;
  color: #a1adbd;
  display: block;
}
.toast-region {
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 35px #16233e19;
  font-size: 11px;
  animation: toast-in 0.2s ease-out;
}
.toast .icon {
  color: #4ba88c;
  width: 19px;
  height: 19px;
}
.toast.error .icon {
  color: var(--danger);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.no-script {
  position: fixed;
  inset: 0;
  background: var(--surface);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  z-index: 110;
}
.profile-info {
  text-align: center;
  padding: 15px;
}
.profile-info h3 {
  margin-bottom: 4px;
}
.profile-info .mono {
  color: var(--muted);
  font-size: 11px;
}
.profile-info p {
  font-size: 11px;
  color: var(--muted);
}
.dark {
  --bg: #131923;
  --surface: #1a2230;
  --surface-2: #1f2938;
  --text: #e0e6ef;
  --muted: #8998af;
  --border: #2a3548;
  --primary: #8394ff;
  --primary-light: #293452;
  --shadow: 0 10px 35px #0002;
  color-scheme: dark;
}
.dark .button.primary {
  color: #fff;
  background: #5b70df;
}
.dark .form-field input,
.dark .form-field select,
.dark .form-field textarea {
  border-color: var(--border);
}
.dark .stat-card .icon-tile,
.dark .avatar {
  filter: saturate(0.7) brightness(0.8);
}
.dark .login-page {
  background: var(--bg);
}
.dark .login-art {
  filter: brightness(0.85);
}
.dark .notice {
  border-color: #354465;
}
.dark .tag {
  background: #2a3453;
}
.dark .import-preview {
  background: #223c36;
  border-color: #345a4e;
}
.dark .button.danger-ghost,
.dark .form-error {
  background: #482e39;
}
.dark .address-card,
.dark .floating-card {
  background: var(--surface);
}
.dark .art-search {
  background: var(--bg);
  border-color: var(--border);
}
.dark .art-lines span {
  background: var(--border);
}
.dark .orbit {
  border-color: var(--border);
}
.dark .pill {
  border-color: var(--border);
}
@media (min-width: 1700px) {
  :root {
    --sidebar: 270px;
  }
  .sidebar {
    padding: 32px 25px;
  }
  .content {
    padding-top: 45px;
  }
  .stat-card {
    min-height: 132px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 225px;
  }
  .sidebar {
    padding: 25px 15px;
  }
  .content {
    padding: 28px 23px 18px;
  }
  .topbar {
    padding: 0 23px;
  }
  .stats-grid {
    gap: 11px;
  }
  .stat-card {
    padding: 15px;
    gap: 10px;
  }
  .stat-card .icon-tile {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .stat-caption {
    font-size: 7px;
    left: 12px;
    bottom: 10px;
  }
  .panel-toolbar {
    padding: 15px;
    gap: 8px;
  }
  .toolbar-actions {
    gap: 4px;
  }
  .search-field {
    min-width: 150px;
  }
  .search-field kbd {
    display: none;
  }
  th.company-col {
    width: 19%;
  }
  th.name-col {
    width: 30%;
  }
  .contact-identity {
    gap: 8px;
  }
  th,
  td {
    padding: 14px 10px;
  }
  .contact-identity .avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }
  .fc-one {
    right: -20px;
  }
  .fc-two {
    left: -15px;
  }
  .login-art {
    transform: scale(0.9);
  }
  .floating-card .tiny-badge {
    display: none;
  }
}
@media (max-width: 960px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card {
    min-height: 100px;
  }
  .stat-caption {
    bottom: 10px;
  }
  .company-col,
  .company-cell {
    display: none;
  }
  .tags-col,
  .tags-cell {
    display: none;
  }
  th.name-col {
    width: 43%;
  }
  th.contact-col {
    width: 35%;
  }
  .login-main {
    gap: 0;
    grid-template-columns: 1fr 1fr;
  }
  .login-copy h1 {
    font-size: 39px;
  }
  .login-art {
    transform: scale(0.78);
    transform-origin: center;
  }
  .login-features {
    gap: 10px;
    font-size: 9px;
  }
  .login-header {
    padding-top: 25px;
  }
  .heading-actions .button.secondary {
    display: none;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  :root {
    --sidebar: 250px;
  }
  .sidebar {
    transform: translateX(100%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: #15243e44;
    z-index: 29;
    backdrop-filter: blur(2px);
  }
  .main-area {
    margin: 0;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    height: 67px;
    padding: 0 16px;
  }
  .breadcrumb {
    gap: 8px;
    font-size: 10px;
  }
  .breadcrumb-icon {
    display: none;
  }
  .breadcrumb .slash,
  .breadcrumb > span:nth-of-type(2) {
    display: none;
  }
  .top-actions {
    gap: 6px;
  }
  .user-info {
    display: none;
  }
  .user-menu {
    gap: 5px;
  }
  .user-menu > .icon {
    display: none;
  }
  .content {
    padding: 24px 16px 20px;
  }
  .page-heading {
    margin-bottom: 22px;
    gap: 10px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading p {
    font-size: 9px;
    max-width: 240px;
  }
  .heading-actions .button {
    padding: 9px 11px;
    font-size: 10px;
  }
  .heading-actions .icon {
    width: 15px;
    height: 15px;
  }
  .stats-grid {
    gap: 10px;
    margin-bottom: 19px;
  }
  .stat-card {
    padding: 15px;
    min-height: 99px;
  }
  .stat-card strong {
    font-size: 23px;
  }
  .stat-label {
    font-size: 9px;
  }
  .panel-toolbar {
    flex-wrap: wrap;
    padding: 13px 14px;
  }
  .search-field {
    max-width: none;
    flex-basis: 100%;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
  }
  .toolbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }
  .toolbar-actions select:first-child {
    margin-left: auto;
    max-width: 150px;
  }
  .toolbar-actions select {
    font-size: 9px;
  }
  .table-wrap {
    min-height: 300px;
  }
  th.check-col,
  td.check-col {
    padding-right: 13px;
    width: 33px;
  }
  th.name-col {
    width: 47%;
  }
  th.contact-col {
    width: 35%;
  }
  th.actions-col {
    width: 58px;
  }
  td,
  th {
    padding: 13px 7px;
  }
  .contact-identity {
    gap: 9px;
  }
  .contact-identity .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 11px;
  }
  .contact-name {
    font-size: 11px;
  }
  .contact-subtitle {
    font-size: 8px;
  }
  .contact-value {
    font-size: 10px;
  }
  .contact-value.email {
    font-size: 8px;
  }
  .row-actions {
    gap: 0;
  }
  .row-actions .icon-button {
    width: 23px;
  }
  .row-actions .more-action {
    display: none;
  }
  .panel-footer {
    padding: 12px 14px;
    font-size: 9px;
  }
  .workspace-footer {
    font-size: 8px;
    line-height: 1.8;
    gap: 12px;
  }
  .workspace-footer .mono {
    font-size: 7px;
    letter-spacing: 0;
  }
  .detail-panel {
    width: min(410px, 100vw);
  }
  .login-main {
    display: flex;
    flex-direction: column;
    width: 86%;
    padding: 40px 0 25px;
  }
  .login-copy {
    width: 100%;
    max-width: 500px;
  }
  .login-copy h1 {
    font-size: 43px;
  }
  .login-copy > p {
    font-size: 12px;
  }
  .login-art {
    min-height: 380px;
    transform: scale(0.8);
    width: 400px;
    margin: 8px 0 -20px;
  }
  .login-header .eyebrow {
    display: none;
  }
  .login-header {
    width: 86%;
    padding: 25px 0 8px;
  }
  .login-header .brand {
    font-size: 18px;
  }
  .login-footer {
    font-size: 8px;
    gap: 12px;
    line-height: 1.8;
  }
  .login-features {
    margin-top: 25px;
    font-size: 10px;
  }
  .modal {
    max-height: calc(100dvh - 24px);
    width: calc(100vw - 20px);
    border-radius: 14px;
  }
  .modal-head {
    padding: 17px 18px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-foot {
    padding: 14px 18px;
  }
  .form-grid {
    gap: 14px;
  }
  .form-field input,
  .form-field textarea,
  .form-field select {
    font-size: 13px;
  }
  .form-field label {
    font-size: 10px;
  }
  .form-divider {
    margin: 18px 0 8px;
  }
  .batch-bar {
    flex-wrap: wrap;
    padding: 12px;
    font-size: 10px;
    gap: 7px;
  }
  .batch-bar .button {
    font-size: 9px;
  }
  .toast-region {
    bottom: 16px;
    left: 16px;
  }
  .audit-row {
    grid-template-columns: 1fr 1fr;
  }
  .audit-row time {
    grid-column: 1/-1;
  }
  .duplicate-people {
    flex-direction: column;
    gap: 13px;
  }
  .notice {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.export-options {
  margin-top: 20px;
}
.export-options .mini-row {
  color: var(--text);
}
.export-options .mini-row:hover {
  border-color: #ccd5f9;
  background: var(--surface-2);
}
.export-options .mini-row > .icon:last-child {
  margin-right: auto;
  color: var(--muted);
}
.form-field > label.import-drop {
  padding: 25px;
}
.inline-error {
  margin-right: 0;
  margin-left: 0;
}
/* Comfortable Persian reading sizes and secondary-text contrast. */
.nav-item {
  font-size: 13px;
}
.sidebar-section-label {
  font-size: 11px;
  color: #7f8ba0;
}
.contact-name {
  font-size: 13px;
}
.contact-subtitle {
  font-size: 10px;
  color: #8793a8;
}
.company-name {
  font-size: 12px;
}
.contact-value {
  font-size: 12px;
  color: #6f7e97;
}
.contact-value.email {
  font-size: 10px;
  color: #8996ab;
}
.stat-label {
  font-size: 11px;
  color: #7f8ba2;
}
.stat-caption {
  font-size: 9px;
  color: #929eb3;
}
th {
  font-size: 11px;
  color: #8190a6;
}
.search-field input {
  font-size: 12px;
}
.page-heading p {
  color: #8793aa;
  font-size: 12px;
}
.panel-footer {
  font-size: 11px;
  color: #8e9bb0;
}
.tag {
  font-size: 10px;
}
.user-info b {
  font-size: 12px;
}
.user-info small {
  font-size: 10px;
  color: #8c99af;
}
.modal-body p {
  font-size: 12px;
}
.form-field label {
  font-size: 11px;
}
.detail-section h3 {
  font-size: 11px;
  color: #8190a5;
}
.detail-field small {
  font-size: 10px;
  color: #8d9ab0;
}
.detail-field p,
.detail-field a {
  font-size: 13px;
}
.dark .nav-item,
.dark .contact-value,
.dark .contact-subtitle,
.dark .company-name,
.dark .page-heading p {
  color: #a7b4c9;
}
.dark .nav-item.active {
  color: var(--primary);
}
@media (max-width: 760px) {
  .contact-name {
    font-size: 12px;
  }
  .contact-subtitle {
    font-size: 9px;
  }
  .contact-value {
    font-size: 11px;
  }
  .contact-value.email {
    font-size: 9px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .panel-footer {
    font-size: 10px;
  }
  .sidebar-section-label {
    font-size: 11px;
  }
  .nav-item {
    font-size: 13px;
  }
}
@media (max-width: 760px) {
  .login-page {
    overflow-x: clip;
  }
  .login-art {
    width: 100%;
    max-width: 400px;
    transform: scale(0.72);
  }
  .orbit-two {
    width: 480px;
    height: 480px;
  }
  .floating-card {
    max-width: 390px;
  }
  .fc-one {
    right: -7px;
  }
  .fc-two {
    left: -7px;
  }
}
/* 1.1: progressive loading, directory and a data-driven workspace. */
.skeleton {
  display: block;
  background: var(--border);
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  flex-shrink: 0;
  color: transparent;
  pointer-events: none;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  background: linear-gradient(90deg, transparent, #ffffff70, transparent);
  animation: skeleton-shimmer 1.45s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  to {
    transform: translateX(-100%);
  }
}
.dark .skeleton::after {
  background: linear-gradient(90deg, transparent, #ffffff08, transparent);
}
.boot-skeleton {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  direction: rtl;
}
.sk-sidebar {
  background: var(--surface);
  padding: 30px 22px;
  border-left: 1px solid var(--border);
}
.sk-brand {
  height: 41px;
  width: 170px;
  margin-bottom: 35px;
}
.sk-button {
  height: 45px;
  width: 100%;
  margin-bottom: 40px;
}
.sk-nav {
  height: 19px;
  margin: 24px 0;
  width: 85%;
}
.sk-nav:nth-child(2n) {
  width: 65%;
}
.sk-workspace {
  width: 100%;
  min-width: 0;
}
.sk-topbar {
  height: 84px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 35px;
  border-bottom: 1px solid var(--border);
}
.sk-title {
  height: 14px;
  width: 180px;
}
.sk-avatar {
  height: 40px;
  width: 40px;
  border-radius: 13px;
}
.sk-content {
  padding: 45px 35px;
}
.sk-heading {
  height: 30px;
  width: 210px;
  margin-bottom: 15px;
}
.sk-subtitle {
  height: 12px;
  width: 270px;
  margin-bottom: 32px;
}
.sk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 26px;
}
.sk-stat {
  height: 115px;
  border-radius: 13px;
  width: 100%;
}
.sk-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 25px;
}
.sk-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sk-row:last-child {
  border-bottom: 0;
}
.sk-line {
  height: 13px;
  width: 29%;
  max-width: 200px;
}
.sk-short {
  height: 12px;
  width: 10%;
  margin-right: auto;
}
.list-skeleton {
  min-height: 360px;
  padding: 0 9px;
}
.detail-skeleton {
  padding: 35px 27px;
}
.detail-skeleton > .sk-avatar {
  height: 80px;
  width: 80px;
  margin: 0 auto 25px;
  border-radius: 25px;
}
.detail-skeleton > .sk-heading,
.detail-skeleton > .sk-subtitle {
  margin: 0 auto 20px;
  max-width: 100%;
}
.detail-skeleton .sk-row {
  padding: 27px 0;
}
.detail-skeleton .sk-line {
  width: 80%;
}
.panel-skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 25px;
}
.panel-skeleton .sk-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nav-item {
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
.nav-item:active {
  transform: scale(0.985);
}
.new-label {
  font-size: 8px;
  line-height: 1.7;
  background: #eef7f4;
  color: #5d9e89;
  padding: 2px 6px;
  border-radius: 5px;
  margin-right: auto;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: #46ac91;
  border-radius: 50%;
  margin-right: auto;
  box-shadow: 0 0 0 4px #46ac9111;
}
.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #677fc1;
  border: 1px solid #dfe6fb;
  background: var(--primary-light);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 10px;
}
.source-pill .icon {
  width: 14px;
  height: 14px;
}
.overview-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #e0e7fb;
  background: linear-gradient(120deg, var(--surface), var(--primary-light));
  border-radius: 16px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  margin-bottom: 22px;
}
.overview-hero h2 {
  font-size: 23px;
  line-height: 1.9;
  margin: 14px 0 5px;
  letter-spacing: -0.5px;
}
.overview-hero p {
  color: #8c99af;
  font-size: 11px;
  line-height: 2.2;
  margin: 0 0 18px;
  max-width: 460px;
}
.overview-hero .button {
  font-size: 11px;
  padding: 9px 13px;
}
.live-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  align-items: center;
}
.live-metrics > button,
.live-metrics > div {
  border: 1px solid #e4e9f8;
  background: var(--surface);
  text-align: center;
  border-radius: 13px;
  padding: 22px 9px;
  min-width: 0;
}
.live-metrics strong {
  display: block;
  font-size: 29px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.6;
}
.live-metrics span {
  font-size: 10px;
  color: #96a0b6;
  white-space: nowrap;
}
.source-caption {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #97a4b9;
  border-top: 1px solid #dce4f655;
  padding-top: 13px;
  margin-top: -9px;
}
.warning-dot {
  width: 6px;
  height: 6px;
  background: #d9a15a;
  border-radius: 50%;
}
.overview-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 23px;
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 650;
  margin: 2px 0 0;
}
.section-heading .eyebrow {
  font-size: 9px;
}
.section-heading > .icon {
  color: #98a5bc;
}
.section-heading .button {
  font-size: 10px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: none;
  text-align: right;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.recent-item:last-child {
  border: 0;
}
.recent-item > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.recent-item b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 550;
}
.recent-item small {
  font-size: 10px;
  color: #99a5b9;
}
.recent-item time {
  font-size: 9px;
  color: #a2aec1;
  white-space: nowrap;
}
.recent-item > .icon {
  width: 14px;
  height: 14px;
  color: #a7b3c5;
}
.quality-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 17px;
  margin-bottom: 14px;
}
.quality-progress strong {
  font-size: 27px;
  font-weight: 650;
  color: var(--primary);
  grid-row: span 2;
}
.quality-progress span {
  font-size: 10px;
  color: #91a0b7;
}
progress {
  appearance: none;
  width: 100%;
  height: 5px;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}
progress::-webkit-progress-bar {
  background: var(--border);
  border-radius: 10px;
}
progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: 10px;
}
progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: 10px;
}
.quality-links {
  display: flex;
  flex-direction: column;
}
.quality-links button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: right;
  padding: 14px 0;
  font-size: 11px;
  color: #8593aa;
}
.quality-links button > .icon {
  width: 17px;
  height: 17px;
}
.quality-links button > b {
  margin-right: auto;
  font-size: 12px;
  color: var(--text);
}
.quality-links button > .icon:last-child {
  width: 13px;
  height: 13px;
  color: #a4afc1;
}
.week-summary {
  font-size: 10px;
  color: #93a2b8;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 16px;
}
.week-summary .icon {
  width: 15px;
  height: 15px;
}
.book-distribution {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.book-distribution button {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 13px;
  min-width: 0;
}
.book-distribution button > span:nth-child(2) {
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.book-distribution small {
  display: block;
  font-size: 9px;
  color: #9aa8be;
}
.book-distribution strong {
  margin-right: auto;
  font-size: 18px;
}
.data-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #efddb7;
  border-radius: 11px;
  background: #fff9ef;
  color: #b18e55;
  padding: 14px 17px;
  margin-bottom: 22px;
  font-size: 11px;
}
.data-warning .button {
  margin-right: auto;
}
.data-warning > .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.directory-page {
  min-height: 450px;
}
.directory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 17px;
}
.segmented {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 11px;
}
.segmented button {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 9px 14px;
  font-size: 12px;
  color: #97a5bb;
  transition:
    background 0.2s,
    color 0.2s;
}
.segmented .active {
  background: var(--primary-light);
  color: var(--primary);
}
.segmented .icon {
  width: 17px;
  height: 17px;
}
.segmented span {
  font-size: 10px;
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: 5px;
}
.directory-source {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #9aa7bc;
  font-size: 9px;
  margin-bottom: 20px;
}
.directory-filter {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 17px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 11px;
  margin-bottom: 20px;
}
.directory-filter .search-field {
  max-width: none;
}
.directory-filter select {
  max-width: 220px;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.directory-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 21px;
  text-align: right;
  min-width: 0;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}
.directory-card:hover {
  transform: translateY(-3px);
  border-color: #cfdbf8;
  box-shadow: 0 10px 24px #283c6d09;
}
.directory-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  width: 100%;
}
.record-type {
  margin-right: auto;
  font-size: 9px;
  color: #9caac0;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}
.directory-card-head > .icon {
  width: 14px;
  height: 14px;
  color: #b4bed0;
}
.directory-card h3 {
  font-size: 14px;
  line-height: 1.9;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}
.directory-card > p {
  font-size: 10px;
  color: #97a4ba;
  margin: 5px 0 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  min-height: 18px;
}
.directory-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  color: #91a0b6;
  font-size: 10px;
  line-height: 1.8;
}
.directory-card-meta > span {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
}
.directory-card-meta .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.directory-card-contact {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
  width: 100%;
}
.directory-card-contact > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  min-width: 0;
  color: #8d9db5;
}
.directory-card-contact .icon {
  width: 14px;
  height: 14px;
}
.directory-card-contact b {
  font-weight: 400;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.directory-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #91a0b6;
  padding: 20px 0;
}
.page-error {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 60px 25px;
  min-height: 330px;
}
.page-error > .icon {
  width: 35px;
  height: 35px;
  color: #d2a16a;
  margin-bottom: 12px;
}
.page-error h2 {
  font-size: 17px;
  margin: 10px 0;
}
.page-error p {
  color: #93a0b7;
  font-size: 12px;
  line-height: 2;
}
.page-error .button {
  margin-top: 12px;
  font-size: 11px;
}
.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  padding: 20px;
}
.saved-contact-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
  min-width: 0;
  cursor: pointer;
  transition:
    box-shadow 0.18s,
    border-color 0.18s;
}
.saved-contact-card:hover {
  box-shadow: var(--shadow);
  border-color: #d1dcf7;
}
.saved-card-top {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 14px;
}
.saved-card-top .icon-button {
  margin-right: auto;
}
.saved-card-title {
  border: 0;
  background: transparent;
  font-weight: 650;
  font-size: 13px;
  text-align: right;
  padding: 0;
  overflow-wrap: anywhere;
}
.saved-contact-card > p {
  font-size: 10px;
  color: #99a7bd;
  margin: 4px 0 17px;
  min-height: 18px;
}
.saved-card-tags {
  margin-top: 12px;
  min-height: 22px;
}
.saved-contact-card.selected {
  background: var(--primary-light);
  border-color: #cad6fc;
}
.card-layout {
  min-height: 330px;
}
.directory-filter .search-field input {
  min-width: 0;
}
.connection-banner {
  border-bottom: 1px solid #efddb7;
  background: #fff7e8;
  color: #b38b4d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 11px;
}
.connection-banner .icon {
  width: 15px;
  height: 15px;
}
.dark .overview-hero {
  border-color: var(--border);
  background: linear-gradient(110deg, var(--surface), #242f4c);
}
.dark .source-pill {
  border-color: #3b4d73;
  color: #9aafe3;
}
.dark .live-metrics > button,
.dark .live-metrics > div {
  border-color: var(--border);
}
.dark .new-label {
  background: #244a40;
  color: #85c6b2;
}
.dark .data-warning,
.dark .connection-banner {
  background: #3f3525;
  border-color: #655130;
  color: #c9ac7a;
}
.dark .directory-card:hover {
  border-color: #5167a0;
}
.detail-hero .source-pill {
  margin-top: 14px;
}
.detail-quick .button {
  white-space: nowrap;
}
.content {
  min-width: 0;
}
.sidebar-bottom .nav-item {
  font-size: 12px;
}
@media (max-width: 1200px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-hero {
    grid-template-columns: 1fr;
    padding: 25px;
    gap: 18px;
  }
  .live-metrics {
    max-width: 500px;
  }
  .live-metrics > button,
  .live-metrics > div {
    padding: 14px 10px;
  }
  .overview-columns {
    grid-template-columns: 1fr 1fr;
  }
  .panel-toolbar {
    flex-wrap: wrap;
  }
  .toolbar-actions {
    flex-wrap: wrap;
  }
  .search-field {
    max-width: none;
  }
  .contact-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .overview-columns {
    grid-template-columns: 1fr;
  }
  .book-distribution {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sk-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .directory-filter {
    flex-wrap: wrap;
  }
  .directory-filter .search-field {
    width: 100%;
    flex-basis: 100%;
  }
  .directory-filter select {
    flex: 1;
    max-width: none;
  }
  .sk-line {
    width: 35%;
  }
  .sk-short {
    display: none;
  }
}
@media (max-width: 760px) {
  .boot-skeleton {
    grid-template-columns: 1fr;
  }
  .sk-sidebar {
    display: none;
  }
  .sk-topbar {
    height: 67px;
    padding: 0 17px;
  }
  .sk-content {
    padding: 30px 16px;
  }
  .sk-heading {
    width: 180px;
    height: 26px;
  }
  .sk-subtitle {
    width: 240px;
  }
  .sk-stat {
    height: 99px;
  }
  .sk-table {
    padding: 12px;
  }
  .sk-row {
    gap: 16px;
    padding: 22px 7px;
  }
  .sk-stats {
    gap: 10px;
  }
  .panel-skeleton {
    padding: 16px;
  }
  .panel-skeleton .sk-stats {
    gap: 9px;
  }
  .panel-skeleton .sk-stat {
    height: 87px;
  }
  .overview-hero {
    padding: 22px 18px;
    margin-bottom: 16px;
  }
  .overview-hero h2 {
    font-size: 20px;
  }
  .overview-hero p {
    font-size: 10px;
  }
  .live-metrics {
    gap: 8px;
  }
  .live-metrics strong {
    font-size: 25px;
  }
  .live-metrics span {
    font-size: 9px;
  }
  .live-metrics > button,
  .live-metrics > div {
    padding: 14px 5px;
  }
  .source-caption {
    font-size: 8px;
    line-height: 1.8;
  }
  .dashboard-card {
    padding: 18px;
  }
  .overview-columns {
    gap: 16px;
    margin-bottom: 16px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .book-distribution {
    grid-template-columns: 1fr;
  }
  .directory-toolbar {
    gap: 9px;
  }
  .directory-toolbar > .button {
    font-size: 9px;
    padding: 8px;
  }
  .segmented {
    gap: 2px;
    padding: 4px;
  }
  .segmented button {
    font-size: 10px;
    padding: 8px 10px;
    gap: 6px;
  }
  .segmented span {
    font-size: 9px;
    padding: 1px 5px;
  }
  .directory-source {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    font-size: 9px;
  }
  .directory-source .source-pill {
    font-size: 9px;
  }
  .directory-grid {
    gap: 12px;
    grid-template-columns: 1fr;
  }
  .directory-card {
    padding: 19px;
  }
  .directory-card h3 {
    font-size: 15px;
  }
  .directory-card-contact {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .directory-card > p {
    min-height: 0;
  }
  .directory-filter {
    padding: 10px 13px;
    margin-bottom: 15px;
  }
  .directory-filter .search-field {
    min-width: 0;
    flex-basis: 100%;
  }
  .directory-footer {
    font-size: 9px;
    gap: 10px;
  }
  .contact-card-grid {
    padding: 13px;
    gap: 12px;
    grid-template-columns: 1fr;
  }
  .saved-contact-card .contact-value {
    font-size: 12px;
  }
  .saved-card-tags {
    margin-top: 9px;
  }
  .toolbar-actions select {
    max-width: 140px;
  }
  .toolbar-actions #book-filter {
    max-width: 145px;
    margin-left: 0;
  }
  .toolbar-actions #quality-filter {
    max-width: 120px;
  }
  .toolbar-actions .icon-button {
    width: 30px;
  }
  .data-warning {
    align-items: flex-start;
    flex-wrap: wrap;
    line-height: 1.9;
    padding: 13px;
  }
  .data-warning .button {
    margin-right: 25px;
  }
  .connection-banner {
    font-size: 10px;
  }
  .quality-progress strong {
    font-size: 25px;
  }
  .source-pill {
    line-height: 1.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
  .directory-card:hover {
    transform: none;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}
