:root {
  color-scheme: light;
  --qgo-blue-900: #024c7a;
  --qgo-blue-700: #0367a6;
  --qgo-blue-500: #398cbf;
  --qgo-blue-300: #7eb6d9;
  --qgo-gray-700: #585759;
  --qgo-gray-100: #f2f2f2;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info-bg: #f0f9ff;
  --white: #fff;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--qgo-gray-100); }
body { margin: 0; min-height: 100vh; color: var(--slate-800); background: var(--qgo-gray-100); font: 400 14px/20px "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
a { color: var(--qgo-blue-700); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.qgo-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.qgo-page { width: min(1120px, 100%); margin-inline: auto; padding: 24px; display: grid; gap: 20px; }
.qgo-page-header { min-height: 168px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--white); border-radius: 12px; background: linear-gradient(90deg, var(--qgo-blue-900), var(--qgo-blue-700)); box-shadow: 0 10px 15px -3px rgb(15 23 42 / .12); overflow: hidden; position: relative; }
.qgo-page-header::after { content: ""; position: absolute; width: 280px; height: 280px; right: -100px; top: -150px; border: 48px solid rgb(255 255 255 / .06); border-radius: 50%; pointer-events: none; }
.qgo-header-brand { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.qgo-logo { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; color: var(--qgo-blue-900); background: var(--white); border-radius: 12px; font-size: 25px; line-height: 1; font-weight: 600; box-shadow: 0 1px 2px rgb(15 23 42 / .18); }
.qgo-eyebrow, .qgo-section-kicker { margin: 0 0 4px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.qgo-page-header h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; }
.qgo-page-header p:last-child { max-width: 680px; margin: 4px 0 0; color: rgb(255 255 255 / .82); }
.qgo-header-seal { width: 72px; height: 72px; flex: 0 0 auto; display: grid; place-items: center; color: rgb(255 255 255 / .72); border: 1px solid rgb(255 255 255 / .24); border-radius: 50%; background: rgb(255 255 255 / .08); position: relative; z-index: 1; }
.qgo-header-seal svg { width: 36px; height: 36px; }

.qgo-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.qgo-card { padding: 20px; background: var(--white); border: 1px solid var(--slate-200); border-radius: 12px; box-shadow: 0 1px 2px rgb(15 23 42 / .06); }
.qgo-card-heading { margin-bottom: 20px; }
.qgo-card-heading--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.qgo-section-kicker { color: var(--qgo-blue-700); }
.qgo-card h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.qgo-card-heading p:last-child { margin: 4px 0 0; color: var(--slate-500); }

.qgo-dropzone { min-height: 180px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--slate-600); background: var(--slate-50); border: 2px dashed var(--slate-300); border-radius: 12px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease; position: relative; }
.qgo-dropzone:hover, .qgo-dropzone:focus-visible, .qgo-dropzone.is-dragging { color: var(--qgo-blue-900); background: var(--info-bg); border-color: var(--qgo-blue-500); outline: none; box-shadow: 0 0 0 3px rgb(126 182 217 / .35); }
.qgo-dropzone.is-invalid { color: #991b1b; background: var(--danger-bg); border-color: var(--danger); }
.qgo-dropzone__icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--qgo-blue-700); background: #e7f4fb; border-radius: 50%; }
.qgo-dropzone__icon svg { width: 28px; height: 28px; }
.qgo-dropzone strong { color: var(--slate-800); font-weight: 600; }
.qgo-dropzone small { color: var(--slate-500); font-size: 12px; line-height: 16px; }
.qgo-link { color: var(--qgo-blue-700); font-weight: 500; }
.qgo-drop-action { display: none; color: var(--qgo-blue-900); font-weight: 600; }
.qgo-dropzone.is-dragging > :not(.qgo-drop-action):not(input) { visibility: hidden; }
.qgo-dropzone.is-dragging .qgo-drop-action { display: block; position: absolute; inset: 0; place-items: center; align-content: center; }

.qgo-file { min-height: 60px; margin-top: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 8px; }
.qgo-file__icon { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; color: var(--qgo-blue-700); background: var(--info-bg); border-radius: 8px; }
.qgo-file__body { min-width: 0; display: grid; flex: 1; }
.qgo-file__body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.qgo-file__body small { color: var(--slate-500); font-size: 12px; line-height: 16px; }
.qgo-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; }
.qgo-badge--info { color: var(--qgo-blue-900); background: var(--info-bg); }

.qgo-form-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--slate-200); }
.qgo-field { display: grid; gap: 6px; }
.qgo-label { color: var(--slate-700); font-weight: 500; }
.qgo-required { color: var(--danger); }
.qgo-help { margin: 0; color: var(--slate-400); font-size: 12px; line-height: 16px; }
.qgo-control { width: 100%; min-height: 42px; padding: 9px 12px; color: var(--slate-800); background: var(--white); border: 1px solid var(--slate-300); border-radius: 8px; transition: border-color .15s ease, box-shadow .15s ease; }
.qgo-control::placeholder { color: var(--slate-400); }
.qgo-control:focus { border-color: var(--qgo-blue-500); outline: none; box-shadow: 0 0 0 3px rgb(126 182 217 / .35); }
.qgo-control[aria-invalid="true"] { border-color: var(--danger); }
.qgo-control--code { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.qgo-alert { margin-top: 16px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid; border-radius: 8px; font-weight: 500; }
.qgo-alert__icon { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 6px; border-radius: 50%; background: currentColor; }
.qgo-alert--info { color: var(--qgo-blue-900); background: var(--info-bg); border-color: #bae6fd; }
.qgo-alert--success { color: #047857; background: var(--success-bg); border-color: #a7f3d0; }
.qgo-alert--error { color: var(--danger-dark); background: var(--danger-bg); border-color: #fecaca; }
.qgo-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 8px; }
.qgo-button { min-height: 40px; padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.qgo-button--primary { min-width: 194px; color: var(--white); background: var(--qgo-blue-700); }
.qgo-button--primary:hover { background: var(--qgo-blue-900); }
.qgo-button--secondary { color: var(--slate-700); background: var(--white); border-color: var(--slate-300); }
.qgo-button--secondary:hover { background: var(--slate-50); }
.qgo-button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--qgo-blue-500); }
.qgo-button:disabled { opacity: .55; cursor: not-allowed; }

.qgo-card--aside { position: sticky; top: 20px; }
.qgo-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.qgo-steps li { display: flex; align-items: flex-start; gap: 12px; }
.qgo-steps > li > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; color: var(--qgo-blue-900); background: var(--info-bg); border: 1px solid #bae6fd; border-radius: 50%; font-size: 12px; font-weight: 600; }
.qgo-steps strong { display: block; font-weight: 600; }
.qgo-steps p { margin: 2px 0 0; color: var(--slate-500); font-size: 12px; line-height: 17px; }
.qgo-security-note { margin-top: 20px; padding: 14px; display: flex; align-items: flex-start; gap: 10px; color: var(--slate-600); background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 8px; }
.qgo-security-note svg { flex: 0 0 auto; color: var(--success); }
.qgo-security-note p { margin: 0; font-size: 12px; line-height: 17px; }
.qgo-security-note strong { display: block; color: var(--slate-700); font-size: 13px; font-weight: 600; }

.qgo-footer { padding: 4px 2px 12px; display: flex; justify-content: space-between; gap: 20px; color: var(--slate-500); font-size: 12px; line-height: 16px; }

.qgo-page-header--certificate { min-height: 148px; }
.qgo-status { min-height: 40px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--white); border: 1px solid rgb(255 255 255 / .28); border-radius: 999px; font-size: 13px; font-weight: 500; position: relative; z-index: 1; }
.qgo-status--valid { background: rgb(5 150 105 / .82); }
.qgo-status--expired { background: rgb(220 38 38 / .9); }
.qgo-certificate-summary { border-top: 3px solid var(--qgo-blue-700); }
.qgo-id { padding: 8px 12px; display: grid; gap: 1px; color: var(--slate-600); background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 8px; text-align: right; }
.qgo-id span { font-size: 10px; line-height: 14px; font-weight: 600; letter-spacing: .08em; }
.qgo-id strong { color: var(--qgo-blue-900); font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.qgo-summary-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.qgo-detail { min-width: 0; padding: 12px 0; border-top: 1px solid var(--slate-200); overflow-wrap: anywhere; }
.qgo-detail--wide { grid-column: 1 / -1; }
.qgo-detail dt { margin: 0 0 3px; color: var(--slate-500); font-size: 12px; line-height: 16px; font-weight: 500; }
.qgo-detail dd { margin: 0; color: var(--slate-800); font-weight: 500; }
.qgo-value--danger { color: var(--danger-dark) !important; }
.qgo-certificate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.qgo-certificate-section dl { margin: 0; }
.qgo-section-title { margin: -2px 0 8px; display: flex; align-items: center; gap: 10px; }
.qgo-section-title > span { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; color: var(--qgo-blue-700); background: var(--info-bg); border-radius: 8px; }
.qgo-certificate-actions { display: flex; justify-content: flex-end; }
.qgo-page--error { max-width: 760px; }
.qgo-empty-state { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.qgo-empty-state > span { width: 56px; height: 56px; display: grid; place-items: center; color: var(--qgo-blue-700); background: var(--info-bg); border-radius: 50%; }
.qgo-empty-state > span svg { width: 28px; height: 28px; }
.qgo-empty-state h2 { margin-top: 16px; }
.qgo-empty-state p { margin: 4px 0 20px; color: var(--slate-500); }

@media (max-width: 767px) {
  .qgo-page { padding: 12px; }
  .qgo-page-header { min-height: 0; padding: 20px; }
  .qgo-header-seal { display: none; }
  .qgo-header-brand { align-items: flex-start; gap: 14px; }
  .qgo-logo { width: 44px; height: 44px; font-size: 21px; }
  .qgo-layout, .qgo-certificate-grid { grid-template-columns: 1fr; }
  .qgo-card--aside { position: static; }
  .qgo-footer { flex-direction: column; gap: 4px; }
  .qgo-actions { flex-direction: column; }
  .qgo-actions .qgo-button, .qgo-certificate-actions .qgo-button { width: 100%; }
  .qgo-page-header--certificate { align-items: flex-start; flex-direction: column; }
  .qgo-status { margin-left: 58px; }
  .qgo-card-heading--row { flex-direction: column; }
  .qgo-id { width: 100%; text-align: left; }
  .qgo-summary-grid { grid-template-columns: 1fr; }
  .qgo-detail--wide { grid-column: auto; }
}

@media (max-width: 420px) {
  .qgo-page-header h1 { font-size: 21px; line-height: 28px; }
  .qgo-header-brand { display: block; }
  .qgo-logo { margin-bottom: 12px; }
  .qgo-status { margin-left: 0; }
  .qgo-card { padding: 16px; }
  .qgo-dropzone { padding: 20px 14px; }
  .qgo-file { align-items: flex-start; flex-wrap: wrap; }
  .qgo-file__body { width: calc(100% - 52px); }
  .qgo-file .qgo-badge { margin-left: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
