:root {
  --bg: #f3f6fb;
  --bg-2: #edf1f8;
  --panel: #ffffff;
  --line: #d9e0ea;
  --text: #0f1e33;
  --muted: #5a6b84;
  --brand: #ef1c2f;
  --brand-strong: #c20d1d;
  --brand-soft: rgba(239, 28, 47, 0.12);
  --accent: #184a91;
  --accent-soft: rgba(24, 74, 145, 0.12);
  --ok: #1b7f4f;
  --ok-soft: rgba(27, 127, 79, 0.12);
  --danger: #af2030;
  --danger-soft: rgba(175, 32, 48, 0.11);
  --shadow: 0 18px 45px rgba(14, 31, 58, 0.11);
  --shadow-soft: 0 10px 26px rgba(14, 31, 58, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  padding: 26px;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% -4%, rgba(239, 28, 47, 0.09), transparent 35%),
    radial-gradient(circle at 92% 15%, rgba(24, 74, 145, 0.12), transparent 38%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-2) 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(145, 163, 191, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(145, 163, 191, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.5), transparent 78%);
  z-index: -2;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  filter: blur(22px);
  opacity: 0.7;
}

.bg-shape-a {
  width: 340px;
  height: 340px;
  background: linear-gradient(135deg, rgba(239, 28, 47, 0.44), rgba(239, 28, 47, 0));
  top: -95px;
  right: -60px;
  border-radius: 48% 52% 32% 68% / 53% 42% 58% 47%;
  animation: floaty 10s ease-in-out infinite;
}

.bg-shape-b {
  width: 410px;
  height: 410px;
  background: linear-gradient(135deg, rgba(24, 74, 145, 0.33), rgba(24, 74, 145, 0));
  bottom: -160px;
  left: -70px;
  border-radius: 56% 44% 63% 37% / 44% 55% 45% 56%;
  animation: floaty 12s ease-in-out infinite;
}

@keyframes floaty {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(4deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
  padding: 20px;
  animation: panelIn 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.panel:nth-child(2) {
  animation-delay: 70ms;
}

.panel:nth-child(3) {
  animation-delay: 120ms;
}

.panel:nth-child(4) {
  animation-delay: 170ms;
}

.panel h2,
.panel h3,
.panel h4,
.panel p {
  margin-top: 0;
}

.panel-compact {
  padding: 16px 18px;
}

.hidden {
  display: none !important;
}

.topbar {
  margin-bottom: 18px;
  border: 1px solid rgba(239, 28, 47, 0.14);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.brand-block {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.itec-logo {
  width: 250px;
  max-width: 42vw;
  height: auto;
  flex-shrink: 0;
}

.eyebrow {
  margin: 0 0 4px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.1vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
  font-size: 14px;
}

.header-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

.chip {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(24, 74, 145, 0.22);
  background: rgba(24, 74, 145, 0.08);
  color: var(--accent);
  white-space: nowrap;
}

.chip-accent {
  border-color: rgba(239, 28, 47, 0.24);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 18px;
  align-items: start;
}

.sidebar h2 {
  margin-bottom: 8px;
  font-size: 19px;
}

.hint,
.muted {
  font-size: 13px;
  color: var(--muted);
}

.procedure-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.app-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.sidebar-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0 14px;
}

.app-button {
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-button:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 74, 145, 0.38);
  box-shadow: var(--shadow-soft);
}

.app-button:focus-visible {
  outline: 2px solid rgba(24, 74, 145, 0.4);
  outline-offset: 1px;
}

.app-button.active {
  border-color: rgba(239, 28, 47, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 28, 47, 0.14);
}

.app-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-subtitle {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.procedure-button {
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.procedure-button:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 74, 145, 0.38);
  box-shadow: var(--shadow-soft);
}

.procedure-button:focus-visible {
  outline: 2px solid rgba(24, 74, 145, 0.4);
  outline-offset: 1px;
}

.procedure-button.active {
  border-color: rgba(239, 28, 47, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 28, 47, 0.14);
}

.proc-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.proc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.proc-status {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.workspace {
  display: grid;
  gap: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  text-align: center;
}

.overview {
  display: grid;
  gap: 14px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.role-filter {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.role-filter select,
textarea {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  padding: 10px;
}

textarea {
  resize: vertical;
}

textarea:focus,
select:focus,
.btn:focus-visible,
.decision-option:focus-visible {
  outline: none;
  border-color: rgba(24, 74, 145, 0.52);
  box-shadow: 0 0 0 3px rgba(24, 74, 145, 0.15);
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #ffffff;
}

.btn-outline {
  border-color: rgba(24, 74, 145, 0.36);
  background: #ffffff;
  color: var(--accent);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(24, 74, 145, 0.08);
}

.btn-danger {
  border-color: rgba(175, 32, 48, 0.34);
  background: #ffffff;
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.source-docs {
  margin: 8px 0 0;
  padding-left: 16px;
}

.source-docs li {
  margin-bottom: 6px;
  font-size: 13px;
}
