:root {
  --bg: #071d66;
  --bg-soft: #0e2e8f;
  --surface: #f4f7ff;
  --panel: #ffffff;
  --ink: #112343;
  --ink-soft: #4f6189;
  --line: #dbe4ff;
  --accent: #2c7bff;
  --accent-dark: #1e56cc;
  --accent-mint: #2ec6b8;
  --accent-lime: #5bd86a;
  --ok: #1fae79;
  --warn: #d65b36;
  --panel-shadow: 0 14px 28px rgba(13, 31, 78, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Manrope", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, rgba(100, 171, 255, 0.22), transparent 18%),
    radial-gradient(circle at 18% 88%, rgba(53, 95, 255, 0.2), transparent 22%),
    linear-gradient(150deg, #041447, #08257c 58%, #0a2d9b);
  overflow-x: hidden;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

body.auth-locked .login-shell {
  display: grid;
}

body.auth-locked .app-shell {
  display: none !important;
}

body:not(.auth-locked) .login-shell {
  display: none !important;
}

body:not(.auth-locked) .app-shell {
  display: grid;
}

.login-grid {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 440px);
  gap: 1.2rem;
  align-items: stretch;
}

.login-card {
  border: 1px solid rgba(212, 225, 255, 0.2);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(12, 33, 94, 0.82), rgba(8, 26, 76, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: 0 22px 50px rgba(2, 15, 49, 0.34);
  color: #f3f7ff;
}

.login-brand-panel {
  padding: 2rem 2rem 1.8rem;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: auto -8% -30% auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(99, 175, 255, 0.34), transparent 68%);
  pointer-events: none;
}

.login-brand-header {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: 132px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.24));
}

.login-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: #c8d6ff;
}

.login-brand-panel h1 {
  margin-top: 1rem;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  max-width: 10em;
}

.login-copy {
  margin: 0.85rem 0 0;
  max-width: 48rem;
  color: #dbe7ff;
  font-size: 0.98rem;
  line-height: 1.72;
  position: relative;
  z-index: 1;
}

.login-role-strip {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}

.login-role-strip span {
  border: 1px solid rgba(193, 216, 255, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  background: rgba(150, 191, 255, 0.12);
  color: #e7f0ff;
  font-size: 0.81rem;
  font-weight: 700;
}

.login-feature-list {
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.72rem;
  position: relative;
  z-index: 1;
}

.login-feature-list li {
  border-left: 3px solid rgba(113, 181, 255, 0.78);
  padding-left: 0.9rem;
  color: #eaf1ff;
  line-height: 1.56;
}

.login-form-panel {
  padding: 1.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.98)),
    #ffffff;
  color: var(--ink);
}

.login-form-head p:last-child {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  line-height: 1.56;
}

.login-form-head h2 {
  margin-top: 0.2rem;
  font-size: 1.55rem;
}

.login-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.login-form label {
  display: grid;
  gap: 0.38rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(162, 184, 230, 0.7);
  border-radius: 14px;
  padding: 0.88rem 0.92rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.login-form input:focus {
  outline: 0;
  border-color: rgba(44, 123, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(44, 123, 255, 0.12);
}

.login-submit {
  margin-top: 0.2rem;
  width: 100%;
}

.login-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.app-shell {
  display: grid;
  grid-template-columns: 258px 1fr;
  gap: 1.1rem;
  min-height: 100vh;
  padding: 1.1rem;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 1.05rem;
  background:
    linear-gradient(180deg, rgba(15, 41, 118, 0.88), rgba(7, 24, 77, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  color: #eaf0ff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px rgba(3, 14, 47, 0.22);
}

.brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.5rem;
}

.brand-logo {
  width: 112px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(2, 12, 46, 0.32));
}

.brand-copy strong {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: #b8c9ff;
  font-size: 0.77rem;
}

.step-nav {
  display: grid;
  gap: 0.45rem;
}

.step-link {
  color: #dbe6ff;
  text-decoration: none;
  padding: 0.62rem 0.68rem;
  border-radius: 12px;
  border: 1px solid rgba(176, 204, 255, 0.22);
  background: rgba(8, 34, 111, 0.45);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.step-link:hover {
  background: rgba(18, 60, 173, 0.4);
  border-color: rgba(169, 200, 255, 0.38);
}

.step-link p {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #a9c2ff;
}

.step-link strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.35;
}

.step-link small {
  display: inline-flex;
  margin-top: 0.3rem;
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  font-size: 0.7rem;
  background: rgba(178, 200, 255, 0.18);
  color: #dce8ff;
}

.step-link.active {
  border-color: rgba(173, 209, 255, 0.75);
  background: linear-gradient(130deg, rgba(36, 101, 232, 0.52), rgba(23, 67, 181, 0.44));
  transform: translateX(2px);
}

.step-link.recommended:not(.active) {
  border-color: rgba(150, 191, 255, 0.42);
}

.step-link.done {
  border-color: rgba(120, 217, 180, 0.58);
  background: linear-gradient(130deg, rgba(17, 88, 109, 0.38), rgba(25, 123, 109, 0.34));
}

.side-card {
  border: 1px solid rgba(168, 198, 255, 0.3);
  border-radius: 14px;
  padding: 0.84rem;
  background: rgba(13, 41, 131, 0.48);
}

.sidebar-cards {
  margin-top: auto;
  display: grid;
  gap: 0.5rem;
}

.side-title {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: #b4c6fb;
  margin: 0 0 0.3rem;
}

.side-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.side-card p {
  margin: 0.18rem 0;
  font-size: 0.81rem;
  line-height: 1.45;
  color: #dbe5ff;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.side-card .mini-list {
  margin: 0 0 0.36rem;
  gap: 0.3rem;
}

.side-card .mini-list li {
  border: 0;
  border-radius: 0;
  padding: 0 0 0 0.7rem;
  position: relative;
  background: transparent;
  color: #e2ecff;
  font-size: 0.81rem;
  line-height: 1.36;
}

.side-card .mini-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(200, 218, 255, 0.75);
}

#focus-risk-clause,
#focus-missing-docs,
#recommended-step {
  font-size: 0.8rem;
  line-height: 1.44;
}

