/* Owner dashboard: Overview, Money, Contracts, Follow-up, Your decisions */

:root {
    --ow-serious: #b42318;
    --ow-serious-bg: #fef3f2;
    --ow-serious-line: #fecdca;
    --ow-watch: #b54708;
    --ow-watch-bg: #fffaeb;
    --ow-watch-line: #fedf89;
    --ow-fine: #067647;
    --ow-fine-bg: #ecfdf3;
    --ow-check: #175cd3;
    --ow-check-bg: #eff8ff;
    --ow-soft: #f8f9fb;
}

.ow-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---------- Header ---------- */

.ow-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: 0.25rem;
}

.ow-header h1 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.ow-context {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.ow-header-desc {
    margin: 0.4rem 0 0;
    max-width: 44rem;
    color: var(--admin-desc-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ow-header-side {
    display: flex;
    gap: 0.5rem;
}

/* ---------- Cards and layout ---------- */

.ow-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    box-shadow: var(--admin-shadow);
    min-width: 0;
}

.ow-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding: 1.1rem 1.2rem 0.75rem;
}

.ow-card-head > div:first-child {
    flex: 1 1 18rem;
    min-width: 0;
}

.ow-card-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ow-card-head p {
    margin: 0.25rem 0 0;
    max-width: 42rem;
    color: var(--admin-text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.ow-card-body {
    padding: 0 1.2rem 1.2rem;
}

.ow-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ow-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 1fr);
    gap: 1rem;
    align-items: start;
}

.ow-columns-even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ow-side-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.ow-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: start;
}

.ow-page > .ow-grid-2 {
    gap: 1rem;
}

.ow-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(20rem, 1fr);
    gap: 1rem;
    align-items: start;
}

/* ---------- Headline summary ---------- */

.ow-headline {
    padding: 1.2rem 1.25rem;
}

.ow-headline-text {
    margin: 0 0 1.1rem;
    max-width: 62rem;
    color: var(--admin-desc-text);
    font-size: 1.05rem;
    line-height: 1.6;
}

.ow-headline-text strong {
    color: var(--admin-text);
}

.ow-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.ow-stats > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: var(--ow-soft);
    border: 1px solid #eef0f3;
    min-width: 0;
}

