/* Propagate CRM — northstar design system
   Tokens and editorial voice lifted from The Book (northstar layouts/book.blade.php):
   printed-sheet surfaces, Helvetica, ink + Propagate orange, hairline rules, no radius. */

:root {
    --ink: #000000;
    --gray: #343435;
    --orange: #FE5812;
    --green: #1f9d55;
    --rule: #d8d8d8;
    --hairline: #ececec;
    --tint: #f7f6f5;
    --paper: #ffffff;
    --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: #e9e8e6;
    line-height: 1.55;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.mono { font-variant-numeric: tabular-nums; }
.quiet { color: var(--gray); }
.prewrap { white-space: pre-wrap; margin: 0; }

/* ---------- sheet ---------- */

.sheet {
    max-width: 1500px;
    margin: 20px auto 0;
    background: var(--paper);
    padding: 40px 48px 56px;
    min-height: calc(100vh - 20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .10), 0 12px 32px rgba(0, 0, 0, .12);
}

/* ---------- masthead ---------- */

.masthead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--ink);
}
.logo { width: 150px; height: auto; display: block; flex: none; }
.logolink { display: block; flex: none; }

.mast-nav {
    display: flex;
    gap: 12px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    align-items: center;
}
.mast-nav a { color: var(--gray); padding: 7px 12px; border: 1px solid var(--rule); }
.mast-nav a:hover { color: var(--orange); border-color: var(--orange); }
.mast-nav a.here { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.lock-link {
    font-family: var(--font);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--orange);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 700;
}
.lock-link:hover { text-decoration: underline; }

/* ---------- title block ---------- */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 36px 0 0;
}
.eyebrow {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--orange);
    font-weight: 700;
}
.eyebrow a { color: inherit; }
.eyebrow a:hover { text-decoration: underline; }
.page-head h1 {
    font-size: 44px;
    line-height: 1.02;
    letter-spacing: -.03em;
    font-weight: 700;
    margin-top: 10px;
}
.page-sub {
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 500;
}
.adrift-flag { color: var(--orange); font-weight: 700; }
.lead-value {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--ink);
    line-height: 1;
}

