/* =====================================================================
   Postulación en Línea — Convocatorias HREGB (postulacion.php)
   Prefijo: .pc-*   ·   Paleta de marca MINSA (#004481 / #0066cc)
   ===================================================================== */
.pc-layout { padding-bottom: 2.5rem; }
.pc-layout .main-content { width: 100%; min-width: 0; }
.pc-layout p, .pc-overlay p { max-width: none; }

.pc-card {
    background: #fff; border: 1px solid #e6eaf0; border-radius: 14px;
    padding: 22px 24px; box-shadow: 0 4px 18px rgba(15, 23, 42, .04); margin-bottom: 20px;
}
.pc-muted { color: #64748b; font-size: .9rem; line-height: 1.55; }
.pc-legal { color: #64748b; font-size: .78rem; line-height: 1.5; margin: 14px 0 0; }
.pc-legal a, .pc-muted a, .pc-closed a, .pc-empty a { color: #0056ac; font-weight: 600; }
.pc-sub { color: #004481; font-size: 1rem; margin: 18px 0 10px; }
.pc-kicker {
    display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    color: #0066cc; background: rgba(0, 102, 204, .08); padding: 4px 10px; border-radius: 20px;
}

/* ---------- Botones ---------- */
.pc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer;
    background: linear-gradient(135deg, #004481, #0066cc); color: #fff !important;
    font-family: inherit; font-weight: 700; font-size: .9rem; line-height: 1.2; text-decoration: none; min-height: 44px;
    box-shadow: 0 4px 14px rgba(0, 68, 129, .22); transition: transform .15s, box-shadow .15s;
}
.pc-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 68, 129, .28); }
.pc-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.pc-btn .material-icons-round { font-size: 1.15rem; }
.pc-btn-ghost { background: #fff; color: #004481 !important; border-color: #cbd5e1; box-shadow: none; }
.pc-btn-ghost:hover { border-color: #004481; box-shadow: none; }
.pc-btn-lg { padding: 14px 26px; font-size: 1rem; }
.pc-btn-block { display: flex; width: 100%; margin-top: 10px; }

/* ---------- Alertas ---------- */
.pc-alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .88rem; line-height: 1.5; }
.pc-alert[hidden], .pc-total[hidden], .pc-bonif-body[hidden] { display: none !important; }
.pc-alert > .material-icons-round { flex-shrink: 0; }
.pc-alert ul { margin: 6px 0 0; padding-left: 18px; }
.pc-alert-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.pc-alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ---------- Pestañas ---------- */
.pc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid #eef1f5; }
.pc-tab {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
    padding: 12px 18px; font-family: inherit; font-weight: 700; font-size: .95rem; color: #64748b; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.pc-tab.active { color: #004481; border-bottom-color: #004481; }

/* ---------- Listado de procesos ---------- */
.pc-group-title { display: flex; align-items: center; gap: 8px; color: #1e293b; font-size: 1.05rem; margin: 8px 0 14px; }
.pc-group-title small { color: #94a3b8; font-weight: 600; }
.pc-group-title .material-icons-round { color: #0066cc; }
.pc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-bottom: 26px; }
.pc-proc {
    display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e6eaf0;
    border-top: 4px solid #94a3b8; border-radius: 14px; padding: 18px; box-shadow: 0 4px 18px rgba(15, 23, 42, .04);
}
.pc-proc h3 { margin: 2px 0 0; font-size: 1rem; color: #0f172a; line-height: 1.35; }
.pc-proc .pc-btn { margin-top: auto; }
.pc-proc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-proc-code { margin: 0; color: #64748b; font-size: .82rem; }
.pc-proc-meta { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 4px; font-size: .82rem; color: #475569; }
.pc-proc-meta li { display: flex; align-items: center; gap: 6px; }
.pc-proc-meta .material-icons-round { font-size: 1rem; color: #0066cc; }
.pc-st { font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 20px; background: #f1f5f9; color: #475569; }
.pc-st-open { border-top-color: #16a34a; }
.pc-st-open .pc-st { background: #dcfce7; color: #166534; }
.pc-st-next { border-top-color: #0066cc; }
.pc-st-next .pc-st { background: #e3f0ff; color: #004481; }
.pc-st-cancel { border-top-color: #dc2626; }
.pc-st-cancel .pc-st { background: #fde8e8; color: #991b1b; }
.pc-empty { text-align: center; padding: 36px 22px; }
.pc-empty > .material-icons-round { font-size: 46px; color: #94a3b8; }
.pc-empty h3 { color: #1e293b; margin: 8px 0; }
.pc-empty p { color: #64748b; max-width: 560px; margin: 0 auto; }
.pc-marco h3, .pc-tips h3 { display: flex; align-items: center; gap: 8px; color: #004481; font-size: 1rem; margin: 0 0 10px; }
.pc-marco ul, .pc-tips ul { margin: 0; padding-left: 20px; color: #475569; font-size: .84rem; line-height: 1.6; }

/* ---------- Detalle + ficha ---------- */
.pc-back { display: inline-flex; align-items: center; gap: 6px; color: #004481; font-weight: 600; text-decoration: none; margin-bottom: 14px; font-size: .9rem; }
.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.pc-aside { position: sticky; top: 16px; }
.pc-proc-title { font-size: 1.1rem; color: #0f172a; margin: 10px 0 2px; line-height: 1.35; }
.pc-desc { font-size: .85rem; color: #334155; line-height: 1.6; background: #f8fafc; border-radius: 10px; padding: 12px 14px; max-height: 320px; overflow: auto; }
.pc-countdown { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #ecfdf5; color: #166534; font-weight: 700; font-size: .88rem; }
.pc-countdown.is-soon { background: #fff7ed; color: #9a3412; }
.pc-countdown.is-over { background: #fef2f2; color: #991b1b; }

.pc-dl { display: grid; gap: 0; margin: 14px 0 0; }
.pc-dl > div { display: grid; grid-template-columns: 190px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef1f5; font-size: .88rem; }
.pc-dl dt { color: #64748b; font-weight: 600; }
.pc-dl dd { margin: 0; color: #0f172a; font-weight: 600; overflow-wrap: anywhere; }
.pc-dl-sm > div { grid-template-columns: 1fr; gap: 2px; }
.pc-dl-sm dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .3px; }

.pc-closed { display: flex; gap: 14px; align-items: flex-start; }
.pc-closed > .material-icons-round { font-size: 34px; color: #0066cc; }
.pc-closed h3 { margin: 0 0 6px; color: #0f172a; }
.pc-closed p { margin: 0; color: #475569; line-height: 1.55; }

.pc-form { padding: 6px 24px 22px; }
.pc-fs { border: none; border-bottom: 1px solid #eef1f5; margin: 0; padding: 18px 0; min-width: 0; }
.pc-fs legend { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #004481; font-size: 1rem; padding: 0; margin-bottom: 12px; }
.pc-fs legend small { color: #94a3b8; font-weight: 600; }
.pc-step { width: 28px; height: 28px; border-radius: 50%; background: #004481; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.pc-row2, .pc-row3 { display: grid; gap: 14px; }
.pc-row2 { grid-template-columns: 1fr 1fr; }
.pc-row3 { grid-template-columns: repeat(3, 1fr); }
.pc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.pc-field label, .pc-label { font-size: .82rem; font-weight: 700; color: #374151; }
.pc-field .req { color: #dc2626; }
.pc-field input, .pc-field select {
    width: 100%; padding: 11px 13px; border: 1.5px solid #d8dde5; border-radius: 10px; font-family: inherit; font-size: .92rem;
    color: #0f172a; background: #fff; min-height: 44px; box-sizing: border-box;
}
.pc-field input:focus, .pc-field select:focus { outline: none; border-color: #004481; box-shadow: 0 0 0 3px rgba(0, 68, 129, .12); }
.pc-radios { display: flex; gap: 20px; flex-wrap: wrap; }
.pc-radios label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; min-height: 32px; }
.pc-hint { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: #475569; background: #f0f7ff; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; line-height: 1.5; }
.pc-hint .material-icons-round { font-size: 1.1rem; color: #0066cc; }

.pc-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: #334155; line-height: 1.5; cursor: pointer; }
.pc-check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: #004481; }
.pc-check-sm { font-size: .8rem; margin-top: 10px; }
.pc-dj { padding: 10px 12px; border: 1px solid #eef1f5; border-radius: 10px; margin-bottom: 8px; background: #fafbfd; }
.pc-dj:has(input:checked) { border-color: #bbf7d0; background: #f0fdf4; }
.pc-bonif { border: 1px solid #eef1f5; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.pc-bonif-body { margin-top: 10px; }

.pc-file {
    position: relative; display: flex; align-items: center; gap: 12px; border: 2px dashed #cbd5e1; border-radius: 12px;
    padding: 14px 16px; margin-bottom: 10px; cursor: pointer; background: #fff; transition: border-color .2s, background .2s;
}
.pc-file:hover, .pc-file:focus-within { border-color: #0066cc; background: #f8fbff; }
.pc-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pc-file > .material-icons-round { font-size: 28px; color: #0066cc; flex-shrink: 0; }
.pc-file-txt { font-size: .86rem; color: #334155; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.pc-file-name { display: block; margin-top: 4px; font-size: .8rem; font-weight: 700; }
.pc-file.is-ok { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.pc-file.is-ok .pc-file-name { color: #166534; }
.pc-file.is-err { border-style: solid; border-color: #fca5a5; background: #fef2f2; }
.pc-file.is-err .pc-file-name { color: #991b1b; }
.pc-tag { display: inline-block; margin-left: 6px; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 10px; background: #fee2e2; color: #991b1b; vertical-align: middle; }
.pc-tag-opt { background: #f1f5f9; color: #475569; }
.pc-total { font-size: .84rem; font-weight: 700; color: #166534; margin: 4px 0 0; }
.pc-total.is-over { color: #991b1b; }

.pc-submit { text-align: center; padding-top: 18px; }
.pc-submit p { color: #64748b; font-size: .86rem; margin: 0 0 12px; }

/* ---------- Constancia ---------- */
.pc-constancia { max-width: 820px; margin: 0 auto 20px; }
.pc-constancia h2 { text-align: center; color: #004481; margin: 6px 0; }
.pc-constancia > .pc-muted { text-align: center; }
.pc-ok-ico { width: 72px; height: 72px; margin: 4px auto 10px; border-radius: 50%; background: rgba(22, 163, 74, .1); display: flex; align-items: center; justify-content: center; }
.pc-ok-ico .material-icons-round { font-size: 42px; color: #16a34a; }
.pc-code { text-align: center; margin: 16px auto; padding: 14px 20px; border: 1.5px dashed #0066cc; background: #f0f7ff; border-radius: 12px; max-width: 380px; }
.pc-code span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: #64748b; font-weight: 700; }
.pc-code strong { font-size: 1.5rem; color: #004481; letter-spacing: 1px; }
.pc-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pc-table th, .pc-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.pc-table th { color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .3px; }
.pc-hash { font-family: Consolas, 'Courier New', monospace; font-size: .78rem; color: #475569; white-space: nowrap; }
.pc-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Consulta ---------- */
.pc-search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.pc-search .pc-field { margin-bottom: 0; }
.pc-res { border-top: 1px solid #e2e8f0; margin-top: 18px; padding-top: 18px; }
.pc-res-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.pc-res-lbl { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; font-weight: 700; margin-bottom: 4px; }
.pc-res-code { font-size: 1.3rem; color: #004481; }
.pc-res-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #166534; background: #dcfce7; padding: 4px 12px; border-radius: 20px; font-size: .82rem; }
.pc-res-ok .material-icons-round { font-size: 1rem; }
.pc-res-obs { margin-top: 14px; background: #f8fafc; border-left: 4px solid #0066cc; border-radius: 8px; padding: 12px 14px; font-size: .86rem; color: #334155; line-height: 1.55; }
.pc-res-empty { border-top: 1px solid #e2e8f0; margin-top: 18px; padding: 26px 10px 6px; text-align: center; }
.pc-res-empty > .material-icons-round { font-size: 42px; color: #94a3b8; }
.pc-res-empty h4 { margin: 6px 0; color: #1e293b; }
.pc-res-empty p { color: #64748b; margin: 0 0 10px; }
.pc-res-empty ul { display: inline-block; text-align: left; color: #475569; font-size: .84rem; line-height: 1.6; margin: 0; }

/* ---------- Overlay de envío ---------- */
.pc-overlay { position: fixed; inset: 0; z-index: 99999; background: rgba(15, 23, 42, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pc-overlay[hidden] { display: none; }
.pc-overlay-box { background: #fff; border-radius: 16px; padding: 28px 26px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.pc-overlay-box h3 { margin: 8px 0 4px; color: #004481; }
.pc-overlay-box p { margin: 0; color: #64748b; font-size: .88rem; }
.pc-spin { font-size: 44px; color: #0066cc; animation: pcPulse 1.4s ease-in-out infinite; }
@keyframes pcPulse { 50% { transform: translateY(-4px); opacity: .7; } }
.pc-bar { height: 10px; background: #e2e8f0; border-radius: 10px; overflow: hidden; margin: 16px 0 6px; }
.pc-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #004481, #0066cc); transition: width .2s; }
.pc-bar-txt { font-weight: 700; color: #004481 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .pc-grid { grid-template-columns: 1fr; }
    .pc-aside { position: static; order: -1; }
}
@media (max-width: 680px) {
    .pc-row2, .pc-row3, .pc-search { grid-template-columns: 1fr; }
    .pc-dl > div { grid-template-columns: 1fr; gap: 2px; }
    .pc-card, .pc-form { padding-left: 16px; padding-right: 16px; }
    .pc-hash { white-space: normal; word-break: break-all; }
}
@media (prefers-reduced-motion: reduce) {
    .pc-spin { animation: none; }
    .pc-btn, .pc-bar-fill { transition: none; }
}

/* ---------- Impresión de la constancia ---------- */
@media print {
    .gob-header, .banner-image-container, .main-nav, .main-footer, .skip-link, .page-hero,
    .pc-noprint, .pc-overlay, [class*="assistant"] { display: none !important; }
    .pc-card { box-shadow: none; border: 1px solid #cbd5e1; }
    .pc-constancia { max-width: none; }
}

/* ---------- Diálogo de confirmación (reemplaza confirm() nativo) ---------- */
.pc-confirm-box { max-width: 460px; }
.pc-confirm-ico { font-size: 30px; color: #004481; background: #e3f0ff; width: 58px; height: 58px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.pc-confirm-box p { margin: 6px 0 0; line-height: 1.55; }
.pc-confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 480px) { .pc-confirm-actions .pc-btn { width: 100%; } }