.reset-card {
  margin-top: 0;
  border-color: rgba(255, 196, 196, 0.38);
  background: rgba(90, 27, 57, 0.38);
}

.reset-card h3 {
  font-size: 0.95rem;
}

.reset-card p {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #ffd8df;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.46;
}

#reset-all-data {
  width: 100%;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(255, 220, 220, 0.3);
  background: linear-gradient(120deg, #d84f5a, #b73451);
  white-space: normal;
  line-height: 1.3;
  font-size: 0.86rem;
  padding: 0.62rem 0.64rem;
}

#reset-all-data-status {
  display: block;
  color: #ffccd7;
  font-size: 0.72rem;
  word-break: keep-all;
  line-height: 1.4;
}

.workspace {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding-right: 0.2rem;
}

.workspace > * {
  max-width: 100%;
}

.topbar {
  border: 1px solid rgba(208, 224, 255, 0.16);
  border-radius: 22px;
  padding: 1.15rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(11, 42, 125, 0.92), rgba(23, 78, 186, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  color: #f5f8ff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.15rem;
  box-shadow: 0 18px 36px rgba(6, 22, 65, 0.18);
  width: 100%;
  max-width: 100%;
}

.topbar-copy {
  min-width: 0;
  flex: 1;
}

.topbar-subtext {
  margin: 0.4rem 0 0;
  max-width: 820px;
  font-size: 0.87rem;
  line-height: 1.62;
  color: #dbe7ff;
}

.topbar-role-strip {
  margin-top: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.topbar-role-strip span {
  border-radius: 999px;
  padding: 0.34rem 0.66rem;
  border: 1px solid rgba(191, 216, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
  font-size: 0.76rem;
  font-weight: 700;
}

.topbar-side {
  display: grid;
  gap: 0.78rem;
  width: min(410px, 100%);
}

.topbar-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.topbar-meta-card {
  border-radius: 16px;
  padding: 0.76rem 0.82rem;
  border: 1px solid rgba(201, 219, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
}

.topbar-meta-card small {
  display: block;
  color: #c8d8ff;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-meta-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  line-height: 1.34;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.admin-page-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-page-tabs .ghost {
  background: #f3f7ff;
  border: 1px solid #c4d8ff;
  color: #2a4f95;
}

.admin-page-tabs .ghost:hover {
  background: #e9f1ff;
  color: #1f458a;
}

.admin-page-tabs .ghost.active {
  background: #dce9ff;
  border-color: #7ea8ef;
  color: #123d85;
}

.admin-runtime-box {
  display: grid;
  gap: 0.65rem;
}

.label {
  margin: 0 0 0.26rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #c9d9ff;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.28;
}

h1 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
}

.ghost {
  border: 1px solid rgba(205, 224, 255, 0.48);
  background: rgba(238, 244, 255, 0.14);
  color: #f1f6ff;
  border-radius: 10px;
  padding: 0.56rem 0.8rem;
}

.subtle-ghost {
  border-color: rgba(205, 224, 255, 0.22);
  background: rgba(238, 244, 255, 0.06);
}

.top-progress {
  margin-top: 0.75rem;
  border: 1px solid rgba(201, 220, 255, 0.42);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(130deg, rgba(17, 67, 177, 0.68), rgba(39, 118, 247, 0.5));
  color: #eaf1ff;
  width: 100%;
  max-width: 100%;
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

#top-progress-label {
  margin: 0;
  font-size: 0.86rem;
  color: #d8e6ff;
}

#top-progress-text {
  font-size: 1.08rem;
}

.top-meter {
  margin-top: 0.42rem;
  height: 9px;
  border-radius: 999px;
  background: rgba(225, 236, 255, 0.3);
  overflow: hidden;
}

.top-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #79bbff 0%, #63cfe0 65%, #7fe58a 100%);
  transition: width 280ms ease;
}

#top-progress-detail {
  margin: 0.48rem 0 0;
  font-size: 0.78rem;
  color: #d7e4ff;
}

.top-progress-controls {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  align-items: start;
}

.progress-panel-tab {
  border: 1px solid rgba(196, 218, 255, 0.46);
  border-radius: 12px;
  background: rgba(8, 38, 118, 0.45);
  color: #e2ecff;
  text-align: left;
  padding: 0.58rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: none;
  position: relative;
  padding-right: 2.4rem;
}

.progress-panel-tab::after {
  content: "▾";
  position: absolute;
  right: 0.82rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  opacity: 0.88;
}

.progress-panel-tab:hover {
  transform: none;
  box-shadow: none;
  background: rgba(11, 48, 148, 0.56);
}

.progress-panel-tab.active {
  border-color: rgba(173, 209, 255, 0.82);
  background: linear-gradient(130deg, rgba(36, 101, 232, 0.56), rgba(31, 111, 164, 0.5));
}

.progress-panel-tab.active::after {
  content: "▴";
}

.progress-panel-surface {
  margin-top: 0.62rem;
  border: 1px solid rgba(196, 218, 255, 0.46);
  border-radius: 12px;
  background: rgba(8, 38, 118, 0.45);
}

.progress-panel-view {
  display: block;
}

.progress-panel-hidden {
  display: none;
}

.progress-dropdown-content {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr);
  gap: 0.75rem;
  padding: 0.72rem;
  color: #112343;
}

.ops-dropdown-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.72rem;
  color: #112343;
}

.progress-dropdown-content .widget {
  color: #112343;
}

.ops-dropdown-content .widget,
.ops-dropdown-content .widget-head h3,
.ops-dropdown-content .calendar-list li strong,
.ops-dropdown-content .ops-list li {
  color: #112343;
}

.progress-dropdown-content .widget-head h3,
.progress-dropdown-content .kpi-item strong,
.progress-dropdown-content .kpi-item small,
.progress-dropdown-content .kpi-label {
  color: #112343;
}

.widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
  box-shadow: 0 12px 22px rgba(13, 31, 78, 0.15);
}

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.widget-head h3 {
  margin: 0;
  font-size: 0.94rem;
}

.widget-head span {
  display: inline-block;
  margin-top: 0.18rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #5e73a2;
}

