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

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow)
}

a {
  text-decoration: none;
  color: inherit
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit
}

input,
select,
textarea {
  font-family: inherit
}

ul,
ol {
  list-style: none
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light)
}

/* ── LAYOUT ── */
.app-layout {
  display: flex;
  min-height: 100vh
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: width var(--transition-slow);
  overflow: hidden
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed)
}

.sidebar-logo {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  min-height: var(--header-height)
}

.sidebar-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity .2s
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 14px 10px
}

.sidebar.collapsed .sidebar-logo img {
  height: 30px;
  width: 30px;
  object-fit: cover;
  object-position: left center
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-label {
  display: none
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto
}

.nav-section-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 8px 20px 3px;
  margin-top: 6px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  font-size: 13px;
  font-weight: 400
}

.nav-item:hover {
  background: rgba(255, 255, 255, .05);
  color: #fff
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 500
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center
}

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, .06)
}

/* ── HEADER ── */
.header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs)
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto
}

.header-brand {
  display: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: .02em;
  white-space: nowrap
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px
}

.btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  width: 260px;
  height: 36px;
  transition: all var(--transition)
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(235, 84, 63, .1)
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  width: 100%
}

.search-bar i {
  color: var(--text-muted);
  font-size: 12px
}

.search-bar {
  position: relative
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 900;
  overflow: hidden;
  display: none;
  animation: dropIn .12s ease
}

.search-results.open {
  display: block
}

.search-results .sr-group {
  padding: 7px 14px 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted)
}

.search-results .sr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-top: 1px solid var(--border-light)
}

.search-results .sr-item:hover {
  background: var(--surface-hover)
}

.search-results .sr-ico {
  width: 16px;
  text-align: center;
  flex-shrink: 0
}

.search-results .sr-main {
  flex: 1;
  min-width: 0
}

.search-results .sr-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.search-results .sr-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.search-results .sr-badge {
  flex-shrink: 0
}

.search-results .sr-arrow {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0
}

.search-results .sr-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center
}

.search-results .sr-footer {
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 7px
}

.search-results .sr-footer:hover {
  background: var(--surface-hover)
}

.notif-btn {
  position: relative
}

.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--surface)
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0
}

/* ── MAIN ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  transition: margin-left var(--transition-slow);
  min-width: 0;
  display: flex;
  flex-direction: column
}

.sidebar.collapsed~.main-content {
  margin-left: var(--sidebar-collapsed)
}

.content-area {
  padding: 24px;
  flex: 1
}

/* ── PAGE VIEWS ── */
.page-view {
  display: none
}

.page-view.active {
  display: block
}

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px
}

.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2
}

.page-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px
}

.gt-proj-header {
  cursor: pointer;
  user-select: none
}

.gt-proj-header .gt-chev {
  transition: transform var(--transition)
}

.gt-proj-header.open .gt-chev {
  transform: rotate(90deg)
}

.gt-proj-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease
}

.gt-proj-body > div {
  overflow: hidden;
  min-height: 0
}

.gt-proj-body.open {
  grid-template-rows: 1fr
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text)
}

.card-body {
  padding: 16px 18px
}

