/**
 * Belisys Dispatch Console — shared visual system
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap');

:root {
  --ops-ink: #0c0c0e;
  --ops-surface: #141416;
  --ops-panel: #141416;
  --ops-panel-raised: #1c1c20;
  --ops-line: #2a2a30;
  --ops-text: #f2f2f0;
  --ops-muted: #9a9aa3;
  --ops-signal: #ff6b2c;
  --ops-signal-soft: rgba(255, 107, 44, 0.14);
  --ops-brand: #4f8cff;
  --ops-brand-hover: #3b7aef;
  --ops-amber: #ff6b2c;
  --ops-danger: #ff4d4d;
  --ops-ok: #3dcf8e;
  --ops-radius: 4px;
  --ops-radius-lg: 8px;
  --ops-font: 'Manrope', system-ui, sans-serif;
  --ops-display: 'Syne', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body.ops-body,
.ops-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--ops-font);
  background-color: var(--ops-ink);
  color: var(--ops-text);
  background-image:
    radial-gradient(1200px 600px at 50% -20%, rgba(255, 107, 44, 0.07), transparent 55%),
    radial-gradient(900px 500px at 100% 100%, rgba(79, 140, 255, 0.05), transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 47px,
      rgba(255, 255, 255, 0.015) 47px,
      rgba(255, 255, 255, 0.015) 48px
    );
  background-attachment: fixed;
}

.ops-muted {
  color: var(--ops-muted);
}

.ops-display {
  font-family: var(--ops-display);
  font-weight: 700;
}

/* ——— Brand ——— */
.ops-brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.ops-brand-mark__name {
  font-family: var(--ops-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ops-text);
  line-height: 1;
}

.ops-brand-mark__name::after {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.35rem;
  background: var(--ops-signal);
  border-radius: 1px;
  vertical-align: 0.15em;
}

.ops-brand-hero {
  text-align: left;
  margin-bottom: 1.5rem;
  animation: ops-fade-up 0.5s ease-out both;
}

.ops-brand-hero__name {
  font-family: var(--ops-display);
  font-size: clamp(3rem, 10vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ops-text);
  margin: 0;
  line-height: 0.9;
}

.ops-brand-hero__name::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.85rem;
  background: var(--ops-signal);
}

/* ——— Surfaces ——— */
.ops-panel {
  background: var(--ops-surface);
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius-lg);
}

.ops-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 12, 14, 0.92);
  border-bottom: 1px solid var(--ops-line);
}

.ops-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--ops-radius);
  background: var(--ops-signal);
  color: #0c0c0e;
  font-family: var(--ops-font);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.ops-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.ops-btn:disabled {
  background: var(--ops-line);
  color: var(--ops-muted);
  cursor: not-allowed;
  filter: none;
}

.ops-btn--ghost {
  background: transparent;
  border-color: var(--ops-line);
  color: var(--ops-text);
}

.ops-btn--ghost:hover:not(:disabled) {
  border-color: var(--ops-signal);
  color: var(--ops-signal);
  filter: none;
}

.ops-btn--amber {
  background: var(--ops-signal-soft);
  border-color: rgba(255, 107, 44, 0.45);
  color: var(--ops-signal);
}

.ops-btn--amber:hover:not(:disabled) {
  background: rgba(255, 107, 44, 0.22);
  filter: none;
}

.ops-input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: var(--ops-radius);
  border: 1px solid var(--ops-line);
  background: var(--ops-ink);
  color: var(--ops-text);
  font-family: var(--ops-font);
  font-size: 0.95rem;
}

.ops-input:focus {
  outline: none;
  border-color: var(--ops-signal);
  box-shadow: 0 0 0 2px rgba(255, 107, 44, 0.2);
}

.ops-input::placeholder {
  color: var(--ops-muted);
}

.ops-input--search {
  padding-left: 2.35rem;
}

.ops-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ops-muted);
  margin-bottom: 0.4rem;
}

.ops-err {
  margin: 0 0 0.75rem;
  color: #fecaca;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.35);
  padding: 0.65rem 0.75rem;
  border-radius: var(--ops-radius);
  font-size: 0.85rem;
}

.ops-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--ops-ok);
  display: inline-block;
  animation: ops-pulse 2.2s ease-in-out infinite;
}

/* ——— KPI ribbon (no cards) ——— */
.ops-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius-lg);
  background: var(--ops-surface);
  overflow: hidden;
  animation: ops-fade-up 0.45s ease-out 0.05s both;
}

.ops-ribbon__cell {
  padding: 1.25rem 1.35rem 1.15rem;
  border-right: 1px solid var(--ops-line);
  position: relative;
}

.ops-ribbon__cell:last-child {
  border-right: none;
}

.ops-ribbon__label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ops-muted);
}

.ops-ribbon__value {
  margin: 0.45rem 0 0;
  font-family: var(--ops-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ops-text);
}

.ops-ribbon__value--danger {
  color: var(--ops-danger);
}

.ops-ribbon__value--ok {
  color: var(--ops-ok);
}

