/*
 * PCOMS public pages (pcs/*): registers, notice detail, verification.
 * Loaded per page via frontend/partials/assets.blade.php, so it works under
 * any frontend theme. Every class is prefixed `pcp-`; the `.pcp-register`
 * rules restyle the shared TableDataView (Tailwind) chrome without editing it.
 * Published to public/hasob-pcoms-module/css/ (php artisan vendor:publish --tag=assets).
 */

.pcp {
    --pcp-brand: #0a9900;
    --pcp-brand-04: #0a99000a;
    --pcp-brand-07: #0a990012;
    --pcp-brand-10: #0a99001a;
    --pcp-brand-20: #0a990033;
    --pcp-brand-25: #0a990040;
    --pcp-ink: #0d1b14;
    --pcp-text: #24302a;
    --pcp-muted: #5d6a63;
    --pcp-line: #e2e7e2;
    --pcp-paper: #f5f7f3;
    --pcp-radius: 14px;
    color: var(--pcp-text);
    font-size: 15px;
    line-height: 1.6;
}
.pcp *, .pcp *::before, .pcp *::after { box-sizing: border-box; }
.pcp a { text-decoration: none; }

/* ---------- Page intro ---------- */

.pcp-intro {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.75rem 1.5rem 1.5rem;
}
.pcp-intro__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--pcp-brand-10);
    color: var(--pcp-brand);
    font-size: 1.5rem;
}
.pcp-intro__eyebrow {
    margin: 0 0 .3rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pcp-brand);
}
body .pcp .pcp-intro__title {
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--pcp-ink);
}
.pcp-intro__lead { margin: .6rem 0 0; max-width: 62rem; color: var(--pcp-muted); }
.pcp-intro__lead b, .pcp-intro__lead strong { color: var(--pcp-ink); }
.pcp-intro__note {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    max-width: 62rem;
    border-radius: 10px;
    background: var(--pcp-brand-07);
    border: 1px solid var(--pcp-brand-20);
    color: var(--pcp-ink);
    font-size: .92rem;
}
.pcp-intro__note i { color: var(--pcp-brand); margin-top: .2rem; }
@media (max-width: 640px) {
    .pcp-intro { flex-direction: column; gap: .9rem; padding: 1.25rem 1rem 1rem; }
}

/* ---------- Register (TableDataView restyle) ---------- */

.pcp-register { padding: 0 1rem 1rem; }
@media (min-width: 768px) { .pcp-register { padding: 0 1.5rem 1.5rem; } }

.pcp-register .bg-blue-600,
.pcp-register .bg-red-600 {
    background: #fff !important;
    color: var(--pcp-ink) !important;
    border: 1px solid var(--pcp-line) !important;
    border-radius: 9px !important;
    padding: .45rem .8rem !important;
    font-weight: 600;
    font-size: .85rem !important;
    transition: border-color .15s ease, color .15s ease;
}
.pcp-register .bg-blue-600:hover,
.pcp-register .bg-red-600:hover { border-color: var(--pcp-brand) !important; color: var(--pcp-brand) !important; }

/* Search: input + attached button */
.pcp-register input[type="text"] {
    border: 1px solid var(--pcp-line) !important;
    border-radius: 9px 0 0 9px !important;
    padding: .5rem .8rem !important;
    font-size: .92rem;
    min-height: 40px;
}
.pcp-register input[type="text"]:focus {
    outline: none;
    border-color: var(--pcp-brand) !important;
    box-shadow: 0 0 0 3px var(--pcp-brand-20) !important;
}
.pcp-register input[type="text"] + button,
.pcp-register [id$="-btn-search"] {
    background: var(--pcp-brand) !important;
    border-color: var(--pcp-brand) !important;
    color: #fff !important;
    border-radius: 0 9px 9px 0 !important;
    min-height: 40px;
}

.pcp-register table { width: 100%; border-collapse: separate; border-spacing: 0; }
.pcp-register thead th {
    background: var(--pcp-paper) !important;
    color: var(--pcp-muted) !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
    letter-spacing: .08em;
    padding: .7rem .9rem !important;
    border-top: 1px solid var(--pcp-line);
    border-bottom: 1px solid var(--pcp-line);
}
.pcp-register thead th:first-child { border-left: 1px solid var(--pcp-line); border-radius: 10px 0 0 0; }
.pcp-register thead th:last-child { border-right: 1px solid var(--pcp-line); border-radius: 0 10px 0 0; }
.pcp-register tbody td { border-bottom: 1px solid var(--pcp-line); vertical-align: top; }
.pcp-register tbody tr:hover td { background: var(--pcp-brand-04); }
.pcp-register caption { caption-side: bottom; padding-top: .75rem; font-size: .8rem; color: var(--pcp-muted); text-align: left; }

