/* Dori 2.8: an additive presentation layer; document/print rules stay in app.css. */
@media screen {
    :root {
        --ink: #21171c;
        --muted: #70616a;
        --line: #e7dbe1;
        --paper: #fff;
        --wash: #faf8f9;
        --green: #cf1958;
        --green-dark: #a81449;
        --shadow: 0 8px 28px rgba(69, 0, 23, .045);
    }
    body { background: var(--wash); }
    .split-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,1fr); gap: 22px; align-items: start; }
    .notification-item { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; padding: 22px 16px; border-bottom: 1px solid var(--line); }
    .notification-item:last-child { border-bottom: 0; }
    .notification-item h2 { font-size: 17px; margin-bottom: 8px; }
    .notification-item p { margin: 6px 0; overflow-wrap: anywhere; }
    .notification-unread { border-left: 3px solid #e22b69; background: #fff8fb; }
    @media (max-width: 760px) { .split-layout { grid-template-columns: minmax(0,1fr); } }
    .app-shell {
        --sidebar-width: 242px;
        --app-header-height: 96px;
        background-image: radial-gradient(ellipse at 94% 5%, rgba(226,43,105,.055), transparent 42%),
            radial-gradient(ellipse at 25% 95%, rgba(226,43,105,.025), transparent 40%);
        background-attachment: fixed;
    }
    .app-shell > .page { width: min(1240px, calc(100% - 72px)); margin-top: 38px; }
    .app-topbar { height: var(--app-header-height); min-height: var(--app-header-height); padding: 14px 36px; background: #fff; }
    .app-page-context { font-size: 13px; }
    .app-page-context > strong { font-weight: 600; }
    .app-topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
    .app-topbar-profile { border: 1px solid var(--line); color: var(--ink); background: #fff; border-radius: 10px; padding: 10px 15px; }
    .app-notifications { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #7b5365; text-decoration: none; }
    .app-notifications:hover { color: var(--green-dark); background: #fff4f8; border-color: #e8b5c8; }
    .app-notification-count { position: absolute; right: -5px; top: -5px; min-width: 20px; padding: 2px 5px; border-radius: 20px; border: 2px solid #fff; background: #a81449; color: #fff; font-size: 10px; line-height: 14px; font-weight: 750; text-align: center; }
    .app-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 16px; letter-spacing: -.025em; }
    .app-brand img { display: block; width: 84px; height: auto; }
    .app-mobile-brand { display: none; }
    .app-brand > span { font-size: 12px; letter-spacing: .08em; border-left: 1px solid var(--line); padding-left: 11px; color: #a81449; }
    .app-sidebar-head { height: var(--app-header-height); min-height: var(--app-header-height); padding: 20px 24px; }
    .app-sidebar-nav { padding: 22px 13px 18px; }
    .app-nav-group { margin-bottom: 22px; }
    .app-nav-group h2 { margin-bottom: 8px; color: #7a6972; font-size: 10px; letter-spacing: .12em; }
    .app-sidebar .app-nav-link { gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 9px; font-size: 13px; }
    .app-nav-icon { flex: 0 0 auto; opacity: .76; }
    .app-sidebar .app-nav-link[aria-current=page] { color: #9b1748; background: #fce8ef; border-color: #f6d3e0; box-shadow: inset 3px 0 #e22b69; }
    .app-sidebar .app-nav-link[aria-current=page] .app-nav-icon { opacity: 1; }
    .app-sidebar-account { padding: 17px 18px max(17px, env(safe-area-inset-bottom)); background: #fff; }
    .app-user-summary { display: flex; gap: 10px; align-items: center; }
    .app-user-summary > div { min-width: 0; }
    .app-user-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: #9b1748; background: #fce8ef; border: 1px solid #f1cad9; border-radius: 50%; }
    .app-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
    .app-user-avatar-link { text-decoration: none; }
    .app-user-avatar-link:hover { outline: 2px solid #e22b69; outline-offset: 2px; }
    .profile-avatar-preview { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #fce8ef; border: 1px solid #f1cad9; }
    .profile-avatar-placeholder { display: grid; place-items: center; color: #9b1748; font-size: 32px; font-weight: 700; }
    .profile-avatar-form { max-width: 620px; margin-bottom: 24px; }
    .profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
    .profile-avatar-remove { margin: 18px 0 0; }
    .quote-status-panel > .sticky-form { position: static; }
    .sticky-form { top: calc(var(--app-header-height, 72px) + 18px); }
    .page-head { gap: 22px; margin-bottom: 28px; }
    .page-head h1 { font-size: clamp(30px, 2.9vw, 40px); letter-spacing: -.04em; line-height: 1.16; margin-top: 7px; }
    .page-head p.muted { margin: 10px 0 0; }
    .eyebrow { color: #a81449; font-size: 11px; letter-spacing: .11em; }
    .heading-count { color: #9a7e8c; font-size: .65em; font-weight: 500; letter-spacing: -.02em; }
    .panel, .stat, .auth-card { border-radius: 18px; }
    .panel { padding: 28px; }
    .panel h2 { font-size: 20px; letter-spacing: -.025em; }
    .panel-head { align-items: center; margin-bottom: 18px; }
    .panel-head h2 { margin-bottom: 5px; }
    .panel-head p { font-size: 13px; }
    .button { border-radius: 10px; min-height: 44px; padding: 10px 17px; font-size: 14px; transition: background-color .15s, border-color .15s; }
    .button.primary { background: #cf1958; box-shadow: 0 4px 12px rgba(168,20,73,.12); }
    .button.primary:hover { background: #a81449; }
    .button.secondary:hover { background: #fff5f8; border-color: #e8b5c8; }
    .button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
    input, select, textarea { border-color: #dccdd5; border-radius: 10px; padding: 11px 13px; }
    input::placeholder, textarea::placeholder { color: #8b7982; opacity: 1; }
    input:focus, select:focus, textarea:focus { border-color: #cf1958; outline: 3px solid rgba(226,43,105,.14); outline-offset: 1px; }
    :is(a, button, summary):focus-visible { outline: 3px solid #a81449; outline-offset: 3px; }
    th { color: #7f6d76; font-size: 11px; letter-spacing: .065em; font-weight: 700; }
    th, td { padding: 17px 14px; }
    tbody tr:hover { background: #fff9fb; }
    .badge { font-size: 11px; padding: 4px 9px; background: #e9f7ec; color: #206b30; }
    .badge.is-prospect { color: #795019; background: #fff3db; }
    .badge.is-paused, .badge.is-archived { color: #6e6268; background: #f0eaf0; }
    .catalog-card, .client-service-card { border-radius: 13px; padding: 20px; background: linear-gradient(140deg, #fff 65%, #fff7fa); }
    .catalog-card h3, .client-service-card h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.02em; }
    .catalog-card p, .client-service-card p { font-size: 13px; }
    .catalog-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 17px; }
    .catalog-actions form { margin: 0; }
    .catalog-actions .button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
    .catalog-card.is-inactive { background: #f8f5f7; }
    .stat-grid { gap: 18px; }
    .stat { padding: 25px 27px; }
    .stat span { font-size: 13px; }
    .stat strong { font-size: 35px; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
    .stat:first-child { border-top: 3px solid #e22b69; }
    .dashboard-welcome { position: relative; overflow: hidden; display: flex; gap: 30px; align-items: center; justify-content: space-between; }
    .dashboard-welcome p { max-width: 760px; font-size: 14px; color: var(--muted); margin-bottom: 0; }
    .dashboard-brand-icon { flex: 0 0 auto; width: 58px; height: 58px; }
    .dashboard-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 24px; }
    .dashboard-shortcut { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px; text-decoration: none; }
    .dashboard-shortcut:hover { border-color: #e8b5c8; background: #fff8fb; }
    .dashboard-shortcut strong { display: block; font-size: 14px; }
    .dashboard-shortcut small { display: block; margin-top: 3px; font-size: 12px; }
    .dashboard-shortcut > span:last-child { font-size: 20px; color: #a81449; }
    .timesheet-week-strip { gap: 10px; }
    .timesheet-day, .timesheet-total { border-radius: 12px; padding: 15px 10px; }
    .timesheet-day strong, .timesheet-total strong { font-variant-numeric: tabular-nums; }
    .timesheet-total { background: #450017; }
    .empty { color: var(--muted); padding: 52px 20px; }
    .empty h2, .empty h3 { color: var(--ink); }
    .timesheet-layout .compact-empty { padding: 55px 16px; }
    .timesheet-empty-icon { display: block; margin: 0 auto 18px; color: #a8758a; width: 52px; height: 52px; padding: 11px; background: #fcecf2; border-radius: 16px; }
    .client-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
    .client-filter[hidden] { display: none; }
    .client-filter label { flex: 1 1 220px; max-width: 390px; margin: 0; font-size: 12px; color: var(--muted); }
    .client-filter label:last-of-type { flex: 0 1 180px; }
    .client-filter output { align-self: center; margin-left: auto; font-size: 12px; color: var(--muted); padding-top: 20px; }
    .client-table td { vertical-align: middle; }
    .client-identity { display: flex; align-items: center; gap: 13px; }
    .client-avatar { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border: 1px solid #edd6df; border-radius: 12px; background: #fff1f6; color: #9b1748; font-size: 14px; font-weight: 750; }
    .client-avatar img, .client-detail-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
    .client-detail-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
    .client-detail-identity h1 { overflow-wrap: anywhere; }
    .client-detail-avatar { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden; border: 1px solid #edd6df; border-radius: 18px; background: #fff1f6; color: #9b1748; font-size: 25px; font-weight: 750; }
    .client-image-panel { margin-bottom: 18px; }
    .client-image-fields { display: grid; grid-template-columns: minmax(140px, 220px) minmax(220px, 1fr); gap: 14px; max-width: 700px; }
    .client-image-remove { margin-top: 12px; }
    @media (max-width: 600px) { .client-image-fields { grid-template-columns: 1fr; } }
    .client-identity small { display: block; font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
    .client-table .strong-link { font-size: 14px; }
    .client-drive-link { font-size: 12px; text-decoration: none; color: #a81449; font-weight: 650; }
    .client-drive-link:hover { text-decoration: underline; }
    .client-drive-empty { font-size: 12px; }
    .client-no-results { text-align: center; padding: 32px; color: var(--muted); }
    .client-no-results[hidden], .client-table tr[hidden] { display: none; }
    .auth-card { border-top: 3px solid #e22b69; box-shadow: 0 14px 50px rgba(69,0,23,.07); }
    @media (min-width: 961px) and (max-width: 1250px) {
        .app-shell .service-library-layout, .app-shell .detail-grid, .app-shell .timesheet-layout, .app-shell .quote-workspace { grid-template-columns: 1fr; }
        .app-shell .sticky-form { position: static; }
        .dashboard-shortcuts { grid-template-columns: 1fr; }
    }
    @media (max-width: 960px) {
        .navigation-boot .app-menu-toggle { display: inline-flex; align-items: center; gap: 9px; font: inherit; font-size: 14px; font-weight: 700; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; }
        .navigation-boot .app-sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, calc(100vw - 36px)); height: 100vh; height: 100dvh; border-right: 1px solid var(--line); border-bottom: 0; transform: translateX(-105%); visibility: hidden; }
        .app-shell { --app-header-height: 76px; }
        .app-shell > .page { width: calc(100% - 40px); margin-top: 28px; }
        .app-topbar { padding: 12px 20px; gap: 12px; }
        .app-brand img { width: 70px; }
        .app-mobile-brand { display: inline-flex; }
        .app-menu-toggle { margin-left: auto; }
        .app-topbar-actions { margin-left: 0; }
        .app-page-context { display: none; }
        .page-head h1 { font-size: 33px; }
        .dashboard-shortcuts { grid-template-columns: 1fr; }
    }
    @media (max-width: 650px) {
        .panel { padding: 22px 20px; border-radius: 15px; }
        .page-head { align-items: flex-start; gap: 18px; margin-bottom: 23px; }
        .page-head h1 { font-size: 31px; }
        .app-topbar-profile { display: none; }
        .app-brand > span { font-size: 10px; }
        .app-topbar { padding: 11px 16px; gap: 10px; }
        .app-shell > .page { width: calc(100% - 32px); }
        .dashboard-welcome { align-items: flex-start; gap: 16px; }
        .dashboard-brand-icon { width: 42px; height: 42px; }
        .stat-grid { grid-template-columns: 1fr; gap: 12px; }
        .stat { padding: 20px 22px; }
        .stat strong { font-size: 31px; }
        .week-nav { flex-wrap: wrap; overflow: visible; }
        .week-nav .button { flex: 1; font-size: 12px; padding: 8px 11px; }
        .timesheet-week-strip { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
        .timesheet-day, .timesheet-total { padding: 12px 5px; }
        .timesheet-total strong { font-size: 17px; }
        .timesheet-day strong { font-size: 15px; }
        .client-filter { gap: 12px; }
        .client-filter label { max-width: none; }
        .client-filter label:last-of-type { flex: 1 1 100%; }
        .client-filter output { margin: 0; padding: 0; }
        .client-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
        .client-table, .client-table tbody { display: block; width: 100%; }
        .client-table tr { display: grid; grid-template-columns: 1fr auto; gap: 11px 14px; padding: 19px 0; border-bottom: 1px solid var(--line); }
        .client-table tr:last-child { border-bottom: 0; }
        .client-table td { display: block; border: 0; padding: 0; }
        .client-table td:first-child { grid-column: 1 / -1; }
        .client-table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: 12px; }
        .client-table td:last-child { grid-column: 1 / -1; }
        .client-table td:last-child::before { display: none; }
        .client-table tr:hover { background: transparent; }
        .client-identity { gap: 11px; }
    }
    @media (prefers-reduced-motion: reduce) { .button { transition: none; } }
}