/* ── KPI ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: .04;
  background: currentColor;
  transform: translate(20px, -20px)
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md)
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px
}

.kpi-icon.primary {
  background: rgba(235, 84, 63, .12);
  color: var(--primary)
}

.kpi-icon.success {
  background: rgba(39, 174, 96, .12);
  color: var(--success)
}

.kpi-icon.warning {
  background: rgba(245, 166, 35, .12);
  color: var(--warning)
}

.kpi-icon.info {
  background: rgba(41, 128, 185, .12);
  color: var(--info)
}

.kpi-icon.secondary {
  background: rgba(67, 89, 100, .12);
  color: var(--secondary)
}

.kpi-icon.danger {
  background: rgba(231, 76, 60, .12);
  color: var(--danger)
}

.kpi-trend {
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px
}

.kpi-trend.up {
  color: var(--success)
}

.kpi-trend.down {
  color: var(--danger)
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  font-family: var(--font-body);
  white-space: nowrap
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(235, 84, 63, .25)
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary)
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary)
}

.btn-secondary:hover {
  background: var(--secondary-dark)
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border)
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted)
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text)
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger)
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success)
}

.btn-warning {
  background: var(--warning);
  color: #fff
}

.btn-wa {
  background: #25D366;
  color: #fff;
  border-color: #25D366
}

.btn-wa:hover {
  background: #1da851
}

.btn-call {
  background: var(--info);
  color: #fff;
  border-color: var(--info)
}

.btn-call:hover {
  background: #1f6fa0
}

.btn-sm {
  padding: 4px 11px;
  font-size: 12px
}

.btn-lg {
  padding: 10px 22px;
  font-size: 15px
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em
}

.badge-hot {
  background: rgba(235, 84, 63, .12);
  color: var(--hot)
}

.badge-warm {
  background: rgba(245, 166, 35, .12);
  color: var(--warm)
}

.badge-cold {
  background: rgba(108, 143, 158, .12);
  color: var(--cold)
}

.badge-new {
  background: rgba(41, 128, 185, .12);
  color: var(--info)
}

.badge-converted {
  background: rgba(39, 174, 96, .12);
  color: var(--success)
}

.badge-closed {
  background: rgba(107, 114, 128, .12);
  color: var(--text-muted)
}

.badge-success {
  background: rgba(39, 174, 96, .12);
  color: var(--success)
}

.badge-warning {
  background: rgba(243, 156, 18, .12);
  color: var(--warning)
}

.badge-danger {
  background: rgba(231, 76, 60, .12);
  color: var(--danger)
}

.badge-info {
  background: rgba(41, 128, 185, .12);
  color: var(--info)
}

.badge-primary {
  background: rgba(235, 84, 63, .12);
  color: var(--primary)
}

.badge-secondary {
  background: rgba(67, 89, 100, .1);
  color: var(--secondary)
}

/* ── TABLES ── */
.data-table-wrap {
  overflow-x: auto
}

table.data-table {
  width: 100%;
  border-collapse: collapse
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface-alt)
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text);
  vertical-align: middle
}

.data-table tbody tr {
  transition: background var(--transition)
}

.data-table tbody tr:hover {
  background: var(--surface-alt)
}

.data-table tbody tr:last-child td {
  border-bottom: none
}

/* ── FORMS ── */
.form-group {
  margin-bottom: 14px
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: .02em
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  caret-color: var(--primary);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(235, 84, 63, .08);
  transition: none
}

.form-control::placeholder {
  color: var(--text-light)
}

textarea.form-control {
  resize: vertical;
  min-height: 80px
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 28, .55);
  backdrop-filter: blur(5px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition)
}

.modal-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none
}

.modal-overlay.open {
  opacity: 1
}

.modal-overlay.open::before {
  pointer-events: auto
}

.modal {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 92%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  pointer-events: none;
  transform: translateY(16px) scale(.98);
  transition: transform var(--transition)
}

.modal-overlay.open .modal {
  transform: none;
  pointer-events: auto
}

.modal-lg {
  max-width: 720px
}

.modal-xl {
  max-width: 960px
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text)
}

.modal-body {
  padding: 22px
}

.modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface)
}

/* ── FULL PAGE ── */
.full-page {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  overflow-y: auto;
  display: none;
  flex-direction: column
}

.full-page.open {
  display: flex
}

.full-page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-xs)
}

.full-page-body {
  padding: 28px;
  flex: 1;
  overflow-y: auto
}

.full-page-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  transition: color var(--transition);
  background: none;
  border: none;
  font-family: inherit
}

.full-page-back:hover {
  color: var(--primary)
}

