/* OALF shared attorney portal — firm-branded shell.
   --brand-accent is set per-firm by Portal.Master from the firm's Brand.AccentColor. */
:root { --brand-accent: #C2913A; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body.portal {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0B2239;
    background: #FBFAF8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.portal form { display: flex; flex-direction: column; flex: 1 0 auto; }

/* Top bar */
.pt-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 24px;
    background: #0B2239; color: #fff;
    border-bottom: 3px solid var(--brand-accent);
}
.pt-brand { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.pt-logo { max-height: 40px; width: auto; display: block; }
.pt-firmname { font-weight: 800; font-size: 1.15rem; letter-spacing: .2px; color: #fff; }
.pt-user { display: flex; align-items: center; gap: 16px; font-size: .9rem; }
.pt-who { opacity: .85; }
.pt-logout { color: #fff; text-decoration: none; opacity: .9; white-space: nowrap; }
.pt-logout:hover { opacity: 1; text-decoration: underline; }

/* Main */
.pt-main { flex: 1 0 auto; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 24px; }
.pt-welcome h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.pt-sub { margin: 0 0 8px; color: #5A6675; }

/* Cards */
.pt-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px; margin-top: 26px;
}
.pt-card {
    position: relative; background: #fff; border: 1px solid #EAE6DF; border-radius: 14px;
    padding: 22px; box-shadow: 0 1px 2px rgba(11,34,57,.04);
}
.pt-card i { font-size: 1.4rem; color: var(--brand-accent); }
.pt-card h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.pt-card p { margin: 0; color: #5A6675; font-size: .92rem; line-height: 1.5; }
.pt-card-link { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.pt-card-link:hover { box-shadow: 0 6px 18px rgba(11,34,57,.10); transform: translateY(-2px); }
.pt-go { display: inline-block; margin-top: 12px; font-size: .82rem; font-weight: 700; color: var(--brand-accent); }
.pt-go i { font-size: .8rem; margin-left: 4px; }
.pt-soon {
    display: inline-block; margin-top: 12px; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; color: var(--brand-accent);
    background: rgba(194,145,58,.12); border-radius: 999px; padding: 3px 10px;
}

/* Footer */
.pt-footer {
    flex-shrink: 0; text-align: center; padding: 18px; color: #8A93A0; font-size: .8rem;
    border-top: 1px solid #EAE6DF;
}

@media (max-width: 560px) {
    .pt-topbar { padding: 12px 16px; }
    .pt-main { padding: 22px 16px; }
    .pt-user { gap: 10px; }
}

/* ============================================================
   Matter pipeline — board, forms, matter workspace
   ============================================================ */

/* Page header + toolbar */
.pt-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pt-page-head h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; }
.pt-toolbar { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin: 18px 0 22px; }
.pt-check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: #5A6675; }

/* Buttons */
.pt-btn {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    font: inherit; font-weight: 600; font-size: .9rem; line-height: 1;
    padding: 10px 16px; border-radius: 10px; border: 1px solid #CBD2DA;
    background: #fff; color: #0B2239; text-decoration: none; white-space: nowrap;
}
.pt-btn:hover { border-color: #0B2239; }
.pt-btn-primary { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }
.pt-btn-primary:hover { filter: brightness(.94); border-color: var(--brand-accent); }
.pt-btn-ghost { background: transparent; border-color: transparent; color: #5A6675; }
.pt-btn-ghost:hover { color: #0B2239; border-color: transparent; }
.pt-btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }

/* Forms */
.pt-form { max-width: 680px; background: #fff; border: 1px solid #EAE6DF; border-radius: 14px; padding: 24px; }
.pt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.pt-field > label { font-size: .85rem; font-weight: 600; color: #3A4657; }
.pt-input {
    font: inherit; padding: 10px 12px; border: 1px solid #CBD2DA; border-radius: 10px;
    background: #fff; color: #0B2239; width: 100%; max-width: 100%;
}
.pt-input:focus { outline: 2px solid var(--brand-accent); outline-offset: 0; border-color: var(--brand-accent); }
.pt-input-sm { padding: 7px 10px; font-size: .85rem; }
.pt-row { display: flex; gap: 16px; flex-wrap: wrap; }
.pt-row > .pt-field { flex: 1 1 220px; }
.pt-grow { flex: 2 1 320px; }
.pt-help { margin: 6px 0 0; font-size: .82rem; color: #8A93A0; line-height: 1.5; }
.pt-subform { border: 1px dashed #D8D2C7; border-radius: 12px; padding: 16px; margin-bottom: 16px; background: #FCFBF9; }
.pt-hr { border: none; border-top: 1px solid #EAE6DF; margin: 20px 0; }
.pt-actions { margin-top: 8px; }

/* Alerts */
.pt-alert { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-size: .9rem; line-height: 1.5; }
.pt-alert ul { margin: 8px 0 0; padding-left: 20px; }
.pt-alert-ok { background: #E9F6EE; border: 1px solid #BFE3CC; color: #1E5B34; }
.pt-alert-warn { background: #FDF3E3; border: 1px solid #F0D9A8; color: #8A5B12; }
.pt-alert-error { background: #FBEBEB; border: 1px solid #EDBFBF; color: #8A2020; }
.pt-empty { background: #fff; border: 1px dashed #D8D2C7; border-radius: 12px; padding: 26px; text-align: center; color: #8A93A0; margin-top: 12px; }

/* Board */
.pt-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.pt-col { flex: 0 0 260px; background: #F3F1EC; border: 1px solid #E7E2D8; border-radius: 12px; padding: 12px; }
.pt-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; font-size: .9rem; }
.pt-col-name { flex: 1; }
.pt-col-count { background: #fff; border-radius: 999px; padding: 1px 9px; font-size: .78rem; color: #5A6675; }
.pt-lock { color: var(--brand-accent); font-size: .78rem; }
.pt-matter {
    display: block; background: #fff; border: 1px solid #EAE6DF; border-radius: 10px;
    padding: 12px; margin-bottom: 10px; text-decoration: none; color: inherit;
    box-shadow: 0 1px 2px rgba(11,34,57,.04);
}
.pt-matter:hover { border-color: var(--brand-accent); }
.pt-matter-title { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 3px; }
.pt-matter-client { display: block; font-size: .82rem; color: #5A6675; margin-bottom: 8px; }
.pt-matter-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-ref { font-size: .74rem; color: #8A93A0; }
.pt-matter-owner { display: block; margin-top: 8px; font-size: .76rem; color: #5A6675; }
.pt-matter-owner i { color: var(--brand-accent); margin-right: 3px; }

/* Status pills */
.pt-status { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.pt-status-0 { background: rgba(30,91,52,.12); color: #1E5B34; }
.pt-status-1 { background: rgba(138,91,18,.14); color: #8A5B12; }
.pt-status-2 { background: rgba(90,102,117,.14); color: #5A6675; }
.pt-status-3 { background: rgba(138,32,32,.12); color: #8A2020; }

/* Detail layout */
.pt-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.pt-panel { background: #fff; border: 1px solid #EAE6DF; border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.pt-panel h2 { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; }
.pt-muted { color: #8A93A0; }

/* Stepper */
.pt-stepper { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 4px 0 22px; }
.pt-step { display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: #F3F1EC; font-size: .82rem; color: #5A6675; }
.pt-step-dot { width: 9px; height: 9px; border-radius: 50%; background: #C7CDD4; }
.pt-step-done .pt-step-dot { background: #1E5B34; }
.pt-step-current { background: var(--brand-accent); color: #fff; font-weight: 700; }
.pt-step-current .pt-step-dot { background: #fff; }
.pt-step-current .pt-lock { color: #fff; }

/* Compliance checklist */
.pt-checklist { list-style: none; margin: 0; padding: 0; }
.pt-check-item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid #F0EDE6; }
.pt-check-item:last-child { border-bottom: none; }
.pt-check-body { flex: 1; min-width: 0; }
.pt-check-name { font-weight: 600; font-size: .92rem; }
.pt-tag { display: inline-block; margin-left: 8px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-radius: 999px; padding: 2px 8px; background: #EEF0F3; color: #5A6675; }
.pt-tag-req { background: rgba(194,145,58,.14); color: #8A5B12; }
.pt-check-done { margin: 4px 0; }
.pt-done-flag { font-size: .8rem; color: #1E5B34; font-weight: 600; }
.pt-check-body .pt-input-sm { margin-top: 6px; max-width: 360px; }
.pt-check-action { flex: 0 0 auto; }

/* Timeline */
.pt-timeline { list-style: none; margin: 0; padding: 0; }
.pt-timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid #ECE7DD; }
.pt-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pt-tl-dot { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-accent); border: 2px solid #fff; }
.pt-tl-move { font-weight: 600; font-size: .9rem; }
.pt-tl-move i { color: #8A93A0; font-size: .78rem; margin: 0 4px; }
.pt-tl-meta { font-size: .78rem; color: #8A93A0; margin-top: 2px; }
.pt-tl-note { font-size: .84rem; color: #3A4657; margin-top: 4px; font-style: italic; }

/* Intake read-only */
.pt-intake { margin: 0; }
.pt-intake dt { font-size: .8rem; font-weight: 600; color: #3A4657; }
.pt-intake dd { margin: 2px 0 12px; font-size: .9rem; }

@media (max-width: 820px) {
    .pt-detail-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Workflow editor + intake capture extras
   ============================================================ */
.pt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pt-panel-head h2 { margin: 0; }
.pt-req-star { color: #B4432E; font-weight: 700; }

/* Editor rows */
.pt-erow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #F0EDE6; }
.pt-erow:last-child { border-bottom: none; }
.pt-erow-add { border-bottom: none; border-top: 1px dashed #D8D2C7; margin-top: 6px; padding-top: 14px; align-items: flex-start; }
.pt-erow-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.pt-erow-name { flex: 1 1 220px; min-width: 160px; }
.pt-erow-meta { font-size: .82rem; color: #5A6675; }
.pt-erow-locked { font-weight: 600; }
.pt-erow-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.pt-icon { color: #8A93A0; text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.pt-icon:hover { color: #0B2239; background: #F0EDE6; }
.pt-btn-danger { color: #8A2020; border-color: #E4C4C4; }
.pt-btn-danger:hover { background: #FBEBEB; border-color: #8A2020; }

/* Documents */
.pt-doclist { list-style: none; margin: 0 0 14px; padding: 0; }
.pt-doc { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F0EDE6; }
.pt-doc:last-child { border-bottom: none; }
.pt-doc > i { color: var(--brand-accent); font-size: 1.1rem; margin-top: 2px; }
.pt-doc-body { flex: 1; min-width: 0; }
.pt-doc-name { font-weight: 600; font-size: .92rem; text-decoration: none; color: #0B2239; word-break: break-word; }
.pt-doc-name:hover { text-decoration: underline; color: var(--brand-accent); }
.pt-doc-meta { font-size: .78rem; color: #8A93A0; margin-top: 2px; }
.pt-doc-note { color: #5A6675; font-style: italic; }
.pt-doc-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed #D8D2C7; }
.pt-doc-upload .pt-input { flex: 1 1 200px; }
.pt-doc-actions { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pt-shared { color: #1E5B34; font-weight: 600; }
.pt-section-h { margin: 26px 0 0; font-size: 1.15rem; font-weight: 800; }

/* Portal sign-in (standalone page) */
body.pt-login-body {
    margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0B2239; background: #FBFAF8;
}
.pt-login-card {
    background: #fff; border: 1px solid #EAE6DF; border-radius: 16px; padding: 32px;
    width: 100%; max-width: 400px; box-shadow: 0 8px 30px rgba(11,34,57,.08);
}
.pt-login-logo { text-align: center; margin-bottom: 16px; }
.pt-login-logo img { height: 72px; width: auto; }
.pt-login-card h1 { margin: 0 0 4px; font-size: 1.4rem; text-align: center; font-weight: 800; }
.pt-login-card .pt-sub { text-align: center; margin: 0 0 18px; }
.pt-login-foot { text-align: center; margin-top: 18px; font-size: .85rem; color: #8A93A0; }
.pt-login-foot a { color: var(--brand-accent); text-decoration: none; }
.pt-login-foot a:hover { text-decoration: underline; }
.pt-login-sep { margin: 0 8px; color: #CBD2DA; }
.pt-break { word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
