/* ================= OPERATIONS WORKSPACE ================= */

.ops-workspace {
  --ops-border: rgba(148, 163, 184, .14);
  --ops-border-strong: rgba(96, 165, 250, .28);
  --ops-text: #f8fafc;
  --ops-muted: #91a0b8;
  --ops-blue: #4f8cff;
  --ops-green: #2dd4a3;
  --ops-amber: #f6b94b;
  --ops-red: #f87171;
  color: var(--ops-text);
  display: grid;
  gap: 14px;
  width: 100%;
}

.ops-page-header {
  align-items: center;
  background:
    radial-gradient(circle at 92% 0%, rgba(79, 140, 255, .12), transparent 34%),
    linear-gradient(135deg, #111b30, #0d1729);
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
  display: flex;
  justify-content: space-between;
  min-height: 104px;
  padding: 21px 23px;
}

.ops-page-header-compact {
  min-height: 94px;
  padding: 19px 22px;
}

.ops-eyebrow,
.ops-panel-heading > div:first-child > span {
  color: #6ea2ff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ops-page-header h1 {
  font-size: 24px;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 5px 0 6px;
}

.ops-page-header p {
  color: var(--ops-muted);
  font-size: 12px;
  margin: 0;
}

.ops-header-mark {
  align-items: center;
  background: rgba(79, 140, 255, .1);
  border: 1px solid rgba(79, 140, 255, .2);
  border-radius: 13px;
  color: #7aa8ff;
  display: flex;
  font-size: 22px;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.ops-module-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}

.ops-module-card,
.ops-guidance-card {
  background: linear-gradient(145deg, #152139, #101a2d);
  border: 1px solid var(--ops-border);
  border-radius: 13px;
  min-height: 126px;
  padding: 20px;
}

.ops-module-card {
  align-items: center;
  color: var(--ops-text);
  cursor: pointer;
  display: grid;
  gap: 15px;
  grid-template-columns: 46px 1fr auto;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ops-module-card:hover {
  background: linear-gradient(145deg, #182640, #111d32);
  border-color: var(--ops-border-strong);
  transform: translateY(-2px);
}

.ops-module-icon,
.ops-guidance-icon {
  align-items: center;
  background: rgba(79, 140, 255, .11);
  border: 1px solid rgba(79, 140, 255, .2);
  border-radius: 11px;
  color: #7aa8ff;
  display: flex;
  font-size: 17px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.ops-module-copy strong,
.ops-module-copy small {
  display: block;
}

.ops-module-copy strong {
  font-size: 15px;
  margin-bottom: 6px;
}

.ops-module-copy small {
  color: var(--ops-muted);
  font-size: 10px;
  line-height: 1.5;
}

.ops-module-action {
  align-items: center;
  color: #91b5ff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  gap: 7px;
}

.ops-module-card:hover .ops-module-action i {
  transform: translateX(3px);
}

.ops-module-action i {
  transition: transform .18s ease;
}

.ops-guidance-card {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px 1fr;
}

.ops-guidance-icon {
  background: rgba(45, 212, 163, .09);
  border-color: rgba(45, 212, 163, .17);
  color: var(--ops-green);
  height: 42px;
  width: 42px;
}

.ops-guidance-card strong {
  font-size: 12px;
}

.ops-guidance-card p {
  color: var(--ops-muted);
  font-size: 10px;
  line-height: 1.55;
  margin: 6px 0 0;
}

.ops-header-actions {
  display: flex;
  gap: 8px;
}

.ops-primary-button,
.ops-back-button,
.ops-clear-button,
.ops-row-button,
.ops-confirm-button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  text-decoration: none;
  transition: .18s ease;
}

.ops-primary-button,
.ops-confirm-button {
  background: linear-gradient(135deg, #4f8cff, #3474ea);
  border: 1px solid rgba(96, 165, 250, .35);
  color: #fff;
  padding: 9px 13px;
}

.ops-primary-button:hover,
.ops-confirm-button:hover {
  box-shadow: 0 8px 20px rgba(52, 116, 234, .24);
  transform: translateY(-1px);
}

.ops-back-button,
.ops-clear-button,
.ops-row-button {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(148, 163, 184, .16);
  color: #cbd5e1;
}

.ops-back-button {
  padding: 9px 12px;
}

.ops-back-button:hover,
.ops-clear-button:hover,
.ops-row-button:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(148, 163, 184, .27);
  color: #fff;
}

.ops-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-kpi {
  align-items: center;
  background: linear-gradient(145deg, #152139, #101a2d);
  border: 1px solid var(--ops-border);
  border-radius: 12px;
  display: grid;
  gap: 11px;
  grid-template-columns: 36px 1fr;
  min-height: 82px;
  padding: 13px 15px;
  position: relative;
}

.ops-kpi::before {
  background: var(--ops-accent, var(--ops-blue));
  border-radius: 0 0 4px 4px;
  content: "";
  height: 3px;
  left: 15px;
  position: absolute;
  top: 0;
  width: 25px;
}

.ops-kpi-icon {
  align-items: center;
  background: rgba(79, 140, 255, .11);
  border: 1px solid rgba(79, 140, 255, .2);
  border-radius: 9px;
  color: var(--ops-accent, var(--ops-blue));
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.ops-kpi-assigned { --ops-accent: var(--ops-green); }
.ops-kpi-unassigned { --ops-accent: var(--ops-amber); }
.ops-kpi-upcoming { --ops-accent: var(--ops-blue); }
.ops-kpi-overdue { --ops-accent: var(--ops-red); }
.ops-kpi-assigned .ops-kpi-icon { background: rgba(45, 212, 163, .1); border-color: rgba(45, 212, 163, .18); }
.ops-kpi-unassigned .ops-kpi-icon { background: rgba(246, 185, 75, .1); border-color: rgba(246, 185, 75, .18); }
.ops-kpi-overdue .ops-kpi-icon { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .18); }

.ops-kpi span,
.ops-kpi strong,
.ops-kpi small { display: block; }
.ops-kpi span { color: var(--ops-muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ops-kpi strong { color: #fff; font-size: 22px; line-height: 1; margin: 4px 0; }
.ops-kpi small { color: #718098; font-size: 9px; }

.ops-panel {
  background: linear-gradient(145deg, #111a2d, #0e1728);
  border: 1px solid var(--ops-border);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
}

.ops-filter-panel {
  padding: 16px 18px 18px;
}

.ops-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
}

.ops-panel-heading h2 {
  font-size: 16px;
  letter-spacing: -.015em;
  margin: 3px 0 0;
}

.ops-filter-meta {
  align-items: center;
  color: var(--ops-muted);
  display: flex;
  font-size: 10px;
  gap: 10px;
}

.ops-clear-button {
  height: 34px;
  padding: 0 10px;
}

.ops-filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(235px, 1.45fr) repeat(4, minmax(135px, 1fr));
}

.ops-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ops-field > span {
  color: var(--ops-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.ops-field input,
.ops-field select,
.ops-input-with-icon,
.ops-team-select {
  background: #0a1323;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  color: #e5edf9;
  font-family: inherit;
  font-size: 11px;
  height: 36px;
  min-width: 0;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  width: 100%;
}

.ops-field input,
.ops-field select {
  padding: 0 10px;
}

.ops-field select option,
.ops-team-select option {
  background: #101a2d;
  color: #e5edf9;
}

.ops-field input:focus,
.ops-field select:focus,
.ops-input-with-icon:focus-within,
.ops-team-select:focus {
  border-color: rgba(79, 140, 255, .62);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, .1);
}

.ops-input-with-icon {
  align-items: center;
  display: flex;
  padding: 0 10px;
}

.ops-input-with-icon i {
  color: #66758e;
  font-size: 10px;
  margin-right: 8px;
}

.ops-input-with-icon input {
  background: transparent;
  border: 0;
  box-shadow: none;
  height: 34px;
  padding: 0;
}

.ops-input-with-icon input:focus { box-shadow: none; }

.ops-table-panel {
  overflow: hidden;
}

.ops-table-heading {
  margin: 0;
  padding: 15px 18px;
}

.ops-scroll-hint {
  color: #718098;
  display: flex;
  font-size: 10px;
  gap: 6px;
}

.ops-table-wrap {
  border-top: 1px solid var(--ops-border);
  max-height: calc(100vh - 245px);
  min-height: 260px;
  overflow: auto;
}

.ops-table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  min-width: 2360px;
  width: 100%;
}

.ops-table thead th {
  background: #101a2d;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  color: #8292aa;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .07em;
  padding: 11px 12px;
  position: sticky;
  text-align: left;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 3;
}

.ops-table tbody tr {
  background: rgba(255, 255, 255, .012);
  transform: none;
  transition: background .16s ease;
}

.ops-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .024); }
.ops-table tbody tr:hover { background: rgba(79, 140, 255, .055); transform: none; }
.ops-table tbody tr.warning-row { box-shadow: inset 3px 0 0 rgba(246, 185, 75, .75); }

.ops-table td {
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  color: #cbd5e1;
  font-size: 11px;
  max-width: 190px;
  overflow: hidden;
  padding: 10px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-ucid-cell {
  color: #eef4ff !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px !important;
  font-weight: 700;
}

.ops-primary-cell {
  color: #f1f5f9 !important;
  font-weight: 700;
}

.ops-planning-badge {
  background: rgba(79, 140, 255, .1);
  border: 1px solid rgba(79, 140, 255, .2);
  border-radius: 999px;
  color: #9fc2ff;
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  padding: 5px 8px;
  text-transform: uppercase;
}

.ops-team-select {
  font-size: 10px;
  height: 30px;
  min-width: 125px;
  padding: 0 7px;
}

.ops-confirm-button {
  font-size: 10px;
  padding: 7px 10px;
}

.ops-row-actions {
  display: flex;
  gap: 6px;
}

.ops-row-button {
  font-size: 10px;
  padding: 7px 9px;
}

.ops-report-icons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 96px;
}

.ops-report-icon {
  align-items: center;
  background: rgba(14, 165, 233, .1);
  border: 1px solid rgba(14, 165, 233, .28);
  border-radius: 8px;
  color: #7dd3fc;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  letter-spacing: .04em;
  min-width: 42px;
  padding: 0 8px;
  transition: .18s ease;
}

.ops-report-icon:hover {
  background: rgba(14, 165, 233, .18);
  border-color: rgba(56, 189, 248, .42);
  color: #e0f2fe;
}

.ops-report-empty {
  color: #6b7b94;
  font-size: 11px;
  font-weight: 700;
}

.ops-row-button-primary {
  background: rgba(79, 140, 255, .11);
  border-color: rgba(79, 140, 255, .22);
  color: #9fc2ff;
}

.ops-row-button-danger {
  background: rgba(248, 113, 113, .08);
  border-color: rgba(248, 113, 113, .18);
  color: #f0a3a3;
}

#sessionModal .modal-content {
  border-radius: 14px;
}

.manual-count-modal-content {
  max-height: 92vh;
  overflow: auto;
  padding: 0;
  width: min(920px, 96vw);
}

.manual-count-modal-header {
  align-items: flex-start;
  background:
    radial-gradient(circle at top right, rgba(79, 140, 255, .16), transparent 36%),
    linear-gradient(135deg, #14203a, #0f1a2d);
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  border-radius: 20px 20px 0 0;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 24px 26px 18px;
}

.manual-count-modal-eyebrow {
  color: #79a9ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.manual-count-modal-header h3 {
  margin: 6px 0 8px;
}

.manual-count-modal-subtitle {
  color: #9aabc4;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  max-width: 560px;
}

.manual-count-status-card {
  background: rgba(9, 15, 28, .45);
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 16px;
  min-width: 180px;
  padding: 14px 16px;
}

.manual-count-status-label {
  color: #87a0c7;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.manual-count-status-card strong {
  color: #fff;
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.manual-count-status-card small {
  color: #9cb0cd;
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.manual-count-workflow-note {
  background: rgba(79, 140, 255, .08);
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  color: #b7c6dc;
  font-size: 12px;
  line-height: 1.5;
  padding: 14px 26px;
}

.manual-count-grid,
.manual-count-support-grid,
.manual-count-modal-actions {
  padding-left: 26px;
  padding-right: 26px;
}

.manual-count-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 22px;
}

.manual-count-support-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.35fr .95fr;
  padding-top: 16px;
}

.manual-count-grid .form-group,
.manual-count-support-grid .form-group {
  background: rgba(255, 255, 255, .022);
  border: 1px solid rgba(148, 163, 184, .08);
  border-radius: 14px;
  padding: 14px;
}

.manual-count-grid .form-group label,
.manual-count-support-grid .form-group label {
  color: #dce6f5;
}

.manual-count-field-hint {
  color: #8ea2c0;
  display: block;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 7px;
}

.manual-count-grid textarea,
.manual-count-support-grid textarea {
  background: rgba(7, 12, 24, .68);
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  min-height: 88px;
  outline: none;
  padding: 12px 14px;
  resize: vertical;
  width: 100%;
}

.manual-count-grid textarea:focus,
.manual-count-support-grid textarea:focus {
  border-color: rgba(96, 165, 250, .55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}

.manual-count-icr-group input[type="file"] {
  padding: 10px;
}

.manual-count-modal-actions {
  border-top: 1px solid rgba(148, 163, 184, .08);
  margin-top: 18px;
  padding-bottom: 24px;
  padding-top: 18px;
}

@media (max-width: 1180px) {
  .ops-module-grid { grid-template-columns: 1fr; }
  .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-filter-grid { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .ops-search-field { grid-column: span 2; }
}

@media (max-width: 720px) {
  .manual-count-modal-header {
    flex-direction: column;
  }
  .manual-count-status-card {
    min-width: 0;
    width: 100%;
  }
  .manual-count-grid,
  .manual-count-support-grid {
    grid-template-columns: 1fr;
  }
  .ops-page-header,
  .ops-panel-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .ops-header-mark { display: none; }
  .ops-header-actions { flex-direction: column; width: 100%; }
  .ops-primary-button,
  .ops-back-button { width: 100%; }
  .ops-kpis,
  .ops-filter-grid { grid-template-columns: 1fr; }
  .ops-search-field { grid-column: auto; }
  .ops-filter-meta { justify-content: space-between; width: 100%; }
  .ops-module-card { grid-template-columns: 42px 1fr; }
  .ops-module-action { grid-column: 2; }
}
