:root {
  --md-bg: #23080e;
  --md-bg-mid: #5d111f;
  --md-bg-hot: #7e1d2f;
  --md-surface: #fffaf2;
  --md-surface-soft: #f8eede;
  --md-surface-elevated: #fffefb;
  --md-outline: #e0caa3;
  --md-outline-strong: #ca9f58;
  --md-text: #1f1b16;
  --md-text-soft: #6c5241;
  --md-gold: #d98e04;
  --md-gold-deep: #ba7300;
  --md-vino: #6f1627;
  --md-vino-deep: #4a0d1b;
  --md-success: #1f9d6a;
  --md-warning: #d28d17;
  --md-danger: #d64545;
  --md-neutral: #8a7e72;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 30px 70px rgba(34, 5, 14, 0.35);
  --shadow-md: 0 14px 34px rgba(34, 5, 14, 0.22);
  --font-ui: 'Plus Jakarta Sans', 'IBM Plex Sans', sans-serif;
  --font-display: 'Playfair Display', 'Sora', serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-ui);
  color: #f8efe5;
  background: #5a0d1b;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-family: 'Sora', sans-serif;
}

.hidden {
  display: none !important;
}

.capture-guard {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  gap: 14px;
  background: #060302;
  color: #f4e9da;
  text-align: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.capture-guard.active {
  opacity: 1;
  visibility: visible;
}

.capture-guard i {
  font-size: 2rem;
  color: var(--md-gold);
}

.capture-guard p {
  margin: 0;
  max-width: 40ch;
  font-size: 0.95rem;
  color: rgba(244, 233, 218, 0.78);
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 215, 145, 0.3), transparent 36%),
    radial-gradient(circle at 80% 16%, rgba(255, 232, 181, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(22, 6, 11, 0.88), rgba(67, 13, 25, 0.92));
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-glow {
  position: absolute;
  width: min(520px, 95vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(225, 163, 62, 0.32), transparent 68%);
  filter: blur(26px);
  animation: splashGlow 3.6s ease-in-out infinite;
}

.splash-card {
  position: relative;
  width: min(460px, 100%);
  border-radius: 26px;
  border: 1px solid rgba(240, 197, 110, 0.4);
  background: linear-gradient(155deg, rgba(92, 17, 33, 0.78), rgba(72, 12, 27, 0.65));
  padding: 22px 20px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 201, 0.32),
    0 24px 44px rgba(19, 3, 8, 0.5);
  backdrop-filter: blur(24px);
}

.splash-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
  display: block;
  margin: 0 auto;
}

.splash-brand {
  margin: 10px 0 4px;
  color: #ffdca3;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.splash-card h2 {
  margin-bottom: 8px;
  color: #fff4de;
  font-size: clamp(1.15rem, 5vw, 1.54rem);
  font-family: var(--font-display);
}

.splash-copy {
  margin: 0 0 12px;
  color: rgba(255, 235, 200, 0.9);
  font-size: 0.9rem;
  line-height: 1.4;
}

.splash-track {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 224, 167, 0.42);
  background: rgba(255, 232, 183, 0.16);
  overflow: hidden;
}

.splash-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(110deg, #ffc66b, #d98e04);
  box-shadow: 0 0 18px rgba(255, 200, 105, 0.42);
  transition: width 0.18s linear;
}

@keyframes splashFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes splashGlow {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5d69e;
  font-weight: 700;
}

.onboarding {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 18px 14px calc(130px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  transform: translateY(14px) scale(0.995);
  transition: opacity 0.44s ease, transform 0.44s ease;
}

.onboarding.is-active {
  opacity: 1;
  transform: none;
}

.onboarding-card {
  width: min(1120px, 100%);
  padding: clamp(22px, 3.8vw, 36px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(229, 177, 84, 0.35);
  background: #7C170F;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 214, 0.26),
    inset 0 -1px 2px rgba(79, 12, 22, 0.28),
    var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transform: none;
  transition: box-shadow 0.24s ease;
}

.onboarding-card::before {
  content: none;
}

.onboarding-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-xl) - 1px);
  border: 1px solid rgba(255, 239, 214, 0.06);
  pointer-events: none;
}


.onboarding-hero {
  display: block;
  gap: clamp(18px, 3vw, 34px);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.onboarding-hero-copy {
  display: grid;
  gap: 0;
}

.onboarding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 340px);
  gap: 20px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.onboarding-selection {
  min-width: 0;
}

.onboarding-preview {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(242, 197, 114, 0.22);
  background: #5c0f1d;
  box-shadow: inset 0 1px 0 rgba(255, 239, 214, 0.08);
  position: sticky;
  top: 18px;
}

.preview-kicker {
  margin: 0;
  color: #ffd79d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.preview-note {
  margin: 0;
  color: rgba(255, 233, 202, 0.84);
  font-size: 0.9rem;
  line-height: 1.55;
}

.onboarding-preview-actions {
  display: flex;
  justify-content: stretch;
}

.hero-brand {
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.hero-logo {
  width: clamp(170px, 34vw, 240px);
  height: auto;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  object-fit: contain;
  animation: none;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.015);
  }
}

@keyframes isoCardRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.onboarding-card h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  text-shadow: 0 0 18px rgba(255, 218, 148, 0.18);
  font-family: var(--font-display);
  font-weight: 700;
}

.subtitle {
  margin: 0 0 18px;
  color: #f2e2c5;
  max-width: 58ch;
}

.onboarding-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(235, 196, 118, 0.42);
  padding: 10px 14px;
  margin-bottom: 12px;
  background: #7a2431;
}

.onboarding-search i {
  color: #f3c56f;
}

.onboarding-search input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff2db;
  font: inherit;
}

.onboarding-search input::placeholder {
  color: rgba(255, 234, 197, 0.76);
}

.onboarding-search input:focus {
  outline: none;
}

.framework-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.framework-tabs::-webkit-scrollbar {
  display: none;
}

.framework-tab {
  border: 1px solid rgba(239, 199, 120, 0.42);
  border-radius: 999px;
  background: #7a2431;
  color: #ffe7bc;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 9px 12px;
  white-space: nowrap;
  cursor: pointer;
}

.framework-tab i {
  margin-right: 6px;
}

.framework-tab.active {
  border-color: rgba(255, 199, 92, 0.88);
  box-shadow: 0 0 0 1px rgba(255, 199, 92, 0.2);
  background: #9a5d11;
}

.iso-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 6px 0 14px;
}

.iso-grid::-webkit-scrollbar {
  display: none;
}

.iso-option {
  width: 100%;
  min-height: 208px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 177, 84, 0.34);
  background: #711725;
  padding: 16px;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
  animation: none;
}

.iso-option::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f5c46c, transparent);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.iso-option:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 196, 108, 0.86);
  box-shadow: 0 14px 24px rgba(25, 5, 11, 0.26);
}

.iso-option:hover::before {
  opacity: 1;
}

.iso-option.active {
  border-color: #ffc05e;
  transform: none;
  background: linear-gradient(160deg, #7d1b2a, #641320);
  box-shadow:
    0 0 0 1px rgba(255, 193, 96, 0.38),
    0 16px 26px rgba(34, 5, 14, 0.26);
}

.iso-option.active::before {
  opacity: 1;
}

.iso-option-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.iso-option h4 {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.04rem;
}

.iso-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 111, 0.42);
  background: rgba(255, 207, 124, 0.12);
  color: #ffe0ad;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.iso-option p {
  margin: 0;
  color: #f7e7cc;
  font-size: 0.9rem;
}

.iso-option .iso-tag {
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd99f;
  font-size: 0.74rem;
  font-weight: 700;
}

.onboarding-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.onboarding-hint {
  color: rgba(255, 231, 194, 0.72);
  font-size: 0.84rem;
}

.fab-start {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 999px;
  min-height: 56px;
  padding: 0 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font: 700 0.95rem 'Sora', sans-serif;
  color: #fff6ea;
  background: linear-gradient(120deg, #d98e04, #c67800);
  box-shadow: 0 16px 28px rgba(37, 7, 13, 0.45);
  cursor: pointer;
}

.fab-start::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 209, 117, 0.8);
  opacity: 0.45;
  animation: fabPulse 1.9s ease-in-out infinite;
}

.fab-start:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

@keyframes fabPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.75;
  }
}

