/* Tekofy CRM — UI layer on top of Bootstrap 5.3 */
@font-face {
  font-family: "Inter";
  src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tk-navy: #0b1d45;
  --tk-navy-2: #12295c;
  --tk-navy-3: #1b3675;
  --tk-primary: #2563eb;
  --tk-primary-600: #1d4ed8;
  --tk-primary-50: #eff4ff;
  --tk-bg: #f5f7fb;
  --tk-surface: #ffffff;
  --tk-border: #e5e9f2;
  --tk-text: #0f172a;
  --tk-muted: #64748b;
  --tk-success: #16a34a;
  --tk-warning: #d97706;
  --tk-danger: #dc2626;
  --tk-radius: 14px;
  --tk-sidebar-w: 248px;
  --tk-topbar-h: 64px;
  --tk-bottomnav-h: 64px;
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--tk-text);
  --bs-body-bg: var(--tk-bg);
  --bs-border-color: var(--tk-border);
  --bs-link-color: var(--tk-primary);
  --bs-link-color-rgb: 37, 99, 235;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--bs-body-font-family);
  font-size: .9375rem;
  background: var(--tk-bg);
  color: var(--tk-text);
  overflow-x: hidden;
}
a { text-decoration: none; }
.text-muted, .text-secondary { color: var(--tk-muted) !important; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.small-xs { font-size: .75rem; }
.min-w-0 { min-width: 0; }

/* Buttons */
.btn { border-radius: 10px; font-weight: 500; padding: .5rem .95rem; }
.btn-sm { border-radius: 8px; padding: .35rem .7rem; }
.btn-primary { --bs-btn-bg: var(--tk-primary); --bs-btn-border-color: var(--tk-primary); --bs-btn-hover-bg: var(--tk-primary-600); --bs-btn-hover-border-color: var(--tk-primary-600); --bs-btn-active-bg: #1e40af; --bs-btn-disabled-bg: var(--tk-primary); --bs-btn-disabled-border-color: var(--tk-primary); }
.btn-outline-primary { --bs-btn-color: var(--tk-primary); --bs-btn-border-color: #bfd0fb; --bs-btn-hover-bg: var(--tk-primary); --bs-btn-hover-border-color: var(--tk-primary); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--tk-border); --bs-btn-hover-bg: #f1f4fa; --bs-btn-hover-border-color: #d7deea; }
.btn-soft { background: var(--tk-primary-50); color: var(--tk-primary); border: 1px solid transparent; }
.btn-soft:hover { background: #dfe9ff; color: var(--tk-primary-600); }
.btn-wa { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-wa:hover { background: #15803d; color: #fff; }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon.btn-sm { width: 32px; height: 32px; }

/* Forms */
.form-control, .form-select { border-radius: 10px; border-color: var(--tk-border); padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: #93b4fb; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12); }
.form-label { font-weight: 500; font-size: .85rem; color: #334155; margin-bottom: .35rem; }
.form-text { font-size: .78rem; }
.input-group-text { border-color: var(--tk-border); background: #f8fafc; border-radius: 10px; }

/* ---------------- Sidebar ---------------- */
.app-sidebar {
  width: var(--tk-sidebar-w);
  background: var(--tk-navy);
  color: #c7d2ea;
}
@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg { background-color: var(--tk-navy) !important; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; display: flex; flex-direction: column; }
  .app-sidebar .offcanvas-body { display: flex; flex-direction: column; flex: 1; overflow-y: auto; }
}
.app-sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--tk-navy); }
.brand { display: flex; align-items: center; gap: .65rem; padding: 1.15rem 1.25rem; color: #fff; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
  background: linear-gradient(135deg, #3b82f6, #2563eb 55%, #1d4ed8);
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: .7rem; color: #8ea0c6; letter-spacing: .06em; text-transform: uppercase; }
.side-nav { padding: .5rem .75rem; display: flex; flex-direction: column; gap: 2px; }
.side-nav .nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6f82ad; padding: .9rem .75rem .35rem; }
.side-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: 10px;
  color: #c7d2ea; font-weight: 500; position: relative;
}
.side-nav a i { font-size: 1.1rem; width: 20px; text-align: center; opacity: .9; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.active { background: var(--tk-navy-3); color: #fff; }
.side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: #60a5fa; }
.side-nav .badge-count { margin-left: auto; background: #ef4444; color: #fff; font-size: .7rem; padding: .15rem .45rem; border-radius: 999px; }
.side-user { margin-top: auto; padding: .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; gap: .65rem; }
.side-user .name { color: #fff; font-weight: 600; font-size: .875rem; }
.side-user .role { color: #8ea0c6; font-size: .75rem; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
  background: #dbe6ff; color: var(--tk-primary-600); font-weight: 700; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar-sm { width: 28px; height: 28px; flex-basis: 28px; font-size: .7rem; }
.avatar-lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 1.05rem; }
.app-sidebar .avatar { background: var(--tk-navy-3); color: #fff; }

/* ---------------- Main / topbar ---------------- */
.app-main { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .app-main { margin-left: var(--tk-sidebar-w); } }
.topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--tk-topbar-h);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--tk-border);
  display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
}
.topbar .search { max-width: 420px; flex: 1; position: relative; }
.topbar .search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--tk-muted); }
.topbar .search input { padding-left: 2.3rem; background: #f4f6fb; border-color: transparent; }
.topbar .search input:focus { background: #fff; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--tk-border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: #334155; position: relative; font-size: 1.1rem;
}
.icon-btn:hover { background: #f4f6fb; color: var(--tk-text); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .62rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid #fff; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); padding: 0; border-radius: 14px; overflow: hidden; border-color: var(--tk-border); box-shadow: 0 16px 40px rgba(15, 23, 42, .12); }
.notif-menu .item { display: flex; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid #f1f4f9; color: var(--tk-text); }
.notif-menu .item.unread { background: #f6f9ff; }
.notif-menu .item:hover { background: #f4f6fb; }

.mobile-header { display: none; }
@media (max-width: 991.98px) {
  .topbar { display: none; }
  .mobile-header {
    position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .5rem;
    height: 58px; padding: 0 .75rem; background: var(--tk-navy); color: #fff;
  }
  .mobile-header .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .14); color: #fff; }
  .mobile-header .brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: .95rem; }
  .mobile-header .title { font-weight: 600; font-size: 1rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-header .icon-btn .dot { border-color: var(--tk-navy); }
}
.mobile-search { display: none; }
@media (max-width: 991.98px) { .mobile-search.show { display: block; padding: .75rem 1rem 0; } }

.content { padding: 1.5rem; flex: 1; width: 100%; max-width: 1600px; }
@media (max-width: 991.98px) { .content { padding: 1rem 1rem calc(var(--tk-bottomnav-h) + 1.5rem + env(safe-area-inset-bottom)); } }
@media (max-width: 575.98px) { .content { padding-left: .75rem; padding-right: .75rem; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-head .sub { color: var(--tk-muted); font-size: .875rem; margin-top: .15rem; }
@media (max-width: 575.98px) { .page-head h1 { font-size: 1.2rem; } .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1; } }

/* ---------------- Bottom nav (mobile) ---------------- */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tk-bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--tk-border); box-shadow: 0 -6px 20px rgba(15, 23, 42, .06);
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #64748b; font-size: .68rem; font-weight: 600; background: none; border: 0; position: relative;
  }
  .bottom-nav i { font-size: 1.3rem; line-height: 1; }
  .bottom-nav a.active { color: var(--tk-primary); }
  .bottom-nav a.active::after { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--tk-primary); }
  .bottom-nav .pill { position: absolute; top: 8px; left: calc(50% + 6px); background: #ef4444; color: #fff; border-radius: 999px; font-size: .6rem; padding: 0 5px; min-width: 16px; line-height: 16px; }
}
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tk-bottomnav-h) + 16px + env(safe-area-inset-bottom)); z-index: 1025;
  width: 56px; height: 56px; border-radius: 18px; background: var(--tk-primary); color: #fff; font-size: 1.6rem;
  display: none; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(37, 99, 235, .4);
}
@media (max-width: 991.98px) { .fab { display: flex; } }

/* ---------------- Cards & KPIs ---------------- */
.card { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--tk-border); padding: .95rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card-header h2, .card-header h3, .card-title { font-size: 1rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.card-body { padding: 1.15rem; }
@media (max-width: 575.98px) { .card-body { padding: .9rem; } .card-header { padding: .8rem .9rem; } }

.kpi { padding: 1rem 1.1rem; height: 100%; display: flex; flex-direction: column; gap: .35rem; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kpi .label { color: var(--tk-muted); font-size: .8rem; font-weight: 500; line-height: 1.25; }
.kpi .value { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi .meta { font-size: .76rem; color: var(--tk-muted); }
.kpi .chip { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; }
a.kpi-link { color: inherit; display: block; height: 100%; }
a.kpi-link:hover .card { border-color: #c9d6f5; box-shadow: 0 6px 18px rgba(37, 99, 235, .08); }
@media (max-width: 575.98px) { .kpi { padding: .8rem .85rem; } .kpi .value { font-size: 1.2rem; } .kpi .chip { width: 30px; height: 30px; flex-basis: 30px; font-size: .9rem; } }

.chip-blue { background: #e8efff; color: #2563eb; }
.chip-green { background: #e7f7ee; color: #16a34a; }
.chip-amber { background: #fff4e0; color: #d97706; }
.chip-red { background: #fde8e8; color: #dc2626; }
.chip-violet { background: #f0ebff; color: #7c3aed; }
.chip-cyan { background: #e2f6fb; color: #0891b2; }
.chip-slate { background: #eef1f6; color: #475569; }
.chip-pink { background: #fde7f3; color: #db2777; }

.progress { height: 8px; border-radius: 99px; background: #edf1f7; }
.progress-bar { border-radius: 99px; background: var(--tk-primary); }

.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
@media (max-width: 575.98px) { .chart-box { height: 240px; } }

/* ---------------- Tables ---------------- */
.table-tk { margin: 0; font-size: .875rem; }
.table-tk > :not(caption) > * > * { padding: .75rem 1rem; border-bottom-color: #eef1f6; vertical-align: middle; }
.table-tk thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tk-muted); font-weight: 600; background: #fafbfd; white-space: nowrap; }
.table-tk tbody tr:hover { background: #fafcff; }
.table-tk td .sub { color: var(--tk-muted); font-size: .78rem; }
.table-responsive { border-radius: 0 0 var(--tk-radius) var(--tk-radius); }

/* Status & priority badges */
.badge-status { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-new { background: #eef2ff; color: #4f46e5; }
.status-contacted { background: #e0f2fe; color: #0369a1; }
.status-interested { background: #fef3c7; color: #b45309; }
.status-qualified { background: #ede9fe; color: #6d28d9; }
.status-quote { background: #e0e7ff; color: #1d4ed8; }
.status-negotiation { background: #ffedd5; color: #c2410c; }
.status-won { background: #dcfce7; color: #15803d; }
.status-lost { background: #fee2e2; color: #b91c1c; }
.badge-prio { font-size: .74rem; font-weight: 600; white-space: nowrap; }
.prio-high { color: #dc2626; }
.prio-medium { color: #d97706; }
.prio-low { color: #64748b; }
.badge-soft { background: #f1f5f9; color: #475569; font-weight: 600; border-radius: 999px; padding: .25rem .55rem; font-size: .72rem; }
.conn-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; }
.conn-ok { background: #dcfce7; color: #15803d; }
.conn-off { background: #f1f5f9; color: #64748b; }
.conn-err { background: #fee2e2; color: #b91c1c; }

/* ---------------- Lead cards (mobile list) ---------------- */
.lead-card { background: #fff; border: 1px solid var(--tk-border); border-radius: 14px; padding: .9rem; margin-bottom: .65rem; }
.lead-card .top { display: flex; gap: .65rem; align-items: flex-start; }
.lead-card .name { font-weight: 650; color: var(--tk-text); line-height: 1.25; display: block; }
.lead-card .company { color: var(--tk-muted); font-size: .8rem; }
.lead-card .facts { display: flex; flex-wrap: wrap; gap: .35rem .85rem; margin: .6rem 0 .7rem; font-size: .78rem; color: #475569; }
.lead-card .facts i { color: #94a3b8; margin-right: .2rem; }
.lead-card .actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.lead-card .actions .btn { min-height: 44px; padding: .3rem; font-size: .75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.lead-card .actions .btn i { font-size: 1.1rem; }
.overdue-text { color: var(--tk-danger); font-weight: 600; }

/* ---------------- Filters ---------------- */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 140px; }
.filter-bar .grow { flex: 1; min-width: 200px; }
@media (max-width: 767.98px) {
  .filter-bar .form-control, .filter-bar .form-select { min-width: 0; flex: 1 1 calc(50% - .5rem); }
  .filter-bar .grow { flex-basis: 100%; }
}
.tabs-pill { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs-pill::-webkit-scrollbar { display: none; }
.tabs-pill a { white-space: nowrap; padding: .5rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--tk-border); color: #475569; font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; gap: .4rem; }
.tabs-pill a.active { background: var(--tk-primary); border-color: var(--tk-primary); color: #fff; }
.tabs-pill a .n { background: rgba(15, 23, 42, .07); border-radius: 999px; padding: 0 .45rem; font-size: .72rem; }
.tabs-pill a.active .n { background: rgba(255, 255, 255, .22); }
.tabs-pill a.danger:not(.active) .n { background: #fee2e2; color: #b91c1c; }

/* ---------------- Lead profile ---------------- */
.profile-head { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.profile-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.quick-actions .btn { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .78rem; }
.quick-actions .btn i { font-size: 1.15rem; }
@media (min-width: 768px) { .quick-actions { display: flex; flex-wrap: wrap; } .quick-actions .btn { flex-direction: row; gap: .4rem; font-size: .875rem; min-height: 40px; } }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.dl-grid dt { font-size: .74rem; color: var(--tk-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.dl-grid dd { margin: .15rem 0 0; font-weight: 500; word-break: break-word; }
@media (max-width: 575.98px) { .dl-grid { grid-template-columns: 1fr 1fr; gap: .7rem; } }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: #eef1f6; }
.timeline li { display: flex; gap: .8rem; padding: .55rem 0; position: relative; }
.timeline .ic { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; display: grid; place-items: center; background: #fff; border: 2px solid #eef1f6; z-index: 1; font-size: .95rem; }
.timeline .ic.primary { color: #2563eb; } .timeline .ic.success { color: #16a34a; } .timeline .ic.warning { color: #d97706; }
.timeline .ic.info { color: #0891b2; } .timeline .ic.danger { color: #dc2626; } .timeline .ic.secondary { color: #64748b; }
.timeline .body { min-width: 0; flex: 1; }
.timeline .desc { white-space: pre-line; word-break: break-word; }
.timeline .when { font-size: .75rem; color: var(--tk-muted); }

.sticky-actions { display: none; }
@media (max-width: 767.98px) {
  .sticky-actions {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; position: fixed; left: 0; right: 0; z-index: 1026;
    bottom: calc(var(--tk-bottomnav-h) + env(safe-area-inset-bottom)); background: #fff; padding: .5rem .75rem; border-top: 1px solid var(--tk-border);
  }
  .sticky-actions .btn { min-height: 46px; font-size: .72rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .2rem; }
  .sticky-actions .btn i { font-size: 1.15rem; }
  .has-sticky-actions .content { padding-bottom: calc(var(--tk-bottomnav-h) + 90px + env(safe-area-inset-bottom)); }
}

.nav-tabs-tk { border-bottom: 1px solid var(--tk-border); gap: .25rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs-tk::-webkit-scrollbar { display: none; }
.nav-tabs-tk .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--tk-muted); font-weight: 600; padding: .7rem .9rem; white-space: nowrap; border-radius: 0; }
.nav-tabs-tk .nav-link.active { color: var(--tk-primary); border-bottom-color: var(--tk-primary); background: none; }

/* ---------------- Kanban ---------------- */
.kanban { display: flex; gap: .85rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.kanban-col { flex: 0 0 280px; background: #eef2f8; border-radius: 14px; padding: .65rem; scroll-snap-align: start; display: flex; flex-direction: column; max-height: calc(100vh - 240px); }
.kanban-col .col-head { display: flex; justify-content: space-between; align-items: center; padding: .25rem .35rem .65rem; font-weight: 650; font-size: .85rem; }
.kanban-col .col-sum { font-size: .74rem; color: var(--tk-muted); font-weight: 500; }
.kanban-list { flex: 1; overflow-y: auto; min-height: 80px; display: flex; flex-direction: column; gap: .5rem; border-radius: 10px; transition: background .15s; }
.kanban-list.drag-over { background: #dce6fb; }
.deal-card { background: #fff; border: 1px solid var(--tk-border); border-radius: 12px; padding: .7rem .8rem; cursor: grab; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: .5; }
.deal-card .t { font-weight: 600; font-size: .86rem; line-height: 1.3; color: var(--tk-text); }
.deal-card .v { font-weight: 700; color: var(--tk-text); }
@media (max-width: 575.98px) { .kanban-col { flex-basis: 84vw; max-height: none; } }

/* ---------------- Misc ---------------- */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--tk-muted); }
.empty i { font-size: 2.2rem; color: #c3cde0; display: block; margin-bottom: .5rem; }
.list-row { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.15rem; border-bottom: 1px solid #f1f4f9; }
.list-row:last-child { border-bottom: 0; }
.alert { border-radius: 12px; }
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; max-width: calc(100vw - 32px); }
@media (max-width: 991.98px) { .toast-wrap { top: 66px; left: 12px; right: 12px; } }
.tk-toast { background: #0f172a; color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-size: .875rem; display: flex; gap: .5rem; align-items: center; }
.tk-toast.err { background: #b91c1c; }
.modal-content { border-radius: 16px; border: 0; }
.modal-header { border-bottom-color: var(--tk-border); }
.modal-footer { border-top-color: var(--tk-border); }
@media (max-width: 575.98px) {
  .modal-dialog.modal-sheet { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; }
  .modal-dialog.modal-sheet .modal-content { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal-dialog.modal-sheet .modal-body { overflow-y: auto; }
  .modal.fade .modal-dialog.modal-sheet { transform: translateY(40px); }
  .modal.show .modal-dialog.modal-sheet { transform: none; }
}
@media (max-width: 991.98px) {
  .btn, .form-control, .form-select { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .form-control, .form-select { font-size: 16px; } /* prevent iOS zoom */
}
.setting-tile { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--tk-border); border-radius: 14px; background: #fff; color: var(--tk-text); height: 100%; }
.setting-tile:hover { border-color: #c9d6f5; box-shadow: 0 6px 18px rgba(37, 99, 235, .07); }
.setting-tile .chip { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 42px; }
.secret-mask { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; }
code.copy { background: #f1f5f9; padding: .3rem .5rem; border-radius: 8px; color: #0f172a; word-break: break-all; display: inline-block; }
.step-dots { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.step-dots span { padding: .3rem .7rem; border-radius: 999px; background: #eef1f6; font-size: .78rem; font-weight: 600; color: #64748b; }
.step-dots span.on { background: var(--tk-primary); color: #fff; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at -10% -20%, #1e40af 0%, transparent 60%), var(--tk-navy); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: #fff; }
.auth-form .inner { width: 100%; max-width: 380px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-feature { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.1rem; color: #c7d2ea; }
.auth-feature i { color: #60a5fa; font-size: 1.2rem; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media print { .app-sidebar, .topbar, .mobile-header, .bottom-nav, .fab, .sticky-actions { display: none !important; } .app-main { margin: 0; } }
.page-head .form-select { min-width: 150px; padding-right: 2.25rem; }
.page-head .actions .btn.flex-grow-0 { flex: 0 0 auto; }
