/* Lead management: list (bk-*, leads-*), add/edit form (lf-*), lead dashboard (ld-*), follow-ups (fu-*). */

.bk {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    min-width: 0;
    box-sizing: border-box;
    color: #0f172a;
}

.bk svg.bk-ico {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.bk-shell {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 16px 48px rgba(15, 23, 42, 0.07);
}

.bk-shell__body {
    padding: 0 1.5rem 1.5rem;
    max-width: 100%;
}

.bk-header--inset {
    padding: 1.35rem 1.5rem 1.15rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
    border-radius: 18px 18px 0 0;
}

.bk-header--with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.bk-header__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.bk-header__title {
    margin: 0;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.bk-header__sub {
    margin: 0.45rem 0 0;
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.45;
}

.bk-header__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.bk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    align-items: center;
}

.bk-toolbar__search {
    flex: 1 1 220px;
    position: relative;
    min-width: 0;
}

.bk-toolbar__search svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.bk-toolbar__search .bk-input {
    padding-left: 2.35rem;
}

.bk-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.bk-select-wrap--toolbar {
    min-width: 170px;
    max-width: 200px;
}

.bk-select-wrap__chevron {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
}

.bk-input,
.bk-select {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 0.85rem;
    font: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    box-sizing: border-box;
    height: 42px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bk-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.35rem;
    cursor: pointer;
}

.bk-input:focus,
.bk-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.bk-input--date {
    width: auto;
    min-width: 9.5rem;
    max-width: 11rem;
    flex: 0 0 auto;
}

.bk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 40px;
    padding: 0 1.1rem;
    border-radius: 10px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.bk-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bk-btn--outline {
    background: #fff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.bk-btn--outline:hover:not(:disabled) {
    background: #eff6ff;
    color: #1d4ed8;
}

.bk-btn--success {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.bk-btn--success:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

.bk-btn--sm {
    height: 34px;
    padding: 0 0.75rem;
    font-size: 0.82rem;
}

.bk-btn--danger {
    color: #dc2626;
    background: #fff;
    border-color: #fca5a5;
}

.bk-btn--danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
}

.bk-btn--icon {
    width: 40px;
    padding: 0;
    color: #475569;
    background: #fff;
    border-color: #e2e8f0;
}

.bk-btn--icon:hover:not(:disabled) {
    background: #f1f5f9;
}

.bk-muted {
    color: #64748b;
    font-size: 0.85rem;
}

.bk-alert {
    margin: 1rem 0 0;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    font-size: 0.86rem;
}

.bk-alert--danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ---------- Leads table ---------- */

.leads-table-scroll {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.leads-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.leads-table thead th {
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.leads-table tbody td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    color: #0f172a;
}

.leads-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.leads-table tbody tr:hover td {
    background: #f1f5ff;
}

.leads-table .leads-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
}

.leads-table .actions {
    text-align: right;
    white-space: nowrap;
}

.leads-id-head,
.leads-id-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.leads-id {
    color: #475569;
    font-weight: 600;
}

.leads-check {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.leads-lead-col {
    width: 15rem;
    min-width: 12rem;
    max-width: 16rem;
}

.leads-lead-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leads-lead-cell__info {
    flex: 1 1 auto;
    min-width: 0;
}

.leads-primary {
    display: block;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    overflow-wrap: anywhere;
    cursor: pointer;
    width: fit-content;
}

.leads-secondary {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.2;
    margin-top: 0.1rem;
    word-break: break-all;
}

.leads-primary:hover,
.leads-primary:focus-visible {
    color: #2563eb;
    text-decoration: underline;
    outline: none;
}

.leads-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
}

.leads-icon-btn:hover:not(:disabled) {
    background: #eff6ff;
}

.leads-icon-btn--danger {
    color: #dc2626;
}

.leads-icon-btn--danger:hover:not(:disabled) {
    background: #fef2f2;
}

.leads-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.leads-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.leads-inline-select {
    width: 100%;
    min-width: 110px;
    max-width: 160px;
    height: 2rem;
    padding: 0.15rem 0.4rem;
    font: inherit;
    font-size: 0.8125rem;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
}

.leads-status-select { font-weight: 600; }
.leads-status-select--new { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.leads-status-select--active { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.leads-status-select--confirm { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.leads-status-select--lost { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.leads-status-select option { color: #0f172a; background: #fff; font-weight: 400; }

.leads-tip-host {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
}

.leads-notes-tip {
    display: none;
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    z-index: 1300;
    width: 320px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: #1e293b;
    color: #f8fafc;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    white-space: normal;
    font-weight: 400;
    cursor: default;
}

.leads-tip-host:hover .leads-notes-tip { display: block; }
.leads-notes-tip__title { font-weight: 700; font-size: 0.8rem; margin-bottom: 0.35rem; }
.leads-notes-tip__empty { font-size: 0.75rem; opacity: 0.8; }
.leads-notes-tip__item { padding: 0.3rem 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.leads-notes-tip__meta { font-size: 0.7rem; opacity: 0.75; }
.leads-notes-tip__text { font-size: 0.78rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.leads-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
    font-size: 0.85rem;
    color: #64748b;
}

.leads-pager__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leads-pager__controls select {
    height: 34px;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    padding: 0 0.5rem;
    font: inherit;
    background: #fff;
}

.leads-bulkbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.leads-processing {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.leads-processing__card {
    width: min(380px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.6rem 1.5rem;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    text-align: center;
}

.leads-processing__card strong { color: #0f172a; font-size: 0.98rem; }
.leads-processing__card span:last-child { color: #475569; font-size: 0.82rem; line-height: 1.45; }

.leads-spinner {
    width: 42px;
    height: 42px;
    margin-bottom: 0.35rem;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: leads-spin 0.8s linear infinite;
}

@keyframes leads-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Add / Edit lead form ---------- */

.lf {
    max-width: 1180px;
    margin: 0 auto;
    color: #0f172a;
}

.lf-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.lf-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.lf-sub { margin: 0.2rem 0 0; font-size: 0.85rem; color: #334155; }
.lf-muted { margin: 0; color: #334155; }

.lf-card {
    background: #fff;
    border: 1px solid #d5dbe4;
    border-radius: 12px;
    padding: 1.25rem 1.5rem 1.5rem;
}

.lf-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.35rem 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1e3a8a;
}

.lf-section:first-child { margin-top: 0.25rem; }
.lf-section::after { content: ""; flex: 1; height: 1px; background: #d5dbe4; }

.lf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.lf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lf-span-all { grid-column: 1 / -1; }

.lf-label { display: block; margin-bottom: 0.35rem; font-size: 0.875rem; font-weight: 600; color: #0f172a; }
.lf-req { color: #dc2626; }

.lf-input {
    width: 100%;
    height: 40px;
    padding: 0 0.75rem;
    font: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid #b8c2d0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

select.lf-input,
input[type="date"].lf-input { cursor: pointer; }
.lf-input::placeholder { color: #64748b; opacity: 1; }
.lf-input:hover { border-color: #94a3b8; }
.lf-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.lf-input:disabled { background: #f1f5f9; color: #475569; cursor: not-allowed; }
.lf-textarea { height: auto; padding: 0.55rem 0.75rem; resize: vertical; line-height: 1.5; }
.lf-input.is-invalid { border-color: #dc2626; }
.lf-error { display: block; margin-top: 0.25rem; font-size: 0.75rem; color: #dc2626; }
.lf-mt { margin-top: 0.5rem; }

.lf-pax { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.lf-pax > div { position: relative; }
.lf-pax .lf-input { padding-right: 3.6rem; }
.lf-pax span {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155;
    pointer-events: none;
}

.lf-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid #d5dbe4;
}

.lf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 38px;
    padding: 0 1.1rem;
    border-radius: 8px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.lf-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.lf-btn--primary { background: #2563eb; color: #fff; }
.lf-btn--primary:hover:not(:disabled) { background: #1d4ed8; }
.lf-btn--light { background: #fff; color: #0f172a; border-color: #b8c2d0; }
.lf-btn--light:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.lf-btn--ghost { background: transparent; color: #334155; }
.lf-btn--ghost:hover:not(:disabled) { background: #f1f5f9; }

.lf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: none;
    padding: 0;
    color: #2563eb;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.lf-link:hover { text-decoration: underline; }

.lf-import {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
}

.lf-import strong { font-size: 0.92rem; color: #0f172a; }
.lf-import p { margin: 0.15rem 0 0; font-size: 0.82rem; color: #334155; }
.lf-import__actions { display: flex; gap: 0.5rem; }
.lf-file { position: relative; overflow: hidden; }
.lf-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.lf svg.bk-ico,
.ld svg.bk-ico,
.fu svg.bk-ico {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Lead dashboard ---------- */

.ld {
    max-width: 1380px;
    margin: 0 auto;
    color: #0f172a;
}

.ld-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    border-radius: 10px;
    padding: 1rem 1.35rem;
    margin-bottom: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ld-header__title { display: flex; align-items: center; gap: 0.75rem; }
.ld-header h1 { margin: 0; font-size: 1.6rem; font-weight: 700; color: #fff; }
.ld-header__meta { opacity: 0.9; font-size: 0.975rem; margin: 0.25rem 0 0; }
.ld-header__meta a { color: #fff; }
.ld-header__badges { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.ld-back-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.ld-back-btn:hover { background: rgba(255, 255, 255, 0.25); }

.ld-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    background: #e2e8f0;
    color: #334155;
}

.ld-badge--new { background: #dbeafe; color: #1d4ed8; }
.ld-badge--active { background: #dcfce7; color: #15803d; }
.ld-badge--confirm { background: #fef3c7; color: #b45309; }
.ld-badge--muted { background: #f1f5f9; color: #475569; }
.ld-badge--cancel { background: #fee2e2; color: #b91c1c; }
.ld-badge--lost { background: #fecaca; color: #991b1b; }
a.ld-badge:hover { background: #fff; }

.ld-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    background: #0f172a;
    border-radius: 10px 10px 0 0;
    padding: 0.25rem 0.4rem 0;
    margin: 0;
    list-style: none;
}

.ld-tab {
    color: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 0.65rem 1.1rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.975rem;
    background: transparent;
    cursor: pointer;
}

.ld-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.ld-tab.active { color: #0f172a; background: #fff; }

.ld-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 0.85rem 1rem 1rem;
}

.ld-section {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.85rem 0.85rem;
    margin-bottom: 0.65rem;
    background: #fafbfc;
}

.ld-section__title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.65rem;
}

.ld-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 0.85rem;
    align-items: start;
}

.ld-form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ld-span-all { grid-column: 1 / -1; }

.ld-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.ld-form-field__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.2;
    margin: 0;
}

.ld-form-field__control {
    height: 40px;
    padding: 0.35rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 6px;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
}

textarea.ld-form-field__control { height: auto; resize: vertical; }
.ld-form-field__control:read-only:not(select) { background: #f8fafc; }

.ld-form-field__control:focus {
    border-color: #594ae2;
    box-shadow: 0 0 0 1px #594ae2;
    outline: none;
}

.ld-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.ld-two-col {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 1rem;
    align-items: start;
}

.ld-two-col--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.ld-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    padding: 0.85rem;
}

.ld-card__title {
    margin: 0 0 0.75rem;
    padding: 0.35rem;
    border-radius: 6px;
    background: #e9ecef;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
}

.ld-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
}

.ld-entry--done { background: #d4edda; }
.ld-entry--pending { background: #fff3cd; }
.ld-entry__date { font-weight: 700; font-size: 0.9rem; }
.ld-entry__text { font-size: 0.875rem; margin-top: 0.15rem; white-space: pre-line; overflow-wrap: anywhere; }
.ld-entry__actions { display: flex; gap: 0.15rem; flex: 0 0 auto; }
.ld-empty { padding: 1.5rem; text-align: center; color: #64748b; font-size: 0.9rem; }

.ld-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.ld-check input { width: 1rem; height: 1rem; }

/* ---------- Follow-up dashboard ---------- */

.fu-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.fu-stat {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
}

.fu-stat__label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.fu-stat__value { font-size: 1.65rem; font-weight: 700; color: #0f172a; line-height: 1.1; }
.fu-stat--done { border-left: 4px solid #16a34a; }
.fu-stat--pending { border-left: 4px solid #ea580c; }

.fu-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.fu-badge--done { background: #dcfce7; color: #15803d; }
.fu-badge--pending { background: #ffedd5; color: #c2410c; }
.fu-badge--overdue { background: #fee2e2; color: #b91c1c; }

.fu-date-filter label,
.fu-filter label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.fu-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fu-date-range input,
.fu-filter select,
.fu-filter input[type="search"] {
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    background: #fff;
    box-sizing: border-box;
}

.fu-date-range input { width: 150px; }
.fu-filter select { min-width: 150px; }
.fu-date-range__sep { color: #64748b; font-size: 0.85rem; }
.fu-range-label { color: #64748b; font-size: 0.8rem; margin-top: 0.3rem; }

.fu-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.fu-filter--search { flex: 1 1 220px; }
.fu-filter--search input[type="search"] { width: 100%; }
.fu-filter-actions { display: flex; gap: 0.5rem; margin-left: auto; }

.fu-date-cell strong { display: block; color: #0f172a; font-weight: 600; }
.fu-date-cell span { color: #64748b; font-size: 0.8rem; }
.fu-date-cell--overdue strong { color: #dc2626; }

.fu-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.fu-table { min-width: 980px; }

@media (max-width: 991.98px) {
    .lf-grid,
    .ld-form-grid,
    .ld-form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ld-two-col,
    .ld-two-col--reverse { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .bk-header--with-action { flex-direction: column; }
    .bk-toolbar .bk-toolbar__search,
    .bk-toolbar .bk-input--date,
    .bk-toolbar .bk-select-wrap--toolbar { width: 100%; max-width: none; min-width: 0; }
    .fu-stats { grid-template-columns: 1fr; }
    .fu-date-range input,
    .fu-filter,
    .fu-filter select { width: 100%; }
    .fu-filter-actions { margin-left: 0; width: 100%; }
}

@media (max-width: 575.98px) {
    .lf-grid,
    .lf-grid--2,
    .ld-form-grid,
    .ld-form-grid--4 { grid-template-columns: 1fr; }
}
