*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #e5e7eb; color: #111827; height: 100vh; display: flex; overflow: hidden; line-height: 1.4; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
input, select { outline: none; background: transparent; font-family: inherit; color: inherit; }
input[type="checkbox"] { accent-color: #1e3a8a; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; }
svg { flex-shrink: 0; }

/* Aislamiento estricto del panel izquierdo y scroll */
#leftMainPanel { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
#leftScrollContainer { flex: 1 1 0%; min-height: 0; overflow-y: auto; overflow-x: auto; position: relative; z-index: 1; }

/* Barra divisoria arrastrable bidireccional con doble flecha */
#panelResizer { width: 10px; flex-shrink: 0; background-color: #cbd5e1; border-left: 1px solid #94a3b8; border-right: 1px solid #94a3b8; cursor: col-resize; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 30; transition: background-color 0.15s ease; touch-action: none; }
#panelResizer:hover, #panelResizer.active { background-color: #2563eb; border-color: #1d4ed8; }
.resizer-grip { display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.resizer-grip span { width: 4px; height: 4px; border-radius: 9999px; background-color: #475569; }
#panelResizer:hover .resizer-grip span, #panelResizer.active .resizer-grip span { background-color: #ffffff; }
.resizer-dual-buttons { position: absolute; top: 50%; transform: translateY(-50%); left: -24px; display: flex; align-items: center; background-color: #1e3a8a; border: 2px solid #ffffff; border-radius: 9999px; box-shadow: 0 3px 8px rgba(0,0,0,0.35); overflow: hidden; z-index: 50; transition: left 0.15s ease; }
.resizer-dual-buttons.dock-left { left: 4px; }
.resizer-dual-buttons.dock-right { left: -24px; }
.resizer-arrow-btn { width: 28px; height: 36px; color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; cursor: pointer; transition: background-color 0.15s ease; }
.resizer-arrow-btn:hover { background-color: #2563eb; }
.resizer-arrow-btn + .resizer-arrow-btn { border-left: 1px solid rgba(255,255,255,0.35); }

/* Controles de SSN en 3-2-4 cajitas con validación SSA/IRS */
.ssn-triple-wrap { display: inline-flex; align-items: center; justify-content: center; background-color: #ffffff; border: 1.5px solid #000000; border-radius: 3px; height: 28px; padding: 0 4px; width: 100%; max-width: 195px; transition: border-color 0.15s ease, background-color 0.15s ease; }
.ssn-triple-wrap.ssn-invalid { border: 2px solid #dc2626 !important; background-color: #fef2f2 !important; }
.ssn-triple-wrap.ssn-itin { border: 2px solid #d97706 !important; background-color: #fffbeb !important; }
.ssn-triple-wrap.ssn-valid { border: 1.5px solid #059669 !important; }
.ssn-seg { border: none !important; background: transparent !important; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 14px; font-weight: 700; color: #111827; padding: 0; height: 100%; }
.ssn-seg-3 { width: 38px; }
.ssn-seg-2 { width: 28px; }
.ssn-seg-4 { width: 48px; }
.ssn-sep { font-family: ui-monospace, monospace; font-weight: 700; color: #4b5563; user-select: none; padding: 0 2px; }

/* Celdas individuales de dígitos */
.digit-group-box { display: inline-flex; width: fit-content; border: 1px solid #000000; background-color: #ffffff; overflow: hidden; flex-shrink: 0; }
.digit-box { width: 22px; min-width: 22px; max-width: 22px; height: 24px; border: none; border-right: 1px solid #000000; border-radius: 0; background-color: #ffffff; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 600; color: #111827; padding: 0; }
.digit-box:last-child { border-right: none; }
.digit-box-sm { width: 20px; min-width: 20px; max-width: 20px; height: 22px; border: none; border-right: 1px solid #000000; border-radius: 0; background-color: #ffffff; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12.5px; font-weight: 600; color: #111827; padding: 0; }
.digit-box-sm:last-child { border-right: none; }

/* Limpieza visual W-2 */
#w2ActiveSheet input[type="text"] { border: none; border-radius: 0; }
#w2ActiveSheet .w2-line-field { border-bottom: 1px solid rgba(0, 0, 0, 0.25) !important; }
#w2ActiveSheet .w2-box12-code { border-right: 1px solid #000000 !important; }
#w2ActiveSheet .w2-14b-left { border-right: 1px solid rgba(0, 0, 0, 0.4) !important; }
.w2-state-divider { border-bottom: 1px dashed #6b7280 !important; }
.w2-fica-editable-box { border: 2px dashed #dc2626 !important; background-color: #fffafa !important; position: relative; }
.w2-fica-editable-box:hover { background-color: #fef2f2 !important; }

/* Cuestionario interactivo del Inspector */
.quiz-opt-btn { width: 100%; text-align: left; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 6px; background-color: #ffffff; font-size: 12.5px; line-height: 1.35; color: #1f2937; transition: all 0.12s ease; display: flex; align-items: flex-start; gap: 8px; }
.quiz-opt-btn:hover { background-color: #eff6ff; border-color: #3b82f6; }
.quiz-opt-btn.opt-correct { background-color: #ecfdf5 !important; border-color: #059669 !important; color: #064e3b !important; font-weight: 600; }
.quiz-opt-btn.opt-wrong { background-color: #fef2f2 !important; border-color: #dc2626 !important; color: #7f1d1d !important; font-weight: 600; }
.quiz-opt-btn.opt-dimmed { opacity: 0.78; }

/* Utilidades */
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-end { justify-content: flex-end; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.align-middle { vertical-align: middle; }
.whitespace-nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-9 { grid-column: span 9 / span 9; }

.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.p-0\.5 { padding: 0.125rem; }
.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pt-0\.5 { padding-top: 0.125rem; }
.pt-1\.5 { padding-top: 0.375rem; }
.pt-2\.5 { padding-top: 0.625rem; }
.pt-3 { padding-top: 0.75rem; }
.pb-0\.5 { padding-bottom: 0.125rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-1\.5 { padding-bottom: 0.375rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-24 { padding-bottom: 6rem; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-3 { padding-left: 0.75rem; }
.pr-1 { padding-right: 0.25rem; }
.pr-1\.5 { padding-right: 0.375rem; }
.pr-2 { padding-right: 0.5rem; }

.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-auto { margin-left: auto; }
.mr-1 { margin-right: 0.25rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-2\.5 { margin-top: 0.625rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-6 { margin-bottom: 1.5rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-3\.5 > * + * { margin-top: 0.875rem; }

.w-full { width: 100%; }
.w-px { width: 1px; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-28 { width: 7rem; }
.w-32 { width: 8rem; }
.w-36 { width: 9rem; }
.w-44 { width: 11rem; }
.w-56 { width: 14rem; }
.w-1\/2 { width: 50%; }
.w-\[65\%\] { width: 65%; }
.w-\[35\%\] { width: 35%; }
.w-\[98vw\] { width: 98vw; }
.max-w-\[160px\] { max-width: 160px; }
.max-w-\[180px\] { max-width: 180px; }
.max-w-\[330px\] { max-width: 330px; }
.max-w-md { max-width: 28rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.min-w-0 { min-width: 0; }
.min-w-\[80px\] { min-width: 80px; }
.min-w-\[180px\] { min-width: 180px; }
.min-w-\[220px\] { min-width: 220px; }
.min-w-\[260px\] { min-width: 260px; }
.min-w-\[280px\] { min-width: 280px; }
.min-w-\[320px\] { min-width: 320px; }
.min-w-\[740px\] { min-width: 740px; }

.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-\[85vh\] { height: 85vh; }
.h-\[96vh\] { height: 96vh; }
.max-h-80 { max-height: 20rem; }
.min-h-0 { min-height: 0; }
.min-h-\[28px\] { min-height: 28px; }
.min-h-\[30px\] { min-height: 30px; }
.min-h-\[32px\] { min-height: 32px; }
.min-h-\[34px\] { min-height: 34px; }
.min-h-\[38px\] { min-height: 38px; }
.min-h-\[42px\] { min-height: 42px; }
.min-h-\[44px\] { min-height: 44px; }
.min-h-\[50px\] { min-height: 50px; }
.min-h-\[54px\] { min-height: 54px; }
.min-h-\[56px\] { min-height: 56px; }
.min-h-\[116px\] { min-height: 116px; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.left-2 { left: 0.5rem; }
.right-2 { right: 0.5rem; }
.left-2\.5 { left: 0.625rem; }
.right-2\.5 { right: 0.625rem; }
.top-full { top: 100%; }
.top-\[136px\] { top: 136px; }
.top-\[198px\] { top: 198px; }
.top-\[308px\] { top: 308px; }
.bottom-\[24px\] { bottom: 24px; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.object-contain { object-fit: contain; }

.font-sans { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.font-serif { font-family: Georgia, Cambria, "Times New Roman", Times, serif; }
.text-\[10px\] { font-size: 10px; }
.text-\[10\.5px\] { font-size: 10.5px; }
.text-\[11px\] { font-size: 11px; }
.text-\[11\.5px\] { font-size: 11.5px; }
.text-\[12px\], .text-xs { font-size: 12px; }
.text-\[12\.5px\] { font-size: 12.5px; }
.text-\[13px\] { font-size: 13px; }
.text-\[13\.5px\] { font-size: 13.5px; }
.text-\[15px\] { font-size: 15px; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-5xl { font-size: 3rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.italic { font-style: italic; }
.underline { text-decoration: underline; }
.uppercase { text-transform: uppercase; }
.normal-case { text-transform: none; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-\[0\.25em\] { letter-spacing: 0.25em; }
.tracking-\[0\.35em\] { letter-spacing: 0.35em; }

.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-blue-300 { color: #93c5fd; }
.text-blue-400 { color: #60a5fa; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-800 { color: #1e40af; }
.text-blue-900 { color: #1e3a8a; }
.text-blue-950 { color: #172554; }
.text-\[\#1e3a8a\] { color: #1e3a8a; }
.text-emerald-400 { color: #34d399; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-emerald-950 { color: #022c22; }
.text-amber-300 { color: #fcd34d; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.text-amber-950 { color: #451a03; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }

.bg-white { background-color: #ffffff; }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-white\/85 { background-color: rgba(255, 255, 255, 0.85); }
.bg-black\/75 { background-color: rgba(0, 0, 0, 0.75); }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-700 { background-color: #334155; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-700 { background-color: #1d4ed8; }
.bg-blue-900\/90 { background-color: rgba(30, 58, 138, 0.9); }
.bg-\[\#1e3a8a\] { background-color: #1e3a8a; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-700 { background-color: #047857; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-600 { background-color: #d97706; }
.bg-amber-800 { background-color: #92400e; }
.bg-amber-900\/60 { background-color: rgba(120, 53, 15, 0.6); }
.bg-yellow-200 { background-color: #fef08a; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-600 { background-color: #dc2626; }
.bg-red-600\/80 { background-color: rgba(220, 38, 38, 0.8); }
.bg-irs-blue { background-color: #e6f2ff; }
.bg-irs-blue\/50 { background-color: rgba(230, 242, 255, 0.5); }
.bg-irs-cyan { background-color: #e0f7fa; }
.bg-irs-gray { background-color: #cbd5e1; }
.bg-w2-tint { background-color: #eef4fc; }

.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-blue-800:hover { background-color: #1e40af; }
.hover\:bg-emerald-200:hover { background-color: #a7f3d0; }
.hover\:bg-emerald-600:hover { background-color: #059669; }
.hover\:bg-emerald-700:hover { background-color: #047857; }
.hover\:bg-amber-600:hover { background-color: #d97706; }
.hover\:bg-amber-700:hover { background-color: #b45309; }
.hover\:bg-amber-900:hover { background-color: #78350f; }
.hover\:bg-slate-300:hover { background-color: #cbd5e1; }
.hover\:bg-slate-600:hover { background-color: #475569; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:bg-yellow-300:hover { background-color: #fde047; }
.hover\:bg-red-200:hover { background-color: #fecaca; }
.hover\:bg-red-600:hover { background-color: #dc2626; }
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-black:hover { color: #000000; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:text-red-600:hover { color: #dc2626; }
.hover\:underline:hover { text-decoration: underline; }

.border { border-width: 1px; border-style: solid; border-color: #d1d5db; }
.border-2 { border-width: 2px; border-style: solid; border-color: #000000; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-b-0 { border-bottom-width: 0; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-r { border-right-width: 1px; border-right-style: solid; }
.border-r-2 { border-right-width: 2px; border-right-style: solid; }
.border-x { border-left-width: 1px; border-right-width: 1px; border-style: solid; }
.border-dashed { border-style: dashed; }

.border-black { border-color: #000000; }
.border-black\/20 { border-color: rgba(0, 0, 0, 0.2); }
.border-black\/30 { border-color: rgba(0, 0, 0, 0.3); }
.border-black\/40 { border-color: rgba(0, 0, 0, 0.4); }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-400 { border-color: #9ca3af; }
.border-gray-500 { border-color: #6b7280; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-400 { border-color: #94a3b8; }
.border-slate-600 { border-color: #475569; }
.border-slate-700 { border-color: #334155; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-300 { border-color: #93c5fd; }
.border-blue-400\/40 { border-color: rgba(96, 165, 250, 0.4); }
.border-blue-500 { border-color: #3b82f6; }
.border-blue-600 { border-color: #2563eb; }
.border-blue-800 { border-color: #1e40af; }
.border-\[\#1e3a8a\] { border-color: #1e3a8a; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-emerald-400 { border-color: #34d399; }
.border-emerald-600 { border-color: #059669; }
.border-amber-300 { border-color: #fcd34d; }
.border-amber-500 { border-color: #f59e0b; }
.border-amber-700 { border-color: #b45309; }
.border-red-300 { border-color: #fca5a5; }
.border-red-500 { border-color: #ef4444; }

.divide-y > * + * { border-top-width: 1px; border-top-style: solid; border-top-color: #e5e7eb; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-r { border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.rounded-b-lg { border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-\[1px_1px_0px_rgba\(0\,0\,0\,0\.15\)\] { box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15); }
.shadow-\[0_-4px_6px_-1px_rgba\(0\,0\,0\,0\.1\)\] { box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1); }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* Interactividad y Editor */
.clickable-section { cursor: pointer; transition: background-color 0.12s ease, box-shadow 0.12s ease; }
.clickable-section:hover { background-color: #fef9c3 !important; box-shadow: inset 4px 0 0 #2563eb; }
.clickable-section:hover > div, .clickable-section:hover > label { background-color: transparent !important; }
.active-line { background-color: #fef08a !important; box-shadow: inset 5px 0 0 #1e3a8a !important; }
.active-line > div, .active-line > label { background-color: transparent !important; }
.search-target-red { background-color: #fee2e2 !important; outline: 4px solid #dc2626 !important; outline-offset: -2px; box-shadow: 0 0 22px rgba(220, 38, 38, 0.7), inset 8px 0 0 #dc2626 !important; position: relative; z-index: 15; animation: redPulse 0.7s ease-in-out 3; }
.search-target-red > div, .search-target-red > label { background-color: transparent !important; }
@keyframes redPulse { 0%, 100% { background-color: #fee2e2; } 50% { background-color: #fca5a5; } }

.modal-fade { animation: fadeIn 0.2s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes pulseAlert { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.animate-pulse { animation: pulseAlert 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
#richEditor:empty:before { content: attr(data-placeholder); color: #9ca3af; pointer-events: none; display: block; }
#richEditor ul { list-style-type: disc; margin-left: 1.5rem; margin-bottom: 0.5rem; }
#richEditor ol { list-style-type: decimal; margin-left: 1.5rem; margin-bottom: 0.5rem; }
#richEditor p { margin-bottom: 0.5rem; }
#richEditor table { border-collapse: collapse; width: 100%; margin: 0.5rem 0; }
#richEditor td, #richEditor th { border: 1px solid #cbd5e1; padding: 4px 8px; }
#richEditor a { color: #2563eb; text-decoration: underline; cursor: pointer; font-weight: 500; }
.guide-editable { outline: 2px dashed #2563eb; background-color: #ffffff !important; padding: 6px; border-radius: 4px; cursor: text; }
.guide-editable:focus { outline: 2px solid #1d4ed8; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

[data-section="dep_student_disabled"] label,
[data-section="dep_credits"] label {
    min-width: 0; overflow: hidden; flex-direction: column; align-items: center; text-align: center; font-size: 10px; line-height: 1.15; padding: 4px 2px;
}
[data-section="dep_student_disabled"] label span,
[data-section="dep_credits"] label span {
    word-break: break-word; overflow-wrap: anywhere; max-width: 100%;
}

@media print {
    @page { size: letter portrait; margin: 0.35in; }
    body { height: auto !important; overflow: visible !important; display: block !important; background: #ffffff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    #panelResizer, #rightInspectorPanel, #instructorModal, #box12CatalogModal, #topControlBar, #smartSearchWrapper, #w2ToolbarBar { display: none !important; }
    #leftMainPanel, #leftScrollContainer { height: auto !important; overflow: visible !important; display: block !important; padding: 0 !important; }
    #formZoomWrapper { min-width: 0 !important; width: 100% !important; padding: 0 !important; }
    .active-line, .search-target-red { background-color: transparent !important; box-shadow: none !important; outline: none !important; }
    .w2-fica-editable-box { border: 1px solid #000000 !important; background-color: #eef4fc !important; }
    .page-break-before { page-break-before: always; break-before: page; margin-top: 0 !important; }
}


/* === CAPA DE ACCESO PRIVADO Y PROTECCIÓN CLOUD ECONOLIFE === */
#authGateOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #172554 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.auth-input {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    background-color: #f8fafc;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.auth-input:focus {
    background-color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}
.auth-btn-primary {
    width: 100%;
    background-color: #1e3a8a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    transition: background-color 0.15s ease, transform 0.08s ease;
}
.auth-btn-primary:hover { background-color: #1d4ed8; }
.auth-btn-primary:active { transform: scale(0.99); }
.auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Marca de agua dinámica anticopia para Alumnos */
#studentWatermarkLayer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem;
    opacity: 0.085;
    user-select: none;
}
.wm-stamp {
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-24deg);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #1e3a8a;
    text-align: center;
    white-space: nowrap;
}

/* Protección anticopia en modo alumno */
body.student-protected #rightInspectorPanel,
body.student-protected #instructorModal,
body.student-protected .clickable-section span,
body.student-protected .clickable-section label {
    user-select: none !important;
    -webkit-user-select: none !important;
}

#printBlockedBanner { display: none; }

@media print {
    body.student-protected #leftMainPanel,
    body.student-protected #rightInspectorPanel,
    body.student-protected #studentWatermarkLayer {
        display: none !important;
    }
    body.student-protected #printBlockedBanner {
        display: flex !important;
        height: 90vh;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 18px;
        font-weight: 800;
        color: #991b1b;
        padding: 2rem;
        border: 3px solid #991b1b;
    }
}