.mobile-bottom-nav {
  display: none !important;
  position: fixed;
  left: 50%;
  bottom: max(14px, calc(8px + env(safe-area-inset-bottom, 0px)));
  transform: translateX(-50%);
  width: min(640px, calc(100% - 20px));
  border-radius: 22px;
  border: 1px solid rgba(244, 201, 119, 0.35);
  background: linear-gradient(140deg, rgba(80, 16, 30, 0.72), rgba(64, 12, 24, 0.62));
  backdrop-filter: blur(24px) saturate(130%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  z-index: 18;
}

.mobile-bottom-nav button {
  border: 0;
  background: transparent;
  color: #f6dfb5;
  border-radius: 14px;
  padding: 8px 4px;
  font-size: 0.66rem;
  font-weight: 700;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.mobile-bottom-nav button i {
  font-size: 0.92rem;
}

.mobile-bottom-nav button.active {
  background: linear-gradient(120deg, rgba(217, 142, 4, 0.62), rgba(100, 26, 40, 0.44));
  color: #fff8eb;
  box-shadow: inset 0 1px 0 rgba(255, 232, 185, 0.42);
}

.app {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 16px 12px calc(124px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  opacity: 0;
  transform: translateY(14px) scale(0.995);
  transition: opacity 0.44s ease, transform 0.44s ease;
}

.app.is-active {
  opacity: 1;
  transform: none;
}

.app-bottom-nav {
  bottom: max(12px, calc(8px + env(safe-area-inset-bottom, 0px)));
  z-index: 70;
}

.mobile-appbar,
.mobile-offcanvas,
.mobile-offcanvas-overlay {
  display: none;
}

.mobile-appbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: 62px;
  padding: 10px 12px;
  border-bottom: 1px solid #dcc8a4;
  background: linear-gradient(160deg, rgba(255, 253, 247, 0.96), rgba(255, 243, 224, 0.93));
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-appbar-btn {
  border: 1px solid #d5bf98;
  background: #fff6e4;
  color: #5d2230;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mobile-appbar-title {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.mobile-appbar-title span {
  font-size: 0.72rem;
  color: #7f5f49;
}

.mobile-appbar-title strong {
  font-family: 'Sora', sans-serif;
  color: #231915;
  font-size: 1.04rem;
}

.mobile-appbar-actions {
  display: flex;
  gap: 8px;
}

.mobile-avatar-btn {
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(120deg, #d79a1c, #b57a08);
  color: #fff8ec;
  font: 700 0.8rem 'Sora', sans-serif;
  cursor: pointer;
}

.mobile-offcanvas-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(34, 8, 14, 0.48);
}

.mobile-offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 135;
  width: min(330px, 88vw);
  height: 100dvh;
  background: linear-gradient(160deg, #fffdf8, #fff3df);
  border-right: 1px solid #e2ca9e;
  box-shadow: 14px 0 28px rgba(30, 7, 13, 0.28);
  padding: 16px 14px;
  overflow: auto;
  transform: translateX(-102%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
}

.mobile-offcanvas.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.mobile-offcanvas-head h3 {
  font-size: 1.22rem;
  color: #241915;
  margin-bottom: 10px;
}

.mobile-offcanvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-offcanvas-grid button {
  border: 1px solid #deceb0;
  border-radius: 12px;
  padding: 12px 8px;
  font: 700 0.78rem 'IBM Plex Sans', sans-serif;
  color: #5b1f2d;
  background: #fff8ea;
  display: grid;
  gap: 6px;
  justify-items: center;
  cursor: pointer;
}

.mobile-offcanvas-grid button i {
  font-size: 1rem;
}

.mobile-offcanvas-actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.floating-audit-tools {
  position: fixed;
  right: 16px;
  bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.floating-action {
  border: 1px solid rgba(239, 199, 120, 0.45);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 140px;
  font: 700 0.8rem 'Sora', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  color: #fff6e8;
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 10px 18px rgba(24, 4, 10, 0.38);
}

.floating-export {
  background: linear-gradient(120deg, rgba(217, 142, 4, 0.94), rgba(175, 103, 0, 0.9));
}

.floating-clear {
  background: linear-gradient(120deg, rgba(126, 29, 47, 0.95), rgba(96, 19, 36, 0.92));
}

.floating-progress-bubble {
  --floating-progress: 0;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff6e6;
  font: 800 0.94rem 'Sora', sans-serif;
  background:
    radial-gradient(circle at center, rgba(95, 17, 32, 0.96) 0 58%, transparent 59% 100%),
    conic-gradient(from -90deg, #ffcb78 0deg, #ffcb78 calc(var(--floating-progress) * 3.6deg), rgba(255, 224, 168, 0.2) calc(var(--floating-progress) * 3.6deg), rgba(255, 224, 168, 0.2) 360deg);
  border: 1px solid rgba(248, 208, 131, 0.56);
  box-shadow: 0 12px 22px rgba(23, 4, 9, 0.45);
}

.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--md-outline);
  color: var(--md-text);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(255, 249, 237, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--shadow-md);
}

.audit-meta-panel {
  min-width: 0;
  padding: clamp(14px, 1.6vw, 26px);
}

.audit-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.audit-meta-grid label,
.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #5a1a28;
  font-weight: 700;
}

.audit-meta-grid input,
.form-grid input,
.form-grid textarea,
.version-table input,
.finding-card select,
.finding-card textarea,
.iso-detail-header select {
  width: 100%;
  border: 1px solid #d8c29b;
  border-radius: 12px;
  background: var(--md-surface-elevated);
  color: var(--md-text);
  font: inherit;
  padding: 11px 12px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.audit-meta-grid input:focus,
.form-grid input:focus,
.form-grid textarea:focus,
.version-table input:focus,
.finding-card select:focus,
.finding-card textarea:focus,
.iso-detail-header select:focus,
#signature-canvas:focus {
  outline: none;
  border-color: var(--md-gold);
  box-shadow: 0 0 0 3px rgba(217, 142, 4, 0.2);
}

.global-progress-wrap {
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e7d4b1;
  background: linear-gradient(165deg, #fff7e6, #fff1d8);
}

.global-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  color: #652332;
  font-size: 0.86rem;
}

.global-progress-head strong {
  font-size: clamp(0.92rem, 1.7vw, 1.12rem);
  color: #722034;
}

.global-progress-track {
  margin-top: 10px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #dfc89e;
  background: #f3dfbf;
  overflow: hidden;
}

.global-progress-fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(110deg, #d98e04, #c67b00);
  transition: width 0.45s ease;
}

.global-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 10%, rgba(255, 250, 233, 0.52) 50%, transparent 90%);
  background-size: 210% 100%;
  animation: progressShine 2.4s linear infinite;
}

@keyframes progressShine {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.version-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.version-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.version-table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6f3a46;
  padding: 4px 8px;
}

.version-table td {
  padding: 0 8px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.project-panel {
  min-width: 0;
  padding: clamp(14px, 1.7vw, 24px);
  display: grid;
  gap: 16px;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.panel-collapse-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--audit-line);
  border-radius: 9px;
  background: var(--audit-paper);
  color: var(--audit-wine);
  cursor: pointer;
  transition: transform .2s ease, background .18s ease;
}

.panel-collapse-toggle:hover {
  background: var(--audit-brass-soft);
}

.panel-collapse-toggle i {
  transition: transform .25s ease;
}

.project-panel.is-collapsed .panel-collapse-toggle i {
  transform: rotate(180deg);
}

.project-panel-body {
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.project-panel.is-collapsed .project-panel-body {
  display: none;
}

.project-panel.is-collapsed {
  padding-bottom: clamp(14px, 1.7vw, 24px);
}

.brand-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  animation: none;
}

.sidebar-brand h2 {
  color: #231a15;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  font-family: var(--font-display);
}

.iso-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  margin-top: 6px;
  border: 1px solid rgba(186, 115, 0, 0.45);
  background: rgba(217, 142, 4, 0.16);
  color: #5d1c29;
  font-size: 0.77rem;
  font-weight: 700;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.project-panel h3,
.checklist-panel h3 {
  font-size: clamp(1.12rem, 2vw, 1.55rem);
  color: #1f1a15;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid textarea {
  min-height: 108px;
  resize: vertical;
}

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

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.metric {
  border: 1px solid #e4d5ba;
  border-radius: 14px;
  padding: 11px;
  background: var(--md-surface-soft);
}

.metric strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.06rem;
}

.metric span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-text-soft);
}

.panel-actions {
  display: grid;
  gap: 10px;
}

.checklist-panel {
  min-width: 0;
  padding: clamp(14px, 1.7vw, 26px);
  display: grid;
  gap: 16px;
}

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

.muted {
  margin: 0;
  color: var(--md-text-soft);
  font-size: 0.88rem;
}

.iso-detail-module {
  border: 1px solid #dfc89f;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff9ec, #ffefd3);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.iso-detail-header {
  display: grid;
  gap: 8px;
}

.iso-detail-header label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c2938;
}

.iso-detail-card {
  border: 1px solid #d8b67b;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(105, 22, 38, 0.96), rgba(83, 16, 30, 0.96));
  color: #f7ead1;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.iso-detail-card-onboarding {
  min-height: 212px;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(109, 24, 40, 0.96), rgba(63, 10, 22, 0.98));
  box-shadow: 0 18px 28px rgba(18, 3, 7, 0.3);
}

.iso-detail-card h4 {
  font-size: 1.02rem;
}

.iso-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iso-detail-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid rgba(248, 214, 150, 0.45);
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffe0a8;
}

.panel-tools {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.quick-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.quick-filter-field {
  display: grid;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a2535;
  position: relative;
}

.quick-filter-field::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 0.72rem;
  color: #6a2535;
  pointer-events: none;
}

.quick-filter-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cfa96b;
  background: linear-gradient(150deg, #fffaf0, #fff0d8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 14px rgba(66, 16, 27, 0.08);
  color: #4f1f2b;
  font: 700 0.96rem 'IBM Plex Sans', sans-serif;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 10px 34px 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.14s ease;
}

.quick-filter-field select:hover {
  border-color: #bf8230;
}

.quick-filter-field select:focus {
  outline: none;
  border-color: var(--md-gold);
  box-shadow:
    0 0 0 3px rgba(217, 142, 4, 0.18),
    0 10px 16px rgba(66, 16, 27, 0.12);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid #dbc095;
  background: var(--md-surface-elevated);
  padding: 11px 12px;
}

.search-box i {
  color: #6c2332;
}

