/* ═══════════════════════════════════════════════════════════
   נדל״ן פרו — Transaction Module Styles v5
   Covers: list page, create modal, detail page
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   0. SHARED / PAGE CHROME
   ───────────────────────────────────────────────────────── */

.page-container { padding: var(--space-7) var(--space-8); }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
    flex-wrap: wrap;
}

.page-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-none);
}

.page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* btn-spinner → see animations.css */

/* ─────────────────────────────────────────────────────────
   1. TOOLBAR — Search + Filters
   ───────────────────────────────────────────────────────── */

.tx-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.tx-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 400px;
}

.tx-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 19px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--duration-fast);
}

.tx-search-input {
    padding-right: 40px !important;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
}

.tx-search-input:focus + .tx-search-icon,
.tx-search-wrap:focus-within .tx-search-icon {
    color: var(--navy-500);
}

/* ─────────────────────────────────────────────────────────
   2. DATA TABLE — Transaction Rows
   ───────────────────────────────────────────────────────── */

.tx-table {
    min-width: 1100px;         /* enable horizontal scroll on small screens */
    font-size: var(--text-xs);
}

.tx-table th {
    font-size: 10px;
    padding: var(--space-2-5) var(--space-3);
    position: sticky;
    top: 0;
    background: var(--gray-25);
    z-index: 2;
}

.tx-table td {
    padding: var(--space-2-5) var(--space-3);
    white-space: nowrap;
}

.tx-row {
    cursor: pointer;
    transition: background var(--duration-fast), box-shadow var(--duration-fast);
}
.tx-row:hover {
    background: var(--gray-25);
}
.tx-row:active {
    background: var(--gray-50);
}

.tx-property-cell {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
}

.tx-mono {
    font-family: var(--font-mono, 'Courier New', monospace);
    font-size: var(--text-2xs);
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.tx-type-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    background: var(--navy-50);
    color: var(--navy-700);
    letter-spacing: 0.01em;
}

/* ─── Payment Cell ─── */

.tx-pay-cell {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
}

.tx-pay-amount {
    font-family: var(--font-display);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
}

.tx-pay-status {
    font-size: 13px;
    line-height: 1;
}
.tx-pay-status.received { color: var(--emerald-600); }
.tx-pay-status.pending  { color: var(--gray-300); }

/* ─── Inline Progress Bar ─── */

.tx-progress-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 100px;
}

.tx-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.tx-progress-fill {
    height: 100%;
    background: var(--gradient-navy);
    border-radius: var(--radius-full);
    transition: width 0.6s var(--ease-spring);
    min-width: 2px;
}

.tx-progress-label {
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    color: var(--navy-600);
    min-width: 30px;
    text-align: start;
}

/* ─────────────────────────────────────────────────────────
   3. CREATE MODAL — Form Layout
   ───────────────────────────────────────────────────────── */

.tx-modal {
    max-width: 700px;
    max-height: 90vh;
}

.tx-form { display: flex; flex-direction: column; gap: var(--space-1); }

.tx-form-section {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--navy-700);
    padding: var(--space-4) 0 var(--space-2);
    border-bottom: 2px solid var(--navy-50);
    margin-bottom: var(--space-2);
}
.tx-form-section .material-icons-round {
    font-size: 18px;
    color: var(--navy-400);
}

.tx-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.tx-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.tx-field-wide {
    grid-column: 1 / -1;
}

/* ─── Custom Checkbox ─── */

.tx-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    height: 42px;     /* match input height */
}

.tx-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--navy-600);
    cursor: pointer;
    border-radius: var(--radius-xs);
}

.tx-checkbox-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────
   4. DETAIL PAGE — Header Card
   ───────────────────────────────────────────────────────── */

.txd-back {
    margin-bottom: var(--space-4);
    gap: var(--space-1-5);
}
.txd-back .material-icons-round { font-size: 18px; }

.txd-header-card {
    margin-bottom: var(--space-6);
    border: 1px solid rgba(0,0,0,0.04);
}