.trend-toggle {
  display: inline-flex;
  gap: 0.22rem;
  padding: 0.18rem;
  border-radius: 10px;
  background: #edf4ff;
  border: 1px solid #d3e2ff;
}

.trend-toggle button {
  border: 0;
  background: transparent;
  color: #5571a4;
  border-radius: 8px;
  padding: 0.34rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.trend-toggle button:hover {
  transform: none;
  box-shadow: none;
  background: rgba(77, 126, 215, 0.12);
}

.trend-toggle button.active {
  color: #fff;
  background: linear-gradient(120deg, #2f7fff, #2396b8);
}

#progress-trend-chart {
  width: 100%;
  height: 210px;
  display: block;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
  border: 1px solid #dfeaff;
  border-radius: 10px;
}

.trend-grid {
  stroke: #e3edff;
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke: #2f7fff;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trend-dot {
  fill: #ffffff;
  stroke: #2f7fff;
  stroke-width: 2;
}

.trend-label {
  font-size: 11px;
  fill: #6075a5;
}

.kpi-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.kpi-item {
  border: 1px solid #dae6ff;
  border-radius: 10px;
  padding: 0.54rem;
  background: #f8fbff;
}

.kpi-label {
  margin: 0 0 0.25rem;
  font-size: 0.74rem;
  color: #5f74a6;
}

.kpi-item strong {
  font-size: 1.04rem;
}

.kpi-item small {
  display: block;
  color: #667dab;
  font-size: 0.73rem;
}

.calendar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.42rem;
}

.calendar-list li {
  border: 1px solid #dae6ff;
  border-radius: 10px;
  padding: 0.52rem 0.58rem;
  background: #f9fbff;
}

.calendar-list li strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.12rem;
}

.calendar-list li p {
  margin: 0;
  font-size: 0.76rem;
  color: #667da8;
}

.calendar-list .empty {
  text-align: center;
  font-size: 0.8rem;
  color: #6a7ea7;
}

.board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.board-main {
  min-width: 0;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.step-panel-hidden {
  display: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.06rem 1.12rem;
  box-shadow: var(--panel-shadow);
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.board-main > .panel {
  width: 100%;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.84rem;
  min-width: 0;
  flex-wrap: wrap;
}

.panel-head.compact {
  margin-bottom: 0.5rem;
}

.panel-head h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  min-width: 0;
}

h3 {
  margin: 0 0 0.56rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.24rem 0.64rem;
  border: 1px solid #cbdcff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  background: #eef4ff;
  color: #234eaa;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.92rem;
}

.grid-form.single {
  grid-template-columns: 1fr;
}

.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.grid-form .full {
  grid-column: 1 / -1;
}

#init-os-documents {
  background: #eef4ff;
  color: #1f4fae;
  border: 1px solid #b9d1ff;
}

#init-os-documents:hover {
  box-shadow: 0 8px 14px rgba(25, 90, 229, 0.18);
}

input,
select,
textarea,
button {
  font: inherit;
  border-radius: 10px;
}

input,
select,
textarea {
  border: 1px solid #c8d9ff;
  background: #f9fbff;
  color: var(--ink);
  padding: 0.6rem 0.68rem;
  min-height: 40px;
}

input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  border: 0;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  padding: 0.66rem 0.82rem;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(25, 90, 229, 0.28);
}

.btn-detail {
  min-width: 94px;
}

.summary-ellipsis {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-bullet-list {
  margin: 0.34rem 0 0;
  padding-left: 1.12rem;
}

.mini-bullet-list li {
  color: #35558f;
  font-size: 0.82rem;
  line-height: 1.62;
  margin-bottom: 0.22rem;
}

.summary-box {
  border: 1px solid #d8e5ff;
  border-radius: 12px;
  padding: 0.76rem 0.82rem;
  background: #f7faff;
  margin-bottom: 0.8rem;
}

.summary-box p {
  margin: 0.2rem 0;
  line-height: 1.55;
}

.extract-panel {
  margin-bottom: 0.8rem;
  border: 1px solid #dce8ff;
  border-radius: 12px;
  padding: 0.78rem;
  background: #f9fbff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.extract-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
  min-width: 0;
}

.baseline-generate-wrap {
  margin: 0 0 0.8rem;
  display: flex;
  justify-content: flex-end;
}

.subtle-text {
  margin: 0 0 0.55rem;
  font-size: 0.79rem;
  line-height: 1.5;
  color: #5d74a6;
}

.advanced-details {
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.74rem;
}

.advanced-details > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2a4f93;
  margin-bottom: 0.7rem;
}

.advanced-details[open] > summary {
  margin-bottom: 0.82rem;
}

.extract-panel table {
  table-layout: fixed;
}

.extract-panel td {
  white-space: normal;
  word-break: keep-all;
  line-height: 1.45;
}

.clause-row {
  cursor: pointer;
}

.clause-row:hover {
  background: #f4f8ff;
}

.clause-original-row td {
  background: #f3f8ff;
  border-top: 0;
  white-space: normal;
  line-height: 1.55;
}

.clause-title-cell {
  display: grid;
  gap: 0.16rem;
}

.clause-title-cell strong {
  font-size: 0.8rem;
  color: #14366d;
  line-height: 1.35;
}

.clause-title-cell small {
  font-size: 0.72rem;
  color: #6a80aa;
  word-break: break-all;
}

.muted-debug {
  opacity: 0.75;
}

.table-cell-subtext {
  margin: 0.22rem 0 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #5f78ab;
}

.inline-debug {
  margin-top: 0.2rem;
}

.inline-debug summary {
  cursor: pointer;
  font-size: 0.72rem;
  color: #6480b5;
}

.inline-debug code,
.inline-debug span {
  display: inline-block;
  margin-top: 0.14rem;
  margin-right: 0.3rem;
  font-size: 0.7rem;
  color: #5d79ac;
}

.beginner-checklist-panel {
  border: 1px solid #d9e7ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.78rem;
  margin-bottom: 0.8rem;
}

.clause-detail-panel .summary-box,
#selected-checklist-detail.summary-box {
  margin-bottom: 0;
}

