/* ===== Theme ===== */
:root {
    /* Northstar brand palette (from welovenorthstar.com) */
    --brand-dark: #0a0a0a;
    --brand-amber: #f5a623;
    --brand-amber-dark: #c8861a;
    --brand-green: #10b981;
    --primary: #0a0a0a;
    --primary-hover: #262626;
    --primary-soft: #fff4e0;
    --accent: #f5a623;
    --accent-hover: #e0951a;
    --sidebar-bg: #0a0a0a;
    --sidebar-text: #a0a6ad;
    --sidebar-active: #1f2024;
    --bg: #f6f6f4;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #0a0a0a;
    --muted: #757a82;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
h1,h2,h3,h4,h5,h6,.page-title,.sidebar-brand,.stat-value,.kc-name,.kanban-title,.summary-val,.modal-title,.login-brand { font-family: 'Manrope', 'Inter', sans-serif; }
body { background: var(--bg); color: var(--text); font-size: 14px; }
.min-w-0 { min-width: 0; }

/* ===== Bootstrap overrides ===== */
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--brand-dark); font-weight: 600; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--brand-dark); }
.text-accent { color: var(--brand-amber-dark) !important; }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline-primary { color: var(--primary); border-color: #d4d6da; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn { border-radius: 8px; }
.btn-sm { padding: .3rem .65rem; font-size: .8rem; }
.form-control, .form-select { border-radius: 8px; border-color: var(--border); font-size: .875rem; padding: .5rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 166, 35, .22); }
.form-label { font-weight: 500; font-size: .8rem; color: #374151; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { background: #fff; border-bottom: 1px solid var(--border); padding: .9rem 1.25rem; font-weight: 600; border-radius: var(--radius) var(--radius) 0 0 !important; }
.table { font-size: .875rem; margin-bottom: 0; }
.table thead th { background: #f9fafb; color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); padding: .75rem 1.25rem; }
.table tbody td { padding: .8rem 1.25rem; border-color: #f1f3f5; vertical-align: middle; }
.table-hover tbody tr:hover { background: #fafbff; }
.badge { font-weight: 500; padding: .35em .6em; border-radius: 6px; }
.alert { border-radius: 10px; border: 0; font-size: .875rem; }
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-header { border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }
.modal-title { font-weight: 600; font-size: 1rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border); padding: .9rem 1.5rem; }
.dropdown-menu { border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); font-size: .85rem; }
.pagination { --bs-pagination-color: var(--primary); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); }
code { background: #f3f4f6; color: #4b5563; padding: .15em .4em; border-radius: 4px; font-size: .8em; }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { padding: 1.5rem 2rem; flex: 1; }

/* Sidebar */
.sidebar { width: 250px; flex-shrink: 0; background: var(--sidebar-bg); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: 1.25rem 1.25rem; color: #fff; font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--brand-dark); display: grid; place-items: center; font-size: 1rem; }
.sidebar-nav { padding: 1rem .75rem; flex: 1; overflow-y: auto; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #475569; font-weight: 600; padding: .9rem .75rem .4rem; }
.sidebar-nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; margin-bottom: 2px; border-radius: 8px; color: var(--sidebar-text); text-decoration: none; font-weight: 500; font-size: .875rem; transition: all .15s; }
.sidebar-nav a i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav a:hover { background: var(--sidebar-active); color: #fff; }
.sidebar-nav a.active { background: var(--accent); color: var(--brand-dark); font-weight: 600; }
.sidebar-nav a.active i { color: var(--brand-dark); }
.sidebar-footer { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--brand-dark); display: grid; place-items: center; font-weight: 600; flex-shrink: 0; }
.user-name { color: #fff; font-size: .85rem; font-weight: 500; }
.user-role { color: #64748b; font-size: .72rem; }
.btn-icon { background: transparent; border: 0; color: #64748b; font-size: 1.1rem; padding: .3rem; border-radius: 6px; }
.btn-icon:hover { background: var(--sidebar-active); color: #fff; }

/* Topbar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 2rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.page-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.page-subtitle { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }

/* Stat cards */
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-label { font-size: .75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }

/* Empty state */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ===== Kanban ===== */
.kanban { display: flex; gap: 1rem; overflow-x: auto; padding: .25rem .25rem 1rem; height: calc(100vh - 130px); scrollbar-width: thin; }
.kanban-col { flex: 0 0 310px; display: flex; flex-direction: column; background: #f1f3f7; border: 1px solid #e6e8ee; border-radius: 14px; max-height: 100%; overflow: hidden; }
.kanban-col-header { display: flex; align-items: center; gap: .55rem; padding: .8rem .9rem .7rem; background: #fff; border-bottom: 1px solid #e6e8ee; position: relative; }
.kanban-col-header::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--stage); }
.kanban-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage) 20%, transparent); flex-shrink: 0; }
.kanban-title { font-weight: 600; font-size: .875rem; }
.kanban-count { background: color-mix(in srgb, var(--stage) 12%, #fff); color: var(--stage); font-size: .7rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.kanban-add { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: #fff; color: var(--muted); display: grid; place-items: center; font-size: .8rem; transition: all .15s; }
.kanban-add:hover { background: var(--stage); border-color: var(--stage); color: #fff; }
.kanban-list { flex: 1; overflow-y: auto; padding: .65rem; min-height: 80px; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.kanban-list.drag-over { background: color-mix(in srgb, var(--stage) 6%, #f1f3f7); }

/* Card */
.kanban-card { position: relative; background: #fff; border: 1px solid #e6e8ee; border-left: 3px solid var(--stage); border-radius: 10px; padding: .7rem .8rem .6rem; margin-bottom: .6rem; cursor: grab; box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: box-shadow .15s, transform .15s, border-color .15s; }
.kanban-card:hover { box-shadow: 0 6px 16px rgba(16,24,40,.09); transform: translateY(-1px); }
.kanban-card.is-hot { border-left-color: #f59e0b; }
.kanban-card.sortable-ghost { opacity: .35; border-style: dashed; background: #fff8ef; }
.kanban-card.sortable-ghost * { visibility: hidden; }
.kanban-card.sortable-drag { transform: rotate(2.5deg) scale(1.03); box-shadow: 0 18px 38px rgba(0,0,0,.22); cursor: grabbing; }

/* Card "lands" with a soft pop + accent flash when dropped/refreshed */
@keyframes cardLand {
    0%   { transform: scale(.96); box-shadow: 0 0 0 3px rgba(248,185,0,0); }
    40%  { transform: scale(1.015); box-shadow: 0 0 0 3px rgba(248,185,0,.35); }
    100% { transform: scale(1); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
}
.kanban-card.landed { animation: cardLand .5s cubic-bezier(0.22, 1, 0.36, 1); }

/* Count badge pulses when it changes */
@keyframes countBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}
[data-count].count-bump { display: inline-block; animation: countBump .35s ease; }

/* Highlight the column you're dragging over */
body.is-dragging .kanban-list.sortable-ghost-over,
body.is-dragging .kanban-list:hover { background: #fff8ef; outline: 2px dashed var(--accent); outline-offset: -6px; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
    .kanban-card.landed, [data-count].count-bump { animation: none; }
}

.kc-top { display: flex; align-items: center; gap: .6rem; }
.kc-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; letter-spacing: .02em; }
.kc-name { font-weight: 600; font-size: .875rem; color: var(--text); line-height: 1.25; }
.kc-company { font-size: .75rem; color: var(--muted); }
.kc-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.kanban-card:hover .kc-actions { opacity: 1; }
.kc-btn { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: #9ca3af; display: grid; place-items: center; font-size: .8rem; }
.kc-btn:hover { background: #f3f4f6; color: var(--text); }
.kc-btn.danger:hover { background: #fef2f2; color: #dc2626; }

.kc-body { margin-top: .6rem; display: flex; flex-direction: column; gap: .2rem; }
.kc-row { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: #4b5563; text-decoration: none; }
.kc-row i { color: #a1a1aa; font-size: .8rem; width: 14px; text-align: center; }
a.kc-row:hover { color: var(--brand-amber-dark); }

.kc-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.kc-tags:empty { display: none; }
.kc-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 500; padding: .2rem .55rem; border-radius: 6px; background: #f3f4f6; color: #374151; }
.kc-tag i { font-size: .65rem; opacity: .7; }
.kc-tag.hot { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.kc-tag.muted { background: transparent; border: 1px dashed #d1d5db; color: var(--muted); }

.kc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .6rem; padding-top: .5rem; border-top: 1px solid #f1f3f5; font-size: .72rem; color: var(--muted); }
.kc-time { display: inline-flex; align-items: center; gap: .3rem; }
.kc-assignee { display: inline-flex; align-items: center; gap: .35rem; color: #374151; font-weight: 500; }
.kc-mini-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-dark); color: var(--accent); font-size: .6rem; font-weight: 700; display: grid; place-items: center; }
.kc-unassigned { display: inline-flex; align-items: center; gap: .3rem; color: #9ca3af; font-style: italic; }
.kanban-loader { text-align: center; padding: .75rem; color: var(--muted); font-size: .78rem; }

/* Stage swatch */
.stage-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .5rem; vertical-align: -1px; }
.drag-handle { cursor: grab; color: #c4c8cf; }
.drag-handle:hover { color: var(--muted); }

/* Permission matrix */
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table .form-check-input { width: 1.1rem; height: 1.1rem; margin: 0; cursor: pointer; }

/* ===== Kanban v5 additions ===== */
.kc-avatar { position: relative; overflow: hidden; }
.kc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; padding: 6px; }
.kc-avatar.lg { width: 52px; height: 52px; font-size: 1rem; border-radius: 12px; }
.kc-avatar.lg img { padding: 8px; }
.kanban-col.is-closed { opacity: .9; }
.kanban-col.is-closed .kanban-col-header { background: #f8f9fb; }
.kanban-empty { padding: 1.5rem .5rem !important; color: #b0b5bd !important; }
.kanban-empty i { display: block; font-size: 1.4rem; margin-bottom: .25rem; opacity: .6; }
body.is-dragging .kanban-list { outline: 2px dashed transparent; outline-offset: -6px; transition: outline-color .15s; }
body.is-dragging .kanban-list:hover { outline-color: var(--stage); }
.kanban-card { cursor: pointer; }
.kanban-card:active { cursor: grabbing; }

/* Filter chips */
.filter-chips { display: flex; gap: .35rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .78rem; font-weight: 500; color: #4b5563; cursor: pointer; user-select: none; transition: all .15s; margin: 0; }
.chip input { display: none; }
.chip:hover { border-color: var(--accent); color: var(--brand-amber-dark); }
.chip.on { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--accent); }

/* Summary strip */
.summary-strip { display: flex; align-items: center; gap: 1.75rem; padding: .65rem 1.1rem; margin-bottom: 1rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.summary-item { display: flex; align-items: baseline; gap: .4rem; }
.summary-val { font-size: 1.1rem; font-weight: 700; }
.summary-lbl { font-size: .75rem; color: var(--muted); font-weight: 500; }
.summary-stages { display: flex; gap: .9rem; }
.summary-stage { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: #4b5563; }
.summary-stage .kanban-dot { box-shadow: none; width: 8px; height: 8px; }
.kanban { height: calc(100vh - 195px); }

/* Drawer */
.drawer { width: 420px; border-left: 1px solid var(--border); box-shadow: -10px 0 40px rgba(16,24,40,.08); }
.drawer-close { position: absolute; top: .9rem; right: .9rem; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f3f4f6; color: var(--muted); display: grid; place-items: center; z-index: 2; }
.drawer-close:hover { background: #e5e7eb; color: var(--text); }
.drawer-head { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fafbff, #fff); }
.drawer-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.drawer-section { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; margin: 1.1rem 0 .5rem; }
.drawer-section:first-child { margin-top: 0; }
.drawer-dl { display: grid; grid-template-columns: 120px 1fr; gap: .45rem .75rem; margin: 0; font-size: .85rem; }
.drawer-dl dt { color: var(--muted); font-weight: 500; }
.drawer-dl dd { margin: 0; color: var(--text); word-break: break-word; }
.drawer-dl a { color: var(--brand-amber-dark); text-decoration: none; font-weight: 500; }
.drawer-notes { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: .75rem .9rem; font-size: .85rem; white-space: pre-wrap; color: #78350f; }
.toast { border-radius: 10px; font-size: .85rem; }

/* ===== Activity timeline ===== */
.tl-comment-form { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.tl-comment-form .kc-mini-avatar { width: 26px; height: 26px; font-size: .7rem; flex-shrink: 0; }
.timeline { position: relative; padding-left: 1.9rem; }
.timeline::before { content: ''; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: #eef0f4; }
.tl-item { position: relative; margin-bottom: 1rem; }
.tl-icon { position: absolute; left: -1.9rem; top: 0; width: 26px; height: 26px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: .7rem; box-shadow: 0 0 0 3px #fff; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .15rem; }
.tl-user { font-weight: 600; font-size: .82rem; }
.tl-time { font-size: .72rem; color: #9ca3af; white-space: nowrap; }
.tl-text { font-size: .82rem; color: #4b5563; }
.tl-old { text-decoration: line-through; color: #9ca3af; }
.tl-new { color: var(--text); font-weight: 500; }
.tl-comment { background: #f8f9fb; border: 1px solid var(--border); border-radius: 0 10px 10px 10px; padding: .55rem .75rem; font-size: .83rem; white-space: pre-wrap; margin-top: .2rem; }
.tl-diff { margin-top: .4rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: .76rem; }
.tl-diff-row { display: flex; align-items: center; gap: .4rem; padding: .35rem .6rem; border-bottom: 1px solid #f1f3f5; flex-wrap: wrap; }
.tl-diff-row:last-child { border-bottom: 0; }
.tl-diff-row:nth-child(odd) { background: #fafbfc; }
.tl-diff-label { font-weight: 600; color: var(--muted); min-width: 95px; }
.tl-diff-row i { color: #c4c8cf; font-size: .7rem; }


/* ===== Brand accents ===== */
.kanban-add:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--accent); }
.kc-tag.hot { background: #fff4e0; color: #9a5b00; border: 1px solid #fcd58a; }
.kanban-card.is-hot { border-left-color: var(--accent); }
.drawer-notes { background: #fff8e8; border-color: #fcd58a; color: #5b3a00; }
.toast.text-bg-dark { background: var(--brand-dark) !important; }
.toast.text-bg-dark .bi-check-circle-fill { color: var(--accent); }
.perm-chip { border-color: #d4d6da; color: var(--text); }
.btn-check:checked + .perm-chip { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--accent); }
.badge.brand { background: var(--primary-soft); color: #9a5b00; }
.progress-bar { background: var(--accent); }
.summary-val.text-warning { color: var(--brand-amber-dark) !important; }
.summary-val.text-success { color: var(--brand-green) !important; }
.tl-diff-label, .drawer-section { color: #9a9ea6; }
.sidebar-brand span { letter-spacing: -.01em; }
.sidebar-brand .brand-icon i { font-size: 1.05rem; }


/* ===== Lead form ===== */
.lead-form .modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.lf-head { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fafaf8, #fff); }
.lf-head .kc-avatar.lg { background: var(--brand-dark); color: var(--accent); }
.lf-title { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.05rem; }
.lf-sub { font-size: .8rem; color: var(--muted); }
.lf-section { display: flex; align-items: center; gap: .45rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9a9ea6; margin: 1.35rem 0 .7rem; padding-bottom: .4rem; border-bottom: 1px dashed var(--border); }
.lf-section:first-of-type { margin-top: 0; }
.lf-section i { color: var(--accent); font-size: .85rem; }
.req { color: #dc2626; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #a1a1aa; font-size: .85rem; pointer-events: none; }
.input-icon .form-control { padding-left: 2.2rem; }
.pill-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .8rem; font-weight: 500; color: #374151; cursor: pointer; margin: 0; transition: all .15s; user-select: none; }
.pill input { display: none; }
.pill i { font-size: .75rem; color: #a1a1aa; }
.pill:hover { border-color: #c4c8cf; background: #fafaf8; }
.pill:has(input:checked) { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--accent); }
.pill:has(input:checked) i { color: var(--accent); }
.pill-hot:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--brand-dark); }
.pill-hot:has(input:checked) i { color: var(--brand-dark); }
.lead-form .is-invalid { border-color: #dc2626; background-image: none; }
.lead-form .invalid-feedback { font-size: .75rem; }
.lead-form .form-select { background-position: right .6rem center; }
.lead-form textarea { resize: vertical; }

.kc-tag.web { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

/* Website submission card in timeline */
.tl-sub { border: 1px solid #a7f3d0; border-radius: 8px; background: #f0fdf7; margin-top: .25rem; font-size: .8rem; }
.tl-sub summary { padding: .45rem .7rem; cursor: pointer; font-weight: 500; color: #065f46; list-style: none; display: flex; align-items: center; }
.tl-sub summary::-webkit-details-marker { display: none; }
.tl-sub summary::after { content: '\F282'; font-family: 'bootstrap-icons'; margin-left: auto; font-size: .7rem; transition: transform .15s; }
.tl-sub[open] summary::after { transform: rotate(180deg); }
.tl-sub-grid { display: grid; grid-template-columns: 105px 1fr; gap: .3rem .6rem; padding: .3rem .7rem .65rem; border-top: 1px dashed #a7f3d0; background: #fff; border-radius: 0 0 8px 8px; }
.tl-sub-k { color: var(--muted); font-weight: 500; }
.tl-sub-v { color: var(--text); word-break: break-word; }
.tl-sub-v a { color: var(--brand-amber-dark); text-decoration: none; }

/* ===== Drawer v2 (tabs, cards, breathing room) ===== */
.drawer { width: 480px; }
.drawer-head { padding: 1.5rem 1.5rem 0; }
.drawer-tabs { border-bottom: 0; gap: .25rem; }
.drawer-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; font-size: .85rem; padding: .6rem .9rem; border-radius: 0; }
.drawer-tabs .nav-link:hover { color: var(--text); }
.drawer-tabs .nav-link.active { color: var(--text); border-bottom-color: var(--accent); background: transparent; }
.drawer-tabs .badge { background: #f3f4f6; color: var(--muted); font-size: .68rem; margin-left: .25rem; }
.drawer-body { padding: 1.25rem 1.5rem 2rem; background: #fafaf8; flex: 1; }
.drawer-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.15rem; margin-bottom: .9rem; }
.drawer-card-title { display: flex; align-items: center; gap: .45rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9a9ea6; margin-bottom: .7rem; }
.drawer-card-title i { color: var(--accent); font-size: .85rem; }
.dl-row { display: flex; align-items: center; gap: 1rem; padding: .5rem 0; border-top: 1px solid #f1f3f5; font-size: .875rem; }
.dl-row:first-of-type { border-top: 0; }
.dl-row > span:first-child { flex: 0 0 120px; color: var(--muted); font-weight: 500; font-size: .8rem; }
.dl-row a { color: var(--brand-amber-dark); text-decoration: none; font-weight: 500; word-break: break-all; }
.dl-row b { font-weight: 600; }
.dl-row em { color: #c4c8cf; font-style: normal; }
.drawer-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .72rem; color: #9a9ea6; padding: .25rem .25rem 0; }
.drawer-meta span + span::before { content: '·'; margin-right: 1rem; }
.drawer-notes { margin: 0; }
.tl-comment-form { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .6rem; margin-bottom: 1.25rem; }
.tl-comment-form .form-control { border: 0; box-shadow: none !important; }
.timeline { padding-left: 2.1rem; }
.timeline::before { left: 13px; }
.tl-item { margin-bottom: 1.15rem; }
.tl-icon { left: -2.1rem; width: 28px; height: 28px; box-shadow: 0 0 0 3px #fafaf8; }
.tl-content { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .65rem .85rem; }
.tl-head { margin-bottom: .3rem; }
.tl-comment { background: transparent; border: 0; padding: 0; border-radius: 0; margin-top: 0; }
.tl-sub { margin-top: .35rem; }
.tl-sub summary { padding: .5rem .75rem; }
.tl-sub-grid { grid-template-columns: 110px 1fr; gap: .4rem .75rem; padding: .5rem .75rem .75rem; }
.tl-diff { margin-top: .5rem; }

/* Logo images: clearbit logos are full-bleed, keep small inset */
.kc-avatar img { padding: 4px; border-radius: inherit; }
.kc-avatar.lg img { padding: 6px; }

/* ===== Follow-up tasks ===== */
.nav-badge { margin-left: auto; background: #dc2626; color: #fff; font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; }
.task-form .chip { font-size: .72rem; padding: .25rem .6rem; }
.task-item { display: flex; align-items: flex-start; gap: .6rem; background: #fff; border: 1px solid var(--border); border-left: 3px solid #d1d5db; border-radius: 10px; padding: .65rem .75rem; margin-bottom: .55rem; }
.task-item.is-overdue { border-left-color: #dc2626; background: #fff7f7; }
.task-item.is-today { border-left-color: var(--accent); background: #fffbf2; }
.task-item.is-done { opacity: .6; border-left-color: #10b981; }
.task-item.is-done .task-title { text-decoration: line-through; }
.task-check { border: 0; background: transparent; padding: 0; font-size: 1.15rem; color: #c4c8cf; line-height: 1; }
.task-check:hover { color: var(--accent); }
.task-item.is-done .task-check { color: #10b981; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: .85rem; }
.task-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .74rem; color: var(--muted); margin-top: .15rem; }
.task-meta i { margin-right: .25rem; }
.task-item.is-overdue .task-due { color: #dc2626; font-weight: 600; }
.task-item.is-today .task-due { color: #b45309; font-weight: 600; }
.task-notes { font-size: .78rem; color: #4b5563; margin-top: .3rem; white-space: pre-wrap; }
.task-del { opacity: 0; }
.task-item:hover .task-del { opacity: 1; }
.kc-task { display: flex; align-items: center; gap: .4rem; margin-top: .55rem; padding: .35rem .55rem; border-radius: 7px; font-size: .72rem; font-weight: 500; background: #f3f4f6; color: #4b5563; }
.kc-task.is-overdue { background: #fef2f2; color: #b91c1c; }
.kc-task.is-today { background: #fff4e0; color: #9a5b00; }
.table-danger-soft td { background: #fff7f7; }

.toast-container { z-index: 2000; }
.toast { min-width: 260px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }

/* ===== Due follow-up reminders ===== */
.bell { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; color: var(--muted); text-decoration: none; margin-left: .25rem; }
.bell:hover { color: var(--text); border-color: #c4c8cf; }
.bell.has-due { color: var(--brand-amber-dark); border-color: #fcd58a; background: #fff8e8; }
.bell.has-due i { animation: ring 2.2s ease-in-out infinite; transform-origin: top center; }
.bell-count { position: absolute; top: -6px; right: -6px; background: #dc2626; color: #fff; font-size: .62rem; font-weight: 700; padding: .1rem .35rem; border-radius: 999px; min-width: 17px; text-align: center; }
@keyframes ring { 0%,60%,100% { transform: rotate(0) } 5% { transform: rotate(14deg) } 10% { transform: rotate(-12deg) } 15% { transform: rotate(10deg) } 20% { transform: rotate(-8deg) } 25% { transform: rotate(0) } }
.toast.reminder { background: #fff; border: 1px solid #fcd58a; border-left: 4px solid var(--accent); min-width: 340px; }
.toast.reminder .toast-header { background: #fff8e8; border-bottom: 1px solid #fde9bd; color: var(--text); }
.toast.reminder.is-overdue { border-color: #fecaca; border-left-color: #dc2626; }
.toast.reminder.is-overdue .toast-header { background: #fff1f1; border-bottom-color: #fecaca; color: #991b1b; }

/* ===== Journey / lifecycle ===== */
.kc-stage-age { color: #9ca3af; }
.kc-stage-age.stale { color: #dc2626; font-weight: 600; }
.date-menu { width: 300px; }
.journey-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .9rem; }
.journey-stats > div { background: #fafaf8; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; }
.journey-stats span { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #9a9ea6; font-weight: 600; }
.journey-stats b { display: block; font-size: .85rem; margin-top: .1rem; }
.journey-stats small { display: block; font-size: .68rem; color: var(--muted); }
.journey { position: relative; padding-left: 1.25rem; }
.journey::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: #eef0f4; }
.journey-step { position: relative; padding: .3rem 0 .55rem; }
.journey-dot { position: absolute; left: -1.25rem; top: .55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--stage); box-shadow: 0 0 0 3px #fff; }
.journey-step.current .journey-dot { box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--stage) 30%, transparent); }
.journey-body { font-size: .8rem; }
.journey-dur { font-size: .72rem; font-weight: 600; color: var(--brand-amber-dark); white-space: nowrap; }
.journey-dates { font-size: .72rem; color: var(--muted); }

/* ===== Drawer sizing fix ===== */
.offcanvas.drawer { --bs-offcanvas-width: 540px; width: 540px !important; max-width: 100vw; }
.drawer-tabs { flex-wrap: nowrap; overflow-x: auto; }
.drawer-tabs .nav-link { white-space: nowrap; padding: .55rem .7rem; font-size: .82rem; }
.drawer-tabs .nav-item { flex: 0 0 auto; }
.journey-stats { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.journey-stats > div { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: .75rem; border: 0; border-top: 1px solid #f1f3f5; border-radius: 0; padding: .55rem .75rem; }
.journey-stats > div:first-child { border-top: 0; }
.journey-stats b { margin: 0; }
.journey-stats small { text-align: right; }
@media (max-width: 600px) { .offcanvas.drawer { width: 100vw !important; } }

/* ===== Drawer scroll fix ===== */
.offcanvas.drawer { display: flex !important; flex-direction: column !important; height: 100vh !important; overflow: hidden !important; }
.offcanvas.drawer > #drawerContent { flex: 1 1 auto !important; min-height: 0 !important; max-height: 100% !important; overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
#drawerContent .drawer-head { flex: 0 0 auto !important; }
/* No nested scroll — drawer-body sits inside the scrolling drawerContent */
#drawerContent .drawer-body { flex: 0 0 auto !important; overflow: visible !important; max-height: none !important; }
/* Belt-and-braces: ensure Bootstrap tab panes don't try to scroll independently */
#drawerContent .tab-content, #drawerContent .tab-pane { overflow: visible !important; }
.drawer-tabs { scrollbar-width: none; }
.drawer-tabs::-webkit-scrollbar { display: none; }

/* ===== Notifications ===== */
.notif-menu { width: 380px; max-height: 480px; overflow-y: auto; border-radius: 12px; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .85rem; position: sticky; top: 0; background: #fff; z-index: 1; }
.notif-head .btn-link { color: var(--brand-amber-dark); text-decoration: none; font-size: .75rem; }
.notif-item { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid #f1f3f5; text-decoration: none; color: var(--text); }
.notif-item:hover { background: #fafaf8; }
.notif-item.unread { background: #fff8e8; }
.notif-item.unread .fw-semibold::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: .4rem; vertical-align: middle; }
.notif-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: #f3f4f6; color: #4b5563; }
.notif-ic.new_lead { background: #ecfdf5; color: #047857; }
.notif-ic.assigned { background: #fff4e0; color: #c8861a; }
.toast.text-bg-secondary { background: #1f2024 !important; }

/* ===== Org tree ===== */
.org-node { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .875rem; }
.org-children { margin-left: 13px; padding-left: 1.25rem; border-left: 2px solid #eef0f4; }

.toast.notif-pop { border-left-color: var(--brand-dark); border-color: #d1d5db; }
.toast.notif-pop .toast-header { background: var(--brand-dark); color: var(--accent); border: 0; }
.toast.notif-pop .toast-header .btn-close { filter: invert(1); }
.toast.notif-pop .toast-header small { color: #a0a6ad; }

/* ===== Score ===== */
.score { display: inline-flex; align-items: center; gap: .2rem; font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 999px; flex-shrink: 0; }
.score i { font-size: .65rem; }
.score-hot  { background: #fee2e2; color: #b91c1c; }
.score-warm { background: #fff4e0; color: #9a5b00; }
.score-cold { background: #f3f4f6; color: #6b7280; }
.kc-tag.lost { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
/* ===== Duplicate warning ===== */
.dup-warn { display: flex; gap: .6rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: .6rem .8rem; margin-bottom: 1rem; font-size: .8rem; color: #78350f; }
.dup-warn > i { color: #d97706; font-size: 1rem; }
.dup-row { display: flex; align-items: center; gap: .4rem; padding: .25rem 0; color: #78350f; text-decoration: none; }
.dup-row:hover b { text-decoration: underline; }
.dup-why { margin-left: auto; font-size: .68rem; background: #fde68a; padding: .1rem .4rem; border-radius: 4px; }
/* ===== Attachments ===== */
.att-drop { padding: 0; overflow: hidden; }
.att-drop-label { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1.25rem; border: 2px dashed #d1d5db; border-radius: 12px; cursor: pointer; color: var(--muted); font-size: .85rem; margin: 0; transition: all .15s; }
.att-drop-label i { font-size: 1.6rem; color: #c4c8cf; }
.att-drop-label small { font-size: .7rem; }
.att-drop:hover .att-drop-label, .att-drop.over .att-drop-label { border-color: var(--accent); background: #fffbf2; color: var(--brand-amber-dark); }
.att-item { display: flex; align-items: center; gap: .65rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; margin-bottom: .5rem; }
.att-ic { font-size: 1.4rem; }
.att-name { font-weight: 600; font-size: .85rem; color: var(--text); text-decoration: none; }
.att-name:hover { color: var(--brand-amber-dark); }
.att-meta { font-size: .72rem; color: var(--muted); }
/* ===== List view / bulk ===== */
.view-toggle .btn.active { background: var(--brand-dark); color: var(--accent); border-color: var(--brand-dark); }
.list-table th a { color: var(--muted); text-decoration: none; }
.list-table th a:hover { color: var(--text); }
.list-table td { cursor: pointer; }
.list-table tr.table-active td { background: #fff8e8; }
.bulk-bar { display: flex; align-items: center; gap: .6rem; background: var(--brand-dark); color: #fff; border-radius: 10px; padding: .6rem 1rem; margin-bottom: 1rem; font-size: .85rem; position: sticky; top: 70px; z-index: 10; }
.bulk-bar b { color: var(--accent); }
.saved-row .dropdown-item { font-size: .85rem; }

.pagination { --bs-pagination-active-bg: var(--brand-dark); --bs-pagination-active-border-color: var(--brand-dark); --bs-pagination-color: var(--text); --bs-pagination-hover-color: var(--brand-amber-dark); --bs-pagination-border-radius: 8px; font-size: .85rem; margin: 0; }

.kc-tag.sla { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.timeline.feed { padding-left: 2.1rem; }

/* ===== Filter drawer ===== */
.filter-drawer { --bs-offcanvas-width: 380px; width: 380px !important; }
.filter-drawer .drawer-body { display: block; }
.fd-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9a9ea6; margin: 0 0 .5rem; }
.filter-drawer .drawer-foot { display: flex; gap: .6rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: #fff; }
.filter-badge { position: absolute; top: -6px; right: -6px; background: var(--accent); color: var(--brand-dark); font-size: .62rem; font-weight: 700; padding: .05rem .35rem; border-radius: 999px; min-width: 16px; }
.filter-drawer .chip input { display: none; }
.filter-drawer .chip.on, .filter-drawer .chip:has(input:checked) { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--accent); }
.filter-drawer .chip:has(input:checked) i { color: var(--accent); }

/* ===== Lead reference ===== */
.kc-ref { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .66rem; font-weight: 600; color: #9ca3af; letter-spacing: .02em; margin-bottom: .35rem; }
.lead-ref { display: inline-flex; align-items: center; gap: .2rem; font-family: ui-monospace, monospace; font-size: .72rem; font-weight: 600; color: var(--brand-amber-dark); background: #fff8e8; border: 1px solid #fde9bd; padding: .1rem .45rem; border-radius: 6px; margin-top: .2rem; cursor: pointer; }
.lead-ref:hover { background: #fff4e0; }
.lead-ref i { font-size: .7rem; }

/* ===== Card declutter (v35) ===== */
.kanban-card { position: relative; padding-top: .65rem; }
/* Reference / order number — small, cursor pointer, click-to-copy */
.kc-ref { display: inline-flex; align-items: center; gap: .25rem; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .66rem; font-weight: 600; color: #6b7280; letter-spacing: .02em; margin-top: .15rem; cursor: pointer; max-width: 100%; }
.kc-ref:hover { color: #0a0a0a; }
.kc-ref i { font-size: .68rem; color: #9ca3af; }
/* Scheduled demo badge on the card */
.kc-demo { display: flex; align-items: center; gap: .35rem; margin-top: .5rem; padding: .35rem .55rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; font-size: .72rem; color: #1e40af; }
.kc-demo i { color: #1d4ed8; }
.kc-body { display: none; }
.kc-meta-row { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .5rem; font-size: .74rem; color: #6b7280; }
.kc-meta-row span { display: inline-flex; align-items: center; gap: .3rem; }
.kc-meta-row i { color: #b0b5bd; font-size: .72rem; }
.kc-meta-row:empty { display: none; }
.kc-tags { margin-top: .5rem; }
.kc-tag.muted { display: none; }
.kc-actions { position: absolute; top: .5rem; right: .5rem; background: #fff; border-radius: 6px; }
.kanban-card .score { align-self: flex-start; }

/* ===== Mobile hamburger + off-canvas sidebar (v43) ===== */
.menu-toggle { display: none; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 9px; font-size: 1.2rem; align-items: center; justify-content: center; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(10,10,10,.5); z-index: 1039; opacity: 0; transition: opacity .2s; }

/* ===== Responsive (v43) ===== */
@media (max-width: 900px) {
    .menu-toggle { display: inline-flex; }

    .sidebar {
        position: fixed; top: 0; left: 0; height: 100dvh; width: 260px; z-index: 1040;
        transform: translateX(-100%); transition: transform .25s ease; box-shadow: 8px 0 40px rgba(0,0,0,.25);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; opacity: 1; }
    body.sidebar-open { overflow: hidden; }

    .main { width: 100%; }
    .topbar { padding: .7rem 1rem; gap: .6rem; }
    .topbar-actions { gap: .35rem; }
    .page { padding: 1rem; }
    .page-title { font-size: 1.05rem; }

    /* Summary strip scrolls sideways instead of squashing */
    .summary-strip { gap: 1.1rem; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .summary-strip::-webkit-scrollbar { display: none; }
    .summary-item { flex: 0 0 auto; }
    .summary-stages { margin-left: 1rem !important; }

    /* Kanban: one column at a time, snap scrolling */
    .kanban { gap: .75rem; height: calc(100dvh - 210px); scroll-snap-type: x mandatory; padding-bottom: .5rem; }
    .kanban-col { flex: 0 0 85vw; scroll-snap-align: start; }

    /* Cards: reveal action buttons (no hover on touch) */
    .kc-actions { opacity: 1 !important; }

    /* KPI / stat cards a bit tighter */
    .stat-card { padding: .85rem .9rem; gap: .7rem; }
    .stat-icon { width: 38px; height: 38px; font-size: 1rem; }

    /* Reports date filter wraps neatly */
    .topbar-actions form { flex-wrap: wrap; }

    /* Tables scroll rather than overflow the screen */
    .table-responsive { -webkit-overflow-scrolling: touch; }
    .bulk-bar { top: 60px; }
}

@media (max-width: 480px) {
    .kanban-col { flex: 0 0 90vw; }
    .kanban { height: calc(100dvh - 230px); }
    .lf-head { padding: 1rem; }
    .modal-body { padding: 1rem; }
    .drawer-head { padding: 1.1rem 1.1rem .8rem; }
    .drawer-body { padding: 1rem 1.1rem; }
}

/* ===== Rich text editor (Quill) ===== */
.quill-wrap { border-radius: 8px; }
.quill-wrap .ql-toolbar.ql-snow { border: 1px solid var(--border); border-radius: 8px 8px 0 0; background: #fafbfc; }
.quill-wrap .ql-container.ql-snow { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 8px 8px; font-family: 'Inter', sans-serif; font-size: .9rem; }
.quill-wrap .ql-editor { min-height: 150px; }
.ql-snow .ql-stroke { stroke: #4b5563; }
.ql-snow.ql-toolbar button:hover .ql-stroke { stroke: var(--brand-amber-dark); }

/* ===== Reminder toasts: cap height + scroll (v51) ===== */
#toasts {
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}
#toasts::-webkit-scrollbar { width: 6px; }
#toasts::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); border-radius: 3px; }

/* ===== HR shared layout (v52) ===== */

.page-head { display:flex; align-items:flex-start; gap:16px; margin-bottom:14px; flex-wrap:wrap }
.page-head h4 { margin:0; font-weight:700 }
.page-head .sub { color:#6b7280; font-size:13px; margin-top:2px }
.page-head .actions { margin-left:auto; display:flex; gap:8px; flex-shrink:0; flex-wrap:wrap }

.toolbar { background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:10px 12px; margin-bottom:16px;
           display:flex; align-items:center; gap:8px; flex-wrap:wrap }
.toolbar .form-control, .toolbar .form-select { border:1px solid #d1d5db; min-height:36px; font-size:13px }
.toolbar .label { font-size:11px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px; margin-right:4px }
.toolbar .w-sm { max-width:170px }
.toolbar .w-md { max-width:220px }
.toolbar .w-lg { max-width:280px }

.stat-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px; margin-bottom:18px }
.stat-card { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:16px 18px; display:flex; align-items:center; gap:14px; transition:transform .15s }
.stat-card:hover { transform:translateY(-1px); box-shadow:0 2px 8px rgba(0,0,0,.04) }
.stat-ico { width:42px; height:42px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0 }
.stat-card .label { font-size:11px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px }
.stat-card .val { font-size:22px; font-weight:700; line-height:1.1 }

.stat-ico.ico-green { background:#d1fae5; color:#047857 }
.stat-ico.ico-blue { background:#dbeafe; color:#1d4ed8 }
.stat-ico.ico-amber { background:#fef3c7; color:#b45309 }
.stat-ico.ico-violet { background:#ede9fe; color:#6d28d9 }
.stat-ico.ico-red { background:#fee2e2; color:#b91c1c }
.stat-ico.ico-dark { background:#1f2024; color:#f5a623 }
.stat-ico.ico-grey { background:#f3f4f6; color:#374151 }

.hr-pill { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:30px;
           font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.4px }
.hr-pill .dot { width:6px; height:6px; border-radius:50% }
.hr-pill.proposed, .hr-pill.draft, .hr-pill.pending { background:#f3f4f6; color:#4b5563 }
.hr-pill.proposed .dot, .hr-pill.draft .dot, .hr-pill.pending .dot { background:#9ca3af }
.hr-pill.approved, .hr-pill.finalized { background:#dbeafe; color:#1d4ed8 }
.hr-pill.approved .dot, .hr-pill.finalized .dot { background:#3b82f6 }
.hr-pill.paid, .hr-pill.applied, .hr-pill.active { background:#d1fae5; color:#047857 }
.hr-pill.paid .dot, .hr-pill.applied .dot, .hr-pill.active .dot { background:#10b981 }
.hr-pill.rejected { background:#fee2e2; color:#b91c1c } .hr-pill.rejected .dot { background:#ef4444 }

.emp-cell { display:flex; align-items:center; gap:10px }
.emp-cell .ava { width:34px; height:34px; border-radius:50%; object-fit:cover }
.emp-cell .name { font-weight:600; font-size:13px; color:#0a0a0a }
.emp-cell .sub { font-size:11px; color:#9ca3af }

.tier-badge { display:inline-flex; align-items:center; padding:4px 10px; border-radius:6px;
              font-size:11px; font-weight:700; color:#fff }

.table-card { background:#fff; border:1px solid #e5e7eb; border-radius:10px; overflow:hidden; margin-bottom:16px }
.table-card .card-head { padding:14px 18px; border-bottom:1px solid #e5e7eb; display:flex; align-items:center; gap:10px }
.table-card .card-head h6 { margin:0; font-weight:700; font-size:14px }
.table-card table { margin:0 }
.table-card thead th { background:#f9fafb; font-size:11px; text-transform:uppercase; color:#6b7280;
                       letter-spacing:.5px; font-weight:600; border-bottom:1px solid #e5e7eb; padding:10px 14px }
.table-card tbody td { vertical-align:middle; border-top:1px solid #f3f4f6; padding:10px 14px }
.table-card tbody td.pad-l { padding-left:18px }
.table-card tbody td.pad-r { padding-right:18px }
.table-card tbody tr:hover { background:#fafafa }

.hr-empty { padding:60px 20px; text-align:center; color:#9ca3af }
.hr-empty i { font-size:36px; color:#d1d5db; display:block; margin-bottom:8px }
.hr-empty .title { font-weight:600; color:#4b5563; margin-bottom:4px; font-size:14px }
.hr-empty .hint { font-size:13px }

.btn-pill { padding:4px 12px; border-radius:30px; font-size:12px }

.hr-list { display:flex; flex-direction:column; max-height:360px; overflow-y:auto }
.hr-list-item { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid #f3f4f6; text-decoration:none; color:#0a0a0a; font-size:13px }
.hr-list-item:last-child { border-bottom:none }
.hr-list-item:hover { background:#fafafa }
.hr-list-item .avatar { width:28px; height:28px; font-size:.72rem; flex-shrink:0 }
.hr-list-item .name { font-weight:600 }
.hr-list-item .meta { font-size:11px; color:#9ca3af }

