  // Summary Cards
  .khata-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;

    .khata-card {
      border-radius: 1rem;
      padding: 1rem;
      color: white;
      box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
      position: relative;
      overflow: hidden;

      &::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 8rem;
        height: 8rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        margin-right: -4rem;
        margin-top: -4rem;
      }

      &.green {
        background: linear-gradient(to bottom right, #10B981, #059669);
      }

      &.red {
        background: linear-gradient(to bottom right, #EF4444, #DC2626);
      }

      &.orange {
        background: linear-gradient(to bottom right, #FF6B00, #FF8534);
      }

      .card-content {
        position: relative;
        z-index: 1;

        .card-header {
          display: flex;
          align-items: center;
          gap: 0.5rem;
          margin-bottom: 0.5rem;

          svg {
            width: 1.25rem;
            height: 1.25rem;
          }

          span {
            font-size: 0.875rem;
            font-weight: 500;
            opacity: 0.9;
          }
        }

        .amount {
          font-size: 2.25rem;
          font-weight: 700;
          margin-bottom: 0.25rem;
        }

        .subtitle {
          font-size: 0.875rem;
          opacity: 0.8;
          display: flex;
          align-items: center;
          gap: 0.2rem;

          svg {
            width: 0.875rem;
            height: 0.875rem;
          }
        }
      }
    }
  }

  // Customer Ledger Section
  .main-content {
    display: grid;
    grid-template-columns:
      minmax(350px, 2fr) minmax(250px, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;

    .customer-list {
      .customer-list-card {
        background: white;
        border-radius: 1rem;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
        border: 1px solid #F3F4F6;

        .customer-header {
          padding: 1.25rem;
          border-bottom: 1px solid #F3F4F6;

          .header-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
            flex-wrap: wrap;

            .header-text {
              h2 {
                font-size: 1.125rem;
                font-weight: 700;
                color: #111827;
              }

              p {
                font-size: 0.75rem;
                color: #6B7280;
                margin-top: 0.125rem;
                margin-bottom: 4px;
              }
            }

            .header-actions-right {
              display: flex;
              align-items: center;
              gap: 0.75rem;
              flex-wrap: wrap;
              justify-content: flex-end;

              .tabs {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                background-color: #F3F4F6;
                padding: 0.25rem;
                border-radius: 0.75rem;

                .tab {
                  display: flex;
                  align-items: center;
                  gap: 0.5rem;
                  padding: 0.5rem 1rem;
                  background: transparent;
                  border: none;
                  border-radius: 0.5rem;
                  font-size: 0.875rem;
                  font-weight: 600;
                  color: #6B7280;
                  cursor: pointer;
                  transition: all 0.2s;

                  svg {
                    width: 1rem;
                    height: 1rem;
                  }

                  &:hover {
                    color: #374151;
                  }

                  &.active {
                    background-color: white;
                    color: #FF6B00;
                    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
                  }
                }
              }
            }

            .add-btn {
              display: flex;
              align-items: center;
              gap: 0.5rem;
              padding: 0.5rem 1rem;
              background-color: #FF6B00;
              color: white;
              border-radius: 0.5rem;
              font-size: 0.875rem;
              font-weight: 600;
              border: none;
              cursor: pointer;
              box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
              transition: all 0.2s;

              &:hover {
                background-color: #FF8534;
              }

              svg {
                width: 1rem;
                height: 1rem;
              }

              >div {
                white-space: nowrap;
              }
            }
          }

          .search-filter {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            width: 100%;

            .search-wrapper {
              flex: 1;
              position: relative;
              width: 90%;

              svg {
                position: absolute;
                left: 0.75rem;
                top: 50%;
                transform: translateY(-50%);
                width: 1rem;
                height: 1rem;
                color: #9CA3AF;
              }

              input {
                width: 100%;
                padding: 0.5rem 1rem 0.5rem 2.5rem;
                background-color: #F9FAFB;
                border: 1px solid #E5E7EB;
                border-radius: 0.5rem;
                font-size: 0.875rem;
                color: #111827;

                &:focus {
                  outline: none;
                  ring: 2px;
                  ring-color: #FF6B00;
                  border-color: transparent;
                }

                &::placeholder {
                  color: #9CA3AF;
                }
              }
            }

            .filter-btn {
              padding: 0.5rem;
              background-color: #F9FAFB;
              border: 1px solid #E5E7EB;
              border-radius: 0.5rem;
              cursor: pointer;
              transition: all 0.2s;
              display: flex;
              align-items: center;
              justify-content: center;
              width: 10%;

              &:hover {
                background-color: #F3F4F6;
              }

              svg {
                width: 1rem;
                height: 1rem;
                color: #4B5563;
              }
            }
          }
        }

        .customer-cards {
          padding: 1rem;
          height: max-content;
          max-height: 500px;
          overflow-y: auto;
          display: flex;
          flex-direction: column;
          gap: 0.75rem;

          .customer-card {
            border-radius: 0.75rem;
            padding: 1rem;
            border: 2px solid;
            cursor: pointer;
            transition: all 0.2s;

            &:hover {
              box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            }

            &.credit {
              background-color: #F0FDF4;
              border-color: #BBF7D0;
            }

            &.debit {
              background-color: #FEF2F2;
              border-color: #FECACA;
            }

            .card-main {
              display: flex;
              align-items: start;
              justify-content: space-between;

              .customer-info {
                display: flex;
                align-items: center;
                gap: 0.75rem;
                flex: 1;

                .avatar {
                  width: 3.5rem;
                  height: 3.5rem;
                  border-radius: 50%;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  color: white;
                  font-size: 1.25rem;
                  font-weight: 700;
                  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
                  flex-shrink: 0;
                }

                .customer-details {
                  flex: 1;

                  .name-row {
                    display: flex;
                    align-items: center;
                    gap: 0.5rem;
                    margin-bottom: 0.25rem;

                    h3 {
                      font-weight: 700;
                      color: #111827;
                      font-size: 1rem;
                    }

                    .badge {
                      padding: 0.125rem 0.5rem;
                      border-radius: 9999px;
                      font-size: 0.75rem;
                      font-weight: 600;

                      &.get {
                        background-color: #D1FAE5;
                        color: #065F46;
                      }

                      &.give {
                        background-color: #FEE2E2;
                        color: #991B1B;
                      }
                    }
                  }

                  .phone-row {
                    display: flex;
                    align-items: center;
                    gap: 0.25rem;
                    font-size: 0.75rem;
                    color: #6B7280;
                    margin-bottom: 0.25rem;

                    svg {
                      width: 0.75rem;
                      height: 0.75rem;
                    }
                  }

                  .transaction-row {
                    display: flex;
                    align-items: center;
                    gap: 0.25rem;
                    font-size: 0.75rem;
                    color: #9CA3AF;

                    svg {
                      width: 0.75rem;
                      height: 0.75rem;
                    }
                  }
                }
              }

              .balance-info {
                display: block;
                text-align: right;

                .amount {
                  font-size: 1.875rem;
                  font-weight: 700;
                  margin-bottom: 0.25rem;

                  &.get {
                    color: #059669;
                  }

                  &.give {
                    color: #DC2626;
                  }
                }

                .label {
                  font-size: 0.75rem;
                  font-weight: 600;

                  &.get {
                    color: #059669;
                  }

                  &.give {
                    color: #DC2626;
                  }
                }
              }
            }

            .card-actions {
              display: flex;
              align-items: center;
              gap: 4px;
              margin-top: 1rem;
              padding-top: 0.75rem;
              border-top: 1px solid #E5E7EB;

              button {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 0.375rem;
                padding: 0.5rem;
                background: white;
                border: 1px solid #E5E7EB;
                border-radius: 0.5rem;
                font-size: 0.875rem;
                font-weight: 500;
                color: #374151;
                cursor: pointer;
                transition: all 0.2s;

                &:hover {
                  background-color: #F9FAFB;
                }

                &:first-child,
                &:nth-child(2) {
                  flex: 1;
                }

                svg {
                  width: 1rem;
                  height: 1rem;
                }
              }
            }
          }
        }
      }
    }

    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 1rem;

      .quick-actions-card {
        background: white;
        border-radius: 1rem;
        padding: 1.25rem;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
        border: 1px solid #F3F4F6;

        h3 {
          font-weight: 700;
          color: #111827;
          font-size: 0.875rem;
          margin-bottom: 1rem;
        }

        .actions {
          display: flex;
          flex-direction: column;
          gap: 0.5rem;

          button {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 0.75rem;
            font-weight: 600;
            font-size: 0.875rem;
            border: none;
            cursor: pointer;
            transition: all 0.2s;

            &.gave-money {
              background: linear-gradient(to right, #F0FDF4, #DCFCE7);
              color: #15803D;

              .icon {
                width: 2rem;
                height: 2rem;
                background-color: #22C55E;
                border-radius: 0.5rem;
                display: flex;
                align-items: center;
                justify-content: center;

                svg {
                  width: 1rem;
                  height: 1rem;
                  color: white;
                }
              }

              &:hover {
                box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
              }
            }

            &.got-money {
              background: linear-gradient(to right, #FEF2F2, #FEE2E2);
              color: #991B1B;

              .icon {
                width: 2rem;
                height: 2rem;
                background-color: #EF4444;
                border-radius: 0.5rem;
                display: flex;
                align-items: center;
                justify-content: center;

                svg {
                  width: 1rem;
                  height: 1rem;
                  color: white;
                }
              }

              &:hover {
                box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
              }
            }

            &.add-customer {
              background: linear-gradient(to right, #EFF6FF, #DBEAFE);
              color: #1E40AF;

              .icon {
                width: 2rem;
                height: 2rem;
                background-color: #3B82F6;
                border-radius: 0.5rem;
                display: flex;
                align-items: center;
                justify-content: center;

                svg {
                  width: 1rem;
                  height: 1rem;
                  color: white;
                }
              }

              &:hover {
                box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
              }
            }

            >span {
              text-align: left !important;
            }
          }
        }
      }

      .total-customers-card {
        background: linear-gradient(to bottom right, #A855F7, #9333EA);
        border-radius: 1rem;
        padding: 0.5rem 1rem;
        color: white;
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;

        .card-header {
          display: flex;
          align-items: center;
          gap: 0.5rem;

          svg {
            width: 1.25rem;
            height: 1.25rem;
          }

          span {
            font-size: 0.875rem;
            font-weight: 500;
            opacity: 0.9;
          }
        }

        .count {
          font-size: 1.875rem;
          font-weight: 700;
        }
      }

      .recent-activity-card {
        background: white;
        border-radius: 1rem;
        padding: 1.25rem;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
        border: 1px solid #F3F4F6;

        h3 {
          font-weight: 700;
          color: #111827;
          font-size: 0.875rem;
          margin-bottom: 1rem;
        }

        .activities {
          display: flex;
          flex-direction: column;
          gap: 0.75rem;

          .activity-item {
            display: flex;
            align-items: start;
            gap: 0.5rem;

            .dot {
              width: 0.5rem;
              height: 0.5rem;
              border-radius: 50%;
              margin-top: 0.375rem;

              &.green {
                background-color: #22C55E;
              }

              &.red {
                background-color: #EF4444;
              }

              &.blue {
                background-color: #3B82F6;
              }
            }

            .activity-content {
              flex: 1;

              .title {
                font-size: 0.75rem;
                font-weight: 500;
                color: #111827;
              }

              .description {
                font-size: 0.75rem;
                color: #6B7280;
              }

              .time {
                font-size: 0.75rem;
                color: #9CA3AF;
                margin-top: 0.125rem;
              }
            }
          }
        }
      }

      .reminders-card {
        background-color: #FEFCE8;
        border-radius: 1rem;
        padding: 1.25rem;
        border: 2px solid #FDE047;

        .reminders-header {
          display: flex;
          align-items: center;
          gap: 0.5rem;
          margin-bottom: 0.75rem;

          svg {
            width: 1.25rem;
            height: 1.25rem;
            color: #CA8A04;
          }

          h3 {
            font-weight: 700;
            color: #78350F;
            font-size: 0.875rem;
          }
        }

        p {
          font-size: 0.75rem;
          color: #92400E;
          margin-bottom: 0.5rem;
        }

        button {
          width: 100%;
          padding: 0.5rem;
          background-color: #EAB308;
          color: white;
          border-radius: 0.5rem;
          font-size: 0.75rem;
          font-weight: 600;
          border: none;
          cursor: pointer;
          transition: all 0.2s;

          &:hover {
            background-color: #CA8A04;
          }
        }
      }
    }
  }

  .submit-btn {
    color: white;

    &.received-btn {
      background: linear-gradient(to right, #10B981, #059669);
      box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);

      &:hover {
        box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
        transform: translateY(-1px);
      }
    }

    &.made-btn {
      background: linear-gradient(to right, #EF4444, #DC2626);
      box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);

      &:hover {
        box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
        transform: translateY(-1px);
      }
    }

    &.add-btn {
      background: linear-gradient(to right, #3B82F6, #2563EB);
      box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);

      &:hover {
        box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
        transform: translateY(-1px);
      }
    }
  }


  .transaction-history-modal {
    .submit-btn {
      &.add-btn {
        display: flex;
        align-items: center;
        gap: 10px;
      }
    }
  }

  @media (max-width: 992px) {
    .main-content {
      grid-template-columns: 1fr !important;
    }
  }

  @media (max-width: 768px) {
    .customer-card {
      flex-direction: column;
      gap: 1rem;
      padding: 1rem;

      .customer-left {
        width: 100%;
      }

      .customer-right {
        width: 100%;
        justify-content: space-between;
      }

      .customer-actions {
        width: 100%;
        flex-wrap: wrap;
      }
    }

    .search-filter {
      gap: 0.75rem;
    }
  }

  @media (max-width: 576px) {
    .customer-cards {
      padding: 12px !important;

      .customer-card {
        padding: 0.5rem !important;

        .card-main {
          flex-wrap: wrap !important;

          .amount {
            font-size: 1.5rem !important;
          }
        }

        .customer-info {
          .avatar {
            width: 2.5rem !important;
            height: 2.5rem !important;
          }
        }

        .customer-details {
          .badge {
            font-size: 10px !important;
          }
        }
      }

      .card-actions {
        >button {
          >div {
            white-space: nowrap !important;
            font-size: 13px !important;
          }

          >svg {
            width: 0.8rem !important;
            height: 0.8rem !important;
          }
        }
      }
    }

    .customer-header {
      padding: 12px !important;
    }

    .tabs .tab {
      padding: 0.5rem !important;
      font-size: 12px !important;
      font-weight: 500 !important;
    }

  }

  @media (max-width: 480px) {
    .customer-card {
      .customer-avatar {
        width: 44px;
        height: 44px;
        font-size: 1rem;
      }

      .customer-name {
        font-size: 0.9375rem;
      }

      .customer-actions button {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
      }
    }
  }

  @media (max-width: 400px) {
    .customer-cards {
      .customer-card {

        .card-main {
          flex-direction: column !important;

          .balance-info {
            margin-top: 10px !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 10px !important;
            display: flex !important;
            width: 100% !important;
          }
        }
      }
    }
  }