/* Docuwise Partners portal. Mirrors My Docuwise's dashboard look: Roboto 14px on #f7f7f7,
   white shadowed header with the 220px logo, .panel cards, h3 + icon headings, gold .step-number
   pills, square pastel uppercase buttons. Colour tokens from docuwise.config.scss. */

:root {
    --pp-green: #DFF2DF;
    --pp-green-dark: #1F4C1F;
    --pp-green-mid-dark: #7fc27f;
    --pp-coral: #F9D5BD;
    --pp-coral-light: #FBE4D5;
    --pp-coral-dark: #EE8B49;
    --pp-peach-light: #FCEEE3;
    --pp-red: #FAD4D4;
    --pp-red-dark: #600B0B;
    --pp-gold: #FBB03B;
    --pp-gold-light: #FCCB7E;
    --pp-gold-lighter: #FDD495;
    --pp-gold-super-light: #FEE6BD;
    --pp-slate: #3A4A58;
    --pp-slate-lighter: #8fa1b0;
    --pp-text: #333;
    --pp-muted: #777;
    --pp-line: #e0e0e0;
    --pp-bg: #f7f7f7;
}

html { font-size: 14px; background: var(--pp-bg); }
body { margin: 0; background: var(--pp-bg); color: var(--pp-text); font-family: 'Roboto', sans-serif; font-weight: 400; display: flex; flex-direction: column; min-height: 100vh; overflow-y: scroll; }
a, a:visited { color: var(--pp-slate); text-decoration: none; }
a:hover { color: var(--pp-slate-lighter); }
h1, h2, h3, h4 { color: var(--pp-text); }
h3 { font-size: 1.5rem; font-weight: 400; }