.txd-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-6);
    gap: var(--space-5);
    flex-wrap: wrap;
}

.txd-header-main {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    flex: 1;
    min-width: 0;
}

.txd-header-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-xl);
    background: var(--gradient-navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(41,59,94,0.25);
}
.txd-header-icon .material-icons-round { font-size: 24px; }

.txd-header-info {
    min-width: 0;
    flex: 1;
}

.txd-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-2);
}

.txd-subtitle {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.txd-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    background: var(--gray-50);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.txd-meta-chip .material-icons-round { font-size: 14px; color: var(--navy-400); }

.txd-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.txd-status-badge { font-size: var(--text-sm); padding: 5px 16px; }

/* ─── Progress Bar ─── */

.txd-progress-section {
    padding: 0 var(--space-6) var(--space-5);
}

.txd-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-2);
    font-weight: var(--weight-medium);
}

.txd-progress-pct {
    font-weight: var(--weight-bold);
    color: var(--navy-600);
}

.txd-progress-track {
    height: 6px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.txd-progress-fill {
    height: 100%;
    background: var(--gradient-navy);
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-spring);
    position: relative;
}
.txd-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

/* ─── Key Info Strip ─── */

.txd-key-info {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.txd-key-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    min-width: 0;
    border-left: 1px solid var(--border-subtle);
}
.txd-key-item:last-child { border-left: none; }

.txd-key-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.txd-key-item-icon .material-icons-round { font-size: 18px; color: var(--navy-500); }

.txd-key-item-value {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.txd-key-item-label {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────
   5. DETAIL PAGE — Tabs
   ───────────────────────────────────────────────────────── */

.txd-tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: var(--space-6);
    overflow-x: auto;
    scrollbar-width: none;
}
.txd-tabs::-webkit-scrollbar { display: none; }

.txd-tab {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition:
        color var(--duration-fast),
        border-color var(--duration-fast);
}
.txd-tab .material-icons-round { font-size: 17px; }
.txd-tab:hover { color: var(--text-primary); }
.txd-tab.active {
    color: var(--navy-600);
    border-bottom-color: var(--navy-600);
}
.txd-tab.active .material-icons-round { color: var(--navy-500); }

.txd-tab-body { min-height: 200px; }

/* ─────────────────────────────────────────────────────────
   6. TAB — Overview
   ───────────────────────────────────────────────────────── */

.txd-overview {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: var(--space-5);
}
.txd-overview-main { display: flex; flex-direction: column; gap: var(--space-5); }
.txd-overview-side { display: flex; flex-direction: column; gap: var(--space-5); }

.txd-notes-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    white-space: pre-wrap;
}

/* ─── Payment Summary Card ─── */

.txd-pay-summary-bar {
    margin-bottom: var(--space-3);
}

.txd-pay-summary-track {
    height: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.txd-pay-summary-fill {
    height: 100%;
    background: var(--gradient-emerald);
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-spring);
}

.txd-pay-summary-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
}

.txd-pay-summary-pct {
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--emerald-700);
    text-align: center;
}

/* ─── Mini Stage (sidebar timeline) ─── */

.txd-mini-stage {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    position: relative;
}

.txd-mini-stage-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--gray-200);
    background: var(--bg-surface);
    transition: all var(--duration-normal) var(--ease-spring);
}
.txd-mini-stage-dot .material-icons-round { font-size: 14px; }

.txd-mini-stage.done .txd-mini-stage-dot {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    color: white;
}
.txd-mini-stage.current .txd-mini-stage-dot {
    background: var(--navy-600);
    border-color: var(--navy-600);
    color: white;
    box-shadow: 0 0 0 4px rgba(77,103,147,0.15);
}
.txd-mini-stage.pending .txd-mini-stage-dot {
    color: var(--gray-300);
}

.txd-mini-stage-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
}
.txd-mini-stage.current .txd-mini-stage-label { color: var(--navy-700); font-weight: var(--weight-bold); }
.txd-mini-stage.done .txd-mini-stage-label    { color: var(--emerald-700); }