.clause-detail-panel p,
#selected-checklist-detail p {
  font-size: 0.82rem;
  line-height: 1.55;
}

.clause-detail-header-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.68rem;
}

.clause-mini-stat {
  border: 1px solid #d7e4ff;
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem 0.6rem;
}

.clause-mini-stat small {
  display: block;
  color: #6280b3;
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.clause-mini-stat p {
  margin: 0;
  font-weight: 700;
  color: #1d3f78;
  font-size: 0.8rem;
  line-height: 1.45;
}

.clause-doc-targets,
.clause-guideline-picker,
.clause-fixed-text-wrap {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.62rem;
  margin: 0.55rem 0;
}

.clause-doc-targets strong,
.clause-guideline-picker strong {
  color: #1f447f;
}

.clause-doc-targets ul {
  margin: 0.42rem 0 0;
  padding-left: 1rem;
}

.clause-doc-targets li {
  font-size: 0.8rem;
  color: #2a4d8f;
  line-height: 1.45;
}

.clause-guideline-picker select {
  margin-left: 0.42rem;
  min-width: 240px;
  max-width: 100%;
  height: 36px;
  padding: 0.36rem 0.5rem;
  font-size: 0.78rem;
}

.clause-fixed-text-wrap > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  color: #2a4f93;
}

.clause-fixed-text {
  margin: 0.48rem 0 0;
  padding: 0.52rem;
  border: 1px solid #dce8ff;
  border-radius: 8px;
  background: #f8fbff;
  color: #213f75;
  font-family: "IBM Plex Sans KR", "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.clause-must-include-cards {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.52rem;
}

.clause-check-card {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background: #fff;
  padding: 0.58rem 0.62rem;
}

.clause-check-card h4 {
  margin: 0 0 0.34rem;
  color: #163b77;
  font-size: 0.82rem;
}

.clause-check-card p {
  margin: 0.18rem 0;
}

.clause-check-card ul {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
}

.clause-check-card li {
  font-size: 0.79rem;
  color: #2a4d8f;
  line-height: 1.45;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 23, 56, 0.58);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-loading-overlay {
  z-index: 1001;
}

.modal-card {
  width: min(980px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #cfe0ff;
  background: #f8fbff;
  box-shadow: 0 16px 44px rgba(5, 31, 80, 0.3);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.modal-loading-card {
  width: min(430px, 92vw);
  max-height: none;
  border-radius: 16px;
  border: 1px solid #c7dbff;
  background: linear-gradient(170deg, #f8fbff 0%, #eef5ff 100%);
  grid-template-rows: auto;
}

.runtime-monitor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
}

.runtime-monitor-actions .ghost,
.runtime-monitor-actions .modal-close {
  background: #f3f7ff;
  border: 1px solid #c4d8ff;
  color: #2a4f95;
}

.runtime-monitor-actions .ghost:hover,
.runtime-monitor-actions .modal-close:hover {
  background: #e9f1ff;
  color: #1f458a;
}

.runtime-filter-input {
  width: 160px;
  border: 1px solid #c4d8ff;
  border-radius: 10px;
  padding: 0.52rem 0.6rem;
  background: #fff;
  color: #173c7e;
}

.runtime-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: #2a4f95;
  font-size: 0.83rem;
}

.runtime-monitor-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.runtime-monitor-panel {
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem 0.75rem;
  display: grid;
  gap: 0.48rem;
  min-height: 420px;
}

.runtime-monitor-panel h4 {
  margin: 0;
  color: #1b3e79;
  font-size: 0.9rem;
}

.runtime-log-list {
  max-height: 480px;
  overflow: auto;
  align-content: flex-start;
}

.runtime-log-list li {
  gap: 0.35rem;
  font-size: 0.8rem;
}

.runtime-log-meta {
  color: #5c74a4;
  font-size: 0.74rem;
}

.modal-head {
  padding: 0.68rem 0.84rem;
  border-bottom: 1px solid #dae7ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.modal-head h3 {
  margin: 0;
  color: #163b77;
  font-size: 0.98rem;
}

.modal-close {
  border: 1px solid #c8dcff;
  background: #edf4ff;
  color: #244a8f;
  box-shadow: none;
  padding: 0.42rem 0.6rem;
}

.modal-close:hover {
  transform: none;
  box-shadow: none;
  background: #e4efff;
}

.modal-body {
  padding: 0.8rem 0.84rem;
  overflow: auto;
  display: grid;
  gap: 0.65rem;
}

.modal-loading-body {
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.4rem 1.2rem 1.3rem;
}

.modal-loading-body h3 {
  margin: 0.1rem 0 0;
  color: #133d7e;
  font-size: 1.05rem;
  font-weight: 800;
}

.modal-loading-body p {
  margin: 0;
  color: #2c4d86;
  font-size: 0.88rem;
  line-height: 1.5;
}

.loading-detail {
  color: #4b6ca5;
  font-size: 0.8rem;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #d4e4ff;
  border-top-color: #2a6ae4;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.modal-section {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background: #fff;
  padding: 0.6rem 0.66rem;
}

.modal-section h4 {
  margin: 0 0 0.4rem;
  color: #1b3e79;
  font-size: 0.84rem;
}

.modal-section p,
.modal-section li {
  margin: 0.2rem 0;
  font-size: 0.8rem;
  color: #244779;
  line-height: 1.55;
}

.modal-section ul {
  margin: 0.24rem 0 0;
  padding-left: 1rem;
}

.linked-clause-list {
  list-style: none;
  margin: 0.34rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.48rem;
}

.linked-clause-item {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.52rem 0.58rem;
}

.linked-clause-primary {
  margin: 0;
  color: #173d78;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.35;
}

.linked-clause-secondary {
  margin: 0.2rem 0 0;
  color: #2d4f8c;
  font-size: 0.79rem;
  line-height: 1.45;
}

.linked-clause-meta {
  margin: 0.22rem 0 0;
  color: #3f5f98;
  font-size: 0.75rem;
  line-height: 1.4;
}

.linked-clause-debug {
  margin-top: 0.22rem;
}

.linked-clause-debug summary {
  cursor: pointer;
  color: #4d6ea9;
  font-size: 0.72rem;
}

.linked-clause-debug code {
  display: inline-block;
  margin-top: 0.18rem;
  color: #5472ab;
  font-size: 0.71rem;
}

body.modal-open {
  overflow: hidden;
}

.doc-priority-panel {
  border: 1px solid #d9e7ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.78rem;
  margin-bottom: 0.8rem;
}

.qms-blueprint-panel {
  border: 1px solid #d9e7ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.78rem;
  margin-bottom: 0.8rem;
}

.os-init-summary-panel {
  border: 1px solid #d9e7ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.78rem;
  margin-bottom: 0.8rem;
}

.os-init-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.46rem;
  margin-bottom: 0.52rem;
}