.toast {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 60;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- tiles (performance strip) ---------- */

.tiles {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}
.tile { padding: 18px 20px 20px; }
.tile + .tile { border-left: 1px solid var(--hairline); }
.tile .figure { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.tile .figure.alert { color: var(--orange); }
.tile .cap {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 700;
    margin-top: 8px;
    line-height: 1.4;
}

/* ---------- buttons & fields ---------- */

.btn {
    display: inline-block;
    font-family: var(--font);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray);
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 10px 18px;
    cursor: pointer;
}
.btn:hover { color: var(--orange); border-color: var(--orange); }
.btn-primary { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.btn-primary:hover { color: var(--paper); background: var(--orange); border-color: var(--orange); }
.btn-sm { padding: 5px 10px; font-size: 10px; }
.btn-block { width: 100%; text-align: center; }

.field { display: block; margin-bottom: 16px; }
.field > span {
    display: block;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 700;
    margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    padding: 9px 12px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.log-form textarea:focus {
    outline: none;
    border-color: var(--orange);
}
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
.field-error { color: var(--orange); font-size: 14px; font-weight: 700; margin: -8px 0 14px; }

/* ---------- today strip (signature element) ---------- */

.today-strip {
    margin-top: 30px;
    padding: 18px 22px;
    background: var(--tint);
    border-left: 5px solid var(--orange);
    display: flex;
    align-items: center;
    gap: 24px;
}
.today-label {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
    font-weight: 700;
    flex: none;
    max-width: 92px;
    line-height: 1.6;
}
.today-items { display: flex; gap: 12px; overflow-x: auto; flex: 1; }
.today-item {
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 10px 14px;
    min-width: 180px;
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    gap: 12px;
}
.today-link { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.touch-form { display: flex; align-items: center; }
.touch-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--rule);
    background: var(--paper);
    color: var(--gray);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.touch-btn:hover { border-color: var(--green); color: var(--paper); background: var(--green); }
.today-item:hover { border-color: var(--orange); }
.today-item.is-overdue { border-left: 3px solid var(--orange); }
.today-company { font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
.today-action { font-size: 12.5px; color: var(--gray); }
.today-date {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--green);
    margin-top: 2px;
}
.today-item.is-overdue .today-date { color: var(--orange); }

/* ---------- board ---------- */

.board {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    overflow-x: auto;
    margin-top: 30px;
    padding-bottom: 20px;
}
.column {
    flex: 0 0 244px;
    background: var(--tint);
    border-top: 2px solid var(--ink);
    padding: 12px 12px 14px;
}
.column-won { border-top-color: var(--green); }
.column-lost { border-top-color: var(--rule); opacity: .85; }
.column-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 2px 2px 12px;
}
.column-head h2 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
}
.column-won .column-head h2 { color: var(--green); }
.column-lost .column-head h2 { color: var(--gray); }
.column-meta {
    font-size: 10.5px;
    color: var(--gray);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.column-cards { display: flex; flex-direction: column; gap: 10px; min-height: 48px; }
.column-cards.drop-ready { outline: 2px dashed var(--orange); outline-offset: 2px; }
.column-empty {
    border: 1px dashed var(--rule);
    padding: 16px;
    text-align: center;
    color: var(--gray);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.card {
    display: block;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--rule);
    padding: 12px 14px;
    cursor: grab;
}
.card:hover { border-color: var(--ink); border-left-color: currentColor; }
.card.dragging { opacity: .5; }
.card.action-scheduled { border-left-color: var(--gray); }
.card.action-today { border-left-color: var(--green); }
.card.action-overdue, .card.action-none { border-left-color: var(--orange); }
.card.action-closed { border-left-color: var(--rule); }

.card-company {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gray);
}
.card-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; margin: 3px 0 8px; line-height: 1.3; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-value { font-size: 13px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- chips / status flags ---------- */

.chip {
    display: inline-block;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 1px 7px;
    white-space: nowrap;
}
.chip-scheduled { color: var(--gray); border: 1px solid var(--rule); }
.chip-today { color: var(--paper); background: var(--green); }
.chip-overdue { color: var(--paper); background: var(--orange); }
.chip-none { color: var(--orange); border: 1px dashed var(--orange); }
.chip-stage { color: var(--ink); border: 1px solid var(--rule); margin-left: 8px; vertical-align: 2px; }
.chip-won { color: var(--paper); background: var(--green); margin-left: 8px; vertical-align: 2px; }
.chip-lost { color: var(--paper); background: var(--gray); margin-left: 8px; vertical-align: 2px; }

/* ---------- next-action bar (lead page) ---------- */

.next-action-bar {
    margin-top: 30px;
    padding: 18px 22px;
    background: var(--tint);
    border-left: 5px solid var(--rule);
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.next-action-bar b, .next-action-bar strong { font-weight: 700; }
.next-action-bar.action-none,
.next-action-bar.action-overdue { border-left-color: var(--orange); }
.next-action-bar.action-none strong,
.next-action-bar.action-overdue strong { color: var(--orange); }
.next-action-bar.action-today,
.next-action-bar.action-scheduled { border-left-color: var(--green); }
.next-action-bar.action-today strong,
.next-action-bar.action-scheduled strong { color: var(--green); }

/* ---------- sections / panels ---------- */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; margin-top: 12px; }
.two-col-wide { grid-template-columns: 3fr 2fr; }

.panel { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--ink); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.panel-title { font-size: 24px; letter-spacing: -.02em; font-weight: 700; line-height: 1.15; }

.list-row { display: block; padding: 12px 2px; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.list-row strong { font-weight: 700; letter-spacing: -.01em; }
a.list-row:hover strong { color: var(--orange); }
.panel .quiet { font-size: 14px; }

/* ---------- data tables ---------- */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 28px;
    border-top: 2px solid var(--ink);
    font-size: 14.5px;
}
.data-table th {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray);
    text-align: left;
    padding: 12px 24px 8px 0;
    border-bottom: 1px solid var(--rule);
}
.data-table td {
    padding: 11px 24px 11px 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--gray);
}
.data-table td:first-child { color: var(--ink); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table th.num { text-align: right; }
.row-link { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.row-link:hover { color: var(--orange); }

.empty-state {
    margin-top: 28px;
    padding: 44px;
    border: 1px dashed var(--rule);
    text-align: center;
    color: var(--gray);
    font-size: 15px;
}
.empty-state .btn { margin-top: 16px; }

/* ---------- timeline (work-log style) ---------- */

.log-form { margin-top: 22px; }
.log-form textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    padding: 9px 12px;
    border: 2px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    margin-bottom: 10px;
    resize: vertical;
}
.log-types { display: flex; gap: 8px; margin-bottom: 10px; }
.log-type input { position: absolute; opacity: 0; }
.log-type span {
    display: inline-block;
    padding: 4px 11px;
    border: 1px solid var(--rule);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
}
.log-type span:hover { color: var(--orange); border-color: var(--orange); }
.log-type input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.log-type input:focus-visible + span { outline: 2px solid var(--orange); }

.timeline { margin-top: 24px; border-top: 1px solid var(--rule); }
.timeline-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--hairline);
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 28px;
    align-items: start;
}
.timeline-meta { display: block; }
.timeline-type {
    display: block;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--orange);
}
.timeline-stage_change .timeline-type,
.timeline-system .timeline-type { color: var(--gray); }
.timeline-touch .timeline-type { color: var(--green); }
.timeline-meta .when {
    display: block;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray);
    margin-top: 4px;
}
.timeline-item .prewrap { font-size: 15px; color: var(--gray); }

