/* ========== DCP Intake Admin Styles (2025-12-10c) ========== */
:root {
    --card: #fff;
    --bd: #e9eef3;
    --ink: #0f172a;
    --muted: #64748b;
    --brand1: #60a5fa;
    --brand2: #4f46e5;
    --good1: #22c55e;
    --good2: #16a34a;
    --warn1: #f59e0b;
    --warn2: #d97706;
    --bad1: #ef4444;
    --bad2: #dc2626;
    --safe1: #e9fce9;
    --safe2: #d3f9d8;
    --bar1: #ecf2f7;
    --bar2: #e3eaf0;
    --bg: #f7f9fb;
}

.dcp-wrap {
    min-height: 100vh;
    background: var(--bg);
    padding: 24px
}

.dcp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px
}

    .dcp-head h1 {
        margin: 0;
        font-size: 20px;
        color: var(--ink)
    }

    .dcp-head p {
        margin: 6px 0 0;
        color: var(--muted);
        font-size: 13px
    }

.dcp-btn {
    border: 1px solid var(--bd);
    background: #f1f5f9;
    color: #334155;
    padding: .5rem .9rem;
    border-radius: .6rem;
    font-weight: 600
}

    .dcp-btn:hover {
        background: #e2e8f0
    }

.dcp-primary {
    background: linear-gradient(90deg,var(--brand1),var(--brand2));
    border: none;
    color: #fff
}

    .dcp-primary:hover {
        filter: brightness(.97)
    }

.dcp-link {
    color: #2563eb;
    font-weight: 700
}

.dcp-muted {
    color: var(--muted)
}

.dcp-center {
    text-align: center
}

.dcp-card {
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 1rem;
    padding: 16px
}

/* Filters */
.dcp-grid {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 10px;
    margin-bottom: 12px
}

    .dcp-grid input, .dcp-grid button {
        border: 1px solid var(--bd);
        border-radius: .6rem;
        padding: .5rem .7rem
    }

    .dcp-grid button {
        border: none
    }

/* List table */
.dcp-table-wrap {
    overflow: auto
}

.dcp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0
}

    .dcp-table th, .dcp-table td {
        padding: 10px;
        border-bottom: 1px solid var(--bd);
        text-align: left;
        font-size: 14px
    }

    .dcp-table thead th {
        background: #f1f5f9;
        font-weight: 700
    }

/* Bar graph wrapper (keep 100% width) */
.dcp-graph-wrap {
    width: 100%
}

    .dcp-graph-wrap svg {
        display: block;
        width: 100%;
        height: auto
    }

/* Modal */
.dcp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999
}

    .dcp-modal.show {
        display: flex
    }

.dcp-modal-card {
    width: min(1100px,96vw);
    max-height: 86vh;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--bd);
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.dcp-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bd);
    padding: 14px 18px
}

    .dcp-modal-head h3 {
        margin: 0;
        font-size: 18px;
        color: var(--ink);
        font-weight: 800
    }

.dcp-modal-body {
    padding: 18px;
    overflow: auto
}

/* Print pages in modal body */
.print-page {
    page-break-after: always
}

    .print-page:last-child {
        page-break-after: auto
    }

/* Result header */
.dcp-res-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px
}

.dcp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #4338ca
}

.dcp-h-group {
    flex: 1
}

.dcp-h-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink)
}

.dcp-h-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--muted)
}

.dcp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px
}

.dcp-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 12px
}

    .dcp-dot .d {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 50%
    }

/* Total card */
.dcp-total {
    background: #ffffff;
    border: 1px solid var(--bd);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px
}

    .dcp-total .top {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 8px
    }

    .dcp-total h2 {
        margin: 0;
        font-size: 16px;
        font-weight: 800;
        color: #0f172a
    }

    .dcp-total .meta {
        font-size: 12px;
        color: var(--muted)
    }

/* Grid sections */
.dcp-grid-2 {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px
}

@media (max-width:900px) {
    .dcp-grid-2 {
        grid-template-columns: 1fr
    }
}

.dcp-sec-card {
    background: #fff;
    border: 1px solid var(--bd);
    border-radius: 16px;
    padding: 14px
}

.dcp-sec-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.dcp-sec-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a
}

.dcp-sec-sub {
    font-size: 12px;
    color: var(--muted)
}

/* Small pills */
.dcp-pill {
    display: inline-flex;
    gap: 8px
}

    .dcp-pill .p {
        padding: .35rem .6rem;
        border-radius: .6rem;
        font-size: 12px;
        font-weight: 700
    }

.p-hot {
    background: #fee2e2;
    color: #b91c1c
}

.p-cold {
    background: #dbeafe;
    color: #1d4ed8
}

/* Advice blocks */
.dcp-advice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px
}

@media (max-width:900px) {
    .dcp-advice {
        grid-template-columns: 1fr
    }
}

.dcp-box {
    background: #f8fafc;
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 12px
}

    .dcp-box b {
        display: block;
        margin-bottom: 6px;
        color: #0f172a
    }

/* Print page spacing */
.print-page .dcp-total {
    margin-top: 8px
}

/* Print colors */
@page {
    margin: 14mm
}

* {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact
}



/* ==== DCP Cons Viewer (Append) ==== */
.dcp-cons-root {
    max-width: 900px;
    margin: 0 auto;
}

.dcp-cons-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.dcp-cons-header {
    text-align: center;
    margin-bottom: 16px;
}

.dcp-cons-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin: 0;
}

.dcp-cons-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 8px;
}

.dcp-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .dcp-row label {
        font-size: 13px;
        color: #374151;
    }

    .dcp-row input {
        height: 40px;
        padding: 0 12px;
        border: 1px solid #d1d5db;
        border-radius: 10px;
    }

.dcp-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.dcp-btn {
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
}

    .dcp-btn:hover {
        background: #f9fafb;
    }

.dcp-btn-primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

    .dcp-btn-primary:hover {
        background: #000;
    }

.dcp-btn-print {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

    .dcp-btn-print:hover {
        background: #1d4ed8;
    }

.dcp-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 18px 0;
}

.dcp-section {
    margin: 18px 0 10px;
}

.dcp-section-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
}

.dcp-kv {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

    .dcp-kv > div {
        display: flex;
        justify-content: space-between;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
    }

    .dcp-kv span {
        color: #6b7280;
    }

    .dcp-kv strong {
        color: #111827;
    }

.dcp-list {
    margin: 0;
    padding-left: 18px;
}

    .dcp-list li {
        margin: 6px 0;
        line-height: 1.5;
    }

.dcp-rich {
    line-height: 1.7;
}

/* Print: º»¹®¸¸ */
@media print {
    body * {
        visibility: hidden !important;
    }

    header, footer, nav, .site-header, .site-footer, .widget, .no-print, .sticky, .fixed, .cta-bar {
        display: none !important;
    }

    .dcp-cons-print-root, .dcp-cons-print-root * {
        visibility: visible !important;
    }

    .dcp-cons-print-root {
        position: relative !important;
        box-shadow: none !important;
        border: none !important;
    }

    @page {
        margin: 12mm;
    }

    .dcp-cons-title {
        font-size: 22px !important;
    }
}