#os-init-top-priority {
  margin: 0;
}

.blueprint-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr);
  gap: 0.6rem;
}

.qms-blueprint-tree {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 0.55rem;
  background: #fff;
}

.blueprint-tree-list,
.blueprint-tree-list ul {
  margin: 0;
  padding-left: 1rem;
}

.blueprint-tree-list > li {
  list-style: none;
}

.blueprint-root,
.blueprint-doc {
  border: 1px solid #c8dcff;
  background: #eef5ff;
  color: #264e9e;
  border-radius: 8px;
  padding: 0.3rem 0.46rem;
  box-shadow: none;
  font-size: 0.76rem;
  margin: 0.15rem 0;
}

.blueprint-root:hover,
.blueprint-doc:hover {
  transform: none;
  box-shadow: none;
  background: #e3efff;
}

.blueprint-doc {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

#qms-blueprint-detail h4 {
  margin: 0 0 0.46rem;
  font-size: 1.06rem;
  color: #112f63;
}

#qms-blueprint-detail p {
  margin: 0 0 0.42rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #1f3f73;
}

#doc-priority-table-body button {
  min-width: 104px;
  border: 1px solid #c8dcff;
  background: #eff5ff;
  color: #264e9e;
  box-shadow: none;
}

#doc-priority-table-body button:hover {
  transform: translateY(-1px);
}

#beginner-checklist-list {
  display: grid;
  gap: 0.5rem;
}

.beginner-item {
  border: 1px solid #dce8ff;
  border-radius: 12px;
  background: #fff;
  padding: 0.68rem;
}

.beginner-item.active {
  border-color: #79a9ff;
  box-shadow: 0 0 0 2px rgba(73, 131, 241, 0.12);
}

.beginner-item.done {
  background: #f1f9f3;
  border-color: #b7e1c2;
}

.beginner-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.beginner-item-head label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.beginner-item p {
  margin: 0.24rem 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #3b588f;
}

.beginner-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.38rem;
}

.beginner-item-actions button {
  min-width: 120px;
  border: 1px solid #c8dcff;
  background: #eff5ff;
  color: #264e9e;
  box-shadow: none;
}

.beginner-nav-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.beginner-nav-actions button {
  width: 100%;
}

.beginner-nav-actions button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.beginner-item-actions button:hover {
  transform: translateY(-1px);
}

.field-hint {
  margin-top: 0.12rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #6c82ad;
}

.mini-user-form {
  display: grid;
  gap: 0.42rem;
}

.mini-user-form label {
  display: grid;
  gap: 0.22rem;
  font-size: 0.74rem;
  color: #2f4f84;
}

.mini-user-form input,
.mini-user-form select {
  width: 100%;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #fff;
  color: #1f3e74;
  padding: 0.34rem 0.44rem;
  font-size: 0.76rem;
}

.mini-user-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.mini-user-list {
  margin-top: 0.5rem;
  max-height: 280px;
  overflow: auto;
}

.mini-user-list li {
  flex-direction: column;
  gap: 0.3rem;
}

.mini-user-meta {
  font-size: 0.74rem;
  color: #5f78aa;
}

.mini-user-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.8rem;
  align-items: center;
}

.badge-priority {
  background: #e5efff;
  border-color: #bdd5ff;
}

.badge-ok {
  color: var(--ok);
  border-color: #91dec3;
  background: #e8fbf4;
}

.badge-warn {
  color: var(--warn);
  border-color: #f2c3b0;
  background: #fff1eb;
}

.task-list,
.log-list,
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.48rem;
}

.task-item,
.log-list li {
  border: 1px solid #dce7ff;
  border-radius: 12px;
  padding: 0.65rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
  background: #fbfdff;
}

.task-item.done {
  background: #eef8ff;
}

.task-item p {
  margin: 0.3rem 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.56rem;
  margin-bottom: 0.8rem;
}

.step2-priority-panel {
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.78rem;
  margin-bottom: 0.8rem;
}

.checklist-board-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.56rem;
}

.checklist-column {
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  padding: 0.62rem;
  background: #fff;
}

.checklist-column h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.checklist-card {
  border: 1px solid #dce8ff;
  border-radius: 12px;
  background: #fafdff;
  padding: 0.56rem;
  margin-bottom: 0.5rem;
}

.checklist-card.selected {
  border-color: #6aaeff;
  box-shadow: 0 0 0 2px rgba(106, 174, 255, 0.2);
  background: #f3f8ff;
}

.checklist-card p,
.checklist-card small {
  margin: 0.22rem 0;
  font-size: 0.79rem;
  line-height: 1.45;
  color: #486191;
}

.card-progress-strong {
  color: #1c4a95 !important;
  font-weight: 700;
}

.checklist-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.checklist-card-actions button,
.checklist-detail-actions button {
  border: 1px solid #c8dcff;
  background: #eff5ff;
  color: #264e9e;
  border-radius: 9px;
  font-weight: 700;
  padding: 0.4rem 0.58rem;
  box-shadow: none;
  font-size: 0.78rem;
}

.checklist-card-actions button:hover,
.checklist-detail-actions button:hover {
  transform: none;
  box-shadow: none;
  background: #e4efff;
}

.must-include-list {
  display: grid;
  gap: 0.22rem;
  margin: 0.45rem 0;
}

.must-include-list label {
  display: flex;
  gap: 0.36rem;
  align-items: center;
  font-size: 0.8rem;
  color: #315184;
}

.checklist-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.48rem;
}