/* Shell: fixed left sidebar + topbar, as My Docuwise's Intelligence layout */
.pp-shell { display: flex; min-height: 100vh; }
.pp-sidebar { width: 225px; flex-shrink: 0; background: #fff; border-right: 1px solid #e8e6e1; display: flex; flex-direction: column; position: fixed; left: 0; top: 0; height: 100vh; overflow-y: auto; z-index: 200; }
.pp-sidebar-logo { padding: 22px 20px 14px; }
.pp-sidebar-logo img { max-width: 150px; }
.pp-sidebar-product { padding: 0 20px 14px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pp-gold); }
.pp-sidebar-partner { margin: 0 12px 10px; padding: 10px 12px; background: var(--pp-bg); border-radius: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pp-sidebar-partner img { max-width: 100%; max-height: 32px; }
.pp-sidebar-partner span:first-child { font-weight: 500; color: var(--pp-slate); }
.pp-badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 0; display: inline-flex; align-items: center; gap: 4px; text-transform: uppercase; letter-spacing: .03em; }
.pp-badge-live { background: var(--pp-green); color: #2e662e; border: 1px solid #a9d6a9; }
.pp-badge-setup { background: #FEE9C4; color: #8a5b0a; border: 1px solid #f0c168; }
.pp-nav { flex-grow: 1; padding: 0 12px; }
.pp-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 2px; border-radius: 0; color: var(--pp-slate); font-weight: 500; font-size: .9rem; text-decoration: none; cursor: pointer; transition: background .15s ease; }
.pp-nav-item i { width: 18px; text-align: center; font-size: 1.15em; }
.pp-nav-item:hover { background: #f4f2ee; color: var(--pp-slate); }
.pp-nav-item.active { background: var(--pp-slate); color: #fff; }
.pp-nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--pp-gold); }
.pp-nav-dot.done { display: none; }
.pp-nav-heading { padding: 14px 12px 6px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b0aca4; }
.pp-sidebar-footer { padding: 12px; border-top: 1px solid #e8e6e1; }

.pp-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; margin-left: 225px; }
.pp-topbar { background: #fff; border-bottom: 1px solid #e8e6e1; padding: 12px 24px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 100; }
.pp-topbar-logo { display: none; flex-shrink: 0; }
.pp-topbar-logo img { height: 26px; }
.pp-topbar-user { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; color: var(--pp-slate); }
.pp-content { padding: 20px 24px 40px; flex-grow: 1; transition: opacity .15s ease; }
.pp-footer { text-align: center; padding: 20px; color: var(--pp-muted); font-size: 13px; }
.pp-footer a { color: var(--pp-muted); }

/* Signed-out pages (login): centred, no chrome */
.pp-anon { max-width: 480px; margin: 0 auto; padding: 48px 16px; }
.pp-anon-logo { display: block; text-align: center; margin-bottom: 28px; }
.pp-anon-logo img { width: 220px; }

/* Mobile: sidebar becomes a drawer */
.pp-burger { display: none; border: none; background: transparent; color: var(--pp-slate); width: 42px; height: 42px; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.pp-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(35,40,45,.5); z-index: 190; }
@media (max-width: 991px) {
    .pp-burger { display: inline-flex; margin-left: auto; }
    .pp-topbar-logo { display: block; }
    .pp-topbar-user { display: none; }
    .pp-sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: 10px 0 40px rgba(0,0,0,.18); }
    body.pp-nav-open .pp-sidebar { transform: translateX(0); }
    body.pp-nav-open .pp-nav-overlay { display: block; }
    .pp-main { margin-left: 0; }
    .pp-topbar { padding: 10px 12px; }
    .pp-content { padding: 14px 12px 32px; }
}

/* Setup checklist (right column) */
.pp-checklist { position: sticky; top: 76px; }
.pp-checklist h3 { font-size: 1.1rem; margin-bottom: 12px; }
/* Timeline: circles joined by a vertical line; done = green */
.pp-checklist ul { list-style: none; padding: 0; margin: 4px 0 0; }
.pp-checklist li { position: relative; padding: 0 0 22px 36px; color: var(--pp-muted); min-height: 24px; }
.pp-checklist li:last-child { padding-bottom: 0; }
.pp-checklist li::after { content: ""; position: absolute; left: 11px; top: 24px; bottom: -2px; width: 2px; background: #e0e0e0; }
.pp-checklist li:last-child::after { display: none; }
.pp-checklist li .pp-check-icon { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d8d8d8; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: transparent; z-index: 1; transition: background .2s ease, border-color .2s ease; }
.pp-checklist li.done { color: var(--pp-text); }
.pp-checklist li.done .pp-check-icon { background: #4caf50; border-color: #4caf50; color: #fff; }
.pp-checklist li.done::after { background: #4caf50; }
.pp-checklist li.fail .pp-check-icon { background: #d9534f; border-color: #d9534f; color: #fff; }
.pp-checklist li.current { color: var(--pp-text); font-weight: 500; }
.pp-checklist li.current .pp-check-icon { border-color: var(--pp-gold); box-shadow: 0 0 0 4px rgba(251,176,59,.2); }
.pp-checklist li small { display: block; font-weight: 400; color: var(--pp-muted); font-size: 12px; }
.pp-checklist li > span:last-child { display: block; line-height: 24px; }
.pp-checklist li small + * , .pp-checklist li small { line-height: 1.3; }
.pp-checklist li a { color: var(--pp-slate); }
.pp-progress { height: 8px; background: var(--pp-bg); border-radius: 0; overflow: hidden; margin: 6px 0 14px; }
.pp-progress span { display: block; height: 100%; background: var(--pp-gold); border-radius: 0; transition: width .3s ease; }

/* Dashboard KPI tiles */
.pp-kpi { background: #fff; border: 1px solid rgba(0,0,0,.05); border-radius: 0; padding: 16px 20px; height: 100%; }
.pp-kpi .kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; color: #8a8a8a; display: flex; justify-content: space-between; align-items: center; }
.pp-kpi .kpi-label i { color: var(--pp-gold); }
.pp-kpi .kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.15; color: var(--pp-slate); margin: 4px 0 2px; }
.pp-kpi .kpi-sub { font-size: 12px; color: #8a8a8a; }

/* Panels (My Docuwise .panel / .panel-container p-4) */
.pp-card { background: #fff; box-shadow: 0 0 13px 0 rgba(62,44,90,.08); margin-bottom: 1.5rem; border-radius: 0; border-left: 1px solid rgba(0,0,0,.09); border-right: 1px solid rgba(0,0,0,.09); border-bottom: 1px solid #e0e0e0; padding: 1.5rem; }
.pp-card h2 { font-size: 1.5rem; font-weight: 400; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.pp-card h2 .ti { color: var(--pp-slate); font-size: 1.3em; }
.pp-step { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pp-gold); }
/* In card headings: same size as the heading text, gold, followed by a hyphen: "STEP 1 - Connection details" */
.pp-card h2 .pp-step { font-size: inherit; font-weight: 400; letter-spacing: .04em; }
.pp-card h2 .pp-step::after { content: " -"; color: var(--pp-text); }
.pp-title { font-size: 2rem; font-weight: 300; margin: 0 0 4px; color: var(--pp-slate); }
.pp-muted { color: var(--pp-muted); }
.pp-lead { font-size: 16px; color: var(--pp-slate); font-weight: 300; }

/* Login */
.pp-login { display: flex; justify-content: center; }
.pp-login-card { width: 100%; }

/* Buttons: My Docuwise's pastel fills, bold uppercase, square corners, no shadow */
.btn { color: #fff; border: none; font-weight: 700; padding: 10px 20px; text-transform: uppercase; cursor: pointer; border-radius: 0; box-shadow: none !important; transition: background-color .3s ease, color .3s ease; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-green { background: var(--pp-green); color: var(--pp-green-dark); }
.btn-green:hover, .btn-green:focus { background: #ecf8ec; color: var(--pp-green-dark); }
.btn-coral { background: var(--pp-coral-light); color: var(--pp-coral-dark); }
.btn-coral:hover, .btn-coral:focus { background: #fdeee3; color: var(--pp-coral-dark); }
.btn-red { background: var(--pp-red); color: var(--pp-red-dark); }
.btn-red:hover { background: #fde2e2; color: var(--pp-red-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ti { font-size: 1.1em; vertical-align: -2px; }

/* Forms: square inputs, light grey focus ring, #ccc placeholders */
.form-control, .form-select { background: #fff; border-radius: 0; border-color: #ced4da; }
.form-control:focus, .form-select:focus { border-color: #ced4da; box-shadow: 0 0 0 .2rem rgba(211,211,211,.5) !important; }
::placeholder { color: #ccc !important; }
.form-label { font-weight: 500; color: var(--pp-slate); margin-bottom: .3rem; }
.form-text { color: var(--pp-muted); }
.form-check-input { border-radius: 0; }
.form-check-input:checked { background-color: var(--pp-coral-dark); border-color: var(--pp-coral-dark); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(211,211,211,.5); }
.pp-alert { padding: 10px 14px; border-radius: 0; margin-bottom: 14px; }
.pp-alert-error { background: var(--pp-red); color: var(--pp-red-dark); }
.pp-alert-ok { background: var(--pp-green); color: var(--pp-green-dark); }
.pp-alert-warn { background: var(--pp-gold-super-light); color: var(--pp-slate); }
.pp-alert-info { background: #e7f6fd; color: var(--pp-slate); }

/* Status banner: like the summary-header (gold left border on white) */
.pp-status { display: flex; align-items: center; gap: 16px; padding: 18px 24px; margin-bottom: 1.5rem; background: var(--pp-gold-super-light); border-radius: 0; box-shadow: 0 0 13px 0 rgba(62,44,90,.08); color: var(--pp-slate); }
.pp-status-live { background: var(--pp-green); color: var(--pp-green-dark); }
.pp-status-ready { background: var(--pp-gold-lighter); }
.pp-status .ti { font-size: 30px; }
.pp-status strong { display: block; font-size: 17px; font-weight: 500; }

/* Explainer */
/* "How it works": plain section, no card; four white tiles */
.pp-intro { margin-bottom: 2rem; }
.pp-intro h2 { font-size: 1.5rem; font-weight: 400; margin: 0 0 6px; }
.pp-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pp-steps li { background: #fff; border: 1px solid var(--pp-line); padding: 18px 18px 16px; }
.pp-steps li .pp-step { display: block; margin-bottom: 8px; }
.pp-why { background: #fff; border: 1px solid var(--pp-line); padding: 16px 20px; }
.pp-why p:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .pp-steps { grid-template-columns: 1fr 1fr; } }

/* Endpoint blocks */
.pp-endpoint { border: 1px solid var(--pp-line); border-radius: 0; padding: 20px 24px; margin-bottom: 16px; background: #fff; }
.pp-endpoint-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.pp-endpoint-head h3 { font-size: 1.25rem; margin: 0; flex: 1; }
.pp-endpoint-head h3 .ti { color: var(--pp-slate); margin-right: 6px; }
.pp-endpoint-when { color: var(--pp-muted); margin-bottom: 14px; }
.pp-verify-state { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 0; }
.pp-verify-state.ok { background: var(--pp-green); color: var(--pp-green-dark); }
.pp-verify-state.no { background: var(--pp-bg); color: var(--pp-muted); }
.pp-verify-state.fail { background: var(--pp-red); color: var(--pp-red-dark); }
.pp-url-row { display: flex; gap: 0; align-items: stretch; }
.pp-url-row .form-control { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.pp-url-row .btn { white-space: nowrap; }
.pp-checks { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; }
.pp-checks li { padding: 4px 0 4px 26px; position: relative; }
.pp-checks li::before { font-family: "tabler-icons"; position: absolute; left: 2px; top: 4px; font-size: 16px; }
.pp-checks li.ok::before { content: "\ea67"; color: #2e7d32; }
.pp-checks li.fail::before { content: "\ea68"; color: #b71c1c; }
.pp-checks li.warn::before { content: "\ea06"; color: #b26a00; }
.pp-result-msg { margin-top: 12px; font-weight: 500; }
.pp-result-msg.ok { color: #2e7d32; }
.pp-result-msg.fail { color: #b71c1c; }
.pp-spec { margin-top: 12px; }
.pp-spec summary { cursor: pointer; color: var(--pp-slate); font-weight: 500; font-size: 13px; }
.pp-spec pre { background: var(--pp-slate); color: #f3f5f7; border-radius: 0; padding: 12px 14px; font-size: 12.5px; margin: 8px 0; overflow-x: auto; }
.pp-spec table { font-size: 13px; margin: 8px 0; }
.pp-spec table td, .pp-spec table th { padding: 3px 12px 3px 0; vertical-align: top; }
.pp-spec code { color: #b23c17; background: #fff4ee; padding: 1px 4px; border-radius: 0; }
.pp-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.15); border-top-color: var(--pp-slate); border-radius: 50%; animation: pp-spin .8s linear infinite; vertical-align: -2px; }
@keyframes pp-spin { to { transform: rotate(360deg); } }

/* Link box */
.pp-linkbox { background: var(--pp-bg); border-radius: 0; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; display: flex; gap: 10px; align-items: flex-start; }
.pp-linkbox span { flex: 1; }
.pp-linkbox button { background: none; border: none; color: var(--pp-slate); font-size: 18px; padding: 0; }

/* Stats and tables */
.pp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 1.5rem; }
.pp-stat { background: #fff; box-shadow: 0 0 13px 0 rgba(62,44,90,.08); border-radius: 0; border-bottom: 1px solid #e0e0e0; padding: 18px; text-align: center; }
.pp-stat-value { font-size: 26px; font-weight: 300; color: var(--pp-slate); }
.pp-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--pp-muted); }
@media (max-width: 900px) { .pp-stats { grid-template-columns: repeat(2, 1fr); } }
.pp-filter-tabs { display: inline-flex; border-bottom: 1px solid var(--pp-line); }
.pp-filter-tabs a { padding: .3rem 1.5rem .4rem; color: #999 !important; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pp-filter-tabs a:hover { color: var(--pp-slate) !important; }
.pp-filter-tabs a.active { color: var(--pp-slate) !important; border-bottom-color: var(--pp-gold); }
.pp-table { width: 100%; }
.pp-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--pp-muted); font-weight: 500; border-bottom: 1px solid var(--pp-line); padding: 10px 12px; }
.pp-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.pp-table tbody tr:hover td { background: #FDDFB0; }
.pp-table tr:last-child td { border-bottom: none; }
.pp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pp-empty { text-align: center; padding: 40px; color: var(--pp-muted); }
.pp-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--pp-muted); }
.pp-log-ok { color: #2e7d32; }
.pp-log-fail { color: #b71c1c; font-weight: 500; }

/* Toast */
.pp-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--pp-slate); color: #fff; padding: 10px 18px; border-radius: 0; opacity: 0; transition: all .25s; pointer-events: none; z-index: 1000; }
.pp-toast.show { opacity: 1; transform: translateX(-50%); }
.pp-toast.err { background: #8a1c1c; }
