/* @import "tailwindcss" source(none); */
@source "../src";
/* @import "tw-animate-css"; */

@custom-variant dark (&:is(.dark *));

/*
 * Design system definition.
 *
 * The @theme inline block maps CSS custom properties to Tailwind utility
 * classes (e.g. --color-primary -> bg-primary, text-primary).
 *
 * The :root and .dark blocks define the actual color values using oklch.
 * All colors MUST use oklch format.
 *
 * To add a new semantic color:
 * 1. Add the variable to :root (light value) and .dark (dark value)
 * 2. Register it in @theme inline as --color-<name>: var(--<name>)
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
  --font-sans: "DM Sans", sans-serif;
  --font-display: "Manrope", sans-serif;
  --color-hero-foreground: var(--hero-foreground);
  --color-hero-muted: var(--hero-muted);
  --color-ink: var(--ink);
  --color-code: var(--code);
  --color-code-accent: var(--code-accent);
  --color-chart-neutral: var(--chart-neutral);
}

:root {
  --radius: 0.375rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.22 0.008 100);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.129 0.042 264.695);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.129 0.042 264.695);
  --primary: oklch(0.555 0.04 108);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.913 0.01 87);
  --secondary-foreground: oklch(0.22 0.008 100);
  --muted: oklch(0.965 0.005 95);
  --muted-foreground: oklch(0.51 0.012 100);
  --accent: oklch(0.94 0.015 100);
  --accent-foreground: oklch(0.22 0.008 100);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(0.875 0.009 95);
  --input: oklch(0.875 0.009 95);
  --ring: oklch(0.555 0.04 108);
  --hero-foreground: oklch(1 0 0);
  --hero-muted: oklch(0.913 0.01 87);
  --ink: oklch(0.17 0.006 100);
  --code: oklch(0.22 0.008 100);
  --code-accent: oklch(0.82 0.06 108);
  --chart-neutral: oklch(0.70 0.013 95);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.984 0.003 247.858);
  --sidebar-foreground: oklch(0.129 0.042 264.695);
  --sidebar-primary: oklch(0.208 0.042 265.755);
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
  --sidebar-accent: oklch(0.968 0.007 247.896);
  --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
  --sidebar-border: oklch(0.929 0.013 255.508);
  --sidebar-ring: oklch(0.704 0.04 256.788);
}

.dark {
  --background: oklch(0.129 0.042 264.695);
  --foreground: oklch(0.984 0.003 247.858);
  --card: oklch(0.208 0.042 265.755);
  --card-foreground: oklch(0.984 0.003 247.858);
  --popover: oklch(0.208 0.042 265.755);
  --popover-foreground: oklch(0.984 0.003 247.858);
  --primary: oklch(0.929 0.013 255.508);
  --primary-foreground: oklch(0.208 0.042 265.755);
  --secondary: oklch(0.279 0.041 260.031);
  --secondary-foreground: oklch(0.984 0.003 247.858);
  --muted: oklch(0.279 0.041 260.031);
  --muted-foreground: oklch(0.704 0.04 256.788);
  --accent: oklch(0.279 0.041 260.031);
  --accent-foreground: oklch(0.984 0.003 247.858);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.551 0.027 264.364);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.208 0.042 265.755);
  --sidebar-foreground: oklch(0.984 0.003 247.858);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
  --sidebar-accent: oklch(0.279 0.041 260.031);
  --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.551 0.027 264.364);
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-sans);
  }
}

:root { --primary: oklch(from #75755a l c h); --secondary: oklch(from #e5e2db l c h); --hero-muted: oklch(from #e5e2db l c h); }
html { scroll-behavior: smooth; }
* { letter-spacing: 0; }
h1,h2,h3,.brand { font-family: var(--font-display); }
button,a,input,select { -webkit-tap-highlight-color: transparent; }
.site-header { max-width: 1440px; margin: auto; padding: 27px 5.5%; display:flex; align-items:center; justify-content:space-between; gap:20px; position:relative; z-index:2; }
.site-header-inverse { color:var(--hero-foreground); }
.brand { display:inline-flex; align-items:center; gap:7px; font-size:37px; font-weight:700; line-height:1; }
.brand svg { width:36px; height:36px; }
.brand-dot { color:inherit; }
.site-header-inverse .nav-platform { color:var(--hero-muted); }
.eyebrow { font-size:14px; font-weight:600; line-height:1.6; }
.landing-hero { min-height:690px; height: min(820px, 90svh); position:relative; overflow:hidden; background:var(--primary); color:var(--hero-foreground); }
.hero-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; }
.hero-shade { position:absolute; inset:0; background:linear-gradient(90deg,color-mix(in oklch,var(--primary) 98%,transparent) 0%,color-mix(in oklch,var(--primary) 85%,transparent) 26%,transparent 66%); }
.hero-content { position:relative; margin:63px auto 0; padding:0 5.5%; max-width:1440px; }
.tiny-cross { margin-right:8px; font-size:20px; }
.hero-content h1 { font-size:64px; font-weight:500; line-height:1.14; margin:22px 0; max-width:640px; }
.hero-content h1 span { color:var(--hero-muted); }
.hero-description { max-width:385px; font-size:19px; line-height:1.8; color:var(--hero-muted); }
.hero-cta { height:49px; border-radius:2px; padding:0 21px; margin-top:27px; font-size:16px; background:var(--hero-foreground); }
.hero-note { font-size:14px; color:var(--hero-muted); margin-top:16px; }
.binary-caption { position:absolute; right:7%; bottom:135px; font-family:monospace; line-height:1.9; font-size:16px; color:var(--hero-foreground); }
.binary-caption span { font-family:var(--font-sans); font-size:12px; }
.hero-bottom { position:absolute; bottom:28px; left:5.5%; right:5.5%; display:flex; align-items:end; justify-content:space-between; border-top:1px solid color-mix(in oklch,var(--hero-foreground) 28%,transparent); padding-top:22px; font-size:14px; line-height:1.7; }
.scroll-link { display:flex; align-items:center; gap:18px; font-size:12px; }
.hero-index { font-family:monospace; }
.principles-band { min-height:90px; padding:22px 5.5%; border-bottom:1px solid var(--border); display:flex; gap:30px; justify-content:space-between; align-items:center; }
.principles-band>span { font-size:13px; color:var(--muted-foreground); }
.principles-band>div { display:flex; gap:12px; align-items:center; font-size:16px; }
.principles-band svg { color:var(--primary); width:21px; }
.journey { max-width:1240px; margin:0 auto; padding:0 6%; }
.journey-heading { text-align:center; padding:85px 0 45px; }
.journey-heading .eyebrow { color:var(--primary); }
.journey-heading h2 { font-weight:500; font-size:40px; margin:16px 0 12px; }
.journey-heading>p:last-child { font-size:18px; color:var(--muted-foreground); }
.journey-nav { display:flex; justify-content:space-between; border-bottom:1px solid var(--border); background:var(--background); position:sticky; top:0; z-index:3; padding-top:16px; }
.journey-nav a { font-size:16px; color:var(--muted-foreground); padding:16px 8px; border-bottom:2px solid transparent; }
.journey-nav a span { font-family:monospace; font-size:13px; margin-right:9px; }
.journey-nav a.stage-active { border-color:var(--primary); color:var(--primary); }
.evolution-row { display:grid; grid-template-columns:1fr 1fr; gap:85px; align-items:center; min-height:490px; padding:65px 0; border-bottom:1px solid var(--border); scroll-margin-top:80px; }
.evolution-copy .eyebrow { color:var(--primary); }
.evolution-copy h2 { font-size:40px; font-weight:500; line-height:1.25; margin:20px 0; }
.evolution-copy>p:not(.eyebrow) { font-size:18px; color:var(--muted-foreground); line-height:1.9; max-width:380px; }
.chapter-note { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--primary); margin-top:25px; }
.chapter-note svg { width:16px; height:16px; flex-shrink:0; }
.binary-art { color:var(--primary); font-family:monospace; font-size:29px; line-height:1.7; overflow:hidden; padding:32px 0; }
.binary-art p:nth-child(2),.binary-art p:nth-child(4) { opacity:.45; }
.binary-art p:nth-child(1),.binary-art p:nth-child(5) { opacity:.2; }
.binary-art>span { display:block; font-size:12px; text-align:center; margin-top:22px; font-family:var(--font-sans); }
.memory-art { background:var(--muted); border:1px solid var(--border); padding:22px; border-radius:4px; font-family:monospace; }
.art-caption { display:flex; align-items:center; gap:10px; font-size:12px; padding-bottom:20px; margin-bottom:14px; border-bottom:1px solid var(--border); }
.art-caption>span:last-child { margin-left:auto; font-size:11px; }
.memory-art>p { font-size:16px; line-height:2.8; white-space:pre; }
.memory-art>p span { color:var(--primary); padding-right:12px; }
.memory-label { border-top:1px solid var(--border); margin-top:15px; padding-top:14px; font-size:13px; color:var(--muted-foreground); }
.code-art { border-radius:4px; background:var(--code); color:var(--hero-muted); padding:22px; font-family:monospace; }
.code-art .art-caption { border-color:color-mix(in oklch,var(--hero-muted) 20%,transparent); }
.code-art pre { font-size:16px; line-height:1.9; overflow:auto; }
.code-accent { color:var(--code-accent); }
.code-muted { color:var(--chart-neutral); }
.code-bottom { display:flex; gap:7px; align-items:center; font-size:13px; margin-top:25px; color:var(--code-accent); }
.platform-section { gap:50px; }
.platform-window { border:1px solid var(--border); background:var(--background); border-radius:5px; box-shadow:0 15px 50px color-mix(in oklch,var(--ink) 7%,transparent); overflow:hidden; font-size:13px; }
.window-top { display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--muted); padding:13px; border-bottom:1px solid var(--border); font-size:12px; color:var(--muted-foreground); }
.window-top i { width:5px; height:5px; border-radius:50%; background:var(--chart-neutral); }
.platform-inner { display:grid; grid-template-columns:29% 71%; min-height:240px; }
.platform-inner aside { background:var(--muted); padding:22px 10px; border-right:1px solid var(--border); }
.platform-inner aside strong { display:block; margin-bottom:18px; }
.platform-inner aside span { display:flex; align-items:center; gap:5px; font-size:11px; margin-top:15px; }
.platform-inner aside svg { width:11px; height:11px; color:var(--primary); }
.platform-documents { padding:20px 14px; }
.platform-documents>p { margin-bottom:15px; font-size:12px; }
.platform-documents>p>span { font-size:10px; color:var(--muted-foreground); }
.document-row { display:flex; align-items:center; gap:10px; border-top:1px solid var(--border); padding:15px 0; }
.document-row>svg { width:15px; color:var(--primary); flex-shrink:0; }
.document-row>svg:last-child { margin-left:auto; width:12px; }
.document-row strong { font-weight:500; font-size:12px; }
.document-row small { display:block; font-size:10px; color:var(--muted-foreground); margin-top:4px; }
.window-bottom { border-top:1px solid var(--border); padding:11px; display:flex; gap:6px; align-items:center; font-size:11px; color:var(--muted-foreground); }
.status-dot { width:5px; height:5px; flex-shrink:0; border-radius:50%; background:var(--primary); display:inline-block; }
.trust-section { background:var(--secondary); display:grid; grid-template-columns:1fr 1fr; align-items:center; padding:65px max(6%,calc((100% - 1100px)/2)); gap:75px; }
.trust-image img { mix-blend-mode:multiply; width:100%; height:auto; max-height:460px; object-fit:contain; }
.trust-copy .eyebrow { color:var(--primary); margin-bottom:25px; }
.trust-copy h2 { font-weight:500; line-height:1.5; font-size:31px; }
.trust-copy>p:last-child { font-size:16px; color:var(--muted-foreground); margin-top:25px; line-height:1.8; }
.diagnostic-cta { text-align:center; padding:95px 20px; }
.diagnostic-cta .eyebrow { color:var(--primary); }
.diagnostic-cta h2 { font-weight:500; font-size:49px; line-height:1.2; margin:22px 0; }
.diagnostic-cta>p:not(.eyebrow) { font-size:18px; color:var(--muted-foreground); margin-bottom:25px; }
.diagnostic-cta>span { display:block; font-size:14px; margin-top:17px; color:var(--muted-foreground); }
.site-footer { display:flex; align-items:center; justify-content:space-between; gap:25px; padding:30px 5.5%; border-top:1px solid var(--border); }
.site-footer .brand { font-size:29px; }
.site-footer .brand svg { width:25px; height:25px; }
.site-footer>p,.site-footer>span { font-size:14px; color:var(--muted-foreground); }
.form-page,.question-page { min-height:100svh; display:flex; flex-direction:column; }
.form-page .site-header,.question-page .site-header { width:100%; border-bottom:1px solid var(--border); }
.diagnostic-layout { width:100%; max-width:1280px; margin:0 auto; padding:65px 5.5% 85px; display:grid; grid-template-columns:35% 65%; gap:0; flex:1; }
.diagnostic-intro { padding:10px 55px 0 0; }
.diagnostic-intro .eyebrow { color:var(--primary); font-size:13px; }
.step-line { display:flex; align-items:center; gap:12px; margin:30px 0; color:var(--chart-neutral); font-family:monospace; font-size:15px; }
.step-line i { width:65px; height:1px; background:var(--border); }
.step-line .current { color:var(--primary); }
.diagnostic-intro h1 { font-size:43px; font-weight:500; line-height:1.3; }
.diagnostic-intro>p:not(.eyebrow) { color:var(--muted-foreground); font-size:17px; line-height:1.9; margin-top:25px; }
.intro-benefits { display:flex; flex-direction:column; gap:20px; padding-top:35px; }
.intro-benefits>span { display:flex; gap:10px; align-items:center; font-size:14px; }
.intro-benefits svg { color:var(--primary); width:17px; flex-shrink:0; }
.diagnostic-intro p.draft-note { font-size:14px; padding-top:25px; border-top:1px solid var(--border); margin-top:40px; }
.company-form-section { padding-left:50px; border-left:1px solid var(--border); }
.company-form-section>.eyebrow { color:var(--primary); font-size:13px; }
.company-form-section h2 { font-size:32px; font-weight:500; margin-top:13px; }
.form-subtitle { margin:10px 0 30px; color:var(--muted-foreground); font-size:15px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:23px 20px; }
.form-field { display:flex; flex-direction:column; gap:8px; font-size:15px; }
.form-field>span { font-weight:500; }
.form-field i { font-style:normal; color:var(--primary); }
.form-field input,.form-field select { border:1px solid var(--input); border-radius:3px; height:44px; padding:0 12px; background:var(--background); width:100%; min-width:0; outline:none; font-size:16px; }
.form-field input:focus,.form-field select:focus { border-color:var(--primary); box-shadow:0 0 0 2px color-mix(in oklch,var(--primary) 12%,transparent); }
.form-field input::placeholder { color:var(--muted-foreground); }
.consents { margin-top:34px; padding-top:25px; border-top:1px solid var(--border); }
.consents h3 { font-size:19px; font-weight:600; }
.consent-draft { font-size:14px; color:var(--muted-foreground); line-height:1.7; margin-top:7px; }
.consent-row { display:flex; gap:14px; align-items:flex-start; margin-top:24px; cursor:pointer; }
.consent-row>button { margin-top:3px; }
.consent-row strong { font-size:15px; font-weight:600; }
.consent-row strong span { font-weight:400; font-size:13px; color:var(--muted-foreground); margin-left:8px; }
.consent-row p { font-size:14px; line-height:1.9; color:var(--muted-foreground); margin-top:7px; }
.form-actions { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:30px; }
.form-actions>span { display:flex; gap:7px; align-items:center; color:var(--muted-foreground); font-size:13px; }
.form-actions>button { font-size:15px; }
.question-layout { width:100%; max-width:1280px; margin:auto; padding:55px 5.5% 70px; flex:1; }
.question-top { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.question-top .eyebrow { color:var(--primary); font-size:13px; }
.question-top h1 { font-size:36px; font-weight:500; margin:14px 0; }
.question-top p:last-child { font-size:15px; color:var(--muted-foreground); }
.question-top p>span { margin:0 10px; }
.question-counter { font-family:monospace; font-size:15px; color:var(--primary); }
.question-progress { height:3px; background:var(--secondary); width:100%; margin:30px 0 50px; overflow:hidden; }
.progress-fill { height:100%; background:var(--primary); transition:width .5s ease; }
.question-body { display:grid; grid-template-columns:60% 40%; }
.question-content { padding-right:70px; }
.question-meta { display:flex; justify-content:space-between; color:var(--primary); font-size:13px; }
.question-meta>span:last-child { background:var(--muted); padding:5px 10px; }
.question-content h2 { font-size:31px; font-weight:500; line-height:1.5; margin:20px 0 28px; min-height:120px; }
.answer-list { display:flex; flex-direction:column; gap:12px; }
.answer-option { min-height:79px; height:auto; justify-content:flex-start; gap:16px; text-align:left; box-shadow:none; padding:16px 20px; border-radius:4px; white-space:normal; }
.answer-radio { display:grid; place-items:center; border:1px solid var(--input); width:18px; height:18px; border-radius:50%; flex-shrink:0; }
.answer-option strong { display:block; font-size:16px; font-weight:500; }
.answer-option small { display:block; font-size:14px; color:var(--muted-foreground); margin-top:6px; line-height:1.6; }
.answer-selected { background:var(--accent); border-color:var(--primary); }
.answer-selected .answer-radio { border-color:var(--primary); background:var(--primary); color:var(--primary-foreground); }
.question-actions { display:flex; align-items:center; justify-content:space-between; margin-top:28px; gap:12px; }
.question-actions>button { font-size:15px; }
.question-dots { display:flex; gap:7px; flex-wrap:wrap; border-top:1px solid var(--border); margin-top:30px; padding-top:22px; }
.question-dots button { font-family:monospace; font-size:13px; width:29px; height:29px; color:var(--chart-neutral); border-radius:2px; }
.question-dots .dot-answered { color:var(--primary); background:var(--accent); }
.question-dots .dot-current { border:1px solid var(--primary); color:var(--primary); }
.score-panel { background:var(--muted); border-radius:4px; padding:28px; align-self:start; }
.score-title { display:flex; gap:10px; align-items:center; color:var(--primary); font-size:13px; }
.score-panel h3 { font-size:26px; font-weight:500; margin-top:20px; line-height:1.4; }
.score-chart { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:35px; }
.score-column { display:flex; flex-direction:column; align-items:center; }
.score-column>strong { font-family:var(--font-display); font-size:27px; font-weight:500; margin-bottom:12px; }
.score-column>strong small { font-size:14px; padding-left:2px; }
.bar-track { height:190px; width:52px; max-width:100%; background:var(--secondary); display:flex; align-items:flex-end; overflow:hidden; }
.score-bar { width:100%; transition:height .65s cubic-bezier(.2,.7,.2,1); }
.score-tone-0 { background:var(--primary); }
.score-tone-1 { background:var(--ink); }
.score-tone-2 { background:var(--chart-neutral); }
.score-column>span { font-size:13px; margin-top:13px; }
.score-legend { display:flex; gap:8px; align-items:center; border-top:1px solid var(--border); padding-top:20px; margin-top:25px; font-size:14px; }
.score-disclaimer { margin-top:20px; color:var(--muted-foreground); font-size:14px; line-height:1.8; }
.missing-session { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:24px; padding:80px 20px; text-align:center; }
.missing-session svg { color:var(--primary); }
.missing-session h1 { font-size:36px; }
.missing-session p { font-size:18px; color:var(--muted-foreground); }
.completion>svg { color:var(--primary); margin-bottom:22px; }
.completion>.eyebrow { color:var(--primary); }
.completion h2 { min-height:0; font-size:38px; }
.completion>p:not(.eyebrow) { font-size:18px; line-height:1.9; color:var(--muted-foreground); margin-bottom:30px; }
@media(min-width:1500px) { .hero-content { margin-top:80px; } .hero-content h1 { font-size:72px; } }
@media(max-width:1000px) { .hero-content h1 { font-size:54px; } .evolution-row { gap:35px; } .trust-section { gap:30px; } .diagnostic-intro { padding-right:25px; } .diagnostic-intro h1 { font-size:36px; } .company-form-section { padding-left:30px; } .question-content { padding-right:30px; } .score-panel { padding:20px; } .score-chart { gap:10px; } .form-actions { flex-wrap:wrap; } .principles-band { gap:15px; } }
@media(max-width:700px) { .site-header { padding:23px 6%; gap:10px; } .site-header .brand { font-size:31px; } .site-header .brand svg { width:29px; } .site-header nav { gap:8px; } .site-header nav>.nav-platform { display:none; } .site-header nav>a { padding:0 12px; height:36px; font-size:14px; } .landing-hero { min-height:720px; height:88svh; max-height:800px; } .hero-image { object-position:63% center; opacity:.65; } .hero-shade { background:linear-gradient(90deg,color-mix(in oklch,var(--primary) 90%,transparent),color-mix(in oklch,var(--primary) 35%,transparent)); } .hero-content { margin-top:55px; padding:0 6%; } .hero-content h1 { font-size:46px; max-width:350px; } .hero-description { font-size:17px; max-width:300px; } .hero-cta { font-size:14px; padding:0 14px; max-width:100%; white-space:normal; } .hero-note { max-width:270px; font-size:13px; line-height:1.8; } .binary-caption { right:7%; bottom:115px; font-size:14px; } .hero-bottom { left:6%; right:6%; } .hero-bottom>span:first-child { font-size:13px; } .scroll-link span { display:none; } .principles-band { flex-wrap:wrap; justify-content:flex-start; padding:22px 6%; gap:18px 24px; } .principles-band>span { width:100%; font-size:12px; } .principles-band>div { font-size:13px; gap:8px; } .principles-band svg { width:17px; } .journey { padding:0 6%; } .journey-heading { padding:65px 0 30px; } .journey-heading h2 { font-size:32px; } .journey-heading>p:last-child { font-size:16px; } .journey-nav { overflow:auto; gap:14px; } .journey-nav a { white-space:nowrap; font-size:14px; padding:12px 0; } .journey-nav a span { display:none; } .evolution-row { grid-template-columns:1fr; gap:35px; padding:50px 0; } .evolution-copy h2 { font-size:34px; } .evolution-copy>p:not(.eyebrow) { font-size:17px; } .binary-art { font-size:26px; text-align:center; padding:10px 0; } .evolution-row:nth-of-type(2) .memory-art { order:2; } .memory-art>p { font-size:15px; } .trust-section { grid-template-columns:1fr; padding:45px 6% 55px; gap:20px; } .trust-image img { max-height:310px; } .trust-copy h2 { font-size:29px; } .diagnostic-cta { padding:65px 6%; } .diagnostic-cta h2 { font-size:39px; } .diagnostic-cta>a { font-size:14px; padding:15px; white-space:normal; line-height:1.8; } .site-footer { align-items:flex-start; flex-wrap:wrap; padding:25px 6%; gap:18px; } .site-footer>p { order:3; width:100%; font-size:13px; } .diagnostic-layout { grid-template-columns:1fr; padding:30px 6% 45px; } .diagnostic-intro { padding:0; } .diagnostic-intro h1 { font-size:37px; } .diagnostic-intro h1 br { display:none; } .diagnostic-intro>p:not(.eyebrow) { margin-top:16px; } .step-line { margin:18px 0; } .intro-benefits { display:none; } .diagnostic-intro p.draft-note { border:0; padding-top:0; margin-top:15px; } .company-form-section { border:0; border-top:1px solid var(--border); padding:30px 0 0; margin-top:25px; } .form-grid { grid-template-columns:1fr; gap:20px; } .consent-row { gap:12px; } .consent-row p { font-size:15px; } .form-actions>button { width:100%; } .question-layout { padding:30px 6% 45px; } .question-top { align-items:flex-start; flex-direction:column; gap:14px; } .question-top h1 { font-size:31px; } .question-progress { margin:22px 0 28px; } .question-body { grid-template-columns:1fr; gap:35px; } .question-content { padding:0; } .question-content h2 { font-size:27px; min-height:110px; margin-top:16px; } .answer-option { min-height:80px; padding:15px; } .question-actions>button { padding:0 12px; font-size:14px; } .question-dots { gap:4px; } .score-panel { padding:25px; } .score-chart { gap:20px; } .score-panel h3 { font-size:25px; } .bar-track { height:160px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none !important; animation:none !important; } }

.score-height-0 { height:0%; }
.score-height-1 { height:1%; }
.score-height-2 { height:2%; }
.score-height-3 { height:3%; }
.score-height-4 { height:4%; }
.score-height-5 { height:5%; }
.score-height-6 { height:6%; }
.score-height-7 { height:7%; }
.score-height-8 { height:8%; }
.score-height-9 { height:9%; }
.score-height-10 { height:10%; }
.score-height-11 { height:11%; }
.score-height-12 { height:12%; }
.score-height-13 { height:13%; }
.score-height-14 { height:14%; }
.score-height-15 { height:15%; }
.score-height-16 { height:16%; }
.score-height-17 { height:17%; }
.score-height-18 { height:18%; }
.score-height-19 { height:19%; }
.score-height-20 { height:20%; }
.score-height-21 { height:21%; }
.score-height-22 { height:22%; }
.score-height-23 { height:23%; }
.score-height-24 { height:24%; }
.score-height-25 { height:25%; }
.score-height-26 { height:26%; }
.score-height-27 { height:27%; }
.score-height-28 { height:28%; }
.score-height-29 { height:29%; }
.score-height-30 { height:30%; }
.score-height-31 { height:31%; }
.score-height-32 { height:32%; }
.score-height-33 { height:33%; }
.score-height-34 { height:34%; }
.score-height-35 { height:35%; }
.score-height-36 { height:36%; }
.score-height-37 { height:37%; }
.score-height-38 { height:38%; }
.score-height-39 { height:39%; }
.score-height-40 { height:40%; }
.score-height-41 { height:41%; }
.score-height-42 { height:42%; }
.score-height-43 { height:43%; }
.score-height-44 { height:44%; }
.score-height-45 { height:45%; }
.score-height-46 { height:46%; }
.score-height-47 { height:47%; }
.score-height-48 { height:48%; }
.score-height-49 { height:49%; }
.score-height-50 { height:50%; }
.score-height-51 { height:51%; }
.score-height-52 { height:52%; }
.score-height-53 { height:53%; }
.score-height-54 { height:54%; }
.score-height-55 { height:55%; }
.score-height-56 { height:56%; }
.score-height-57 { height:57%; }
.score-height-58 { height:58%; }
.score-height-59 { height:59%; }
.score-height-60 { height:60%; }
.score-height-61 { height:61%; }
.score-height-62 { height:62%; }
.score-height-63 { height:63%; }
.score-height-64 { height:64%; }
.score-height-65 { height:65%; }
.score-height-66 { height:66%; }
.score-height-67 { height:67%; }
.score-height-68 { height:68%; }
.score-height-69 { height:69%; }
.score-height-70 { height:70%; }
.score-height-71 { height:71%; }
.score-height-72 { height:72%; }
.score-height-73 { height:73%; }
.score-height-74 { height:74%; }
.score-height-75 { height:75%; }
.score-height-76 { height:76%; }
.score-height-77 { height:77%; }
.score-height-78 { height:78%; }
.score-height-79 { height:79%; }
.score-height-80 { height:80%; }
.score-height-81 { height:81%; }
.score-height-82 { height:82%; }
.score-height-83 { height:83%; }
.score-height-84 { height:84%; }
.score-height-85 { height:85%; }
.score-height-86 { height:86%; }
.score-height-87 { height:87%; }
.score-height-88 { height:88%; }
.score-height-89 { height:89%; }
.score-height-90 { height:90%; }
.score-height-91 { height:91%; }
.score-height-92 { height:92%; }
.score-height-93 { height:93%; }
.score-height-94 { height:94%; }
.score-height-95 { height:95%; }
.score-height-96 { height:96%; }
.score-height-97 { height:97%; }
.score-height-98 { height:98%; }
.score-height-99 { height:99%; }
.score-height-100 { height:100%; }
.progress-0 { width:0%; }
.progress-1 { width:10%; }
.progress-2 { width:20%; }
.progress-3 { width:30%; }
.progress-4 { width:40%; }
.progress-5 { width:50%; }
.progress-6 { width:60%; }
.progress-7 { width:70%; }
.progress-8 { width:80%; }
.progress-9 { width:90%; }
.progress-10 { width:100%; }


/* ═══════════════════════════════════════════════════
   RESET mínimo (equivalente al preflight de Tailwind)
   ═══════════════════════════════════════════════════ */
   a {
    color: inherit;
    text-decoration: none;
  }
  
  /* Botones con clase .btn (no existían en el CSS) */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border-radius: 3px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .15s ease;
  }
  .btn:hover { background: color-mix(in oklch, var(--primary) 88%, black); }
  .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  
  /* CTA del hero: fondo blanco sobre fondo verde → texto verde para contraste */
  .hero-cta { color: var(--primary); }