.section-guide-card {
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem 1rem;
  margin: 0.68rem 0;
  width: 100%;
  max-width: 100%;
}

.document-guide-root {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 0.64rem;
}

.document-guide-header,
.document-purpose-box {
  width: 100%;
  max-width: 100%;
}

.document-guide-root p,
.document-guide-root li {
  line-height: 1.6;
}

.section-guide-card > summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  color: #1a3f7e;
  font-size: 0.82rem;
  font-weight: 700;
}

.section-guide-card p {
  margin: 0.32rem 0;
}

.section-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  margin: 0.28rem 0 0.38rem;
  font-size: 0.78rem;
  color: #35568e;
}

.section-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.38rem 0;
}

.section-guide-card.beginner {
  border-radius: 14px;
  border-color: #d2e3ff;
  padding: 1rem 1.06rem;
}

.section-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.section-guide-header h5 {
  margin: 0;
  color: #123a79;
  font-size: 1.02rem;
  line-height: 1.4;
}

.section-guide-status {
  margin: 0.24rem 0 0;
  font-size: 0.84rem;
  color: #5f79ac;
}

.section-progress-pill {
  border: 1px solid #c8dcff;
  background: #eef5ff;
  color: #2a4f9a;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.section-guide-block {
  margin-top: 0.72rem;
  border: 1px solid #dfebff;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.86rem 0.92rem;
  width: 100%;
  max-width: 100%;
}

.section-guide-block h6 {
  margin: 0 0 0.36rem;
  color: #183f7f;
  font-size: 0.96rem;
  line-height: 1.4;
}

.section-guide-block p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.62;
}

.section-advanced-collapsible {
  margin-top: 0.62rem;
  border: 1px solid #d7e7ff;
  border-radius: 10px;
  background: #fcfdff;
  padding: 0.56rem 0.62rem;
}

.section-advanced-collapsible > summary {
  cursor: pointer;
  color: #2c528f;
  font-size: 0.9rem;
  font-weight: 700;
}

.compact-clause-grid {
  display: grid;
  gap: 0.48rem;
}

.compact-clause-card {
  border: 1px solid #d8e7ff;
  border-radius: 12px;
  background: #fff;
  padding: 0.84rem 0.92rem;
}

.compact-clause-label {
  margin: 0;
  color: #173f80;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.45;
}

.compact-clause-summary,
.compact-clause-reason,
.compact-clause-score {
  margin: 0.4rem 0 0;
  color: #31558f;
  font-size: 0.88rem;
  line-height: 1.55;
}

#selected-checklist-detail.guide-focus-flash {
  border-color: #6fb2ff;
  box-shadow: 0 0 0 3px rgba(111, 178, 255, 0.22);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.text-link-button {
  display: inline-block;
  border: 1px solid #c8ddff;
  background: #eef5ff;
  color: #24509f;
  border-radius: 8px;
  padding: 0.28rem 0.48rem;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.28rem;
  text-decoration: none;
  box-shadow: none;
}

.required-flow-list {
  display: grid;
  gap: 0.58rem;
}

.required-flow-item {
  border: 1px solid #d4e6ff;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.required-flow-item > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.68rem 0.78rem;
  color: #18407f;
  font-size: 0.9rem;
  font-weight: 800;
  background: #f3f8ff;
}

.required-flow-item > summary::-webkit-details-marker {
  display: none;
}

.required-flow-item[open] > summary {
  border-bottom: 1px solid #dfeeff;
}

.required-flow-body {
  padding: 0.72rem 0.8rem 0.82rem;
}

.required-flow-guide {
  margin: 0;
  color: #31558f;
  font-size: 0.88rem;
  line-height: 1.62;
}

.required-flow-links {
  margin-top: 0.58rem;
  border-top: 1px dashed #d7e7ff;
  padding-top: 0.56rem;
}

.required-flow-subtitle {
  margin: 0;
  color: #214989;
  font-weight: 800;
  font-size: 0.82rem;
}

.flow-mini-list {
  margin-top: 0.32rem;
}

.text-link-button:hover {
  transform: none;
  box-shadow: none;
  background: #e5f0ff;
}

.clause-original-block {
  margin-top: 0.34rem;
}

.is-hidden {
  display: none !important;
}

.metric {
  border: 1px solid #d9e6ff;
  border-radius: 12px;
  padding: 0.74rem;
  background: #f8fbff;
}

.metric p {
  margin: 0.35rem 0;
  font-weight: 700;
}

.metric small {
  color: #6680b0;
}

.meter {
  height: 7px;
  border-radius: 999px;
  background: #e6edff;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #387eff 0%, #2cb0ff 62%, #54d77f 100%);
  transition: width 260ms ease;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #d5e2fb;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  width: 100%;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 780px;
}

th,
td {
  padding: 0.7rem 0.76rem;
  border-bottom: 1px solid #e8effd;
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #1b3564;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf4ff;
  color: #2a4f93;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.35;
}

tbody tr:nth-child(even) {
  background: #fcfeff;
}

tbody tr:hover {
  background: #f6f9ff;
}

.table-wrap button {
  min-width: 104px;
  padding: 0.46rem 0.66rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid #c8dcff;
  color: #264e9e;
  background: #eff5ff;
  font-weight: 700;
  box-shadow: none;
}

.table-wrap button:hover {
  transform: none;
  box-shadow: none;
  background: #e4efff;
}

.table-clauses {
  min-width: 1120px;
  table-layout: fixed;
}

.table-clauses-guideline th:nth-child(1),
.table-clauses-guideline td:nth-child(1) {
  width: 30%;
}

.table-clauses-guideline th:nth-child(2),
.table-clauses-guideline td:nth-child(2) {
  width: 35%;
}

.table-clauses-guideline th:nth-child(3),
.table-clauses-guideline td:nth-child(3) {
  width: 35%;
}

.table-clauses-regulation {
  min-width: 1260px;
}

.table-clauses-regulation th:nth-child(1),
.table-clauses-regulation td:nth-child(1) {
  width: 27%;
}

.table-clauses-regulation th:nth-child(2),
.table-clauses-regulation td:nth-child(2) {
  width: 29%;
}