/* ─────────────────────────────────────────────────────────
   7. TAB — Timeline / Stepper
   ───────────────────────────────────────────────────────── */

.txd-timeline-wrapper { /* container */ }

.txd-stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: var(--space-4) 0 var(--space-6);
    scrollbar-width: none;
}
.txd-stepper::-webkit-scrollbar { display: none; }

.txd-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 90px;
}

/* Connector line between steps */
.txd-step-connector {
    position: absolute;
    top: 18px;
    right: calc(50% + 20px);
    left: calc(-50% + 20px);
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
    border-radius: var(--radius-full);
}
.txd-step:first-child .txd-step-connector { display: none; }

.txd-step.done .txd-step-connector       { background: var(--emerald-400); }
.txd-step.current .txd-step-connector    { background: var(--emerald-400); }

/* Node circle */
.txd-step-node {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: 3px solid var(--gray-200);
    color: var(--gray-400);
    z-index: 1;
    transition: all var(--duration-normal) var(--ease-spring);
    position: relative;
}
.txd-step-node .material-icons-round { font-size: 17px; }

.txd-step.done .txd-step-node {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    color: white;
}

.txd-step.current .txd-step-node {
    background: var(--navy-600);
    border-color: var(--navy-600);
    color: white;
    box-shadow: 0 0 0 5px rgba(77,103,147,0.15), 0 4px 12px rgba(41,59,94,0.2);
    transform: scale(1.1);
}

.txd-step.future .txd-step-node {
    background: var(--bg-surface);
}

.txd-step:hover:not(.done) .txd-step-node {
    border-color: var(--navy-300);
    transform: scale(1.05);
}

/* Label below node */
.txd-step-label {
    margin-top: var(--space-2);
    font-size: var(--text-2xs);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    text-align: center;
    white-space: nowrap;
}
.txd-step.done .txd-step-label    { color: var(--emerald-700); }
.txd-step.current .txd-step-label { color: var(--navy-700); font-weight: var(--weight-bold); }

.txd-stage-hint {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ─────────────────────────────────────────────────────────
   8. TAB — Financials → see finance.css
   ───────────────────────────────────────────────────────── */

.txd-financials { display: flex; flex-direction: column; gap: var(--space-5); }

/* ─────────────────────────────────────────────────────────
   9. TAB — Tasks (Collection-backed)
   ───────────────────────────────────────────────────────── */

.txd-task-header-row { margin-bottom: 0; }

.txd-task-add {
    padding: var(--space-4) var(--space-5);
}

.txd-task-add-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.txd-task-input {
    flex: 1;
}

.txd-task-priority-sel {
    width: auto;
    min-width: 100px;
    height: 42px;
    font-size: var(--text-xs);
}

/* ─── Stats Bar ─── */

.txd-task-stats {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    margin-top: var(--space-3);
    background: var(--gray-25);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
}

.txd-task-stats-bar {
    flex: 1;
    max-width: 200px;
    height: 5px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.txd-task-stats-fill {
    height: 100%;
    background: var(--gradient-emerald);
    border-radius: var(--radius-full);
    transition: width 0.5s var(--ease-spring);
}

.txd-task-stats-pct {
    font-weight: var(--weight-bold);
    color: var(--emerald-600);
}

/* ─── Task List ─── */

.txd-task-list {
    display: flex;
    flex-direction: column;
}

.txd-task-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration-fast);
}
.txd-task-item:last-child { border-bottom: none; }
.txd-task-item:hover { background: var(--gray-25); }

.txd-task-item.overdue {
    background: rgba(239,68,68,0.02);
}

.txd-task-check {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--gray-300);
    transition: color var(--duration-fast), transform var(--duration-fast) var(--ease-spring);
}
.txd-task-check:hover { color: var(--navy-500); transform: scale(1.15); }
.txd-task-check .material-icons-round { font-size: 22px; }

