/* Authenticated workspace: sidebar + main (Crossref-style) */

#app.app--workspace .header {
  border-bottom: 1px solid var(--border-2);
  background: var(--panel);
}

#app.app--workspace .header-container {
  max-width: 100%;
}

#app.app--workspace #user-info {
  display: none;
}

/* Sidebar footer links duplicate the workspace header — keep user block only */
#app.app--workspace .dash-nav--footer {
  display: none;
}

#app.app--workspace .header .nav-link--muted {
  display: none;
}

#app.app--workspace .header .nav {
  justify-content: flex-end;
  min-height: 44px;
}

.auth-shell {
  display: none;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

.dash-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
}

.dash-sidebar-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent);
  padding: 8px 10px 14px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dash-sidebar-toggle {
  border: 1px solid var(--border-2);
  background: var(--panel);
  color: var(--muted);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dash-sidebar-toggle:hover {
  color: var(--accent);
  border-color: rgba(31, 95, 168, 0.35);
}

.dash-sidebar-search {
  padding: 0 10px 12px;
}

.dash-sidebar-search-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.dash-sidebar-search-input:focus {
  outline: none;
  border-color: rgba(31, 95, 168, 0.35);
  box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.12);
}

.dash-sidebar-search-input::placeholder {
  color: var(--muted);
}

/* Collapsed sidebar */
.auth-shell.is-sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.auth-shell.is-sidebar-collapsed .dash-sidebar {
  padding: 14px 10px;
}

.auth-shell.is-sidebar-collapsed .dash-brand-text,
.auth-shell.is-sidebar-collapsed .dash-sidebar-head,
.auth-shell.is-sidebar-collapsed .dash-sidebar-search,
.auth-shell.is-sidebar-collapsed .dash-acc-trigger-label,
.auth-shell.is-sidebar-collapsed .dash-acc-panel,
.auth-shell.is-sidebar-collapsed .dash-nav-item span,
.auth-shell.is-sidebar-collapsed .dash-user-block {
  display: none;
}

.auth-shell.is-sidebar-collapsed .dash-acc-trigger {
  justify-content: center;
}

.auth-shell.is-sidebar-collapsed .dash-acc-icon {
  width: auto;
}

.auth-shell.is-sidebar-collapsed .dash-nav--footer {
  padding-top: 10px;
}

.auth-shell.is-sidebar-collapsed .dash-nav-item {
  justify-content: center;
}

.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;
}
.dash-sidebar-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 10px 10px;
  font-weight: 700;
}

/* Collapsible service sections */
.dash-accordion {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.dash-acc-section {
  border: 1px solid var(--border-2);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--panel);
  overflow: hidden;
}

.dash-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  color: var(--text);
}

.dash-acc-trigger:hover {
  background: var(--panel-2);
}

.dash-acc-section.is-open .dash-acc-trigger {
  background: rgba(31, 95, 168, 0.1);
  color: var(--accent);
}

.dash-acc-trigger-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-acc-icon {
  width: 1.35rem;
  text-align: center;
  opacity: 0.88;
  flex-shrink: 0;
}

.dash-acc-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  margin-top: -4px;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.dash-acc-section.is-open .dash-acc-chevron {
  transform: rotate(45deg);
  margin-top: 2px;
}

.dash-acc-panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 10px;
}

.dash-acc-section.is-open .dash-acc-panel {
  display: flex;
}

