/* Internal dashboard shell — extends apps/internal-ops/admin-theme.css */

#ops-nav {
  width: var(--nav-w);
  min-height: 100vh;
  background: var(--color-bg-elevated);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 16px;
  overflow-y: auto;
  z-index: 2;
}

/* Logo + kicker: .nav-logo-wrap, .nav-kicker, .ol-nav-logo (admin-theme.css + nav-brand.css) */

.nav-body {
  flex: 1;
  overflow-y: auto;
}

.nav-section {
  padding: 14px 0 0;
}

.nav-label {
  font-family: var(--font-data);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 16px 8px;
}

a.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
}

a.nav-item:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

a.nav-item.active {
  color: var(--color-text);
  background: var(--color-brand-dim);
  border-left-color: var(--color-brand);
  box-shadow: none;
}

a.nav-item.disabled {
  color: var(--color-text-muted);
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
  background: transparent;
  border-left-color: transparent;
}

a.nav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-footer .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 10px;
  color: var(--color-text);
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.user-role {
  font-size: 10px;
  color: var(--color-text-muted);
}

.ops-content-column {
  margin-left: var(--nav-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ops-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 36px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.ops-topbar-title {
  font-family: var(--font-brand);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.ops-topbar-date {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ops-main {
  margin-left: 0 !important;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

.greeting-line {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 20px;
}

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

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

.kpi-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.kpi-card .kpi-label {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.kpi-card .kpi-value {
  font-family: var(--font-data);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.section-block {
  margin-bottom: 24px;
}

.section-block h2 {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.view-toggle button {
  background: var(--color-surface);
  border: none;
  color: var(--color-text-secondary);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

.view-toggle button.active {
  background: var(--color-brand-dim);
  color: var(--color-text);
}

.kanban-board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col {
  flex: 0 0 240px;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: 72vh;
}

.kanban-col-header {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.kanban-col-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}

.kanban-col-footer {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 8px 12px;
  border-top: 1px solid var(--color-border);
}

.kanban-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 10px;
  margin-bottom: 8px;
  cursor: grab;
  font-size: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.55;
}

.kanban-col-body.drag-over {
  outline: 1px dashed var(--color-brand);
  outline-offset: -2px;
}

.priority-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.priority-dot.high {
  background: #d4af37;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.45);
}

.priority-dot.medium {
  background: var(--color-warning);
}

.priority-dot.low {
  background: var(--color-text-muted);
}

.progress-track {
  height: 8px;
  background: var(--color-surface-muted);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: 4px;
  transition: width 0.25s ease;
}

.score-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-brand) calc(var(--pct, 0) * 1%),
    var(--color-surface-muted) 0
  );
  display: grid;
  place-items: center;
  position: relative;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--color-bg-elevated);
}

.score-ring span {
  position: relative;
  z-index: 1;
  font-family: var(--font-data);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.client-tile {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.client-tile:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
}

.client-tile.expanded {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 1px rgba(250, 33, 33, 0.2);
}

.subpanel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
}

.urgency-overdue {
  color: var(--color-brand);
  font-weight: 600;
}

.urgency-today {
  color: var(--color-warning);
  font-weight: 600;
}

.urgency-soon {
  color: var(--color-text-secondary);
}

.accent-border-red {
  border-left: 3px solid var(--color-brand);
}

.accent-border-gold {
  border-left: 3px solid var(--color-warning);
}

.sortable-th {
  cursor: pointer;
  user-select: none;
}

.sortable-th:hover {
  color: var(--color-text);
}