.search-box input {
  border: 0;
  width: 100%;
  background: transparent;
  color: #3f1a23;
  font: inherit;
}

.search-box input:focus {
  outline: none;
}

.section-tabs {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.section-tabs button {
  border: 1px solid #d4b277;
  border-radius: 999px;
  background: #fff4df;
  color: #5e1f2c;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.section-tabs button i {
  margin-right: 6px;
}

.section-tabs button.active {
  border-color: #b16a00;
  background: linear-gradient(110deg, #d98e04, #bd7300);
  color: #fff8ef;
}

.checklist-root {
  display: grid;
  gap: 14px;
}

.empty-results {
  border: 1px dashed #dfc89e;
  border-radius: 14px;
  background: #fff8ea;
  color: #6f5640;
  text-align: center;
  padding: 18px;
  font-size: 0.88rem;
}

.section-block {
  border: 1px solid #e2cfab;
  border-radius: 14px;
  overflow: hidden;
}

.section-head {
  padding: 12px 14px;
  background: linear-gradient(110deg, #5f1422, #7d1d30);
  color: #f7f2ea;
}

.section-head h4 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.findings-list {
  padding: 12px;
  display: grid;
  gap: 12px;
  background: #fff9ef;
}

.finding-card {
  border: 1px solid #e7d9c2;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.finding-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 15, 24, 0.11);
}

.finding-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.finding-head > div {
  flex: 1 1 280px;
  min-width: 0;
}

.finding-head h5 {
  font-size: 0.96rem;
}

.finding-head p {
  margin: 5px 0 0;
  color: #63503a;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.finding-head-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.badge-status,
.risk-pill {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}

.badge-status.ok {
  background: rgba(31, 157, 106, 0.18);
  color: #126c49;
}

.badge-status.warn {
  background: rgba(210, 141, 23, 0.2);
  color: #9a6814;
}

.badge-status.bad {
  background: rgba(214, 69, 69, 0.18);
  color: #9f2f2f;
}

.badge-status.na {
  background: rgba(132, 144, 156, 0.2);
  color: #4f5f70;
}

.risk-pill {
  border: 1px solid #dac39b;
  color: #5a4630;
  background: #f5ecdc;
}

.risk-pill.bajo {
  background: rgba(31, 157, 106, 0.16);
  color: #0d6b46;
  border-color: rgba(31, 157, 106, 0.35);
}

.risk-pill.medio {
  background: rgba(210, 141, 23, 0.16);
  color: #8e610f;
  border-color: rgba(210, 141, 23, 0.35);
}

.risk-pill.alto {
  background: rgba(214, 69, 69, 0.16);
  color: #9b2d2d;
  border-color: rgba(214, 69, 69, 0.35);
}

.risk-pill.critico {
  background: rgba(134, 31, 37, 0.18);
  color: #6f131a;
  border-color: rgba(134, 31, 37, 0.4);
}

.clause-definition {
  margin: 10px 0;
  padding-left: 10px;
  border-left: 3px solid var(--md-gold);
  font-size: 0.84rem;
  color: #523e2a;
}

.clause-guide {
  margin: 0 0 10px;
  padding-left: 18px;
  color: #614b30;
  font-size: 0.8rem;
  display: grid;
  gap: 4px;
}

.nora-clause-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.btn-nora-inline {
  padding: 8px 11px;
  font-size: 0.75rem;
}

.nora-clause-response {
  margin: 0 0 12px;
  border: 1px solid rgba(115, 14, 14, 0.14);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(255, 248, 235, 0.98), rgba(255, 242, 220, 0.98));
  color: #54212d;
  padding: 12px;
}

.nora-inline-state,
.nora-inline-answer p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.84rem;
}

.nora-inline-answer {
  display: grid;
  gap: 8px;
}

.nora-inline-answer strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6c1726;
}

.finding-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.finding-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: #5b2230;
  font-weight: 700;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.finding-grid .wide {
  grid-column: 1 / -1;
}

.finding-card textarea {
  min-height: 78px;
  resize: vertical;
}

.evidence-tools {
  margin-top: 8px;
}

.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 10px;
  border: 1px dashed #c57a00;
  background: #f8e7c9;
  color: #632430;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.upload-label input[type='file'] {
  display: none;
}

.upload-label:hover {
  filter: brightness(1.03);
}

.link-form {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 10px;
  border: 1px solid var(--audit-line-strong);
  background: var(--audit-paper);
  overflow: hidden;
}

.link-form input[type='url'] {
  width: 200px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--audit-ink);
  font-size: 0.78rem;
}

.link-form input[type='url']:focus {
  outline: 0;
  box-shadow: none;
}

.link-form button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--audit-line-strong);
  background: var(--audit-brass-soft);
  color: var(--audit-wine);
  cursor: pointer;
  transition: filter .18s ease;
}

.link-form button:hover {
  filter: brightness(0.97);
}

.evidence-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.evidence-item {
  border: 1px solid var(--audit-line);
  border-radius: 10px;
  background: var(--audit-paper);
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.evidence-item-empty {
  border-style: dashed;
  color: var(--audit-muted);
}

.evidence-item.is-link {
  background: var(--audit-brass-soft);
  border-color: rgba(200, 138, 26, 0.35);
}

.evidence-meta {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--audit-muted);
}

.evidence-meta > i {
  margin-top: 2px;
  color: var(--audit-brass);
}

.evidence-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.evidence-meta strong {
  color: var(--audit-ink);
  word-break: break-word;
}

.evidence-meta a {
  color: var(--audit-wine);
  font-weight: 600;
  word-break: break-all;
}

.evidence-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evidence-item .btn {
  padding: 6px 9px;
  font-size: 0.7rem;
}

.signature-panel {
  margin-top: 8px;
  border: 1px solid #dfc7a0;
  border-radius: 14px;
  background: linear-gradient(160deg, #fff9ed, #fff2dd);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.signature-head {
  display: grid;
  gap: 4px;
}

.signature-head h4 {
  font-size: 1rem;
}

.signature-head p {
  margin: 0;
  color: #6a4b37;
  font-size: 0.84rem;
}

.signature-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.signature-canvas-col,
.signature-upload-col {
  display: grid;
  gap: 8px;
}

.signature-canvas-col label,
.signature-upload-col label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5f1e2b;
  text-transform: uppercase;
}

#signature-canvas {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cfa96b;
  background: #fff;
  touch-action: none;
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signature-upload-label {
  width: 100%;
  justify-content: center;
}

.signature-preview {
  border: 1px dashed #d5bb91;
  border-radius: 12px;
  min-height: 126px;
  background: #fff;
  color: #6a4b37;
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  font-size: 0.84rem;
}

.signature-preview img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: 'Sora', sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.2s ease;
}

.btn i {
  margin-right: 6px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:disabled {
  opacity: 0.48;
  transform: none;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(110deg, var(--md-gold), var(--md-gold-deep));
  color: #fff8ef;
}

.btn-secondary {
  background: #f8e7c9;
  color: #5e1e2b;
}

.btn-danger {
  background: #f4d9d2;
  color: #7b2027;
}

.nora-toggle {
  position: fixed;
  left: auto;
  right: 24px;
  bottom: 24px;
  z-index: 980;
  width: auto;
  min-width: 0;
  max-width: calc(100vw - 32px);
  height: 58px;
  min-height: 58px;
  padding: 8px 15px 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: var(--audit-wine-deep);
  color: #fff7ec;
  box-shadow: 0 18px 38px rgba(33, 5, 12, 0.35), 0 0 0 1px rgba(255, 220, 165, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: none;
  white-space: nowrap;
  font: 800 0.84rem 'Sora', sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nora-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.nora-toggle.is-open {
  filter: brightness(1.08);
}

.nora-toggle-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--audit-brass);
  color: #35180b;
  font-size: 0.95rem;
  font-weight: 900;
}

.nora-toggle > span:last-child {
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1;
}

.nora-toggle strong {
  color: #fff8ee;
  font-size: .78rem;
}

.nora-toggle small {
  color: rgba(255, 244, 230, .58);
  font-size: .58rem;
  font-weight: 600;
}

.nora-panel {
  position: fixed;
  right: 18px;
  bottom: calc(180px + env(safe-area-inset-bottom, 0px));
  z-index: 979;
  width: min(420px, calc(100vw - 24px));
  max-height: min(72vh, 720px);
  display: grid;
  grid-template-rows: auto auto auto minmax(160px, 1fr) auto;
  gap: 12px;
  border-radius: 24px;
  border: 1px solid rgba(217, 142, 4, 0.24);
  background: linear-gradient(165deg, rgba(255, 251, 243, 0.98), rgba(255, 244, 224, 0.98));
  color: #4b1822;
  box-shadow: 0 30px 70px rgba(25, 4, 9, 0.3);
  padding: 18px;
  backdrop-filter: blur(20px);
}

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

.nora-panel-head h3 {
  font-size: 1.2rem;
}

.nora-mode {
  margin: 0;
  font-size: 0.8rem;
  color: #6c4b34;
  line-height: 1.5;
}

.nora-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nora-prompt-chip {
  border: 1px solid rgba(115, 14, 14, 0.12);
  border-radius: 999px;
  background: rgba(248, 231, 201, 0.88);
  color: #5f1e2b;
  font: 700 0.74rem 'Sora', sans-serif;
  padding: 8px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.nora-prompt-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.nora-messages {
  min-height: 200px;
  max-height: 34vh;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
}

.nora-message {
  display: grid;
  gap: 5px;
}

.nora-message.user {
  justify-items: end;
}

.nora-message-role {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f4854;
}

.nora-message-bubble {
  max-width: 92%;
  border-radius: 16px;
  padding: 11px 12px;
  line-height: 1.55;
  font-size: 0.84rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fffaf0;
  border: 1px solid rgba(115, 14, 14, 0.12);
}

.nora-message.user .nora-message-bubble {
  background: linear-gradient(120deg, #730e0e, #8a1c1c);
  border-color: transparent;
  color: #fff7ed;
}

.nora-message.assistant .nora-message-bubble {
  background: linear-gradient(150deg, rgba(255, 248, 235, 0.98), rgba(255, 240, 208, 0.98));
  color: #51202b;
}

.nora-form {
  display: grid;
  gap: 10px;
}

.nora-form-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #632432;
  text-transform: uppercase;
}

.nora-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
  border: 1px solid #d8c29b;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #43212a;
  font: inherit;
  padding: 11px 12px;
}

.nora-form textarea:focus {
  outline: none;
  border-color: var(--md-gold);
  box-shadow: 0 0 0 3px rgba(217, 142, 4, 0.18);
}

.nora-form-actions {
  display: flex;
  justify-content: flex-end;
}

.camera-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 7, 15, 0.7);
  z-index: 1000;
  padding: 16px;
}