.txd-task-item.done .txd-task-check { color: var(--emerald-500); }
.txd-task-item.done .txd-task-text  { text-decoration: line-through; color: var(--text-muted); }

.txd-task-content {
    flex: 1;
    min-width: 0;
}

.txd-task-text {
    font-size: var(--text-sm);
    color: var(--text-primary);
    display: block;
}

.txd-task-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-1);
    flex-wrap: wrap;
}

.txd-task-due,
.txd-task-assignee {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: var(--text-2xs);
    color: var(--text-muted);
}
.txd-task-due .material-icons-round,
.txd-task-assignee .material-icons-round { font-size: 12px; }

.txd-task-due.overdue {
    color: var(--danger-600);
    font-weight: var(--weight-bold);
}

.txd-task-status-chip {
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.txd-task-status-chip.todo        { background: var(--gray-75); color: var(--gray-600); }
.txd-task-status-chip.in_progress { background: var(--gold-50); color: var(--gold-700); }
.txd-task-status-chip.review      { background: var(--navy-50); color: var(--navy-600); }
.txd-task-status-chip.done        { background: var(--emerald-50); color: var(--emerald-700); }

/* ─────────────────────────────────────────────────────────
   10. TAB — Contacts → see contacts.css
   ───────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────
   10b. TIMELINE ENGINE — Stage Detail Panel
   ───────────────────────────────────────────────────────── */

.txd-stage-detail-panel { margin-top: var(--space-5); }

.txd-stage-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.txd-stage-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.txd-stage-status-dot.pending   { background: var(--gray-300); }
.txd-stage-status-dot.active    { background: var(--navy-500); box-shadow: 0 0 0 3px rgba(77,103,147,0.2); }
.txd-stage-status-dot.completed { background: var(--emerald-500); }
.txd-stage-status-dot.skipped   { background: var(--gold-500); }

.txd-stage-status-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    padding: 2px 10px;
    background: var(--gray-50);
    border-radius: var(--radius-full);
}

.txd-stage-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ─── Stage Fields ─── */

.txd-stage-field-label {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    margin-bottom: var(--space-2);
}
.txd-stage-field-label .material-icons-round { font-size: 15px; }

.txd-stage-deadline-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-4) 0;
    flex-wrap: wrap;
}

.txd-stage-date-input {
    width: auto;
    max-width: 180px;
    height: 34px;
    font-size: var(--text-xs);
}

.txd-stage-overdue-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    color: var(--danger-600);
    background: var(--danger-50);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.txd-stage-overdue-label .material-icons-round { font-size: 14px; }

.txd-stage-days-left {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
}

.txd-stage-timestamps {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.txd-stage-ts {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}
.txd-stage-ts .material-icons-round { font-size: 14px; }

.txd-stage-notes { margin-top: var(--space-4); }
.txd-stage-notes-input { min-height: 70px; font-size: var(--text-sm); }

/* ─── Checklist ─── */

.txd-checklist-section {
    margin-top: var(--space-5);
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-4);
}

.txd-checklist-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
}

.txd-checklist-bar {
    flex: 1;
    max-width: 160px;
    height: 5px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.txd-checklist-fill {
    height: 100%;
    background: var(--gradient-emerald);
    border-radius: var(--radius-full);
    transition: width 0.5s var(--ease-spring);
}

.txd-checklist-pct {
    font-weight: var(--weight-bold);
    color: var(--emerald-600);
    font-size: var(--text-xs);
    min-width: 32px;
}

.txd-checklist-list { display: flex; flex-direction: column; }

.txd-checklist-item {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration-fast);
}
.txd-checklist-item:last-child { border-bottom: none; }
.txd-checklist-item:hover { background: var(--gray-25); margin: 0 calc(-1 * var(--space-3)); padding-right: var(--space-3); padding-left: var(--space-3); border-radius: var(--radius-sm); }

.txd-checklist-check {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--gray-300);
    transition: color var(--duration-fast), transform var(--duration-fast) var(--ease-spring);
}
.txd-checklist-check:hover { color: var(--navy-500); transform: scale(1.15); }
.txd-checklist-check .material-icons-round { font-size: 20px; }