.dash-acc-child {
  display: block;
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.dash-acc-child:hover {
  background: var(--panel-2);
}

.dash-acc-child.is-active {
  background: rgba(31, 95, 168, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-nav--footer {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-2);
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.dash-nav-item:hover {
  background: var(--panel-2);
}

.dash-nav-item.is-active {
  background: rgba(31, 95, 168, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.dash-nav-link {
  color: inherit;
}

.dash-nav-link--prominent {
  font-weight: 700;
  color: var(--accent);
}

.dash-nav-icon {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
}

.dash-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-2);
}

.dash-user-block {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 8px 10px;
  line-height: 1.35;
}

.dash-main {
  padding: 20px clamp(14px, 2.5vw, 28px) 40px;
  overflow-x: auto;
}

.dash-view {
  max-width: 1320px;
  margin: 0 auto;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dash-topbar-left {
  min-width: 0;
}

.dash-topbar-sub {
  margin: 6px 0 0;
  font-size: 0.95rem;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-welcome,
.dash-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.dash-help {
  font-size: 0.95rem;
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
}

.dash-help:hover {
  text-decoration: underline;
}

.dash-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.dash-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.dash-overview-grid--secondary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dash-jobs {
  min-height: 120px;
}

.dash-jobs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.dash-job {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--panel);
}

.dash-job-main {
  min-width: 0;
}

.dash-job-title {
  margin: 0 0 2px;
  font-weight: 800;
  font-size: 0.95rem;
}

.dash-job-meta {
  margin: 0;
  font-size: 0.88rem;
}

.dash-job-status {
  flex-shrink: 0;
  margin-top: 2px;
}

.dash-tips {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.dash-panel {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-2);
  min-width: 0;
}

.dash-panel--primary {
  border-color: rgba(31, 95, 168, 0.28);
  background: linear-gradient(180deg, rgba(31, 95, 168, 0.08), rgba(31, 95, 168, 0.02));
}

.dash-panel-head,
.dash-service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dash-panel-title,
.dash-service-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-panel-title h2,
.dash-service-title {
  margin: 0;
}

.dash-panel-icon,
.dash-service-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(31, 95, 168, 0.12);
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}

.dash-panel-desc {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.dash-steps {
  margin: 0 0 14px 18px;
  padding: 0;
  color: var(--text);
}

.dash-steps li {
  margin: 6px 0;
  color: var(--muted);
}

.dash-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.dash-kpi dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.dash-kpi dd {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.dash-panel-note {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--panel);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.dash-chip--ok {
  border-color: rgba(30, 120, 70, 0.35);
  background: rgba(30, 120, 70, 0.08);
  color: #146b3a;
}

.dash-chip--warn {
  border-color: rgba(240, 170, 35, 0.55);
  background: rgba(240, 170, 35, 0.12);
  color: #7a4c00;
}

.dash-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 14px;
}

.dash-section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.dash-section-sub {
  margin: 0;
  font-size: 0.92rem;
}

/* `display: flex` on cards overrides the native [hidden] rule — keep gated services off-screen. */
.dash-service-card[hidden],
.dash-acc-section[hidden] {
  display: none !important;
}

.dash-service-card {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.dash-service-card--accent {
  border-color: rgba(31, 95, 168, 0.28);
}

.dash-service-title {
  font-size: 1.08rem;
  margin: 0;
  font-weight: 800;
}

.dash-service-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 18px;
}

.dash-btn,
.dash-launch-btn {
  align-self: flex-start;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid rgba(15, 50, 90, 0.35);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.dash-btn:hover,
.dash-launch-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dash-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.dash-btn--primary:hover {
  filter: brightness(1.06);
  color: #fff;
}

.dash-btn:focus-visible,
.dash-linklike:focus-visible,
.dash-nav-item:focus-visible,
.dash-acc-trigger:focus-visible,
.dash-acc-child:focus-visible {
  outline: 3px solid rgba(31, 95, 168, 0.35);
  outline-offset: 2px;
}

.dash-btn--secondary {
  background: rgba(31, 95, 168, 0.08);
  border-color: rgba(31, 95, 168, 0.22);
}

.dash-btn--ghost {
  background: transparent;
}

.dash-btn--linklike {
  padding: 0;
  border: none;
  background: transparent;
  text-decoration: underline;
  color: var(--accent-2);
  font-weight: 700;
}

.dash-linklike {
  margin-top: 12px;
  align-self: flex-start;
  border: none;
  background: none;
  color: var(--accent-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Turnitin integration card */
.integr-card {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-2);
}

.integr-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-2);
}

.integr-title {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.integr-sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.sim-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 10px;
}

.sim-tab {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--muted);
}

.sim-tab:hover {
  color: var(--text);
  background: var(--panel-2);
}

.sim-tab.is-active {
  color: var(--accent);
  font-weight: 700;
  border-color: var(--border-2);
  border-bottom-color: var(--panel);
  margin-bottom: -11px;
  background: var(--panel);
}

.sim-panel {
  padding-top: 8px;
}

.sim-alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.sim-alert.is-error {
  border-color: rgba(180, 40, 40, 0.35);
  background: rgba(180, 40, 40, 0.08);
}

.sim-alert.is-ok {
  border-color: rgba(30, 120, 70, 0.35);
  background: rgba(30, 120, 70, 0.08);
}

.dash-alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 14px 0;
  font-size: 0.95rem;
  border: 1px solid rgba(240, 170, 35, 0.55);
  background: rgba(240, 170, 35, 0.12);
  color: var(--text);
}

.integr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.integr-btn-primary {
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  background: #1a5f7a;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.integr-btn-primary:hover {
  filter: brightness(1.06);
}

.integr-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.integr-btn-reset {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    flex-direction: column;
    flex-wrap: nowrap;
    border-right: none;
    border-bottom: 1px solid var(--border-2);
    max-height: none;
  }

  .dash-accordion {
    flex: 0 1 auto;
    width: 100%;
    max-height: min(48vh, 420px);
  }

  .dash-nav--footer {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 4px 12px;
  }

  .dash-sidebar-footer {
    width: 100%;
    border-top: none;
    padding-top: 8px;
  }

  .dash-overview-grid {
    grid-template-columns: 1fr;
  }

  .dash-overview-grid--secondary {
    grid-template-columns: 1fr;
  }
}

.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.55rem 1rem;
  background: #fff3cd;
  border-bottom: 1px solid #ffc107;
  color: #664d03;
  font-size: 0.875rem;
}

