
/* XtroOne PDF Accessibility Engine ? professional enterprise UI */
:root {
  color-scheme: dark;
  --bg-base: #070a12;
  --bg-elevated: #0d1320;
  --bg-surface: rgba(15, 23, 42, 0.82);
  --bg-surface-solid: #111827;
  --bg-surface-hover: rgba(30, 41, 59, 0.92);
  --bg-panel: rgba(10, 15, 28, 0.78);
  --text-primary: #f8fafc;
  --text-secondary: #b6c2d2;
  --text-muted: #718096;
  --accent-primary: #7c3aed;
  --accent-primary-hover: #8b5cf6;
  --accent-cyan: #22d3ee;
  --accent-blue: #38bdf8;
  --status-success: #22c55e;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #38bdf8;
  --border-light: rgba(148, 163, 184, 0.18);
  --border-focus: rgba(125, 211, 252, 0.55);
  --border-color: var(--border-light);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 18px 45px rgba(2, 6, 23, 0.36);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.48);
  --glass-blur: blur(22px) saturate(130%);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --border-radius-lg: var(--radius-lg);
  --border-radius-md: var(--radius-md);
  --border-radius-sm: var(--radius-sm);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; min-height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 58, 237, 0.22), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.13), transparent 32%),
    linear-gradient(135deg, #05070d 0%, #07101e 47%, #080a12 100%);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: -2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}
.noise-overlay { position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .35; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .22); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .42); border: 2px solid transparent; background-clip: content-box; }

.mono-text { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; letter-spacing: -.02em; }

.app-header {
  height: 70px; padding: 0 28px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(5, 8, 15, .72); border-bottom: 1px solid var(--border-light);
  backdrop-filter: var(--glass-blur);
}
.brand, .header-actions, .header-title, .pagination-controls, .zoom-controls, .modal-actions { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan)); box-shadow: 0 16px 35px rgba(124,58,237,.32); }
.brand-text h1 { font-size: 1.03rem; letter-spacing: -.03em; font-weight: 700; line-height: 1.15; }
.version-tag { display: inline-flex; margin-top: 4px; color: var(--text-secondary); font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

.btn, .btn-icon, .icon-only { border: 0; font-family: inherit; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 0 15px; border-radius: 12px; color: var(--text-primary); font-size: .87rem; font-weight: 700; border: 1px solid transparent; }
.btn:hover, .btn-icon:hover { transform: translateY(-1px); }
.btn:active, .btn-icon:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--accent-primary), #2563eb 55%, var(--accent-cyan)); color: white; box-shadow: 0 14px 34px rgba(37,99,235,.26); }
.btn-primary:hover { box-shadow: 0 18px 44px rgba(37,99,235,.36); }
.btn-secondary, .btn:not(.btn-primary) { background: rgba(15, 23, 42, .72); border-color: var(--border-light); color: var(--text-primary); }
.btn-secondary:hover, .btn:not(.btn-primary):hover { background: rgba(30, 41, 59, .86); border-color: rgba(148, 163, 184, .34); }
.btn.full-width { width: 100%; }
.btn-small { min-height: 32px; padding: 0 10px; font-size: .76rem; }
.btn-icon { min-width: 36px; height: 36px; padding: 0; border-radius: 12px; display: inline-grid; place-items: center; background: rgba(15,23,42,.48); border: 1px solid transparent; color: var(--text-secondary); }
.btn-icon:hover { color: var(--text-primary); background: rgba(30,41,59,.9); border-color: var(--border-light); }
.icon-only.btn-primary { min-width: 40px; height: 40px; padding: 0; }

