/* Operations workspace ----------------------------------------------------
   The public shell owns the global palette and primitives.  These rules only
   describe the dense-but-calm admin workspace and its responsive behaviour. */

.ops-page {
  --ops-shadow: 0 14px 38px rgba(24, 76, 60, 0.08);
  --ops-shadow-soft: 0 6px 20px rgba(24, 76, 60, 0.06);
  --ops-soft-green: #e9f2e9;
  --ops-soft-warm: #fff1df;
  --ops-soft-blue: #eaf0f6;
  --ops-warm: #9b5f20;
  --ops-blue: #376681;
  min-height: 72vh;
}

.ops-page-head {
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 18px;
}

.ops-page-head .page-head-main {
  min-width: 0;
}

.ops-page-head h1 {
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

.ops-page-head p {
  margin: 0;
}

.ops-page-head .page-head-actions {
  flex: 0 0 auto;
}

.ops-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  margin: 2px 0 0;
  padding: 6px;
  border: 1px solid var(--line, #e3e5da);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--ops-shadow-soft);
  scrollbar-width: thin;
}

.ops-nav::-webkit-scrollbar {
  height: 4px;
}

.ops-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(24, 76, 60, 0.2);
}

.ops-nav-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  color: var(--muted, #5e6b61);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ops-nav-link:hover,
.ops-nav-link:focus-visible {
  color: var(--green, #184c3c);
  background: var(--ops-soft-green);
  outline: none;
}

.ops-nav-link:active {
  transform: translateY(1px);
}

.ops-nav-link.is-active {
  color: #fffdf8;
  background: var(--green, #184c3c);
  box-shadow: 0 5px 14px rgba(24, 76, 60, 0.18);
}

.ops-nav-link svg,
.ops-nav-link > span:first-child {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.ops-rolebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
  padding: 0 4px;
  color: var(--green, #184c3c);
  font-size: 0.78rem;
}

.ops-rolebar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.ops-content {
  padding: 22px 0 56px;
}

.ops-content > .section-header,
.ops-content > .card,
.ops-content > .empty-state {
  margin-bottom: 22px;
}

.ops-page .section-header {
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
}

.ops-page .section-header h2,
.ops-page .section-header h3 {
  margin: 2px 0 5px;
  letter-spacing: -0.025em;
}

.ops-page .section-header p {
  margin: 0;
  max-width: 700px;
}

.section-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.ops-page .card {
  box-shadow: var(--ops-shadow-soft);
}

.ops-page .card:hover {
  box-shadow: var(--ops-shadow);
}

.ops-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  min-height: 142px;
  overflow: hidden;
}

.metric-card::after {
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(24, 76, 60, 0.045);
  content: '';
}

.metric-card.metric-warm::after {
  background: rgba(155, 95, 32, 0.09);
}

.metric-card.metric-green::after {
  background: rgba(24, 76, 60, 0.095);
}

.metric-card.metric-blue::after {
  background: rgba(55, 102, 129, 0.09);
}

.metric-value {
  display: block;
  margin: 12px 0 8px;
  color: var(--ink, #1d3028);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric-detail {
  max-width: 88%;
  font-size: 0.82rem;
}

.ops-overview-grid,
.ranking-top-grid,
.competition-top-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
  margin-bottom: 22px;
}

.ops-overview-grid > .card,
.ranking-top-grid > .card,
.competition-top-grid > .card {
  min-width: 0;
}

.compact-stack {
  gap: 11px;
}

.timeline-list {
  gap: 0;
  padding-top: 4px;
}

.timeline-item {
  position: relative;
  align-items: flex-start;
  gap: 13px;
  min-height: 66px;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 17px;
  bottom: -1px;
  left: 6px;
  width: 1px;
  background: var(--line, #e3e5da);
  content: '';
}

.timeline-item strong,
.timeline-item p {
  position: relative;
  z-index: 1;
}

.timeline-item p {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.timeline-dot {
  z-index: 1;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 3px;
  border: 3px solid var(--line, #e3e5da);
  border-radius: 50%;
  background: var(--card, #fffdf8);
}

.timeline-dot.is-done {
  border-color: var(--green, #184c3c);
  background: var(--green, #184c3c);
}

.timeline-dot.is-current {
  border-color: var(--ops-warm);
  background: var(--ops-soft-warm);
}

.review-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 22px;
  border: 1px solid #dce7dc;
  background: linear-gradient(110deg, #f3f8f0, #fffdf8 72%);
}

.review-guide .row {
  align-items: flex-start;
  gap: 10px;
}

.review-guide strong {
  font-size: 0.9rem;
}

.review-guide br + .muted {
  font-size: 0.8rem;
  line-height: 1.45;
}

.guide-mark {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: var(--green, #184c3c);
  font-size: 0.75rem;
  font-weight: 800;
}

.notice-warm {
  border-color: #f0d7b7;
  color: #734415;
  background: var(--ops-soft-warm);
  font-size: 0.82rem;
}

.work-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 17px;
  border: 1px solid var(--line, #e3e5da);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.65);
}

.work-media {
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 13px;
  background: #edf2e9;
}

.work-media .media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  display: grid;
  place-items: center;
  color: #7f9686;
  background: linear-gradient(145deg, #eef5ea, #e4eee4);
  font-size: 1.3rem;
}

.work-main {
  min-width: 0;
  justify-content: space-between;
}

.work-title-row {
  align-items: flex-start;
  gap: 12px;
}

.work-title-row h3 {
  margin: 2px 0 0;
  font-size: 1.08rem;
}

.work-description {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.88rem;
  line-height: 1.55;
}

.work-meta {
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 11px;
  font-size: 0.78rem;
}

.work-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.work-actions {
  justify-content: flex-end;
  gap: 7px;
  min-height: 28px;
  margin-top: 11px;
}

.works-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.works-grid .work-card {
  grid-template-columns: 108px minmax(0, 1fr);
}

.works-grid .work-media {
  width: 108px;
  height: 108px;
}

.works-grid .work-description {
  -webkit-line-clamp: 3;
}

.filter-pills {
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 18px;
}

.table-heading {
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.table-heading h3 {
  margin: 0 0 4px;
}

.table-heading p {
  margin: 0;
}

.ranking-card {
  border-color: var(--line, #e3e5da);
  background: rgba(247, 249, 242, 0.7);
}

.ranking-card > .split {
  align-items: flex-start;
}

.ranking-card p {
  margin: 5px 0 0;
  font-size: 0.8rem;
}

.ranking-table {
  margin-top: 15px;
  border-top: 1px solid var(--line, #e3e5da);
}

.ranking-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid var(--line, #e3e5da);
  font-size: 0.85rem;
}

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

.rank-number {
  color: var(--green, #184c3c);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  text-align: center;
}

.rank-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.rank-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-row,
.registration-row,
.audit-row,
.content-entry {
  min-height: 68px;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #e3e5da);
}

.certificate-row:last-child,
.registration-row:last-child,
.audit-row:last-child,
.content-entry:last-child {
  border-bottom: 0;
}

.certificate-mark,
.audit-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--green, #184c3c);
  background: var(--ops-soft-green);
}

.certificate-main,
.registration-main,
.audit-main,
.content-entry-main {
  min-width: 0;
  flex: 1 1 auto;
}

.certificate-main strong,
.registration-main strong,
.audit-main strong,
.content-entry-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-main .muted,
.registration-main .muted,
.audit-main .muted,
.content-entry-main .muted {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.certificate-status {
  display: grid;
  justify-items: end;
  gap: 5px;
  flex: 0 0 auto;
}

.certificate-status small {
  font-size: 0.73rem;
}

.avatar-soft {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--green, #184c3c);
  background: var(--ops-soft-green);
  font-weight: 800;
}

.content-collections-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-bottom: 22px;
}

.content-collection {
  min-width: 0;
}

.content-collection > .split {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.content-collection h3 {
  margin: 3px 0 5px;
}

.content-collection p {
  margin: 0;
}

.content-entry {
  align-items: center;
  gap: 10px;
}

.content-entry-thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  border-radius: 11px;
  object-fit: cover;
}

.content-entry-status,
.content-entry-actions {
  flex: 0 0 auto;
}

.content-entry-actions {
  justify-content: flex-end;
  gap: 6px;
}

.content-entry .muted {
  max-width: 36ch;
}

.form-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.field-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: end;
  gap: 8px;
  min-height: 42px;
}

.field-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green, #184c3c);
}

.competition-entry {
  border-color: var(--line, #e3e5da);
  background: rgba(247, 249, 242, 0.72);
}

.competition-entry > .split {
  align-items: center;
  gap: 10px;
}

.competition-entry p {
  margin: 10px 0;
  font-size: 0.87rem;
  line-height: 1.55;
}

.competition-meta {
  flex-wrap: wrap;
  gap: 7px 14px;
  font-size: 0.77rem;
}

.competition-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.audit-row {
  align-items: center;
}

.audit-icon {
  width: 35px;
  height: 35px;
  flex-basis: 35px;
  border-radius: 10px;
  background: var(--ops-soft-blue);
  color: var(--ops-blue);
}

.audit-row > small {
  flex: 0 0 auto;
}

.btn-sm {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 9px;
  font-size: 0.76rem;
}

.ops-page .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid rgba(24, 76, 60, 0.1);
  border-radius: 999px;
  color: var(--green, #184c3c);
  background: var(--ops-soft-green);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.ops-page .pill.pill-warm {
  border-color: #efd5b6;
  color: #86501b;
  background: var(--ops-soft-warm);
}

.ops-page .pill.pill-green {
  border-color: #cce1cf;
  color: #276141;
  background: #e7f4e8;
}

.ops-page .btn:disabled,
.ops-page button[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.52;
}

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

  .works-grid,
  .content-collections-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .ops-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-page-head .page-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ops-overview-grid,
  .ranking-top-grid,
  .competition-top-grid {
    grid-template-columns: 1fr;
  }

  .review-guide {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-guide .row {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .ops-content {
    padding-top: 16px;
  }

  .ops-rolebar {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px 0;
  }

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

  .section-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ops-kpi-grid {
    gap: 10px;
  }

  .metric-card {
    min-height: 118px;
    padding: 16px;
  }

  .metric-value {
    margin-top: 10px;
    font-size: 2.1rem;
  }

  .work-card,
  .works-grid .work-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .work-media,
  .works-grid .work-media {
    width: 74px;
    height: 74px;
  }

  .work-title-row {
    display: block;
  }

  .work-title-row .pill {
    margin-top: 8px;
  }

  .work-meta {
    gap: 5px 10px;
  }

  .work-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .certificate-row,
  .registration-row,
  .content-entry {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .certificate-status {
    margin-left: auto;
  }

  .certificate-row > .row,
  .registration-row > .row,
  .content-entry-actions {
    width: 100%;
    justify-content: flex-end;
    padding-left: 55px;
  }

  .content-entry-main {
    max-width: calc(100% - 68px);
  }

  .content-entry-status {
    margin-left: 62px;
  }

  .content-entry-actions {
    padding-left: 62px;
  }

  .ranking-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .ranking-row > .muted {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ops-nav-link {
    transition: none;
  }
}