/* ---------- glass modals ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, .38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: rgba(255, 255, 255, .93);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .6);
    border-top: 4px solid var(--orange);
    padding: 26px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}
.modal-head h2 { font-size: 24px; letter-spacing: -.02em; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--gray);
    cursor: pointer;
    padding: 2px 6px;
}
.modal-close:hover { color: var(--orange); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- login (gate) ---------- */

.login-body {
    min-height: 100vh;
    background: #e9e8e6;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 20px;
}
.login-card {
    width: 100%;
    max-width: 560px;
    background: var(--paper);
    margin-top: 48px;
    padding: 56px 64px 64px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .10), 0 12px 32px rgba(0, 0, 0, .12);
}
.login-card .logo { width: 168px; }
.login-card .eyebrow { margin-top: 56px; }
.login-card h1 { font-size: 46px; letter-spacing: -.035em; font-weight: 700; line-height: 1.02; margin-top: 12px; }
.orange-rule { width: 96px; height: 5px; background: var(--orange); margin: 26px 0 18px; }
.login-tag {
    font-size: 12px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 40px;
}

/* ---------- proposals: builder chrome ---------- */

.head-actions { display: flex; gap: 10px; align-items: center; }
.share-bar {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--tint);
    border-left: 5px solid var(--ink);
}
.share-label {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray);
    flex: none;
}
.share-url {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.scope-row { padding: 14px 0 4px; border-top: 1px solid var(--hairline); }
.scope-row:first-child { border-top: none; padding-top: 0; }
#scope-rows { margin-bottom: 6px; }

.chip-prop-draft { color: var(--gray); border: 1px solid var(--rule); }
.chip-prop-sent { color: var(--orange); border: 1px solid var(--orange); }
.chip-prop-signed { color: var(--paper); background: var(--green); }
.timeline-proposal .timeline-type { color: var(--orange); }

/* ---------- proposals: public document ---------- */

.doc-sheet { max-width: 960px; padding: 64px 72px 56px; }
.doc-sheet .masthead { border-bottom: none; padding-bottom: 0; }
.doc-sheet .logo { width: 168px; }
.prepared {
    text-align: right;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gray);
    line-height: 1.7;
    flex: none;
}
.prepared strong { display: block; color: var(--ink); letter-spacing: .14em; }