.camera-card {
  width: min(620px, 100%);
  border-radius: 14px;
  border: 1px solid #e0cfb4;
  background: #f7fbff;
  color: #0f2439;
  padding: 14px;
}

.camera-card video {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid #e2d2b8;
  background: #2d0b12;
}

.camera-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tutorial-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 2, 6, 0.72);
  z-index: 1200;
  padding: 16px;
}

.tutorial-card {
  width: min(760px, 100%);
  border-radius: 14px;
  border: 1px solid #deb980;
  background: #fff8ec;
  color: #33151d;
  box-shadow: 0 20px 40px rgba(31, 7, 13, 0.42);
  padding: 16px;
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tutorial-steps {
  list-style: none;
  margin: 14px 0 4px;
  padding: 0;
  display: grid;
  gap: 10px;
  color: #4a2c33;
  max-height: min(58vh, 520px);
  overflow-y: auto;
}

.tutorial-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #e7d4b1;
  border-radius: 12px;
  background: linear-gradient(160deg, #fffaf0, #fff3de);
}

.tutorial-step-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--md-gold), var(--md-gold-deep));
  color: #fff8ef;
  font-size: 0.92rem;
  box-shadow: 0 6px 14px rgba(186, 115, 0, 0.28);
}

.tutorial-steps li strong {
  display: block;
  color: #4a1622;
  font-size: 0.92rem;
  font-family: 'Sora', sans-serif;
}

.tutorial-steps li p {
  margin: 3px 0 0;
  color: #5b3a34;
  font-size: 0.83rem;
  line-height: 1.45;
}

.tutorial-steps li em {
  font-style: normal;
  font-weight: 700;
  color: var(--md-vino);
}

/* ---------- Panel "Mis exportaciones" ---------- */

.exports-panel-card {
  width: min(640px, 100%);
  display: grid;
  gap: 14px;
}

.exports-panel-summary {
  display: grid;
  gap: 6px;
}

.completion-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.completion-badge.complete {
  color: #0f6b46;
  background: rgba(31, 157, 106, 0.14);
  border: 1px solid rgba(31, 157, 106, 0.3);
}

.completion-badge.progress {
  color: #8a5a10;
  background: rgba(210, 141, 23, 0.14);
  border: 1px solid rgba(210, 141, 23, 0.3);
}

.exports-progress-note {
  margin: 0;
  color: #6a4b37;
  font-size: 0.82rem;
}

.exports-list {
  display: grid;
  gap: 10px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding-right: 2px;
}

.exports-loading {
  padding: 24px;
  text-align: center;
  color: #6a4b37;
  font-size: 0.86rem;
}

.export-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e7d4b1;
  border-radius: 14px;
  background: #fffefb;
}

.export-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(111, 22, 39, 0.1);
  color: var(--md-vino);
  font-size: 1.15rem;
}

.export-card-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.export-card-body strong {
  font-size: 0.9rem;
  color: #1f1b16;
  word-break: break-word;
}

.export-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--md-text-soft);
}

.export-card-meta span:not(:last-child)::after {
  content: '•';
  margin-left: 8px;
  color: #d8c3a1;
}

.export-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.export-badge.complete {
  color: #0f6b46;
  background: rgba(31, 157, 106, 0.14);
}

.export-badge.partial {
  color: #8a5a10;
  background: rgba(210, 141, 23, 0.14);
}

.export-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed #e7d4b1;
}

.export-expiry {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--md-text-soft);
}

.export-expiry.soon {
  color: var(--md-warning);
}

.export-expiry.urgent {
  color: var(--md-danger);
  font-weight: 700;
}

.export-card-actions .btn {
  padding: 7px 10px;
  font-size: 0.74rem;
}

.exports-retention-note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #efe0c4;
  color: var(--md-text-soft);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.exports-panel-card .empty-state {
  padding: 34px 12px;
  text-align: center;
  color: var(--md-text-soft);
  display: grid;
  gap: 8px;
  justify-items: center;
}

.exports-panel-card .empty-state i {
  font-size: 1.6rem;
  color: #d8c3a1;
}

.exports-panel-card .empty-state p {
  margin: 0;
  font-size: 0.86rem;
}

.profile-setup-card {
  width: min(520px, 100%);
}

.profile-setup-copy {
  margin: 10px 0 16px;
  color: #4a2c33;
  font-size: 0.9rem;
  line-height: 1.5;
}

.profile-setup-grid {
  display: grid;
  gap: 12px;
}

.profile-setup-full {
  grid-column: 1 / -1;
}

.profile-setup-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a2c33;
}

.profile-setup-grid input {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #e2d2b8;
  background: #fffefb;
  color: #1f1b16;
  font: inherit;
}

.profile-setup-grid input:focus {
  outline: none;
  border-color: var(--md-vino);
  box-shadow: 0 0 0 3px rgba(111, 22, 39, 0.14);
}

.profile-setup-feedback {
  min-height: 1.1em;
  margin: 10px 0 0;
  color: var(--md-danger);
  font-size: 0.82rem;
}

.profile-setup-actions {
  margin-top: 14px;
}

@media (min-width: 520px) {
  .profile-setup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  border: 1px solid var(--md-gold);
  border-radius: 10px;
  background: #4c101c;
  color: #fff1dc;
  padding: 10px 14px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  font-size: 0.84rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .app {
    padding: 20px 18px calc(128px + env(safe-area-inset-bottom, 0px));
    gap: 18px;
  }

  .audit-meta-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .finding-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .quick-filters {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .signature-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

@media (max-width: 719px) {
  .nora-toggle {
    left: 12px;
    right: auto;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    min-width: 112px;
    min-height: 52px;
    padding-right: 14px;
    justify-content: center;
    box-shadow: 0 14px 28px rgba(31, 5, 11, 0.28);
  }

  .floating-audit-tools {
    right: 12px;
    left: auto;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    justify-items: end;
    width: auto;
  }

  .floating-action {
    width: auto;
    min-width: 128px;
  }

  .floating-progress-bubble {
    justify-self: end;
  }

  .nora-panel {
    right: 12px;
    left: 12px;
    bottom: calc(164px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(68vh, 680px);
    padding: 14px;
  }

  .nora-messages {
    max-height: 26vh;
  }

  .nora-form textarea {
    min-height: 80px;
  }

  .mobile-appbar {
    display: flex;
  }

  .mobile-offcanvas-overlay {
    display: block;
  }

  .mobile-offcanvas {
    display: block;
  }

  .onboarding {
    padding: 14px 12px calc(138px + env(safe-area-inset-bottom, 0px));
  }

  .onboarding-card {
    padding: 20px 16px;
    transform: none;
  }

  .onboarding-hero,
  .onboarding-layout {
    grid-template-columns: 1fr;
  }

  .onboarding-preview {
    padding: 16px;
    position: static;
  }

  .framework-tabs {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .framework-tab {
    padding: 9px 11px;
    font-size: 0.74rem;
  }

  .iso-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 4px 0 0;
  }

  .iso-option {
    min-height: 176px;
  }

  .iso-option.active {
    transform: none;
  }

  .app {
    padding-top: calc(76px + env(safe-area-inset-top, 0px));
  }
}

/* ==========================================================================
   AUDIT WORKSPACE · PREMIUM EDITION
   Jerarquía de expediente, progreso continuo y asistencia contextual.
   ========================================================================== */

:root {
  --audit-ink: #211d1b;
  --audit-muted: #716863;
  --audit-canvas: #eeeae4;
  --audit-paper: #fffdf9;
  --audit-paper-warm: #f7f2eb;
  --audit-line: #ded6cc;
  --audit-line-strong: #cdbfae;
  --audit-wine: #681528;
  --audit-wine-deep: #3f0d19;
  --audit-brass: #c88a1a;
  --audit-brass-soft: #f3e5c3;
  --audit-green: #25755a;
  --audit-red: #a13e47;
  --audit-shadow: 0 22px 60px rgba(50, 35, 29, .11);
}

body {
  color: var(--audit-ink);
  background: var(--audit-canvas);
}

.app {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 22px;
  gap: 18px;
}

.panel {
  border: 1px solid var(--audit-line);
  border-radius: 22px;
  background: var(--audit-paper);
  box-shadow: 0 12px 36px rgba(50, 35, 29, .07);
}

.section-kicker,
.command-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--audit-wine);
  font: 800 .68rem/1.2 'Plus Jakarta Sans', sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.panel-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.panel-section-heading h2,
.panel-section-heading h3 {
  color: var(--audit-ink);
  font: 700 clamp(1.3rem, 2vw, 1.75rem)/1.15 'Sora', sans-serif;
}

.panel-section-heading > p {
  max-width: 42ch;
  margin: 0;
  color: var(--audit-muted);
  font-size: .85rem;
  line-height: 1.5;
  text-align: right;
}

.panel-section-heading.compact {
  margin: 5px 0 -2px;
}

/* Selector de norma */
.onboarding {
  min-height: 100vh;
  padding: clamp(20px, 4vw, 54px);
  background: #4a0f1d;
}

.onboarding-card {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(255, 235, 208, .16);
  border-radius: 30px;
  background: #5b1222;
  box-shadow: 0 40px 100px rgba(26, 3, 9, .34);
}

.onboarding-card::before,
.onboarding-card::after {
  display: none;
}

.onboarding-hero {
  margin-bottom: 32px;
}

.onboarding-hero-copy {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-brand {
  flex: 0 0 auto;
  margin: 0;
}

.hero-logo {
  width: 88px;
  max-width: 18vw;
  background: transparent;
}

.onboarding-title-copy {
  max-width: 760px;
}

.onboarding-title-copy .eyebrow {
  color: #efc87a;
}

.onboarding-card h1 {
  max-width: 20ch;
  margin: 0 0 10px;
  color: #fffaf1;
  font: 700 clamp(2rem, 4.3vw, 4.1rem)/1.02 'Sora', sans-serif;
  letter-spacing: -.05em;
  text-shadow: none;
}

.onboarding-card .subtitle {
  max-width: 64ch;
  margin: 0;
  color: rgba(255, 244, 229, .72);
  font-size: clamp(.92rem, 1.5vw, 1.08rem);
  line-height: 1.6;
}

.onboarding-steps {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-left: 112px;
}

.onboarding-steps span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 239, 218, .58);
  font-size: .78rem;
  font-weight: 700;
}

.onboarding-steps span::after {
  content: '';
  width: 38px;
  height: 1px;
  margin-left: 4px;
  background: rgba(255, 235, 207, .22);
}

.onboarding-steps span:last-child::after {
  display: none;
}

.onboarding-steps b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 235, 207, .26);
  border-radius: 50%;
  color: #f8dfb0;
  font-size: .7rem;
}

