.workspace-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.topbar-actions,
.actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#top-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.sidebar-note {
  margin-top: auto;
  padding: 40px 14px 0;
  color: #9a9da4;
  font-size: 12px;
  line-height: 1.8;
}
.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 24px;
}
.wb-panel {
  padding: 26px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.wb-panel h2 {
  font-size: 18px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head a {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat {
  border: 1px solid var(--line);
  padding: 18px 22px;
  border-radius: 12px;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -0.05em;
}
.next-interview {
  position: relative;
  overflow: hidden;
  border: 1px solid #eee1bb;
  background: #fffbef;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 24px;
}
.next-interview .eyebrow {
  color: #8b7437;
}
.next-interview h2 {
  margin: 10px 0;
  font-size: 27px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.next-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  color: #77715f;
  font-size: 13px;
  margin-bottom: 24px;
}
.next-interview .actions {
  margin-top: 20px;
}
.check-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #867956;
}
.progress {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  overflow: hidden;
  background: #f0e5c6;
}
progress {
  width: 100%;
  height: 5px;
  accent-color: #b59648;
  appearance: none;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #eee5cb;
}
progress::-webkit-progress-value {
  background: #b59648;
}
progress::-moz-progress-bar {
  background: #b59648;
}
.list-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.list-title {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 6px;
}
.list-title h3 {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.list-item .muted {
  font-size: 12px;
}
.badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 5px;
  padding: 3px 7px;
}
.badge.good {
  background: #f1f7f2;
  border-color: #dfeade;
  color: #52715b;
}
.badge.warm {
  background: var(--accent-soft);
  border-color: #eee4c6;
  color: #87703c;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.entry-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.entry-card h2 {
  font-size: 19px;
  overflow-wrap: anywhere;
}
.entry-card .row-actions {
  margin-top: 20px;
}
.entry-meta {
  color: var(--muted);
  font-size: 12px;
  margin: 9px 0 15px;
  overflow-wrap: anywhere;
}
.entry-excerpt {
  white-space: pre-wrap;
  color: #727886;
  font-size: 13px;
  line-height: 1.8;
  max-height: 72px;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.quick-links a {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
}
.quick-links a:hover {
  border-color: #d5c28a;
  background: #fffcf3;
}
.small-button {
  padding: 7px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  font-size: 12px;
}
.small-button:hover {
  background: var(--subtle);
}
.small-button.danger {
  color: var(--danger);
}
.search-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.search-toolbar input {
  max-width: 340px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 12px;
}
.empty-state {
  text-align: center;
  padding: 54px 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}
.empty-state h2 {
  color: var(--ink);
  font-size: 19px;
  margin-bottom: 10px;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 20px;
}
.work-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 18px;
  color: var(--ink);
}
.work-dialog::backdrop {
  background: #22263155;
}
.dialog-top {
  padding: 24px 28px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-top h2 {
  font-size: 21px;
}
.dialog-body {
  padding: 24px 28px;
  overflow-wrap: anywhere;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.form-grid label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: end;
  margin-top: 24px;
}
.dialog-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 16px;
}
.checklist {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.checklist label {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: #aa8d47;
}
.check-edit {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 30px;
  gap: 9px;
  align-items: center;
}
.check-edit input[type='checkbox'] {
  margin: 0;
}
.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.85;
}
.detail-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.detail-section h3 {
  font-size: 14px;
  margin-bottom: 12px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}
.data-table th {
  font-weight: 500;
  color: var(--muted);
  background: #fafafa;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.table-scroll {
  overflow-x: auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stack {
  display: grid;
  gap: 24px;
}
.stack > * {
  min-width: 0;
}
.check-progress > span {
  white-space: nowrap;
}
.check-progress > progress {
  width: 0;
  min-width: 0;
  flex: 1;
}
.chart {
  display: flex;
  align-items: end;
  height: 100px;
  gap: 5px;
  margin: 24px 0 10px;
  border-bottom: 1px solid var(--line);
}
.chart-day {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: end;
  height: 100%;
}
.chart-day progress {
  height: 100%;
  width: 100%;
}
.chart-bar {
  background: #dfca89;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.usage-legend {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.package {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.checksum {
  font: 11px monospace;
  overflow-wrap: anywhere;
  color: var(--muted);
  width: 100%;
}
.security-account {
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  flex-shrink: 0;
  font-size: 21px;
}
.security-account h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.security-account .actions {
  margin-left: auto;
}
.security-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
.note {
  padding: 14px 18px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  .wb-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 820px) {
  .sidebar-note {
    display: none;
  }
  .portal-content {
    padding-top: 26px;
  }
  .portal-nav {
    scrollbar-width: none;
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 15px 18px;
  }
  .next-interview {
    padding: 24px;
  }
  .next-interview h2 {
    font-size: 23px;
  }
  .quick-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .quick-links a {
    padding: 12px 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .work-dialog {
    width: calc(100vw - 20px);
  }
  .dialog-body,
  .dialog-top {
    padding: 20px;
  }
  .security-account {
    flex-wrap: wrap;
  }
  .security-account .actions {
    width: 100%;
    margin-left: 0;
  }
  #top-user {
    display: none;
  }
  .wb-panel {
    padding: 22px;
  }
  .portal-content .page-heading {
    align-items: start;
    gap: 12px;
  }
  .portal-content .page-heading h1 {
    font-size: 24px;
  }
  .page-heading .actions .button {
    padding: 9px 11px;
    font-size: 12px;
  }
  .search-toolbar {
    flex-wrap: wrap;
  }
}