/* Pagination & spinner */
.pcp-register .tbv-current-page { background: var(--pcp-brand) !important; border-color: var(--pcp-brand) !important; }
.pcp-register [id^="spinner-"] .loader { border-top-color: var(--pcp-brand) !important; }
.pcp-register [id$="-pagination"] a,
.pcp-register [id$="-pagination"] span { border-radius: 8px; }

/* ---------- Register rows ---------- */

.pcp-row td { padding: .9rem; font-size: .9rem; }
.pcp-row__index { width: 3rem; color: var(--pcp-muted); font-variant-numeric: tabular-nums; font-size: .82rem !important; }
.pcp-row__title { display: block; font-weight: 600; color: var(--pcp-ink); line-height: 1.35; }
a.pcp-row__title:hover { color: var(--pcp-brand); }
.pcp-row__sub { display: block; margin-top: .2rem; color: var(--pcp-muted); font-size: .85rem; }
.pcp-row__links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .5rem; }
.pcp-row__links a { display: inline-flex; align-items: center; gap: .35rem; font-size: .83rem; font-weight: 600; color: var(--pcp-brand); }
.pcp-row__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcp-row__date { white-space: nowrap; color: var(--pcp-ink); font-weight: 600; font-size: .86rem; }
.pcp-row__date small { display: block; font-weight: 400; color: var(--pcp-muted); font-size: .78rem; }
.pcp-row__logo { height: 44px; width: 44px; object-fit: contain; border-radius: 8px; border: 1px solid var(--pcp-line); background: #fff; flex-shrink: 0; }
.pcp-row__entity { display: flex; gap: .8rem; align-items: flex-start; }
.pcp-row__actions { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }

.pcp-meta { display: flex; flex-direction: column; gap: .3rem; }
.pcp-meta__item { display: flex; gap: .4rem; align-items: baseline; font-size: .85rem; }
.pcp-meta__label { color: var(--pcp-muted); min-width: 2.6rem; }

.pcp-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem;
    font-weight: 600;
    color: var(--pcp-ink);
    background: var(--pcp-paper);
    border: 1px solid var(--pcp-line);
    border-radius: 6px;
    padding: .1rem .4rem;
    word-break: break-all;
}