.onboarding-steps .active {
  color: #fff7e9;
}

.onboarding-steps .active b {
  border-color: var(--audit-brass);
  background: var(--audit-brass);
  color: #32180a;
}

.onboarding-layout {
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 28px;
}

.onboarding-search {
  min-height: 54px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 238, 215, .24);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
}

.onboarding-search:focus-within {
  border-color: #e2aa45;
  box-shadow: 0 0 0 4px rgba(226, 170, 69, .12);
}

.framework-tabs {
  margin-bottom: 18px;
}

.framework-tab {
  border: 1px solid rgba(255, 238, 215, .18);
  background: transparent;
  color: rgba(255, 244, 230, .74);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.framework-tab:hover,
.framework-tab.active {
  border-color: #dfaa4a;
  background: #f3e3c2;
  color: #4a1420;
  box-shadow: none;
}

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

.iso-option {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 242, 224, .16);
  border-radius: 18px;
  background: rgba(68, 10, 24, .52);
  color: #fff8ed;
  overflow: hidden;
  animation: auditRise .45s cubic-bezier(.2,.75,.25,1) both;
  animation-delay: calc(var(--iso-order) * 55ms);
}

.iso-option::before {
  inset: 0 auto 0 0;
  width: 3px;
  height: auto;
  background: var(--audit-brass);
}

.iso-option:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 185, 93, .55);
  background: rgba(78, 12, 29, .78);
  box-shadow: 0 22px 42px rgba(25, 2, 8, .2);
}

.iso-option.active {
  transform: none;
  border-color: #e4b052;
  background: #fffaf2;
  color: var(--audit-ink);
  box-shadow: 0 18px 48px rgba(26, 3, 9, .26);
}

.iso-option-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.iso-option-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 217, 167, .22);
  border-radius: 12px;
  color: #f1c76f;
  background: rgba(255, 255, 255, .05);
}

.iso-option.active .iso-option-icon {
  border-color: #e9d9bd;
  background: #f3eadc;
  color: var(--audit-wine);
}

.iso-selected-badge {
  position: static;
  border: 0;
  background: transparent;
  color: var(--audit-green);
  padding: 0;
  font-size: .69rem;
}

.iso-option-copy {
  display: grid;
  gap: 8px;
  flex: 1;
}

.iso-option-version {
  color: rgba(255, 241, 218, .58);
  font: 700 .66rem/1 'Plus Jakarta Sans', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.iso-option.active .iso-option-version {
  color: var(--audit-muted);
}

.iso-option-copy h4 {
  color: inherit;
  font: 700 1.25rem/1.15 'Sora', sans-serif;
  letter-spacing: -.025em;
}

.iso-option-copy p {
  margin: 0;
  color: rgba(255, 245, 231, .7);
  font-size: .84rem;
  line-height: 1.55;
}

.iso-option.active .iso-option-copy p {
  color: #625954;
}

.iso-option-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 240, 217, .14);
  color: rgba(255, 244, 227, .62);
  font-size: .69rem;
}

.iso-option.active .iso-option-foot {
  border-color: #e8dfd4;
  color: var(--audit-muted);
}

.iso-option-foot strong {
  color: inherit;
  font-size: .88rem;
}

.iso-option-foot > i {
  margin-left: auto;
  color: #e8b351;
}

.onboarding-preview {
  top: 26px;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 238, 216, .18);
  border-radius: 22px;
  background: #3f0c19;
  box-shadow: 0 24px 60px rgba(25, 2, 8, .2);
}

.iso-detail-card-onboarding {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.iso-detail-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.iso-detail-title > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(241, 199, 113, .12);
  color: #efc46d;
}

.iso-detail-title small {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 241, 220, .55);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.iso-detail-title h4 {
  color: #fff9ef;
  font-size: 1.18rem;
}

.iso-detail-focus,
.iso-detail-summary {
  margin: 0;
  line-height: 1.55;
}

.iso-detail-focus {
  color: #fff5e5;
  font-weight: 700;
}

.iso-detail-summary {
  color: rgba(255, 241, 219, .66);
  font-size: .83rem;
}

.iso-detail-meta {
  margin-top: 4px;
}

.iso-detail-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border-color: rgba(245, 208, 140, .22);
  color: rgba(255, 237, 205, .72);
}

.iso-detail-badge strong {
  color: #f0c46e;
  font-size: .9rem;
}

.onboarding-ready-note {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 235, 207, .14);
  color: #efc46d;
}

.onboarding-ready-note p {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #fff5e6;
  font-size: .8rem;
}

.onboarding-ready-note span {
  color: rgba(255, 241, 219, .58);
  line-height: 1.45;
}

.fab-start {
  min-height: 54px;
  justify-content: space-between;
  border: 0;
  border-radius: 13px;
  background: var(--audit-brass);
  color: #351a0d;
  box-shadow: none;
}

.fab-start:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #d49a2c;
}

.fab-start::after {
  display: none;
}