/* ============================================================
   Landing (2 secciones) · ajustes de estética
   ============================================================ */

/* Botón "Iniciar sesión" sobre el hero (inverse) */
/* Botón "Iniciar sesión" sobre la foto del hero: sin fondo, solo
   vidrio difuminado (backdrop-filter) y borde sutil para que se distinga. */
.btn-ghost {
  background: color-mix(in oklch, var(--hero-foreground) 8%, transparent);
  color: var(--hero-foreground);
  border-color: color-mix(in oklch, var(--hero-foreground) 70%, transparent);
  font-weight: bold;
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--hero-foreground) 22%, transparent),
              0 2px 10px rgba(0, 0, 0, 0.12);
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: color-mix(in oklch, var(--hero-foreground) 18%, transparent);
  border-color: color-mix(in oklch, var(--hero-foreground) 90%, transparent);
  color: var(--hero-foreground);
}
/* Si el navegador no soporta backdrop-filter, se mantiene legible con el borde */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn-ghost {
    background: color-mix(in oklch, var(--hero-foreground) 14%, transparent);
  }
}

/* CTA final del diagnóstico */
.diagnostic-cta h2 {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.diagnostic-cta .cta-meta {
  font-size: 16px;
  color: var(--muted-foreground);
  margin: 6px 0 28px;
}

/* Pie de la landing: solo la nota institucional */
.site-footer--landing {
  justify-content: center;
  text-align: center;
}
.site-footer--landing p {
  max-width: 780px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted-foreground);
}

