:root {
    --cpop-blue: #0b63f6;
    --cpop-blue-dark: #0849bd;
    --cpop-cyan: #06b6d4;
    --cpop-navy: #0b1736;
    --cpop-navy-soft: #15264d;
    --cpop-bg: #f5f7fb;
    --cpop-surface: #ffffff;
    --cpop-line: #dbe3ef;
    --cpop-text: #172033;
    --cpop-muted: #5d6b82;
    --cpop-green: #0a9f6c;
    --cpop-amber: #d97706;
    --cpop-red: #dc2626;
    --cpop-violet: #7557d9;
    --cpop-shadow: 0 10px 28px rgba(11, 23, 54, .08);
}

.cpop-document-body {
    margin: 0;
    background: var(--cpop-bg);
    color: var(--cpop-text);
    font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.cpop-document-body *,
.cpop-document-body *::before,
.cpop-document-body *::after,
.cpop-admin-card *,
.cpop-admin-head *,
.cpop-access-layout * {
    box-sizing: border-box;
}

.cpop-document-body a,
.cpop-admin-card a,
.cpop-admin-head a {
    color: var(--cpop-blue);
    text-decoration: none;
}

.cpop-icon {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
}

.cpop-app {
    min-height: 100vh;
    background: var(--cpop-bg);
}

.cpop-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 244px minmax(220px, 1fr) auto;
    align-items: center;
    height: 72px;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid var(--cpop-line);
}

.cpop-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    color: var(--cpop-navy) !important;
}

.cpop-brand > span,
.cpop-login-brand > span,
.cpop-document-brand > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 11px;
    border-radius: 7px;
    background: var(--cpop-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(11, 99, 246, .24);
}

.cpop-brand div,
.cpop-company div,
.cpop-user div,
.cpop-document-brand div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cpop-brand small,
.cpop-company small,
.cpop-user small,
.cpop-document-brand small {
    color: var(--cpop-muted);
    font-size: 11px;
    line-height: 1.2;
}

.cpop-brand strong,
.cpop-company strong,
.cpop-user strong,
.cpop-document-brand strong {
    overflow: hidden;
    color: var(--cpop-navy);
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cpop-company {
    display: flex;
    align-items: center;
    min-width: 0;
    padding-left: 22px;
    color: var(--cpop-blue);
    border-left: 1px solid var(--cpop-line);
}

.cpop-company .cpop-icon {
    margin-right: 10px;
}

.cpop-user {
    display: flex;
    align-items: center;
    justify-self: end;
    min-width: 0;
    gap: 10px;
}

.cpop-user img,
.cpop-user-avatar img {
    border-radius: 50%;
}

.cpop-layout {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: 100vh;
    padding-top: 72px;
}

.cpop-sidebar {
    position: fixed;
    z-index: 90;
    top: 72px;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 244px;
    padding: 24px 12px 18px;
    overflow-y: auto;
    background: var(--cpop-navy);
    color: #fff;
}

.cpop-nav-label {
    margin: 0 10px 12px;
    color: #8fa7d6;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.cpop-nav-link {
    display: flex;
    align-items: center;
    min-height: 46px;
    margin-bottom: 5px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #dfe8fb !important;
    font-size: 14px;
    font-weight: 650;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.cpop-nav-link:hover,
.cpop-nav-link:focus-visible {
    background: var(--cpop-navy-soft);
    color: #fff !important;
    transform: translateX(2px);
}

.cpop-nav-link.is-active {
    background: var(--cpop-blue);
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(11, 99, 246, .22);
}

.cpop-nav-link > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
}

.cpop-sidebar-edition {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    background: rgba(255,255,255,.05);
}

.cpop-sidebar-edition .cpop-icon { color: #39dca0; }
.cpop-sidebar-edition div { display: flex; flex-direction: column; min-width: 0; }
.cpop-sidebar-edition small { color: #91a5ce; font-size: 10px; text-transform: uppercase; }
.cpop-sidebar-edition strong { font-size: 15px; }
.cpop-sidebar-edition span { color: #b9c7e3; font-size: 11px; }

.cpop-sidebar-head,
.cpop-menu-button,
.cpop-backdrop {
    display: none;
}

.cpop-main {
    grid-column: 2;
    min-width: 0;
    padding: 34px 40px 0;
}

.cpop-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 48px;
    padding: 20px 0 28px;
    color: var(--cpop-muted);
    border-top: 1px solid var(--cpop-line);
    font-size: 12px;
}

.cpop-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--cpop-blue);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.cpop-page-head,
.cpop-admin-head,
.cpop-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.cpop-page-head { margin-bottom: 24px; }
.cpop-admin-head { margin-bottom: 26px; }

.cpop-page-head h1,
.cpop-admin-head h2,
.cpop-hero h1,
.cpop-login h1 {
    margin: 0;
    color: var(--cpop-navy);
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 760;
    line-height: 1.12;
    letter-spacing: 0;
}

.cpop-page-head p,
.cpop-admin-head p,
.cpop-section-head p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--cpop-muted);
}