.view-section { position: absolute; top: 70px; inset-inline: 0; bottom: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; }
.upload-container { width: min(980px, 100%); }
.upload-box { position: relative; min-height: 320px; overflow: hidden; border-radius: var(--radius-xl); border: 1px solid rgba(148,163,184,.22); background: linear-gradient(180deg, rgba(15,23,42,.78), rgba(15,23,42,.52)); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 42px; cursor: pointer; backdrop-filter: var(--glass-blur); }
.upload-box::before { content: ''; position: absolute; inset: -2px; background: radial-gradient(circle at 50% 0%, rgba(34,211,238,.2), transparent 28%), radial-gradient(circle at 0% 100%, rgba(124,58,237,.22), transparent 32%); pointer-events: none; }
.upload-box > * { position: relative; z-index: 1; }
.upload-box:hover, .upload-box.dragover { border-color: var(--border-focus); transform: translateY(-2px); background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.62)); }
.upload-icon-wrapper { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 22px; color: white; background: linear-gradient(135deg, rgba(124,58,237,1), rgba(34,211,238,.92)); box-shadow: 0 24px 60px rgba(37,99,235,.3); }
.upload-icon { font-size: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(125,211,252,.24); color: #bae6fd; background: rgba(14,165,233,.1); font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.upload-box h2 { max-width: 780px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: .98; letter-spacing: -.075em; font-weight: 800; }
.upload-box p { max-width: 690px; margin-top: 18px; color: var(--text-secondary); line-height: 1.7; font-size: 1rem; }
.upload-cta { display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; padding: 8px 8px 8px 18px; border-radius: 999px; background: rgba(2,6,23,.58); border: 1px solid var(--border-light); }
.upload-cta span { display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 999px; background: white; color: #08111f; font-weight: 800; }
.upload-cta small { color: var(--text-muted); padding-right: 12px; }
.compliance-ribbon { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.compliance-ribbon div { border: 1px solid var(--border-light); background: rgba(15,23,42,.55); border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 10px; }
.compliance-ribbon strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(34,211,238,.12); color: var(--accent-cyan); font-family: 'JetBrains Mono'; }
.compliance-ribbon span { color: var(--text-secondary); font-weight: 700; font-size: .86rem; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-card { min-height: 150px; border-radius: 20px; padding: 20px; background: rgba(15,23,42,.56); border: 1px solid var(--border-light); backdrop-filter: var(--glass-blur); transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(125,211,252,.42); background: rgba(15,23,42,.76); }
.feature-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; color: var(--accent-cyan); background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.16); }
.feature-card h3 { font-size: .98rem; letter-spacing: -.025em; }
.feature-card p { margin-top: 8px; color: var(--text-muted); line-height: 1.55; font-size: .84rem; }

.processing-container, .progress-container { width: min(760px, 100%); text-align: center; padding: 38px; border: 1px solid var(--border-light); border-radius: var(--radius-xl); background: rgba(15,23,42,.68); box-shadow: var(--shadow-lg); backdrop-filter: var(--glass-blur); }
.modern-spinner { width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 50%; border: 3px solid rgba(148,163,184,.2); border-top-color: var(--accent-cyan); border-right-color: var(--accent-primary); animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-container h2, .progress-container h2 { font-size: 1.7rem; letter-spacing: -.04em; margin-bottom: 8px; }
.processing-container p { color: var(--text-secondary); }

.main-container { display: flex; height: calc(100vh - 70px); flex: 1; overflow: hidden; }
.panel { display: flex; flex-direction: column; background: rgba(10,15,28,.76); border-right: 1px solid var(--border-light); backdrop-filter: var(--glass-blur); }
.sidebar-left { width: 340px; min-width: 340px; }
.sidebar-right { width: 360px; min-width: 360px; border-left: 1px solid var(--border-light); border-right: 0; transition: width .25s ease, min-width .25s ease, transform .25s ease; }
.sidebar-right.collapsed { width: 0; min-width: 0; transform: translateX(100%); border-left: 0; overflow: hidden; }
.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: rgba(2,6,23,.38); }
.toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(8,13,24,.72); border-bottom: 1px solid var(--border-light); }
.sidebar-toolbar { justify-content: center; padding-inline: 12px; }
.module-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; }
.tab-btn { height: 42px; border: 1px solid transparent; border-radius: 14px; background: rgba(15,23,42,.52); color: var(--text-muted); cursor: pointer; }
.tab-btn:hover { color: var(--text-primary); background: rgba(30,41,59,.82); border-color: var(--border-light); }
.tab-btn.active { color: white; background: linear-gradient(135deg, rgba(124,58,237,.85), rgba(14,165,233,.72)); border-color: rgba(125,211,252,.36); box-shadow: 0 12px 28px rgba(37,99,235,.2); }
.panel-header { min-height: 66px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-light); background: rgba(15,23,42,.48); }
.panel-header h2 { font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); font-weight: 800; }
.panel-content { flex: 1; overflow: auto; padding: 16px; }
.panel-footer { padding: 16px; border-top: 1px solid var(--border-light); background: rgba(15,23,42,.46); }

.pdf-preview-container { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 44px; }
.pdf-page-wrapper { position: relative; background: white; border-radius: 4px; box-shadow: 0 22px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); transition: transform .2s cubic-bezier(.2,0,0,1); }
.pdf-page-img { display: block; max-width: none; border-radius: 3px; }
.pdf-overlay { position: absolute; inset: 0; pointer-events: none; }
.overlay-box { position: absolute; border: 2px solid; background: rgba(255,255,255,.05); pointer-events: auto; cursor: pointer; box-shadow: 0 0 0 2px rgba(0,0,0,.1); transition: background .15s ease, box-shadow .15s ease; }
.overlay-box:hover { background: rgba(255,255,255,.18); box-shadow: 0 0 0 5px rgba(0,0,0,.12); }
.overlay-contrast { border-color: var(--status-error); }
.overlay-table { border-color: var(--status-info); }
.overlay-form { border-color: var(--status-warning); }
.overlay-xobject { border-color: var(--accent-primary); }