/* Móvil: el CTA grande ya está en el hero; el nav deja solo "Iniciar sesión" */
@media (max-width: 700px) {
  .hero-nav-cta { display: none; }
  .btn-ghost { white-space: nowrap; }
  .hero-content h1 br { display: none; }
}


/* ============================================================================
   ÁREA DE USUARIO (login y panel) · mismo lenguaje que landing/diagnóstico
   ============================================================================ */
.site-header nav > .nav-salir { display: inline-flex; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-brand {
  background: var(--primary);
  color: var(--hero-foreground);
  padding: clamp(36px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.login-brand .brand { color: var(--hero-foreground); }
.login-brand h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  margin: 26px 0 18px;
  max-width: 460px;
}
.login-brand p {
  color: var(--hero-muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 420px;
}
.login-brand .login-brand-note {
  font-size: 10px;
  color: var(--hero-muted);
}
.login-form-side {
  display: grid;
  place-items: center;
  padding: 40px 5.5%;
  background: var(--background);
}
.login-card {
  width: min(100%, 420px);
}
.login-card .eyebrow { color: var(--primary); }
.login-card h2 {
  font-size: 30px;
  font-weight: 500;
  margin: 12px 0 8px;
}
.login-card .login-sub {
  color: var(--muted-foreground);
  font-size: 13px;
  margin: 0 0 26px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.login-field label {
  font-size: 12px;
  font-weight: 500;
}
.login-field input {
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  outline: none;
  width: 100%;
}
.login-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.login-card .btn { width: 100%; min-height: 46px; margin-top: 8px; }
.login-error {
  border: 1px solid color-mix(in oklch, var(--destructive) 35%, transparent);
  background: color-mix(in oklch, var(--destructive) 8%, white);
  color: var(--destructive);
  border-radius: 6px;
  padding: 10px 13px;
  font-size: 12px;
  margin: 0 0 16px;
}
.login-back {
  margin-top: 22px;
  font-size: 11px;
  color: var(--muted-foreground);
  text-align: center;
}
.login-back a { color: var(--primary); text-decoration: underline; }

@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 34px 6%; }
  .login-brand h1 { font-size: 30px; margin: 16px 0 10px; }
  .login-brand .login-brand-note { display: none; }
  .login-form-side { padding: 34px 6% 48px; }
}

/* ---------- Panel de usuario ---------- */
.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 5.5% 72px;
}
.app-shell h1 {
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  margin: 12px 0 8px;
}
.app-sub {
  color: var(--muted-foreground);
  font-size: 13px;
  margin: 0 0 4px;
}
.app-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted-foreground);
  background: var(--muted);
}
.app-section-title {
  margin: 36px 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.app-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.app-card h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
}
.app-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.app-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--primary);
}
.app-icon svg { width: 19px; height: 19px; }
.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.btn--sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 12px;
}
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}
.btn--ghost:hover { background: var(--muted); }

