/* Estate Admin - Zihmer Law — ZLF Style Guide */
:root {
    /* Brand */
    --red: #B21F29;
    --red-dark: #8a1820;
    --red-light: #fdf2f2;
    --red-glow: rgba(178, 31, 41, 0.15);

    /* Neutrals (slate scale) */
    --slate-900: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;

    /* Semantic aliases for compatibility */
    --primary: #B21F29;
    --primary-dark: #8a1820;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #1e293b;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.04), 0 10px 24px rgba(0,0,0,0.08);

    /* Radii */
    --radius: 10px;
    --radius-lg: 14px;

    /* Transition */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--slate-500);
    background: var(--slate-50);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--slate-900); }

/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #c62a35 0%, #9a1820 100%);
    color: white;
    padding: 0 1.5rem;
    height: 56px;
    box-shadow: 0 2px 8px rgba(138, 24, 32, 0.25);
    z-index: 100;
    position: relative;
}
.nav-brand { display: flex; align-items: center; gap: 0.6rem; }
.nav-brand a { color: white; text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.nav-logo { background: white; border-radius: 6px; padding: 2px; display: flex; align-items: center; justify-content: center; }
.nav-logo img { display: block; border-radius: 4px; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; margin-left: 2rem; }
.nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: var(--transition);
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.12); }
.nav-link.active { color: white; background: rgba(255,255,255,0.18); font-weight: 600; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: 0.82rem; color: rgba(255,255,255,0.85); }
.nav-user a { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 500; padding: 0.3rem 0.6rem; border-radius: 6px; transition: var(--transition); }
.nav-user a:hover { color: white; background: rgba(255,255,255,0.12); }
.nav-username { font-weight: 600; color: rgba(255,255,255,0.9); }

/* ===== App layout ===== */
.app-layout { display: flex; min-height: calc(100vh - 56px); }