.pcp-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    background: var(--pcp-paper);
    border: 1px solid var(--pcp-line);
    color: var(--pcp-muted);
    white-space: nowrap;
}
.pcp-badge--brand { background: var(--pcp-brand-10); border-color: var(--pcp-brand-25); color: var(--pcp-brand); }
.pcp-badge--warn { background: #fff7e6; border-color: #f5d08a; color: #8a5a00; }
.pcp-badge--danger { background: #fdecec; border-color: #f2b8b8; color: #a12020; }
.pcp-badge--info { background: #eaf2fd; border-color: #b9d3f5; color: #1d4f91; }

/* ---------- Buttons ---------- */

.pcp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: filter .15s ease, border-color .15s ease, color .15s ease;
}
.pcp-btn--primary { background: var(--pcp-brand); color: #fff !important; }
.pcp-btn--primary:hover { filter: brightness(.92); }
.pcp-btn--outline { background: #fff; border-color: var(--pcp-line); color: var(--pcp-ink) !important; }
.pcp-btn--outline:hover { border-color: var(--pcp-brand); color: var(--pcp-brand) !important; }
.pcp-btn--lg { padding: .75rem 1.15rem; font-size: .95rem; }
.pcp-btn--block { width: 100%; }

/* ---------- Detail pages (notice, verification) ---------- */

.pcp-detail { padding: 1.5rem; }
@media (min-width: 768px) { .pcp-detail { padding: 2rem; } }

.pcp-back { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; color: var(--pcp-muted); }
.pcp-back:hover { color: var(--pcp-brand); }

.pcp-detail__head { margin: 1rem 0 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--pcp-line); }
.pcp-detail__entity { margin: 0 0 .4rem; font-size: .9rem; font-weight: 600; color: var(--pcp-brand); }
body .pcp .pcp-detail__title { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; color: var(--pcp-ink); }
.pcp-detail__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; align-items: center; }

.pcp-detail__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1024px) { .pcp-detail__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

.pcp-card { padding: 1.35rem; border: 1px solid var(--pcp-line); border-radius: var(--pcp-radius); background: #fff; }
.pcp-card--muted { background: var(--pcp-paper); }
body .pcp .pcp-card__title { margin: 0 0 1rem; font-size: 1rem; font-weight: 700; color: var(--pcp-ink); }
.pcp-card__text { margin: 0 0 1rem; color: var(--pcp-muted); font-size: .9rem; }

.pcp-facts { display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; margin: 0; }
@media (min-width: 640px) { .pcp-facts { grid-template-columns: 1fr 1fr; } }
.pcp-facts dt { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pcp-muted); }
.pcp-facts dd { margin: .25rem 0 0; font-weight: 600; color: var(--pcp-ink); }
.pcp-facts dd.is-empty { font-weight: 400; color: var(--pcp-muted); font-style: italic; }
.pcp-facts dd.is-urgent { color: #a12020; }

.pcp-timeline { display: flex; flex-direction: column; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.pcp-timeline li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--pcp-line); font-size: .9rem; }
.pcp-timeline li:last-child { border-bottom: 0; }
.pcp-timeline span:first-child { color: var(--pcp-muted); }
.pcp-timeline span:last-child { font-weight: 600; color: var(--pcp-ink); text-align: right; }

.pcp-fee { margin: 0 0 1rem; padding: 1rem; border-radius: 10px; background: var(--pcp-paper); border: 1px solid var(--pcp-line); }
.pcp-fee__label { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pcp-muted); }
.pcp-fee__value { margin: .2rem 0 0; font-size: 1.6rem; font-weight: 800; color: var(--pcp-ink); }
.pcp-small { margin: .9rem 0 0; font-size: .82rem; color: var(--pcp-muted); }
.pcp-small a { color: var(--pcp-brand); font-weight: 600; }

/* Verification result banner */
.pcp-status {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.1rem 1.25rem;
    border-radius: var(--pcp-radius);
    border: 1px solid;
    margin-bottom: 1.5rem;
}
.pcp-status i { font-size: 1.6rem; line-height: 1; margin-top: .1rem; }
body .pcp .pcp-status__title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.pcp-status__text { margin: .25rem 0 0; font-size: .92rem; }
.pcp-status--info { background: #eaf2fd; border-color: #b9d3f5; color: #1d4f91; }
.pcp-status--warn { background: #fff7e6; border-color: #f5d08a; color: #6b4600; }

.pcp-steps { margin: 0; padding-left: 1.2rem; list-style: decimal; }
.pcp-steps li { margin: .4rem 0; font-size: .92rem; }

@media print {
    .pcp-register .bg-blue-600, .pcp-register .bg-red-600, .pcp-register input, .pcp-register button { display: none !important; }
}

/* ---------- Vendor registration: landing ---------- */

.pcp-band {
    padding: 2.25rem 1.5rem;
    border-radius: var(--pcp-radius);
    background: linear-gradient(135deg, var(--pcp-ink) 0%, #16301f 100%);
    color: #dbe5de;
}
@media (min-width: 768px) { .pcp-band { padding: 3rem; } }
body .pcp .pcp-band__title { margin: .4rem 0 0; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.pcp-band__lead { margin: .9rem 0 0; max-width: 44rem; font-size: 1.02rem; color: #dbe5de; }
.pcp-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.pcp-band .pcp-intro__eyebrow { color: #b9f0b4; }
.pcp-btn--ghost { background: transparent; border-color: rgb(255 255 255 / .35); color: #fff !important; }
.pcp-btn--ghost:hover { background: rgb(255 255 255 / .1); }

.pcp-section-title { margin: 2.25rem 0 1rem; font-size: 1.15rem; font-weight: 700; color: var(--pcp-ink); }

.pcp-benefits { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 700px) { .pcp-benefits { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pcp-benefits { grid-template-columns: repeat(3, 1fr); } }
.pcp-benefit { display: flex; gap: .9rem; padding: 1.1rem; border: 1px solid var(--pcp-line); border-radius: 12px; background: #fff; }
.pcp-benefit__icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--pcp-brand-10); color: var(--pcp-brand); font-size: 1.15rem; }
body .pcp .pcp-benefit__title { margin: 0; font-size: .98rem; font-weight: 700; color: var(--pcp-ink); }
.pcp-benefit__text { margin: .2rem 0 0; font-size: .88rem; color: var(--pcp-muted); }

.pcp-checklist { display: grid; grid-template-columns: 1fr; gap: .6rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .pcp-checklist { grid-template-columns: 1fr 1fr; } }
.pcp-checklist li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.pcp-checklist i { color: var(--pcp-brand); margin-top: .15rem; }

.pcp-numbered { margin: 0; padding: 0; list-style: none; counter-reset: pcp-step; display: grid; gap: .8rem; }
.pcp-numbered li { counter-increment: pcp-step; display: flex; gap: .8rem; align-items: flex-start; font-size: .93rem; }
.pcp-numbered li::before {
    content: counter(pcp-step);
    display: grid; place-items: center; flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--pcp-brand); color: #fff; font-size: .8rem; font-weight: 700;
}

/* ---------- Vendor registration: form ---------- */

.pcp-alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; margin-bottom: 1.25rem; border-radius: 10px; border: 1px solid; font-size: .92rem; }
.pcp-alert i { font-size: 1.1rem; margin-top: .05rem; }
.pcp-alert ul { margin: .35rem 0 0; padding-left: 1.1rem; list-style: disc; }
.pcp-alert--success { background: var(--pcp-brand-07); border-color: var(--pcp-brand-25); color: var(--pcp-ink); }
.pcp-alert--success i { color: var(--pcp-brand); }
.pcp-alert--danger { background: #fdecec; border-color: #f2b8b8; color: #7d1a1a; }
.pcp-alert--info { background: #eaf2fd; border-color: #b9d3f5; color: #1d4f91; }

.pcp-step { padding: 1.4rem; margin-bottom: 1rem; border: 1px solid var(--pcp-line); border-radius: var(--pcp-radius); background: #fff; }
.pcp-step__head { display: flex; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.pcp-step__label { display: flex; gap: .7rem; align-items: center; }
.pcp-step__num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pcp-brand-10); color: var(--pcp-brand); font-weight: 800; font-size: .85rem; flex-shrink: 0; }
body .pcp .pcp-step__title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--pcp-ink); }
.pcp-step__hint { margin: -.4rem 0 1rem; font-size: .88rem; color: var(--pcp-muted); }

.pcp-fields { display: grid; grid-template-columns: 1fr; gap: 1rem 1.25rem; }
@media (min-width: 700px) {
    .pcp-fields { grid-template-columns: 1fr 1fr; }
    .pcp-field--full { grid-column: 1 / -1; }
    .pcp-fields--cac { grid-template-columns: 5fr 4fr 3fr; align-items: end; }
}
.pcp-field { min-width: 0; }
.pcp .pcp-label { display: block; margin: 0 0 .35rem; font-size: .86rem; font-weight: 600; color: var(--pcp-ink); }
.pcp-req { color: #b42318; }
.pcp-opt { font-weight: 400; color: var(--pcp-muted); font-size: .8rem; }
.pcp .pcp-input {
    display: block;
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid #cfd6d0;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: .95rem;
    color: var(--pcp-ink);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pcp .pcp-input:focus { outline: none; border-color: var(--pcp-brand); box-shadow: 0 0 0 3px var(--pcp-brand-20); }
.pcp .pcp-input.is-invalid { border-color: #d92d20; }
.pcp .pcp-input.is-filled { border-color: var(--pcp-brand); background: var(--pcp-brand-04); }
.pcp textarea.pcp-input { min-height: 90px; resize: vertical; }
.pcp-help { margin: .3rem 0 0; font-size: .8rem; color: var(--pcp-muted); }
.pcp-error { margin: .3rem 0 0; font-size: .82rem; color: #b42318; }

.pcp-consent { display: flex; gap: .75rem; align-items: flex-start; font-size: .92rem; }
.pcp-consent input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--pcp-brand); flex-shrink: 0; }
.pcp-consent a { color: var(--pcp-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.pcp-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: .5rem; }
.pcp-btn[disabled], .pcp-btn.is-busy { opacity: .65; pointer-events: none; }
.pcp-spin { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pcp-spin .7s linear infinite; }
@keyframes pcp-spin { to { transform: rotate(360deg); } }

/* ---------- Vendor registration: success ---------- */

.pcp-success { max-width: 46rem; margin: 0 auto; padding: 2rem 1.5rem; text-align: center; }
.pcp-success__icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1.25rem; border-radius: 50%; background: var(--pcp-brand-10); color: var(--pcp-brand); font-size: 2.2rem; }
body .pcp .pcp-success__title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--pcp-ink); }
.pcp-success__lead { margin: .6rem 0 1.25rem; color: var(--pcp-muted); font-size: 1.02rem; }
.pcp-success .pcp-card { text-align: left; margin-top: 1.5rem; }
.pcp-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.5rem; }