/* ---------- Barra secundaria de secciones ---------- */
.app-subnav {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 5.5%;
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}
.app-subnav a {
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  text-decoration: none;
}
.app-subnav a:hover { color: var(--foreground); }
.app-subnav a.active {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- Panel de usuario (en construcción) ---------- */
.panel-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.panel-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted-foreground);
}
.panel-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--secondary);
  overflow: hidden;
}
.panel-track > span {
  display: block;
  height: 100%;
  background: var(--primary);
}
.panel-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted-foreground);
}

/* ---------- Perfil ---------- */
.app-ok {
  margin: 18px 0 0;
  padding: 10px 13px;
  border: 1px solid color-mix(in oklch, var(--primary) 35%, transparent);
  border-radius: 6px;
  background: color-mix(in oklch, var(--primary) 10%, white);
  color: var(--foreground);
  font-size: 12px;
}
.app-error {
  margin: 12px 0;
  padding: 10px 13px;
  border: 1px solid color-mix(in oklch, var(--destructive) 35%, transparent);
  border-radius: 6px;
  background: color-mix(in oklch, var(--destructive) 8%, white);
  color: var(--destructive);
  font-size: 12px;
}
.app-error--inline {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 11px;
}
.profile-card {
  margin-top: 26px;
  max-width: 900px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.profile-meta span { color: var(--muted-foreground); }
.profile-meta strong { font-weight: 500; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 40px;
}
/* 👇 LA SOLUCIÓN: Obliga a los inputs a calcular su ancho incluyendo el padding y el borde */
.profile-grid input,
.profile-grid textarea,
.profile-grid select {
  box-sizing: border-box;
}
.profile-grid .login-field { margin-bottom: 0; }
.profile-grid .login-field.full { grid-column: 1 / -1; }
.login-field textarea {
  width: 100%;
  min-height: 110px;
  padding: 11px 13px;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}
.login-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
  .app-subnav { gap: 18px; }
}

