/* KPI cards */
    .ap-stat {
      padding: 1.2rem 1.35rem;
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .ap-stat-icon {
      width: 44px;
      height: 44px;
      border-radius: var(--ap-radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      flex-shrink: 0;
    }

    .ap-stat-label {
      font-size: .78rem;
      color: var(--ap-secondary);
      font-weight: 600;
    }

    .ap-stat-value {
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--ap-text-strong);
      letter-spacing: -.02em;
    }

    .ap-stat-change {
      font-size: .74rem;
      font-weight: 700;
    }

    /* Top tabs */
    .ap-tabs-nav {
      display: flex;
      gap: .25rem;
      border-bottom: 1px solid var(--ap-border);
      margin-bottom: 1.25rem;
    }

    .ap-tab-item {
      padding: .7rem .9rem;
      font-size: .87rem;
      font-weight: 600;
      color: var(--ap-secondary);
      border-bottom: 2px solid transparent;
      cursor: pointer;
    }

    .ap-tab-item:hover {
      color: var(--ap-text-strong);
    }

    .ap-tab-item.active {
      color: var(--ap-primary);
      border-bottom-color: var(--ap-primary);
    }

    .ap-tab-panel {
      display: none;
    }

    .ap-tab-panel.active {
      display: block;
      animation: apFade .2s ease;
    }

    @keyframes apFade {
      from {
        opacity: 0;
        transform: translateY(4px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Kanban */
    .ap-kanban {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      padding-bottom: .5rem;
    }

    .ap-kanban-col {
      flex: 0 0 280px;
      background: var(--ap-bg);
      border: 1px solid var(--ap-border);
      border-radius: var(--ap-radius);
      display: flex;
      flex-direction: column;
      max-height: calc(100vh - 340px);
      min-height: 340px;
    }

    .ap-kanban-col-head {
      padding: .9rem 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--ap-border);
      flex-shrink: 0;
    }

    .ap-kanban-col-title {
      font-size: .83rem;
      font-weight: 700;
      color: var(--ap-text-strong);
      display: flex;
      align-items: center;
      gap: .5rem;
    }

    .ap-kanban-col-title .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    .ap-kanban-count {
      font-size: .7rem;
      font-weight: 700;
      background: var(--ap-surface);
      border: 1px solid var(--ap-border);
      color: var(--ap-secondary);
      border-radius: 20px;
      padding: .1rem .5rem;
    }

    .ap-kanban-col-value {
      font-size: .72rem;
      color: var(--ap-secondary);
      padding: 0 1rem .6rem;
    }

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

    .ap-deal-card {
      background: var(--ap-surface);
      border: 1px solid var(--ap-border);
      border-radius: var(--ap-radius-sm);
      padding: .85rem;
      cursor: grab;
      transition: box-shadow .15s ease, transform .15s ease;
    }

    .ap-deal-card:hover {
      box-shadow: var(--ap-shadow);
    }

    .ap-deal-card.dragging {
      opacity: .4;
    }

    .ap-deal-card .deal-title {
      font-size: .85rem;
      font-weight: 700;
      color: var(--ap-text-strong);
      margin-bottom: .15rem;
    }

    .ap-deal-card .deal-company {
      font-size: .75rem;
      color: var(--ap-secondary);
      margin-bottom: .6rem;
    }

    .ap-deal-card .deal-value {
      font-size: .9rem;
      font-weight: 800;
      color: var(--ap-primary);
      margin-bottom: .6rem;
    }

    .ap-deal-card .deal-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .ap-deal-tag {
      font-size: .65rem;
      font-weight: 700;
      padding: .15rem .45rem;
      border-radius: 5px;
    }

    .ap-deal-tag.hot {
      background: var(--ap-danger-100);
      color: var(--ap-danger);
    }

    .ap-deal-tag.warm {
      background: var(--ap-warning-100);
      color: var(--ap-warning);
    }

    .ap-deal-tag.cold {
      background: var(--ap-info-100);
      color: var(--ap-info);
    }

    .ap-deal-avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      object-fit: cover;
    }

    .ap-kanban-col.drag-over {
      outline: 2px dashed var(--ap-primary);
      outline-offset: -4px;
    }

    .ap-add-deal-btn {
      margin: 0 .7rem .7rem;
      padding: .5rem;
      border-radius: var(--ap-radius-sm);
      border: 1px dashed var(--ap-border);
      background: transparent;
      color: var(--ap-secondary);
      font-size: .8rem;
      font-weight: 600;
    }

    .ap-add-deal-btn:hover {
      background: var(--ap-surface);
      color: var(--ap-text-strong);
    }

    /* Table */
    .ap-table thead th {
      font-size: .72rem;
      color: var(--ap-secondary);
      font-weight: 700;
      border-bottom: 1px solid var(--ap-border);
      padding: .75rem .6rem;
      white-space: nowrap;
    }

    .ap-table tbody td {
      padding: .8rem .6rem;
      border-bottom: 1px solid var(--ap-border);
      vertical-align: middle;
      font-size: .85rem;
      color: var(--ap-text);
    }

    .ap-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      object-fit: cover;
    }

    .ap-score-bar-bg {
      width: 60px;
      background: var(--ap-bg);
      border-radius: 10px;
      height: 6px;
    }

    .ap-score-bar {
      height: 100%;
      border-radius: 10px;
    }

    /* Contact / company cards */
    .ap-contact-card {
      background: var(--ap-surface);
      border: 1px solid var(--ap-border);
      border-radius: var(--ap-radius);
      padding: 1.2rem;
      text-align: center;
      height: 100%;
    }

    .ap-contact-card img {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      object-fit: cover;
      margin-bottom: .7rem;
    }

    .ap-contact-card .role {
      font-size: .76rem;
      color: var(--ap-secondary);
      margin-bottom: .6rem;
    }

    .ap-contact-actions {
      display: flex;
      justify-content: center;
      gap: .5rem;
      margin-top: .8rem;
      padding-top: .8rem;
      border-top: 1px solid var(--ap-border);
    }

    .ap-company-row {
      display: flex;
      align-items: center;
      gap: .9rem;
      padding: .9rem 0;
      border-bottom: 1px solid var(--ap-border);
    }

    .ap-company-row:last-child {
      border-bottom: none;
    }

    .ap-company-logo {
      width: 44px;
      height: 44px;
      border-radius: var(--ap-radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      color: #fff;
      font-size: .85rem;
      flex-shrink: 0;
    }

    /* Sidebar widgets */
    .ap-task-item {
      display: flex;
      align-items: flex-start;
      gap: .7rem;
      padding: .7rem 0;
      border-bottom: 1px solid var(--ap-border);
    }

    .ap-task-item:last-child {
      border-bottom: none;
    }

    .ap-task-item input[type=checkbox] {
      margin-top: .3rem;
    }

    .ap-task-title {
      font-size: .83rem;
      font-weight: 600;
      color: var(--ap-text-strong);
    }

    .ap-task-title.done {
      text-decoration: line-through;
      color: var(--ap-secondary);
      font-weight: 500;
    }

    .ap-task-meta {
      font-size: .72rem;
      color: var(--ap-secondary);
      margin-top: .15rem;
    }

    .ap-timeline {
      position: relative;
      padding-left: 1.5rem;
    }

    .ap-timeline-item {
      position: relative;
      padding-bottom: 1.1rem;
    }

    .ap-timeline-dot {
      position: absolute;
      left: -1.5rem;
      top: 2px;
      width: 11px;
      height: 11px;
      border-radius: 50%;
      border: 2px solid var(--ap-surface);
      box-shadow: 0 0 0 2px var(--ap-border);
    }

    .ap-timeline-time {
      font-size: .7rem;
      color: var(--ap-secondary);
    }