.ow-stats > div > span:first-child {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.ow-stats strong {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.ow-stats small {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.ow-meter {
    position: relative;
    display: block;
    height: 6px;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #e6e8ec;
}

.ow-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #111827;
}

.ow-meter > span.is-watch { background: #dc6803; }
.ow-meter > span.is-serious { background: #d92d20; }

.ow-meter > i {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 12px;
    border-radius: 1px;
    background: #6b7280;
    transform: translateX(-1px);
}

/* ---------- Text helpers ---------- */

.ow-tone-serious { color: var(--ow-serious) !important; }
.ow-tone-watch { color: var(--ow-watch) !important; }

.ow-kicker {
    color: var(--admin-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ow-empty {
    margin: 0;
    padding: 1.25rem 0;
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.ow-card > .ow-empty {
    padding: 1.25rem;
}

.ow-note {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.ow-headline .ow-note {
    margin-top: 0.75rem;
}

.ow-lead-text {
    margin: 0 0 0.9rem;
    color: var(--admin-desc-text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.ow-small {
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.ow-nowrap {
    white-space: nowrap;
}

.ow-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.ow-link,
.ow-more {
    padding: 0;
    border: 0;
    background: none;
    color: var(--admin-text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.ow-more {
    display: inline-block;
    margin-top: 0.85rem;
}

.ow-error {
    margin: 0.5rem 0 0;
    color: var(--ow-serious);
    font-size: 0.8rem;
    font-weight: 600;
}

.ow-callout {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #f5f8fc;
    color: var(--admin-desc-text);
    font-size: 0.84rem;
    line-height: 1.5;
}

.ow-callout strong {
    color: var(--admin-text);
}

.ow-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--admin-border);
    border-left: 3px solid #111827;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--admin-shadow);
    font-size: 0.875rem;
    font-weight: 600;
}

.ow-toast button {
    border: 0;
    background: transparent;
    color: var(--admin-text-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Pills and chips ---------- */

.ow-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.ow-pill-serious { background: var(--ow-serious-bg); color: var(--ow-serious); }
.ow-pill-watch { background: var(--ow-watch-bg); color: var(--ow-watch); }
.ow-pill-fine { background: var(--ow-fine-bg); color: var(--ow-fine); }
.ow-pill-quiet { background: #f2f4f7; color: #475467; }
.ow-pill-check { background: var(--ow-check-bg); color: var(--ow-check); }
.ow-pill-done { background: #f2f4f7; color: #344054; }

.ow-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1.2rem 0.85rem;
}

.ow-filters .ow-chips {
    padding: 0;
}

.ow-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: #fff;
    color: var(--admin-desc-text);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

a.ow-chip:hover,
.ow-chip.is-removable:hover {
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
}

.ow-chip.is-removable {
    cursor: pointer;
    background: #f3f4f6;
}

/* ---------- Segmented controls and filters ---------- */

.ow-seg {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.15rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: var(--admin-input-bg);
}

.ow-seg-wrap {
    flex-wrap: wrap;
    border-radius: 14px;
}

.ow-seg button {
    border: 0;
    background: transparent;
    color: #4b5563;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.ow-seg button.is-on {
    background: var(--admin-primary);
    color: #fff;
}

.ow-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.75rem;
    padding: 0 1.2rem 0.9rem;
}

.ow-search {
    flex: 1 1 14rem;
    min-width: min(100%, 12rem);
}

/* ---------- Issue cards ---------- */

.ow-issue {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 1.05rem 0.95rem;
    border: 1px solid var(--admin-border);
    border-left: 3px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    min-width: 0;
    scroll-margin-top: 7rem;
}

.ow-issue.is-serious { border-left-color: #d92d20; }
.ow-issue.is-watch { border-left-color: #f79009; }
.ow-issue.is-closed { border-left-color: #d0d5dd; background: #fcfcfd; }

.ow-issue:target {
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.ow-issue h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.ow-issue-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.ow-issue-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ow-issue-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.ow-issue-amount strong {
    font-size: 1.1rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.ow-issue-amount span {
    color: var(--admin-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.ow-issue-where {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.85rem;
    margin: -0.2rem 0 0;
    color: var(--admin-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.ow-issue-where a {
    color: var(--admin-desc-text);
}

.ow-story {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.ow-story dt {
    color: var(--admin-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ow-story dd {
    margin: 0.1rem 0 0;
    color: var(--admin-desc-text);
    font-size: 0.84rem;
    line-height: 1.5;
}

.ow-story .is-rec {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: var(--ow-soft);
    border: 1px solid #eef0f3;
}

.ow-issue-status {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.ow-issue-status p {
    margin: 0;
}

.ow-issue-status.is-waiting {
    background: #f5f8fc;
    border: 1px solid #e3e8ef;
}

.ow-issue-status.is-closed {
    background: #f6f7f9;
    border: 1px solid #eceef2;
}

.ow-issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.85rem;
    margin-top: 0.25rem !important;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
}

.ow-issue-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.6rem;
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.ow-issue-links a {
    color: var(--admin-desc-text);
}

.ow-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.15rem;
}

.ow-actions .admin-btn {
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
}

.ow-reason {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--ow-soft);
}

.ow-reason textarea {
    resize: vertical;
}

/* ---------- Decide-first banner ---------- */

.ow-lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "kicker money"
        "title money"
        "action action";
    gap: 0.2rem 1.25rem;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
}

.ow-lead .ow-kicker {
    grid-area: kicker;
    color: rgba(255, 255, 255, 0.6);
}

.ow-lead > strong {
    grid-area: title;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.ow-lead-money {
    grid-area: money;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ow-lead-money small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    font-weight: 600;
}

.ow-lead-action {
    grid-area: action;
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* ---------- Lists and feeds ---------- */

.ow-feed,
.ow-list,
.ow-good,
.ow-milestones,
.ow-team,
.ow-why-parts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ow-feed li,
.ow-list li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f2f4;
    font-size: 0.84rem;
    line-height: 1.45;
}

.ow-feed li:first-child,
.ow-list li:first-child {
    padding-top: 0;
}

.ow-feed li:last-child,
.ow-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ow-feed li > span:last-child,
.ow-list li > span {
    color: var(--admin-desc-text);
}

.ow-list li a {
    color: var(--admin-text);
    font-weight: 600;
}

.ow-list li .ow-link {
    align-self: flex-start;
}

.ow-feed-meta {
    color: var(--admin-text-muted) !important;
    font-size: 0.72rem;
    font-weight: 600;
}

.ow-good li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.4rem;
    color: var(--admin-desc-text);
    font-size: 0.86rem;
    line-height: 1.45;
}

.ow-good li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.85rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #12b76a;
}

.ow-milestones li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f2f4;
}

.ow-milestones li:last-child {
    border-bottom: 0;
}

.ow-milestones li > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.86rem;
}

.ow-milestones li > div span {
    color: var(--admin-text-muted);
    font-size: 0.76rem;
}

.ow-day {
    margin: 1rem 0 0.5rem;
    color: var(--admin-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ow-day:first-child {
    margin-top: 0;
}

.ow-details {
    margin-top: 0.9rem;
}

.ow-details summary {
    color: var(--admin-text);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.ow-details[open] summary {
    margin-bottom: 0.75rem;
}

/* ---------- Tiles ---------- */

.ow-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.ow-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.15rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ow-tile:hover {
    border-color: var(--admin-border-strong);
    transform: translateY(-1px);
}

.ow-tile strong {
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.ow-tile p {
    margin: 0;
    color: var(--admin-desc-text);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* ---------- Tables ---------- */

.ow-table {
    font-variant-numeric: tabular-nums;
}

.ow-table tbody td {
    vertical-align: top;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.ow-table tfoot td {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--admin-border);
    font-size: 0.84rem;
    font-weight: 700;
}

.ow-row {
    cursor: pointer;
}

.ow-row.is-on td {
    background: #f3f4f6;
}

.ow-row.is-on td:first-child {
    box-shadow: inset 3px 0 0 #111827;
}

.ow-row-title {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.ow-row-title:hover {
    text-decoration: underline;
}

.ow-row-title:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
    border-radius: 4px;
}

.ow-row-next {
    margin-top: 0.3rem;
    max-width: 30rem;
    color: var(--admin-desc-text);
    font-size: 0.76rem;
    line-height: 1.45;
}

.ow-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}

.ow-pace {
    display: flex;
    gap: 0.8rem;
    font-size: 0.76rem;
    color: var(--admin-text-muted);
    white-space: nowrap;
}

.ow-pace b {
    color: var(--admin-text);
}

.ow-pace-bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 9rem;
    margin: 0.35rem 0 0.25rem;
}

.ow-pace-bars span {
    display: block;
    height: 5px;
    border-radius: 999px;
}

.ow-progress {
    width: 5.5rem;
    height: 4px;
    margin: 0.4rem 0 0.15rem;
    border-radius: 999px;
    background: #e6e8ec;
}

.ow-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #111827;
}

/* ---------- Cost breakdown ---------- */

.seg-ink { background: #111827; }
.seg-watch { background: #f79009; }
.seg-soft { background: #d0d5dd; }
.seg-fine { background: #12b76a; }
.seg-unknown {
    background: repeating-linear-gradient(135deg, #d0d5dd 0 4px, #f2f4f7 4px 8px);
}

.ow-why {
    padding: 0.85rem 0.95rem;
    border: 1px solid #eef0f3;
    border-radius: 12px;
}

.ow-why-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
}

.ow-why-head a {
    color: var(--admin-text);
    font-weight: 700;
    text-decoration: none;
}

.ow-why-head a:hover {
    text-decoration: underline;
}

.ow-why-head strong {
    font-variant-numeric: tabular-nums;
}

.ow-bar {
    display: flex;
    gap: 2px;
    height: 10px;
    margin-bottom: 0.6rem;
    border-radius: 999px;
    overflow: hidden;
}

.ow-why-parts li {
    display: grid;
    grid-template-columns: 0.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.2rem 0;
    font-size: 0.82rem;
    color: var(--admin-desc-text);
}

.ow-why-parts li i {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 3px;
}

.ow-why-parts li b {
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ow-why-parts li.is-refused span,
.ow-why-parts li.is-refused b {
    color: var(--admin-text-muted);
    text-decoration: line-through;
}

.ow-hbars {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ow-hbar {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

.ow-hbar b {
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
}

.ow-hbar-track {
    display: flex;
    gap: 2px;
    height: 14px;
    border-radius: 6px;
    overflow: hidden;
}

.ow-compare {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ow-compare-row {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr) 4.5rem;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--admin-desc-text);
}

.ow-compare-row > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ow-compare-row i {
    display: block;
    height: 6px;
    border-radius: 999px;
}

.ow-compare-row b {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ow-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.8rem;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.ow-legend i {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.3rem;
    border-radius: 3px;
    vertical-align: -1px;
}

/* ---------- Contract detail panel ---------- */

.ow-detail {
    position: sticky;
    top: 6.5rem;
    padding: 1.1rem 1.2rem 1.25rem;
}

.ow-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--admin-border);
}

.ow-detail-head h2 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.ow-detail-head p {
    margin: 0.25rem 0 0;
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.ow-detail .ow-callout {
    margin-top: 0.85rem;
}

.ow-detail-title {
    margin: 1.1rem 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.ow-facts,
.ow-terms {
    margin: 0.85rem 0 0;
}

.ow-terms {
    margin-top: 0;
}

.ow-facts > div,
.ow-terms > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.84rem;
}

.ow-facts > div:last-child,
.ow-terms > div:last-child {
    border-bottom: 0;
}

.ow-facts dt,
.ow-terms dt {
    color: var(--admin-text-muted);
    font-weight: 500;
}

.ow-facts dd,
.ow-terms dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ow-facts dd small {
    color: var(--admin-text-muted);
    font-weight: 500;
}

.ow-facts .is-total {
    border-top: 1px solid var(--admin-border);
}

/* ---------- Follow-up ---------- */

.ow-task {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.05rem 0.95rem;
    border: 1px solid var(--admin-border);
    border-left: 3px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
}

.ow-task.is-serious { border-left-color: #d92d20; }
.ow-task.is-watch { border-left-color: #f79009; }

.ow-task h3 {
    margin: 0.1rem 0 0;
    font-size: 0.98rem;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.ow-task-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.ow-task-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.ow-person {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.84rem;
}

.ow-person > span:last-child {
    display: flex;
    flex-direction: column;
}

.ow-person small {
    color: var(--admin-text-muted);
    font-size: 0.72rem;
}

.ow-avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ow-avatar.is-sm {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.62rem;
}

.ow-avatar.is-hs { background: #111827; }
.ow-avatar.is-mb { background: #475467; }
.ow-avatar.is-ha { background: #155e75; }

.ow-team li + li {
    margin-top: 0.4rem;
}

.ow-team button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.25rem 0.65rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ow-team button:hover {
    border-color: var(--admin-border-strong);
}

.ow-team button.is-on {
    border-color: #111827;
    box-shadow: inset 0 0 0 1px #111827;
}

.ow-team button .ow-pill {
    grid-column: 2 / -1;
    justify-self: start;
}

.ow-team-name {
    display: flex;
    flex-direction: column;
    font-size: 0.86rem;
}

.ow-team-name small {
    color: var(--admin-text-muted);
    font-size: 0.72rem;
}

.ow-team-count {
    color: var(--admin-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.ow-phases {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.ow-phase {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-width: 0;
}

.ow-phase:hover {
    border-color: var(--admin-border-strong);
}

.ow-phase.is-on {
    border-color: #111827;
    box-shadow: inset 0 0 0 1px #111827;
}

.ow-phase-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.88rem;
}

.ow-phase-nums {
    color: var(--admin-text-muted);
    font-size: 0.78rem;
}

.ow-phase-nums b {
    color: var(--admin-text);
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.ow-phase-foot {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: var(--admin-text-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

/* ---------- Dialogs ---------- */

.ow-dialog {
    width: min(34rem, 100%);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

.ow-dialog > .ow-callout {
    margin-bottom: 0.85rem;
}

.ow-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ow-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.ow-slider {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--admin-text-muted);
}

.ow-slider input {
    accent-color: #111827;
}

.ow-checks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: var(--admin-desc-text);
}

.ow-checks label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
    .ow-phases {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .ow-columns,
    .ow-columns-even,
    .ow-split,
    .ow-grid-2 {
        grid-template-columns: 1fr;
    }

    .ow-detail {
        position: static;
    }

    .ow-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ow-tiles {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ow-stats,
    .ow-phases,
    .ow-form-grid {
        grid-template-columns: 1fr;
    }

    .ow-headline-text {
        font-size: 0.95rem;
    }

    .ow-issue-head,
    .ow-task-head {
        flex-direction: column;
    }

    .ow-issue-amount,
    .ow-task-side {
        align-items: flex-start;
        text-align: left;
    }

    .ow-lead {
        grid-template-columns: 1fr;
        grid-template-areas:
            "kicker"
            "title"
            "money"
            "action";
    }

    .ow-lead-money {
        align-items: flex-start;
    }

    .ow-actions .admin-btn {
        width: 100%;
        justify-content: flex-start;
    }
}