/* ── TABS ── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto
}

.tab-nav-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit
}

.tab-nav-btn:hover {
  color: var(--text)
}

.tab-nav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600
}

.tab-panel {
  display: none;
  padding-top: 20px
}

.tab-panel.active {
  display: block
}

.pill-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 3px
}

.pill-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  white-space: nowrap;
  transition: all var(--transition)
}

.pill-tab:hover {
  color: var(--text)
}

.pill-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs)
}

/* ── TOASTS ── */
.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  box-shadow: var(--shadow-md);
  pointer-events: all;
  max-width: 340px;
  animation: toastIn .25s ease forwards;
  font-size: 13px
}

.toast.success {
  border-left: 3px solid var(--success)
}

.toast.error {
  border-left: 3px solid var(--danger)
}

.toast.warning {
  border-left: 3px solid var(--warning)
}

.toast.info {
  border-left: 3px solid var(--info)
}

.toast-icon {
  font-size: 15px;
  margin-top: 1px;
  flex-shrink: 0
}

.toast.success .toast-icon {
  color: var(--success)
}

.toast.error .toast-icon {
  color: var(--danger)
}

.toast.warning .toast-icon {
  color: var(--warning)
}

.toast.info .toast-icon {
  color: var(--info)
}

.toast-content {
  flex: 1
}

.toast-title {
  font-weight: 600;
  color: var(--text)
}

.toast-msg {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px
}

.toast-close {
  color: var(--text-light);
  cursor: pointer;
  font-size: 13px
}

.toast-close:hover {
  color: var(--text)
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(16px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ── KANBAN ── */
.kanban-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  min-height: 560px
}

.kanban-col {
  min-width: 255px;
  max-width: 255px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column
}

.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.kanban-col-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px
}

.kanban-col-count {
  background: var(--border);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full)
}

.kanban-cards {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid var(--border)
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md)
}

.kanban-card[data-temp="hot"] {
  border-left-color: var(--hot)
}

.kanban-card[data-temp="warm"] {
  border-left-color: var(--warm)
}

.kanban-card[data-temp="cold"] {
  border-left-color: var(--cold)
}

.kanban-card.dragging {
  opacity: .5
}

.kanban-card-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px
}

.kanban-card-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px
}

.kanban-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px
}

/* ── TIMELINE ── */
.timeline {
  display: flex;
  flex-direction: column
}

.timeline-item {
  display: flex;
  gap: 12px;
  position: relative
}

.timeline-item:not(:last-child) .tl-line {
  position: absolute;
  left: 17px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: var(--border)
}

.tl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 5px;
  z-index: 1;
  position: relative
}

.tl-dot.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff
}

.tl-content {
  flex: 1;
  padding-bottom: 16px
}

.tl-time {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 3px
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-primary)
}

.logo-text {
  /* display: flex;
  flex-direction: column;*/
  line-height: 1.1;
  margin-left: 8px;
}

.logo-text span:first-child {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  color: #fff;
  letter-spacing: .02em;
  line-height: 1.1
}

.logo-text span:last-child {
  font-size: 9px;
  color: var(--sidebar-muted);
  letter-spacing: .1em;
  text-transform: uppercase
}


.tl-text {
  font-size: 13px;
  color: var(--text)
}

/* ── PROGRESS ── */
.prog-wrap {
  height: 7px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden
}

.prog-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width .6s ease
}

/* ── DROPDOWN ── */
.dropdown {
  position: relative;
  display: inline-block
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 170px;
  z-index: 800;
  overflow: hidden;
  display: none;
  animation: dropIn .12s ease
}

.dropdown-menu.open {
  display: block
}

.dropdown-menu.left {
  right: auto;
  left: 0
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-5px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.dd-item {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition)
}

.dd-item:hover {
  background: var(--surface-hover)
}

.dd-item.danger {
  color: var(--danger)
}

.dd-divider {
  height: 1px;
  background: var(--border-light);
  margin: 3px 0
}

/* ── NOTIF PANEL ── */
.notif-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 350px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 600;
  overflow: hidden;
  display: none
}

.notif-panel.open {
  display: block;
  animation: dropIn .15s ease
}

.notif-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.notif-item {
  padding: 12px 16px;
  display: flex;
  gap: 11px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light)
}

.notif-item:hover {
  background: var(--surface-hover)
}