.ops-ribbon__value--signal {
  color: var(--ops-signal);
}

.ops-ribbon__value--brand {
  color: var(--ops-brand);
}

.ops-ribbon__hint {
  margin: 0.5rem 0 0;
  font-size: 0.7rem;
  color: var(--ops-muted);
  line-height: 1.35;
  max-width: 14rem;
}

@media (max-width: 900px) {
  .ops-ribbon {
    grid-template-columns: 1fr 1fr;
  }
  .ops-ribbon__cell:nth-child(2) {
    border-right: none;
  }
  .ops-ribbon__cell:nth-child(1),
  .ops-ribbon__cell:nth-child(2) {
    border-bottom: 1px solid var(--ops-line);
  }
}

@media (max-width: 520px) {
  .ops-ribbon {
    grid-template-columns: 1fr;
  }
  .ops-ribbon__cell {
    border-right: none;
    border-bottom: 1px solid var(--ops-line);
  }
  .ops-ribbon__cell:last-child {
    border-bottom: none;
  }
}

/* ——— Module rail (text nav, no icon cards) ——— */
.ops-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  padding: 0.25rem 0 0.5rem;
  border-bottom: 1px solid var(--ops-line);
  margin-bottom: 0.25rem;
  animation: ops-fade-up 0.45s ease-out 0.12s both;
}

.ops-rail__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.65rem 0;
  text-decoration: none;
  color: var(--ops-text);
  font-family: var(--ops-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  transition: color 0.15s ease, transform 0.15s ease;
  position: relative;
}

.ops-rail__num {
  font-size: 0.7rem;
  font-family: var(--ops-font);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ops-muted);
}

.ops-rail__link:hover {
  color: var(--ops-signal);
  transform: translateX(3px);
}

.ops-rail__link:hover .ops-rail__num {
  color: var(--ops-signal);
}

.ops-rail__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.35rem;
  width: 0;
  height: 2px;
  background: var(--ops-signal);
  transition: width 0.2s ease;
}

.ops-rail__link:hover::after {
  width: 100%;
}

/* ——— Workbench layout ——— */
.ops-shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.5rem;
}

@media (min-width: 1024px) {
  .ops-shell {
    padding: 1.5rem 2rem 3rem;
  }
}

.ops-workbench {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  animation: ops-fade-up 0.45s ease-out 0.18s both;
}

@media (min-width: 1100px) {
  .ops-workbench {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
    gap: 1.75rem;
    align-items: start;
  }
}

.ops-work-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .ops-work-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.ops-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ops-signal);
}

.ops-title {
  margin: 0;
  font-family: var(--ops-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ops-text);
}

.ops-clock {
  font-family: var(--ops-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Prüfung compact strip */
.ops-strip {
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius-lg);
  background: var(--ops-surface);
  overflow: hidden;
}

.ops-strip summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  font-family: var(--ops-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  user-select: none;
}

.ops-strip summary::-webkit-details-marker {
  display: none;
}

.ops-strip summary::after {
  content: '+';
  font-family: var(--ops-font);
  font-weight: 600;
  color: var(--ops-muted);
  font-size: 1.1rem;
}

.ops-strip[open] summary::after {
  content: '–';
  color: var(--ops-signal);
}

.ops-strip__body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--ops-line);
}

/* Priority side list */
.ops-side {
  border-top: 2px solid var(--ops-signal);
  background: var(--ops-surface);
  border-left: 1px solid var(--ops-line);
  border-right: 1px solid var(--ops-line);
  border-bottom: 1px solid var(--ops-line);
  border-radius: 0 0 var(--ops-radius-lg) var(--ops-radius-lg);
  padding: 1.15rem 1.15rem 1rem;
  max-height: 560px;
  display: flex;
  flex-direction: column;
}

.ops-side__list {
  flex: 1;
  overflow-y: auto;
  margin-top: 0.75rem;
}

/* Profile */
.ops-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border-radius: var(--ops-radius);
  background: transparent;
  border: 1px solid var(--ops-line);
  color: var(--ops-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ops-profile-btn:hover {
  border-color: var(--ops-signal);
  background: var(--ops-signal-soft);
}

.ops-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 3px;
  border: none;
  background: var(--ops-signal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0c0e;
  font-family: var(--ops-display);
  font-weight: 800;
  font-size: 0.8rem;
  overflow: hidden;
}

.ops-avatar--lg {
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.15rem;
}

.ops-stat {
  background: var(--ops-ink);
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius);
  padding: 0.85rem;
}

.ops-stat__label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ops-muted);
}

.ops-stat__value {
  margin: 0.35rem 0 0;
  font-family: var(--ops-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.ops-section-title {
  font-family: var(--ops-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ops-text);
  margin: 0;
}

@keyframes ops-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ops-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.ops-fade-in {
  animation: ops-fade-up 0.4s ease-out both;
}

/* Legacy pages still using glass-panel */
.glass-panel {
  background: var(--ops-surface) !important;
  border: 1px solid var(--ops-line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}