/* ===== Sidebar ===== */
.sidebar {
    width: 230px;
    background: #1e1e2d;
    padding: 1.5rem 0;
    flex-shrink: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-heading {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    padding: 0 1.25rem;
    margin-bottom: 0.5rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.sidebar-link.active {
    background: rgba(178, 31, 41, 0.15);
    color: #ff6b73;
    font-weight: 600;
    border-left-color: var(--red);
}
.sidebar-link svg { flex-shrink: 0; }
.sidebar-user {
    margin-top: auto;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: #ff6b73;
    font-weight: 600;
}
.nav-new-matter {
    background: rgba(255,255,255,0.15);
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
}

/* ===== Main content ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    animation: fadeUp 0.35s ease-out;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Container */
.container { max-width: 1200px; margin: 2rem 2rem; padding: 0; }

/* ===== Page header ===== */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.page-header h1 { font-size: 1.35rem; font-weight: 700; color: var(--slate-900); }
.back-link { color: var(--red); text-decoration: none; font-size: 0.82rem; display: block; margin-bottom: 0.25rem; font-weight: 500; }
.back-link:hover { text-decoration: underline; }
.subtitle { color: var(--slate-500); font-size: 0.82rem; }
.client-name-subtitle { color: var(--slate-700); font-size: 1rem; font-weight: 500; margin-top: 2px; }

/* ===== Controls bar ===== */
.controls-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.search-input { padding: 0.6rem 0.75rem; border: 1.5px solid var(--slate-200); border-radius: 8px; font-size: 0.88rem; min-width: 200px; font-family: var(--font); color: var(--slate-900); }
.search-input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-glow); }
.filter-select { padding: 0.6rem 0.75rem; border: 1.5px solid var(--slate-200); border-radius: 8px; font-size: 0.88rem; font-family: var(--font); color: var(--slate-900); }
.filter-select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-glow); }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-family: var(--font);
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, #c62a35 0%, #B21F29 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(178, 31, 41, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #B21F29 0%, #8a1820 100%); box-shadow: 0 2px 6px rgba(178, 31, 41, 0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(178, 31, 41, 0.3); }
.btn-secondary { background: white; color: var(--slate-700); border: 1.5px solid var(--slate-200); }
.btn-secondary:hover { background: var(--slate-50); border-color: var(--slate-400); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-small { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-tiny { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-block { display: block; width: 100%; }
.btn-outline { background: white; color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover { background: var(--red); color: white; }

/* ===== Cards ===== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
    border-left: 4px solid var(--red);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 1rem;
}
.data-table th {
    background: var(--slate-900);
    color: white;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.data-table th:hover { background: #273548; }
.data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.82rem;
    vertical-align: middle;
    color: var(--slate-700);
}
.data-table tbody tr:hover { background: var(--slate-50); }
.data-table a { color: var(--red); text-decoration: none; font-weight: 500; }
.data-table a:hover { text-decoration: underline; }
.data-table .empty { color: var(--slate-500); text-align: center; padding: 2rem; }

/* Row states */
tr.stale { background: #fffbeb; }
tr.overdue { border-left: 3px solid var(--danger); }
tr.step-done td { color: var(--slate-400); }
tr.step-na td { color: var(--slate-300); text-decoration: line-through; }
tr.todo-done td { color: var(--slate-400); text-decoration: line-through; }
tr.todo-overdue { background: var(--red-light); }
tr.call-outstanding { background: #eff6ff; }

/* ===== Badges ===== */
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.65rem; font-weight: 600; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-gray { background: #e5e7eb; color: #374151; }

/* Share View */
.share-banner { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 0.6rem 0.9rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1rem; }
.share-phase { margin-bottom: 1.5rem; }
.share-phase h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--slate-700, #334155); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem 1.5rem; margin: 0.75rem 0 1.25rem; }
.detail-field { display: flex; flex-direction: column; gap: 0.15rem; }
.detail-field .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--slate-500, #64748b); }
.detail-field .value { font-size: 0.9rem; color: var(--slate-800, #1e293b); }

/* Billing badges */
.billing-badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.65rem; font-weight: 600; }
.billing-unbilled { background: var(--slate-100); color: var(--slate-500); }
.billing-ready { background: #fef3c7; color: #92400e; }
.billing-billed { background: #dcfce7; color: #166534; }
.billing-billed_previously { background: #dbeafe; color: #1e40af; }

/* Status badges */
.status-not_started { background: var(--slate-100); color: var(--slate-500); }
.status-working { background: #dbeafe; color: #1e40af; }
.status-locked { background: #fef3c7; color: #92400e; }
.status-done { background: #dcfce7; color: #166534; }
.status-na { background: var(--slate-100); color: var(--slate-300); }

/* Verification colors */
.verification-to_confirm { border-color: #d97706; }
.verification-working { border-color: #3b82f6; }
.verification-verified { border-color: #16a34a; }
.verification-handled { border-color: #16a34a; }
.question-handled { background: #f0fdf4; }
.question-handled td { color: #16a34a; }
.doc-placeholder td { color: var(--slate-500); font-style: italic; }

/* Dates grid */
.dates-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.date-field label { display: block; font-size: 0.7rem; font-weight: 600; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.date-field .view-mode { font-size: 0.88rem; color: var(--slate-900); }
.date-field .due-date-soon { color: var(--danger); font-weight: 600; }
.dates-edit-toggle { margin-top: 0.5rem; }

/* ===== Inline edits ===== */
.inline-input {
    border: 1.5px solid transparent;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
    background: transparent;
    width: 100%;
    font-family: var(--font);
    color: var(--slate-900);
    transition: var(--transition);
}
.inline-input:hover { border-color: var(--slate-200); }
.inline-input:focus { border-color: var(--red); outline: none; background: white; box-shadow: 0 0 0 3px var(--red-glow); }
.inline-input.small { width: 120px; }
.inline-select {
    border: 1.5px solid transparent;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
    background: transparent;
    cursor: pointer;
    font-family: var(--font);
    color: var(--slate-900);
    transition: var(--transition);
}
.inline-select:hover { border-color: var(--slate-200); }
.inline-select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-glow); }
.inline-textarea {
    border: 1.5px solid transparent;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    font-size: 0.82rem;
    background: transparent;
    width: 100%;
    resize: vertical;
    font-family: var(--font);
    color: var(--slate-900);
    transition: var(--transition);
}
.inline-textarea:hover { border-color: var(--slate-200); }
.inline-textarea:focus { border-color: var(--red); outline: none; background: white; box-shadow: 0 0 0 3px var(--red-glow); }

/* ===== Matter header grid ===== */
.matter-header-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem 0.75rem;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
    border-left: 4px solid var(--red);
    margin-bottom: 1.5rem;
    position: relative;
}
.header-field label { display: block; font-size: 0.7rem; font-weight: 600; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.header-field .view-mode { font-size: 0.88rem; color: var(--slate-900); }
.header-field.full-width { grid-column: 1 / -1; }
.header-field .due-date-soon { color: var(--danger); font-weight: 600; }
.header-edit-btn { position: absolute; top: 0.75rem; right: 0.75rem; grid-column: 7; }
.status-note-view { white-space: pre-wrap; }

.background-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem 1.5rem;
    padding: 0.5rem 0;
}

/* Phase and package badges */
.phase-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.82rem; font-weight: 500; }
.package-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.82rem; font-weight: 500; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 0; margin-bottom: 0; border-bottom: 2px solid var(--slate-200); }
.tab-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--slate-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: var(--font);
    transition: var(--transition);
}
.tab-btn:hover { color: var(--slate-700); }
.tab-btn.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }
.tab-content { display: none; padding: 1.5rem 0; }
.tab-content.active { display: block; }

/* ===== Forms ===== */
.form-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
}
fieldset { border: 1.5px solid var(--slate-200); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
legend { font-weight: 600; padding: 0 0.5rem; font-size: 0.88rem; color: var(--slate-900); }
.form-group { margin-bottom: 0.75rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--slate-700); margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--slate-200);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: var(--font);
    color: var(--slate-900);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-glow); }
.form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.form-row > * { flex: 1; min-width: 120px; }
.form-actions { margin-top: 1rem; display: flex; gap: 0.75rem; }
.inline-form { margin-top: 1rem; padding: 1rem; background: var(--slate-50); border-radius: var(--radius); border: 1px solid var(--slate-200); }
.inline-form h4 { margin-bottom: 0.5rem; font-size: 0.82rem; }
.inline-form .form-row > * { min-width: 100px; }
.inline-form input, .inline-form select {
    padding: 0.5rem 0.6rem;
    border: 1.5px solid var(--slate-200);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: var(--font);
    color: var(--slate-900);
}
.inline-form input:focus, .inline-form select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-glow); }
.hint { font-size: 0.8rem; color: var(--slate-500); margin-bottom: 0.75rem; }

/* Step picker */
.step-phase-group { margin-bottom: 0.75rem; }
.step-phase-group h4 { font-size: 0.82rem; font-weight: 600; color: var(--slate-700); margin-bottom: 0.25rem; }
.step-checkbox { display: block; padding: 4px 0; font-size: 0.82rem; cursor: pointer; }
.step-checkbox input { margin-right: 6px; accent-color: var(--red); }
.step-code { color: var(--slate-500); font-weight: 500; }
.phase-header { font-size: 0.88rem; margin-bottom: 0.5rem; }
.phase-header.current-phase { color: var(--red); }

/* Add-on bundles */
.addon-bundle { margin-bottom: 0.75rem; padding: 0.5rem; background: var(--slate-50); border-radius: 8px; }
.bundle-header { font-size: 0.82rem; cursor: pointer; display: block; }
.bundle-steps { padding: 0.5rem 0 0 1.5rem; }
.asset-transfer-names { margin-top: 0.5rem; padding-left: 1rem; }

/* ===== Billing ===== */
.billing-controls { background: #fffbeb; padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid #fde68a; }
.billing-controls label { font-weight: 600; font-size: 0.82rem; }
.billing-controls input { width: 120px; padding: 0.4rem 0.6rem; border: 1.5px solid var(--slate-200); border-radius: 8px; }
.billing-summary { font-size: 0.82rem; color: var(--slate-700); margin-left: 1rem; }
.money-cell { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.82rem; text-align: right; }

.payment-status-row { display: flex; gap: 1rem; margin-bottom: 1rem; align-items: center; }
.payment-chip { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; border-radius: var(--radius); font-size: 0.82rem; font-weight: 600; }
.payment-chip.paid { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.payment-chip.not-paid { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.payment-chip .payment-select { font-size: 0.78rem; padding: 0.2rem 0.4rem; border-radius: 6px; }

.all-assets-status { padding: 0.6rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.88rem; }
.all-assets-status.all-received { background: #dcfce7; border: 1px solid #86efac; }
.all-assets-status.not-all-received { background: #fef2f2; border: 1px solid #fca5a5; }
.all-assets-status .muted { color: var(--slate-500); font-size: 0.8rem; }
.missing-asset-row { background: #fff7ed; }
.claim-filed-row { background: #fef2f2; }
.claim-filed-row td { color: #b91c1c; }
.filing-done { background: #f0fdf4; }
.filing-done td:first-child { color: #166534; }

/* Billing summary card */
.billing-summary-card { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.summary-item {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    text-align: center;
}
.summary-item label { display: block; font-size: 0.8rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.04em; }
.big-number { font-size: 2rem; font-weight: 700; font-family: 'SF Mono', 'Fira Code', monospace; color: var(--slate-900); }
.billing-buffer-row { background: var(--slate-50); font-weight: 600; }

/* Person billing */
.person-billing-card { margin-bottom: 1.5rem; }
.person-billing-card h3 { margin-bottom: 0.5rem; }

/* ===== Meeting / Line by Line ===== */
.meeting-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
    border-left: 4px solid var(--red);
    margin-bottom: 1rem;
    transition: var(--transition);
}
.meeting-card:hover { box-shadow: var(--shadow-md); }
.meeting-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.meeting-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.meeting-card.collapsed .meeting-header { margin-bottom: 0; }
.meeting-toggle { font-size: 12px; color: var(--slate-400); transition: transform 0.2s; display: inline-block; }
.meeting-card:not(.collapsed) .meeting-toggle { transform: rotate(90deg); }
.header-due-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.header-due-badge { font-size: 0.65rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.header-due-badge.due-date-soon { background: var(--red-light); color: var(--danger); }
.header-due-badge.due-date-overdue { background: #dc2626; color: white; }
.meeting-header h3 { font-size: 1rem; font-weight: 600; }
.meeting-header h3 a { color: var(--slate-900); text-decoration: none; }
.meeting-header h3 a:hover { color: var(--red); }
.meeting-leads { font-size: 0.75rem; color: var(--slate-400); }
.meeting-body { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.meeting-field label { font-size: 0.7rem; font-weight: 600; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 2px; }
.meeting-field.full-width { flex: 1; min-width: 300px; }
.meeting-due-dates { margin-bottom: 0.75rem; }
.meeting-due-dates h4 { font-size: 0.82rem; margin-bottom: 0.5rem; }
.due-date-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.due-date-list li { font-size: 0.82rem; padding: 0.25rem 0.6rem; border-radius: 6px; display: flex; align-items: center; gap: 6px; }
.due-date-list li.due-date-soon { background: var(--red-light); color: var(--danger); font-weight: 600; }
.due-date-list li.due-date-overdue { background: #dc2626; color: white; font-weight: 600; }
.due-date-tag { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.5px; }
.meeting-todos h4 { font-size: 0.82rem; margin-bottom: 0.5rem; }
.todo-list { list-style: none; }
.todo-list li { display: flex; align-items: center; gap: 0.5rem; padding: 4px 0; font-size: 0.82rem; }
.todo-meta { color: var(--slate-400); font-size: 0.75rem; }
.compact { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.compact input, .compact select { padding: 0.35rem 0.5rem; font-size: 0.75rem; border: 1.5px solid var(--slate-200); border-radius: 6px; }

/* ===== Login ===== */
.login-page { display: flex; min-height: 100vh; }
.login-brand {
    flex: 0 0 420px;
    background: linear-gradient(160deg, #c62a35 0%, #7a1118 100%);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: white;
}
.login-brand::before, .login-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}
.login-brand::before { width: 400px; height: 400px; top: -100px; right: -100px; }
.login-brand::after { width: 300px; height: 300px; bottom: -80px; left: -80px; background: rgba(255,255,255,0.04); }
.login-brand h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
.login-brand p { font-size: 0.92rem; color: rgba(255,255,255,0.7); }
.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
}
.login-card h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--slate-900); text-align: center; }
.login-card .subtitle { margin-bottom: 1.5rem; text-align: center; }
.divider { display: flex; align-items: center; margin: 1.5rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--slate-200); }
.divider span { padding: 0 1rem; color: var(--slate-400); font-size: 0.78rem; font-weight: 500; }
.login-card .form-group { text-align: left; }

/* ===== Alerts ===== */
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.82rem; }
.alert-error { background: var(--red-light); color: #b91c1c; border: 1px solid #fecaca; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 3rem; color: var(--slate-500); }
.empty-state a { color: var(--red); }

/* Doc link */
.doc-link { font-size: 0.75rem; font-weight: 500; }
.email-link { color: var(--red); text-decoration: none; font-size: 0.82rem; cursor: pointer; }
.email-link:hover { text-decoration: underline; }

/* ===== Icon buttons ===== */
.btn-icon { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0.3rem 0.4rem; border-radius: 6px; transition: var(--transition); }
.btn-icon:hover { background: var(--slate-100); }
.edit-btn { color: var(--success); font-size: 1.25rem; }
.edit-btn:hover { color: #15803d; }
.delete-btn { color: var(--danger); font-size: 0.82rem; }
.delete-btn:hover { color: #b91c1c; }
.actions-cell { white-space: nowrap; }

/* ===== Phase colors ===== */
.phase-select { font-weight: 500; border-radius: 6px; padding: 0.3rem 0.5rem; }
.phase-color-0 { background: transparent; }
.phase-color-1 { background: #dbeafe; color: #1e40af; }
.phase-color-2 { background: #fce7f3; color: #9d174d; }
.phase-color-3 { background: #fef3c7; color: #92400e; }
.phase-color-4 { background: #e0e7ff; color: #3730a3; }
.phase-color-5 { background: #d1fae5; color: #065f46; }
.phase-color-6 { background: #ede9fe; color: #5b21b6; }
.phase-color-7 { background: #fef9c3; color: #854d0e; }
.phase-color-8 { background: #ccfbf1; color: #115e59; }
.phase-color-9 { background: #ffe4e6; color: #9f1239; }
.phase-color-10 { background: #ffedd5; color: #9a3412; }
.phase-color-11 { background: #dcfce7; color: #166534; }
.phase-color-12 { background: #f3f4f6; color: #374151; }

/* Package colors */
.package-green { background: #dcfce7; color: #166534; font-weight: 500; }
.package-blue { background: #dbeafe; color: #1e40af; font-weight: 500; }
.package-gold { background: #fef3c7; color: #92400e; font-weight: 500; }

/* ===== Document Drop Zone ===== */
.drop-zone {
    border: 2px dashed var(--slate-200);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--slate-50);
}
.drop-zone:hover, .drop-zone-active {
    border-color: var(--red);
    background: var(--red-light);
}
.drop-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.drop-zone-text { font-size: 0.88rem; color: var(--slate-700); margin-bottom: 0.25rem; }
.drop-zone-browse { color: var(--red); font-weight: 600; text-decoration: underline; cursor: pointer; }
.drop-zone-hint { font-size: 0.75rem; color: var(--slate-400); }
.drop-zone-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--slate-700);
    font-weight: 500;
}
.drop-zone-selected .btn-icon { font-size: 1.1rem; color: var(--slate-500); }

/* ===== Extraction Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.extraction-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.extraction-check-row:hover { background: var(--slate-50); }
.extraction-check-row input[type="checkbox"] { accent-color: var(--red); flex-shrink: 0; }
.extraction-label { color: var(--slate-500); font-weight: 500; white-space: nowrap; }
.extraction-value { color: var(--slate-900); }
.extraction-edit {
    flex: 1;
    min-width: 120px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--slate-200);
    border-radius: 4px;
    font-size: 0.84rem;
    font-family: var(--font);
    color: var(--slate-900);
}
.extraction-edit:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px var(--red-glow); }
.extraction-edit-sm { flex: 0 1 100px; min-width: 80px; }

/* ===== Task detail rows ===== */
.task-expand-btn { transition: transform 0.2s; font-size: 10px; color: var(--slate-400); }
.task-detail-row { background: var(--slate-50); }
.task-detail-row td { padding: 0 !important; border-bottom: 1px solid var(--slate-200); }
.task-detail-content { padding: 0.75rem 1.25rem; display: flex; gap: 2rem; flex-wrap: wrap; }
.task-subtasks, .task-comments { flex: 1; min-width: 280px; }
.task-subtasks h5, .task-comments h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-400); margin-bottom: 0.4rem; }
.subtask-list, .comment-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.task-subtask { display: flex; align-items: center; gap: 0.4rem; padding: 3px 0; font-size: 0.82rem; }
.subtask-done .subtask-text { text-decoration: line-through; color: var(--slate-400); }
.subtask-count { font-size: 0.75rem; color: var(--slate-400); margin-left: 0.4rem; }
.subtask-meta { color: var(--slate-400); font-size: 0.75rem; }
.subtask-add-form { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.task-comment { padding: 0.4rem 0; border-bottom: 1px solid var(--slate-100); }
.task-comment:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--slate-500); }
.comment-header strong { color: var(--slate-700); }
.comment-time { font-size: 0.7rem; color: var(--slate-400); }
.comment-body { font-size: 0.82rem; color: var(--slate-700); margin-top: 2px; }
.comment-add-form { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.4rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem 0;
        display: flex;
        gap: 0;
    }
    .sidebar-section { display: flex; margin-bottom: 0; }
    .sidebar-heading { display: none; }
    .sidebar-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    .sidebar-link.active { border-left-color: transparent; border-bottom-color: var(--red); }
    .app-layout { flex-direction: column; }
    .main-content { min-height: 0; }
    .container { padding: 0 1rem; margin: 1rem auto; }
    .matter-header-grid { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; }
    .billing-summary-card { flex-direction: column; }
    .dates-grid { grid-template-columns: 1fr 1fr; }
    .login-brand { display: none; }
}

/* ===== Project Management (readiness planner) ===== */
.pm-sync { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; }
.pm-flash { padding: 0.6rem 0.9rem; border-radius: 8px; font-size: 0.82rem; font-weight: 500; margin-bottom: 1rem; }
.pm-flash-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.pm-flash-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.pm-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pm-chip { font-size: 0.72rem; font-weight: 600; padding: 0.3rem 0.6rem; border-radius: 999px; }
.pm-chip-ready { background: #dcfce7; color: #166534; }
.pm-chip-gate { background: #fef3c7; color: #92400e; }
.pm-chip-bill { background: #fee2e2; color: #b91c1c; }
.pm-chip-hold { background: #e0e7ff; color: #3730a3; }
.pm-chip-lock { background: #fde68a; color: #92400e; }
.pm-chip-coming { background: var(--slate-100); color: var(--slate-600); text-decoration: none; cursor: pointer; }
.pm-chip-coming:hover { background: var(--slate-200); }
.pm-chip-addon { background: #ede9fe; color: #6d28d9; text-decoration: none; cursor: pointer; }
.pm-chip-addon:hover { background: #ddd6fe; }
#coming-up, #add-ons { scroll-margin-top: 1rem; }
/* ShareView toggle + banner */
.nav-share-form { margin: 0; }
.nav-share-btn { cursor: pointer; font-family: var(--font); font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 0.3rem 0.6rem; transition: var(--transition); }
.nav-share-btn:hover { background: rgba(255,255,255,0.22); color: white; }
.nav-share-btn.on { background: #111827; color: #fde68a; border-color: #fde68a; }
.share-banner { background: #111827; color: #f8fafc; font-size: 0.82rem; padding: 0.55rem 1.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.share-banner strong { color: #fde68a; }
.share-banner-note { color: rgba(255,255,255,0.6); font-size: 0.75rem; }
.share-banner-off { margin-left: auto; cursor: pointer; font-family: var(--font); font-size: 0.75rem; font-weight: 600; color: #111827; background: #fde68a; border: none; border-radius: 6px; padding: 0.25rem 0.7rem; }
.pm-panel-addons { margin-top: 0.75rem; border-top: 1px dashed var(--slate-200); padding-top: 0.5rem; }
.pm-panel-addons-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); margin-bottom: 0.3rem; }
.pm-lock-item { background: #fffbeb; border-color: #fde68a; }
.pm-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.pm-panel-lock .btn { font-weight: 600; }

.pm-hold-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.6rem; }
.pm-bucket { flex: 1; font-size: 0.75rem; padding: 0.35rem 0.4rem; border: 1px solid var(--slate-200); border-radius: 6px; background: white; }

.pm-matter-select { font-size: 0.85rem; padding: 0.5rem 0.6rem; border: 1.5px solid var(--slate-200); border-radius: 8px; min-width: 280px; max-width: 100%; background: white; color: var(--slate-900); }
.pm-panel { margin-top: 1rem; border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; }
.pm-panel-title { background: var(--slate-900); color: white; font-weight: 700; font-size: 0.85rem; padding: 0.55rem 0.8rem; }
.pm-panel-list { list-style: none; }
.pm-panel-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--slate-100); }
.pm-panel-row:last-child { border-bottom: none; }
.pm-panel-step { font-size: 0.82rem; color: var(--slate-900); font-weight: 500; }
.pm-panel-status { font-size: 0.72rem; color: var(--slate-500); font-weight: 400; margin-left: 0.4rem; }
.pm-bill-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.pm-bill-actions .pm-inline { display: flex; gap: 0.3rem; align-items: center; }

.pm-section {
    background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
}
.pm-section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.9rem; gap: 1rem; flex-wrap: wrap; }
.pm-section-head h2 { font-size: 1rem; font-weight: 700; color: var(--slate-900); }
.pm-muted { font-size: 0.73rem; color: var(--slate-400); }
.pm-empty { color: var(--slate-400); font-size: 0.78rem; padding: 0.4rem 0; }
.pm-count { display: inline-block; margin-left: 0.4rem; font-size: 0.7rem; background: var(--slate-100); color: var(--slate-500); border-radius: 999px; padding: 0.05rem 0.45rem; font-weight: 600; }
.pm-inline { display: inline; margin: 0; }

/* Coming up next — collapsed look-ahead */
.pm-coming > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; list-style: none; }
.pm-coming > summary::-webkit-details-marker { display: none; }
.pm-coming > summary::before { content: '\25B8'; color: var(--slate-400); margin-right: 0.4rem; font-size: 0.8rem; }
.pm-coming[open] > summary::before { content: '\25BE'; }
.pm-coming[open] > summary { margin-bottom: 0.9rem; }
.pm-coming-title { font-size: 1rem; font-weight: 700; color: var(--slate-900); }
.pm-coming-table { width: 100%; }

/* Week planner */
.pm-week { overflow-x: auto; }
/* Fixed layout so the 5 days share the available width evenly and the table
   fills the screen — only scrolls when the viewport is genuinely narrow. */
.pm-week-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 600px; table-layout: fixed; }
.pm-week-table th:first-child, .pm-week-person { width: 88px; }
.pm-week-table th { background: var(--slate-900); color: white; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.6rem 0.7rem; text-align: left; }
.pm-week-table th:first-child { border-top-left-radius: 8px; }
.pm-week-table th:last-child { border-top-right-radius: 8px; }
/* Today: strongly highlighted column, header + cells + defining side borders */
.pm-week-table th.pm-today { background: var(--red); box-shadow: inset 0 -3px 0 var(--red-dark); }
.pm-week-cell.pm-today { background: var(--red-light); border-left: 2px solid var(--red); border-right: 2px solid var(--red); }
.pm-week-person { font-weight: 700; color: var(--slate-900); font-size: 0.95rem; background: var(--slate-50); white-space: nowrap; padding: 0.5rem 0.7rem; border-right: 2px solid var(--slate-300); border-left: 5px solid var(--slate-300); }
.pm-lane-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.45rem; vertical-align: middle; background: var(--slate-300); }
.pm-week-cell { border: 1px solid var(--slate-100); vertical-align: top; padding: 0.55rem; height: 138px; }
/* Bold dividers between each person's swim lane */
.pm-week-table tbody tr:not(:last-child) td { border-bottom: 3px solid var(--slate-200); }
.pm-plan-item { font-size: 0.8rem; margin-bottom: 0.5rem; padding: 0.5rem 0.55rem; background: white; border: 1px solid var(--slate-200); border-left: 3px solid var(--slate-300); border-radius: 7px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.pm-plan-item:hover { box-shadow: var(--shadow-md); }
.pm-plan-top { display: flex; align-items: flex-start; gap: 0.35rem; }
/* Completed tasks STAY on the board as a visible record of work done — a
   positive green "done" state, not a faded-out one. */
.pm-plan-done { opacity: 1; background: #f0fdf4; }
.pm-plan-done .pm-plan-text { text-decoration: none; color: var(--slate-500); }
.pm-plan-done .pm-plan-estate { color: var(--slate-600); }
.pm-plan-done .pm-check { color: #16a34a; }
/* Clickable "✓ done · undo" chip — one-tap recovery if a task was billed by mistake */
.pm-done-side { margin-left: auto; }
.pm-done-badge-btn { background: #dcfce7; color: #166534; border: 1px solid #86efac; border-radius: 999px;
    font-size: 0.66rem; font-weight: 600; padding: 0.05rem 0.4rem; cursor: pointer; line-height: 1.3; white-space: nowrap; }
.pm-done-badge-btn:hover { background: #bbf7d0; }
.pm-undo-hint { opacity: 0; transition: opacity var(--transition); }
.pm-plan-item:hover .pm-undo-hint, .pm-plan-item:focus-within .pm-undo-hint { opacity: 0.75; }
.pm-plan-text { flex: 1; min-width: 0; color: var(--slate-700); line-height: 1.35; display: flex; flex-direction: column; overflow-wrap: break-word; }
.pm-plan-estate { color: var(--slate-900); font-weight: 700; font-size: 0.82rem; }
.pm-plan-task { color: var(--slate-600); font-weight: 400; font-size: 0.82rem; }
/* "Bill ↗" deep-link to the client's Monday Billing card */
.pm-bill-link { align-self: flex-start; margin-top: 0.2rem; font-size: 0.66rem; font-weight: 600;
    color: var(--red); text-decoration: none; padding: 0.05rem 0.35rem; border: 1px solid var(--red);
    border-radius: 4px; line-height: 1.3; opacity: 0; transition: opacity var(--transition), background var(--transition); }
.pm-plan-item:hover .pm-bill-link, .pm-plan-item:focus-within .pm-bill-link { opacity: 1; }
.pm-bill-link:hover { background: var(--red); color: white; }
.pm-plan-done .pm-bill-link { display: none; }
/* Controls stay out of the way until you hover (or keyboard-focus) the card */
.pm-plan-ctrls { display: flex; gap: 0.15rem; margin-top: 0.35rem; padding-left: 1.2rem; opacity: 0; transition: opacity var(--transition); }
.pm-plan-item:hover .pm-plan-ctrls, .pm-plan-item:focus-within .pm-plan-ctrls { opacity: 1; }
.pm-check, .pm-x, .pm-move { background: none; border: none; cursor: pointer; padding: 0 0.15rem; font-size: 0.9rem; color: var(--slate-500); line-height: 1; }
.pm-move { font-size: 0.72rem; color: var(--slate-400); border-radius: 4px; }
.pm-move:hover { color: var(--red); background: var(--slate-100); }
.pm-move-day { font-size: 0.64rem; border: 1px solid var(--slate-200); border-radius: 4px; padding: 0; color: var(--slate-500); background: white; cursor: pointer; }
.pm-x { color: var(--slate-300); font-size: 1.05rem; margin-left: auto; }
.pm-x:hover { color: var(--danger); }
/* Per-person lane colors: name-cell rail + dot + a matching accent on each card */
.pm-lane-shelby .pm-week-person { border-left-color: #2563eb; background: #eff6ff; color: #1e3a8a; }
.pm-lane-shelby .pm-lane-dot { background: #2563eb; }
.pm-lane-shelby .pm-plan-item { border-left-color: #2563eb; }
.pm-lane-carol .pm-week-person { border-left-color: #16a34a; background: #f0fdf4; color: #14532d; }
.pm-lane-carol .pm-lane-dot { background: #16a34a; }
.pm-lane-carol .pm-plan-item { border-left-color: #16a34a; }
.pm-lane-tracy .pm-week-person { border-left-color: var(--red); background: var(--red-light); color: var(--red-dark); }
.pm-lane-tracy .pm-lane-dot { background: var(--red); }
.pm-lane-tracy .pm-plan-item { border-left-color: var(--red); }
.pm-lane-unassigned .pm-week-person { border-left-color: var(--slate-400); color: var(--slate-500); }
/* Complexity badge (Easy/Medium/Hard) from tasks.xlsx — color-coded */
.cx { display: inline-block; font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.05rem 0.32rem; border-radius: 4px; vertical-align: middle; white-space: nowrap; }
.cx-hard { background: #fde8e8; color: #b21f29; }
.cx-medium { background: #fef3c7; color: #92400e; }
.cx-easy { background: #dcfce7; color: #166534; }
.pm-search-bar { display: flex; gap: 0.5rem; align-items: center; margin: 0 0 1rem; }
.pm-search-bar input[type=search] { flex: 1; max-width: 30rem; font-size: 0.9rem; padding: 0.5rem 0.7rem; border: 1px solid var(--slate-200); border-radius: 6px; }
.pm-search-bar input[type=search]:focus { outline: none; border-color: var(--slate-400); }
.pm-addtask { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.6rem; flex-wrap: wrap; }
.pm-addtask-text { flex: 1; min-width: 12rem; font-size: 0.8rem; padding: 0.3rem 0.5rem; border: 1px solid var(--slate-200); border-radius: 5px; }

/* Ready pool */
.pm-ready-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.pm-gate-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.pm-ready-col, .pm-gate-col { background: var(--slate-50); border-radius: var(--radius); padding: 0.85rem; }
.pm-ready-head, .pm-gate-head { font-weight: 700; color: var(--slate-900); font-size: 0.9rem; margin-bottom: 0.6rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--slate-200); }

/* Card = task on top, matter below, controls on their own row */
.pm-ready-item, .pm-gate-item, .pm-hold-item {
    display: flex; flex-direction: column; gap: 0.5rem;
    background: white; border: 1px solid var(--slate-200); border-radius: 8px;
    padding: 0.6rem 0.7rem; margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
}
.pm-hold-item { background: #faf9ff; border-color: #ddd6fe; }
.pm-ready-main { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.pm-ready-title { font-size: 0.85rem; font-weight: 600; color: var(--slate-900); line-height: 1.3; }
.pm-ready-main .badge { vertical-align: middle; margin-left: 0.25rem; }
.pm-ready-sub { font-size: 0.75rem; color: var(--slate-500); line-height: 1.3; }
.pm-ready-actions { display: flex; align-items: center; gap: 0.4rem; }
.pm-ready-actions .pm-inline:first-child { flex: 1; display: flex; gap: 0.35rem; }
.pm-ready-actions .btn { flex-shrink: 0; }
.pm-date { flex: 1; font-size: 0.75rem; padding: 0.35rem 0.4rem; border: 1px solid var(--slate-200); border-radius: 6px; background: white; color: var(--slate-700); }

@media (max-width: 900px) {
    .pm-ready-cols, .pm-gate-cols { grid-template-columns: 1fr; }
}