.titleblock { margin-top: 72px; }
.titleblock h1 {
    font-size: 56px;
    line-height: 1.02;
    letter-spacing: -.035em;
    font-weight: 700;
    margin-top: 14px;
}
.standfirst {
    font-size: 13px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 500;
}
.lede { margin-top: 44px; max-width: 62ch; font-size: 18px; line-height: 1.62; }

.doc-section { margin-top: 56px; padding-top: 26px; border-top: 2px solid var(--ink); }
.section-head { display: flex; align-items: baseline; gap: 16px; }
.section-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: .08em;
    flex: none;
}
.section-head h2 { font-size: 28px; letter-spacing: -.025em; font-weight: 700; line-height: 1.15; }
.doc-body { margin-top: 16px; max-width: 70ch; font-size: 16px; color: var(--gray); }
.price-line {
    margin-top: 20px;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
}

.sign-section { margin-bottom: 8px; }
.sign-confirm {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--tint);
    border-left: 5px solid var(--green);
    font-size: 16px;
    font-weight: 700;
    color: var(--green);
}
.sign-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: end;
}
.sig-name {
    font-family: "Snell Roundhand", "Savoye LET", "Brush Script MT", cursive;
    font-size: 34px;
    line-height: 1.1;
    min-height: 44px;
}
.sig-input {
    display: block;
    width: 100%;
    font-family: "Snell Roundhand", "Savoye LET", "Brush Script MT", cursive;
    font-size: 28px;
    padding: 2px 0 6px;
    border: none;
    background: transparent;
    color: var(--ink);
    min-height: 44px;
}
.sig-input:focus { outline: none; }
.sig-input::placeholder { font-family: var(--font); font-size: 13px; color: var(--gray); }
.sig-rule { height: 2px; background: var(--ink); margin-top: 2px; }
.sig-caption {
    margin-top: 8px;
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 700;
    line-height: 1.7;
}
.sig-btn { margin-top: 18px; }

@media screen and (max-width: 820px) {
    .doc-sheet { padding: 40px 28px 44px; }
    .titleblock { margin-top: 44px; }
    .titleblock h1 { font-size: 38px; }
    .doc-sheet .masthead { flex-direction: column; gap: 18px; align-items: flex-start; }
    .prepared { text-align: left; }
    .sign-grid { grid-template-columns: 1fr; gap: 40px; }
    .share-bar { flex-wrap: wrap; }
}

@media print {
    body { background: var(--paper); }
    .doc-sheet { max-width: none; padding: 0; margin: 0; box-shadow: none; min-height: 0; }
    .sig-btn, .share-bar { display: none; }
    .doc-section { break-inside: avoid; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- colophon ---------- */

.colophon {
    margin-top: 64px;
    padding-top: 18px;
    border-top: 2px solid var(--ink);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gray);
}

/* ---------- responsive ---------- */

@media screen and (max-width: 820px) {
    .sheet { padding: 24px 20px 44px; margin-top: 0; }
    .masthead { flex-wrap: wrap; gap: 16px; }
    .logo { width: 120px; }
    .mast-nav { flex-wrap: wrap; gap: 8px; }
    .mast-nav a { padding: 6px 10px; }
    .page-head { flex-wrap: wrap; align-items: flex-start; margin-top: 26px; }
    .page-head h1 { font-size: 32px; }
    .tiles { grid-template-columns: repeat(3, 1fr); }
    .tile { padding: 12px 10px 14px; }
    .tile .figure { font-size: 22px; }
    .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 0; }
    .field-row { flex-direction: column; gap: 0; }
    .timeline-item { grid-template-columns: 1fr; gap: 6px; }
    .today-strip { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
    .today-label { max-width: none; }
    .today-items { width: 100%; }
    .login-card { padding: 36px 26px 44px; margin-top: 16px; }
    .login-card h1 { font-size: 34px; }
    .data-table th, .data-table td { padding-right: 12px; }
    .colophon { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