/* Barra de mando */
.audit-command-bar {
  position: sticky;
  top: 14px;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(360px, 1.4fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 88px;
  padding: 14px 16px 14px 22px;
  border: 1px solid rgba(255, 239, 218, .14);
  border-radius: 19px;
  background: rgba(63, 13, 25, .97);
  color: #fff9ef;
  box-shadow: 0 18px 45px rgba(49, 13, 23, .18);
  backdrop-filter: blur(16px);
}

.command-context {
  min-width: 0;
}

.command-eyebrow {
  color: #d9ad58;
}

.command-context strong {
  display: block;
  overflow: hidden;
  color: #fff9ef;
  font: 700 1rem/1.2 'Sora', sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.command-progress-ring {
  --command-progress: 0;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #3f0d19 56%, transparent 57%),
    conic-gradient(#d89b30 calc(var(--command-progress) * 3.6deg), rgba(255,255,255,.12) 0);
  transition: background .4s ease;
}

.command-progress-ring strong {
  color: #fff7e8;
  font-size: .78rem;
}

.command-progress > div:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.command-progress span {
  color: rgba(255, 241, 222, .64);
  font-size: .73rem;
}

.command-progress > div:last-child strong {
  overflow: hidden;
  color: #fff9ef;
  font-size: .84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-continue {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 12px;
  color: #351a0d;
  background: var(--audit-brass);
}

/* Expediente y panel del usuario */
.audit-meta-panel {
  padding: clamp(22px, 3vw, 34px);
}

.audit-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.audit-meta-grid label,
.form-grid label,
.finding-grid label {
  color: #4e3e38;
  letter-spacing: .02em;
  text-transform: none;
}

.audit-meta-grid input,
.form-grid input,
.form-grid textarea,
.version-table input,
.finding-card select,
.finding-card textarea,
.iso-detail-header select {
  min-height: 46px;
  border-color: var(--audit-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(43, 31, 26, .025);
}

.global-progress-wrap {
  margin-top: 24px;
  padding: 16px 18px;
  border-color: #ead9b8;
  border-radius: 13px;
  background: #fbf5e9;
}

.global-progress-track {
  height: 9px;
  border: 0;
  background: #e8ded0;
}

.global-progress-fill {
  background: var(--audit-brass);
}

.global-progress-fill::after {
  display: none;
}

.workspace {
  grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.project-panel {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 138px);
  gap: 20px;
  padding: 26px;
  overflow: auto;
}

.sidebar-brand {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--audit-line);
}

.brand-logo {
  width: 58px;
  height: 58px;
  background: transparent;
}

.sidebar-brand h2 {
  font: 700 1.24rem/1.15 'Sora', sans-serif;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.sidebar-action,
.sidebar-action-featured {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--audit-line);
  border-radius: 11px;
  background: #fff;
  color: #4c3d38;
  font: 700 .76rem/1.2 'Plus Jakarta Sans', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.sidebar-action:hover,
.sidebar-action-featured:hover {
  transform: translateY(-2px);
  border-color: #c8aa77;
  background: #fffaf1;
}

.sidebar-action-featured {
  grid-column: 1 / -1;
  min-height: 62px;
  color: #fff8ed;
  border-color: var(--audit-wine);
  background: var(--audit-wine);
}

.sidebar-action-featured:hover {
  border-color: #7a1d31;
  background: #751a2e;
}

.sidebar-action-featured > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  color: #efc56f;
}

.sidebar-action-featured span {
  display: grid;
  gap: 3px;
}

.sidebar-action-featured small {
  color: rgba(255, 245, 231, .66);
  font-size: .67rem;
  font-weight: 500;
}

.user-account-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--audit-line);
  border-radius: 13px;
  background: var(--audit-paper-warm);
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--audit-wine);
  color: #fff8ef;
}

.user-account-card > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-account-card small {
  color: var(--audit-muted);
  font-size: .65rem;
}

.session-user {
  overflow-wrap: anywhere;
  color: var(--audit-ink);
  font-size: .74rem;
  line-height: 1.35;
}

.user-account-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--audit-line);
}

.user-account-actions a,
.user-account-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audit-wine);
  font: 700 .7rem 'Plus Jakarta Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.form-grid {
  gap: 14px;
}

.form-grid textarea {
  min-height: 118px;
}

.metrics {
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.metric {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-color: var(--audit-line);
  border-radius: 12px;
  background: #fff;
}

.metric-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eee9e3;
  color: #655c57;
}

.metric.success .metric-icon {
  background: #e0eee8;
  color: var(--audit-green);
}

.metric.attention .metric-icon {
  background: #f7ecd2;
  color: #9b6a12;
}

.metric.danger .metric-icon {
  background: #f3dfe1;
  color: var(--audit-red);
}

.metric > div {
  min-width: 0;
  display: grid;
}

.metric strong {
  color: var(--audit-ink);
  font-size: 1.05rem;
}

.metric span:not(.metric-icon) {
  color: #554b46;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.metric small {
  overflow: hidden;
  color: var(--audit-muted);
  font-size: .6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-actions .btn {
  min-height: 48px;
  border-radius: 11px;
}

.btn-primary {
  border-color: var(--audit-brass);
  background: var(--audit-brass);
  color: #321a0d;
}

.btn-quiet {
  border: 0;
  background: transparent;
  color: #7b5f59;
  box-shadow: none;
}

/* Mesa de llenado */
.checklist-panel {
  gap: 22px;
  padding: clamp(22px, 3vw, 34px);
}

.panel-head {
  align-items: flex-end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--audit-line);
}

.panel-head h3 {
  font: 700 clamp(1.45rem, 2.4vw, 2rem)/1.15 'Sora', sans-serif;
  letter-spacing: -.035em;
}

.iso-detail-module {
  grid-template-columns: minmax(200px, .45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-color: var(--audit-line);
  border-radius: 14px;
  background: var(--audit-paper-warm);
}

.iso-detail-card:not(.iso-detail-card-onboarding) {
  grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "title   focus   meta"
    "title   summary meta";
  gap: 4px 22px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audit-ink);
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-title {
  grid-area: title;
  align-self: center;
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-title > span {
  background: #ede4d8;
  color: var(--audit-wine);
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-title small,
.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-summary {
  color: var(--audit-muted);
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-title h4,
.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-focus {
  color: var(--audit-ink);
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-focus {
  grid-area: focus;
  align-self: end;
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-summary {
  grid-area: summary;
  align-self: start;
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-meta {
  grid-area: meta;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-badge {
  border-color: var(--audit-line-strong);
  color: var(--audit-muted);
}

.iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-badge strong {
  color: var(--audit-wine);
}

.panel-tools {
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--audit-line);
  border-radius: 15px;
  background: #fbf9f6;
}

.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.filter-heading > div {
  display: grid;
  gap: 3px;
}

.filter-heading strong {
  color: var(--audit-ink);
  font-size: .9rem;
}

.filter-heading span {
  color: var(--audit-muted);
  font-size: .72rem;
}

.filter-heading button {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8a7e77;
  font: 700 .68rem 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  opacity: .55;
}

.filter-heading button.is-active {
  color: var(--audit-wine);
  background: #f1e5e6;
  opacity: 1;
}

.search-box {
  min-height: 48px;
  border-color: var(--audit-line);
  border-radius: 11px;
  background: #fff;
}

.search-box:focus-within {
  border-color: #b98838;
  box-shadow: 0 0 0 3px rgba(200, 138, 26, .12);
}

.quick-filters {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-filter-field {
  color: #665b55;
  font-size: .65rem;
  letter-spacing: .07em;
}

.quick-filter-field select {
  min-height: 46px;
  border-color: var(--audit-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: var(--audit-ink);
  font-size: .82rem;
}

.section-tabs {
  gap: 6px;
  padding-top: 4px;
}

.section-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: var(--audit-line);
  border-radius: 9px;
  background: #fff;
  color: #675d58;
  padding: 8px 10px;
  font-size: .7rem;
}

.section-tabs button i {
  margin: 0;
}

.section-tabs button span {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #eee9e3;
  color: #716761;
  font-size: .6rem;
}

.section-tabs button.active {
  border-color: var(--audit-wine);
  background: var(--audit-wine);
  color: #fff8ef;
}

.section-tabs button.active span {
  background: rgba(255,255,255,.13);
  color: #fff4e5;
}

.checklist-root {
  gap: 22px;
}

.section-block {
  border: 0;
  border-radius: 16px;
  overflow: visible;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  border-radius: 14px 14px 0 0;
  background: var(--audit-wine-deep);
}

.section-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  color: #e7b95f;
}

.section-head small {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,245,230,.52);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.section-head h4 {
  color: #fff9ef;
  font-size: .95rem;
}

.section-progress {
  display: grid;
  justify-items: end;
  color: #fff6e8;
}

.section-progress strong {
  font-size: .92rem;
}

.section-progress span {
  color: rgba(255,245,230,.57);
  font-size: .62rem;
}

.findings-list {
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--audit-line);
  border-top: 0;
  border-radius: 0 0 15px 15px;
  background: #f3eee8;
}

.finding-card {
  padding: clamp(18px, 2.6vw, 28px);
  border-color: var(--audit-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(53, 39, 32, .045);
  animation: auditRise .38s cubic-bezier(.2,.75,.25,1) both;
}

.finding-card:hover {
  transform: none;
  border-color: #cbbdad;
  box-shadow: 0 14px 34px rgba(53, 39, 32, .075);
}

.finding-card.is-evaluated {
  border-left: 3px solid var(--audit-green);
}

.finding-card.is-next {
  animation: nextClausePulse 1.7s ease;
}

.finding-head {
  margin-bottom: 14px;
}

.finding-head > .finding-title {
  flex: 1 1 420px;
}

.finding-head > .finding-head-tags {
  flex: 0 0 auto;
}

.finding-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.clause-id {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 8px;
  background: #eee7df;
  color: var(--audit-wine);
  font: 800 .69rem/1 'Plus Jakarta Sans', sans-serif;
}

.finding-title small {
  display: block;
  margin-bottom: 4px;
  color: var(--audit-muted);
  font-size: .59rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.finding-head h5 {
  color: var(--audit-ink);
  font: 700 1.05rem/1.3 'Sora', sans-serif;
  letter-spacing: -.02em;
}

.audit-question {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 11px;
  background: #f7f3ed;
  color: #554b46;
  font-size: .83rem;
  line-height: 1.55;
}

.audit-question > i {
  margin-top: 3px;
  color: var(--audit-brass);
}

.audit-question span {
  display: grid;
  gap: 3px;
}

.audit-question strong {
  color: var(--audit-ink);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.audit-question-text {
  display: block;
  color: #443b37;
  font-size: .86rem;
  line-height: 1.5;
}

.clause-brief {
  margin-bottom: 14px;
  border: 1px solid var(--audit-line);
  border-radius: 11px;
  background: #fff;
}

.clause-brief summary {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  color: #534944;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.clause-brief summary::-webkit-details-marker {
  display: none;
}

.clause-brief summary span {
  display: inline-flex;
  gap: 8px;
}

.clause-brief summary > i {
  transition: transform .2s ease;
}

.clause-brief[open] summary > i {
  transform: rotate(180deg);
}

.clause-brief-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 14px;
  border-top: 1px solid var(--audit-line);
}

.clause-definition {
  margin: 0;
  padding: 0;
  border: 0;
  color: #5c524d;
  font-size: .79rem;
  line-height: 1.6;
}

.clause-guide {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: #5b514c;
  font-size: .74rem;
}

.clause-guide > strong {
  color: var(--audit-ink);
  font-size: .7rem;
}

.clause-guide > div {
  display: grid;
  gap: 6px;
}

.clause-guide span {
  display: flex;
  gap: 7px;
  line-height: 1.45;
}

.clause-guide i {
  margin-top: 3px;
  color: var(--audit-green);
  font-size: .6rem;
}

.nora-clause-tools {
  align-items: center;
  margin: 0 0 18px;
  padding: 10px;
  border-radius: 10px;
  background: #fbf5e9;
}

.nora-clause-tools > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: #76644d;
  font-size: .68rem;
  font-weight: 800;
}

.nora-clause-tools > span i {
  color: var(--audit-brass);
}

.btn-nora-inline {
  padding: 7px 9px;
  border: 1px solid #dfcfb3;
  border-radius: 8px;
  background: #fff;
  color: #5d4938;
  font: 700 .68rem 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}

.btn-nora-inline.primary {
  border-color: var(--audit-wine);
  background: var(--audit-wine);
  color: #fff8ee;
}

.nora-clause-response {
  border-color: #e4d7c4;
  background: #fbf7f0;
}

.finding-entry-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 13px;
  padding-top: 18px;
  border-top: 1px solid var(--audit-line);
}

.finding-entry-heading > div {
  display: grid;
  gap: 3px;
}

.finding-entry-heading span {
  color: var(--audit-wine);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.finding-entry-heading strong {
  color: var(--audit-ink);
  font-size: .84rem;
}

.finding-entry-heading > small {
  color: var(--audit-muted);
  font-size: .65rem;
}

.finding-grid {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.finding-grid label {
  gap: 6px;
  font-size: .73rem;
}

.finding-grid label > span {
  color: #493f3a;
  font-weight: 800;
}

.finding-grid label > small {
  min-height: 2.4em;
  color: var(--audit-muted);
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.4;
}

.finding-card textarea {
  min-height: 104px;
  line-height: 1.55;
}

.evidence-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--audit-line);
}

.evidence-tools > div {
  display: grid;
  gap: 3px;
}

.evidence-tools strong {
  color: var(--audit-ink);
  font-size: .77rem;
}

.evidence-tools span {
  color: var(--audit-muted);
  font-size: .65rem;
}

.upload-label {
  flex: 0 0 auto;
  border: 1px solid #d8cbb9;
  border-radius: 9px;
  background: #fff;
  color: var(--audit-wine);
  font-size: .7rem;
  font-weight: 800;
}

/* NORA y soporte */
.nora-panel {
  left: auto;
  right: 24px;
  bottom: 94px;
  width: min(460px, calc(100vw - 32px));
  max-height: min(78vh, 790px);
  gap: 14px;
  padding: 0;
  border: 1px solid var(--audit-line);
  border-radius: 22px;
  background: var(--audit-paper);
  color: var(--audit-ink);
  box-shadow: 0 36px 90px rgba(38, 17, 20, .24);
  overflow: hidden;
}

.nora-panel::before {
  display: none;
}

.nora-panel-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--audit-line);
  background: #fff;
}

.nora-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nora-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--audit-wine);
  color: #efc66f;
}

.nora-panel-head h3 {
  color: var(--audit-ink);
  font-size: 1rem;
}

.nora-mode {
  display: block;
  margin: 2px 0 0;
  color: var(--audit-muted);
  font-size: .65rem;
}

.nora-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--audit-line);
  border-radius: 9px;
  background: #fff;
  color: #665b55;
  cursor: pointer;
}