.table-clauses-regulation th:nth-child(3),
.table-clauses-regulation td:nth-child(3) {
  width: 20%;
}

.table-clauses-regulation th:nth-child(4),
.table-clauses-regulation td:nth-child(4) {
  width: 14%;
}

.table-clauses-regulation th:nth-child(5),
.table-clauses-regulation td:nth-child(5) {
  width: 10%;
  text-align: center;
}

.table-baseline {
  min-width: 1180px;
  table-layout: fixed;
}

.table-baseline th:nth-child(1),
.table-baseline td:nth-child(1) {
  width: 16%;
}

.table-baseline th:nth-child(2),
.table-baseline td:nth-child(2) {
  width: 10%;
}

.table-baseline th:nth-child(3),
.table-baseline td:nth-child(3) {
  width: 38%;
}

.table-baseline th:nth-child(4),
.table-baseline td:nth-child(4) {
  width: 16%;
  text-align: center;
}

.table-baseline th:nth-child(5),
.table-baseline td:nth-child(5) {
  width: 10%;
  text-align: center;
}

.table-baseline th:nth-child(6),
.table-baseline td:nth-child(6) {
  width: 10%;
  text-align: center;
}

.table-priority {
  min-width: 1480px;
  table-layout: fixed;
}

.table-priority th:nth-child(1),
.table-priority td:nth-child(1) {
  width: 8%;
  text-align: center;
}

.table-priority th:nth-child(2),
.table-priority td:nth-child(2) {
  width: 14%;
}

.table-priority th:nth-child(3),
.table-priority td:nth-child(3) {
  width: 26%;
}

.table-priority th:nth-child(4),
.table-priority td:nth-child(4) {
  width: 20%;
}

.table-priority th:nth-child(5),
.table-priority td:nth-child(5) {
  width: 14%;
}

.table-priority th:nth-child(6),
.table-priority td:nth-child(6) {
  width: 8%;
  text-align: center;
}

.table-priority th:nth-child(7),
.table-priority td:nth-child(7) {
  width: 10%;
  text-align: center;
}

.table-simple-trace {
  min-width: 1040px;
  table-layout: fixed;
}

.table-simple-trace th:nth-child(1),
.table-simple-trace td:nth-child(1) {
  width: 24%;
}

.table-simple-trace th:nth-child(2),
.table-simple-trace td:nth-child(2) {
  width: 14%;
}

.table-simple-trace th:nth-child(3),
.table-simple-trace td:nth-child(3) {
  width: 28%;
}

.table-simple-trace th:nth-child(4),
.table-simple-trace td:nth-child(4) {
  width: 20%;
}

.table-simple-trace th:nth-child(5),
.table-simple-trace td:nth-child(5) {
  width: 14%;
  text-align: center;
}

.table-documents {
  min-width: 1040px;
}

.table-traceability {
  min-width: 1440px;
}

.table-capa-board {
  min-width: 1260px;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #edf3ff;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #c2d8ff;
  border-radius: 999px;
}

.actions {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.coverage-box {
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  background: #f8fbff;
}

.coverage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

#coverage-subtext {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: #5f77a6;
}

.gaps-panel {
  border: 1px solid #d9e7ff;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.74rem;
  margin-bottom: 0.8rem;
}

.sections-panel {
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.74rem;
  margin-bottom: 0.8rem;
}

.section-tools {
  display: grid;
  grid-template-columns: 170px minmax(180px, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
  margin-bottom: 0.6rem;
}

.section-tools label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.74rem;
  color: #5f77a5;
}

.section-tool-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

#section-bulk-complete,
#section-filter-reset {
  padding: 0.46rem 0.58rem;
  font-size: 0.74rem;
  box-shadow: none;
}

#section-bulk-complete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#section-filter-reset {
  border: 1px solid #c9dcff;
  background: #eef5ff;
  color: #2d529e;
}

#section-filter-reset:hover {
  transform: none;
  box-shadow: none;
  background: #e3efff;
}

#section-editor-board {
  display: grid;
  gap: 0.55rem;
}

.section-doc-card {
  border: 1px solid #d8e7ff;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.section-doc-card.focused {
  border-color: #6ca2ff;
  box-shadow: 0 0 0 2px rgba(65, 129, 241, 0.15);
}

.section-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: #f1f6ff;
  border-bottom: 1px solid #d8e5ff;
}

.section-doc-head strong {
  font-size: 0.82rem;
}

.section-doc-head small {
  font-size: 0.73rem;
  color: #5f77a5;
}

.section-table {
  width: 100%;
  border-collapse: collapse;
}

.section-table th,
.section-table td {
  font-size: 0.76rem;
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid #edf3ff;
}

.section-table th {
  background: #f8fbff;
  color: #3c5f9e;
}

.section-status {
  font-weight: 700;
}

.section-status.done {
  color: #1d945c;
}

.section-status.todo {
  color: #cb6d2e;
}

.gap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin-bottom: 0.6rem;
}

.gap-tab {
  border: 1px solid #c8dbff;
  background: #f2f7ff;
  color: #2f4f93;
  font-size: 0.76rem;
  border-radius: 8px;
  padding: 0.35rem 0.54rem;
  box-shadow: none;
}

.gap-tab:hover {
  transform: none;
  box-shadow: none;
  background: #e6f0ff;
}

.gap-tab.active {
  color: #fff;
  border-color: #2a6ce0;
  background: linear-gradient(120deg, #2f7fff, #245dce);
}

.gap-item {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background: #fff;
  padding: 0.58rem;
  margin-bottom: 0.5rem;
}

.gap-item p {
  margin: 0.24rem 0 0.48rem;
  font-size: 0.78rem;
  color: #5e76a5;
}

.gap-actions {
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.gap-actions button,
#baseline-table-body button,
#pre-review-actions button,
#capa-list button {
  border: 1px solid #c8dcff;
  background: #eff5ff;
  color: #264e9e;
  border-radius: 9px;
  font-weight: 700;
  padding: 0.42rem 0.62rem;
  box-shadow: none;
  font-size: 0.79rem;
}

.gap-actions button:hover,
#baseline-table-body button:hover,
#pre-review-actions button:hover,
#capa-list button:hover {
  transform: none;
  box-shadow: none;
  background: #e4efff;
}

