/* =========================================================
   TENDIGI APPLICATION UI
   Authentication + shared logged-in application primitives
   ========================================================= */

/* ---------- Authentication ---------- */

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(37, 99, 235, 0.10), transparent 34%),
    var(--background);
}

.auth-simple-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: min(100%, 450px);
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.auth-brand-row {
  display: flex;
  justify-content: center;
  margin-bottom: 38px;
}

.auth-copy {
  margin-bottom: 30px;
}

.auth-copy-centered {
  text-align: center;
}

.auth-copy h1 {
  color: var(--navy);
  font-size: 35px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.auth-copy p {
  color: var(--text-light);
  font-size: 17px;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label,
.form-label-row label {
  color: var(--navy);
  font-size: 16px;
  font-weight: 750;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-control {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  color: var(--navy);
  background: var(--white);
  font-size: 17px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control:hover {
  border-color: #cbd5e1;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.password-toggle:hover {
  color: var(--blue);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.form-message {
  min-height: 20px;
  margin-top: -6px;
  font-size: 15px;
  font-weight: 650;
}

.form-message.is-error {
  color: var(--red);
}

.form-message.is-success {
  color: #059669;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: -3px;
}

.auth-submit:disabled {
  cursor: progress;
  opacity: 0.8;
  transform: none;
}

.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-return-link {
  display: block;
  width: fit-content;
  margin: 28px auto 0;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.auth-return-link:hover {
  color: var(--blue);
}

/* ---------- Shared logged-in application shell ---------- */
/*
   These classes establish the layout for dashboard.html and every authenticated
   screen that follows. Keeping them here prevents each screen from inventing a
   slightly different sidebar/top-nav implementation.
*/

.app-page {
  min-height: 100vh;
  background: var(--background);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--border);
  background: var(--white);
  z-index: 30;
}

.app-sidebar-brand {
  padding: 0 10px 24px;
}

.app-sidebar-section-label {
  padding: 0 10px;
  margin: 12px 0 7px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-nav {
  display: grid;
  gap: 4px;
}

.app-nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border-radius: 10px;
  color: var(--text-light);
  font-size: 16px;
  font-weight: 700;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.app-nav-link:hover {
  color: var(--navy);
  background: var(--background);
}

.app-nav-link.is-active {
  color: var(--blue);
  background: var(--blue-light);
}

.app-nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.app-sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.app-sidebar-company {
  margin-top: 12px;
  padding: 11px;
  border-radius: 12px;
  background: var(--background);
}

.app-sidebar-company strong,
.app-sidebar-company span {
  display: block;
}

.app-sidebar-company strong {
  color: var(--navy);
  font-size: 14px;
}

.app-sidebar-company span {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 14px;
}

.app-main {
  min-width: 0;
  grid-column: 2;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.app-topbar-title {
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
}

.app-icon-button:hover {
  color: var(--navy);
  background: var(--background);
}

.app-user-button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.app-user-avatar {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.app-user-meta {
  display: grid;
  text-align: left;
}

.app-user-meta strong {
  font-size: 14px;
}

.app-user-meta span {
  color: var(--text-light);
  font-size: 14px;
}

.app-content {
  width: min(100%, 1500px);
  padding: 30px 32px 54px;
}

.app-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.app-page-header h1 {
  color: var(--navy);
  font-size: 31px;
  letter-spacing: -0.7px;
}

.app-page-header p {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 16px;
}

.app-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .auth-simple-layout {
    padding: 24px 16px;
  }

  .auth-card {
    padding: 30px 24px;
  }

  .app-shell {
    display: block;
  }

  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-main {
    margin-left: 0;
  }

  .app-topbar,
  .app-content {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .auth-brand-row {
    margin-bottom: 32px;
  }

  .auth-copy h1 {
    font-size: 32px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.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;
}

.app-nav-badge {
  min-width: 22px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.app-nav-badge-muted {
  background: #f1f5f9;
  color: var(--text-light);
}

.app-notification-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--red);
}

.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-topbar-company {
  margin-top: 1px;
  color: var(--text-light);
  font-size: 14px;
}

.app-mobile-menu {
  display: none;
}

.app-topbar-notification {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border: 2px solid var(--white);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.app-user-menu-wrap {
  position: relative;
}

.app-user-chevron {
  color: var(--text-light);
}

.app-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.app-dropdown a,
.app-dropdown button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}

.app-dropdown a:hover,
.app-dropdown button:hover {
  background: var(--background);
  color: var(--navy);
}

.app-dropdown button {
  margin-top: 3px;
  border-top: 1px solid transparent;
  color: var(--red);
}

.notification-popover {
  position: fixed;
  top: 60px;
  right: 196px;
  z-index: 70;
  width: min(340px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
}

.notification-popover-header {
  min-height: 42px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notification-popover-header strong {
  color: var(--navy);
  font-size: 16px;
}

.notification-popover-header a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 750;
}

.notification-preview {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 9px;
  border-radius: 10px;
  background: #fff7ed;
}

.notification-preview-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #ffedd5;
  color: #c2410c;
  font-size: 15px;
  font-weight: 900;
}

.notification-preview strong,
.notification-preview small {
  display: block;
}

.notification-preview strong {
  color: var(--navy);
  font-size: 14px;
}

.notification-preview small {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 14px;
}

.dashboard-page-header {
  align-items: center;
  margin-bottom: 22px;
}

.dashboard-page-header h1 {
  font-size: 32px;
}

.dashboard-primary-action {
  min-height: 42px;
  font-size: 14px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-kpi {
  min-width: 0;
  padding: 18px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.dashboard-kpi:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-kpi-attention {
  border-color: #fed7aa;
}

.dashboard-kpi-top {
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
}

.dashboard-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.dashboard-kpi-icon-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.dashboard-kpi-icon-violet {
  background: #f5f3ff;
  color: #7c3aed;
}

.dashboard-kpi-icon-amber {
  background: #fffbeb;
  color: #d97706;
}

.dashboard-kpi-icon-red {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-kpi-change {
  padding: 4px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-kpi-change-neutral {
  background: #f1f5f9;
  color: var(--text-light);
}

.dashboard-kpi-change-warning {
  background: #fffbeb;
  color: #b45309;
}

.dashboard-kpi-change-danger {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-kpi-value,
.dashboard-kpi-label,
.dashboard-kpi-caption {
  display: block;
}

.dashboard-kpi-value {
  color: var(--navy);
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.8px;
}

.dashboard-kpi-label {
  margin-top: 7px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
}

.dashboard-kpi-caption {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-light);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.dashboard-panel {
  overflow: hidden;
}

.dashboard-panel-header {
  min-height: 78px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-panel-header h2 {
  color: var(--navy);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.15px;
}

.dashboard-panel-header p {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 14px;
}

.dashboard-panel-header-compact {
  min-height: 70px;
  padding-bottom: 15px;
}

.dashboard-text-link {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.dashboard-text-link:hover {
  color: var(--blue-dark);
}

.dashboard-tender-list {
  display: grid;
}

.dashboard-tender-row {
  min-width: 0;
  min-height: 118px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.18s ease;
}

.dashboard-tender-row:last-child {
  border-bottom: 0;
}

.dashboard-tender-row:hover {
  background: #fbfdff;
}

.dashboard-tender-featured {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.75), transparent 55%);
}

.dashboard-tender-buyer {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
}

.dashboard-tender-buyer-pln {
  background: #f0f9ff;
  color: #0369a1;
}

.dashboard-tender-main {
  min-width: 0;
}

.dashboard-tender-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-tender-title-row h3 {
  min-width: 0;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.4;
}

.match-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.match-badge-high {
  background: #ecfdf5;
  color: #047857;
}

.dashboard-tender-meta,
.dashboard-tender-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-tender-meta {
  margin-top: 6px;
  color: var(--text-light);
  font-size: 14px;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
}

.dashboard-tender-details {
  margin-top: 12px;
  gap: 18px;
  color: var(--text-light);
  font-size: 14px;
}

.dashboard-tender-details strong {
  color: var(--navy);
}

.dashboard-row-arrow {
  align-self: center;
  color: var(--text-light);
  font-size: 19px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.dashboard-tender-row:hover .dashboard-row-arrow {
  transform: translateX(2px);
  color: var(--blue);
}

.dashboard-side-stack {
  display: grid;
  gap: 18px;
}

.dashboard-title-with-dot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attention-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.09);
}

.dashboard-attention-panel {
  border-color: #fed7aa;
}

.attention-item {
  padding: 18px 20px 20px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
}

.attention-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #fff7ed;
  color: #c2410c;
}

.attention-item strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.attention-item p {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

.attention-item a {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.deadline-list {
  display: grid;
}

.deadline-item {
  min-width: 0;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  transition: background 0.18s ease;
}

.deadline-item:first-child {
  border-top: 0;
}

.deadline-item:hover {
  background: #fbfdff;
}

.deadline-date {
  width: 38px;
  padding: 5px 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  text-align: center;
}

.deadline-date strong,
.deadline-date span {
  display: block;
}

.deadline-date strong {
  color: var(--navy);
  font-size: 15px;
  line-height: 1.1;
}

.deadline-date span {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.deadline-copy {
  min-width: 0;
}

.deadline-copy strong,
.deadline-copy span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.deadline-copy strong {
  color: var(--navy);
  font-size: 14px;
}

.deadline-copy span {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 13px;
}

.deadline-days {
  padding: 4px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
}

.deadline-days-urgent {
  background: #fff7ed;
  color: #c2410c;
}

.dashboard-active-panel {
  margin-bottom: 4px;
}

.active-table-wrap {
  overflow-x: auto;
}

.active-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.active-table th {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
}

.active-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  font-size: 14px;
  vertical-align: middle;
}

.active-table tbody tr:last-child td {
  border-bottom: 0;
}

.active-table tbody tr:hover {
  background: #fbfdff;
}

.active-tender-name,
.active-tender-buyer,
.deadline-subtext {
  display: block;
}

.active-tender-name {
  max-width: 340px;
  color: var(--navy);
  font-weight: 780;
}

.active-tender-name:hover {
  color: var(--blue);
}

.active-tender-buyer,
.deadline-subtext {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 13px;
}

.stage-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.stage-badge-review {
  background: #fffbeb;
  color: #b45309;
}

.stage-badge-final {
  background: #ecfdf5;
  color: #047857;
}

.table-progress-wrap {
  width: 126px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-progress {
  width: 86px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.table-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.table-progress-wrap strong {
  color: var(--navy);
  font-size: 14px;
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-weight: 700;
}

.owner-avatar {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.owner-avatar-alt {
  background: #f5f3ff;
  color: #7c3aed;
}

.owner-avatar-green {
  background: #ecfdf5;
  color: #047857;
}

.table-open-link {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-light);
  font-size: 17px;
}

.table-open-link:hover {
  background: var(--blue-light);
  color: var(--blue);
}

.app-mobile-overlay {
  display: none;
}

@media (max-width: 1120px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-mobile-menu {
    display: grid;
  }

  .app-sidebar {
    z-index: 90;
    transition: transform 0.22s ease;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 16px 0 45px rgba(15, 23, 42, 0.12);
  }

  .app-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(15, 23, 42, 0.35);
  }

  .sidebar-open {
    overflow: hidden;
  }

  .app-topbar {
    min-height: 64px;
  }

  .app-user-meta,
  .app-user-chevron,
  .app-topbar-company {
    display: none;
  }

  .app-user-button {
    padding-right: 6px;
  }

  .notification-popover {
    top: 58px;
    right: 76px;
  }

  .dashboard-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-primary-action {
    width: 100%;
  }

  .dashboard-kpi-grid,
  .dashboard-side-stack {
    grid-template-columns: 1fr;
  }

  .dashboard-tender-title-row {
    display: block;
  }

  .match-badge {
    width: fit-content;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  .app-content {
    padding-top: 24px;
  }

  .dashboard-page-header h1 {
    font-size: 28px;
  }

  .dashboard-tender-row {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 16px;
  }

  .dashboard-tender-buyer {
    width: 36px;
    height: 36px;
  }

  .dashboard-row-arrow {
    display: none;
  }

  .dashboard-panel-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .attention-item,
  .deadline-item {
    padding-left: 16px;
    padding-right: 16px;
  }

  .notification-popover {
    right: 16px;
  }
}

/* =========================================================
   TENDER DISCOVERY
   ========================================================= */

.discover-content {
  max-width: 1320px;
}

.discover-page-header {
  align-items: center;
  margin-bottom: 20px;
}

.discover-saved-header-button {
  min-height: 42px;
  gap: 8px;
  font-size: 14px;
}

.discover-saved-header-button span {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.discover-control-panel {
  padding: 15px 16px 0;
  margin-bottom: 18px;
}

.discover-search-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) repeat(3, minmax(145px, 0.7fr)) auto;
  gap: 10px;
  align-items: center;
}

.discover-search {
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--white);
  color: var(--text-light);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.discover-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.discover-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 15px;
}

.discover-search input::placeholder {
  color: var(--text-light);
}

.discover-select,
.discover-sort {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 30px 0 11px;
  outline: 0;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.discover-select:focus,
.discover-sort:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.discover-reset-button {
  height: 42px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.discover-tabs-row {
  min-height: 58px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.discover-tabs {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.discover-tab {
  position: relative;
  min-height: 56px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.discover-tab::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 2px;
  border-radius: 99px 99px 0 0;
  background: transparent;
}

.discover-tab span {
  min-width: 20px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--text-light);
  font-size: 12px;
}

.discover-tab:hover,
.discover-tab.is-active {
  color: var(--navy);
}

.discover-tab.is-active::after {
  background: var(--blue);
}

.discover-tab.is-active span {
  background: var(--blue-light);
  color: var(--blue);
}

.discover-sort-label {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.discover-sort {
  width: 170px;
  height: 34px;
  font-size: 14px;
}

.discover-result-summary {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: var(--space-4);
  padding: 0 2px;
}

.discover-result-summary strong,
.discover-result-summary span {
  display: block;
}

.discover-result-summary strong {
  color: var(--navy);
  font-size: 14px;
}

.discover-result-summary div > span {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 14px;
}

.discover-updated {
  color: var(--text-light) !important;
  font-size: 14px !important;
  white-space: nowrap;
}

.discover-results {
  display: grid;
  gap: 12px;
}

.discover-tender-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.discover-tender-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.discover-tender-card-featured {
  border-color: #bfdbfe;
  box-shadow: 0 9px 26px rgba(37, 99, 235, 0.05);
}

.discover-card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.discover-tender-card-featured .discover-card-accent {
  background: var(--blue);
}

.discover-tender-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  gap: 13px;
  align-items: start;
}

.discover-buyer-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

.discover-buyer-pln {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.discover-tender-heading {
  min-width: 0;
}

.discover-tender-badges {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.discover-tender-title {
  display: inline-block;
  max-width: 920px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 820;
  letter-spacing: -0.12px;
}

.discover-tender-title:hover {
  color: var(--blue);
}

.discover-tender-meta {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text-light);
  font-size: 14px;
}

.discover-new-badge,
.discover-urgent-badge {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.discover-new-badge {
  background: #eff6ff;
  color: #2563eb;
}

.discover-urgent-badge {
  background: #fff7ed;
  color: #c2410c;
}

.discover-match-good {
  background: #f0fdf4;
  color: #15803d;
}

.discover-match-medium {
  background: #f8fafc;
  color: #64748b;
}

.discover-save-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.discover-save-button:hover {
  border-color: #bfdbfe;
  background: var(--blue-light);
  color: var(--blue);
}

.discover-save-button.is-saved {
  border-color: #bfdbfe;
  background: var(--blue-light);
  color: var(--blue);
}

.discover-tender-stat-grid {
  margin: 15px 0 14px 57px;
  display: grid;
  grid-template-columns: 150px 180px minmax(170px, 1fr);
  gap: 0;
}

.discover-tender-stat-grid > div {
  min-width: 0;
  padding-right: 18px;
  margin-right: 18px;
  border-right: 1px solid #f1f5f9;
}

.discover-tender-stat-grid > div:last-child {
  margin-right: 0;
  border-right: 0;
}

.discover-tender-stat-grid span,
.discover-tender-stat-grid strong,
.discover-tender-stat-grid small {
  display: block;
}

.discover-tender-stat-grid span {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.discover-tender-stat-grid strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--navy);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.discover-tender-stat-grid small {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 13px;
}

.discover-tender-stat-grid .discover-deadline-urgent {
  color: #c2410c;
  font-weight: 800;
}

.discover-match-reasons {
  margin-left: 57px;
  padding: 12px 0 14px;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.discover-match-label {
  padding-top: 5px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.discover-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.discover-reason-chip {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.discover-reason-chip svg {
  color: #059669;
}

.discover-card-footer {
  min-height: 54px;
  margin: 0 -20px;
  padding: 9px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fbfdff;
}

.discover-analysis-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 650;
}

.discover-analysis-note svg {
  color: var(--blue);
}

.discover-view-button {
  min-height: 34px;
  padding: 7px 12px;
  gap: 6px;
  font-size: 12px;
}

.discover-empty-state {
  padding: 58px 24px;
  text-align: center;
}

.discover-empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
}

.discover-empty-state h2 {
  color: var(--navy);
  font-size: 19px;
}

.discover-empty-state p {
  margin: 5px auto 16px;
  color: var(--text-light);
  font-size: 14px;
}

@media (max-width: 1160px) {
  .discover-search-row {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(140px, 0.55fr));
  }

  .discover-select-deadline {
    grid-column: 1 / 2;
  }

  .discover-reset-button {
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .discover-search-row {
    grid-template-columns: 1fr 1fr;
  }

  .discover-search {
    grid-column: 1 / -1;
  }

  .discover-select-deadline {
    grid-column: auto;
  }

  .discover-tabs-row {
    align-items: center;
    flex-direction: column;
  }

  .discover-tabs {
    width: 100%;
    align-self: auto;
  }

  .discover-sort-label {
    width: 100%;
    min-height: 44px;
    justify-content: flex-end;
  }

  .discover-tender-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .discover-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .discover-saved-header-button {
    width: 100%;
  }

  .discover-control-panel {
    padding-right: 13px;
    padding-left: 13px;
  }

  .discover-search-row {
    grid-template-columns: 1fr;
  }

  .discover-search,
  .discover-select,
  .discover-select-deadline {
    grid-column: auto;
    width: 100%;
  }

  .discover-tabs {
    overflow-x: auto;
  }

  .discover-tab {
    flex: 0 0 auto;
  }

  .discover-result-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: var(--space-3);
  }

  .discover-tender-card {
    padding: 16px 15px 0;
  }

  .discover-tender-head {
    grid-template-columns: 40px minmax(0, 1fr) 34px;
    gap: 10px;
  }

  .discover-buyer-mark {
    width: 38px;
    height: 38px;
  }

  .discover-tender-stat-grid,
  .discover-match-reasons {
    margin-left: 0;
  }

  .discover-tender-stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
  }

  .discover-tender-stat-grid > div {
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }

  .discover-match-reasons {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .discover-card-footer {
    margin: 0 -15px;
    padding: 10px 15px;
  }
}

@media (max-width: 480px) {
  .discover-tender-badges {
    flex-wrap: wrap;
  }

  .discover-tender-title {
    font-size: 16px;
  }

  .discover-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .discover-view-button {
    width: 100%;
  }
}

/* =========================================================
   TENDER DETAIL
   ========================================================= */

.tender-detail-content {
  padding-bottom: 72px;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 650;
}

.detail-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-light);
  transition: color 0.18s ease;
}

.detail-breadcrumb a:hover {
  color: var(--blue);
}

.tender-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  padding: 26px;
}

.tender-detail-buyer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tender-detail-buyer-mark {
  width: 48px;
  height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #f8fbff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.tender-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.detail-badge {
  min-height: 21px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
}

.detail-badge-blue {
  border-color: #bfdbfe;
  background: var(--blue-light);
  color: var(--blue);
}

.detail-badge-green {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.tender-detail-source {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 650;
}

.tender-detail-hero h1 {
  max-width: 790px;
  margin-top: 17px;
  color: var(--navy);
  font-size: clamp(27px, 3vw, 37px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.tender-detail-intro {
  max-width: 780px;
  margin-top: 10px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.65;
}

.tender-detail-meta-grid {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tender-detail-meta-grid > div {
  min-width: 0;
  padding-right: 16px;
  margin-right: 16px;
  border-right: 1px solid #f1f5f9;
}

.tender-detail-meta-grid > div:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.tender-detail-meta-grid span,
.tender-detail-meta-grid strong,
.tender-detail-meta-grid small {
  display: block;
}

.tender-detail-meta-grid span {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.tender-detail-meta-grid strong {
  margin-top: 4px;
  color: var(--navy);
  font-size: 14px;
}

.tender-detail-meta-grid small {
  margin-top: 2px;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
}

.tender-detail-score-panel {
  align-self: stretch;
  padding: 20px;
  border: 1px solid #dbeafe;
  border-radius: 15px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.detail-score-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-info-button {
  width: 20px;
  height: 20px;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.detail-score-value {
  margin-top: 8px;
  color: var(--navy);
  font-size: 45px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.05em;
}

.detail-score-value span {
  margin-left: 2px;
  color: var(--text-light);
  font-size: 21px;
}

.detail-score-bar {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.detail-score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.detail-score-label {
  display: block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 14px;
}

.tender-detail-score-panel > p {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.55;
}

.detail-score-reasons {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid #e5efff;
}

.detail-score-reasons > div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.detail-score-reasons strong {
  color: var(--navy);
}

.detail-check-icon {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #059669;
  font-size: 14px;
  font-weight: 900;
}

.detail-entry-section {
  margin-top: 22px;
}

.detail-entry-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.detail-entry-heading h2 {
  color: var(--navy);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.detail-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.detail-entry-card {
  min-width: 0;
  min-height: 330px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 24px;
  overflow: hidden;
  border-color: #bfdbfe;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.09), transparent 42%),
    var(--white);
}

.detail-entry-card.is-ai {
  border-color: #c7d2fe;
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 70, 229, 0.10), transparent 42%),
    var(--white);
}

.detail-entry-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-entry-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
}

.detail-entry-card.is-ai .detail-entry-icon {
  background: #eef2ff;
  color: #4f46e5;
}

.detail-entry-label {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-entry-card.is-ai .detail-entry-label {
  color: #4f46e5;
}

.detail-entry-copy {
  margin-top: 16px;
}

.detail-entry-copy h3 {
  color: var(--navy);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.detail-entry-copy p {
  margin-top: 7px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

.detail-entry-benefits {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 17px 0;
  padding: 0;
  list-style: none;
}

.detail-entry-benefits li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.detail-entry-benefits span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  font-size: 13px;
  font-weight: 900;
}

.detail-entry-action {
  width: 100%;
  min-height: 48px;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 18px;
  white-space: nowrap;
}

.detail-entry-card.is-ai .detail-entry-action {
  border-color: #4f46e5;
  background: #4f46e5;
}

.detail-entry-card.is-ai .detail-entry-action:hover {
  border-color: #4338ca;
  background: #4338ca;
}

.tender-detail-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 18px;
  align-items: start;
}

.tender-detail-main-column,
.tender-detail-side-column {
  display: grid;
  gap: 18px;
}

.tender-detail-side-column {
  position: sticky;
  top: 86px;
}

.detail-section-card,
.detail-side-card {
  padding: 22px;
}

.detail-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.detail-section-heading-inline {
  align-items: center;
}

.detail-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-section-heading h2 {
  color: var(--navy);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.detail-body-copy {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.65;
}

.detail-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.detail-scope-item {
  min-height: 88px;
  padding: 13px;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  background: #fbfdff;
}

.detail-scope-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
}

.detail-scope-item strong,
.detail-scope-item span {
  display: block;
}

.detail-scope-item strong {
  color: var(--navy);
  font-size: 14px;
}

.detail-scope-item div > span {
  margin-top: 3px;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.5;
}

.detail-not-analyzed-badge,
.detail-document-total,
.detail-review-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f5f9;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
}

.detail-fit-list {
  border-top: 1px solid #f1f5f9;
}

.detail-fit-row {
  padding: 15px 0;
  border-bottom: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
}

.detail-fit-status {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
}

.detail-fit-positive {
  background: #ecfdf5;
  color: #059669;
}

.detail-fit-row strong {
  color: var(--navy);
  font-size: 14px;
}

.detail-fit-row p {
  margin-top: 3px;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.55;
}

.detail-analysis-disclaimer {
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  background: #f8fbff;
  color: #475569;
}

.detail-disclaimer-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.detail-analysis-disclaimer p {
  font-size: 13px;
  line-height: 1.55;
}

.detail-analysis-disclaimer strong {
  color: var(--navy);
}

.detail-document-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-document-row {
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  gap: 10px;
  align-items: center;
  background: var(--white);
  color: var(--text-light);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease;
}

.detail-document-row:last-child {
  border-bottom: 0;
}

.detail-document-row:hover {
  background: #f8fafc;
}

.detail-document-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.detail-document-name strong,
.detail-document-name small {
  display: block;
}

.detail-document-name strong {
  color: var(--navy);
  font-size: 14px;
}

.detail-document-name small {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 12px;
}

.detail-document-tag {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.detail-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 4px;
}

.detail-timeline-item {
  position: relative;
  min-height: 88px;
  padding: 29px 12px 0 0;
}

.detail-timeline-item::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 9px;
  right: 0;
  height: 2px;
  background: #e2e8f0;
}

.detail-timeline-item:last-child::before {
  right: calc(100% - 10px);
}

.detail-timeline-dot {
  position: absolute;
  top: 4px;
  left: 3px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 3px solid var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #cbd5e1;
  color: var(--white);
  box-shadow: 0 0 0 1px #cbd5e1;
  font-size: 12px;
  font-weight: 900;
}

.detail-timeline-item.is-complete .detail-timeline-dot {
  background: #10b981;
  box-shadow: 0 0 0 1px #10b981;
}

.detail-timeline-item.is-current .detail-timeline-dot {
  background: var(--blue);
  box-shadow: 0 0 0 2px #bfdbfe;
}

.detail-timeline-item.is-deadline .detail-timeline-dot {
  background: #f97316;
  box-shadow: 0 0 0 1px #f97316;
}

.detail-timeline-item span,
.detail-timeline-item strong,
.detail-timeline-item small {
  display: block;
}

.detail-timeline-item div > span {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
}

.detail-timeline-item strong {
  margin-top: 3px;
  color: var(--navy);
  font-size: 14px;
}

.detail-timeline-item small {
  margin-top: 2px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.detail-timeline-item.is-deadline small {
  color: #c2410c;
}

.detail-side-card-heading {
  margin-bottom: 11px;
}

.detail-side-card-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-side-card-heading h3 {
  color: var(--navy);
  font-size: 14px;
}

.detail-info-list {
  display: grid;
}

.detail-info-list > div {
  padding: 9px 0;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 10px;
}

.detail-info-list dt {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
}

.detail-info-list dd {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.detail-source-button {
  width: 100%;
  margin-top: 8px;
  padding-top: 11px;
  border: 0;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.detail-review-status {
  background: #fff7ed;
  color: #c2410c;
}

.detail-review-status.is-preparing {
  background: #ecfdf5;
  color: #047857;
}

.detail-review-status.is-analyzed {
  background: #eff6ff;
  color: #1d4ed8;
}

.detail-review-actions {
  margin-top: 12px;
}

.detail-save-wide {
  width: 100%;
  min-height: 38px;
  gap: 6px;
  font-size: 12px;
}

.detail-save-wide.is-saved {
  border-color: #bfdbfe;
  background: var(--blue-light);
  color: var(--blue);
}

.detail-review-copy {
  margin-top: 10px;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.55;
}

.detail-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.detail-modal-backdrop[hidden] {
  display: none;
}

.detail-modal {
  position: relative;
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.2);
  text-align: center;
}

.detail-modal-close {
  position: absolute;
  top: 11px;
  right: 13px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 20px;
}

.detail-modal-close:hover {
  background: #f8fafc;
  color: var(--navy);
}

.detail-modal-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 13px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.detail-modal h2 {
  color: var(--navy);
  font-size: 20px;
}

.detail-modal p {
  margin-top: 8px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.65;
}

.detail-modal-detail {
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.detail-modal-detail[hidden] {
  display: none;
}

.detail-modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.detail-modal-action {
  margin-top: 0;
  min-width: 110px;
}

.detail-entry-action:focus-visible,
.detail-modal button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.detail-modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .tender-detail-hero {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .tender-detail-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .tender-detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 0;
  }

  .tender-detail-meta-grid > div:nth-child(2) {
    border-right: 0;
  }

  .tender-detail-meta-grid > div:nth-child(3),
  .tender-detail-meta-grid > div:nth-child(4) {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
  }
}

@media (max-width: 900px) {
  .tender-detail-hero,
  .tender-detail-layout {
    grid-template-columns: 1fr;
  }

  .tender-detail-score-panel {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
    column-gap: 20px;
  }

  .detail-score-heading,
  .detail-score-value,
  .detail-score-bar,
  .detail-score-label,
  .tender-detail-score-panel > p {
    grid-column: 1;
  }

  .detail-score-reasons {
    grid-column: 2;
    grid-row: 1 / 6;
    margin-top: 0;
    padding-top: 0;
    padding-left: 18px;
    border-top: 0;
    border-left: 1px solid #e5efff;
  }

  .tender-detail-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .detail-breadcrumb {
    margin-bottom: 10px;
  }

  .tender-detail-hero,
  .detail-section-card,
  .detail-side-card,
  .detail-entry-card {
    padding: 17px;
  }

  .tender-detail-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-scope-grid {
    grid-template-columns: 1fr;
  }

  .detail-entry-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .detail-entry-grid { grid-template-columns: 1fr; }
  .detail-entry-card { min-height: 0; }

  .detail-timeline {
    grid-template-columns: 1fr;
  }

  .detail-timeline-item {
    min-height: 66px;
    padding: 0 0 18px 32px;
  }

  .detail-timeline-item::before {
    top: 10px;
    bottom: 0;
    left: 9px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .detail-timeline-item:last-child::before {
    bottom: calc(100% - 10px);
    right: auto;
  }

  .detail-timeline-dot {
    top: 2px;
  }

  .tender-detail-side-column {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 520px) {
  .detail-entry-action { min-width: 0; }

  .detail-modal-actions {
    flex-direction: column;
  }

  .detail-modal-actions .btn {
    width: 100%;
  }

  .tender-detail-buyer-row {
    align-items: flex-start;
  }

  .tender-detail-hero h1 {
    font-size: 26px;
  }

  .tender-detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .tender-detail-meta-grid > div {
    padding: 9px 0;
    margin: 0;
    border-right: 0;
    border-top: 1px solid #f1f5f9;
  }

  .tender-detail-meta-grid > div:first-child {
    border-top: 0;
  }

  .tender-detail-score-panel {
    display: block;
  }

  .detail-score-reasons {
    margin-top: 15px;
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid #e5efff;
    border-left: 0;
  }

  .detail-section-heading-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-document-row {
    grid-template-columns: 32px minmax(0, 1fr) 14px;
  }

  .detail-document-tag {
    display: none;
  }
}
/* ---------- Tender analysis ---------- */

.analysis-content {
  max-width: 1440px;
}

.analysis-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 14px 0 24px;
}

.analysis-page-header h1 {
  margin: 5px 0 5px;
  color: var(--navy);
  font-size: clamp(30px, 3vw, 39px);
  line-height: 1.1;
  letter-spacing: -1px;
}

.analysis-page-header p {
  color: var(--text-light);
  font-size: 16px;
}

.analysis-kicker {
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-light);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.analysis-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
  animation: analysis-pulse 1.35s ease-in-out infinite;
}

.analysis-status-pill.is-complete {
  border-color: #a7f3d0;
  color: #047857;
  background: #ecfdf5;
}

.analysis-status-pill.is-complete .analysis-status-dot {
  background: #10b981;
  box-shadow: none;
  animation: none;
}

@keyframes analysis-pulse {
  50% { opacity: 0.45; transform: scale(0.85); }
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.analysis-main-column,
.analysis-side-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.analysis-side-column {
  position: sticky;
  top: 88px;
}

.analysis-progress-card,
.analysis-steps-card,
.analysis-findings-card,
.analysis-context-card {
  padding: 24px;
}

.analysis-progress-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.analysis-progress-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.analysis-progress-heading span {
  color: var(--navy);
  font-size: 17px;
  font-weight: 800;
}

.analysis-progress-heading strong {
  color: var(--blue);
  font-size: 25px;
  line-height: 1;
}

.analysis-progress-heading > span:last-child {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.analysis-progress-track {
  height: 9px;
  margin: 18px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.analysis-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  transition: width 0.18s linear;
}

.analysis-live-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.analysis-live-metrics > div {
  display: grid;
  gap: 4px;
  padding: 0 18px;
  border-left: 1px solid var(--border);
}

.analysis-live-metrics > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.analysis-live-metrics span {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.analysis-live-metrics strong {
  color: var(--navy);
  font-size: 23px;
  line-height: 1.1;
}

.analysis-live-metrics strong small {
  margin-left: 2px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.analysis-section-heading {
  margin-bottom: 8px;
}

.analysis-section-heading h2 {
  margin-top: 4px;
  color: var(--navy);
  font-size: 22px;
  letter-spacing: -0.35px;
}

.analysis-section-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.analysis-step-list {
  margin-top: 15px;
}

.analysis-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  position: relative;
  padding: 16px 0;
}

.analysis-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 50px;
  bottom: -15px;
  width: 1px;
  background: var(--border);
}

.analysis-step-state {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-light);
  background: var(--white);
  font-size: 15px;
  font-weight: 900;
}

.analysis-step-spinner,
.analysis-step-check {
  display: none;
}

.analysis-step:not(.is-active):not(.is-complete) .analysis-step-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
}

.analysis-step.is-active .analysis-step-state {
  border-color: #bfdbfe;
  background: var(--blue-light);
}

.analysis-step.is-active .analysis-step-spinner {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid #bfdbfe;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: button-spin 0.8s linear infinite;
}

.analysis-step.is-complete .analysis-step-state {
  border-color: #a7f3d0;
  color: #047857;
  background: #ecfdf5;
}

.analysis-step.is-complete .analysis-step-check {
  display: block;
}

.analysis-step-content > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 22px;
}

.analysis-step-content strong {
  color: var(--navy);
  font-size: 16px;
}

.analysis-step-content p {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.55;
}

.analysis-step-status {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
}

.analysis-step.is-active .analysis-step-status {
  color: var(--blue);
}

.analysis-step.is-complete .analysis-step-status {
  color: #059669;
}

.analysis-step-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.analysis-step-evidence[hidden],
.analysis-step-result[hidden] {
  display: none;
}

.analysis-step-evidence span {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-light);
  background: var(--background);
  font-size: 14px;
  font-weight: 700;
}

.analysis-step-result {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--blue-light);
}

.analysis-step-result strong,
.analysis-step-result span {
  font-size: 14px;
}

.analysis-step-result strong { color: var(--blue); }
.analysis-step-result span { color: var(--text-light); }
.analysis-step-result-success { background: #ecfdf5; }
.analysis-step-result-success strong { color: #047857; }
.analysis-step-result-warning { background: #fffbeb; }
.analysis-step-result-warning strong { color: #b45309; }

.analysis-context-card h3 {
  margin: 4px 0 17px;
  color: var(--navy);
  font-size: 19px;
  letter-spacing: -0.2px;
}

.analysis-file-list {
  display: grid;
}

.analysis-file-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #f1f5f9;
}

.analysis-file-list > div:first-child { border-top: 0; padding-top: 0; }
.analysis-file-list > div:last-child { padding-bottom: 0; }

.analysis-file-type {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #dc2626;
  background: #fef2f2;
  font-size: 13px;
  font-weight: 900;
}

.analysis-file-type-xls {
  color: #047857;
  background: #ecfdf5;
}

.analysis-file-list strong,
.analysis-file-list small {
  display: block;
}

.analysis-file-list strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.35;
}

.analysis-file-list small {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 14px;
}

.analysis-file-state {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
}

.analysis-file-state.is-active { color: var(--blue); }
.analysis-file-state.is-complete { color: #059669; }

.analysis-source-list {
  display: grid;
}

.analysis-source-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
}

.analysis-source-list > div:first-child { border-top: 0; padding-top: 0; }
.analysis-source-list > div:last-child { padding-bottom: 0; }
.analysis-source-list span { color: var(--text-light); font-size: 14px; }
.analysis-source-list strong { color: var(--navy); font-size: 14px; }

.analysis-trust-note {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  padding: 15px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.analysis-trust-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-light);
  font-weight: 900;
}

.analysis-trust-note strong {
  color: var(--navy);
  font-size: 14px;
}

.analysis-trust-note p {
  margin-top: 3px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

.analysis-findings-card[hidden] { display: none; }

.analysis-findings-card.is-visible {
  animation: analysis-reveal 0.35s ease both;
}

@keyframes analysis-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.analysis-readiness-score {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.analysis-readiness-score strong {
  color: var(--blue);
  font-size: 34px;
  letter-spacing: -1px;
}

.analysis-readiness-score span {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 750;
}

.analysis-findings-intro {
  max-width: 720px;
  margin: 10px 0 18px;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
}

.analysis-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.analysis-result-card {
  display: grid;
  gap: 1px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--background);
}

.analysis-result-card span,
.analysis-result-card small {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.analysis-result-card strong {
  color: var(--navy);
  font-size: 27px;
  line-height: 1.1;
}

.analysis-result-card-success { border-color: #d1fae5; background: #f7fefb; }
.analysis-result-card-success strong { color: #047857; }
.analysis-result-card-warning { border-color: #fde68a; background: #fffdf5; }
.analysis-result-card-warning strong { color: #b45309; }
.analysis-result-card-danger { border-color: #fecaca; background: #fffafa; }
.analysis-result-card-danger strong { color: #b91c1c; }

.analysis-risk-preview {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.analysis-risk-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid #f1f5f9;
}

.analysis-risk-row:first-child { border-top: 0; }

.analysis-risk-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.analysis-risk-row.is-danger .analysis-risk-icon { color: #b91c1c; background: #fef2f2; }
.analysis-risk-row.is-warning .analysis-risk-icon { color: #b45309; background: #fffbeb; }

.analysis-risk-row strong {
  color: var(--navy);
  font-size: 14px;
}

.analysis-risk-row p {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 14px;
}

.analysis-source-ref {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-light);
  background: var(--background);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.analysis-complete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .analysis-layout { grid-template-columns: 1fr; }
  .analysis-side-column { position: static; grid-template-columns: 1fr 1fr; }
  .analysis-trust-note { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .analysis-live-metrics { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .analysis-live-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .analysis-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .analysis-page-header,
  .analysis-progress-heading,
  .analysis-section-heading-inline,
  .analysis-complete-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .analysis-status-pill { align-self: flex-start; }
  .analysis-progress-heading > span:last-child { text-align: left; }
  .analysis-side-column { grid-template-columns: 1fr; }
  .analysis-trust-note { grid-column: auto; }
  .analysis-risk-row { grid-template-columns: 28px minmax(0, 1fr); }
  .analysis-source-ref { grid-column: 2; width: fit-content; }
  .analysis-complete-actions .btn { width: 100%; }
}

/* =========================================================
   READINESS ASSESSMENT
   ========================================================= */

.readiness-content {
  padding-bottom: 70px;
}

.readiness-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 22px;
}

.readiness-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.readiness-analysis-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 14px;
  font-weight: 800;
}

.readiness-analysis-badge span {
  font-size: 14px;
}

.readiness-updated {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.readiness-page-heading h1 {
  max-width: 880px;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 37px);
  line-height: 1.12;
  letter-spacing: -0.8px;
}

.readiness-page-heading p {
  margin-top: 7px;
  color: var(--text-light);
  font-size: 15px;
}

.readiness-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  overflow: hidden;
  margin-bottom: 20px;
}

.readiness-hero-main {
  padding: 28px 30px;
}

.readiness-eligibility-panel {
  padding: 28px;
  border-left: 1px solid #fed7aa;
  background: linear-gradient(180deg, #fffaf4 0%, #fff7ed 100%);
}

.readiness-eyebrow,
.readiness-kicker {
  display: inline-block;
  color: #64748b;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.readiness-score-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 14px;
}

.readiness-score-ring {
  position: relative;
  width: 154px;
  height: 154px;
  display: grid;
  place-items: center;
}

.readiness-score-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.readiness-ring-track,
.readiness-ring-value {
  fill: none;
  stroke-width: 10;
}

.readiness-ring-track {
  stroke: #e8eef7;
}

.readiness-ring-value {
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-dasharray: 320.44;
  stroke-dashoffset: 57.68;
}

.readiness-score-ring > div {
  position: relative;
  z-index: 2;
  display: grid;
  text-align: center;
}

.readiness-score-ring strong {
  color: var(--navy);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -1.5px;
}

.readiness-score-ring span {
  margin-top: 5px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.readiness-score-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.readiness-score-heading h2 {
  color: var(--navy);
  font-size: 25px;
  letter-spacing: -0.45px;
}

.readiness-info-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.readiness-info-link:hover {
  color: var(--blue-dark);
}

.readiness-score-copy > p {
  max-width: 650px;
  margin-top: 8px;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.65;
}

.readiness-summary-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.readiness-summary-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 750;
}

.readiness-summary-chips span strong {
  color: var(--navy);
  font-size: 15px;
}

.readiness-summary-chips .is-match { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.readiness-summary-chips .is-attention { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.readiness-summary-chips .is-gap { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

.eligibility-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 10px;
}

.eligibility-status > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #b45309;
  background: #ffedd5;
  font-size: 16px;
  font-weight: 900;
}

.eligibility-status strong {
  color: #9a3412;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.6px;
}

.readiness-eligibility-panel > p {
  color: #7c2d12;
  font-size: 15px;
  line-height: 1.6;
}

.eligibility-callout {
  margin: 15px 0 20px;
  padding: 11px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.55;
}

.readiness-participate-button,
.readiness-decision-card .btn {
  width: 100%;
}

.readiness-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.readiness-main-column,
.readiness-side-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.readiness-side-column {
  position: sticky;
  top: 88px;
}

.readiness-section-card,
.readiness-side-card {
  padding: 24px;
}

.readiness-section-heading {
  margin-bottom: 17px;
}

.readiness-section-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.readiness-section-heading h2 {
  margin-top: 4px;
  color: var(--navy);
  font-size: 22px;
  letter-spacing: -0.35px;
}

.readiness-section-note {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.readiness-section-intro {
  margin: -7px 0 18px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.55;
}

.readiness-count-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 14px;
  font-weight: 800;
}

.readiness-category-list {
  display: grid;
}

.readiness-category-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(120px, 1fr) 52px 74px;
  gap: 18px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}

.readiness-category-row:first-child {
  border-top: 0;
}

.readiness-category-name {
  display: flex;
  align-items: center;
  gap: 11px;
}

.readiness-category-name > div {
  display: grid;
  gap: 2px;
}

.readiness-category-name strong {
  color: var(--navy);
  font-size: 15px;
}

.readiness-category-name small {
  color: var(--text-light);
  font-size: 14px;
}

.category-status {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.category-status.is-ready { color: #047857; background: #ecfdf5; }
.category-status.is-attention { color: #b45309; background: #fffbeb; }
.category-status.is-gap { color: #b91c1c; background: #fef2f2; }

.readiness-category-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.readiness-category-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #10b981;
}

.readiness-category-progress.is-attention > span { background: #f59e0b; }
.readiness-category-progress.is-gap > span { background: #ef4444; }

.readiness-category-score {
  color: #b45309;
  font-size: 15px;
  text-align: right;
}

.readiness-category-score.is-ready-text { color: #047857; }
.readiness-category-score.is-gap-text { color: #b91c1c; }

.readiness-category-state {
  justify-self: end;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.is-ready-state { color: #047857; background: #ecfdf5; }
.is-attention-state { color: #b45309; background: #fffbeb; }
.is-gap-state { color: #b91c1c; background: #fef2f2; }

.readiness-gap-list {
  display: grid;
  gap: 12px;
}

.readiness-gap-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}

.readiness-gap-card.is-critical {
  border-color: #fecaca;
  background: linear-gradient(90deg, #fffafa 0%, #ffffff 30%);
}

.readiness-gap-card.is-warning {
  border-color: #fde68a;
  background: linear-gradient(90deg, #fffdf7 0%, #ffffff 30%);
}

.readiness-gap-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 16px;
  font-weight: 900;
}

.readiness-gap-card.is-warning .readiness-gap-marker {
  color: #b45309;
  background: #fef3c7;
}

.readiness-gap-title-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}

.readiness-gap-label {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.readiness-gap-title-row h3 {
  margin-top: 2px;
  color: var(--navy);
  font-size: 17px;
}

.readiness-severity,
.readiness-action-priority {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.readiness-severity.is-critical,
.readiness-action-priority.is-critical { color: #b91c1c; background: #fef2f2; }
.readiness-severity.is-warning,
.readiness-action-priority.is-high { color: #b45309; background: #fffbeb; }

.readiness-gap-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 13px;
}

.readiness-gap-comparison > div {
  padding: 11px 12px;
  border-radius: 9px;
  background: #f8fafc;
}

.readiness-gap-comparison span,
.readiness-gap-conclusion span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.readiness-gap-comparison p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.readiness-gap-conclusion {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #ef4444;
  border-radius: 0 8px 8px 0;
  background: #fef2f2;
}

.readiness-gap-conclusion.is-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.readiness-gap-conclusion strong {
  color: #991b1b;
  font-size: 14px;
}

.readiness-gap-conclusion.is-warning strong { color: #92400e; }

.readiness-gap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.readiness-source-button,
.readiness-gap-footer a,
.readiness-text-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.readiness-source-button:hover,
.readiness-gap-footer a:hover,
.readiness-text-link:hover {
  color: var(--blue-dark);
}

.readiness-requirement-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.readiness-requirement-stats > div {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fafc;
}

.readiness-requirement-stats span,
.readiness-requirement-stats small {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.readiness-requirement-stats strong {
  color: var(--navy);
  font-size: 26px;
  line-height: 1.05;
}

.readiness-requirement-stats .is-match { border-color: #bbf7d0; background: #f0fdf4; }
.readiness-requirement-stats .is-attention { border-color: #fde68a; background: #fffbeb; }
.readiness-requirement-stats .is-gap { border-color: #fecaca; background: #fef2f2; }
.readiness-requirement-stats .is-match strong { color: #047857; }
.readiness-requirement-stats .is-attention strong { color: #b45309; }
.readiness-requirement-stats .is-gap strong { color: #b91c1c; }

.readiness-coverage-bar {
  display: flex;
  height: 9px;
  overflow: hidden;
  margin-top: 15px;
  border-radius: 999px;
  background: #e2e8f0;
}

.readiness-coverage-bar .is-match { background: #10b981; }
.readiness-coverage-bar .is-attention { background: #f59e0b; }
.readiness-coverage-bar .is-gap { background: #ef4444; }

.readiness-requirements-summary > p {
  margin-top: 11px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.55;
}

.readiness-action-list {
  display: grid;
}

.readiness-action-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.readiness-action-row:first-child { border-top: 0; }

.readiness-action-number {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-light);
  font-size: 14px;
  font-weight: 900;
}

.readiness-action-row > div {
  display: grid;
  gap: 3px;
}

.readiness-action-row strong {
  color: var(--navy);
  font-size: 14px;
}

.readiness-action-row p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

.readiness-action-row small {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
}

.readiness-side-card h3 {
  margin-top: 5px;
  color: var(--navy);
  font-size: 20px;
  letter-spacing: -0.2px;
}

.readiness-decision-card > p {
  margin: 8px 0 15px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

.readiness-decision-list {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.readiness-decision-list > div {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #047857;
}

.readiness-decision-list > div.is-warning { color: #b45309; }
.readiness-decision-list > div.is-critical { color: #b91c1c; }

.readiness-decision-list span {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: currentColor;
  color: white;
  font-size: 14px;
  font-weight: 900;
}

.readiness-decision-list p {
  color: var(--text-light);
  font-size: 14px;
}

.readiness-text-link {
  display: block;
  margin-top: 12px;
  text-align: center;
}

.readiness-text-link-left {
  text-align: left;
}

.readiness-side-heading {
  margin-bottom: 10px;
}

.readiness-info-list {
  display: grid;
}

.readiness-info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.readiness-info-list > div:first-child { border-top: 0; }

.readiness-info-list dt {
  color: var(--text-light);
  font-size: 14px;
}

.readiness-info-list dd {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.readiness-trust-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 11px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 13px;
  background: #eff6ff;
}

.readiness-trust-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: #dbeafe;
  font-size: 16px;
  font-weight: 900;
}

.readiness-trust-card strong {
  color: #1e3a8a;
  font-size: 14px;
}

.readiness-trust-card p {
  margin-top: 3px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.readiness-modal-detail {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text);
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.55;
}

.readiness-modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .readiness-hero-card {
    grid-template-columns: 1fr;
  }
  .readiness-eligibility-panel {
    border-left: 0;
    border-top: 1px solid #fed7aa;
  }
  .readiness-layout {
    grid-template-columns: 1fr;
  }
  .readiness-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .readiness-trust-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .readiness-category-row {
    grid-template-columns: minmax(190px, 1fr) 100px 48px;
  }
  .readiness-category-state {
    display: none;
  }
  .readiness-gap-comparison {
    grid-template-columns: 1fr;
  }
  .readiness-requirement-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .readiness-page-heading,
  .readiness-section-heading-inline,
  .readiness-gap-title-row,
  .readiness-gap-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .readiness-page-heading {
    display: flex;
  }
  .readiness-score-row {
    grid-template-columns: 1fr;
  }
  .readiness-score-ring {
    margin: 0 auto;
  }
  .readiness-score-copy {
    text-align: center;
  }
  .readiness-score-heading,
  .readiness-summary-chips {
    justify-content: center;
  }
  .readiness-side-column {
    grid-template-columns: 1fr;
  }
  .readiness-trust-card {
    grid-column: auto;
  }
  .readiness-category-row {
    grid-template-columns: 1fr 50px;
    gap: 9px 12px;
  }
  .readiness-category-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .readiness-category-score {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .readiness-gap-card {
    grid-template-columns: 1fr;
  }
  .readiness-gap-marker {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 520px) {
  .readiness-hero-main,
  .readiness-eligibility-panel,
  .readiness-section-card,
  .readiness-side-card {
    padding: 19px;
  }
  .readiness-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .readiness-requirement-stats {
    grid-template-columns: 1fr 1fr;
  }
  .readiness-action-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .readiness-action-priority {
    grid-column: 2;
    justify-self: start;
  }
}

/* =========================================================
   REQUIREMENT CHECKLIST
   ========================================================= */

.requirements-content { max-width: 1500px; }

.requirements-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 22px;
}

.requirements-page-heading h1 {
  margin-top: 8px;
  color: var(--navy);
  font-size: 33px;
  line-height: 1.1;
  letter-spacing: -0.8px;
}

.requirements-page-heading p {
  margin-top: 6px;
  color: var(--text-light);
  font-size: 15px;
}

.requirements-heading-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
}

.requirements-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.requirements-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 19px 20px;
}

.requirements-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #cbd5e1;
}

.requirements-summary-card.is-matched::before { background: #10b981; }
.requirements-summary-card.is-attention::before { background: #f59e0b; }
.requirements-summary-card.is-gap::before { background: #ef4444; }

.requirements-summary-card span {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 750;
}

.requirements-summary-card strong {
  color: var(--navy);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.6px;
}

.requirements-summary-card small {
  color: var(--text-light);
  font-size: 14px;
}

.requirements-workspace-card { overflow: hidden; }

.requirements-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
}

.requirements-search-wrap {
  min-width: 250px;
  max-width: 430px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-light);
}

.requirements-search-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.requirements-search-wrap input {
  width: 100%;
  min-height: 39px;
  border: 0;
  outline: 0;
  color: var(--navy);
  background: transparent;
  font-size: 14px;
}

.requirements-search-wrap input::placeholder { color: var(--text-light); }

.requirements-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirements-filter-row select {
  min-height: 39px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: var(--white);
  font-size: 14px;
  font-weight: 650;
}

.requirements-filter-row select:focus { border-color: var(--blue); }

.requirements-toggle {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.requirements-toggle input { accent-color: var(--blue); }

.requirements-clear-button {
  min-height: 39px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.requirements-result-bar {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  color: var(--text-light);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.requirements-result-bar strong { color: var(--navy); }

.requirements-legend {
  display: flex;
  align-items: center;
  gap: 13px;
}

.requirements-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.requirements-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.requirements-legend i.is-matched { background: #10b981; }
.requirements-legend i.is-attention { background: #f59e0b; }
.requirements-legend i.is-gap { background: #ef4444; }

.requirements-table-wrap { overflow-x: auto; }

.requirements-table-header,
.requirements-row {
  min-width: 1000px;
  display: grid;
  grid-template-columns: 92px minmax(240px, 1.45fr) 112px minmax(220px, 1.15fr) minmax(160px, .9fr) 24px;
  gap: 12px;
  align-items: center;
}

.requirements-table-header {
  min-height: 38px;
  padding: 0 17px;
  color: var(--text-light);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.requirements-row {
  width: 100%;
  min-height: 68px;
  padding: 11px 17px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .16s ease;
}

.requirements-row:hover { background: #f8fafc; }
.requirements-row:last-child { border-bottom: 0; }

.requirements-status-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.requirements-status-cell small {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 750;
}

.requirements-status-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.requirements-status-icon.is-matched { color: #047857; background: #ecfdf5; }
.requirements-status-icon.is-attention { color: #b45309; background: #fffbeb; }
.requirements-status-icon.is-gap { color: #b91c1c; background: #fef2f2; }

.requirements-title-cell { display: grid; gap: 5px; }
.requirements-title-cell strong { color: var(--navy); font-size: 14px; line-height: 1.4; }
.requirements-title-cell small { color: var(--text-light); font-size: 13px; }

.requirements-mini-mandatory {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
}

.requirements-category-pill,
.requirements-mandatory-pill {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.requirements-evidence-cell {
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.requirements-evidence-cell.is-muted { color: #b91c1c; }

.requirements-source-cell { display: grid; gap: 2px; }
.requirements-source-cell strong { color: var(--navy); font-size: 14px; }
.requirements-source-cell small { color: var(--text-light); font-size: 13px; }
.requirements-row-chevron { color: var(--text-light); font-size: 23px; text-align: right; }

.requirements-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 40px;
  color: var(--text-light);
  text-align: center;
}

.requirements-empty[hidden],
.requirements-list[hidden] {
  display: none !important;
}

.requirements-empty > div { font-size: 33px; color: #cbd5e1; }
.requirements-empty strong { color: var(--navy); font-size: 17px; }
.requirements-empty p { margin-bottom: 8px; font-size: 14px; }

.requirements-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 19px;
  border: 1px solid #bfdbfe;
  border-radius: 13px;
  background: #eff6ff;
}

.requirements-footer-actions > div { display: grid; gap: 3px; }
.requirements-footer-actions strong { color: #1e3a8a; font-size: 14px; }
.requirements-footer-actions span { color: #64748b; font-size: 14px; }

.requirements-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(1px);
}

.requirements-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 80;
  width: min(520px, 94vw);
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: -24px 0 60px rgba(15, 23, 42, .14);
  transform: translateX(102%);
  transition: transform .22s ease;
}

.requirements-drawer.is-open { transform: translateX(0); }
body.requirements-drawer-open { overflow: hidden; }

.requirements-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.requirements-drawer-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.requirements-drawer-header h2 {
  color: var(--navy);
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -.35px;
}

.requirements-drawer-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  font-size: 20px;
}

.requirements-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.requirements-drawer-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 21px;
}

.requirements-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
}

.requirements-status-pill.is-matched { color: #047857; background: #ecfdf5; }
.requirements-status-pill.is-attention { color: #b45309; background: #fffbeb; }
.requirements-status-pill.is-gap { color: #b91c1c; background: #fef2f2; }
.requirements-mandatory-pill { color: #7c2d12; border-color: #fed7aa; background: #fff7ed; }
.requirements-mandatory-pill.is-optional { color: #475569; border-color: #e2e8f0; background: #f8fafc; }

.requirements-detail-block {
  padding: 17px 0;
  border-top: 1px solid var(--border);
}

.requirements-detail-block:first-of-type { border-top: 0; padding-top: 0; }
.requirements-detail-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.requirements-detail-block > p {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.65;
}

.requirements-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.requirements-detail-heading > span:last-child {
  font-size: 13px;
  font-weight: 850;
}
.requirements-detail-heading > span.is-matched { color: #047857; }
.requirements-detail-heading > span.is-attention { color: #b45309; }
.requirements-detail-heading > span.is-gap { color: #b91c1c; }

.requirements-evidence-box,
.requirements-action-box {
  padding: 12px 13px;
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.55;
}

.requirements-action-box {
  border: 1px solid #fed7aa;
  color: #7c2d12;
  background: #fff7ed;
}

.requirements-source-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.requirements-source-card:hover { border-color: #bfdbfe; background: #f8fbff; }
.requirements-source-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #b91c1c;
  background: #fef2f2;
  font-size: 13px;
  font-weight: 900;
}
.requirements-source-card span:nth-child(2) { display: grid; gap: 2px; }
.requirements-source-card strong { color: var(--navy); font-size: 12px; }
.requirements-source-card small { color: var(--text-light); font-size: 12px; }

.requirements-detail-block blockquote {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #cbd5e1;
  color: #64748b;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.6;
  font-style: italic;
}

.requirements-drawer-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.requirements-source-modal { max-width: 560px; }
.requirements-source-preview {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}
.requirements-source-preview span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.requirements-source-preview p { color: var(--navy); font-size: 14px; line-height: 1.65; }
.requirements-source-preview small { display: block; margin-top: 12px; color: #64748b; font-size: 14px; line-height: 1.55; }

@media (max-width: 1180px) {
  .requirements-toolbar { align-items: stretch; flex-direction: column; }
  .requirements-search-wrap { max-width: none; }
  .requirements-filter-row { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .requirements-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .requirements-page-heading { align-items: flex-start; flex-direction: column; }
  .requirements-page-heading .btn { width: 100%; }
  .requirements-filter-row { display: grid; grid-template-columns: 1fr 1fr; }
  .requirements-filter-row select { width: 100%; }
  .requirements-toggle { justify-content: center; }
  .requirements-result-bar { align-items: flex-start; flex-direction: column; padding-top: 11px; padding-bottom: 11px; }
  .requirements-footer-actions { align-items: stretch; flex-direction: column; }
  .requirements-footer-actions .btn { width: 100%; }
}

@media (max-width: 520px) {
  .requirements-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .requirements-summary-card { min-height: 96px; padding: 15px; }
  .requirements-filter-row { grid-template-columns: 1fr; }
  .requirements-heading-meta { align-items: flex-start; flex-direction: column; }
  .requirements-drawer-footer { flex-direction: column-reverse; }
  .requirements-drawer-footer .btn { width: 100%; }
}

/* =========================================================
   TENDER WORKSPACE
   ========================================================= */
.workspace-content { max-width: 1500px; }
.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding: 26px;
  margin-bottom: 16px;
}
.workspace-hero-main { min-width: 0; }
.workspace-hero-meta { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.workspace-hero-meta > div:last-child { min-width: 0; }
.workspace-hero-meta p { margin-top: 5px; color: var(--text-light); font-size: 14px; }
.workspace-badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-status-badge {
  display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px;
  color: #1d4ed8; background: #eff6ff; font-size: 14px; font-weight: 850;
}
.detail-badge-red { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.workspace-hero h1 { max-width: 820px; color: var(--navy); font-size: 31px; line-height: 1.15; letter-spacing: -.75px; }
.workspace-hero-copy { max-width: 820px; margin-top: 10px; color: var(--text-light); font-size: 15px; line-height: 1.65; }
.workspace-deadline-card { padding: 19px; border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; }
.workspace-deadline-card > span { display: block; color: var(--text-light); font-size: 13px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.workspace-deadline-card > strong { display: block; margin-top: 6px; color: var(--navy); font-size: 25px; }
.workspace-deadline-card > small { color: #b45309; font-size: 14px; font-weight: 800; }
.workspace-deadline-track { height: 6px; margin: 15px 0 11px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.workspace-deadline-track span { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.workspace-deadline-card p { color: var(--text-light); font-size: 14px; line-height: 1.5; }
.workspace-deadline-card p strong { color: var(--navy); }

.workspace-progress-grid { display: grid; grid-template-columns: 1.25fr repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.workspace-progress-card { min-height: 133px; padding: 17px; }
.workspace-progress-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.workspace-progress-card-top > span { color: var(--text-light); font-size: 14px; font-weight: 800; }
.workspace-progress-card-top > small { color: #2563eb; font-size: 13px; font-weight: 850; }
.workspace-progress-card-top a, .workspace-progress-card-top button { border: 0; padding: 0; color: var(--blue); background: transparent; cursor: pointer; font-size: 12px; font-weight: 850; }
.workspace-progress-card > strong { display: block; margin: 9px 0 7px; color: var(--navy); font-size: 28px; line-height: 1; }
.workspace-progress-card.is-analysis-pending > strong { font-size: 20px; line-height: 1.25; }
.workspace-progress-card > strong small { color: var(--text-light); font-size: 14px; font-weight: 750; }
.workspace-progress-card > p { margin-top: 8px; color: var(--text-light); font-size: 13px; line-height: 1.45; }
.workspace-progress-bar, .workspace-mini-bar { height: 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.workspace-progress-bar span, .workspace-mini-bar span { display:block; height:100%; border-radius:inherit; }
.workspace-progress-bar span, .workspace-mini-bar span.is-blue { background:#2563eb; }
.workspace-mini-bar span.is-green { background:#10b981; }
.workspace-progress-overall { border-color:#bfdbfe; background:linear-gradient(135deg,#eff6ff,#fff); }
.workspace-team-stack { display:flex; margin:10px 0 8px; }
.workspace-team-stack span { width:26px; height:26px; display:grid; place-items:center; margin-left:-5px; border:2px solid #fff; border-radius:9px; color:#1d4ed8; background:#eff6ff; font-size: 12px; font-weight:900; }
.workspace-team-stack span:first-child { margin-left:0; }

.workspace-risk-banner { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:13px; margin-bottom:14px; padding:14px 16px; border:1px solid #fecaca; border-radius:12px; background:#fff7f7; }
.workspace-risk-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; color:#b91c1c; background:#fee2e2; font-size:17px; font-weight:900; }
.workspace-risk-banner strong { display:block; color:#991b1b; font-size: 14px; }
.workspace-risk-banner p { margin-top:3px; color:#64748b; font-size: 14px; line-height:1.5; }
.workspace-risk-banner a { color:#b91c1c; font-size: 14px; font-weight:850; white-space:nowrap; }
.workspace-risk-banner.is-analysis-pending { border-color:#bfdbfe; background:#f8fbff; }
.workspace-risk-banner.is-analysis-pending .workspace-risk-icon { color:#1d4ed8; background:#dbeafe; }
.workspace-risk-banner.is-analysis-pending strong { color:#1e3a8a; }
.workspace-risk-banner.is-analysis-pending a { color:#1d4ed8; }
.workspace-risk-banner.is-resolved { border-color:#a7f3d0; background:#f0fdf4; }
.workspace-risk-banner.is-resolved .workspace-risk-icon { color:#047857; background:#d1fae5; }
.workspace-risk-banner.is-resolved strong { color:#065f46; }
.workspace-risk-banner.is-resolved a { color:#047857; }

.workspace-tabs { display:flex; align-items:center; gap:3px; overflow-x:auto; margin-bottom:14px; padding:5px; border:1px solid var(--border); border-radius:12px; background:#fff; }
.workspace-tab { min-height:36px; display:inline-flex; align-items:center; gap:6px; padding:0 13px; border:0; border-radius:8px; color:#64748b; background:transparent; cursor:pointer; font-size: 12px; font-weight:800; white-space:nowrap; }
.workspace-tab:hover { color:var(--navy); background:#f8fafc; }
.workspace-tab.is-active { color:#1d4ed8; background:#eff6ff; }
.workspace-tab span { min-width:18px; height:18px; display:inline-grid; place-items:center; padding:0 5px; border-radius:999px; color:#64748b; background:#f1f5f9; font-size: 12px; }
.workspace-tab.is-active span { color:#1d4ed8; background:#dbeafe; }
.workspace-tab-panel[hidden] { display:none !important; }
.workspace-overview-grid { display:grid; grid-template-columns:minmax(0,1.62fr) minmax(300px,.78fr); gap:14px; }
.workspace-main-column, .workspace-side-column { display:grid; align-content:start; gap:14px; min-width:0; }
.workspace-section-card { padding:20px; }
.workspace-direct-start {
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  align-items:start;
  gap:12px;
  border-color:#bfdbfe;
  background:linear-gradient(145deg,#f8fbff,#eff6ff);
}
.workspace-direct-start[hidden] { display:none !important; }
.workspace-direct-start-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:#fff; background:#2563eb; font-size:17px; font-weight:900; }
.workspace-direct-start h2 { color:var(--navy); font-size:19px; line-height:1.3; }
.workspace-direct-start p { margin-top:6px; color:#64748b; font-size:14px; line-height:1.55; }
.workspace-direct-start .btn { grid-column:2; justify-self:start; }
#workspace-analysis-attention[hidden],
#workspace-ai-card[hidden],
#workspace-analysis-activity[hidden],
#workspace-activity-card[hidden],
#workspace-requirements-tab[hidden],
#workspace-analyzed-documents[hidden] { display:none !important; }
.workspace-section-heading, .workspace-full-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.workspace-section-heading { margin-bottom:15px; }
.workspace-section-heading h2, .workspace-full-heading h2 { color:var(--navy); font-size:19px; letter-spacing:-.25px; }
.workspace-section-count { padding:5px 8px; border-radius:999px; color:#64748b; background:#f1f5f9; font-size: 13px; font-weight:800; }
.workspace-text-button { border:0; padding:0; color:var(--blue); background:transparent; cursor:pointer; font-size: 12px; font-weight:800; }

.workspace-attention-list { display:grid; gap:8px; }
.workspace-attention-item { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:11px; align-items:start; padding:13px; border:1px solid var(--border); border-radius:11px; }
.workspace-attention-item[hidden] { display:none !important; }
.workspace-attention-item.is-critical { border-color:#fecaca; background:#fffafa; }
.workspace-attention-item.is-warning { border-color:#fde68a; background:#fffdf5; }
.workspace-attention-status { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; font-size:14px; font-weight:900; }
.is-critical .workspace-attention-status { color:#b91c1c; background:#fee2e2; }
.is-warning .workspace-attention-status { color:#b45309; background:#fef3c7; }
.workspace-attention-title-row { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.workspace-attention-title-row strong { color:var(--navy); font-size: 14px; }
.workspace-attention-title-row span { padding:3px 6px; border-radius:999px; color:#991b1b; background:#fee2e2; font-size: 12px; font-weight:850; }
.is-warning .workspace-attention-title-row span { color:#92400e; background:#fef3c7; }
.workspace-attention-main > p { margin-top:4px; color:#64748b; font-size: 13px; line-height:1.5; }
.workspace-owner-row { display:flex; align-items:center; gap:6px; margin-top:9px; color:#64748b; font-size: 13px; }
.workspace-owner-row i { width:3px; height:3px; border-radius:50%; background:#cbd5e1; }
.workspace-avatar { width:22px; height:22px; display:grid; place-items:center; flex:0 0 auto; border-radius:7px; color:#2563eb; background:#eff6ff; font-size: 12px; font-weight:900; }
.workspace-attention-action { align-self:center; min-width:0; min-height:36px; padding:0 2px; border:0; color:var(--blue); background:transparent; cursor:pointer; font-size: 13px; font-weight:850; white-space:nowrap; }
.workspace-attention-action:hover { color:#1d4ed8; text-decoration:underline; text-underline-offset:3px; }
.workspace-attention-action:focus-visible { outline:3px solid rgba(37,99,235,.22); outline-offset:3px; border-radius:5px; }
.workspace-attention-empty { display:grid; grid-template-columns:34px minmax(0,1fr); gap:11px; align-items:center; padding:15px; border:1px solid #a7f3d0; border-radius:11px; background:#f0fdf4; }
.workspace-attention-empty[hidden] { display:none !important; }
.workspace-attention-empty > span { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; color:#047857; background:#d1fae5; font-size:16px; font-weight:900; }
.workspace-attention-empty strong { color:#065f46; font-size:14px; }
.workspace-attention-empty p { margin-top:3px; color:#64748b; font-size:13px; line-height:1.45; }

.workspace-quick-task-list { display:grid; }
.workspace-quick-task { display:grid; grid-template-columns:18px minmax(0,1fr) auto; gap:10px; align-items:center; padding:11px 0; border-top:1px solid #f1f5f9; cursor:pointer; }
.workspace-quick-task:first-child { border-top:0; }
.workspace-quick-task input { position:absolute; opacity:0; pointer-events:none; }
.workspace-quick-task-check { width:17px; height:17px; display:grid; place-items:center; border:1px solid #cbd5e1; border-radius:5px; background:#fff; }
.workspace-quick-task input:checked + .workspace-quick-task-check { border-color:#10b981; background:#10b981; }
.workspace-quick-task input:checked + .workspace-quick-task-check::after { content:"✓"; color:#fff; font-size: 14px; font-weight:900; }
.workspace-quick-task-copy { display:grid; gap:2px; }
.workspace-quick-task-copy strong { color:var(--navy); font-size: 14px; }
.workspace-quick-task-copy small { color: var(--text-light); font-size: 13px; }
.workspace-priority { display:inline-flex; align-items:center; padding:4px 6px; border-radius:999px; font-size: 12px; font-weight:850; font-style:normal; }
.workspace-priority.is-critical { color:#b91c1c; background:#fef2f2; }
.workspace-priority.is-high { color:#b45309; background:#fffbeb; }
.workspace-priority.is-normal { color:#475569; background:#f1f5f9; }
.workspace-task-empty { display:grid; justify-items:center; gap:4px; padding:30px; text-align:center; }
.workspace-task-empty strong { color:var(--navy); font-size: 14px; }
.workspace-task-empty span { color: var(--text-light); font-size: 13px; }

.workspace-milestone-list { display:grid; margin-bottom:15px; }
.workspace-milestone-list > div { display:grid; grid-template-columns:48px 1fr; gap:10px; position:relative; padding:9px 0; }
.workspace-milestone-list > div::before { content:""; position:absolute; left:5px; top:0; bottom:0; width:1px; background:#e2e8f0; }
.workspace-milestone-list > div::after { content:""; position:absolute; left:2px; top:14px; width:7px; height:7px; border-radius:50%; background:#cbd5e1; }
.workspace-milestone-list > div.is-next::after { background:#2563eb; box-shadow:0 0 0 4px #dbeafe; }
.workspace-milestone-list > div.is-deadline::after { background:#ef4444; }
.workspace-milestone-list > div > span { padding-left:14px; color:#64748b; font-size: 13px; font-weight:800; }
.workspace-milestone-list > div > div { display:grid; gap:2px; }
.workspace-milestone-list strong { color:var(--navy); font-size: 14px; }
.workspace-milestone-list small { color: var(--text-light); font-size: 13px; }
.workspace-wide-button { width:100%; }

.workspace-ai-card { padding:18px; border-color:#bfdbfe; background:linear-gradient(145deg,#f8fbff,#eff6ff); }
.workspace-ai-heading { display:flex; align-items:center; gap:10px; }
.workspace-ai-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; color:#fff; background:#2563eb; font-size:17px; }
.workspace-ai-heading > div { display:grid; gap:2px; }
.workspace-ai-heading strong { color:var(--navy); font-size: 14px; }
.workspace-ai-heading small { color:#64748b; font-size: 13px; }
.workspace-ai-prompt { margin:12px 0; color:#64748b; font-size: 14px; line-height:1.55; }
.workspace-ai-chips { display:grid; gap:6px; }
.workspace-ai-chips button { padding:8px 10px; border:1px solid #bfdbfe; border-radius:9px; color:#1d4ed8; background:#fff; cursor:pointer; text-align:left; font-size: 12px; font-weight:750; }
.workspace-ai-chips button:hover { background:#eff6ff; }
.workspace-ai-answer { margin-top:10px; padding:11px 12px; border-radius:9px; color:#334155; background:#fff; font-size: 13px; line-height:1.6; }
.workspace-ai-answer[hidden] { display:none !important; }

.workspace-activity-list { display:grid; }
.workspace-activity-list > div { display:grid; grid-template-columns:24px 1fr; gap:9px; padding:10px 0; border-top:1px solid #f1f5f9; }
.workspace-activity-list > div:first-child { border-top:0; }
.workspace-activity-list p { color:#64748b; font-size: 13px; line-height:1.5; }
.workspace-activity-list p strong, .workspace-activity-list p b { color:var(--navy); }
.workspace-activity-list small { display:block; margin-top:2px; color: var(--text-light); font-size: 12px; }

.workspace-full-card { padding:22px; }
.workspace-full-heading { align-items:center; padding-bottom:18px; border-bottom:1px solid var(--border); }
.workspace-full-heading p { margin-top:4px; color:#64748b; font-size: 14px; }
.workspace-full-heading-stat { display:grid; text-align:right; }
.workspace-full-heading-stat strong { color:var(--navy); font-size:21px; }
.workspace-full-heading-stat span { color: var(--text-light); font-size: 13px; }
.workspace-task-toolbar { display:flex; align-items:center; gap:6px; padding:14px 0; }
.workspace-filter-chip { min-height:30px; padding:0 10px; border:1px solid var(--border); border-radius:8px; color:#64748b; background:#fff; cursor:pointer; font-size: 12px; font-weight:800; }
.workspace-filter-chip.is-active { color:#1d4ed8; border-color:#bfdbfe; background:#eff6ff; }
.workspace-task-toolbar select { margin-left:auto; min-height:32px; padding:0 28px 0 9px; border:1px solid var(--border); border-radius:8px; color:#475569; background:#fff; font-size: 13px; }
.workspace-task-header, .workspace-task-row { display:grid; grid-template-columns:34px minmax(250px,2fr) minmax(150px,1fr) 80px 80px; gap:10px; align-items:center; }
.workspace-task-header { padding:8px 10px; color: var(--text-light); background:#f8fafc; font-size: 12px; font-weight:850; text-transform:uppercase; }
.workspace-task-row { min-height:52px; padding:8px 10px; border-top:1px solid #f1f5f9; color:#475569; cursor:pointer; font-size: 13px; }
.workspace-task-row:hover { background:#fbfdff; }
.workspace-task-row.is-complete { opacity:.62; }
.workspace-task-row > span:first-child { display:grid; place-items:center; }
.workspace-task-row input { position:absolute; opacity:0; }
.workspace-task-row > span:first-child i { width:17px; height:17px; display:grid; place-items:center; border:1px solid #cbd5e1; border-radius:5px; background:#fff; }
.workspace-task-row input:checked + i { border-color:#10b981; background:#10b981; }
.workspace-task-row input:checked + i::after { content:"✓"; color:#fff; font-size: 14px; font-weight:900; }
.workspace-task-row > span:nth-child(2) { display:grid; gap:2px; }
.workspace-task-row > span:nth-child(2) strong { color:var(--navy); font-size: 14px; }
.workspace-task-row.is-complete > span:nth-child(2) strong { text-decoration:line-through; }
.workspace-task-row > span:nth-child(2) small { color: var(--text-light); font-size: 12px; }
.workspace-task-owner { display:flex; align-items:center; gap:7px; }
.workspace-task-owner b { width:23px; height:23px; display:grid; place-items:center; border-radius:7px; color:#2563eb; background:#eff6ff; font-size: 12px; }

.workspace-document-groups { display:grid; gap:20px; padding-top:18px; }
.workspace-direct-empty { margin-top:18px; padding:28px; border:1px dashed #bfdbfe; border-radius:12px; display:grid; justify-items:center; gap:7px; background:#f8fbff; text-align:center; }
.workspace-direct-empty[hidden] { display:none !important; }
.workspace-direct-empty-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:11px; color:#1d4ed8; background:#dbeafe; font-size:12px; font-weight:900; }
.workspace-direct-empty strong { color:var(--navy); font-size:16px; }
.workspace-direct-empty p { max-width:560px; color:#64748b; font-size:14px; line-height:1.55; }
.workspace-direct-empty .btn { margin-top:5px; }
.workspace-document-group-title { display:flex; justify-content:space-between; gap:14px; padding:0 3px 8px; }
.workspace-document-group-title strong { color:var(--navy); font-size: 14px; }
.workspace-document-group-title span { color: var(--text-light); font-size: 13px; }
.workspace-document-row { width:100%; display:grid; grid-template-columns:36px minmax(260px,2fr) minmax(130px,1fr) 100px 16px; gap:10px; align-items:center; min-height:58px; padding:9px 10px; border:0; border-top:1px solid #f1f5f9; color:#64748b; background:#fff; cursor:pointer; text-align:left; }
.workspace-document-row:hover { background:#fbfdff; }
.workspace-document-row > span:nth-child(2) { display:grid; gap:2px; }
.workspace-document-row strong { color:var(--navy); font-size: 12px; }
.workspace-document-row small { color: var(--text-light); font-size: 12px; }
.workspace-doc-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:8px; color:#475569; background:#f1f5f9; font-size: 12px; font-weight:900; }
.workspace-doc-owner { font-size: 13px; }
.workspace-doc-status { width:fit-content; padding:4px 6px; border-radius:999px; color:#b91c1c; background:#fef2f2; font-size: 12px; font-weight:850; }
.workspace-document-row.is-warning .workspace-doc-status { color:#b45309; background:#fffbeb; }
.workspace-doc-status.is-ready { color:#047857; background:#ecfdf5; }

.workspace-requirement-list { display:grid; padding-top:12px; }
.workspace-requirement-row { display:grid; grid-template-columns:64px minmax(260px,1.7fr) minmax(180px,1fr) 100px 14px; gap:10px; align-items:center; min-height:58px; padding:9px 8px; border-top:1px solid #f1f5f9; color:#64748b; }
.workspace-requirement-row:first-child { border-top:0; }
.workspace-requirement-row:hover { background:#fbfdff; }
.workspace-requirement-row > span { width:fit-content; padding:4px 6px; border-radius:999px; color:#b91c1c; background:#fef2f2; font-size: 12px; font-weight:850; }
.workspace-requirement-row.is-attention > span { color:#b45309; background:#fffbeb; }
.workspace-requirement-row > div { display:grid; gap:2px; }
.workspace-requirement-row strong { color:var(--navy); font-size: 14px; }
.workspace-requirement-row small { color: var(--text-light); font-size: 12px; }
.workspace-requirement-row p, .workspace-requirement-row b { font-size: 13px; font-weight:500; }
.workspace-requirement-row b { color:#64748b; }
.workspace-requirement-row i { color: var(--text-light); font-size:21px; font-style:normal; }

.workspace-timeline { max-width:820px; padding:24px 8px 8px; }
.workspace-timeline-item { position:relative; display:grid; grid-template-columns:30px 1fr; gap:14px; padding:0 0 24px; }
.workspace-timeline-item:not(:last-child)::before { content:""; position:absolute; left:14px; top:23px; bottom:0; width:1px; background:#e2e8f0; }
.workspace-timeline-item > span { width:29px; height:29px; display:grid; place-items:center; z-index:1; border:2px solid #e2e8f0; border-radius:50%; color: var(--text-light); background:#fff; font-size: 14px; font-weight:900; }
.workspace-timeline-item.is-complete > span { color:#fff; border-color:#10b981; background:#10b981; }
.workspace-timeline-item.is-next > span { border-color:#2563eb; box-shadow:0 0 0 5px #dbeafe; }
.workspace-timeline-item.is-next > span::after { content:""; width:7px; height:7px; border-radius:50%; background:#2563eb; }
.workspace-timeline-item.is-deadline > span { border-color:#ef4444; }
.workspace-timeline-item.is-deadline > span::after { content:""; width:7px; height:7px; border-radius:50%; background:#ef4444; }
.workspace-timeline-item > div { padding-top:2px; }
.workspace-timeline-item time { display:block; margin-bottom:4px; color: var(--text-light); font-size: 13px; font-weight:800; }
.workspace-timeline-item strong { color:var(--navy); font-size: 14px; }
.workspace-timeline-item p { margin-top:4px; color:#64748b; font-size: 13px; line-height:1.5; }

.workspace-team-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding-top:18px; }
.workspace-team-card { position:relative; display:grid; grid-template-columns:42px 1fr; gap:11px; min-height:112px; padding:15px; border:1px solid var(--border); border-radius:11px; }
.workspace-team-avatar { width:40px; height:40px; display:grid; place-items:center; border-radius:11px; color:#2563eb; background:#eff6ff; font-size: 14px; font-weight:900; }
.workspace-team-card > div { display:grid; align-content:start; gap:3px; padding-right:56px; }
.workspace-team-card strong { color:var(--navy); font-size: 14px; }
.workspace-team-card p { color:#64748b; font-size: 13px; }
.workspace-team-card small { margin-top:4px; color: var(--text-light); font-size: 12px; }
.workspace-role-badge { position:absolute; top:13px; right:13px; padding:4px 7px; border-radius:999px; color:#1d4ed8; background:#eff6ff; font-size: 12px; font-weight:850; }
.workspace-role-badge.is-member { color:#64748b; background:#f1f5f9; }
.workspace-modal { max-width:520px; }
.workspace-action-modal { width:min(640px,calc(100vw - 36px)); max-height:calc(100vh - 40px); overflow-y:auto; text-align:left; }
.workspace-action-modal-heading { display:flex; align-items:center; gap:12px; padding-right:34px; }
.workspace-action-modal-heading .detail-modal-icon { flex:0 0 auto; margin:0; }
.workspace-action-modal-heading .detail-kicker { margin-bottom:2px; }
.workspace-action-modal > p { margin-top:13px; }
.workspace-action-form { display:grid; gap:14px; margin-top:18px; }
.workspace-action-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.workspace-action-field { display:grid; gap:6px; }
.workspace-action-field.is-wide { grid-column:1 / -1; }
.workspace-action-field > span,
.workspace-action-upload > span:first-child { color:var(--navy); font-size:13px; font-weight:800; }
.workspace-action-field input,
.workspace-action-field select { width:100%; min-height:44px; padding:0 11px; border:1px solid var(--border); border-radius:10px; outline:none; color:var(--navy); background:#fff; font-size:14px; }
.workspace-action-field input:focus,
.workspace-action-field select:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(37,99,235,.08); }
.workspace-action-upload { display:grid; gap:6px; cursor:pointer; }
.workspace-action-upload input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.workspace-action-upload-box { min-height:88px; display:grid; place-items:center; align-content:center; gap:3px; padding:14px; border:1px dashed #93c5fd; border-radius:11px; color:#2563eb; background:#f8fbff; text-align:center; }
.workspace-action-upload:hover .workspace-action-upload-box { border-color:#2563eb; background:#eff6ff; }
.workspace-action-upload input:focus-visible + .workspace-action-upload-box { outline:3px solid rgba(37,99,235,.2); outline-offset:2px; }
.workspace-action-upload-box strong { font-size:14px; }
.workspace-action-upload-box small { color:#64748b; font-size:12px; }
.workspace-action-modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:2px; }

@media (max-width: 1250px) {
  .workspace-progress-grid { grid-template-columns:repeat(3,1fr); }
  .workspace-progress-overall { grid-column:span 1; }
  .workspace-team-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 1050px) {
  .workspace-hero { grid-template-columns:1fr; }
  .workspace-overview-grid { grid-template-columns:1fr; }
  .workspace-side-column { grid-template-columns:repeat(2,1fr); }
  .workspace-ai-card { grid-row:span 1; }
}
@media (max-width: 900px) {
  .workspace-progress-grid { grid-template-columns:repeat(2,1fr); }
  .workspace-progress-overall { grid-column:span 2; }
  .workspace-task-header { display:none; }
  .workspace-task-row { grid-template-columns:32px 1fr auto; gap:8px; padding:11px 7px; }
  .workspace-task-row > span:nth-child(3) { grid-column:2; }
  .workspace-task-row > span:nth-child(4), .workspace-task-row > span:nth-child(5) { grid-row:1 / span 2; }
  .workspace-document-row, .workspace-requirement-row { grid-template-columns:36px minmax(0,1fr) auto; }
  .workspace-document-row > span:nth-child(3), .workspace-document-row > span:nth-child(5), .workspace-requirement-row > p, .workspace-requirement-row > b { display:none; }
  .workspace-document-row > span:nth-child(4) { justify-self:end; }
  .workspace-requirement-row > span { grid-column:1; }
  .workspace-requirement-row > div { grid-column:2; }
  .workspace-requirement-row > i { grid-column:3; }
}
@media (max-width: 760px) {
  .workspace-risk-banner { grid-template-columns:32px 1fr; }
  .workspace-risk-banner a { grid-column:2; }
  .workspace-side-column { grid-template-columns:1fr; }
  .workspace-full-heading { align-items:flex-start; flex-direction:column; }
  .workspace-full-heading-stat { text-align:left; }
  .workspace-task-toolbar { align-items:stretch; flex-wrap:wrap; }
  .workspace-task-toolbar select { width:100%; margin-left:0; }
  .workspace-team-grid { grid-template-columns:1fr; }
}
@media (max-width: 520px) {
  .workspace-hero { padding:19px; }
  .workspace-hero h1 { font-size:26px; }
  .workspace-progress-grid { grid-template-columns:1fr 1fr; }
  .workspace-progress-overall { grid-column:span 2; }
  .workspace-progress-card { min-height:120px; }
  .workspace-attention-item { grid-template-columns:28px 1fr; }
  .workspace-attention-action { grid-column:2; justify-self:start; }
  .workspace-action-fields { grid-template-columns:1fr; }
  .workspace-action-field.is-wide { grid-column:auto; }
  .workspace-action-modal-actions { flex-direction:column-reverse; }
  .workspace-action-modal-actions .btn { width:100%; }
  .workspace-quick-task { grid-template-columns:18px 1fr; }
  .workspace-quick-task .workspace-priority { grid-column:2; width:fit-content; }
}

/* =========================================================
   MY TENDERS
   Portfolio view across evaluating, preparing, submitted,
   and completed opportunities.
   ========================================================= */

.myt-content { max-width: 1500px; }
.myt-page-header { align-items: center; }
.myt-page-header .btn { gap: 8px; white-space: nowrap; }

.myt-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.myt-summary-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
}

.myt-summary-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
}
.myt-summary-icon.is-blue { color: var(--blue); background: var(--blue-light); }
.myt-summary-icon.is-violet { color: #7c3aed; background: #f5f3ff; }
.myt-summary-icon.is-green { color: #059669; background: #ecfdf5; }
.myt-summary-icon.is-amber { color: #d97706; background: #fffbeb; }

.myt-summary-card > div:last-child { min-width: 0; display: grid; gap: 2px; }
.myt-summary-card span { color: var(--text-light); font-size: 14px; font-weight: 750; }
.myt-summary-card strong { color: var(--navy); font-size: 27px; line-height: 1.1; letter-spacing: -0.5px; }
.myt-summary-card small { color: var(--text-light); font-size: 14px; line-height: 1.4; }

.myt-portfolio-card { overflow: hidden; }

.myt-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 18px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.myt-tab {
  position: relative;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.myt-tab::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 10px;
  right: 10px;
  bottom: -1px;
  border-radius: 999px;
  background: transparent;
}

.myt-tab span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.myt-tab:hover { color: var(--navy); }
.myt-tab.is-active { color: var(--blue); }
.myt-tab.is-active::after { background: var(--blue); }
.myt-tab.is-active span { color: var(--blue); background: var(--blue-light); }

.myt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.myt-search-wrap {
  position: relative;
  width: min(430px, 100%);
}
.myt-search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}
.myt-search-wrap input,
.myt-toolbar select {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--white);
  color: var(--navy);
  font-size: 15px;
}
.myt-search-wrap input { width: 100%; padding: 0 13px 0 39px; }
.myt-toolbar select { padding: 0 34px 0 12px; cursor: pointer; }
.myt-search-wrap input:focus,
.myt-toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
.myt-toolbar-filters { display: flex; align-items: center; gap: 8px; }

.myt-result-bar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
  color: var(--text-light);
  font-size: 14px;
}
.myt-result-bar strong { color: var(--navy); }
.myt-result-note { color: var(--text-light); }

.myt-table-wrap { min-width: 0; }
.myt-table-head,
.myt-row-main {
  display: grid;
  grid-template-columns: minmax(290px, 2.1fr) minmax(120px, .8fr) minmax(145px, .9fr) minmax(150px, .95fr) minmax(140px, .85fr) 22px;
  gap: 18px;
  align-items: center;
}

.myt-table-head {
  min-height: 39px;
  padding: 0 18px;
  color: var(--text-light);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.myt-row { border-bottom: 1px solid var(--border); }
.myt-row:last-child { border-bottom: 0; }
.myt-row-main {
  width: 100%;
  min-height: 92px;
  padding: 14px 18px;
  border: 0;
  background: var(--white);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}
.myt-row-main:hover { background: #fbfdff; }

.myt-tender-cell { min-width: 0; display: flex; align-items: center; gap: 12px; }
.myt-buyer-mark,
.myt-modal-buyer {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--navy);
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.myt-buyer-telkom { color: #dc2626; background: #fef2f2; }
.myt-buyer-dki { color: #2563eb; background: #eff6ff; }
.myt-buyer-komdigi { color: #7c3aed; background: #f5f3ff; }
.myt-buyer-jm { color: #0f766e; background: #f0fdfa; }
.myt-buyer-pertamina { color: #dc2626; background: #fff1f2; }
.myt-buyer-bi { color: #1d4ed8; background: #eff6ff; }

.myt-tender-copy { min-width: 0; display: grid; gap: 4px; }
.myt-tender-copy strong { color: var(--navy); font-size: 15px; line-height: 1.4; }
.myt-tender-copy small { color: var(--text-light); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.myt-status-pill,
.myt-modal-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
}
.myt-status-pill.is-evaluating,
.myt-modal-status.is-evaluating { color: #2563eb; background: #eff6ff; }
.myt-status-pill.is-preparing,
.myt-modal-status.is-preparing { color: #7c3aed; background: #f5f3ff; }
.myt-status-pill.is-submitted,
.myt-modal-status.is-submitted { color: #0369a1; background: #f0f9ff; }
.myt-status-pill.is-completed,
.myt-modal-status.is-completed { color: #475569; background: #f1f5f9; }

.myt-health { display: block; margin-top: 6px; padding-left: 8px; font-size: 14px; font-weight: 750; }
.myt-health.is-risk { color: #dc2626; }
.myt-health.is-attention { color: #d97706; }
.myt-health.is-good, .myt-health.is-won { color: #059669; }
.myt-health.is-submitted { color: #0284c7; }
.myt-health.is-lost, .myt-health.is-neutral { color: #64748b; }

.myt-owner-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.myt-owner-avatar {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 9px; color: var(--blue); background: var(--blue-light); font-size: 14px; font-weight: 850;
}
.myt-owner-cell > span:last-child,
.myt-date-cell,
.myt-progress-cell > span:first-child { min-width: 0; display: grid; gap: 3px; }
.myt-owner-cell strong,
.myt-date-cell strong,
.myt-progress-cell strong { color: var(--navy); font-size: 14px; }
.myt-owner-cell small,
.myt-date-cell small,
.myt-progress-cell small { color: var(--text-light); font-size: 14px; line-height: 1.35; }

.myt-progress-cell { display: grid; gap: 7px; }
.myt-progress-cell > span:first-child { grid-template-columns: auto 1fr; align-items: baseline; gap: 6px; }
.myt-progress-track { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.myt-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.myt-row-chevron { color: var(--text-light); font-size: 26px; line-height: 1; text-align: right; }

.myt-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 40px;
  text-align: center;
}
.myt-empty[hidden], .myt-list[hidden] { display: none !important; }
.myt-empty > div { color: #bfdbfe; font-size: 27px; }
.myt-empty strong { color: var(--navy); font-size: 18px; }
.myt-empty p { color: var(--text-light); font-size: 14px; }
.myt-empty .btn { margin-top: 6px; }

.myt-modal { width: min(560px, calc(100vw - 36px)); text-align: left; }
.myt-modal-buyer { margin-bottom: 14px; }
.myt-modal-status { margin-bottom: 12px; }
.myt-modal > h2 { margin-bottom: 5px; }
.myt-modal > p#myt-modal-buyer-name { color: var(--text-light); font-size: 14px; }
.myt-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.myt-modal-grid > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.myt-modal-grid span { color: var(--text-light); font-size: 14px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.myt-modal-grid strong { color: var(--navy); font-size: 14px; }
.myt-modal-copy { color: var(--text); font-size: 15px; line-height: 1.65; }
.myt-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

@media (max-width: 1250px) {
  .myt-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .myt-table-head { display: none; }
  .myt-row-main {
    grid-template-columns: minmax(260px, 1.8fr) 120px 145px 150px 120px 18px;
    overflow-x: auto;
  }
}

@media (max-width: 980px) {
  .myt-row-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
  }
  .myt-row-main > span:nth-child(2),
  .myt-row-main > span:nth-child(3),
  .myt-row-main > span:nth-child(4),
  .myt-row-main > span:nth-child(5) { grid-column: 1 / -1; }
  .myt-row-main > span:nth-child(2) { display: flex; align-items: center; gap: 8px; }
  .myt-row-main > span:nth-child(2) .myt-health { margin-top: 0; padding-left: 0; }
  .myt-row-chevron { grid-column: 2; grid-row: 1; }
  .myt-progress-cell { max-width: 300px; }
}

@media (max-width: 760px) {
  .myt-page-header { align-items: flex-start; flex-direction: column; }
  .myt-page-header .btn { width: 100%; }
  .myt-summary-grid { grid-template-columns: 1fr; }
  .myt-toolbar { align-items: stretch; flex-direction: column; }
  .myt-search-wrap { width: 100%; }
  .myt-toolbar-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .myt-toolbar select { width: 100%; }
  .myt-result-note { display: none; }
}

@media (max-width: 480px) {
  .myt-tabs { padding-left: 10px; padding-right: 10px; }
  .myt-toolbar { padding: 14px; }
  .myt-toolbar-filters { grid-template-columns: 1fr; }
  .myt-row-main { padding: 14px; }
  .myt-modal-grid { grid-template-columns: 1fr; }
  .myt-modal-actions { flex-direction: column-reverse; }
  .myt-modal-actions .btn { width: 100%; }
}

/* =========================================================
   DOCUMENT LIBRARY
   ========================================================= */

.documents-content { max-width: 1500px; }
.documents-page-header { align-items: flex-end; }
.documents-page-header .btn { gap: 8px; }

.documents-info-strip {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}
.documents-info-icon {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; background: #dbeafe; color: var(--blue); font-size: 15px; font-weight: 900;
}
.documents-info-strip strong { display: block; margin-bottom: 2px; color: #1e3a8a; font-size: 14px; }
.documents-info-strip p { color: #475569; font-size: 14px; line-height: 1.55; }

.documents-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.documents-summary-card { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 17px; }
.documents-summary-icon {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 11px;
}
.documents-summary-icon.is-blue { color: #2563eb; background: #eff6ff; }
.documents-summary-icon.is-green { color: #059669; background: #ecfdf5; }
.documents-summary-icon.is-amber { color: #d97706; background: #fffbeb; }
.documents-summary-icon.is-slate { color: #475569; background: #f1f5f9; }
.documents-summary-card > div:last-child { min-width: 0; display: grid; gap: 1px; }
.documents-summary-card span { color: var(--text-light); font-size: 14px; font-weight: 700; }
.documents-summary-card strong { color: var(--navy); font-size: 25px; line-height: 1.1; }
.documents-summary-card small { color: var(--text-light); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.documents-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
.documents-main-column { min-width: 0; }
.documents-library-card { overflow: hidden; }
.documents-side-column { display: grid; gap: 14px; position: sticky; top: 86px; }

.documents-tabs {
  display: flex;
  align-items: center;
  gap: 1px;
  overflow-x: auto;
  padding: 0 15px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.documents-tabs::-webkit-scrollbar { display: none; }
.documents-tab {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.documents-tab::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 0; height: 2px; border-radius: 999px; background: transparent;
}
.documents-tab span {
  min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px;
  border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 12px; font-weight: 850;
}
.documents-tab:hover { color: var(--navy); }
.documents-tab.is-active { color: var(--blue); }
.documents-tab.is-active::after { background: var(--blue); }
.documents-tab.is-active span { color: var(--blue); background: var(--blue-light); }

.documents-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
}
.documents-search-wrap { position: relative; width: min(430px, 100%); }
.documents-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }
.documents-search-wrap input,
.documents-toolbar select,
.documents-upload-form input,
.documents-upload-form select {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
}
.documents-search-wrap input { width: 100%; padding: 0 12px 0 38px; }
.documents-toolbar select { min-width: 130px; padding: 0 31px 0 11px; cursor: pointer; }
.documents-search-wrap input:focus,
.documents-toolbar select:focus,
.documents-upload-form input:focus,
.documents-upload-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.documents-toolbar-filters { display: flex; align-items: center; gap: 7px; }

.documents-result-bar {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 15px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
  color: var(--text-light);
  font-size: 14px;
}
.documents-result-bar strong { color: var(--navy); }
.documents-result-note { color: var(--text-light); }

.documents-table-head,
.documents-row {
  display: grid;
  grid-template-columns: minmax(245px, 1.7fr) minmax(110px, .75fr) minmax(120px, .85fr) minmax(115px, .8fr) 70px 105px 18px;
  gap: 14px;
  align-items: center;
}
.documents-table-head {
  min-height: 38px;
  padding: 0 15px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.documents-row {
  width: 100%;
  min-height: 76px;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}
.documents-row:last-child { border-bottom: 0; }
.documents-row:hover { background: #fbfdff; }

.documents-name-cell { min-width: 0; display: flex; align-items: center; gap: 10px; }
.documents-name-cell > span:last-child { min-width: 0; display: grid; gap: 3px; }
.documents-name-cell strong { color: var(--navy); font-size: 14px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.documents-name-cell small { color: var(--text-light); font-size: 13px; }
.documents-file-icon {
  width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 9px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 900; letter-spacing: .02em;
}
.documents-file-icon.is-pdf { color: #dc2626; background: #fef2f2; }
.documents-file-icon.is-zip { color: #7c3aed; background: #f5f3ff; }
.documents-file-icon.is-doc,
.documents-file-icon.is-docx { color: #2563eb; background: #eff6ff; }
.documents-file-icon.is-xls,
.documents-file-icon.is-xlsx { color: #059669; background: #ecfdf5; }
.documents-category-pill {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px;
  border: 1px solid var(--border); border-radius: 999px; color: #64748b; background: #f8fafc; font-size: 13px; font-weight: 800;
}
.documents-status-pill {
  width: fit-content; display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px;
  border-radius: 999px; font-size: 13px; font-weight: 850;
}
.documents-status-pill i { font-style: normal; }
.documents-status-pill.is-ready { color: #047857; background: #ecfdf5; }
.documents-status-pill.is-expiring { color: #b45309; background: #fffbeb; }
.documents-status-pill.is-review { color: #475569; background: #f1f5f9; }
.documents-status-note { display: block; margin-top: 3px; color: #d97706; font-size: 12px; }
.documents-owner-cell { min-width: 0; display: flex; align-items: center; gap: 7px; }
.documents-owner-avatar {
  width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 8px; color: var(--blue); background: var(--blue-light); font-size: 12px; font-weight: 900;
}
.documents-owner-cell strong { min-width: 0; color: var(--navy); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.documents-usage-cell,
.documents-updated-cell { display: grid; gap: 2px; }
.documents-usage-cell strong,
.documents-updated-cell strong { color: var(--navy); font-size: 14px; }
.documents-usage-cell small,
.documents-updated-cell small { color: var(--text-light); font-size: 12px; }
.documents-row-chevron { color: var(--text-light); font-size: 23px; text-align: right; }

.documents-empty {
  min-height: 330px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 36px; text-align: center;
}
.documents-empty[hidden], .documents-list[hidden] { display: none !important; }
.documents-empty > div { color: #bfdbfe; font-size: 26px; }
.documents-empty strong { color: var(--navy); font-size: 17px; }
.documents-empty p { color: var(--text-light); font-size: 14px; }
.documents-empty .btn { margin-top: 5px; }

.documents-action-card,
.documents-usage-card { padding: 17px; }
.documents-side-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.documents-side-heading.compact { margin-bottom: 14px; }
.documents-side-kicker { display: block; margin-bottom: 4px; color: var(--text-light); font-size: 13px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.documents-side-heading h2 { color: var(--navy); font-size: 18px; line-height: 1.25; }
.documents-action-count {
  width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 8px; color: #dc2626; background: #fef2f2; font-size: 14px; font-weight: 900;
}
.documents-side-intro { margin-bottom: 13px; color: var(--text-light); font-size: 14px; line-height: 1.55; }
.documents-action-list { display: grid; gap: 7px; }
.documents-action-item {
  width: 100%; display: grid; grid-template-columns: 28px 1fr 12px; gap: 9px; align-items: center;
  padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: inherit; text-align: left; cursor: pointer;
}
.documents-action-item:hover { background: #fbfdff; }
.documents-action-item > span:nth-child(2) { display: grid; gap: 2px; }
.documents-action-item strong { color: var(--navy); font-size: 12px; line-height: 1.35; }
.documents-action-item small { color: var(--text-light); font-size: 12px; line-height: 1.35; }
.documents-action-item > span:last-child { color: var(--text-light); font-size: 18px; }
.documents-action-symbol {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 900;
}
.documents-action-item.is-critical .documents-action-symbol { color: #dc2626; background: #fef2f2; }
.documents-action-item.is-warning .documents-action-symbol { color: #d97706; background: #fffbeb; }
.documents-side-button { width: 100%; margin-top: 12px; }

.documents-usage-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 11px; }
.documents-usage-row > span { min-width: 0; display: grid; gap: 2px; }
.documents-usage-row strong { color: var(--navy); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.documents-usage-row small { color: var(--text-light); font-size: 12px; }
.documents-usage-row b { flex: 0 0 auto; color: var(--navy); font-size: 14px; }
.documents-usage-progress { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.documents-usage-progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.documents-usage-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-light); font-size: 13px; line-height: 1.5; }

.documents-drawer-backdrop {
  position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 42, .24); backdrop-filter: blur(1px);
}
.documents-drawer-backdrop[hidden] { display: none !important; }
.documents-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(470px, 100vw);
  display: flex; flex-direction: column; background: var(--white); border-left: 1px solid var(--border);
  box-shadow: -22px 0 60px rgba(15, 23, 42, .12); transform: translateX(105%); transition: transform .22s ease;
}
.documents-drawer.is-open { transform: translateX(0); }
.documents-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--border); }
.documents-drawer-kicker { display: block; margin-bottom: 5px; color: var(--blue); font-size: 13px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.documents-drawer-header h2 { color: var(--navy); font-size: 21px; line-height: 1.3; }
.documents-drawer-close { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 9px; background: var(--white); color: #64748b; cursor: pointer; font-size: 19px; }
.documents-drawer-close:hover { color: var(--navy); background: #f8fafc; }
.documents-drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.documents-drawer-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.documents-file-type { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 13px; font-weight: 850; }
.documents-uploaded-pill { display:inline-flex; min-height:24px; align-items:center; padding:0 8px; border-radius:999px; color:#1d4ed8; background:#eff6ff; font-size:13px; font-weight:850; }
.documents-uploaded-pill[hidden] { display:none !important; }
.documents-drawer-section { padding: 15px 0; border-top: 1px solid var(--border); }
.documents-drawer-section:first-of-type { border-top: 0; padding-top: 0; }
.documents-drawer-section > span { display: block; margin-bottom: 9px; color: var(--text-light); font-size: 13px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.documents-drawer-section > p { color: var(--text); font-size: 14px; line-height: 1.65; }
.documents-drawer-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.documents-drawer-meta > div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; }
.documents-drawer-meta dt { color: var(--text-light); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.documents-drawer-meta dd { color: var(--navy); font-size: 14px; font-weight: 750; }
.documents-drawer-usage { display: grid; gap: 7px; }
.documents-drawer-usage span { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; }
.documents-drawer-usage i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.documents-drawer-usage p { color: var(--text-light); font-size: 14px; }
.documents-drawer-alert { padding: 11px; border: 1px solid #fde68a; border-radius: 9px; background: #fffbeb; color: #92400e; font-size: 14px; line-height: 1.55; }
.documents-drawer-footer { display:grid; gap:10px; padding:16px 22px; border-top:1px solid var(--border); background:#fbfdff; }
.documents-drawer-file-actions { grid-row:1; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.documents-delete-button { grid-row:2; width:100%; border-color:#fecaca; color:#b91c1c; background:#fff; }
.documents-delete-button:hover { border-color:#fca5a5; color:#991b1b; background:#fef2f2; }
.documents-delete-button[hidden] { display:none !important; }
body.documents-drawer-open { overflow:hidden; }

.documents-upload-modal { width: min(560px, calc(100vw - 36px)); text-align: left; }
.documents-upload-modal > p { color: var(--text-light); font-size: 14px; line-height: 1.55; }
.documents-upload-form { display: grid; gap: 13px; margin-top: 18px; }
.documents-upload-form label { display: grid; gap: 6px; }
.documents-upload-form label > span { color: var(--navy); font-size: 14px; font-weight: 800; }
.documents-upload-form input,
.documents-upload-form select { width: 100%; padding: 0 11px; }
.documents-upload-drop { min-height: 78px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 12px; border: 1px dashed #bfdbfe; border-radius: 10px; background: #f8fbff; text-align: center; cursor: pointer; }
.documents-upload-drop strong { color: var(--blue); font-size: 14px; }
.documents-upload-drop small { color: var(--text-light); font-size: 13px; }
.documents-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.documents-upload-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.documents-delete-modal { width:min(480px, calc(100vw - 36px)); }
.documents-delete-modal-icon { color:#b91c1c; background:#fef2f2; }
.documents-delete-warning { margin-top:14px; padding:11px 12px; border:1px solid #fecaca; border-radius:10px; color:#991b1b; background:#fff7f7; font-size:14px; font-weight:700; line-height:1.5; text-align:left; }
.documents-delete-warning.is-error { border-color:#fde68a; color:#92400e; background:#fffbeb; }
.documents-delete-actions { margin-top:18px; display:flex; justify-content:flex-end; gap:8px; }
.documents-delete-confirm { border-color:#dc2626; color:#fff; background:#dc2626; }
.documents-delete-confirm:hover { border-color:#b91c1c; background:#b91c1c; }

.prototype-toast {
  position:fixed; z-index:110; right:24px; bottom:24px; width:min(360px, calc(100vw - 48px));
  display:grid; gap:2px; padding:13px 15px; border:1px solid var(--border); border-radius:11px;
  background:#fff; box-shadow:0 18px 45px rgba(15,23,42,.13); opacity:0; pointer-events:none;
  transform:translateY(10px); transition:opacity .18s ease, transform .18s ease;
}
.prototype-toast.is-visible { opacity:1; transform:translateY(0); }
.prototype-toast strong { color:var(--navy); font-size:14px; }
.prototype-toast span { color:#64748b; font-size:13px; }

/*
 * The application sidebar remains visible on mid-sized desktop displays, so
 * the viewport width alone overstates the space available to this table. Move
 * the supporting cards below the library before the seven document columns
 * reach their minimum width (notably on 1470px-wide macOS viewports).
 */
@media (max-width: 1580px) {
  .documents-layout { grid-template-columns: 1fr; }
  .documents-side-column { grid-template-columns: 1fr 1fr; position: static; }
}

@media (max-width: 1250px) {
  .documents-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .documents-table-head { display: none; }
  .documents-row { grid-template-columns: minmax(240px, 1.6fr) 115px 120px 110px 70px 100px 18px; overflow-x: auto; }
}

@media (max-width: 980px) {
  .documents-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; }
  .documents-row > span:nth-child(2),
  .documents-row > span:nth-child(3),
  .documents-row > span:nth-child(4),
  .documents-row > span:nth-child(5),
  .documents-row > span:nth-child(6) { grid-column: 1 / -1; }
  .documents-row > span:nth-child(3) { display: flex; align-items: center; gap: 8px; }
  .documents-status-note { margin-top: 0; }
  .documents-row-chevron { grid-column: 2; grid-row: 1; }
  .documents-owner-cell, .documents-usage-cell, .documents-updated-cell { max-width: 300px; }
}

@media (max-width: 760px) {
  .documents-page-header { align-items: flex-start; flex-direction: column; }
  .documents-page-header .btn { width: 100%; }
  .documents-summary-grid { grid-template-columns: 1fr; }
  .documents-toolbar { align-items: stretch; flex-direction: column; }
  .documents-search-wrap { width: 100%; }
  .documents-toolbar-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .documents-toolbar select { width: 100%; }
  .documents-side-column { grid-template-columns: 1fr; }
  .documents-result-note { display: none; }
  .documents-drawer { width: 100vw; }
}

@media (max-width: 480px) {
  .documents-info-strip { grid-template-columns: 1fr; }
  .documents-tabs { padding-left: 8px; padding-right: 8px; }
  .documents-toolbar { padding: 12px; }
  .documents-toolbar-filters { grid-template-columns: 1fr; }
  .documents-row { padding: 12px; }
  .documents-drawer-meta,
  .documents-upload-grid { grid-template-columns: 1fr; }
  .documents-upload-actions { flex-direction: column-reverse; }
  .documents-drawer-file-actions { grid-template-columns:1fr; }
  .documents-delete-actions { width:100%; flex-direction:column-reverse; }
  .documents-drawer-footer .btn,
  .documents-upload-actions .btn,
  .documents-delete-actions .btn { width: 100%; }
}

/* =========================================================
   COMPANY PROFILE
   Structured company data for matching + readiness
   ========================================================= */
.company-profile-content { max-width: 1500px; }
.company-profile-page-header { align-items: center; }
.company-profile-page-header .btn svg { margin-right: 6px; }

.company-profile-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: center;
  padding: 22px; margin-bottom: 16px;
}
.company-profile-identity { min-width: 0; display: flex; align-items: center; gap: 16px; }
.company-profile-logo {
  width: 66px; height: 66px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 16px; color: var(--white); background: linear-gradient(145deg, #1d4ed8, #2563eb 58%, #60a5fa);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .18); font-size: 19px; font-weight: 900; letter-spacing: .02em;
}
.company-profile-title-wrap { min-width: 0; }
.company-profile-status-row { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.company-profile-verified { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 999px; color: #047857; background: #ecfdf5; font-size: 13px; font-weight: 850; }
.company-profile-verified span {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background: #10b981;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.company-profile-updated { color: var(--text-light); font-size: 13px; }
.company-profile-title-wrap h2 { color: var(--navy); font-size: 23px; line-height: 1.25; letter-spacing: -.35px; }
.company-profile-title-wrap > p { margin-top: 4px; color: var(--text-light); font-size: 14px; }
.company-profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.company-profile-tags span { min-height: 23px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; color: #64748b; background: #f8fafc; font-size: 13px; font-weight: 750; }

.company-profile-completeness { padding-left: 26px; border-left: 1px solid var(--border); }
.company-profile-completeness-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.company-profile-completeness-top span { color: var(--text-light); font-size: 14px; font-weight: 750; }
.company-profile-completeness-top strong { color: var(--navy); font-size: 28px; }
.company-profile-completeness-bar { height: 7px; margin: 7px 0 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.company-profile-completeness-bar span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.company-profile-completeness p { color: var(--text-light); font-size: 13px; line-height: 1.5; }
.company-profile-text-button { margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 800; }

.company-profile-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.company-profile-summary-card { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 14px; }
.company-profile-summary-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; }
.company-profile-summary-icon.is-blue { color: #2563eb; background: #eff6ff; }
.company-profile-summary-icon.is-indigo { color: #4f46e5; background: #eef2ff; }
.company-profile-summary-icon.is-green { color: #059669; background: #ecfdf5; }
.company-profile-summary-icon.is-amber { color: #d97706; background: #fffbeb; }
.company-profile-summary-icon.is-slate { color: #475569; background: #f1f5f9; }
.company-profile-summary-card > div { min-width: 0; display: grid; gap: 2px; }
.company-profile-summary-card span:not(.company-profile-summary-icon) { color: var(--text-light); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.company-profile-summary-card strong { color: var(--navy); font-size: 17px; }
.company-profile-summary-card small { color: var(--text-light); font-size: 12px; line-height: 1.35; }

.company-profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.company-profile-main-card { min-width: 0; overflow: hidden; }
.company-profile-side-column { min-width: 0; display: grid; gap: 12px; position: sticky; top: 84px; }
.company-profile-tabs { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; border-bottom: 1px solid var(--border); background: #fbfdff; scrollbar-width: none; }
.company-profile-tabs::-webkit-scrollbar { display: none; }
.company-profile-tab { position: relative; flex: 0 0 auto; min-height: 46px; padding: 0 10px; border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 12px; font-weight: 800; white-space: nowrap; }
.company-profile-tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.company-profile-tab:hover { color: var(--navy); }
.company-profile-tab.is-active { color: var(--blue); }
.company-profile-tab.is-active::after { background: var(--blue); }
.company-profile-tab-panel { padding: 22px; }
.company-profile-tab-panel[hidden] { display: none !important; }
.company-profile-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.company-profile-section-heading > div > span { display: block; margin-bottom: 3px; color: var(--text-light); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.company-profile-section-heading h2 { color: var(--navy); font-size: 19px; line-height: 1.25; }
.company-profile-section-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; color: var(--blue); background: var(--blue-light); font-size: 13px; font-weight: 800; }
.company-profile-small-button { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.company-profile-section-intro { max-width: 760px; margin: -7px 0 17px; color: var(--text-light); font-size: 14px; line-height: 1.6; }

.company-profile-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.company-profile-info-grid > div { min-width: 0; min-height: 74px; display: grid; align-content: center; gap: 4px; padding: 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.company-profile-info-grid > div:nth-child(4n) { border-right: 0; }
.company-profile-info-grid > div:nth-last-child(-n+4) { border-bottom: 0; }
.company-profile-info-grid span { color: var(--text-light); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.company-profile-info-grid strong { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; }
.company-profile-info-grid small { color: #059669; font-size: 12px; }
.company-profile-overview-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.company-profile-subsection { padding: 15px; border: 1px solid var(--border); border-radius: 11px; }
.company-profile-subheading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.company-profile-subheading h3 { color: var(--navy); font-size: 14px; }
.company-profile-subheading span { color: var(--text-light); font-size: 13px; }
.company-profile-location-list { display: flex; flex-wrap: wrap; gap: 7px; }
.company-profile-location-list span { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 0 8px; border-radius: 8px; background: #f8fafc; color: #475569; font-size: 13px; font-weight: 700; }
.company-profile-location-list i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.company-profile-match-list { display: grid; gap: 8px; }
.company-profile-match-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.company-profile-match-list div:last-child { padding-bottom: 0; border-bottom: 0; }
.company-profile-match-list span { color: var(--text-light); font-size: 13px; }
.company-profile-match-list strong { color: var(--navy); font-size: 13px; text-align: right; }

.company-profile-kbli-list { display: grid; gap: 10px; }
.company-profile-kbli-card { display: grid; grid-template-columns: 70px 1fr; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: 11px; }
.company-profile-kbli-card.is-primary { border-color: #bfdbfe; background: #f8fbff; }
.company-profile-kbli-code { width: 58px; height: 46px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-light); font-size: 14px; font-weight: 900; }
.company-profile-kbli-title-row { display: flex; align-items: center; gap: 8px; }
.company-profile-kbli-title-row strong { color: var(--navy); font-size: 14px; }
.company-profile-kbli-title-row span { display: inline-flex; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 999px; color: var(--blue); background: var(--blue-light); font-size: 12px; font-weight: 850; }
.company-profile-kbli-card p { margin-top: 5px; color: var(--text-light); font-size: 14px; line-height: 1.55; }
.company-profile-kbli-card small { display: block; margin-top: 7px; color: var(--text-light); font-size: 12px; }
.company-profile-insight-box { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; }
.company-profile-insight-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: #eff6ff; font-size: 15px; }
.company-profile-insight-box strong { display: block; margin-bottom: 3px; color: var(--navy); font-size: 14px; }
.company-profile-insight-box p { color: #64748b; font-size: 13px; line-height: 1.55; }

.company-profile-capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.company-profile-capability-grid article { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; }
.company-profile-capability-grid article > span { width: fit-content; min-height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.company-profile-capability-grid .is-verified { color: #047857; background: #ecfdf5; }
.company-profile-capability-grid .is-declared { color: #64748b; background: #f1f5f9; }
.company-profile-capability-grid strong { color: var(--navy); font-size: 14px; }
.company-profile-capability-grid p { color: var(--text-light); font-size: 13px; line-height: 1.5; }
.company-profile-capability-grid small { color: var(--text-light); font-size: 12px; }

.company-profile-credential-list { display: grid; gap: 9px; }
.company-profile-credential-list article { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.company-profile-credential-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: #475569; background: #f1f5f9; font-size: 13px; font-weight: 900; }
.company-profile-credential-list strong { color: var(--navy); font-size: 14px; }
.company-profile-credential-list p { margin-top: 2px; color: var(--text-light); font-size: 13px; }
.company-profile-credential-list small { display: block; margin-top: 4px; color: var(--text-light); font-size: 12px; }
.company-profile-credential-status { min-height: 23px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.company-profile-credential-status.is-valid { color: #047857; background: #ecfdf5; }
.company-profile-credential-status.is-expiring { color: #b45309; background: #fffbeb; }

.company-profile-project-list { display: grid; gap: 9px; }
.company-profile-project-card { padding: 13px; border: 1px solid var(--border); border-radius: 10px; }
.company-profile-project-card.is-qualifying { border-color: #bbf7d0; background: #fbfffd; }
.company-profile-project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.company-profile-project-top strong { color: var(--navy); font-size: 14px; }
.company-profile-project-top p { margin-top: 2px; color: var(--text-light); font-size: 13px; }
.company-profile-project-qualifies,
.company-profile-project-similarity { min-height: 22px; flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.company-profile-project-qualifies { color: #047857; background: #ecfdf5; }
.company-profile-project-similarity.is-high { color: var(--blue); background: var(--blue-light); }
.company-profile-project-similarity.is-medium { color: #b45309; background: #fffbeb; }
.company-profile-project-similarity.is-low { color: #64748b; background: #f1f5f9; }
.company-profile-project-meta { display: grid; grid-template-columns: 150px 1fr; gap: 9px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.company-profile-project-meta div { display: grid; gap: 2px; }
.company-profile-project-meta span { color: var(--text-light); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.company-profile-project-meta strong { color: #475569; font-size: 13px; }

.company-profile-personnel-alert { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; margin-bottom: 13px; padding: 11px; border: 1px solid #fecaca; border-radius: 10px; background: #fffafa; }
.company-profile-personnel-alert > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #dc2626; background: #fef2f2; font-size: 14px; font-weight: 900; }
.company-profile-personnel-alert strong { color: #991b1b; font-size: 14px; }
.company-profile-personnel-alert p { margin-top: 2px; color: #7f1d1d; font-size: 13px; line-height: 1.4; }
.company-profile-personnel-alert a { color: #dc2626; font-size: 13px; font-weight: 800; white-space: nowrap; }
.company-profile-personnel-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.company-profile-personnel-list article { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 11px; border: 1px solid var(--border); border-radius: 10px; }
.company-profile-person-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-light); font-size: 13px; font-weight: 900; }
.company-profile-personnel-list strong { color: var(--navy); font-size: 14px; }
.company-profile-personnel-list p { margin-top: 2px; color: var(--text-light); font-size: 13px; }
.company-profile-personnel-list small { display: block; margin-top: 3px; color: var(--text-light); font-size: 12px; }
.company-profile-person-tag { min-height: 21px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; color: #64748b; background: #f1f5f9; font-size: 12px; font-weight: 800; }
.company-profile-personnel-footer { margin-top: 12px; color: var(--text-light); font-size: 13px; text-align: center; }

.company-profile-impact-card,
.company-profile-improvement-card,
.company-profile-data-model-card { padding: 16px; }
.company-profile-side-heading { margin-bottom: 9px; }
.company-profile-side-heading.inline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.company-profile-side-heading > span,
.company-profile-side-heading > div > span { display: block; margin-bottom: 3px; color: var(--text-light); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.company-profile-side-heading h2 { color: var(--navy); font-size: 16px; line-height: 1.3; }
.company-profile-side-heading b { color: var(--blue); font-size: 19px; }
.company-profile-impact-card > p { color: var(--text-light); font-size: 13px; line-height: 1.55; }
.company-profile-impact-score { display: flex; align-items: baseline; gap: 8px; margin: 14px 0; padding: 12px; border-radius: 10px; background: var(--blue-light); }
.company-profile-impact-score strong { color: var(--blue); font-size: 30px; }
.company-profile-impact-score span { color: #475569; font-size: 13px; font-weight: 750; }
.company-profile-impact-reasons { display: grid; gap: 7px; }
.company-profile-impact-reasons div { display: grid; grid-template-columns: 19px 1fr; gap: 7px; align-items: start; }
.company-profile-impact-reasons div > span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #047857; background: #ecfdf5; font-size: 13px; font-weight: 900; }
.company-profile-impact-reasons p { color: #64748b; font-size: 13px; line-height: 1.4; }
.company-profile-impact-reasons strong { color: var(--navy); }
.company-profile-side-button { width: 100%; margin-top: 13px; }
.company-profile-improvement-item { width: 100%; display: grid; grid-template-columns: 27px 1fr 12px; gap: 8px; align-items: center; padding: 10px 0; border: 0; border-top: 1px solid #f1f5f9; background: transparent; text-align: left; cursor: pointer; }
.company-profile-improvement-item:hover strong { color: var(--blue); }
.company-profile-improvement-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 900; }
.company-profile-improvement-icon.is-red { color: #dc2626; background: #fef2f2; }
.company-profile-improvement-icon.is-blue { color: var(--blue); background: var(--blue-light); }
.company-profile-improvement-item > span:nth-child(2) { display: grid; gap: 2px; }
.company-profile-improvement-item strong { color: var(--navy); font-size: 12px; }
.company-profile-improvement-item small { color: var(--text-light); font-size: 12px; line-height: 1.4; }
.company-profile-improvement-item > span:last-child { color: var(--text-light); font-size: 17px; }
.company-profile-data-flow { display: grid; gap: 7px; text-align: center; }
.company-profile-data-flow > div { display: grid; gap: 2px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.company-profile-data-flow > div.is-result { border-color: #bfdbfe; background: #f8fbff; }
.company-profile-data-flow strong { color: var(--navy); font-size: 13px; }
.company-profile-data-flow small { color: var(--text-light); font-size: 12px; }
.company-profile-data-flow > span { color: var(--text-light); font-size: 15px; }

.company-profile-modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(15,23,42,.28); backdrop-filter: blur(2px); }
.company-profile-modal-backdrop[hidden] { display: none !important; }
.company-profile-modal { width: min(560px, calc(100vw - 36px)); overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--white); box-shadow: 0 28px 80px rgba(15,23,42,.18); }
.company-profile-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.company-profile-modal-header span { display: block; margin-bottom: 3px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.company-profile-modal-header h2 { color: var(--navy); font-size: 19px; }
.company-profile-modal-close { width: 31px; height: 31px; border: 1px solid var(--border); border-radius: 9px; background: white; color: #64748b; cursor: pointer; font-size: 18px; }
.company-profile-form { display: grid; gap: 13px; padding: 20px; }
.company-profile-form label { display: grid; gap: 6px; }
.company-profile-form label > span { color: var(--navy); font-size: 13px; font-weight: 800; }
.company-profile-form input,
.company-profile-form select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: white; color: var(--navy); font-size: 14px; }
.company-profile-form input:focus,
.company-profile-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.company-profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.company-profile-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

@media (max-width: 1280px) {
  .company-profile-summary-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .company-profile-layout { grid-template-columns: 1fr; }
  .company-profile-side-column { grid-template-columns: repeat(3, minmax(0,1fr)); position: static; }
}
@media (max-width: 1000px) {
  .company-profile-hero { grid-template-columns: 1fr; }
  .company-profile-completeness { padding-left: 0; padding-top: 18px; border-left: 0; border-top: 1px solid var(--border); }
  .company-profile-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .company-profile-info-grid > div { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border) !important; }
  .company-profile-info-grid > div:nth-child(2n) { border-right: 0; }
  .company-profile-info-grid > div:nth-last-child(-n+2) { border-bottom: 0 !important; }
  .company-profile-side-column { grid-template-columns: 1fr 1fr; }
  .company-profile-data-model-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .company-profile-page-header { align-items: flex-start; flex-direction: column; }
  .company-profile-page-header .btn { width: 100%; }
  .company-profile-summary-grid { grid-template-columns: 1fr; }
  .company-profile-overview-split,
  .company-profile-capability-grid,
  .company-profile-personnel-list,
  .company-profile-side-column { grid-template-columns: 1fr; }
  .company-profile-data-model-card { grid-column: auto; }
  .company-profile-project-top { flex-direction: column; }
  .company-profile-personnel-alert { grid-template-columns: 26px 1fr; }
  .company-profile-personnel-alert a { grid-column: 2; }
}
@media (max-width: 520px) {
  .company-profile-identity { align-items: flex-start; }
  .company-profile-logo { width: 52px; height: 52px; border-radius: 13px; font-size: 16px; }
  .company-profile-title-wrap h2 { font-size: 20px; }
  .company-profile-info-grid { grid-template-columns: 1fr; }
  .company-profile-info-grid > div { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .company-profile-info-grid > div:last-child { border-bottom: 0 !important; }
  .company-profile-kbli-card { grid-template-columns: 1fr; }
  .company-profile-project-meta,
  .company-profile-form-grid { grid-template-columns: 1fr; }
  .company-profile-form-actions { flex-direction: column-reverse; }
  .company-profile-form-actions .btn { width: 100%; }
}

/* =========================================================
   NOTIFICATIONS
   ========================================================= */
.notifications-content { max-width: 1440px; }
.notifications-page-header { align-items: center; }
.notifications-header-actions { display: flex; gap: 8px; }
.notifications-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.notifications-summary-card { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; align-items: center; padding: 14px; }
.notifications-summary-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; }
.notifications-summary-icon.is-blue { color: var(--blue); background: var(--blue-light); }
.notifications-summary-icon.is-green { color: #047857; background: #ecfdf5; }
.notifications-summary-icon.is-amber { color: #b45309; background: #fffbeb; }
.notifications-summary-icon.is-red { color: #dc2626; background: #fef2f2; }
.notifications-summary-card > div { min-width: 0; display: grid; gap: 1px; }
.notifications-summary-card span:not(.notifications-summary-icon) { color: var(--text-light); font-size: 13px; font-weight: 750; }
.notifications-summary-card strong { color: var(--navy); font-size: 23px; line-height: 1.15; }
.notifications-summary-card small { overflow: hidden; color: var(--text-light); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notifications-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 14px; align-items: start; }
.notifications-feed-card { min-width: 0; overflow: hidden; }
.notifications-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) 180px; gap: 9px; padding: 14px; border-bottom: 1px solid var(--border); }
.notifications-search-wrap { position: relative; }
.notifications-search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }
.notifications-search-wrap input,
.notifications-toolbar select { width: 100%; min-height: 38px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: white; color: var(--navy); font-size: 14px; }
.notifications-search-wrap input { padding: 0 11px 0 35px; }
.notifications-toolbar select { padding: 0 28px 0 10px; }
.notifications-search-wrap input:focus,
.notifications-toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.notifications-tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--border); }
.notifications-tab { min-height: 35px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-light); cursor: pointer; font-size: 12px; font-weight: 800; }
.notifications-tab span { min-width: 19px; min-height: 18px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 12px; }
.notifications-tab:hover { color: var(--navy); }
.notifications-tab.is-active { border-bottom-color: var(--blue); color: var(--blue); }
.notifications-tab.is-active span { color: var(--blue); background: var(--blue-light); }
.notifications-feed { padding: 0 14px 10px; }
.notifications-feed[hidden], .notifications-empty[hidden], .notification-count[hidden], .app-notification-dot[hidden] { display: none !important; }
.notifications-date-group { padding-top: 14px; }
.notifications-date-label { margin-bottom: 7px; color: var(--text-light); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.notifications-date-list { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; }
.notification-feed-item { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; background: white; border-bottom: 1px solid #f1f5f9; }
.notification-feed-item:last-child { border-bottom: 0; }
.notification-feed-item.is-unread { background: #fbfdff; }
.notification-feed-item.is-unread::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--blue); }
.notification-feed-main { width: 100%; min-width: 0; display: grid; grid-template-columns: 34px minmax(0,1fr) 14px; gap: 10px; align-items: center; padding: 12px 8px 12px 13px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.notification-feed-main:hover .notification-feed-title-row strong { color: var(--blue); }
.notification-feed-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; font-size: 13px; font-weight: 900; }
.notification-feed-icon.is-danger { color: #dc2626; background: #fef2f2; }
.notification-feed-icon.is-warning { color: #b45309; background: #fffbeb; }
.notification-feed-icon.is-blue { color: var(--blue); background: var(--blue-light); }
.notification-feed-icon.is-green { color: #047857; background: #ecfdf5; }
.notification-feed-icon.is-neutral { color: #64748b; background: #f1f5f9; }
.notification-feed-copy { min-width: 0; display: grid; gap: 3px; }
.notification-feed-title-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.notification-feed-title-row strong { overflow: hidden; color: var(--navy); font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.notification-unread-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.notification-feed-description { display: -webkit-box; overflow: hidden; color: #64748b; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-feed-meta { color: var(--text-light); font-size: 12px; }
.notification-feed-chevron { color: #cbd5e1; font-size: 21px; }
.notification-read-toggle { margin-right: 11px; padding: 5px 7px; border: 0; border-radius: 7px; background: transparent; color: var(--text-light); cursor: pointer; font-size: 12px; font-weight: 750; white-space: nowrap; }
.notification-read-toggle:hover { color: var(--blue); background: var(--blue-light); }
.notifications-empty { display: grid; place-items: center; gap: 6px; padding: 54px 20px; text-align: center; }
.notifications-empty > div { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #64748b; background: #f1f5f9; font-size: 17px; }
.notifications-empty strong { color: var(--navy); font-size: 14px; }
.notifications-empty p { color: var(--text-light); font-size: 13px; }
.notifications-empty .btn { margin-top: 4px; }
.notifications-side-column { position: sticky; top: 84px; display: grid; gap: 12px; }
.notifications-side-card { padding: 15px; }
.notifications-side-heading { margin-bottom: 9px; }
.notifications-side-heading span { display: block; margin-bottom: 3px; color: var(--text-light); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.notifications-side-heading h2 { color: var(--navy); font-size: 15px; }
.notifications-attention-item { display: grid; grid-template-columns: 27px minmax(0,1fr) 10px; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid #f1f5f9; }
.notifications-attention-item:hover strong { color: var(--blue); }
.notifications-attention-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 900; }
.notifications-attention-icon.is-red { color: #dc2626; background: #fef2f2; }
.notifications-attention-icon.is-amber { color: #b45309; background: #fffbeb; }
.notifications-attention-item > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.notifications-attention-item strong { color: var(--navy); font-size: 13px; line-height: 1.35; }
.notifications-attention-item small { color: var(--text-light); font-size: 12px; }
.notifications-attention-item > span:last-child { color: #cbd5e1; font-size: 18px; }
.notifications-channel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid #f1f5f9; }
.notifications-channel-row > span:first-child { display: grid; gap: 2px; }
.notifications-channel-row strong { color: var(--navy); font-size: 13px; }
.notifications-channel-row small { color: var(--text-light); font-size: 12px; }
.notifications-channel-status { min-height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.notifications-channel-status.is-on { color: #047857; background: #ecfdf5; }
.notifications-manage-link { display: inline-block; margin-top: 9px; color: var(--blue); font-size: 13px; font-weight: 800; }
.notifications-tip-card { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; background: #f8fbff; border-color: #dbeafe; }
.notifications-tip-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-light); font-size: 14px; font-weight: 900; }
.notifications-tip-card strong { color: var(--navy); font-size: 13px; }
.notifications-tip-card p { margin-top: 3px; color: #64748b; font-size: 12px; line-height: 1.5; }
#mark-all-read:disabled { opacity: .5; cursor: default; }

@media (max-width: 1180px) {
  .notifications-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .notifications-layout { grid-template-columns: 1fr; }
  .notifications-side-column { position: static; grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .notifications-page-header { align-items: flex-start; flex-direction: column; }
  .notifications-header-actions { width: 100%; }
  .notifications-header-actions .btn { flex: 1; }
  .notifications-toolbar { grid-template-columns: 1fr; }
  .notifications-side-column { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .notifications-summary-grid { grid-template-columns: 1fr; }
  .notifications-header-actions { flex-direction: column; }
  .notification-feed-item { grid-template-columns: 1fr; }
  .notification-read-toggle { justify-self: start; margin: -4px 0 8px 53px; }
  .notification-feed-title-row strong { white-space: normal; }
}

/* =========================================================
   SETTINGS
   ========================================================= */
.settings-content { max-width: 1340px; }
.settings-page-header { align-items: center; }
.settings-save-state { min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #d1fae5; border-radius: 999px; color: #047857; background: #ecfdf5; font-size: 13px; font-weight: 800; }
.settings-save-state.is-saving { border-color: #dbeafe; color: var(--blue); background: var(--blue-light); }
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav { position: sticky; top: 84px; display: grid; gap: 4px; padding: 8px; }
.settings-nav-link { width: 100%; min-height: 52px; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 9px; align-items: center; padding: 8px 9px; border: 0; border-radius: 9px; background: transparent; color: var(--text-light); text-align: left; cursor: pointer; }
.settings-nav-link:hover { color: var(--navy); background: var(--background); }
.settings-nav-link.is-active { color: var(--blue); background: var(--blue-light); }
.settings-nav-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: inherit; background: rgba(148,163,184,.1); }
.settings-nav-link.is-active .settings-nav-icon { background: rgba(37,99,235,.1); }
.settings-nav-link > span:last-child { min-width: 0; display: grid; gap: 2px; }
.settings-nav-link strong { color: inherit; font-size: 12px; }
.settings-nav-link small { color: var(--text-light); font-size: 12px; }
.settings-panels { min-width: 0; }
.settings-panel { display: grid; gap: 14px; }
.settings-panel[hidden] { display: none !important; }
.settings-section-card { padding: 19px; }
.settings-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.settings-section-heading > div { min-width: 0; }
.settings-section-heading span { display: block; margin-bottom: 4px; color: var(--text-light); font-size: 12px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.settings-section-heading h2 { color: var(--navy); font-size: 17px; line-height: 1.25; }
.settings-section-heading p { margin-top: 4px; color: var(--text-light); font-size: 13px; line-height: 1.55; }
.settings-section-heading-actions { align-items: center; }
.settings-section-heading-actions .btn { flex: 0 0 auto; }
.settings-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.settings-field { display: grid; gap: 6px; }
.settings-field-wide { grid-column: 1 / -1; }
.settings-field > span { color: var(--navy); font-size: 13px; font-weight: 800; }
.settings-field input,
.settings-field select,
.settings-compact-select select,
.settings-time-input,
.settings-modal-form input,
.settings-modal-form select,
.settings-modal-form textarea { width: 100%; min-height: 39px; border: 1px solid var(--border); border-radius: 9px; outline: none; padding: 0 10px; background: white; color: var(--navy); font-size: 14px; }
.settings-modal-form textarea { min-height: 92px; padding-block: 10px; resize: vertical; line-height: 1.5; }
.settings-field input:focus,
.settings-field select:focus,
.settings-compact-select select:focus,
.settings-time-input:focus,
.settings-modal-form input:focus,
.settings-modal-form select:focus,
.settings-modal-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.settings-modal-form input.is-error,
.settings-modal-form select.is-error,
.settings-modal-form textarea.is-error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.settings-row-list { border-top: 1px solid var(--border); }
.settings-preference-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 13px 0; border-bottom: 1px solid #f1f5f9; }
.settings-preference-row:last-child { border-bottom: 0; }
.settings-preference-row > div:first-child { min-width: 0; }
.settings-preference-row strong { display: block; color: var(--navy); font-size: 14px; }
.settings-preference-row p { max-width: 660px; margin-top: 3px; color: #64748b; font-size: 13px; line-height: 1.5; }
.settings-compact-select { width: 180px; flex: 0 0 auto; }
.settings-row-button { min-width: 118px; flex: 0 0 auto; }
.settings-inline-controls { display: flex; align-items: center; gap: 10px; }
.settings-time-input { width: 96px; }
.settings-switch { position: relative; width: 38px; height: 22px; display: inline-block; flex: 0 0 auto; }
.settings-switch input { position: absolute; opacity: 0; pointer-events: none; }
.settings-switch > span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .18s ease; }
.settings-switch > span::after { content:""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(15,23,42,.18); transition: transform .18s ease; }
.settings-switch input:checked + span { background: var(--blue); }
.settings-switch input:checked + span::after { transform: translateX(16px); }
.settings-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.settings-notification-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.settings-notification-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 77px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; }
.settings-notification-option:hover { border-color: #cbd5e1; background: #fbfdff; }
.settings-notification-option > span:first-child { min-width: 0; display: grid; gap: 3px; }
.settings-notification-option strong { color: var(--navy); font-size: 13px; }
.settings-notification-option small { color: #64748b; font-size: 12px; line-height: 1.5; }
.settings-access-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.settings-access-summary-card { display: grid; gap: 4px; padding: 18px 20px; }
.settings-access-summary-card > span { color: #64748b; font-size: 13px; font-weight: 800; }
.settings-access-summary-card > strong { color: var(--navy); font-size: 26px; line-height: 1.1; }
.settings-access-summary-card > strong.settings-access-summary-role { color: var(--blue); font-size: 20px; }
.settings-access-summary-card > small { color: #64748b; font-size: 13px; }
.settings-team-list { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; }
.settings-team-row { display: grid; grid-template-columns: 40px minmax(0,1fr) minmax(155px,190px) 54px 82px; gap: 12px; align-items: center; min-height: 76px; padding: 12px 14px; border-bottom: 1px solid #f1f5f9; }
.settings-team-row:last-child { border-bottom: 0; }
.settings-team-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: var(--blue-light); font-size: 14px; font-weight: 850; }
.settings-team-copy { min-width: 0; display: grid; gap: 2px; }
.settings-team-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.settings-team-copy strong { overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.settings-team-copy small { overflow-wrap: anywhere; color: #64748b; font-size: 13px; line-height: 1.45; }
.settings-you-pill { flex: 0 0 auto; min-height: 22px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; color: var(--blue); background: var(--blue-light); font-size: 12px; font-weight: 850; }
.settings-team-role-control { min-width: 0; }
.settings-team-role-select { width: 100%; min-height: 44px; padding: 0 34px 0 10px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: white; color: var(--navy); font-size: 14px; font-weight: 750; }
.settings-team-role-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.settings-team-role-select:disabled { cursor: not-allowed; color: var(--blue); background: var(--blue-light); opacity: 1; }
.settings-role-pill { justify-self: start; min-height: 22px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; color: #475569; background: #f1f5f9; font-size: 12px; font-weight: 800; }
.settings-role-pill.is-admin { color: var(--blue); background: var(--blue-light); }
.settings-team-status { color: #047857; font-size: 13px; font-weight: 800; }
.settings-member-remove { min-width: 72px; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; color: #b91c1c; background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.settings-member-remove:hover { border-color: #fecaca; background: #fef2f2; }
.settings-member-protected { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: #64748b; font-size: 12px; font-weight: 800; }
.settings-member-protected > span:first-child { font-size: 12px; }
.settings-access-manager { display: grid; grid-template-columns: minmax(210px,240px) minmax(0,1fr); gap: 16px; align-items: start; }
.settings-role-browser, .settings-role-editor { min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.settings-role-browser { overflow: hidden; }
.settings-role-browser-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.settings-role-browser-heading strong { color: var(--navy); font-size: 14px; }
.settings-role-browser-heading span { color: #64748b; font-size: 12px; font-weight: 750; }
.settings-role-list { display: grid; padding: 6px; }
.settings-role-list-button { width: 100%; min-height: 62px; display: grid; grid-template-columns: 34px minmax(0,1fr) 14px; gap: 10px; align-items: center; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: #64748b; text-align: left; cursor: pointer; }
.settings-role-list-button:hover { background: #f8fafc; }
.settings-role-list-button.is-active { color: var(--blue); background: var(--blue-light); }
.settings-role-list-copy { min-width: 0; display: grid; gap: 2px; }
.settings-role-list-copy strong { overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.settings-role-list-button.is-active .settings-role-list-copy strong { color: var(--blue); }
.settings-role-list-copy small { color: #64748b; font-size: 12px; }
.settings-role-list-chevron { justify-self: end; font-size: 22px; line-height: 1; }
.settings-role-editor { padding: 18px; }
.settings-role-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.settings-role-editor-copy { min-width: 0; }
.settings-role-type { min-height: 24px; display: inline-flex; align-items: center; margin-bottom: 7px; padding: 0 8px; border-radius: 999px; color: #475569; background: #f1f5f9; font-size: 12px; font-weight: 800; }
.settings-role-type.is-protected { color: var(--blue); background: var(--blue-light); }
.settings-role-editor h3 { color: var(--navy); font-size: 20px; line-height: 1.25; }
.settings-role-editor-copy p { max-width: 620px; margin-top: 5px; color: #64748b; font-size: 14px; line-height: 1.55; }
.settings-role-metrics { min-width: 72px; display: grid; justify-items: end; gap: 2px; }
.settings-role-metrics strong { color: var(--navy); font-size: 24px; line-height: 1; }
.settings-role-metrics span { color: #64748b; font-size: 12px; }
.settings-permission-groups { display: grid; gap: 16px; padding: 18px 0; }
.settings-permission-group { min-width: 0; display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.settings-permission-group legend { margin-bottom: 2px; color: var(--navy); font-size: 14px; font-weight: 850; }
.settings-permission-option { min-height: 64px; display: grid; grid-template-columns: minmax(0,1fr) 22px; gap: 16px; align-items: center; padding: 10px 12px; border: 1px solid #e8edf4; border-radius: 10px; background: #fbfdff; cursor: pointer; }
.settings-permission-option:hover { border-color: #cbd5e1; }
.settings-permission-option:has(input:checked) { border-color: #bfdbfe; background: #f8fbff; }
.settings-permission-option:has(input:disabled) { cursor: not-allowed; }
.settings-permission-copy { min-width: 0; display: grid; gap: 2px; }
.settings-permission-copy strong { color: var(--navy); font-size: 14px; }
.settings-permission-copy small { color: #64748b; font-size: 13px; line-height: 1.45; }
.settings-permission-checkbox { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.settings-permission-checkbox:disabled { cursor: not-allowed; opacity: .7; }
.settings-role-editor-footer { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.settings-role-permission-count, .settings-role-protected-note { color: #64748b; font-size: 13px; font-weight: 750; }
.settings-role-protected-note { color: var(--blue); }
.settings-role-editor-actions { display: flex; gap: 8px; }
.settings-access-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 15px; color: #64748b; font-size: 13px; line-height: 1.5; }
.settings-role-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.settings-role-grid article { display: grid; grid-template-columns: 30px 1fr; gap: 9px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; }
.settings-role-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-light); font-size: 13px; font-weight: 900; }
.settings-role-grid strong { color: var(--navy); font-size: 13px; }
.settings-role-grid p { margin-top: 3px; color: #64748b; font-size: 12px; line-height: 1.5; }
.settings-session-list { border-top: 1px solid var(--border); }
.settings-session-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.settings-session-row:last-child { border-bottom: 0; }
.settings-device-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: #64748b; background: #f8fafc; }
.settings-session-row > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.settings-session-row strong { color: var(--navy); font-size: 13px; }
.settings-session-row small { color: var(--text-light); font-size: 12px; }
.settings-session-current { min-height: 22px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; color: #047857; background: #ecfdf5; font-size: 12px; font-weight: 800; }
.settings-text-action { border: 0; background: transparent; color: #dc2626; cursor: pointer; font-size: 12px; font-weight: 800; }
.settings-text-action:hover { text-decoration: underline; }
.settings-danger-card { border-color: #fecaca; }
.settings-danger-card .settings-section-heading span { color: #dc2626; }
.settings-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 13px; border-top: 1px solid #fee2e2; }
.settings-danger-row strong { color: #991b1b; font-size: 14px; }
.settings-danger-row p { margin-top: 3px; color: #7f1d1d; font-size: 13px; line-height: 1.5; }
.settings-danger-button { flex: 0 0 auto; border: 1px solid #fecaca; color: #b91c1c; background: white; }
.settings-danger-button:hover { border-color: #fca5a5; background: #fef2f2; }
.settings-modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.48); backdrop-filter: blur(3px); }
.settings-modal-backdrop[hidden] { display: none !important; }
.settings-modal { position: relative; width: min(100%, 520px); max-height: min(760px,calc(100vh - 40px)); overflow-y: auto; padding: 23px; border-radius: 16px; background: white; box-shadow: 0 28px 80px rgba(15,23,42,.22); }
.settings-modal-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f8fafc; color: #64748b; cursor: pointer; font-size: 18px; }
.settings-modal-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 11px; color: var(--blue); background: var(--blue-light); font-size: 15px; font-weight: 900; }
.settings-modal.is-destructive .settings-modal-icon { color: #b91c1c; background: #fef2f2; }
.settings-modal h2 { color: var(--navy); font-size: 18px; }
.settings-modal > p { margin-top: 5px; color: #64748b; font-size: 14px; line-height: 1.55; }
.settings-modal-form { display: grid; gap: 11px; margin-top: 17px; }
.settings-modal-form label { display: grid; gap: 6px; }
.settings-modal-form label > span { color: var(--navy); font-size: 13px; font-weight: 800; }
.settings-form-error { padding: 9px 10px; border-radius: 8px; color: #b91c1c; background: #fef2f2; font-size: 13px; line-height: 1.45; }
.settings-form-error[hidden] { display: none !important; }
.settings-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.settings-modal-danger-button { border: 1px solid #dc2626; color: white; background: #dc2626; }
.settings-modal-danger-button:hover { border-color: #b91c1c; background: #b91c1c; }
.settings-modal-open { overflow: hidden; }
.settings-toast { position: fixed; z-index: 110; right: 24px; bottom: 24px; width: min(340px,calc(100vw - 48px)); display: grid; gap: 2px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 11px; background: white; box-shadow: 0 18px 45px rgba(15,23,42,.13); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }
.settings-toast.is-visible { opacity: 1; transform: translateY(0); }
.settings-toast strong { color: var(--navy); font-size: 13px; }
.settings-toast span { color: #64748b; font-size: 12px; }

@media (max-width: 1050px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; grid-template-columns: repeat(5,minmax(0,1fr)); }
  .settings-nav-link { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .settings-nav-link > span:last-child small { display: none; }
  .settings-role-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .settings-access-manager { grid-template-columns: 1fr; }
  .settings-role-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
}
@media (max-width: 760px) {
  .settings-page-header { align-items: flex-start; }
  .settings-layout { gap: 12px; }
  .settings-nav { display: flex; overflow-x: auto; padding: 7px; }
  .settings-nav-link { min-width: 116px; }
  .settings-form-grid, .settings-notification-grid { grid-template-columns: 1fr; }
  .settings-field-wide { grid-column: auto; }
  .settings-section-heading-actions { align-items: flex-start; flex-direction: column; }
  .settings-preference-row, .settings-danger-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .settings-compact-select, .settings-row-button { width: 100%; }
  .settings-access-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .settings-access-summary-card { padding: 15px; }
  .settings-team-row { grid-template-columns: 40px minmax(0,1fr) auto; grid-template-rows: auto auto; }
  .settings-team-avatar { grid-column: 1; grid-row: 1 / 3; align-self: start; }
  .settings-team-copy { grid-column: 2; grid-row: 1; }
  .settings-team-role-control { grid-column: 2; grid-row: 2; max-width: 260px; }
  .settings-team-status { display: none; }
  .settings-member-remove, .settings-member-protected { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .settings-role-editor-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .settings-section-card { padding: 15px; }
  .settings-save-state { display: none; }
  .settings-section-heading-actions .btn { width: 100%; }
  .settings-access-summary { grid-template-columns: 1fr; }
  .settings-access-summary-card { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .settings-access-summary-card > span, .settings-access-summary-card > small { grid-column: 1; }
  .settings-access-summary-card > strong { grid-column: 2; grid-row: 1 / 3; }
  .settings-team-row { grid-template-columns: 40px minmax(0,1fr) auto; padding: 12px; }
  .settings-team-avatar { grid-row: 1; }
  .settings-team-copy { grid-row: 1; }
  .settings-team-role-control { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .settings-member-remove, .settings-member-protected { grid-column: 3; grid-row: 1; }
  .settings-member-protected-copy { display: none; }
  .settings-role-list { grid-template-columns: 1fr; }
  .settings-role-editor { padding: 15px; }
  .settings-role-editor-heading { gap: 10px; }
  .settings-role-metrics { min-width: 54px; }
  .settings-permission-option { padding: 10px; }
  .settings-role-editor-actions { width: 100%; flex-direction: column; }
  .settings-role-editor-actions .btn { width: 100%; }
  .settings-role-pill { grid-column: 2; }
  .settings-inline-controls { width: 100%; justify-content: space-between; }
  .settings-time-input { width: 110px; }
  .settings-modal-actions { flex-direction: column-reverse; }
  .settings-modal-actions .btn { width: 100%; }
}
.notifications-channel-status.is-off { color: #64748b; background: #f1f5f9; }

/* =========================================================
   READABILITY + SPACING SYSTEM
   Shared floors and responsive corrections for active UI.
   ========================================================= */

/* Shared application rhythm and typography hierarchy */
.app-sidebar {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-content {
  margin-inline: auto;
  padding: 32px clamp(20px, 3vw, 36px) 64px;
}

.app-page-header h1 {
  font-size: 32px;
  line-height: 1.15;
}

.app-page-header .btn { white-space: nowrap; }

.app-page h2 { line-height: 1.25; }
.app-page h3 { line-height: 1.35; }

.dashboard-panel-header h2,
.detail-entry-heading h2,
.readiness-section-heading h2,
.workspace-section-heading h2,
.workspace-full-heading h2,
.documents-side-heading h2,
.company-profile-section-heading h2,
.company-profile-side-heading h2,
.notifications-side-heading h2,
.settings-section-heading h2,
.settings-modal h2 {
  font-size: 20px;
  line-height: 1.25;
}

.dashboard-tender-title-row h3,
.detail-side-card-heading h3,
.readiness-gap-title-row h3,
.company-profile-subheading h3 {
  font-size: 16px;
  line-height: 1.35;
}

/* A control should be easy to read and easy to hit, regardless of page. */
.app-page button {
  min-width: var(--control-min-height);
  min-height: var(--control-min-height);
}

.app-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.app-page select,
.app-page textarea {
  min-height: var(--control-min-height);
  font-size: var(--font-ui);
}

.app-nav-link,
.app-user-button,
.app-dropdown a,
.app-dropdown button {
  min-height: var(--control-min-height);
}

.app-icon-button,
.detail-modal-close,
.requirements-drawer-close,
.documents-drawer-close,
.company-profile-modal-close,
.settings-modal-close {
  width: var(--control-min-height);
  height: var(--control-min-height);
  min-width: var(--control-min-height);
  min-height: var(--control-min-height);
}

.app-user-meta span { font-size: 13px; }

.app-dropdown a,
.app-dropdown button,
.dashboard-primary-action,
.discover-saved-header-button,
.discover-reset-button,
.discover-view-button,
.detail-entry-action,
.detail-source-button,
.detail-save-wide,
.readiness-info-link,
.readiness-source-button,
.readiness-gap-footer a,
.readiness-text-link,
.requirements-clear-button,
.workspace-progress-card-top a,
.workspace-progress-card-top button,
.workspace-tab,
.workspace-text-button,
.workspace-ai-chips button,
.workspace-filter-chip,
.workspace-task-toolbar select,
.myt-tab,
.documents-tab,
.company-profile-text-button,
.company-profile-tab,
.company-profile-small-button,
.notifications-tab,
.notification-read-toggle,
.settings-text-action {
  min-height: var(--control-min-height);
  font-size: var(--font-meta);
}

.discover-search,
.discover-select,
.discover-sort,
.requirements-search-wrap input,
.requirements-filter-row select,
.requirements-toggle,
.myt-search-wrap input,
.myt-toolbar select,
.documents-search-wrap input,
.documents-toolbar select,
.documents-upload-form input,
.documents-upload-form select,
.company-profile-form input,
.company-profile-form select,
.notifications-search-wrap input,
.notifications-toolbar select,
.settings-field input,
.settings-field select,
.settings-compact-select select,
.settings-time-input,
.settings-modal-form input,
.settings-modal-form select,
.settings-modal-form textarea {
  min-height: var(--control-min-height);
  font-size: var(--font-ui);
}

/* Authentication controls use the same touch-target baseline. */
.password-toggle {
  right: 5px;
  min-width: var(--control-min-height);
  min-height: var(--control-min-height);
  font-size: var(--font-meta);
}

.checkbox-row { min-height: var(--control-min-height); }

/* Page-level breathing room */
.dashboard-kpi-grid,
.myt-summary-grid,
.documents-summary-grid,
.notifications-summary-grid {
  gap: 16px;
}

.dashboard-kpi,
.myt-summary-card,
.documents-summary-card,
.notifications-summary-card {
  padding: 20px;
}

.discover-results { gap: 16px; }

.dashboard-active-panel,
.active-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.active-table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.workspace-overview-grid,
.workspace-side-column {
  gap: 18px;
}

.workspace-progress-grid { gap: 14px; }
.workspace-attention-list { gap: 12px; }

.myt-row-main {
  min-height: 100px;
  padding: 16px 20px;
}

.documents-row {
  min-height: 88px;
  padding: 14px 16px;
}

.documents-side-card,
.company-profile-section-card,
.company-profile-side-card,
.notifications-side-card {
  padding: 20px;
}

.company-profile-summary-grid { gap: 14px; }
.company-profile-summary-card { padding: 16px; }

.notification-feed-main {
  grid-template-columns: 40px minmax(0, 1fr) 14px;
  gap: 12px;
  padding: 16px 10px 16px 16px;
}

.notification-feed-icon {
  width: 40px;
  height: 40px;
}

.notification-feed-title-row strong { font-size: 15px; }
.notification-feed-description { font-size: 14px; }
.notification-feed-meta { font-size: 13px; }

.settings-layout {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
}

.settings-panel { gap: 18px; }
.settings-section-card { padding: 24px; }
.settings-form-grid { gap: 16px; }

.settings-nav-link {
  min-height: 64px;
  gap: 12px;
  padding: 10px 12px;
}

.settings-nav-link strong,
.settings-nav-link small,
.settings-section-heading p,
.settings-field > span,
.settings-preference-row strong,
.settings-preference-row p,
.settings-notification-option strong,
.settings-notification-option small,
.settings-team-copy strong,
.settings-team-copy small,
.settings-session-row strong,
.settings-session-row small,
.settings-modal-form label > span,
.settings-toast strong,
.settings-toast span {
  font-size: var(--font-meta);
}

.settings-preference-row {
  min-height: 80px;
  padding: 16px 0;
}

.settings-notification-option {
  min-height: 92px;
  padding: 16px;
}

.settings-team-row {
  min-height: 72px;
  padding: 12px 14px;
}

/* Preserve the compact switch visual inside a full 44px hit area. */
.settings-switch {
  width: var(--control-min-height);
  height: var(--control-min-height);
}

.settings-switch > span {
  inset: auto;
  top: 11px;
  left: 3px;
  width: 38px;
  height: 22px;
}

/* Tablet shell: use all available width instead of squeezing beside 248px. */
@media (max-width: 1024px) {
  .app-shell { display: block; }

  .app-main {
    grid-column: auto;
    margin-left: 0;
  }

  .app-mobile-menu { display: grid; }

  .app-sidebar {
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 16px 0 45px rgba(15, 23, 42, 0.12);
  }

  .app-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(15, 23, 42, 0.35);
  }

  .app-mobile-overlay[hidden] { display: none; }
  .sidebar-open { overflow: hidden; }

  .app-topbar,
  .app-content {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Collapse the tender and analysis sidebars before their main copy gets narrow. */
@media (max-width: 1200px) {
  .analysis-layout { grid-template-columns: 1fr; }
  .analysis-side-column { position: static; grid-template-columns: 1fr 1fr; }
  .analysis-trust-note { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .tender-detail-hero,
  .tender-detail-layout {
    grid-template-columns: 1fr;
  }

  .tender-detail-score-panel {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
    column-gap: 20px;
  }

  .detail-score-heading,
  .detail-score-value,
  .detail-score-bar,
  .detail-score-label,
  .tender-detail-score-panel > p { grid-column: 1; }

  .detail-score-reasons {
    grid-column: 2;
    grid-row: 1 / 6;
    margin-top: 0;
    padding-top: 0;
    padding-left: 18px;
    border-top: 0;
    border-left: 1px solid #e5efff;
  }

  .tender-detail-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-profile-hero { grid-template-columns: 1fr; }
  .company-profile-completeness {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

/* Dense workspace rows become explicit two-line cards without implicit columns. */
@media (max-width: 1050px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .settings-nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .settings-nav-link > span:last-child small { display: none; }
  .settings-role-grid { grid-template-columns: 1fr; }

  .workspace-progress-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace-progress-overall { grid-column: span 2; }
  .workspace-task-header { display: none; }

  .workspace-task-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    padding: 12px 10px;
  }

  .workspace-task-row > span:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
  .workspace-task-row > span:nth-child(2) { grid-column: 2; grid-row: 1; }
  .workspace-task-row > span:nth-child(3) { grid-column: 2; grid-row: 2; }
  .workspace-task-row > span:nth-child(4) { grid-column: 3; grid-row: 1; justify-self: end; }
  .workspace-task-row > span:nth-child(5) { grid-column: 3; grid-row: 2; justify-self: end; }

  .workspace-document-row,
  .workspace-requirement-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .workspace-document-row > span:nth-child(3),
  .workspace-document-row > span:nth-child(5),
  .workspace-requirement-row > p,
  .workspace-requirement-row > b { display: none; }

  .workspace-document-row > span:nth-child(4) { justify-self: end; }
  .workspace-requirement-row > span { grid-column: 1; }
  .workspace-requirement-row > div { grid-column: 2; }
  .workspace-requirement-row > i { grid-column: 3; }
}

/* Portfolio rows switch to readable cards as soon as the table no longer fits. */
@media (max-width: 1250px) {
  .myt-table-head { display: none; }

  .myt-row-main {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr) auto;
    gap: 12px 16px;
    overflow: visible;
  }

  .myt-row-main > span:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .myt-row-main > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .myt-row-main > span:nth-child(3) { grid-column: 2; grid-row: 2; }
  .myt-row-main > span:nth-child(4) { grid-column: 1; grid-row: 3; }
  .myt-row-main > span:nth-child(5) { grid-column: 2; grid-row: 3; }

  .myt-row-main > span:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .myt-row-main > span:nth-child(2) .myt-health { margin-top: 0; padding-left: 0; }
  .myt-row-chevron { grid-column: 3; grid-row: 1; }
  .myt-progress-cell { max-width: 300px; }
}

@media (min-width: 1181px) and (max-width: 1250px) {
  .documents-table-head { display: grid; }
  .documents-row {
    grid-template-columns: minmax(245px, 1.7fr) minmax(110px, .75fr) minmax(120px, .85fr) minmax(115px, .8fr) 70px 105px 18px;
    overflow: visible;
  }
}

@media (max-width: 1180px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .settings-nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .settings-nav-link > span:last-child small { display: none; }
  .settings-role-grid { grid-template-columns: 1fr; }

  .documents-table-head { display: none; }

  .documents-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr) auto;
    gap: 10px 14px;
    overflow: visible;
  }

  .documents-row > span:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .documents-row > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .documents-row > span:nth-child(3) { grid-column: 2; grid-row: 2; }
  .documents-row > span:nth-child(4) { grid-column: 1; grid-row: 3; }
  .documents-row > span:nth-child(5) { grid-column: 2; grid-row: 3; }
  .documents-row > span:nth-child(6) { grid-column: 1 / 3; grid-row: 4; }

  .documents-row > span:nth-child(3) {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .documents-status-note { margin-top: 0; }
  .documents-row-chevron { grid-column: 3; grid-row: 1; }
  .documents-owner-cell,
  .documents-usage-cell,
  .documents-updated-cell { max-width: 300px; }

  .notifications-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notifications-tip-card { grid-column: 1 / -1; }
}

.settings-modal-form textarea { min-height: 92px; }

@media (max-width: 1000px) {
  .notifications-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .notifications-header-actions { width: 100%; }
  .notifications-header-actions .btn { flex: 1; }
}

@media (max-width: 900px) {
  .notifications-side-column { grid-template-columns: 1fr; }
  .notifications-tip-card { grid-column: auto; }
}

@media (max-width: 620px) {
  .analysis-section-card { padding: 18px; }

  .company-profile-status-row { flex-wrap: wrap; }
  .company-profile-credential-list article {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .company-profile-credential-status { grid-column: 2; justify-self: start; }
  .company-profile-personnel-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .notification-read-toggle {
    justify-self: stretch;
    margin: 0 16px 14px;
  }
}

@media (max-width: 760px) {
  .myt-row-main,
  .documents-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .myt-row-main > span:nth-child(1),
  .documents-row > span:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .myt-row-main > span:nth-child(2),
  .myt-row-main > span:nth-child(3),
  .myt-row-main > span:nth-child(4),
  .myt-row-main > span:nth-child(5),
  .documents-row > span:nth-child(2),
  .documents-row > span:nth-child(3),
  .documents-row > span:nth-child(4),
  .documents-row > span:nth-child(5),
  .documents-row > span:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .myt-row-chevron,
  .documents-row-chevron {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .app-content {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .workspace-progress-grid { grid-template-columns: 1fr; }
  .workspace-progress-overall { grid-column: auto; }
  .workspace-progress-card { min-height: 112px; }

  .workspace-direct-start { grid-template-columns: 1fr; }
  .workspace-direct-start .btn {
    grid-column: auto;
    width: 100%;
  }

  .company-profile-section-card,
  .company-profile-side-card,
  .settings-section-card { padding: 16px; }

  .settings-session-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .settings-session-row > :last-child {
    grid-column: 2;
    justify-self: start;
  }
}