.nora-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f7f1e8;
  color: #5e554f;
  font-size: .7rem;
  line-height: 1.45;
}

.nora-context > i {
  color: var(--audit-brass);
}

.nora-context span {
  display: grid;
}

.nora-context strong {
  color: var(--audit-ink);
}

.nora-context small {
  color: var(--audit-muted);
  font-size: .66rem;
}

.nora-quick-prompts {
  padding: 0 18px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nora-prompt-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-color: var(--audit-line);
  border-radius: 9px;
  background: #fff;
  color: #534943;
  box-shadow: none;
  font-size: .67rem;
}

.nora-prompt-chip i {
  color: var(--audit-wine);
}

.nora-messages {
  min-height: 210px;
  margin: 0 18px;
  padding: 4px 5px 4px 0;
}

.nora-message-bubble {
  max-width: 88%;
  padding: 12px 13px;
  border-color: var(--audit-line);
  border-radius: 14px;
  box-shadow: none;
  font-size: .81rem;
  line-height: 1.65;
}

.nora-message.assistant .nora-message-bubble {
  background: #f6f1ea;
  color: #443b37;
}

.nora-message.user .nora-message-bubble {
  background: var(--audit-wine);
  color: #fff8ef;
}

.nora-form {
  gap: 8px;
  padding: 15px 18px 18px;
  border-top: 1px solid var(--audit-line);
  background: #faf7f2;
}

.nora-form-label {
  color: #554a45;
  font-size: .66rem;
}

.nora-composer {
  padding: 0 0 8px;
  border: 1px solid var(--audit-line-strong);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.nora-composer:focus-within {
  border-color: var(--audit-brass);
  box-shadow: 0 0 0 3px rgba(200, 138, 26, .12);
}

.nora-form textarea {
  min-height: 76px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: .8rem;
}

.nora-form textarea:focus {
  box-shadow: none;
}

.nora-composer span {
  display: block;
  padding: 0 12px;
  color: #948983;
  font-size: .58rem;
}

.nora-form-actions .btn {
  min-height: 42px;
  justify-content: space-between;
  border-radius: 10px;
}

.whatsapp-help {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 978;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid #cfe2d8;
  border-radius: 15px;
  background: #fff;
  color: #275d49;
  box-shadow: 0 16px 38px rgba(28, 55, 45, .15);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-help:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(28, 55, 45, .2);
}

.whatsapp-help > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #207a59;
  color: #fff;
  font-size: 1.05rem;
}

.whatsapp-help span {
  display: grid;
  gap: 2px;
}

.whatsapp-help strong {
  font-size: .72rem;
}

.whatsapp-help small {
  color: #6a7f76;
  font-size: .58rem;
}

.floating-audit-tools {
  display: none;
}

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

@keyframes nextClausePulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(53, 39, 32, .045); }
  35% { box-shadow: 0 0 0 5px rgba(200, 138, 26, .2), 0 18px 44px rgba(53, 39, 32, .1); }
}

@keyframes justUpdatedFlash {
  0% { box-shadow: 0 0 0 0 rgba(37, 117, 90, .001), 0 8px 24px rgba(53, 39, 32, .045); border-left-color: var(--audit-brass); }
  25% { box-shadow: 0 0 0 4px rgba(200, 138, 26, .28), 0 14px 34px rgba(53, 39, 32, .09); }
  100% { box-shadow: 0 8px 24px rgba(53, 39, 32, .045); }
}

.finding-card.just-updated {
  animation: justUpdatedFlash .85s ease;
}

.finding-card.is-readonly {
  background: #fdfbf8;
}

.finding-card.is-readonly .finding-grid,
.finding-card.is-readonly .evidence-tools {
  opacity: .82;
}

.finding-card select:disabled,
.finding-card textarea:disabled {
  background: #f4f0ea;
  color: #8b8078;
  cursor: not-allowed;
}

.is-readonly-disabled {
  opacity: .5 !important;
  cursor: not-allowed !important;
  filter: grayscale(.25);
}