.impersonation-banner-btn {
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  background: #856404;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.impersonation-banner-btn:hover {
  background: #6d5204;
}

body.has-impersonation-banner #app.app--workspace .header {
  top: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.profile-card {
  margin-bottom: 0;
}

.profile-dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: start;
}

.profile-dl dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}

.profile-dl dd {
  margin: 0;
  word-break: break-word;
}

.profile-credits-line {
  margin: 0 0 14px;
}

.profile-credits-big {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary, #1f5fa8);
}

.profile-jobs-card {
  margin-top: 0;
}

.profile-jobs-scroll {
  overflow-x: auto;
}

.profile-jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.profile-jobs-table th,
.profile-jobs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-2, #e5e7eb);
  text-align: left;
}

.profile-jobs-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #6b7280);
}

/* Profile v2 — dashboard-style layout */
.profile-dl--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.profile-credits-display {
  padding: 8px 0 4px;
}

.profile-credits-big {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary, #1f5fa8);
  line-height: 1;
}

.profile-credits-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted, #6b7280);
  margin-left: 4px;
}

.profile-credits-sub {
  margin: 4px 0 8px;
  font-size: 0.88rem;
}

.profile-credits-hint {
  margin: 4px 0 16px;
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
}

.profile-credits-cta {
  display: inline-block;
}

.profile-jobs-card {
  margin-top: 0;
}


/* ═══════════════════════════════════════════════
   Dashboard redesign v2 — db-* components
   Matches validate view quality (ws-page-head + ws-import-card pattern)
   ═══════════════════════════════════════════════ */

/* ── Account status strip ── */
.db-stat-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  background: var(--panel, #fff);
  border: 1px solid var(--border-2, rgba(15,50,90,0.1));
  border-radius: 12px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(12,30,55,0.05);
}

.db-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1.35rem;
  flex: 1;
  min-width: 0;
}

.db-stat-sep {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: var(--border-2, rgba(15,50,90,0.09));
  flex-shrink: 0;
  align-self: center;
}

.db-stat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.db-stat-val {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text, #0b1220);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Main 2-column content grid ── */
.db-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.1rem;
  margin-bottom: 1.1rem;
  align-items: start;
}

/* ── Validate action card — extends ws-import-card ── */
.db-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.db-action-head h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.db-action-head p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
  max-width: 36rem;
}

/* chip on dark gradient background */
.db-chip-white.dash-chip {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  white-space: nowrap;
}

