/* RRS — Ticket Workflow (shared with login hub) */

.gc-wf-page {
  flex: 1;
  min-width: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 48px;
  width: 100%;
}

.gc-wf-page--embedded {
  padding-top: 8px;
}

.gc-wf-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.gc-wf-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gc-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.gc-wf-back:hover { text-decoration: underline; }

.gc-wf-back i, .gc-wf-back svg { width: 14px; height: 14px; }

.gc-wf-lang-toggle {
  display: inline-flex;
  border: 1px solid var(--gc-border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--gc-surface);
  box-shadow: var(--gc-shadow-sm);
}

.gc-wf-lang-toggle button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gc-text-secondary);
  font-family: inherit;
}

.gc-wf-lang-toggle button.is-active {
  background: var(--gc-navy);
  color: #fff;
}

.gc-wf-hero {
  background: linear-gradient(135deg, var(--gc-navy) 0%, #1a5080 100%);
  color: #fff;
  border-radius: var(--gc-radius-lg);
  padding: 24px 28px;
  margin-bottom: 22px;
  box-shadow: var(--gc-shadow-md);
}

.gc-wf-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
}

.gc-wf-hero p {
  margin: 0;
  opacity: 0.92;
  font-size: 14px;
  line-height: 1.7;
  max-width: 72ch;
}

.gc-wf-portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.gc-wf-portal-tabs button {
  border: 1px solid var(--gc-border-light);
  background: var(--gc-surface);
  color: var(--gc-text-secondary);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.gc-wf-portal-tabs button:hover {
  border-color: var(--gc-blue);
  color: var(--gc-navy);
}

.gc-wf-portal-tabs button.is-active {
  background: var(--gc-navy);
  border-color: var(--gc-navy);
  color: #fff;
}

.gc-wf-section {
  background: var(--gc-surface);
  border: 1px solid var(--gc-border-light);
  border-radius: var(--gc-radius-md);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--gc-shadow-sm);
}

.gc-wf-section h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--gc-navy);
  font-weight: 800;
}

.gc-wf-section h3 {
  margin: 18px 0 10px;
  font-size: 0.95rem;
  color: var(--gc-navy);
  font-weight: 700;
}

.gc-wf-lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--gc-text-secondary);
  line-height: 1.65;
}

.gc-wf-table-wrap { overflow-x: auto; }

.gc-wf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.gc-wf-table th,
.gc-wf-table td {
  padding: 9px 11px;
  text-align: start;
  border-bottom: 1px solid var(--gc-border-light);
  vertical-align: top;
}

.gc-wf-table th {
  background: var(--gc-muted);
  color: var(--gc-navy);
  font-weight: 700;
  white-space: nowrap;
}

.gc-wf-table tr:last-child td { border-bottom: 0; }

.gc-wf-code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--gc-blue);
  background: var(--gc-blue-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

.gc-wf-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.gc-wf-badge--done { background: var(--gc-success-soft); color: var(--gc-success); }
.gc-wf-badge--planned { background: var(--gc-warning-soft); color: var(--gc-warning); }

.gc-wf-diagram {
  position: relative;
  background:
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(198, 154, 46, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(20, 93, 160, 0.08) 0%, transparent 50%),
    linear-gradient(165deg, #F8FAFC 0%, #EEF3F8 100%);
  border: 1px solid rgba(11, 46, 74, 0.1);
  border-radius: 16px;
  padding: 28px 22px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 24px rgba(11, 46, 74, 0.05);
  min-height: 120px;
  transition: opacity 0.2s ease;
}

.gc-wf-diagram.is-loading {
  opacity: 0.55;
}

.gc-wf-diagram.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  background-size: 200% 100%;
  animation: gc-wf-shimmer 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gc-wf-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.gc-wf-diagram svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.gc-wf-diagram svg .nodeLabel,
.gc-wf-diagram svg .edgeLabel,
.gc-wf-diagram svg .cluster-label,
.gc-wf-diagram svg foreignObject div,
.gc-wf-diagram svg foreignObject span {
  font-family: var(--gc-font-ar), "Expo Arabic", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  color: #0B2E4A !important;
}

.gc-wf-diagram svg .cluster-label foreignObject div,
.gc-wf-diagram svg .cluster-label span {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0B2E4A !important;
  letter-spacing: 0.01em;
}

.gc-wf-diagram svg .cluster rect {
  fill: rgba(11, 46, 74, 0.03) !important;
  stroke: rgba(11, 46, 74, 0.16) !important;
  stroke-width: 1.5px !important;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.gc-wf-diagram svg .node rect,
.gc-wf-diagram svg .node polygon,
.gc-wf-diagram svg .node circle,
.gc-wf-diagram svg .node path {
  filter: drop-shadow(0 3px 8px rgba(11, 46, 74, 0.1));
  stroke-width: 1.75px !important;
}

.gc-wf-diagram svg .node rect {
  fill: #EAF2FA !important;
  stroke: #145DA0 !important;
}

.gc-wf-diagram svg .gc-wf-node--decision polygon,
.gc-wf-diagram svg .node polygon {
  fill: #F8F0D8 !important;
  stroke: #C69A2E !important;
}

.gc-wf-diagram svg .gc-wf-node--stadium rect {
  fill: #0B2E4A !important;
  stroke: #C69A2E !important;
}

.gc-wf-diagram svg .gc-wf-node--stadium .nodeLabel,
.gc-wf-diagram svg .gc-wf-node--stadium foreignObject div,
.gc-wf-diagram svg .gc-wf-node--stadium foreignObject span {
  color: #F6F8FB !important;
}

.gc-wf-diagram svg .gc-wf-node--success rect {
  fill: #E3F5EC !important;
  stroke: #168A45 !important;
}

.gc-wf-diagram svg .gc-wf-node--success.gc-wf-node--stadium rect {
  fill: #168A45 !important;
  stroke: #0F5C2E !important;
}

.gc-wf-diagram svg .edgePath .path {
  stroke: #6E8398 !important;
  stroke-width: 1.85px !important;
  fill: none !important;
}

.gc-wf-diagram svg .edgePath marker path,
.gc-wf-diagram svg marker path {
  fill: #6E8398 !important;
  stroke: #6E8398 !important;
}

.gc-wf-diagram svg .edgeLabel rect {
  fill: #FFFFFF !important;
  stroke: rgba(11, 46, 74, 0.08) !important;
  rx: 6;
  ry: 6;
  filter: drop-shadow(0 1px 2px rgba(11, 46, 74, 0.06));
}

.gc-wf-diagram svg .edgeLabel span,
.gc-wf-diagram svg .edgeLabel foreignObject div {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #5D6D7E !important;
}

.gc-wf-diagram .gc-wf-mermaid-fallback {
  margin: 0;
  font-size: 11px;
  white-space: pre-wrap;
  color: var(--gc-text-secondary);
  font-family: ui-monospace, monospace;
}

.gc-wf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.gc-wf-legend span {
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--gc-border-light);
  background: var(--gc-surface);
}

.gc-wf-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: var(--gc-radius-sm);
  background: var(--gc-info-soft);
  border-inline-start: 4px solid var(--gc-info);
  font-size: 12px;
  color: var(--gc-text-secondary);
}

.gc-wf-portal-meta {
  display: none;
}

@media print {
  .gc-login-topnav, .gc-wf-lang-toggle, .gc-wf-back, .gc-wf-portal-tabs { display: none !important; }
  .gc-wf-section { break-inside: avoid; box-shadow: none; }
  .gc-wf-diagram {
    background: #fff;
    box-shadow: none;
  }
}