.notif-item.unread {
  background: rgba(235, 84, 63, .03)
}

.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0
}

.notif-text {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4
}

.notif-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px
}

.unread-dot {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px
}

/* ── TOGGLE ── */
.toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0
}

.tog-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 21px;
  cursor: pointer;
  transition: all var(--transition)
}

.tog-slider::before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2)
}

.toggle input:checked+.tog-slider {
  background: var(--primary)
}

.toggle input:checked+.tog-slider::before {
  transform: translateX(17px)
}

/* ── STAR RATING ── */
.star-rating {
  display: flex;
  gap: 3px
}

.star {
  font-size: 22px;
  cursor: pointer;
  color: var(--border);
  transition: color var(--transition)
}

.star.filled {
  color: var(--warning)
}

.star:hover {
  color: var(--warning)
}

/* ── VOICE PLAYER ── */
.voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 14px
}

.voice-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0
}

.voice-waveform {
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 2px
}

.wave-bar {
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
  opacity: .4
}

.voice-time {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono)
}

/* ── PHOTO GRID ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px
}

.photo-item {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--border)
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s
}

.photo-item:hover img {
  transform: scale(1.06)
}

.photo-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition)
}

.photo-upload-zone:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(235, 84, 63, .03)
}

/* ── ALERT ── */
.alert-bar {
  padding: 9px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 14px
}

.alert-bar.warning {
  background: rgba(243, 156, 18, .1);
  border: 1px solid rgba(243, 156, 18, .3);
  color: #a07d0a
}

.alert-bar.danger {
  background: rgba(231, 76, 60, .1);
  border: 1px solid rgba(231, 76, 60, .3);
  color: var(--danger)
}

.alert-bar.info {
  background: rgba(41, 128, 185, .1);
  border: 1px solid rgba(41, 128, 185, .3);
  color: var(--info)
}

.alert-bar.success {
  background: rgba(39, 174, 96, .1);
  border: 1px solid rgba(39, 174, 96, .3);
  color: var(--success)
}

/* ── FILTER BAR ── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px
}

.filter-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap
}

.filter-select {
  padding: 5px 10px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
  transition: all var(--transition)
}

.filter-select:focus {
  border-color: var(--primary)
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px 10px
}

.filter-search:focus-within {
  border-color: var(--primary)
}

.filter-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12.5px;
  width: 160px;
  font-family: inherit
}

/* ── MILESTONE ── */
.milestone-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 8px
}

.ms-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0
}

/* ── QUOTATION ── */
.quot-line {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  border: 1px solid var(--border-light)
}

/* ── GRIDS ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-muted);
  text-align: center
}

.empty-icon {
  font-size: 38px;
  margin-bottom: 12px;
  opacity: .35
}

.empty-text {
  font-size: 13.5px
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 12px 0
}

/* ── UTILS ── */
.flex {
  display: flex
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center
}

.items-center {
  align-items: center
}

.justify-between {
  justify-content: space-between
}

.gap-sm {
  gap: 6px
}

.gap-md {
  gap: 12px
}

.gap-lg {
  gap: 20px
}

.mt-sm {
  margin-top: 6px
}

.mt-md {
  margin-top: 14px
}

.mt-lg {
  margin-top: 22px
}

.mb-sm {
  margin-bottom: 6px
}

.mb-md {
  margin-bottom: 14px
}

.mb-lg {
  margin-bottom: 22px
}

.text-muted {
  color: var(--text-muted)
}

.text-sm {
  font-size: 12px
}

.text-xs {
  font-size: 11px
}

.font-mono {
  font-family: var(--font-mono)
}

.w-full {
  width: 100%
}

.fw-600 {
  font-weight: 600
}

.fw-700 {
  font-weight: 700
}

