:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #687582;
  --line: #dce3ea;
  --accent: #176b87;
  --accent-dark: #0f5066;
  --warn: #a85f00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.watermark-layer {
  position: fixed;
  inset: -80px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  grid-auto-rows: 180px;
  gap: 26px 54px;
  align-items: center;
  justify-items: center;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.04;
  color: #0f5066;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.watermark-layer span {
  display: block;
  white-space: nowrap;
  transform: rotate(-24deg);
  user-select: none;
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background: #f4f7f9;
}

.auth-panel {
  width: min(480px, 100%);
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(24, 38, 50, 0.10);
}

.auth-panel h1 {
  font-size: 24px;
  line-height: 1.25;
}

.auth-panel p {
  color: var(--muted);
  margin-top: 7px;
}

.auth-actions button,
.logout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
}

#authForm {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.agreement {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #465563;
  line-height: 1.4;
}

.agreement input {
  width: auto;
  margin: 0;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agreement-detail {
  margin-top: -8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.agreement-detail summary {
  cursor: pointer;
  width: fit-content;
}

.agreement-detail p {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #5c6975;
}

.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}

.auth-actions .primary {
  display: inline-flex;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 24px 18px;
  background: #182632;
  color: #fff;
}

.brand {
  margin-bottom: 28px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.35;
}

.brand small {
  color: #b9c3cc;
  margin-top: 3px;
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  color: #d2dbe3;
  padding: 11px 12px;
  text-decoration: none;
  border-radius: 8px;
}

nav a.active,
nav a:hover {
  background: #263947;
  color: #fff;
}

.mobile-nav {
  display: none;
}

.logout {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 20px;
  color: #d2dbe3;
  background: #223442;
  border-color: #2d4657;
}

.admin-only {
  display: none;
}

.is-admin .admin-only {
  display: block;
}

.is-admin .admin-only.hidden {
  display: none !important;
}

.is-admin .import-note.admin-only {
  display: grid;
}

.is-admin .import-note.admin-only.hidden {
  display: none !important;
}

.user-management.admin-only {
  display: none;
}

.is-admin .user-management.admin-only {
  display: grid;
}

.is-admin .user-management.admin-only.hidden {
  display: none !important;
}

.log-center.admin-only {
  display: none;
}

.is-admin .log-center.admin-only {
  display: grid;
}

.is-admin .log-center.admin-only.hidden {
  display: none !important;
}

.admin-filter {
  display: none;
}

.is-admin .admin-filter {
  display: grid;
}

.admin-table-cell {
  display: none;
}

.is-admin .admin-table-cell {
  display: table-cell;
}

main {
  margin-left: 236px;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

.topbar p {
  color: var(--muted);
  margin-top: 8px;
}

.primary,
.pager button,
.small {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.primary:hover,
.pager button:hover,
.small:hover {
  background: var(--accent-dark);
}

.danger {
  border: 0;
  border-radius: 8px;
  background: #9f2f2f;
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.danger:hover {
  background: #812323;
}

.small {
  padding: 7px 11px;
  font-size: 13px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stats div,
.filters,
.table-wrap,
.import-note,
.user-management,
.log-center {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats div {
  padding: 16px;
}

.stats span {
  display: block;
  font-size: 24px;
  font-weight: 800;
}

.stats small,
label,
.import-note p {
  color: var(--muted);
}

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

input,
select,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.upload-row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-row input {
  flex: 1 1 260px;
}

.upload-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
}

.resource-library {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.resource-search {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.resource-search button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.resource-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.log-center {
  padding: 16px;
}

.log-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.log-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.log-stats span {
  display: block;
  font-size: 21px;
  font-weight: 800;
}

.log-stats small {
  color: var(--muted);
}

.log-search {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.log-search button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.log-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.log-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.log-main strong,
.log-main span,
.log-meta span {
  display: block;
}

.log-main span,
.log-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.log-main p {
  margin-top: 8px;
  color: #344450;
  line-height: 1.55;
  word-break: break-word;
}

.log-meta {
  min-width: 0;
  word-break: break-word;
}

.resource-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.resource-item strong,
.resource-item span {
  display: block;
}

.resource-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.resource-item p {
  margin-top: 8px;
  color: #344450;
  line-height: 1.55;
  word-break: break-word;
}

.resource-code {
  font-weight: 700;
}

.resource-link {
  text-decoration: none;
}

.table-wrap {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll-top {
  height: 30px;
  padding: 6px 10px;
  background: #f7fafc;
  border-bottom: 1px solid var(--line);
  scrollbar-color: var(--accent) #d7e2ea;
  scrollbar-width: auto;
}

.table-scroll-top > div {
  height: 1px;
}

.table-scroll-top::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  height: 13px;
}

.table-scroll-top::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track {
  background: #d7e2ea;
  border-radius: 999px;
}

.table-scroll-top::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.table-scroll-top::-webkit-scrollbar-thumb:hover,
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

.table-scroll-control {
  display: none;
  padding: 8px 12px;
  background: #f7fafc;
  border-bottom: 1px solid var(--line);
}

.table-scroll-control input {
  width: 100%;
  padding: 0;
  accent-color: var(--accent);
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.table-foot {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.last-update-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pager button {
  padding: 8px 12px;
}

.page-jump {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  white-space: nowrap;
}

.page-jump input {
  width: 76px;
  padding: 8px 9px;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #eef3f7;
  color: #43505c;
  font-size: 13px;
}

td a {
  color: var(--accent);
  word-break: break-all;
}

.link-hint {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #edf7f5;
  color: #126154;
  padding: 3px 9px;
  font-size: 13px;
  font-weight: 700;
}

.muted-link {
  color: var(--muted);
}

.company-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(23, 107, 135, 0.22);
  border-radius: 6px;
  background: rgba(232, 243, 247, 0.72);
  color: var(--accent);
  cursor: pointer;
  padding: 3px 7px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.company-link:hover {
  border-color: rgba(23, 107, 135, 0.45);
  background: #e8f3f7;
  color: var(--accent-dark);
}

.company-link span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-link-icon {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 15px;
  line-height: 1;
}

.job-title {
  max-width: 360px;
  line-height: 1.45;
}

.city-cell {
  min-width: 130px;
  max-width: 190px;
}

.table-subtitle {
  display: -webkit-box;
  max-width: 260px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.expandable-text {
  display: grid;
  gap: 6px;
}

.expandable-content {
  display: block;
  line-height: 1.55;
  word-break: break-word;
}

.expandable-text:not(.expanded) .expandable-content {
  display: -webkit-box;
  max-height: 88px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.compact-list-text:not(.expanded) .expandable-content {
  display: block;
  max-height: none;
  overflow: visible;
}

.compact-list-text .list-full {
  display: none;
}

.compact-list-text.expanded .list-preview {
  display: none;
}

.compact-list-text.expanded .list-full {
  display: inline;
}

.apply-method {
  display: block;
  margin-top: 6px;
}

.inline-expand {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.inline-expand:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.muted {
  color: var(--muted);
}

.deadline-soon {
  color: var(--warn);
  font-weight: 700;
}

.empty {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.import-note,
.user-management {
  margin-top: 14px;
  padding: 16px;
  display: grid;
  gap: 18px;
}

.import-note p,
.user-management p {
  margin-top: 8px;
}

.admin-section + .admin-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
}

.section-head button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  cursor: pointer;
}

.pending-list {
  display: grid;
  gap: 10px;
}

.user-toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.status-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.status-filter.active {
  border-color: var(--accent);
  background: #e8f3f7;
  color: var(--accent-dark);
  font-weight: 700;
}

.pending-user {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.pending-user strong,
.pending-user span {
  display: block;
}

.pending-user span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pending-user .login-meta {
  color: #475569;
}

.user-actions {
  display: flex;
  gap: 8px;
}

.empty-inline {
  padding: 12px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 32, 0.48);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(11, 24, 35, 0.28);
}

.job-modal {
  width: min(920px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.modal-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.modal-body {
  overflow: auto;
  padding: 18px 20px;
}

.modal-actions {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.legal-text {
  color: #344450;
  line-height: 1.7;
}

.legal-text h3 {
  margin: 14px 0 6px;
  font-size: 16px;
}

.legal-text h3:first-child {
  margin-top: 0;
}

.legal-text p {
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.company-detail-layout {
  display: grid;
  gap: 16px;
}

.detail-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.detail-section {
  margin-top: 16px;
}

.company-detail-layout .detail-section {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.company-detail-layout .detail-section-first {
  padding-top: 0;
  border-top: 0;
}

.detail-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.detail-section p {
  color: #344450;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.simple-detail {
  margin-top: 0;
}

.simple-detail p {
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-list > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.link-list span,
.link-list small {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.link-list a {
  color: var(--accent);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: none;
  max-width: 380px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #182632;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

@media (max-width: 980px) {
  .watermark-layer {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: 150px;
    gap: 22px 32px;
    opacity: 0.035;
    font-size: 10px;
  }

  .sidebar {
    display: none;
  }

  main {
    margin-left: 0;
    padding: 18px;
  }

  .mobile-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 9px 12px;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-nav a.active {
    border-color: var(--accent);
    background: #e8f3f7;
    color: var(--accent-dark);
    font-weight: 700;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
  }

  .filters .wide,
  .filters .filter-submit,
  .filters .admin-filter {
    grid-column: 1 / -1;
  }

  .filters label {
    min-width: 0;
    gap: 5px;
    font-size: 12px;
  }

  .filters input,
  .filters select {
    min-height: 38px;
    padding: 8px 8px;
    font-size: 13px;
  }

  .filters .filter-submit {
    min-height: 42px;
    margin-top: 2px;
  }

  .table-scroll-control {
    display: block;
  }

  .table-head,
  .pending-user,
  .resource-item,
  .resource-search {
    align-items: stretch;
    flex-direction: column;
  }

  .table-head .pager,
  .table-foot .pager {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .table-foot {
    justify-content: stretch;
  }

  .table-foot .pager {
    width: 100%;
  }

  .last-update-text {
    flex-basis: 100%;
  }

  .page-jump {
    flex: 1 1 128px;
  }

  .page-jump input {
    flex: 1 1 auto;
    width: 72px;
  }

  .detail-grid,
  .detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
  }
}

/* iOS-style final preview overrides */
:root {
  --bg: #eef4fb;
  --panel: rgba(255, 255, 255, 0.72);
  --ink: #16202a;
  --muted: #687484;
  --line: rgba(120, 146, 171, 0.26);
  --accent: #0a84ff;
  --accent-dark: #0066cc;
  --warn: #c56a08;
  --glass: rgba(255, 255, 255, 0.68);
  --shadow-card: 0 10px 32px rgba(37, 75, 110, 0.10);
}

html {
  min-height: 100%;
  background: #eef4fb;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(118, 189, 255, 0.32), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(129, 220, 201, 0.24), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #edf5fb 45%, #f5f7fb 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56), transparent 68%);
}

.auth-screen {
  background:
    radial-gradient(circle at 26% 16%, rgba(10, 132, 255, 0.20), transparent 34%),
    radial-gradient(circle at 76% 24%, rgba(48, 209, 88, 0.14), transparent 28%),
    linear-gradient(145deg, #f8fbff, #edf5fb);
}

.auth-panel,
.stats div,
.filters,
.table-wrap,
.import-note,
.user-management,
.resource-library,
.resource-item,
.pending-user,
.modal-panel,
.link-list > div,
.detail-item {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.auth-panel,
.stats div,
.filters,
.table-wrap,
.import-note,
.user-management,
.resource-library {
  border-radius: 22px;
}

.auth-panel {
  padding: 34px;
}

.auth-panel h1,
h1 {
  letter-spacing: 0;
  font-weight: 800;
}

.auth-actions button,
.logout,
.primary,
.pager button,
.small,
.danger,
.upload-row button,
.resource-search button,
.section-head button,
.status-filter,
.icon-button,
input,
select,
textarea {
  border-radius: 14px;
}

input,
select,
textarea {
  border-color: rgba(116, 143, 170, 0.24);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 132, 255, 0.52);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.primary,
.pager button,
.small,
#loginButton {
  background: linear-gradient(180deg, #35a2ff, #0a84ff);
  border-color: rgba(10, 132, 255, 0.25);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.22);
}

.primary:hover,
.pager button:hover,
.small:hover,
#loginButton:hover {
  background: linear-gradient(180deg, #1d94ff, #006fdc);
}

.danger {
  background: linear-gradient(180deg, #ff6868, #d83b3b);
}

.sidebar {
  width: 248px;
  padding: 18px 16px;
  background:
    linear-gradient(180deg, rgba(238, 247, 252, 0.82), rgba(221, 238, 248, 0.70)),
    rgba(230, 243, 250, 0.76);
  border-right: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: 16px 0 40px rgba(37, 75, 110, 0.08);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  color: #233747;
}

.brand {
  padding: 12px 10px;
  margin-bottom: 20px;
}

.brand strong {
  font-size: 17px;
}

nav a {
  border-radius: 14px;
  color: #486274;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

nav a.active,
nav a:hover {
  background: rgba(10, 132, 255, 0.12);
  color: #006fdc;
  transform: translateX(2px);
}

.logout {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(120, 146, 171, 0.22);
  color: #486274;
}

main {
  margin-left: 248px;
  padding: 28px clamp(20px, 3vw, 42px);
}

.topbar {
  min-height: 62px;
  padding: 2px 0 8px;
}

.topbar h1 {
  font-size: clamp(27px, 2.4vw, 36px);
}

.topbar p {
  color: #657386;
}

.stats {
  gap: 14px;
  margin-bottom: 16px;
}

.stats div {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.stats div::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.09);
}

.stats span {
  font-size: 25px;
  font-weight: 850;
}

.filters {
  padding: 16px;
  gap: 12px;
}

.resource-library {
  margin-top: 12px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
}

.resource-item,
.pending-user {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.table-head {
  padding: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.table-foot {
  background: rgba(255, 255, 255, 0.42);
}

.table-scroll-top,
.table-scroll-control {
  background: rgba(247, 251, 255, 0.54);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: rgba(242, 248, 253, 0.86);
  color: #526170;
  font-weight: 800;
}

td {
  background: rgba(255, 255, 255, 0.28);
}

tbody tr:hover td {
  background: rgba(226, 241, 255, 0.48);
}

.company-link {
  border: 1px solid rgba(10, 132, 255, 0.20);
  border-radius: 12px;
  background: rgba(236, 247, 255, 0.84);
  color: #006fdc;
  padding: 5px 9px;
}

.company-link:hover {
  border-color: rgba(10, 132, 255, 0.42);
  background: rgba(225, 242, 255, 0.96);
}

.link-hint {
  background: rgba(235, 250, 244, 0.90);
  color: #12805c;
}

.status-filter {
  background: rgba(255, 255, 255, 0.58);
}

.status-filter.active {
  border-color: rgba(10, 132, 255, 0.34);
  background: rgba(226, 242, 255, 0.92);
  color: #006fdc;
}

.modal {
  background: rgba(23, 36, 50, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-panel {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
}

.modal-head,
.modal-actions {
  background: rgba(255, 255, 255, 0.42);
}

.detail-item,
.link-list > div,
.empty-inline {
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.70);
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(22, 32, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.countdown-page {
  display: grid;
  gap: 14px;
}

.countdown-hero,
.countdown-metrics > button,
.countdown-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.countdown-hero {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 100% 0%, rgba(10, 132, 255, 0.13), transparent 34%);
}

.countdown-hero::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.08);
}

.countdown-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.countdown-head strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.2;
}

.countdown-head p {
  margin-top: 4px;
  color: var(--muted);
}

.countdown-eyebrow,
.countdown-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #006fdc;
  background: rgba(10, 132, 255, 0.12);
  font-weight: 800;
  white-space: nowrap;
}

.countdown-eyebrow {
  padding: 4px 9px;
}

.countdown-pill {
  padding: 5px 10px;
}

.countdown-node {
  min-width: 156px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.countdown-node span,
.countdown-time span,
.countdown-metrics span {
  display: block;
  color: var(--muted);
}

.countdown-node strong {
  display: block;
  margin-top: 3px;
  color: #2176d2;
  font-size: 14px;
}

.countdown-time-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown-time {
  min-width: 0;
  padding: 12px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.countdown-time strong {
  display: block;
  font-size: clamp(26px, 4.6vw, 48px);
  line-height: 1;
}

.countdown-time span {
  margin-top: 6px;
}

.countdown-blue strong,
.metric-blue strong {
  color: #2176d2;
}

.countdown-orange strong,
.metric-orange strong {
  color: #c85b12;
}

.countdown-green strong,
.metric-green strong {
  color: #34a866;
}

.countdown-red strong {
  color: #d65a5a;
}

.metric-ink strong {
  color: #1f2933;
}

.countdown-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.countdown-metrics > button {
  min-height: 92px;
  padding: 17px 18px 15px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    var(--glass);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.countdown-time:hover,
.countdown-metrics > button:hover,
.word-cloud button:hover {
  border-color: rgba(10, 132, 255, 0.40);
  background: rgba(236, 247, 255, 0.92);
}

.countdown-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
}

.countdown-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.countdown-panel {
  padding: 18px;
  border-radius: 22px;
}

.word-cloud {
  display: flex;
  min-height: 206px;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 5px 10px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
  text-align: center;
}

.word-cloud button,
.word-cloud span {
  display: inline-block;
  border: 0;
  background: transparent;
  color: var(--c, #2176d2);
  font-size: clamp(13px, calc(9px + var(--s, 1) * 0.56vw), 38px);
  font-weight: 800;
  line-height: 1;
  transform: translateY(var(--y, 0));
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.word-cloud button {
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 8px;
}

@media (max-width: 980px) {
  body {
    background:
      radial-gradient(circle at 10% 0%, rgba(10, 132, 255, 0.18), transparent 34%),
      linear-gradient(145deg, #f6fbff, #edf4fb);
  }

  main {
    padding: 14px;
    margin-left: 0;
  }

  .mobile-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: -2px -2px 14px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.70);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.70);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
  }

  .mobile-nav a {
    border: 0;
    border-radius: 13px;
    background: transparent;
    padding: 9px 12px;
  }

  .mobile-nav a.active {
    background: rgba(10, 132, 255, 0.13);
    color: #006fdc;
  }

  .topbar {
    padding: 8px 2px 6px;
  }

  .stats div,
  .filters,
  .table-wrap,
  .resource-library,
  .import-note,
  .user-management,
  .log-center {
    border-radius: 20px;
  }

  .filters {
    padding: 12px;
  }

  .log-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-search,
  .log-item {
    grid-template-columns: 1fr;
  }

  .log-search {
    display: grid;
  }

  .auth-panel {
    border-radius: 24px;
    padding: 26px;
  }

  .countdown-head {
    display: grid;
  }

  .countdown-time-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .countdown-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .countdown-time-grid,
  .countdown-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