.txd-checklist-item.done .txd-checklist-check { color: var(--emerald-500); }
.txd-checklist-item.done .txd-checklist-text  { text-decoration: line-through; color: var(--text-muted); }

.txd-checklist-text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.txd-checklist-add {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
}
.txd-checklist-add .form-input { flex: 1; height: 34px; font-size: var(--text-xs); }

/* ─── Overdue Indicators ─── */

.txd-overdue-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    color: var(--danger-600);
    background: var(--danger-50);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(239,68,68,0.15);
}
.txd-overdue-badge .material-icons-round { font-size: 14px; }

.txd-step.overdue .txd-step-node {
    border-color: var(--danger-400) !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.12);
}

.txd-step-overdue-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger-500);
    margin-top: var(--space-1);
    animation: pulse-scale 1.8s ease-in-out infinite;
}

.txd-mini-stage.overdue .txd-mini-stage-dot {
    border-color: var(--danger-400);
}

.txd-mini-stage-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
}

.txd-mini-stage-progress {
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    color: var(--navy-500);
    background: var(--navy-50);
    padding: 1px 7px;
    border-radius: var(--radius-full);
}

.txd-mini-stage-overdue {
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    color: var(--danger-600);
    background: var(--danger-50);
    padding: 1px 7px;
    border-radius: var(--radius-full);
}

/* ─── Deadline Summary Card ─── */

.txd-deadline-row {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    padding: var(--space-2-5) 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-xs);
}
.txd-deadline-row:last-child { border-bottom: none; }
.txd-deadline-row .material-icons-round { font-size: 16px; flex-shrink: 0; }

.txd-deadline-row.overdue { color: var(--danger-600); }
.txd-deadline-row.overdue .material-icons-round { color: var(--danger-500); }

.txd-deadline-row.upcoming { color: var(--text-secondary); }
.txd-deadline-row.upcoming .material-icons-round { color: var(--navy-400); }

.txd-deadline-days {
    margin-right: auto;
    font-weight: var(--weight-bold);
    white-space: nowrap;
}

.txd-deadline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4);
    text-align: center;
}

/* ─────────────────────────────────────────────────────────
   11. STATUS OPTION MODAL
   ───────────────────────────────────────────────────────── */

.txd-status-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        background var(--duration-fast),
        border-color var(--duration-fast);
    margin-bottom: var(--space-1-5);
}
.txd-status-option:hover { background: var(--gray-50); border-color: var(--border-default); }
.txd-status-option.active { background: var(--navy-50); border-color: var(--navy-200); }
.txd-status-option .material-icons-round { color: var(--navy-500); font-size: 18px; }

/* ─────────────────────────────────────────────────────────
   12. LOADING
   ───────────────────────────────────────────────────────── */

.txd-loading { padding: var(--space-8); }

/* ─────────────────────────────────────────────────────────
   13. RESPONSIVE
   ───────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .txd-overview { grid-template-columns: 1fr; }
    .txd-key-info { flex-wrap: wrap; }
    .txd-key-item { border-left: none; border-bottom: 1px solid var(--border-subtle); }
    .txd-key-item:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
    .page-container { padding: var(--space-5) var(--space-4); }
    .page-header { flex-direction: column; align-items: flex-start; }
    .tx-toolbar { flex-direction: column; }
    .tx-search-wrap { max-width: 100%; }
    .tx-form-row,
    .tx-form-row-3 { grid-template-columns: 1fr; }
    .txd-header { flex-direction: column; }
    .txd-header-actions { align-self: flex-start; }
    .txd-stepper { padding: var(--space-2) 0 var(--space-4); }
    .txd-step { min-width: 72px; }
    .txd-task-add-row { flex-wrap: wrap; }
    .txd-task-add-row .form-input { flex: 1; min-width: 140px; }
}

@media (max-width: 480px) {
}