.trace-impact td {
  background: #fff6e9;
  color: #9b5a1d;
  font-size: 0.74rem;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 0.8rem;
}

.studio-sidebar,
.studio-main {
  min-width: 0;
}

.studio-sidebar {
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.78rem;
}

.studio-started-list {
  display: grid;
  gap: 0.45rem;
}

.studio-doc-item {
  width: 100%;
  text-align: left;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #fff;
  color: #1d3f78;
  padding: 0.68rem;
  box-shadow: none;
}

.studio-doc-item:hover {
  transform: none;
  box-shadow: none;
  background: #f5f9ff;
}

.studio-doc-item.active {
  border-color: #6aaeff;
  background: #eef5ff;
}

.studio-doc-item strong,
.studio-doc-item small {
  display: block;
}

.studio-doc-item small {
  margin-top: 0.24rem;
  color: #5e78aa;
  line-height: 1.45;
}

.studio-actions {
  grid-column: 1 / -1;
  display: block;
  margin-top: 0.2rem;
}

.studio-actions button {
  display: block;
  width: 100%;
}

.studio-download-row {
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
  margin-bottom: 0.68rem;
}

.studio-download-row .ghost {
  border: 1px solid #c7dbff;
  background: #eef5ff;
  color: #244f9b;
  box-shadow: none;
}

.studio-download-row .ghost:hover {
  transform: none;
  box-shadow: none;
  background: #e3efff;
  color: #183f87;
}

.studio-download-row .ghost:disabled {
  border-color: #dbe6f7;
  background: #f5f8fc;
  color: #92a3c2;
  cursor: not-allowed;
}

.studio-context-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.studio-context-panel {
  border: 1px solid rgba(36, 79, 155, 0.14);
  border-radius: 16px;
  background: rgba(250, 252, 255, 0.92);
  padding: 14px 16px;
}

.studio-context-panel h4 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.studio-context-preview {
  min-height: 96px;
}

.studio-context-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.studio-context-list div {
  display: grid;
  gap: 2px;
}

.studio-context-list dt {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.studio-context-list dd {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.studio-generation-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.studio-generation-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3fb;
  color: #4e6487;
  font-size: 0.82rem;
  font-weight: 700;
}

.studio-generation-badge.active {
  background: #e4f5ea;
  color: #1f6b45;
}

.studio-preview-frame {
  width: 100%;
  min-height: 720px;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #fff;
}

.studio-section-guides {
  display: grid;
  gap: 0.9rem;
}

.studio-section-card {
  border: 1px solid #d7e5ff;
  border-radius: 14px;
  background: #fbfdff;
  padding: 0.85rem;
}

.studio-checklist-list {
  margin: 0.65rem 0 0.9rem;
  padding-left: 1.15rem;
  color: #24406d;
  line-height: 1.55;
}

.studio-section-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.studio-reference-panel {
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #fff;
  padding: 0.72rem 0.78rem;
}

.studio-reference-panel h5 {
  margin: 0 0 0.48rem;
  color: #1d3f78;
  font-size: 0.85rem;
}

.studio-section-inputs {
  display: grid;
  gap: 0.7rem;
}

.studio-section-inputs textarea {
  width: 100%;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #fff;
  color: #16325f;
  padding: 0.72rem 0.78rem;
  resize: vertical;
  line-height: 1.5;
}

#studio-file-upload-label[hidden] {
  display: none;
}

#report-status {
  margin: 0;
  font-size: 0.82rem;
  color: #5c709b;
}

.log-list li {
  flex-direction: column;
}

.log-list time {
  font-size: 0.76rem;
  color: #6a80af;
}

.mini {
  background: linear-gradient(160deg, #ffffff, #f4f8ff 60%, #ecf2ff);
}

.panel.mini .mini-list li {
  border: 1px solid #d6e3ff;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  font-size: 0.83rem;
  color: #2f4c85;
  background: #f9fbff;
}

.ops-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.42rem;
}

.ops-list li {
  border: 1px solid #d6e3ff;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  font-size: 0.83rem;
  color: #2f4c85;
  background: #f9fbff;
}

footer {
  padding: 0.5rem 0.2rem 1rem;
  color: #cad8ff;
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: riseIn 420ms ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 90ms;
}

.reveal:nth-child(3) {
  animation-delay: 160ms;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1160px) {
  .login-grid {
    grid-template-columns: 1fr;
  }

  .topbar-meta-grid {
    grid-template-columns: 1fr;
  }

  .top-progress-controls {
    grid-template-columns: 1fr;
  }

  .progress-dropdown-content {
    grid-template-columns: 1fr;
  }

  .ops-dropdown-content {
    grid-template-columns: 1fr;
  }

  .extract-grid {
    grid-template-columns: 1fr;
  }

  .board {
    grid-template-columns: 1fr;
  }

  .runtime-monitor-body {
    grid-template-columns: 1fr;
  }

  .blueprint-layout {
    grid-template-columns: 1fr;
  }

  .clause-detail-header-grid {
    grid-template-columns: 1fr;
  }

  .section-guide-grid {
    grid-template-columns: 1fr;
  }

  .section-guide-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 880px) {
  .login-shell {
    padding: 1rem;
  }

  .login-brand-panel,
  .login-form-panel {
    padding: 1.2rem;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .sidebar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .side-card {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-side {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-actions .ghost {
    flex: 1 1 0;
    text-align: center;
  }

  .grid-form,
  .metrics {
    grid-template-columns: 1fr;
  }

  .kpi-snapshot {
    grid-template-columns: 1fr;
  }

  .os-init-summary-cards {
    grid-template-columns: 1fr;
  }

  .checklist-board-columns {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .beginner-nav-actions {
    grid-template-columns: 1fr;
  }

  .section-tools {
    grid-template-columns: 1fr;
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .studio-context-panels {
    grid-template-columns: 1fr;
  }

  .studio-section-reference-grid {
    grid-template-columns: 1fr;
  }

  .studio-preview-frame {
    min-height: 520px;
  }
}