/* ============================================================================
   RNBD · mismo lenguaje visual que el resto del área de usuario
   ============================================================================ */
.rnbd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 16px;
}
.rnbd-search {
  display: flex;
  gap: 10px;
  flex: 1 1 320px;
  min-width: 0;
}
.rnbd-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  outline: none;
}
.rnbd-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}

.rnbd-tabla {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}
.rnbd-fila {
  display: grid;
  grid-template-columns:
    minmax(110px, 0.7fr)
    minmax(170px, 1.2fr)
    minmax(180px, 1.4fr)
    minmax(120px, 0.8fr)
    minmax(120px, 0.8fr)
    minmax(130px, 0.6fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.rnbd-fila:last-child { border-bottom: 0; }
.rnbd-cabecera {
  background: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.rnbd-fila:not(.rnbd-cabecera):hover { background: var(--muted); }
.rnbd-fecha {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.rnbd-activo { font-weight: 600; color: var(--foreground); text-decoration: none; }
.rnbd-activo:hover { color: var(--primary); text-decoration: underline; }
.rnbd-desc { color: var(--muted-foreground); }
.rnbd-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
  font-family: monospace;
  font-size: 11px;
  white-space: nowrap;
}
.rnbd-acciones { display: flex; gap: 6px; justify-content: flex-end; }
.rnbd-vacio {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
}
.rnbd-paginacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.rnbd-paginacion a,
.rnbd-paginacion span.pagina {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  text-decoration: none;
}
.rnbd-paginacion span.actual {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Tarjeta base para detalle y formulario RNBD */
.rnbd-card {
  margin-top: 26px;
  max-width: 860px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.rnbd-campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}
.rnbd-campos .full { grid-column: 1 / -1; }
.rnbd-dl dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.rnbd-dl dd {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
}
.rnbd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.rnbd-actions .spacer { flex: 1 1 auto; }
.btn--danger {
  background: var(--destructive);
  border-color: var(--destructive);
  color: var(--destructive-foreground);
}
.btn--danger:hover {
  background: color-mix(in oklch, var(--destructive) 88%, black);
  border-color: color-mix(in oklch, var(--destructive) 88%, black);
}

@media (max-width: 900px) {
  .rnbd-cabecera { display: none; }
  .rnbd-fila {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 18px;
  }
  .rnbd-fila > span::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    margin-bottom: 2px;
  }
  .rnbd-acciones { justify-content: flex-start; }
  .rnbd-campos { grid-template-columns: 1fr; }
}

/* ---------- Perfil: campos con mejor proporción ---------- */
.profile-card { max-width: 980px; padding: 26px; }
.profile-grid { gap: 20px 24px; }
.profile-grid .login-field label { margin-bottom: 2px; }
.profile-grid .full .login-field,
.profile-grid .login-field.full { grid-column: 1 / -1; }
.profile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
}
.profile-meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-meta span {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.profile-meta strong { font-size: 13px; word-break: break-word; }
@media (max-width: 760px) {
  .profile-meta { grid-template-columns: 1fr; }
}

/* Widgets del formulario RNBD (antes dependían de Bootstrap) */
.rnbd-campos input,
.rnbd-campos select,
.rnbd-campos textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
}
.rnbd-campos textarea { min-height: 108px; resize: vertical; }
.rnbd-campos input:focus,
.rnbd-campos select:focus,
.rnbd-campos textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.rnbd-campos input::placeholder,
.rnbd-campos textarea::placeholder { color: var(--muted-foreground); }

/* ---------- Ajustes de espaciado (solo GUI) ---------- */
/* Perfil: más aire entre etiqueta y campo, entre filas y en la cabecera */
.profile-grid { gap: 26px 26px; }
.profile-grid .login-field { gap: 10px; }
.profile-grid .login-field label { display: block; margin-bottom: 2px; }
.profile-meta { gap: 20px 26px; padding-bottom: 22px; margin-bottom: 26px; }
.profile-actions { margin-top: 28px; }
.profile-card .app-ok { margin-top: 18px; }

/* ============================================================================
   PLAN DE TRABAJO · 60% lienzo / 40% tareas
   ============================================================================ */
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(300px, 4fr);
  grid-template-rows: auto 1fr;      /* fila 1 = cabeceras, fila 2 = cuadros */
  gap: 14px 24px;
  margin-top: 22px;
  align-items: stretch;
}

/* ---- FILA 1: cabeceras ---- */
.plan-main-head {
  display: flex;
  align-items: flex-end;             /* 👈 alinea con la línea base de los botones */
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.plan-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.plan-title-block h1 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  margin: 0;
  line-height: 1.15;
}

.plan-title-block .app-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* Botones anclados abajo a la derecha, sobre el segundo recuadro */
.plan-side-head {
  display: flex;
  align-items: flex-end;             /* 👈 mismo borde inferior que el bloque h1+sub */
  justify-content: flex-end;         /* 👈 los botones a la derecha */
  min-width: 0;
}

.plan-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.plan-side-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* ---- FILA 2: cuadros ---- */
.plan-canvas {
  min-height: 62vh;
  min-width: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 40px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--card);
  text-align: center;
}
.plan-canvas .eyebrow { color: var(--muted-foreground); }
.plan-canvas-text {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted-foreground);
}