.cpop-section-head h2,
.cpop-section-head h3,
.cpop-publish-card h3,
.cpop-process-content h3 {
    margin: 0;
    color: var(--cpop-navy);
    font-size: 20px;
    line-height: 1.25;
}

.cpop-count {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: #e9eff8;
    color: #43516a;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.cpop-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 36px;
    min-height: 290px;
    padding: 42px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--cpop-navy);
    color: #fff;
    box-shadow: var(--cpop-shadow);
}

.cpop-hero .cpop-eyebrow { color: #61d9f1; }
.cpop-hero h1 { color: #fff; font-size: clamp(32px, 4vw, 50px); max-width: 760px; }
.cpop-hero p { max-width: 720px; margin: 15px 0 0; color: #c9d7ef; font-size: 16px; }
.cpop-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.cpop-edition-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 8px;
    background: #132750;
    text-align: center;
}

.cpop-edition-seal .cpop-icon { width: 36px; height: 36px; color: #3ae0a3; }
.cpop-edition-seal small { margin-top: 10px; color: #9cb0d4; text-transform: uppercase; }
.cpop-edition-seal strong { margin: 2px 0; font-size: 26px; }
.cpop-edition-seal span { color: #c9d7ef; font-size: 11px; }

.cpop-button,
.cpop-icon-button,
.cpop-link-button,
.cpop-menu-button {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.cpop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.cpop-button:hover { transform: translateY(-1px); }
.cpop-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.cpop-button-primary { background: var(--cpop-blue); color: #fff !important; box-shadow: 0 7px 14px rgba(11,99,246,.18); }
.cpop-button-primary:hover { background: var(--cpop-blue-dark); }
.cpop-button-light { background: #fff; color: var(--cpop-navy) !important; }
.cpop-button-quiet { border-color: var(--cpop-line); background: #fff; color: var(--cpop-navy) !important; }
.cpop-button-quiet:hover { border-color: #aebbd0; background: #f8fafc; }
.cpop-button-danger { background: #fff; color: var(--cpop-red) !important; border-color: #fecaca; }
.cpop-button-wide { width: 100%; }

.cpop-icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--cpop-line);
    border-radius: 6px;
    background: #fff;
    color: var(--cpop-navy) !important;
}

.cpop-icon-button:hover { border-color: var(--cpop-blue); color: var(--cpop-blue) !important; }

.cpop-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 30px;
}

.cpop-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 126px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--cpop-line);
    border-radius: 8px;
    background: #fff;
}

.cpop-kpi::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; content: ""; background: var(--tone, var(--cpop-blue)); }
.cpop-kpi-blue { --tone: var(--cpop-blue); }
.cpop-kpi-cyan { --tone: var(--cpop-cyan); }
.cpop-kpi-green { --tone: var(--cpop-green); }
.cpop-kpi-amber { --tone: var(--cpop-amber); }
.cpop-kpi-violet { --tone: var(--cpop-violet); }
.cpop-kpi span { color: var(--cpop-muted); font-size: 12px; }
.cpop-kpi strong { margin: 4px 0 1px; color: var(--cpop-navy); font-size: 28px; line-height: 1.1; }
.cpop-kpi small { margin-top: auto; color: var(--cpop-muted); font-size: 11px; }

.cpop-section { margin-top: 30px; }
.cpop-section > .cpop-section-head { margin-bottom: 15px; }
.cpop-grid { display: grid; gap: 14px; }
.cpop-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cpop-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cpop-content-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 245px;
    padding: 19px;
    border: 1px solid var(--cpop-line);
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.cpop-content-card:hover { border-color: #aec8f5; box-shadow: var(--cpop-shadow); transform: translateY(-2px); }
.cpop-content-card.is-compact { min-height: 228px; }
.cpop-card-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 7px; background: #e8f1ff; color: var(--cpop-blue); }
.cpop-card-icon-green { background: #e5f8f1; color: var(--cpop-green); }
.cpop-content-card > .cpop-status { position: absolute; top: 18px; right: 18px; }
.cpop-content-card > small { color: var(--cpop-blue); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.cpop-content-card h2 { margin: 5px 0 7px; color: var(--cpop-navy); font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.cpop-content-card p { margin: 0 0 18px; color: var(--cpop-muted); font-size: 12px; }
.cpop-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }

.cpop-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf1f6;
    color: #526077;
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
}

.cpop-status-aprobado,
.cpop-status-publicado { background: #dff7ed; color: #06734f; }
.cpop-status-borrador,
.cpop-status-pendiente { background: #fff1d6; color: #995900; }
.cpop-status-enviado { background: #e8f1ff; color: #0754cc; }
.cpop-status-revisado { background: #eee9ff; color: #5c42b7; }
.cpop-status-anulado { background: #fee7e7; color: #b91c1c; }
.cpop-status-superado { background: #edf1f6; color: #526077; }
.cpop-status-externo { background: #e5f7fb; color: #08778e; }

.cpop-home-columns { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.cpop-process-mini-list,
.cpop-link-list { border: 1px solid var(--cpop-line); border-radius: 8px; overflow: hidden; background: #fff; }
.cpop-process-mini-list a,
.cpop-link-list a { display: flex; align-items: center; min-height: 64px; padding: 12px 15px; border-bottom: 1px solid var(--cpop-line); color: var(--cpop-text) !important; }
.cpop-process-mini-list a:last-child,
.cpop-link-list a:last-child { border-bottom: 0; }
.cpop-process-mini-list div,
.cpop-link-list span { display: flex; flex-direction: column; min-width: 0; }
.cpop-process-mini-list strong,
.cpop-link-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpop-process-mini-list small { color: var(--cpop-muted); }
.cpop-process-mini-list .cpop-icon,
.cpop-link-list .cpop-icon { margin-left: auto; color: var(--cpop-blue); }
.cpop-process-code { flex: 0 0 auto; margin-right: 12px; padding: 5px 7px; border-radius: 5px; background: #e8f1ff; color: var(--cpop-blue); font-size: 10px; font-weight: 800; }

.cpop-change-note { display: flex; gap: 14px; min-height: 150px; padding: 20px; border: 1px solid var(--cpop-line); border-radius: 8px; background: #fff; }
.cpop-change-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 7px; background: #dff7ed; color: var(--cpop-green); }
.cpop-change-note strong { color: var(--cpop-navy); }
.cpop-change-note p { margin: 6px 0 12px; color: var(--cpop-muted); }
.cpop-change-note small { color: var(--cpop-muted); }

.cpop-process-band { margin-bottom: 22px; padding: 18px; border: 1px solid var(--cpop-line); border-left: 4px solid var(--band, var(--cpop-blue)); border-radius: 8px; background: #fff; }
.cpop-band-estrategico { --band: var(--cpop-blue); }
.cpop-band-operativo { --band: var(--cpop-green); }
.cpop-band-apoyo { --band: var(--cpop-amber); }
.cpop-band-label { display: flex; align-items: center; margin-bottom: 13px; }
.cpop-band-label span { width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--band); }
.cpop-band-label h2 { margin: 0; color: var(--cpop-navy); font-size: 16px; }
.cpop-process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cpop-process-card { display: flex; flex-direction: column; min-height: 145px; padding: 16px; border: 1px solid var(--cpop-line); border-radius: 7px; color: var(--cpop-text) !important; background: #fbfcfe; }
.cpop-process-card:hover,
.cpop-process-card.is-selected { border-color: var(--band); background: #fff; box-shadow: 0 7px 18px rgba(11,23,54,.07); }
.cpop-process-card strong { margin: 8px 0 5px; color: var(--cpop-navy); font-size: 15px; }
.cpop-process-card small { color: var(--cpop-muted); }
.cpop-process-access { display: flex; align-items: center; gap: 5px; margin-top: auto; color: var(--cpop-muted); font-size: 10px; font-weight: 700; }
.cpop-process-access .cpop-icon { width: 14px; height: 14px; }

.cpop-process-detail { margin-top: 24px; padding: 26px; border: 1px solid #b9d0f7; border-radius: 8px; background: #fff; box-shadow: var(--cpop-shadow); }
.cpop-process-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.cpop-process-facts > div { min-height: 90px; padding: 15px; border: 1px solid var(--cpop-line); border-radius: 7px; background: #f9fbfe; }
.cpop-process-facts span { display: block; margin-bottom: 5px; color: var(--cpop-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.cpop-process-facts p { margin: 0; color: var(--cpop-text); }
.cpop-locked-fact { display: flex; align-items: center; gap: 12px; grid-column: span 1; color: var(--cpop-amber); }
.cpop-process-content { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }

.cpop-search { position: relative; max-width: 720px; margin-bottom: 20px; }
.cpop-search > .cpop-icon { position: absolute; top: 50%; left: 14px; color: var(--cpop-muted); transform: translateY(-50%); }
.cpop-search input { width: 100%; height: 48px; padding: 10px 48px; border: 1px solid var(--cpop-line); border-radius: 7px; background: #fff; color: var(--cpop-text); font: inherit; }
.cpop-search button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--cpop-muted); cursor: pointer; }

.cpop-viewer-toolbar { display: flex; justify-content: space-between; gap: 12px; max-width: 980px; margin: 0 auto 16px; }
.cpop-viewer-toolbar > div { display: flex; gap: 8px; }
.cpop-document { max-width: 980px; margin: 0 auto; padding: 36px 46px; border: 1px solid var(--cpop-line); border-radius: 8px; background: #fff; box-shadow: var(--cpop-shadow); }
.cpop-document > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 3px solid var(--cpop-blue); }
.cpop-document-brand { display: flex; align-items: center; min-width: 0; }
.cpop-document-title { padding: 34px 0 24px; }
.cpop-document-title > span { color: var(--cpop-blue); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.cpop-document-title h1 { margin: 7px 0 6px; color: var(--cpop-navy); font-size: 32px; line-height: 1.16; }
.cpop-document-title p { margin: 0; color: var(--cpop-muted); }
.cpop-document-control { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 30px; border: 1px solid var(--cpop-line); border-radius: 7px; overflow: hidden; }
.cpop-document-control > div { min-width: 0; padding: 12px; border-right: 1px solid var(--cpop-line); background: #f8fafe; }
.cpop-document-control > div:last-child { border-right: 0; }
.cpop-document-control dt { margin-bottom: 4px; color: var(--cpop-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.cpop-document-control dd { margin: 0; color: var(--cpop-navy); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.cpop-doc-section { padding: 9px 0 16px; }
.cpop-doc-section h2 { margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--cpop-line); color: var(--cpop-blue); font-size: 18px; }
.cpop-doc-section p { color: #2b3548; }
.cpop-doc-list { padding-left: 20px; }
.cpop-doc-list li { margin-bottom: 6px; }
.cpop-document > footer { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--cpop-line); color: var(--cpop-muted); font-size: 10px; text-align: center; }

.cpop-table-wrap { width: 100%; overflow-x: auto; contain: layout paint; -webkit-overflow-scrolling: touch; }
.cpop-table { width: 100%; min-width: 680px; border-collapse: collapse; background: #fff; font-size: 12px; }
.cpop-table th { padding: 11px 12px; background: #eef3fa; color: #3e4b62; font-size: 10px; font-weight: 800; text-align: left; text-transform: uppercase; }
.cpop-table td { padding: 12px; border-bottom: 1px solid var(--cpop-line); vertical-align: top; }
.cpop-table td > strong,
.cpop-table td > span { display: block; }
.cpop-table td > span { color: var(--cpop-muted); font-size: 10px; }

.cpop-form-card,
.cpop-admin-card {
    padding: 24px;
    border: 1px solid var(--cpop-line);
    border-radius: 8px;
    background: #fff;
}

.cpop-form-card { max-width: 980px; }
.cpop-form-card form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.cpop-field { display: flex; flex-direction: column; min-width: 0; }
.cpop-field-table,
.cpop-form-actions { grid-column: 1 / -1; }
.cpop-field > label,
.cpop-form-grid > label,
.cpop-publish-card form > label,
.cpop-form-grid legend { margin-bottom: 6px; color: var(--cpop-navy); font-size: 12px; font-weight: 750; }
.cpop-field label span { color: var(--cpop-red); }
.cpop-field input,
.cpop-field textarea,
.cpop-field select,
.cpop-form-grid input,
.cpop-form-grid textarea,
.cpop-form-grid select,
.cpop-publish-card input,
.cpop-publish-card textarea,
.cpop-rule-table select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #c8d2e1;
    border-radius: 6px;
    background: #fff;
    color: var(--cpop-text);
    font: inherit;
    font-size: 13px;
}
.cpop-field textarea,
.cpop-form-grid textarea,
.cpop-publish-card textarea { resize: vertical; }
.cpop-field small { margin-top: 5px; color: var(--cpop-muted); }
.cpop-field > p { min-height: 42px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--cpop-line); }
.cpop-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 9px; }
.cpop-repeatable .cpop-button { margin-top: 10px; }

.cpop-form-overview { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--cpop-line); border-radius: 8px; background: var(--cpop-line); }
.cpop-form-overview > div { min-width: 0; padding: 13px 15px; background: #fff; }
.cpop-form-overview span { display: block; margin-bottom: 4px; color: var(--cpop-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.cpop-form-overview strong { display: block; overflow-wrap: anywhere; color: var(--cpop-navy); font-size: 12px; }
.cpop-form-section { grid-column: 1 / -1; margin-top: 10px; padding: 12px 0 8px; border-bottom: 2px solid #d9e7fb; color: var(--cpop-blue); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.cpop-field-calculated input { border-color: #99d7cb; background: #effbf7; color: #057352; font-weight: 800; }
.cpop-repeatable textarea { min-width: 210px; resize: vertical; }
.cpop-repeatable select { min-width: 150px; }
.cpop-repeatable input[type="date"] { min-width: 145px; }
.cpop-repeatable input[type="number"] { min-width: 105px; }
.cpop-record-history { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--cpop-line); }
.cpop-record-history h2 { margin: 0 0 14px; font-size: 17px; }
.cpop-record-history ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.cpop-record-history li { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 10px; min-height: 52px; }
.cpop-record-history li::before { content: ""; position: absolute; top: 15px; bottom: -4px; left: 5px; width: 2px; background: #dbe6f5; }
.cpop-record-history li:last-child::before { display: none; }
.cpop-record-history li > span { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 3px; border: 3px solid #d9eaff; border-radius: 50%; background: var(--cpop-blue); }
.cpop-record-history strong { color: var(--cpop-navy); font-size: 12px; }
.cpop-record-history p { margin: 2px 0 0; color: var(--cpop-muted); font-size: 10px; }
.cpop-record-pipeline { display: flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 12px; border: 1px solid var(--cpop-line); border-radius: 7px; background: #fff; color: var(--cpop-muted); font-size: 11px; font-weight: 700; }
.cpop-record-pipeline span { padding: 5px 8px; border-radius: 5px; background: #eef3fa; }
.cpop-record-pipeline .cpop-icon { width: 14px; height: 14px; }
.cpop-record-values { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.cpop-record-actions { margin-top: 26px; padding: 18px; border: 1px solid var(--cpop-line); border-radius: 7px; background: #f8fafe; }
.cpop-record-actions h2 { margin: 0 0 12px; font-size: 17px; }
.cpop-record-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }

.cpop-callout { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #c7d8f5; border-left: 4px solid var(--cpop-blue); border-radius: 7px; background: #f0f6ff; color: #26405f; }
.cpop-callout .cpop-icon { color: var(--cpop-blue); }
.cpop-callout strong { display: block; color: var(--cpop-navy); }
.cpop-callout p { margin: 3px 0 0; }
.cpop-callout-green { border-color: #b9ead8; border-left-color: var(--cpop-green); background: #edfaf5; }
.cpop-callout-green .cpop-icon { color: var(--cpop-green); }
.cpop-callout-amber { border-color: #f3d6a3; border-left-color: var(--cpop-amber); background: #fff8ea; }
.cpop-callout-amber .cpop-icon { color: var(--cpop-amber); }
.cpop-callout-red { border-color: #fecaca; border-left-color: var(--cpop-red); background: #fff1f1; }

.cpop-empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed #c4cfdd; border-radius: 7px; background: #f9fbfe; color: var(--cpop-muted); text-align: center; }
.cpop-empty-large { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; }
.cpop-empty-large > div { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 8px; background: #e8f1ff; color: var(--cpop-blue); }
.cpop-empty-large h2 { margin: 15px 0 5px; color: var(--cpop-navy); }
.cpop-empty-large p { max-width: 540px; margin: 0 0 16px; }

.cpop-admin-card { margin-bottom: 18px; }
.cpop-admin-card > .cpop-section-head { margin-bottom: 18px; }
.cpop-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.cpop-readiness { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px; border: 1px solid var(--cpop-line); border-radius: 6px; }
.cpop-readiness .cpop-icon { width: 17px; height: 17px; }
.cpop-readiness.is-ready { background: #f0faf6; color: #06734f; }
.cpop-readiness.is-pending { background: #fff8ea; color: #995900; }
.cpop-rule-table td:first-child { min-width: 260px; }
.cpop-process-picks { display: grid; grid-template-columns: repeat(2, minmax(170px,1fr)); gap: 6px 12px; }
.cpop-process-picks label,
.cpop-check { display: flex; align-items: flex-start; gap: 6px; color: var(--cpop-text); font-size: 11px; }
.cpop-process-picks input,
.cpop-check input { width: 16px; min-height: 16px; margin-top: 1px; }
.cpop-publish-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; }
.cpop-publish-card form { display: grid; gap: 12px; }
.cpop-publish-card form label { display: flex; flex-direction: column; }
.cpop-link-button { padding: 0; background: transparent; color: var(--cpop-blue); font-size: 12px; font-weight: 700; }

.cpop-access-layout { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(0,1.25fr); gap: 18px; }
.cpop-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.cpop-form-grid label { display: flex; flex-direction: column; }
.cpop-form-grid fieldset { margin: 0; padding: 12px; border: 1px solid var(--cpop-line); border-radius: 6px; }
.cpop-span-2 { grid-column: 1 / -1; }
.cpop-user-list { display: grid; gap: 9px; }
.cpop-user-card { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--cpop-line); border-radius: 7px; }
.cpop-user-info { display: flex; flex-direction: column; min-width: 0; }
.cpop-user-info strong,
.cpop-user-info span,
.cpop-user-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpop-user-info span,
.cpop-user-info small { color: var(--cpop-muted); font-size: 11px; }
.cpop-user-actions { grid-column: 2 / -1; display: flex; gap: 12px; }
.cpop-user-actions form { margin: 0; }
.cpop-user-actions button { padding: 0; border: 0; background: transparent; color: var(--cpop-blue); cursor: pointer; font: inherit; font-size: 12px; }

.cpop-login { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(380px,1.25fr); min-height: 100vh; background: var(--cpop-bg); }
.cpop-login-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 54px; background: var(--cpop-navy); color: #fff; }
.cpop-login-brand > span { margin: 0 0 18px; }
.cpop-login-brand strong { font-size: 26px; }
.cpop-login-brand small { color: #aabadd; }
.cpop-login > section { align-self: center; width: min(460px, calc(100% - 48px)); margin: 24px auto; padding: 36px; border: 1px solid var(--cpop-line); border-radius: 8px; background: #fff; box-shadow: var(--cpop-shadow); }
.cpop-login > section > p { color: var(--cpop-muted); }
.cpop-login > section > small { display: block; margin-top: 14px; color: var(--cpop-muted); text-align: center; }
.cpop-login-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px; border-radius: 8px; background: #e8f1ff; color: var(--cpop-blue); }
.cpop-login-icon .cpop-icon { width: 28px; height: 28px; }
.cpop-login-icon.is-warning { background: #fff1d6; color: var(--cpop-amber); }

.cpop-toast { position: fixed; z-index: 1000; right: 20px; bottom: 20px; max-width: 360px; padding: 12px 16px; border-radius: 7px; background: var(--cpop-navy); color: #fff; box-shadow: var(--cpop-shadow); }

.cpop-back-link { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; }

.cpop-document-body :focus-visible,
.cpop-admin-card :focus-visible,
.cpop-admin-head :focus-visible {
    outline: 3px solid rgba(6,182,212,.55);
    outline-offset: 2px;
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
    .cpop-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cpop-grid-3,
    .cpop-process-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cpop-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cpop-access-layout { grid-template-columns: 1fr; }
    .cpop-document-control,
    .cpop-form-overview { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cpop-document-control > div:nth-child(2) { border-right: 0; }
    .cpop-document-control > div:nth-child(-n+2) { border-bottom: 1px solid var(--cpop-line); }
}

@media (max-width: 780px) {
    .cpop-header { grid-template-columns: 42px minmax(0,1fr) auto; height: 64px; padding: 0 12px; }
    .cpop-menu-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 6px; background: #eef3fa; color: var(--cpop-navy); }
    .cpop-brand > span { width: 36px; height: 36px; margin-right: 8px; }
    .cpop-company { display: none; }
    .cpop-user div { display: none; }
    .cpop-user img { width: 36px; height: 36px; }
    .cpop-layout { display: block; padding-top: 64px; }
    .cpop-sidebar { top: 64px; width: min(290px, 86vw); padding-top: 12px; transform: translateX(-105%); transition: transform .2s ease; }
    .cpop-app.is-menu-open .cpop-sidebar { transform: translateX(0); }
    .cpop-sidebar-head { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 14px; color: #aabadd; font-size: 11px; text-transform: uppercase; }
    .cpop-sidebar-head button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: #fff; }
    .cpop-backdrop { position: fixed; z-index: 80; inset: 64px 0 0; width: 100%; border: 0; background: rgba(11,23,54,.55); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .cpop-app.is-menu-open .cpop-backdrop { display: block; opacity: 1; pointer-events: auto; }
    .cpop-main { padding: 24px 18px 0; }
    .cpop-hero { grid-template-columns: 1fr; padding: 28px; }
    .cpop-edition-seal { display: grid; grid-template-columns: auto 1fr; grid-template-rows: repeat(3,auto); justify-items: start; aspect-ratio: auto; text-align: left; }
    .cpop-edition-seal .cpop-icon { grid-row: 1 / 4; margin-right: 14px; }
    .cpop-home-columns,
    .cpop-process-content,
    .cpop-publish-card { grid-template-columns: 1fr; }
    .cpop-document { padding: 28px 24px; }
    .cpop-viewer-toolbar { flex-wrap: wrap; }
    .cpop-form-card form,
    .cpop-record-values,
    .cpop-process-facts { grid-template-columns: 1fr; }
    .cpop-field-table,
    .cpop-form-actions { grid-column: 1; }
    .cpop-process-picks { grid-template-columns: 1fr; }
    .cpop-footer { flex-direction: column; gap: 4px; }
    .cpop-login { grid-template-columns: 1fr; }
    .cpop-login-brand { min-height: 170px; padding: 28px; justify-content: center; }
}

@media (max-width: 520px) {
    .cpop-main { padding-right: 12px; padding-left: 12px; }
    .cpop-page-head,
    .cpop-admin-head,
    .cpop-section-head { flex-direction: column; gap: 10px; }
    .cpop-hero { min-height: 0; padding: 24px 20px; }
    .cpop-hero h1 { font-size: 32px; }
    .cpop-hero-actions,
    .cpop-hero-actions .cpop-button { width: 100%; }
    .cpop-kpis,
    .cpop-grid-4,
    .cpop-grid-3,
    .cpop-process-grid,
    .cpop-check-grid,
    .cpop-form-grid { grid-template-columns: 1fr; }
    .cpop-span-2 { grid-column: 1; }
    .cpop-kpi { min-height: 110px; }
    .cpop-process-band { padding: 14px; }
    .cpop-process-detail { padding: 18px; }
    .cpop-document { padding: 22px 16px; }
    .cpop-document-title h1 { font-size: 25px; }
    .cpop-document-control,
    .cpop-form-overview { grid-template-columns: 1fr; }
    .cpop-document-control > div { border-right: 0; border-bottom: 1px solid var(--cpop-line); }
    .cpop-document-control > div:last-child { border-bottom: 0; }
    .cpop-viewer-toolbar > div { width: 100%; }
    .cpop-viewer-toolbar .cpop-button { flex: 1; }
    .cpop-record-pipeline { overflow-x: auto; }
    .cpop-record-pipeline span { flex: 0 0 auto; }
    .cpop-user-card { grid-template-columns: 38px minmax(0,1fr); }
    .cpop-user-card > .cpop-status { grid-column: 2; }
    .cpop-user-actions { grid-column: 2; }
    .cpop-login > section { width: calc(100% - 24px); padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
    @page { margin: 14mm; }
    body { background: #fff !important; }
    body * { visibility: hidden !important; }
    #cpop-document,
    #cpop-document * { visibility: visible !important; }
    #cpop-document { position: absolute; top: 0; left: 0; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
    #cpop-document .cpop-record-actions { display: none !important; }
    #cpop-document .cpop-table-wrap { overflow: visible; }
    #cpop-document .cpop-table { min-width: 0; font-size: 9px; }
}

.cpop-brand > .cpop-brand-logo,
.cpop-login-brand > .cpop-brand-logo,
.cpop-document-brand > .cpop-brand-logo {
    background: #fff;
    border: 1px solid var(--cpop-line);
    color: transparent;
    overflow: hidden;
    padding: 4px;
}

.cpop-brand-logo img {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