.db-chip-white.dash-chip--ok {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

/* ── Action card body ── */
.db-action-body {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* ── 3-step visual inside card ── */
.db-steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.db-step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
}

.db-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ws-accent-soft, #f0fdfa);
  border: 2px solid var(--ws-accent-border, rgba(13,148,136,0.3));
  color: var(--ws-accent, #0d9488);
  font-size: 0.9375rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(13,148,136,0.15);
  transition: background 0.2s, border-color 0.2s;
}

.db-step-circle:hover {
  background: var(--ws-accent, #0d9488);
  color: #fff;
  border-color: var(--ws-accent, #0d9488);
}

.db-step-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  line-height: 1.4;
}

.db-step-connector {
  flex: 0 0 auto;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--ws-accent-border, rgba(13,148,136,0.25)), var(--ws-accent-border, rgba(13,148,136,0.25)));
  margin-top: 20px;
  align-self: flex-start;
}

/* ── CTA button + ghost link ── */
.db-action-footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.db-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  background: var(--ws-accent, #0d9488);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(13,148,136,0.35);
  letter-spacing: 0.01em;
}

.db-cta-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(13,148,136,0.45);
  color: #fff;
}

.db-cta-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.db-ghost-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  text-decoration: none;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-2, rgba(15,50,90,0.1));
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.db-ghost-link:hover {
  color: var(--ws-accent, #0d9488);
  border-color: var(--ws-accent-border, rgba(13,148,136,0.28));
  background: var(--ws-accent-soft, #f0fdfa);
}

/* ── db-ghost-link as <button> reset ── */
button.db-ghost-link {
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ── Profile inline edit form ── */
.profile-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 20px;
}

.profile-edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-edit-field--full {
  grid-column: 1 / -1;
}

.profile-edit-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #64748b);
}

.profile-edit-input {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border, rgba(15,50,90,0.18));
  border-radius: 7px;
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--text, #0b1a2b);
  background: var(--panel, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.profile-edit-input:focus {
  outline: none;
  border-color: var(--accent, #1f5fa8);
  box-shadow: 0 0 0 3px rgba(31,95,168,0.12);
}

.profile-edit-error {
  font-size: 0.875rem;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 7px;
  padding: 9px 14px;
  margin-bottom: 10px;
}

@media (max-width: 540px) {
  .profile-edit-grid { grid-template-columns: 1fr; }
}

/* ── Recent jobs card ── */
.db-jobs-card {
  background: var(--panel, #fff);
  border: 1px solid var(--border-2, rgba(15,50,90,0.1));
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.5rem;
  box-shadow: 0 4px 16px rgba(12,30,55,0.06);
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.db-jobs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-2, rgba(15,50,90,0.08));
}

.db-jobs-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #0b1220);
  letter-spacing: -0.01em;
}

.db-jobs-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ws-accent, #0d9488);
  text-decoration: none;
  white-space: nowrap;
}

.db-jobs-link:hover {
  text-decoration: underline;
}

.db-jobs-list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.db-empty-state {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted, #64748b);
  padding: 0.5rem 0;
}

/* ── Tips row ── */
.db-tips-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.65rem;
}

.db-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: var(--panel, #fff);
  border: 1px solid var(--border-2, rgba(15,50,90,0.09));
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 6px rgba(12,30,55,0.04);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.db-tip-card:hover {
  border-color: var(--ws-accent-border, rgba(13,148,136,0.24));
  box-shadow: 0 4px 14px rgba(12,30,55,0.08);
}

.db-tip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ws-chip-bg, rgba(13,148,136,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--ws-accent-border, rgba(13,148,136,0.18));
}

.db-tip-title {
  margin: 0 0 0.2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text, #0b1220);
}

.db-tip-text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted, #64748b);
  line-height: 1.55;
}

/* ── Section title ── */
.db-section-row {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.db-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text, #0b1220);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .db-content-grid {
    grid-template-columns: 1fr;
  }

  .db-tips-row {
    grid-template-columns: 1fr 1fr;
  }

  .db-stat-row {
    flex-wrap: wrap;
  }

  .db-stat-item {
    flex: 0 0 calc(50% - 0.5px);
  }

  .db-stat-sep:nth-child(4) {
    display: none;
  }
}

@media (max-width: 600px) {
  .db-tips-row {
    grid-template-columns: 1fr;
  }

  .db-stat-item {
    flex: 0 0 100%;
  }

  .db-stat-sep {
    display: none;
  }

  .db-steps-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .db-step-connector {
    display: none;
  }

  .db-step-item {
    flex-direction: row;
    text-align: left;
    flex: none;
  }
}