.plan-side {
  min-height: 62vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

/* ---- Lista de tareas ---- */
.plan-list { display: flex; flex-direction: column; }
.plan-item {
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
}
.plan-item:last-child { border-bottom: 0; }
.plan-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-check { margin: 0; }
.plan-check-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--input);
  border-radius: 4px;
  background: var(--background);
  cursor: pointer;
}
.plan-item.is-hecha .plan-check-btn {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}
.plan-item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}
.plan-item.is-hecha .plan-item-name {
  text-decoration: line-through;
  color: var(--muted-foreground);
}
.plan-expand {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}
.plan-expand:hover { background: var(--muted); color: var(--foreground); }
.plan-expand svg {
  width: 11px;
  height: 8px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.18s ease;
}
.plan-item.is-open .plan-expand svg { transform: rotate(180deg); }
.plan-item-fecha {
  margin: 6px 0 0 28px;
  font-size: 11px;
  color: var(--muted-foreground);
}
.plan-item-detail {
  margin: 10px 0 0 28px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--foreground);
}
.plan-empty {
  margin: 18px 0;
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
}

/* ---- Formulario ---- */
.plan-form { display: flex; flex-direction: column; gap: 14px; }
.plan-field { display: flex; flex-direction: column; gap: 7px; }
.plan-field label { font-size: 11px; font-weight: 500; }
.plan-field input,
.plan-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
}
.plan-field textarea { min-height: 96px; resize: vertical; }
.plan-field input:focus,
.plan-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.plan-form-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 900px) {
  .plan-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .plan-canvas { min-height: 280px; }
  .plan-side   { min-height: 0; }
  .plan-side-head { justify-content: flex-start; }
}