.issue-card { border: 1px solid var(--border-light); border-radius: 16px; padding: 14px; margin-bottom: 12px; background: rgba(15,23,42,.54); cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.issue-card:hover { transform: translateY(-1px); background: rgba(30,41,59,.72); border-color: rgba(148,163,184,.34); }
.issue-card.active { background: linear-gradient(180deg, rgba(30,41,59,.92), rgba(15,23,42,.72)); border-color: var(--border-focus); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-family: 'JetBrains Mono', monospace; font-size: .68rem; font-weight: 800; letter-spacing: .02em; }
.badge-error { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.26); }
.badge-success { background: rgba(34,197,94,.12); color: #86efac; border: 1px solid rgba(34,197,94,.26); }
.badge-warning { background: rgba(245,158,11,.12); color: #fcd34d; border: 1px solid rgba(245,158,11,.26); }

.ai-icon { color: var(--accent-cyan); }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-bubble { max-width: 94%; font-size: .88rem; line-height: 1.55; color: var(--text-secondary); }
.chat-ai { align-self: flex-start; }
.chat-user { align-self: flex-end; padding: 11px 14px; border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(37,99,235,.86)); color: white; box-shadow: var(--shadow-sm); }
.chat-ai .chat-text, .chat-ai:not(:has(.chat-text)) { display: block; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: rgba(15,23,42,.7); border: 1px solid var(--border-light); }
.chat-avatar { width: 28px; height: 28px; display: inline-grid; place-items: center; margin-right: 8px; border-radius: 10px; color: var(--accent-cyan); background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.16); vertical-align: top; }
.chat-input-area { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border-light); background: rgba(15,23,42,.46); }
.chat-input, .form-input { width: 100%; min-height: 40px; border-radius: 12px; border: 1px solid var(--border-light); background: rgba(2,6,23,.5); color: var(--text-primary); padding: 0 12px; font: inherit; font-size: .86rem; outline: none; }
.chat-input:focus, .form-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 4px rgba(56,189,248,.08); }
.chat-input::placeholder, .form-input::placeholder { color: var(--text-muted); }

.modal-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(2,6,23,.76); backdrop-filter: var(--glass-blur); }
.modal-content { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: rgba(10,15,28,.96); border: 1px solid var(--border-light); box-shadow: var(--shadow-lg); }
.large-modal { width: min(1180px, 94vw); height: min(820px, 90vh); }
.medium-modal { width: min(620px, 92vw); max-height: 86vh; }
.sub-toolbar { min-height: 46px; }
.hint-text { color: var(--text-muted); font-size: .84rem; }
.grid-editor-container { flex: 1; overflow: auto; padding: 32px; display: flex; justify-content: center; background: #0b1020; }
.grid-table { border-collapse: separate; border-spacing: 0; background: white; color: #111827; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); }
.grid-cell { border: 1px solid #e5e7eb; padding: 12px 16px; min-width: 110px; height: 44px; text-align: center; cursor: pointer; user-select: none; font-size: .85rem; }
.grid-cell.th { background: #eef2ff; font-weight: 800; color: #312e81; }
.grid-cell.selected { outline: 3px solid #2563eb; outline-offset: -3px; background: #dbeafe; }
.form-field-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.right-align { justify-content: flex-end; }

.toast-container { position: fixed; right: 24px; bottom: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
.toast { min-width: 280px; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: rgba(15,23,42,.94); border: 1px solid var(--border-light); box-shadow: var(--shadow-md); color: var(--text-primary); animation: slideIn .25s ease forwards; }
.toast.success i { color: var(--status-success); } .toast.error i { color: var(--status-error); }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px) translateY(8px); } to { opacity: 1; transform: translateX(0) translateY(0); } }
.pipeline-steps { display: flex; flex-direction: column; gap: 12px; width: min(680px, 100%); margin: 24px auto 0; }

@media (max-width: 1180px) { .sidebar-right { position: absolute; right: 0; top: 70px; bottom: 0; z-index: 80; } .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { body { overflow: auto; height: auto; } .app-header { height: auto; min-height: 70px; padding: 14px; flex-wrap: wrap; gap: 12px; } .view-section { top: 96px; position: relative; min-height: calc(100vh - 96px); } .upload-box { min-height: auto; padding: 28px 18px; } .upload-box h2 { font-size: 2.1rem; } .compliance-ribbon, .features-grid { grid-template-columns: 1fr; } .main-container { height: auto; min-height: calc(100vh - 96px); flex-direction: column; } .sidebar-left, .sidebar-right { width: 100%; min-width: 0; position: relative; top: auto; } .workspace { min-height: 620px; } .form-field-row { flex-direction: column; align-items: stretch; } }


/* Final Accessibility Report */
.accessibility-report {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .62));
  text-align: left;
}
.report-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.report-title h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
  letter-spacing: -.03em;
}
.report-title p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .84rem;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.report-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(2, 6, 23, .34);
  border: 1px solid rgba(148, 163, 184, .12);
  color: var(--text-secondary);
  font-size: .84rem;
}
.report-row strong { color: var(--text-primary); }
.validation-unavailable {
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .24);
  color: #fcd34d;
  font-weight: 800;
}
@media (max-width: 720px) { .report-grid { grid-template-columns: 1fr; } }