/* ── LOGIN ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e2c38 0%, #2d4052 50%, #1a2332 100%);
  position: fixed;
  inset: 0;
  z-index: 9999
}

.login-card {
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  padding: 44px;
  width: 100%;
  max-width: 410px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5)
}

.login-role-btn {
  flex: 1;
  padding: 7px;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 255, 255, .15);
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s
}

.login-role-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(235, 84, 63, .12)
}

.login-role-btn.active:has(.fa-code) {
  border-color: #22d3ee;
  color: #22d3ee;
  background: rgba(34, 211, 238, .12)
}

.login-card-dev {
  border-color: rgba(34, 211, 238, .35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(34, 211, 238, .08)
}

.login-card-biz {
  border-color: rgba(46, 196, 166, .35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(46, 196, 166, .08)
}

.login-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, .07);
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all .2s;
  margin-bottom: 12px
}

.login-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, .1)
}

.login-input::placeholder {
  color: rgba(255, 255, 255, .32)
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  box-shadow: 0 4px 20px rgba(235, 84, 63, .4);
  margin-top: 4px
}

.login-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px)
}

/* ── SECTION CARDS ── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm)
}

/* ── CHIP INPUT ── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px
}

.chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 12.5px;
  transition: all .15s;
  background: var(--surface-alt);
  color: var(--text)
}

.chip.selected {
  background: rgba(235, 84, 63, .1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600
}


/* ── RESPONSIVE ── */
@media(max-width:991px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr
  }

  .search-bar {
    width: 180px
  }
}

.sidebar-close-btn {
  display: none;
}

@media(max-width:767px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px
  }

  .sidebar.mobile-open {
    transform: none
  }

  .main-content {
    margin-left: 0 !important
  }

  .content-area {
    padding: 14px
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr
  }

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

  .header {
    padding: 0 14px
  }

  .header-left {
    flex: 1;
    min-width: 0;
    gap: 0
  }

  .header-brand {
    display: block;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .search-bar {
    display: none
  }

  .kanban-board {
    flex-direction: column
  }

  .kanban-col {
    min-width: 100%;
    max-width: 100%
  }

  .full-page-body {
    padding: 14px
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    z-index: 5;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 199;
  }

  .sidebar-backdrop.show {
    display: block;
  }
}

/* ── TASKS MODULE ── */
.task-budget-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 10px
}

.task-budget-warn.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107
}

.task-budget-warn.danger {
  background: #fde8e8;
  color: #c0392b;
  border: 1px solid #f5c6cb
}

.task-budget-warn i {
  margin-top: 1px;
  flex-shrink: 0
}
/* ─── DEVELOPER PORTAL ─────────────────────────────── */
.nav-section-label.dev-only { color: var(--primary); opacity: 1; }
.nav-item.dev-only .nav-icon i { color: var(--primary); }
.card-header .card-title { display: flex; align-items: center; }
.kpi-card { min-width: 140px; }
#devBizTabs, #devNotifBody .pill-tabs { margin-bottom: 14px; }
/* ─── MULTI-SELECT STAFF DROPDOWN ───────────────────── */
.tfs { position: relative; }
.tfs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s;
  text-align: left
}
.tfs-trigger:hover { border-color: var(--primary) }
.tfs-trigger.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41,128,185,.12) }
.tfs-value { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; min-height: 20px }
.tfs-ph { color: var(--text-light); font-size: 12.5px }
.tfs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 7px 2px 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text)
}
.tfs-chip-dot { width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 700; color: #fff; flex-shrink: 0 }
.tfs-chip-rm { cursor: pointer; color: var(--text-muted); font-size: 10px; padding: 0 2px }
.tfs-chip-rm:hover { color: var(--danger) }
.tfs-caret { font-size: 11px; color: var(--text-muted); transition: transform .15s }
.tfs-trigger.open .tfs-caret { transform: rotate(180deg) }
.tfs-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  z-index: 60;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px
}
.tfs-panel.open { display: block }
.tfs-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; cursor: pointer; transition: background .15s }
.tfs-opt:hover { background: var(--surface-hover) }
.tfs-opt.selected { background: var(--surface-alt) }
.tfs-opt-avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0 }
.tfs-opt-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text) }
.tfs-opt-check { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; color: #fff }
.tfs-opt.selected .tfs-opt-check { background: var(--primary); border-color: var(--primary) }