.plan-layout,
.plan-layout *,
.plan-layout *::before,
.plan-layout *::after {
  box-sizing: border-box;
}
[hidden] { display: none !important; }
/* ============================================================================
   DOCUMENTOS · explorador con el lenguaje visual del resto del área
   ============================================================================ */
.doc-shell,
.doc-shell *,
.doc-shell *::before,
.doc-shell *::after {
  box-sizing: border-box;
}
.doc-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 5.5% 64px;
}
.doc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.doc-head h1 {
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  margin: 10px 0 0;
}
.doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.doc-toolbar .doc-search {
  flex: 1 1 280px;
  min-width: 0;
}
.doc-input,
.doc-select {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.doc-select { width: auto; min-width: 190px; }
.doc-input:focus,
.doc-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.55fr) minmax(0, 1.35fr) minmax(190px, 0.5fr);
  gap: 20px;
  align-items: start;
}
.doc-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  min-width: 0;
}
.doc-panel--files { min-height: 320px; }
.doc-panel-title {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* Migas de pan */
.doc-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.doc-crumbs a {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--muted-foreground);
  text-decoration: none;
}
.doc-crumbs a:hover { background: var(--muted); color: var(--foreground); }
.doc-crumbs .actual { color: var(--foreground); font-weight: 600; }

/* Carpetas */
.doc-folders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--foreground);
  font-size: 13px;
  text-decoration: none;
}
.doc-folder:hover { background: var(--muted); }
.doc-folder.is-active { background: var(--accent); font-weight: 600; }
.doc-folder svg { width: 15px; height: 15px; color: var(--primary); flex-shrink: 0; }

/* Archivos */
.doc-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}
.doc-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  transition: background-color .15s ease, border-color .15s ease;
}
.doc-file:hover { background: var(--muted); border-color: var(--input); }
.doc-file-icon { color: var(--primary); flex-shrink: 0; }
.doc-file-icon svg { width: 17px; height: 17px; }
.doc-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
.doc-file-more {
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
}
.doc-file-more:hover { background: var(--accent); color: var(--foreground); }
.doc-tip {
  position: absolute;
  left: 8px;
  top: calc(100% + 6px);
  z-index: 20;
  display: none;
  width: 250px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 11.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  pointer-events: none;
}
.doc-file:hover .doc-tip { display: block; }
.doc-tip p { margin: 0; }
.doc-tip .muted { margin-top: 4px; color: var(--muted-foreground); }
.doc-menu {
  display: none;
  position: absolute;
  right: 6px;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
.doc-menu strong { display: block; font-size: 12px; }
.doc-menu .desc { font-size: 11px; color: var(--muted-foreground); margin: 2px 0 6px; }
.doc-menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.doc-menu a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--foreground);
  font-size: 12.5px;
  text-decoration: none;
}
.doc-menu a:hover { background: var(--muted); }

/* Rutas */
.doc-routes { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.doc-route {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--foreground);
  font-size: 12px;
  text-decoration: none;
  word-break: break-all;
}
.doc-route:hover { background: var(--muted); }

.doc-empty {
  padding: 22px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 12.5px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  grid-column: 1 / -1;
}

/* Formularios */
.doc-card {
  max-width: 880px;
  margin-top: 22px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.doc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}
.doc-fields .full { grid-column: 1 / -1; }
.doc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.doc-field label { font-size: 12px; font-weight: 500; }
.doc-field label i { font-style: normal; color: var(--primary); }
.doc-field input[type="text"],
.doc-field input[type="file"],
.doc-field textarea,
.doc-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.doc-field select[multiple] { min-height: 108px; }
.doc-field input:focus,
.doc-field textarea:focus,
.doc-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.doc-hint { font-size: 11px; color: var(--muted-foreground); }
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.doc-actions .spacer { flex: 1 1 auto; }

/* Selector de cliente */
.doc-clientes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.doc-cliente {
  display: block;
  padding: 24px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  text-align: center;
  text-decoration: none;
  color: var(--foreground);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.doc-cliente:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0,0,0,.07);
}
.doc-cliente svg { width: 26px; height: 26px; color: var(--primary); }
.doc-cliente .nombre { margin-top: 10px; font-weight: 600; font-size: 14px; }
.doc-cliente .empresa { margin-top: 2px; font-size: 12px; color: var(--muted-foreground); }

@media (max-width: 1000px) {
  .doc-grid { grid-template-columns: 1fr; }
  .doc-fields { grid-template-columns: 1fr; }
}

/* Documentos: botones del formulario y selects con ancho natural */
.doc-actions .btn,
.doc-head .btn,
.doc-toolbar .btn { width: auto; flex: 0 0 auto; }
.doc-actions .btn { min-width: 120px; }
.doc-field select[multiple] { width: auto; min-width: 100%; height: auto; }

/* ============================================================================
   CRONOGRAMA DE ACTIVIDADES · calendario, historial y progreso
   ============================================================================ */