@media (max-width: 1120px) {
  .audit-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .project-panel {
    padding: 20px;
  }

  .iso-detail-module {
    grid-template-columns: 1fr;
  }

  .iso-detail-card:not(.iso-detail-card-onboarding) {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "title"
      "focus"
      "summary"
      "meta";
    row-gap: 10px;
  }

  .iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-focus,
  .iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-summary {
    align-self: start;
  }

  .iso-detail-card:not(.iso-detail-card-onboarding) .iso-detail-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .app {
    padding: 16px;
  }

  .audit-command-bar {
    position: relative;
    top: auto;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .command-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .command-continue {
    grid-column: 2;
    grid-row: 1;
  }

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

  .project-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

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

  .onboarding-preview {
    position: relative;
    top: auto;
  }
}

@media (max-width: 719px) {
  .app {
    padding: calc(76px + env(safe-area-inset-top, 0px)) 10px calc(98px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }

  .panel {
    border-radius: 17px;
  }

  .audit-command-bar {
    min-height: 0;
    padding: 14px;
    border-radius: 15px;
  }

  .command-context strong {
    font-size: .82rem;
  }

  .command-continue {
    min-height: 40px;
    padding-inline: 12px;
    font-size: .68rem;
  }

  .command-progress-ring {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .audit-meta-panel,
  .project-panel,
  .checklist-panel {
    padding: 18px;
  }

  .panel-section-heading {
    display: block;
    margin-bottom: 17px;
  }

  .panel-section-heading > p {
    margin-top: 7px;
    text-align: left;
  }

  .audit-meta-grid,
  .finding-grid,
  .quick-filters {
    grid-template-columns: 1fr;
  }

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

  .sidebar-action-featured {
    grid-column: auto;
  }

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

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

  .metric-icon {
    width: 29px;
    height: 29px;
  }

  .filter-heading {
    align-items: flex-start;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-progress {
    flex: 0 0 auto;
  }

  .findings-list {
    padding: 8px;
  }

  .finding-card {
    padding: 17px;
  }

  .finding-head-tags {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
  }

  .clause-brief-content {
    grid-template-columns: 1fr;
  }

  .nora-clause-tools {
    align-items: stretch;
  }

  .nora-clause-tools > span {
    width: 100%;
  }

  .btn-nora-inline {
    flex: 1 1 140px;
  }

  .finding-entry-heading,
  .evidence-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .evidence-tools {
    display: flex;
  }

  .evidence-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .upload-label {
    width: 100%;
    justify-content: center;
  }

  .link-form {
    width: 100%;
  }

  .link-form input[type='url'] {
    width: auto;
    flex: 1 1 auto;
  }

  .onboarding {
    padding: 14px 12px calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .onboarding-card {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .onboarding-hero-copy {
    align-items: flex-start;
    gap: 14px;
  }

  .hero-logo {
    width: 58px;
  }

  .onboarding-card h1 {
    font-size: clamp(1.7rem, 9vw, 2.35rem);
  }

  .onboarding-steps {
    padding-left: 0;
    overflow-x: auto;
  }

  .onboarding-steps span {
    flex: 0 0 auto;
  }

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

  .iso-option {
    min-height: 205px;
  }

  .nora-toggle {
    left: auto;
    right: 12px;
    bottom: calc(146px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    min-width: 50px;
    height: 50px;
    min-height: 50px;
    padding: 6px;
    border-radius: 14px;
  }

  .nora-toggle > span:last-child {
    display: none;
  }

  .nora-toggle-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .nora-panel {
    left: 10px;
    right: 10px;
    bottom: calc(204px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(70vh, 680px);
  }

  .nora-messages {
    max-height: 29vh;
  }

  .whatsapp-help {
    left: auto;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    min-height: 50px;
    padding: 7px;
    border-radius: 14px;
  }

  .whatsapp-help > i {
    width: 34px;
    height: 34px;
  }

  .whatsapp-help span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iso-option,
  .finding-card {
    animation: none;
  }

  .nora-toggle,
  .whatsapp-help,
  .sidebar-action,
  .sidebar-action-featured,
  .global-progress-fill {
    transition: none;
  }
}

@media (min-width: 1080px) {
  .onboarding {
    place-items: center;
    padding: 32px 40px 40px;
  }

  .onboarding-card {
    width: min(1280px, 90vw);
  }

  .onboarding-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 360px);
  }

  .iso-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 8px;
  }

  .app {
    padding: 24px 22px 34px;
    gap: 20px;
  }

  /* La barra lateral ya queda fija en pantalla (sticky) con Exportar PDF,
     Limpiar proyecto y el % de avance, así que estos flotantes quedan
     redundantes y, en monitores anchos, lejos del panel al que pertenecen. */
  .floating-audit-tools,
  .floating-progress-bubble {
    display: none;
  }

  .audit-meta-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .workspace {
    grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .project-panel {
    position: sticky;
    top: 14px;
    max-height: calc(100vh - 28px);
    overflow: auto;
    padding-right: 12px;
  }

  .section-tabs {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .mobile-bottom-nav {
    display: none;
  }
}

@media (min-width: 1320px) {
  .onboarding-actions .btn {
    min-width: 170px;
  }
}


/* NORA chatbot overrides */
.nora-panel {
  left: 16px;
  right: auto;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  width: min(360px, calc(100vw - 32px));
  max-height: min(68vh, 680px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(208, 136, 18, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 205, 125, 0.16), transparent 26%),
    linear-gradient(165deg, rgba(255, 253, 248, 0.99), rgba(255, 245, 228, 0.97));
  color: #4b1822;
  box-shadow:
    0 36px 80px rgba(25, 4, 9, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
  padding: 18px;
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.nora-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #f0c063, #d98e04, #7e1d2f);
}

.nora-panel-head {
  align-items: center;
}

.nora-panel-head h3 {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  font-weight: 800;
}

.nora-mode {
  display: none;
}

.nora-quick-prompts {
  gap: 8px;
}

.nora-prompt-chip {
  padding: 7px 10px;
  border-color: rgba(126, 29, 47, 0.15);
  background: rgba(255, 246, 232, 0.96);
  box-shadow: 0 8px 18px rgba(57, 12, 20, 0.05);
  font-size: 0.72rem;
}

.nora-messages {
  flex: 1;
  min-height: 180px;
  max-height: none;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  scroll-behavior: smooth;
}

.nora-message {
  max-width: 100%;
}

.nora-message.user {
  align-items: flex-end;
}

.nora-message-role {
  color: #8f6572;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nora-message-role i {
  color: #d98e04;
  font-size: 0.72rem;
}

.nora-message.user .nora-message-role {
  color: #a4677a;
}

.nora-message-bubble {
  max-width: 92%;
  border-radius: 16px;
  padding: 11px 12px;
  line-height: 1.55;
  border: 1px solid rgba(126, 29, 47, 0.09);
  box-shadow: 0 8px 18px rgba(38, 7, 13, 0.05);
  font-size: 0.93rem;
}

.nora-message.user .nora-message-bubble {
  background: linear-gradient(135deg, #7e1d2f, #a42324);
  color: #fff6ec;
  border-color: rgba(255, 223, 171, 0.12);
  border-bottom-right-radius: 8px;
}

.nora-message.assistant .nora-message-bubble {
  background: linear-gradient(180deg, #fffaf2, #fff3de);
  color: #4d2430;
  border-bottom-left-radius: 8px;
}

.nora-form {
  gap: 10px;
  margin-top: auto;
}

.nora-form-label {
  color: #7c3345;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.nora-form textarea {
  min-height: 90px;
  border-radius: 16px;
  border-color: #d9c39e;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 2px rgba(96, 31, 43, 0.06);
}

.nora-form textarea:focus {
  border-color: #d98e04;
  box-shadow: 0 0 0 3px rgba(217, 142, 4, 0.16);
}

.nora-form-actions {
  justify-content: stretch;
}

.nora-form-actions .btn {
  width: 100%;
}

.nora-panel.is-loading .nora-panel-head,
.nora-panel.is-loading .nora-quick-prompts,
.nora-panel.is-loading .nora-form {
  opacity: 0.92;
}

@media (max-width: 719px) {
  .nora-toggle {
    left: auto;
    right: 12px;
    bottom: calc(146px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    min-width: 50px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    justify-content: center;
    padding: 6px;
    border-radius: 14px;
  }

  .nora-toggle > span:last-child {
    display: none;
  }

  .nora-panel {
    left: 12px;
    right: auto;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: min(344px, calc(100vw - 24px));
    max-height: min(66vh, 640px);
    padding: 14px;
  }

  .nora-mode {
    display: none;
  }

  .nora-messages {
    min-height: 0;
    max-height: 30vh;
  }

  .nora-prompt-chip {
    font-size: 0.69rem;
  }

  .nora-form textarea {
    min-height: 82px;
  }
}

/* NORA premium precedence: mantiene el panel nuevo sobre reglas heredadas. */
.nora-panel.nora-panel {
  left: auto;
  right: 24px;
  bottom: 94px;
  width: min(460px, calc(100vw - 32px));
  max-height: min(78vh, 790px);
  gap: 14px;
  padding: 0;
  border: 1px solid var(--audit-line);
  border-radius: 22px;
  background: var(--audit-paper);
  color: var(--audit-ink);
  overflow: hidden;
}

.nora-panel.nora-panel::before {
  display: none;
}

.nora-panel.nora-panel .nora-panel-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--audit-line);
  background: #fff;
}

.nora-panel.nora-panel .nora-mode {
  display: block;
  margin: 2px 0 0;
  color: var(--audit-muted);
  font-size: .65rem;
}

.nora-panel.nora-panel .nora-quick-prompts {
  flex-wrap: nowrap;
  gap: 8px;
  padding: 0 18px;
  overflow-x: auto;
}

.nora-panel.nora-panel .nora-prompt-chip {
  padding: 8px 10px;
  border-color: var(--audit-line);
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
  font-size: .67rem;
}

.nora-panel.nora-panel .nora-messages {
  min-height: 210px;
  max-height: none;
  margin: 0 18px;
  padding: 4px 5px 4px 0;
}

.nora-panel.nora-panel .nora-message-bubble {
  max-width: 88%;
  padding: 12px 13px;
  border-color: var(--audit-line);
  border-radius: 14px;
  box-shadow: none;
  font-size: .81rem;
}

.nora-panel.nora-panel .nora-message.assistant .nora-message-bubble {
  background: #f6f1ea;
  color: #443b37;
}

.nora-panel.nora-panel .nora-form {
  gap: 8px;
  margin-top: auto;
  padding: 15px 18px 18px;
  border-top: 1px solid var(--audit-line);
  background: #faf7f2;
}

.nora-panel.nora-panel .nora-form textarea {
  min-height: 76px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: .8rem;
}

@media (max-width: 719px) {
  .nora-panel.nora-panel {
    left: 10px;
    right: 10px;
    bottom: calc(204px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(70vh, 680px);
    padding: 0;
  }

  .nora-panel.nora-panel .nora-mode {
    display: block;
  }

  .nora-panel.nora-panel .nora-messages {
    min-height: 0;
    max-height: 29vh;
  }
}