.crono-head {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}
.crono-buttons-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between; /* 👈 Distribuye el espacio uniformemente */
  align-items: center;
  gap: 8px;                       /* Margen de seguridad si la pantalla se hace pequeña */
  width: 100%;
}
.crono-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crono-buttons-row .btn {
  flex: 1;                 /* 👈 Obliga a los 3 botones a crecer y repartirse el ancho */
  padding-left: 10px;      /* Reducimos un poco el padding interno para que el texto no se desborde */
  padding-right: 10px;
  white-space: nowrap;     /* Evita que el texto se parta en dos líneas */
  text-align: center;
}
.crono-select-wrap { flex: 1 1 auto; min-width: 0; }
.crono-select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.crono-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.crono-canvas {
  display: block;
  place-content: initial;
  text-align: left;
  padding: 26px 30px;
  border-style: solid;
}
.crono-cal { width: 100%; max-width: 520px; margin: 0 auto; }
.crono-cal-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
}
.crono-mes {
  font-size: 19px;
  font-weight: 500;
  color: #8f8f85;
  text-transform: capitalize;
}
.crono-anio { font-size: 19px; color: #b9b9ae; }
.crono-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.crono-semana span {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.crono-dias {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.crono-dia {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  font-size: 13px;
  color: var(--foreground);
  background: #fff;
}
.crono-dia.is-vacio { background: transparent; }
.crono-dia.is-tarea {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.crono-dia.is-hoy:not(.is-tarea) { border: 1px solid var(--input); }
.crono-vacio {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 55vh;
  text-align: center;
}

/* Historial */
.crono-historial { display: flex; flex-direction: column; gap: 10px; }
.crono-historial-intro {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.crono-timeline {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crono-timeline li {
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
}
.crono-timeline li:last-child { border-bottom: 0; }
.crono-evento-fecha {
  flex: 0 0 74px;
  font-family: monospace;
  font-size: 11px;
  color: var(--muted-foreground);
}
.crono-historial-resumen {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Barra de progreso */
.crono-progress {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.crono-track {
  flex: 1 1 auto;
  height: 9px;
  border-radius: 999px;
  background: #e9e9e2;
  overflow: hidden;
}
.crono-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #c9c9c2;
  transition: width .35s ease, background-color .35s ease;
}
.crono-fill.nivel-0 { background: #c9c9c2; }
.crono-fill.nivel-1 { background: #b6c1a1; }
.crono-fill.nivel-2 { background: #9aa87f; }
.crono-fill.nivel-3 { background: var(--primary); }
.crono-pct {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .crono-progress { grid-column: auto; }
  .crono-canvas { padding: 18px; }
}

/* Cronograma: selects del formulario con el estilo del tema */
.plan-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.plan-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}

/* ============================================================================
   VALIDACIONES · conversaciones 30 % / 70 %
   ============================================================================ */

.val-shell { padding-top: 28px; }

/* ---- Cabecera General ---- */
.val-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 16px;
}
.val-head-copy { 
  min-width: 0; 
}
.val-head h1 {
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 500;
  margin: 8px 0 0;
}
.val-head-copy .app-sub {
  margin: 6px 0 0; 
  font-size: 13px;
  color: var(--muted-foreground);
}
.val-head-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* ---- Layout Principal (Grid 30% / 70%) ---- */
.val-layout {
  display: grid;
  grid-template-columns: minmax(260px, 30%) minmax(0, 1fr);
  gap: 20px;
  height: min(660px, calc(100vh - 300px));
  min-height: 430px;
}

/* ---- Recuadro Izquierdo (Lista de Conversaciones) ---- */
.val-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}
.val-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.val-side-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.val-list { 
  flex: 1 1 auto; 
  overflow-y: auto; 
}
.val-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  text-decoration: none;
}
.val-item:hover { background: var(--muted); }
.val-item.is-active {
  background: var(--accent);
  box-shadow: inset 3px 0 0 var(--primary);
}
.val-item-title { font-size: 13px; font-weight: 600; }
.val-item-doc,
.val-item-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted-foreground);
}
.val-item-fecha { font-size: 10.5px; color: var(--muted-foreground); }
.val-empty {
  padding: 20px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-align: center;
}

/* ---- Recuadro Derecho (Chat y Formulario) ---- */
.val-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
  font-size: 15px; /* Base más grande */
}
.val-chat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.val-chat-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.val-doc-line {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.val-chat-actions { display: flex; align-items: center; gap: 8px; }
.val-chat-actions form { margin: 0; }

/* ---- Zona de Mensajes del Chat ---- */
.val-mensajes {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}
.val-msg { max-width: 78%; }
.val-msg.es-propio { align-self: flex-end; text-align: right; }
.val-msg-meta {
  margin-bottom: 3px;
  font-size: 10px;
  color: var(--muted-foreground);
}
.val-msg-texto {
  display: inline-block;
  max-width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.65;
  text-align: left;
  word-break: break-word;
}
.val-msg.es-propio .val-msg-texto {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* ---- Caja para Escribir Mensaje ---- */
.val-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.val-composer textarea {
  flex: 1 1 auto;
  min-height: 46px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}
.val-composer textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 12%, transparent);
}
.val-empty-chat {
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 40px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* ==========================================
  FORMULARIO DE NUEVA VALIDACIÓN
  ========================================== */
.val-form-scroll {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: hidden; /* Evita scroll interno, ahora el form se adapta */
}
.val-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  height: 100%;
}

/* Labels y Contadores de caracteres */
.val-form label {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 95%; /* Igualamos el ancho de los inputs */
  font-size: 13px;
  margin-bottom: 2px;
}
.val-counter {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1;
}

/* Inputs del formulario */
.val-form input[type="text"],
.val-form input[type="file"],
.val-form select,
.val-form textarea {
  width: 95%; /* Solución al desbordamiento horizontal */
  max-width: 100%;
  box-sizing: border-box;
  font-size: 14.5px;
}

/* Ajuste específico para el input de archivo (Documento) */
.plan-field input[type="file"] {
  padding: 9px 12px;
  border: 1px dashed var(--input);
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
}

/* El textarea de la pregunta se estira */
.val-form textarea {
  resize: vertical;
  min-height: 160px;
  flex: 1; 
}

/* Acciones del formulario (Botón Crear) */
.val-form-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%; /* 👈 Cambiar el 95% por 100% */
  margin-top: auto; 
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.val-form input[type="text"],
.val-form input[type="file"],
.val-form select,
.val-form textarea {
  width: 100%; /* 👈 Cambiar el 95% por 100% */
  max-width: 100%;
  box-sizing: border-box;
  font-size: 14.5px;
}

/* Etiqueta de documento adjunto */
.val-adjunto {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--muted);
  font-size: 12px;
  width: 100%; /* Igualamos ancho */
  box-sizing: border-box;
}
.val-adjunto-hint {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted-foreground);
}

/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .val-layout { grid-template-columns: 1fr; height: auto; }
  .val-side { max-height: 280px; }
  .val-chat { min-height: 420px; }
}